pypi2nix icon indicating copy to clipboard operation
pypi2nix copied to clipboard

pypi2nix fails on flake8

Open DavHau opened this issue 5 years ago • 5 comments

System: NixOS 19.09

executed pypi2nix command: pypi2nix -e flake8

nix-shell command nix-shell requirements.nix -A interpreter fails with:

...
error: attribute 'pytest-runner' missing, at /nix/store/5ll78gf7iszpzgff40w2j7vv8ca64a7g-source/overrides.nix:14:40
(use '--show-trace' to show detailed location information)

What i tried so far without success:

  • disabling the default overrides
  • adding pytestrunner as extra build input via -E python37Packages.pytestrunner
  • adding pytest-runner as extra python dependency via -s pytest-runner

DavHau avatar Dec 18 '19 15:12 DavHau

Hi, which version of pypi2nix are you using (pypi2nix --version)

seppeljordan avatar Dec 18 '19 15:12 seppeljordan

Hi, which version of pypi2nix are you using (pypi2nix --version)

2.0.2.dev10+ge0d70c5

DavHau avatar Dec 18 '19 16:12 DavHau

Sorry for the confusing version. I now switched to the current master and the behavior is the same. It seems like i could solve it by adding a lot of setup requirements. Whenever i get this attribute missing, at ... overrides.nix i have to add this attribute as a setup requirement to the pypi2nix command via -s attribute. I'm currently working my way through it and will report back in case i could fix it. Still pypi2nix shouldn't generate corrupted nix expressions in the first place, right?

DavHau avatar Dec 20 '19 04:12 DavHau

It should not but it does unfortunately since a lot of python packages use setup.py to declare their build dependencies and we have no way to detect them that way...

seppeljordan avatar Dec 20 '19 23:12 seppeljordan

Solving #398 will most likely solve this issue.

seppeljordan avatar Dec 28 '19 17:12 seppeljordan