PyPI Enhancements

David McNab david at rebirthing.co.nz
Thu Mar 25 05:18:50 EST 2004


Hi,

I'm just looking through the PyPI tutorial, liking the fact that it's 
now integrated with distutils, but seeing room for much more.

Is any work being done to add some CPAN-like or apt-like features to PyPI?

On first look, it doesn't appear that it would be too hard to add some 
debian apt-like features such as:

* ability to declare dependencies in the setup.py metadata
* a pypi directory inside the python directory tree, containing:
    * package source trees
    * cached list and dependency tree
    * list of what's installed and what isn't
    * an apt-like 'sources.list', whereby people can at their
      discretion add supplementary download sources or mirrors
* a pypi command, which:
    * searches/lists/downloads desired package(s)
    * caches a dependency tree
    * when trying to build or install a new package, builds a tree
      of unfulfilled dependencies, and asks for permission to
      download/build(/install) the dependencies

I'd see it ideally working a bit like Debian's 'apt-get' and
'apt-cache' commands.

For instance:

  - pypi search <keyword> [<keyword>...]
  - pypi download <pkgname> [<pkgname>...]
  - pypi build <pkgname> [<pkgname>...]
  - pypi install <pkgname> [<pkgname>...]

The 'download', 'build' and 'install' commands would require root, and 
would cause packages to get downloaded into a pypi directory within the 
python lib. If these packages have unfulfilled dependencies, pypi (like 
Debian's 'apt') would list the additional packages and ask for 
permission to build/install these as well.

Also:
  - pypi enable-auto

This would install dummy modules for all non-installed packages. When a 
program tries to import an uninstalled package, pypi terminates the 
program with a PypiNotInstalled exception, telling the user to become 
root and install the missing packages (of course, listing the packages 
needing to be installed.

Thoughts?

Cheers
David




More information about the Python-list mailing list