[openstack-dev] Let tox use globally installed packages

Sascha Peilicke saschpe at suse.de
Tue Dec 4 16:23:56 UTC 2012


Hello,

recently, python-glanceclient seems to have moved to tox exclusively for
running testsuites. While this is a good thing in general, it has some
warts for distributors. For instance, we at SUSE create seperate test
RPM packages that run unittest against our base packages. In this case,
it doesn't make much sense for us to have tox create a virtualenv with
modules from PyPI but rather it should reuse (already installed) Python
RPM packages from the system. Also, fetching modules such as M2Crypto or
lxml from PyPI and building them locally needs system libraries (such as
openssl-devel, libxslt-devel and libxml-devel). These libs can't be
tracked in pip requirements files and such modules may take a while to
build. Thus I would like to add the following line to tox.ini files:

[testenv]
sitepackages = True

This way, tox checks if a Python module is already available on the
system path and won't fetch it from PyPI. IMO this makes sense for
developers too, it speeds up their testing experience. Would that be
acceptable?

Footnotes:
 [1]
http://tox.readthedocs.org/en/latest/config.html#virtualenv-test-environment-settings
-- 
With kind regards,
Sascha Peilicke
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nuernberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 16746 (AG Nürnberg)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20121204/07487047/attachment.pgp>


More information about the OpenStack-dev mailing list