nix-community / nixpkgs-pytools

Tools for removing the tedious nature of creating nixpkgs derivations [maintainer=@costrouc]
MIT License
44 stars 9 forks source link

mocking error: "No module named 'setuptools_rust'" #18

Open lizelive opened 1 year ago

lizelive commented 1 year ago
[nix-shell:~/Documents/nixpkgs/pkgs/development/python-modules]$ python-package-init safetensors --nixpkgs-root=~/Documents/nixpkgs/
Fetching package="safetensors" version="stable"
mocking setup.py::setup(...) failed thus dependency information is likely incomplete
mocking error: "No module named 'setuptools_rust'"
inserting package before safety in python-modules.nix

the library does use rust to build. how do i fix this?

makefu commented 1 year ago

Hi! to be honest i am unsure what the problem is, normally for setuptools_rust to be available it is enough to add setuptools and setuptools-rust to propagatedBuildInputs. i also checked nix-init (https://github.com/nix-community/nix-init) but it seems to have the same issue: nix run --extra-experimental-features "flakes nix-command" github:nix-community/nix-init -- --url https://pypi.org/project/safetensors/ with 7 - buildPythonPackage - setuptools input mode also creates a derivation which is missing setuptools_rust