personal web log written by izabeera and dryobates

python virtualenv wheel

Virtual drive on one wheel

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.

I was configuring devpi [1] for use with our buildbot [2] . I have updated existing software (buildbot, virtualenv, tox, pip), installed and configured devpi and I was happy... Almost.

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 [3] 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) [4] 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 :/

[1]Devpi http://doc.devpi.net/latest/
[2]Buildbot http://buildbot.net/
[3]Wheel http://pythonwheels.com/
[4]Virtualenv https://pypi.python.org/pypi/virtualenv
dryobates
dryobates
Jakub Stolarski. Software engineer. I work professionally as programmer since 2005. Speeding up software development with Test Driven Development, task automation and optimization for performance are things that focus my mind from my early career up to now. If you ask me for my religion: Python, Vim and FreeBSD are my trinity ;) Email: jakub@stolarscy.com

Archive

Tag cloud