nixpkgs-pytools icon indicating copy to clipboard operation
nixpkgs-pytools copied to clipboard

mocking error: "No module named 'setuptools_rust'"

Open lizelive opened this issue 2 years ago • 1 comments

[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?

lizelive avatar Mar 10 '23 00:03 lizelive

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

makefu avatar Mar 11 '23 11:03 makefu