PyPI Enhancements

Yermat loic at fejoz.net
Thu Mar 25 06:36:42 EST 2004


David McNab a écrit :
> 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
> 

That would be great !
Should also have an update command.

Instead of installing dummy modules, you can add a hook on the import 
function...

Yermat




More information about the Python-list mailing list