unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Hamzeh Nasajpour" <h.nasajpour@pantherx.org>
To: "SuarezMiguelC via" <help-guix@gnu.org>
Subject: Packaging a python package that is using setuptools_rust
Date: Mon, 19 Oct 2020 14:22:42 +0330	[thread overview]
Message-ID: <80e00aa7-9ddb-4255-9d55-0393e97e84e2@www.fastmail.com> (raw)

Hi,

I want to package the `etebase-py` library: https://github.com/etesync/etebase-py/

It's using the `setuptools_rust` for build/install. Also it has some rust dependencies that I packaged them. And now I create a package definition by `guix import ...`:
```
(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)
        ("rust" ,rust)))
    (home-page
      "https://github.com/etesync/etebase-py")
    (synopsis "Python client library for Etebase")
    (description "Python client library for Etebase")
    (license #f)))
```

I faced with the following error in the package building:
```
...
etebase-0.30.0/setup.py
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: [Errno 2] No such file or directory: 'cargo'
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/lnwxp7sym6i2ixg4mnmz9h7ff1fg32cd-python-etebase-0.30.0.drv' failed with exit code 1
build of /gnu/store/lnwxp7sym6i2ixg4mnmz9h7ff1fg32cd-python-etebase-0.30.0.drv failed
View build log at '/var/log/guix/drvs/ln/wxp7sym6i2ixg4mnmz9h7ff1fg32cd-python-etebase-0.30.0.drv.bz2'.
guix build: error: build of `/gnu/store/lnwxp7sym6i2ixg4mnmz9h7ff1fg32cd-python-etebase-0.30.0.drv' failed
```

Do you have any idea? I should add the rust dependencies to `native-inputs` or `inputs` of `etebase-py`? Do you have any package definition that is used `setuptools_rust` as example for me?


Regards,
Hamzeh


             reply	other threads:[~2020-10-19 10:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 10:52 Hamzeh Nasajpour [this message]
2020-10-24 13:54 ` Packaging a python package that is using setuptools_rust Hartmut Goebel
2020-10-25 10:16   ` Hamzeh Nasajpour
2020-10-25 10:47     ` Tobias Geerinckx-Rice
2020-10-25 11:28       ` Hamzeh Nasajpour
2020-10-25 12:26         ` Efraim Flashner
2021-12-31  8:33 ` Lars-Dominik Braun
2022-01-13  7:58   ` phodina

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=80e00aa7-9ddb-4255-9d55-0393e97e84e2@www.fastmail.com \
    --to=h.nasajpour@pantherx.org \
    --cc=help-guix@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.
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).