Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: buildEnv does not create symlinks to std library modules #16646

Closed
FRidh opened this issue Jul 1, 2016 · 0 comments
Closed

Python: buildEnv does not create symlinks to std library modules #16646

FRidh opened this issue Jul 1, 2016 · 0 comments
Labels

Comments

@FRidh
Copy link
Member

FRidh commented Jul 1, 2016

Issue description

While python.buildEnv correctly adds symbolic links to extra packages that are added with extraLibs, it doesn't actually add any symbolic links for the modules that were separated from the interpreter (python 2.7).

Steps to reproduce

$ nix-shell -E 'with import <nixpkgs> {}; with pkgs.pythonPackages; (python.withPackages (ps: with ps; [curses])).env' --run "python -c 'import curses'"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/nix/store/0jmc177zpy0wxqj852vcpapcg1ahk61v-python-2.7.11-env/lib/python2.7/curses/__init__.py", line 15, in <module>
    from _curses import *
ImportError: No module named _curses

I guess we need to set passthru.pythonPath = [];.

cc @domenkozar @bennofs

@FRidh FRidh added 0.kind: bug Something is broken 6.topic: python labels Jul 1, 2016
@FRidh FRidh closed this as completed in 880475b Jul 1, 2016
FRidh added a commit that referenced this issue Jul 1, 2016
Python 2.7 on Nix is stripped of some modules, which can be added when
needed. This was broken with python.buildEnv.
adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
Python 2.7 on Nix is stripped of some modules, which can be added when
needed. This was broken with python.buildEnv.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant