[Distutils] wheels or system packages for pip on ubuntu

Joe Smith yasumoto7 at gmail.com
Wed Sep 3 21:11:08 CEST 2014


Another option (along the lines of conda) is pex, which zips up you code +
dependencies into a single, zipped executable.

https://github.com/pantsbuild/pex

Pex has been relatively nice for us, as we can bundle our applications into
(mainly) hermetically-sealed binaries, which works well on machines that
may have separate system dependencies compared to the applications that run
on them. We have a company-internal warehouse that we upload compiled
eggs/wheels to, and use the pants build tool to resolve dependencies at
build-time <http://pantsbuild.github.io/python-readme.html> to pull them in.


On Wed, Sep 3, 2014 at 7:51 AM, Chris Barker - NOAA Federal <
chris.barker at noaa.gov> wrote:

> Your might want to consider conda and conda environments for this.
>
> http://www.continuum.io/blog/conda
>
> It provides a single packaging solution for both python and
> dependencies. And there are probably already recipes for everything
> you need.
>
> -Chris
>
> > On Sep 3, 2014, at 3:24 AM, Reinout van Rees <reinout at vanrees.org>
> wrote:
> >
> > 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"
> >
> > _______________________________________________
> > Distutils-SIG maillist  -  Distutils-SIG at python.org
> > https://mail.python.org/mailman/listinfo/distutils-sig
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20140903/f9cf74d2/attachment.html>


More information about the Distutils-SIG mailing list