[Distutils] A new, experimental packaging tool: distil
vinay_sajip at yahoo.co.uk
Tue Mar 26 11:48:43 CET 2013
Paul Moore <p.f.moore <at> gmail.com> writes:
> A couple of immediate points. I tried "distil install distribute pip
> wheel" which failed, because distribute requires 2to3 to be run as
> part of setup.py (no real surprise there). But distil *did* partially
> install wheel, leaving a broken installation (there was no METADATA
> filein wheel's dist-info directory). I had to manually delete what had
> been installed of the 3 projects. I'd suggest that distil needs to
> roll back anything it did after a failed install.
There is code in distil to roll back when installation fails, but there could
be a bug which prevents it kicking in. I'll investigate.
Distil does invoke 2to3 automatically if the metadata indicates it, but the
metadata for distribute might be wrong if it was built on a 2.x system. I'll
> Secondly, when there is a C extension in the distribution (on Windows)
> the install fails even though I have Visual C installed. This is
> because cl.exe is not on my PATH - distil should do the same detection
> of the location of Visual C as distutils does. The install does work
> if cl.exe is on PATH - presumably, though, it doesn't check that it is
> the *right* cl.exe (2010 for Python 3.3, 2008 for 2007, etc). Also
> distil doesn't deal with packages with optional C extensions - but
> again, that's a case of a "too complex" setup.py (and I'm glad it
> picks the option of installing the C extension in that case, and not
> just the pure Python version).
distil could certainly be improved in this area, but the documentation 
mentions that C builds should be run in a Visual Studio command window. The
checking for the right version of Visual Studio is for a little later, but it's
on my list.
> PS I'm not entirely happy with the default of installing to the user
> packages directory. 99.9% of my time, I'm installing into a
> virtualenv, and this default is very wrong - as the installed packages
> will "infect" all of my virtualenvs.
In what way does "distil -e <venv> install distname" fall short of your
expectations? If you have a venv activated, it should install in there - does
it not do this?
More information about the Distutils-SIG