
On Wed, Feb 22, 2017 at 7:08 AM, Phil Mayers <p.mayers@imperial.ac.uk> wrote:
On 22/02/17 11:12, Glyph Lefkowitz wrote:
I'm tempted to launch into a diatribe about namespacing, containers, and
application isolation generally, but before I do - why is it that you /want/ to use the system Python environment? Had you just not considered the option of virtual environments?
Awesome though it is, virtualenv can be very tedious if you need to install hundreds of megabytes of compiler and -devel packages. System packages are attractive precisely because you can avoid this.
I guess this is a big part of the motivation for Twisted itself to shed its C extensions - to avoid 100% of these extra dependencies. And presumably also a big part of the motivation behind the development of support for distributable binary wheels for Linux (which seems to have largely succeeded at this point, though their use is not as widespread as one would hope).
I've had to do all sorts of tedious things with containers where I spin up a temporary container to build a bunch of .whl files, then actually install them in the final container - all to avoid bloating the container image with the build tools.
And I've been meaning to really dig in to the Nix toolchain for image creation. That seems like another thing that should be more widely used (but it's hard to beat the "batteries included" tools Docker has, even if those tools are awful).
It's a real shame that binary wheels on Linux/PyPI aren't a thing. I understand the reasons why, but TBH it substantially reduces the value of the Python ecosystem for me.
Ah! They are now, maybe you haven't seen them? Check out https://github.com/pypa/manylinux and https://github.com/pypa/python-manylinux-demo Go is looking like a more and more attractive competitor to Python,
frankly, having sidestepped this problem entirely.
A lot of people seem to be thinking that way. *Personally*, with my experience with Go (about five months solid at previous employer), I wouldn't go anywhere near that stack. There are plenty of *other *things with appealing features that Python lacks which would seem to make a better move. :) But check out the story for binary wheels. The state of things in Python may not be *quite* as bad as you think. Jean-Paul