unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Packaging a python package that is using setuptools_rust
@ 2020-10-19 10:52 Hamzeh Nasajpour
  2020-10-24 13:54 ` Hartmut Goebel
  2021-12-31  8:33 ` Lars-Dominik Braun
  0 siblings, 2 replies; 8+ messages in thread
From: Hamzeh Nasajpour @ 2020-10-19 10:52 UTC (permalink / raw)
  To: SuarezMiguelC via

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-13  7:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-19 10:52 Packaging a python package that is using setuptools_rust Hamzeh Nasajpour
2020-10-24 13:54 ` 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

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).