Python needs a CPyAN

Nick Craig-Wood nick at craig-wood.com
Wed Nov 3 05:30:07 EST 2004


Mike Meyer <mwm at mired.org> wrote:
>  Actually, what people on systems with proper package management want
>  is packages that pull stuff from CPAN and install them as
>  packages.

Absolutely!

For instance with Debian and Perl, dh-make-perl will turn a perl
module (tar.gz or straight from CPAN) into a .deb which you then
managage as normal.  When using Debian I never use CPAN and always
dh-make-perl because I'd much rather have the package managed via
dpkg/apt-get.

That said I haven't found many perl modules that I wanted that weren't
already packaged for Debian.  The same with python modules too.

>  Doing this right is hard, because CPAN makes assumptions
>  about where things are liable to be installed.

No idea how dh-make-perl works.  It does though!

>  For Python, what we want are packages that use distutils to install
>  them as packages. Doing this right is trivial, because distutils
>  gets all the relevant information from the environment.

distutils already knows how to make .rpm files.

Eg choosing a package at the top of PyPI :-

    # Download
    wget 'http://ftp.livinglogic.de/xist/ll-xist-2.6.1.tar.gz'
    # Unpack
    tar zxvf ll-xist-2.6.1.tar.gz 
    cd ll-xist-2.6.1
    # Make rpm
    python setup.py bdist_rpm
    # Make deb
    cd dist/
    fakeroot alien ll-xist-2.6.1-1.i386.rpm ll-xist-2.6.1-1.i386.deb
    # Install with package manager
    sudo dpkg -i ll-xist_2.6.1-2_i386.deb

This hasn't worked with every package I've tried it with though!

...

To make PyPI into a CPAN replacement it needs to
1) make all the submitters use distutils, and automatically test the packaging
2) host the source tar balls
3) have a system of mirrors and provide this list for download
4) provide dependency information (maybe this should be in the distutils
   information in the package)
5) Provide the list of packages, descriptions, and dependencies for
   download
6) Some sort of review system (maintainers, peer review, rating etc)
   for each package for quality assurance

Given all that the an automatically download package x + dependencies
program would be easy.

A cross platform software repository like this would be a goal well
worth aiming for IMHO!  PyPI is an excellent start though.

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list