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

Make virtualenv use pythonFull, not python #7134

Closed
domenkozar opened this issue Apr 2, 2015 · 6 comments
Closed

Make virtualenv use pythonFull, not python #7134

domenkozar opened this issue Apr 2, 2015 · 6 comments
Labels

Comments

@domenkozar
Copy link
Member

See https://github.com/AndersonTorres/nixpkgs/commit/d6feeeaab18cdc9d9942aec8c890f9c8799fa382

@domenkozar domenkozar added 0.kind: bug Something is broken 6.topic: python labels Apr 2, 2015
@Profpatsch
Copy link
Member

(triage) @domenkozar is that solved yet?

@domenkozar
Copy link
Member Author

Nope.

@FRidh
Copy link
Member

FRidh commented Mar 30, 2016

I never really use virtualenv so I got curious what the issues really are about.

nix-shell -p python35Packages.virtuallenv python35Packages.toolz

[nix-shell:] virtualenv testenv
Using base prefix '/nix/store/ln2cn6g6rf116vaq1fgngaqzpzfq495x-python3-3.5.1'
New python executable in testenv/bin/python3.5m
Also creating executable in testenv/bin/python
Installing setuptools, pip, wheel...done.

[nix-shell:] source test/bin/activate

(testenv)[nix-shell:] python3 -c "import toolz; print(toolz.__version__)"
0.7.4

Clearly, the testenv is not entirely separated from the nix-shell and it's easy to understand why: we've added the package to $PYTHONPATH.

The question is now whether this is an issue. To me it seems more like a feature; nix-shell can already be used to obtain isolation. This gives us instead the possibility to add already packaged packages to an environment, although, of course, this won't work with a requirements.txt or so.

To get back to the issue here. We can use pythonFull, e.g. by just adding all the modules as propagatedBuildInputs to pythonPackages.virtualenv. It seems like an easy fix to me. What do you say?

@domenkozar
Copy link
Member Author

The issue is mostly about UX. python doesn't have readline or sqlite3, which is very annoying in virtualenv. I've been thinking we'd just include both by default since they're light and convenient.

@Profpatsch
Copy link
Member

I’d love that!

@FRidh
Copy link
Member

FRidh commented Oct 13, 2016

Since #19309 we don't have separate modules anymore except tkinter, which is like a 'normal' Python package: pythonPackages.tkinter.

I will soon write some docs on how virtualenv can be used with Nix and what to be wary of.

@FRidh FRidh closed this as completed Oct 13, 2016
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

3 participants