nix-community / pypi2nix

Abandoned! Generate Nix expressions for Python packages
194 stars 47 forks source link

"No matching distribution found for wheel" packaging PyInstaller==3.5 #399

Closed charles-dyfis-net closed 4 years ago

charles-dyfis-net commented 4 years ago

Running pypi2nix (4f12dc348b93cb9d9104b6909c371478f4e61644) from master, built with (import ./VC/pypi2nix { pkgs = unstable; }) (where unstable points at current nixos-unstable as of the creation date of this ticket), the following occurs:

$ pypi2nix -r requirements_frozen.txt -V python3
INFO: pypi2nix v2.0.2 running ...
INFO: Downloading wheels and creating wheelhouse ...
INFO: Installing runtime requirements
INFO: Build wheels of setup and runtime requirements
  ERROR: Command errored out with exit status 1:
   command: /nix/store/bk1sncpx12nz1kzdixm1qs5wbx7wlnj3-python3-3.7.5-env/bin/python3.7 /nix/store/bk1sncpx12nz1kzdixm1qs5wbx7wlnj3-python3-3.7.5-env/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/tmpvyje6yxe/pip-build-env-806w4aa4/overlay --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links file:///tmp/tmpvyje6yxe/download -- 'setuptools>=40.8.0' wheel                                              
       cwd: None                                                                                                                                                                                                                             
  Complete output (4 lines):                                                                                                                                                                                                                 
  Looking in links: file:///tmp/tmpvyje6yxe/download                                                                                                                                                                                         
  Processing /tmp/tmpvyje6yxe/download/setuptools-42.0.2.zip                                                                                                                                                                                 
  ERROR: Could not find a version that satisfies the requirement wheel (from versions: none)                                                                                                                                                 
  ERROR: No matching distribution found for wheel                                                                                                                                                                                            
  ----------------------------------------                                                                                                                                                                                                   
ERROR: Command errored out with exit status 1: /nix/store/bk1sncpx12nz1kzdixm1qs5wbx7wlnj3-python3-3.7.5-env/bin/python3.7 /nix/store/bk1sncpx12nz1kzdixm1qs5wbx7wlnj3-python3-3.7.5-env/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/tmpvyje6yxe/pip-build-env-806w4aa4/overlay --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links file:///tmp/tmpvyje6yxe/download -- 'setuptools>=40.8.0' wheel Check the logs for full command output.                                                                                                                                                                                                                

Notably, the requirements_frozen.txt given does not explicitly include wheel; its contents are:

altgraph==0.16.1
Click==7.0
future==0.18.2
macholib==1.13
PyInstaller==3.5
spark-parser==1.8.9
uncompyle6==3.6.1
xdis==4.2.2
charles-dyfis-net commented 4 years ago

On further investigation, this also happens with pypi2nix -e PyInstaller==3.5; none of the other dependencies listed are required.

Moreover, it does not happen with PyInstaller==3.4.

seppeljordan commented 4 years ago

Hi, I investigated your issue and it seems like PyInstaller uses setup.py to declare its setup requirements. This means that pypi2nix cannot detect those automatically. You could work work around the issue by supplying the -s wheel. This will tell pypi2nix that one or more packages require wheel to be built.

For your interest: The built worked as is with PyInstaller==3.4 because in this version wheel was a build time dependency declared in pyproject.toml. This is not the case in version 3.5.

I cannot fix this issue and am therefore closing it.