Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add virtualenv support - Feature/697 #930
This PR is for #697 .
A default case:
A rather involved example:
In testing this, I found a few things:
This may only affect OSX, not sure yet. Here's the stack trace (trimmed for brevity)
Works on Ubuntu 12.04, though. :)
Testing the resulting package:
So far so good!
Installing the .deb on a system without any python installation:
It can't find the
On systems with python available without virtualenv, the system's site.py will be used when the virtualenv one cannot be found. I think this is a bug. @djhaskin987 - thoughts? Is this expected? (I don't know much about virtualenv)
@jordansissel I believe virtualenv works either by creating a hard link between or copying python outright from the system. It therefore assumes that python is on the system. The ideal thing would be guaranteeing that python is on the parent system by adding a dependency, but it would be a nightmare deciding what python is called by the target system's package manager. I think the only thing feasible is to print a warning about this. Do you think that would suit?
Yeah I noticed that it copies (or hardlinks, I didnt' check) the python binary but creates symlinks for things like site.py and other similar things.
Going forward, it's probably OK to have this as a known limitation. Unfortunately, it doesn't solve @untergeek's needs (self-contained package), yet, but I think this works well enough to move forward with merging.
I'm having problems understanding correctly how the command works to generate a package with a specific virtualenv and its requirements.
How can I create a package for a virtualenv with multiple requirements?
Thanks in advance,
EDIT: I created a issue related with this question #1129