[Catalog-sig] setuptools/distribute/easy_install/pkg_resource sorting algorithm

M.-A. Lemburg mal at egenix.com
Tue Mar 12 20:59:59 CET 2013

On 12.03.2013 19:15, M.-A. Lemburg wrote:
> I've run into a weird issue with easy_install, that I'm trying to solve:
> If I place two files named
> egenix_mxodbc_connect_client-2.0.2-py2.6.egg
> egenix-mxodbc-connect-client-2.0.2.win32-py2.6.prebuilt.zip
> into the same directory and let easy_install running on Linux
> scan this, it considers the second file for Windows as best
> match.
> Is the algorithm used for determining the best match documented
> somewhere ?
> I've had a look at the implementation, but this left me rather
> clueless.
> I thought that setuptools would prefer the .egg file over
> the prebuilt .zip file - binary files being easier to install
> than "source" files.

After some experiments, I found that the follow change
in filename (swapping platform and python version, in addition
to use '-' instead of '.) works:


OTOH, this one doesn't (notice the difference ?):


The logic behind all this looks rather fragile to me.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Mar 12 2013)
>>> Python Projects, Consulting and Support ...   http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::::: Try our 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

More information about the Catalog-SIG mailing list