-
-
Notifications
You must be signed in to change notification settings - Fork 47
Some backports namespace packages missing __init__.py #80
Comments
@mattbillenstein tnx for the report ... i'll look at this before making new release. in the worse case you can fix it within *_generated.nix file |
@mattbillenstein finally found some time to debug this. in short: i think the issue is upstream due to missing command i used to create an environment is $ pypi2nix -V "2.7" -e backports.functools-lru-cache -e backports.shutil_get_terminal_size -e configparser -e backports.shutil-get-terminal-size -e setuptools_scm -v also this override was needed
above should be able to be build using $ nix-build requirements.nix -A interpreter command. backports packages that work are: $ ./result/bin/python -c "import backports.functools_lru_cache; import backports.configparser;" backports packages that dont work is: $ ./result/bin/python -c "import backports.shutil_get_terminal_size;"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named shutil_get_terminal_size comparing all three I would suggest you fork the project (also submit the PR upstream) and point to github archive of your fork like i'm doing in case of Pillow |
Great -- thanks for the excellent debug! |
lI'm not sure why this is happening, but some of the backports packages I'm installing from pypi include backports/init.py -- but when I install them via nix, the init.py isn't included:
note functools_lru_cache and configparser missing backports/init.py
One of these packages is getting picked up off of PYTHONPATH when invoking ipython which then can't find the actual backport package that it needs:
ipython is wrapped to setup site packages correctly and only includes the single backport, so just emptying out PYTHONPATH will make things work again:
hSo, I'm not sure if this is a pypi2nix issue directly and it seems there are issues with python environments in general, but dropping the init.py in place in these packages seems to fix this issue.
The text was updated successfully, but these errors were encountered: