From: "Hamzeh Nasajpour" <h.nasajpour@pantherx.org>
To: 44090@debbugs.gnu.org
Subject: bug#44090: Packaging a python library that is implemented with rust
Date: Tue, 20 Oct 2020 08:40:19 +0330 [thread overview]
Message-ID: <ccc953ad-6bc9-4ccf-8bc0-6c8d6d977105@www.fastmail.com> (raw)
Hi,
I'm not expert in rust and python but I need to package a python library, and this python library is a wrapper over the rust library. This library is using the `setuptools_rust` for build/install.
* python library: https://github.com/etesync/etebase-py
* rust library: https://github.com/etesync/etebase-rs
* `setup.py`: https://github.com/etesync/etebase-py/blob/master/setup.py
Anyway I need to package this python library. Since guix has two different build system for `python` and `rust` I don't know how can I package it. It's a python library but it should install some rust library inside the python system build.
* This is package definition of `python-setuptools-rust`:
```
(define-public python-setuptools-rust
(package
(name "python-setuptools-rust")
(version "0.11.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "setuptools-rust" version))
(sha256
(base32
"1p21sw77197m7pciy8g25bwwaakq1675h0x1lis9sypzr46p2s11"))))
(build-system python-build-system)
(native-inputs
`(("python-setuptools" ,python-setuptools)
("python-setuptools-scm" ,python-setuptools-scm)
("python-wheel" ,python-wheel)))
(propagated-inputs
`(("python-semantic-version"
,python-semantic-version)
("python-toml" ,python-toml)))
(home-page
"https://github.com/PyO3/setuptools-rust")
(synopsis "Setuptools rust extension plugin")
(description "Setuptools rust extension plugin")
(license license:expat)))
```
* And this is package definition of `python-etebase`.
```
(define-public python-etebase
(package
(name "python-etebase")
(version "0.30.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "etebase" version))
(sha256
(base32
"1py635aqnxx3jy4x6zffriqi0l9gc2gk06h0ms91k4rs68h0gb0i"))))
(build-system python-build-system)
(native-inputs
`(("python-msgpack" ,python-msgpack)
("python-setuptools-rust" ,python-setuptools-rust)))
(inputs
`(("rust-etebase-rs" ,rust-etebase-rs)))
(home-page
"https://github.com/etesync/etebase-py")
(synopsis "Python client library for Etebase")
(description "Python client library for Etebase")
(license #f)))
```
This is the error in package building:
```
etebase-0.30.0/src/
etebase-0.30.0/src/lib.rs
etebase-0.30.0/src/glue.rs.in
phase `unpack' succeeded after 0.0 seconds
starting phase `ensure-no-mtimes-pre-1980'
phase `ensure-no-mtimes-pre-1980' succeeded after 0.0 seconds
starting phase `enable-bytecode-determinism'
phase `enable-bytecode-determinism' succeeded after 0.0 seconds
starting phase `patch-usr-bin-file'
phase `patch-usr-bin-file' succeeded after 0.0 seconds
starting phase `patch-source-shebangs'
phase `patch-source-shebangs' succeeded after 0.0 seconds
starting phase `patch-generated-file-shebangs'
phase `patch-generated-file-shebangs' succeeded after 0.0 seconds
starting phase `build'
running "python setup.py" with command "build" and parameters ()
running build
running build_py
creating build
creating build/lib
creating build/lib/etebase
copying etebase/__init__.py -> build/lib/etebase
running build_ext
running build_rust
error: Can not find Rust compiler
command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "build" failed with status 1
builder for `/gnu/store/45b049cf1k8czxmvwqi3yw6gyk5s7hx5-python-etebase-0.30.0.drv' failed with exit code 1
build of /gnu/store/45b049cf1k8czxmvwqi3yw6gyk5s7hx5-python-etebase-0.30.0.drv failed
View build log at '/var/log/guix/drvs/45/b049cf1k8czxmvwqi3yw6gyk5s7hx5-python-etebase-0.30.0.drv.bz2'.
guix build: error: build of `/gnu/store/45b049cf1k8czxmvwqi3yw6gyk5s7hx5-python-etebase-0.30.0.drv' failed
```
Sorry for duplication, I sent this email here too: https://lists.gnu.org/archive/html/help-guix/2020-10/msg00092.html
then I thought this mailing list is better for asking this type questions.
Regards,
Hamzeh
next reply other threads:[~2020-10-20 5:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 5:10 Hamzeh Nasajpour [this message]
2020-10-20 10:23 ` bug#44090: Packaging a python library that is implemented with rust Leo Prikler
2021-02-01 19:02 ` Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ccc953ad-6bc9-4ccf-8bc0-6c8d6d977105@www.fastmail.com \
--to=h.nasajpour@pantherx.org \
--cc=44090@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).