You might also want to take a look at the "prebuilt" binary
format which we have been using for several years now, e.g.

http://www.egenix.com/products/python/mxBase/

The idea is a little different from what you describe, but works
well: we essentially take a snapshot of the package after it was
built and then put everything into a ZIP file.

As a result, you can pick up where distutils left off after the
build and continue the installation on the target machine.

The prebuilt files can also be installed and uninstalled with pip
if you reference the files directly.

The only feature missing is support in pip for finding and downloading
the right prebuilt archive from an index server. pip currently defaults
to downloading the Windows builds, because it checks for the "highest"
version available (for some meaning of high ;-)).

Which makes me think: would it be possible to make pip more clever
with respect to platform version strings ?

Here's are some examples of such a version strings as detected by
pip:

3.2.4.win32-py2.7.prebuilt
3.2.4.win-amd64-py2.7.prebuilt
3.2.4.linux-x86_64-py2.7_ucs4.prebuilt
3.2.4.linux-x86_64-py2.7_ucs2.prebuilt
3.2.4.linux-i686-py2.7_ucs4.prebuilt
3.2.4.linux-i686-py2.7_ucs2.prebuilt

The code for bdist_prebuilt is in the mxSetup.py that comes with
egenix-mx-base, in case you want to take a look.

Daniel Holth wrote:
> I got tired of waiting for lxml to compile over and over again, so I
> invented a binary packaging format called 'wheel' (of cheese) that
> uses Metadata 1.2 and .dist-info directories instead of .egg-info,
> patched pkg_resources.py to be able to load .dist-info directories,
> implemented "python setup.py bdist_wheel", and patched pip to be able
> to install .whl files.
> 
> The gist of the spec is that it is a zip file with the .whl extension
> containing the contents of 'purelib' for a distribution, plus a
> Name-1.0.dist-info/ directory with the metadata files, plus
> Name-1.0.data/subdir directories for scripts, platlib, packaging's
> "categories", ...
> 
> My specification so far is at
> https://docs.google.com/document/d/1mWPyvoeiqCrAy4UPNnvaz7Cgrqm4s_cfaTauAeJWABI/edit
> and an lxml compiled for linux-x86-64 is at
> https://docs.google.com/open?id=0BxHz5bC4iN5TN0VWTFNrZGtCbWs
> 
> http://bitbucket.org/dholth/distribute
> http://github.com/dholth/pip
> http://pypi.python.org/pypi/wheel
> 
> Perhaps it will be useful. The implementation is still pretty rough,
> for example it does not check the architecture while installing, but
> it could be a handy way to speed up repeated virtualenv builds.
> 
> Daniel Holth
> _______________________________________________
> Distutils-SIG maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/distutils-sig
> 

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Aug 15 2012)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2012-08-25: FrOSCon, St. Augustin, Germany ...             10 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to