30 Jun 2015 by dryobates
Virtualenv is a great software for isolating python environments. Wheel is a great package format for quick installation of packages. Since virtualenv 13.0.0 installs automatically with wheel... I was kicked with dark side of this decision.
Buildbot was doing great with all our Django-based libraries until it has reached testing against Django 1.3 (yes, I know it really old version, but we have to support versions 1.2-1.8...). After some digging I have realized that problem was with the .whl  package of Django 1.3. It was incorrectly installing non-py files. My first thought was "Could Django developers prepared broken .whl package?" I have start searching for that wheel package on pypi and found that there's no such package for Django 1.3. It was purely sdist based!
It took me some more time to find out that new virtualenv (since 13.0.0)  automatically installs wheel package. Does it matter? Well yes. When tox creates virtualenv it gets wheel inside. Then it installs packages with pip Pip sees installed wheel so it demands .whl package from devpi. I didn't dig into devpi, but it somehow creates wheel on the fly from source distribution. But Django 1.3 wasn't structured with .whl in mind so package is broken.
One option is to disable installing wheels by pip (pip install --no-binary wheel). But I would like to use wheels for new Django as it's much faster. For now I have downgraded virtualenv. Maybe we'll soon drop support for old Django versions? If not then I'll have to make our tox.ini more complex and set up different install commands for different Django versions :/