[Distutils] PyPI mirroring and Changing the .egg-info PEPs

Ian Bicking ianb at colorstudy.com
Sun Mar 22 20:10:49 CET 2009


Suggestions:

Instead of http://pypi.python.org/mirrors how about
http://mirrors.pypi.python.org (or pypimirrors.python.org, etc) --
then the mirror list can be hosted separately, and the likelihood of
both the mirrors and the main PyPI server being down are much lower.
Admittedly, this makes it harder for other indexes to provide their
own mirrors, and the location is just entirely magic.  But it seems
like a useful magic.

In the egg-info PEP: "They both add other files in the `EGG-INFO` or
`.egg-info` directory, and
create or modify `.pth` files. `pip` also creates one `.pth` file
per installed package, which may lead to slow initialisation of Python."

I don't believe this is the case.  pip zip creates one .pth file for
each zip file, but that's different. pip installs packages flat.
Unless you use -e, which invokes setup.py develop, which I believe
puts the path in easy-install.pth.

Oh, you also use British English; "initialization"!  I only notice
that because my spell check is complaining about the quotation ;)

As mentioned in another email, I think RECORD should hold relative
paths (and PJE's "/" suggestion also of course seems reasonable).  The
paths should be relative to the .egg-info directory.

"- get_egg_info(pkg_name) -> path or None

  Scans all site-packages directories and looks for all `pkg_name.egg-info`
  directories. Returns the directory path that contains a PKG-INFO that matches
  `pkg_name` for the `name` metadata. Notice that there should be at most
  one result. If more than one path matches the pkg_name, a DistutilsError
  is raised.

  If the directory is not found, returns None."

Currently, if there are multiple paths that might be importable,
whichever one is found first with sys.path is imported, and conflicts
aren't really considered.  raising DistutilsError seems like it
changes this.

"  filename can be any value found in `distutils.sdist.EGG_INFO_FILES`."

Is there any reason this should be restricted to those filenames?

-- 
Ian Bicking  |  http://blog.ianbicking.org


More information about the Distutils-SIG mailing list