[Distutils] wheels or system packages for pip on ubuntu
Reinout van Rees
reinout at vanrees.org
Wed Sep 3 12:24:10 CEST 2014
Hi,
I'm investigating some options for making our servers a bit more neat.
Basic problem: lots of what we do needs mapnik, numpy, gdal, psycopg2
and so. Python libraries with C code and system dependencies.
All of them have ubuntu packages, but especially for gdal we sometimes
need a newer version. A PPA can help here, but I thought "a wheel could
be nice, too".
System packages? Yes, we use buildout with "syseggrecipe". You pass
syseggrecipe a bunch of packages ("mapnik, gdal"), it looks up those
packages in the OS and installs them in buildout's "develop-eggs/"
directory. Works quite well. Isolation + selective use of system packages.
Two questions:
a) If I use ubuntu packages, I'll have to run pip/virtualenv with
--system-site-packages. "pip install numpy" will find the global install
just fine. But "pip freeze" will give me all site packages' versions,
which is not what I want.
=> is there a way to *selectively* use such a system package in an
otherwise-isolated virtualenv?
b) Making a bunch of wheels seems like a nice solution. Then you can
just use a virtualenv and "pip install numpy gdal psycopg2...". But how
do you differentiate between ubuntu versions? Not every wheel will work
with both 12.04 and 14.04, I'd say. But both ubuntu versions will have
the same "linux_x86_64" tag.
=> What is the best way to differentiate here? Separate company-internal
"wheelhouse" per ubuntu version? Custom tags?
Reinout
--
Reinout van Rees http://reinout.vanrees.org/
reinout at vanrees.org http://www.nelen-schuurmans.nl/
"Learning history by destroying artifacts is a time-honored atrocity"
More information about the Distutils-SIG
mailing list