[Distutils] easy_install wrong download site preference

anatoly techtonik techtonik at gmail.com
Thu Jul 1 22:36:20 CEST 2010


On Wed, Jun 30, 2010 at 7:54 PM, P.J. Eby <pje at telecommunity.com> wrote:
>
> It prefers newer packages, or, if the versions are the same, it prefers the shortest download URL.  In this case, the Google Code url is shorter.

That's illogical. Better prefer PyPI if versions are the same.

>> Is it possible to raise the priority of PyPI mirror for protobuf project somehow?
>
> No.  If (e.g.) http://pypi.python.org/packages/source/p/protobuf/protobuf-2.3.0.tar.gz and http://protobuf.googlecode.com/files/protobuf-2.3.0.tar.gz aren't equivalent files, they should not be named the same thing -- especially since this practice can confuse humans as well as easy_install.

http://protobuf.googlecode.com/files/protobuf-2.3.0.tar.gz contains
source code for the whole project including C++ compiler, Java, Python
and other libraries. Renaming Python library seems like a hack - not a
solution.

> On a practical level, if it's too late for the Python project to use a different name,  I would suggest changing the PyPI homepage links (for current and past releases) to point to a Python-specific project page, that does not contain links to download the generic, non-Python package.  This will keep easy_install from considering them as candidates for downloading.

PyPI is that page. Google Code URL homepage doesn't have any Python
related downloads at all. What if we set download_url instead of
homepage back to PyPI page - will it satisfy setuptools as a quick
fix? (I understand that people do not want to touch setuptools code
anymore)

> (Note: you will have to go into PyPI's administration interface and manually change the home page link for *all past versions* as well, due to the way the /simple index works.)

Where is the relevant code for this PyPI? I wonder why it didn't set
rel="download" for PyPI downloads if it should?

-- 
anatoly t.


More information about the Distutils-SIG mailing list