help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Packaging a python package that is using setuptools_rust


From: Hamzeh Nasajpour
Subject: Packaging a python package that is using setuptools_rust
Date: Mon, 19 Oct 2020 14:22:42 +0330
User-agent: Cyrus-JMAP/3.3.0-489-gf39678d-fm-20201011.001-gf39678d0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]