I currently have git and virtualenv that exactly matches my needs and, so far, has not caused any problems. However, I know that my installation is non-standard, and I wonder if anyone more familiar with virtualenv's insides can indicate if and where this is likely to happen incorrectly.
My setting
My virtualenv is inside my git repository, but git is set to ignore the bin and include directories and everything in lib except for the site-packages directory.
More precisely, my .gitignore file looks like this:
*.pyc # Ignore all the virtualenv stuff except the actual packages # themselves /bin /include /lib/python*/* !/lib/python*/site-packages # Ignore easyinstall and setuptools /lib/python*/site-packages/easy-install.pth /lib/python*/site-packages/setuptools.pth /lib/python*/site-packages/setuptools-* /lib/python*/site-packages/pip-*
With this arrangement, I - and anyone else who works on project verification - can use virtualenv and pip as usual, but with the following benefits:
If someone updates or installs a package and pushes their changes, anyone who pulls those changes automatically receives the update: they donβt need to notice that the requirements.txt file has changed or has done any post-receive hook magic.
There are no network dependencies: all the code to make the application work in the git repository.
I know this only works with pure-Python packages, but that's all I'm worried about at the moment.
Does anyone know of any other issues with this approach that I should be aware of?
git python virtualenv
D. Evans May 10 '11 at 19:54 2011-05-10 19:54
source share