[Distutils] EasyInstall 0.4a1: now with PyPI autodownload

Phillip J. Eby pje at telecommunity.com
Mon Jun 6 00:22:48 CEST 2005


I've just released a new version of EasyInstall, that supports automatic 
package location via PyPI; installing a package can now be as simple as:

     easy_install "SQLObject>=0.6"

There are many new options and features related to this; see the 
EasyInstall home page for more information:

     http://peak.telecommunity.com/DevCenter/EasyInstall

For the benefit of the PyPI maintainers, here is a summary of EasyInstall's 
fairly minimal assumptions about PyPI's current behavior, assuming that 
"base-url" is the root URL of the package index:

    * Going to "base-url/SomePackage" produces an HTML page that either has 
a title containing "Index of Packages" and links to zero or more pages for 
specific versions, or else it is a single-version package page.

    * Single-version package pages may have a home page and download URL 
link, each of which occurs after '<th>Home Page' and '<th>Download URL' 
respectively, if present.

    * Going to "base-url/" (note trailing '/') produces an HTML page 
containing links to all active versions of registered packages

    * Links to package pages always have URLs of the form 
"base-url/SomePackage/itsVersion" - i.e., exactly two path parts following 
the base URL, with no query strings, parameters, fragments, etc.

EasyInstall should continue to work with PyPI if these assumptions continue 
to hold.  However, I'd also like to suggest that PyPI deprecate the use of 
spaces and other non-alphanumeric characters (other than '-') in package 
names, and move to a case-insensitive matching mechanism for package 
names.  (Currently, if a user types a package name in the wrong case, 
EasyInstall downloads the full package list in order to do its own 
case-insensitive search.)

By the way, EasyInstall does not rely solely on the download URL of a PyPI 
entry, nor does it assume that the download URL is in fact the URL where 
the package's source distribution is found.  Instead, EasyInstall inspects 
the URLs for whether the extension suggests an egg or source 
distribution.  If not, it retrieves the listed URL, and if it contains 
HTML, it scans the HTML for links to egg or source distributions (again 
identified by extension).  It does this for both the home page and the 
download URL, in case there is a usable download link on the package's home 
page.

This approach was chosen to maximise the odds of successful downloading, 
given the current contents of PyPI.



More information about the Distutils-SIG mailing list