LWN.net Logo

Python 3 should include namespace for libraries and a CPAN repo

Python 3 should include namespace for libraries and a CPAN repo

Posted Aug 31, 2007 23:18 UTC (Fri) by dag- (subscriber, #30207)
Parent article: Python 3.0a1 released

What I think is really missing in the python world is a proper namespace and collection for python modules (that is protected by an organisation).

In other words, a CPAN for python.

As a packagers it is still a big problem to package pySomething, pySOMETHING, python-SomeThing or Something. We convert this to fit into the python-something (lowercase) namespace, but still other packagers use the upstream name or something else (eg. python-pySomething).

Having an organisation take care of the namespace and manages the collection as a whole will further help to advance the python community as a while. Whereas now I have seen different modules being developed in parallel which divides the effort.


(Log in to post comments)

Python 3 should include namespace for libraries and a CPAN repo

Posted Sep 1, 2007 0:11 UTC (Sat) by ArbitraryConstant (subscriber, #42725) [Link]

meh

I find CPAN to be far too fickle and complex. Whenever possible, I'll use an OS's package manager instead. Which as it turns out is the same thing I do for Python, C libs, and pretty much anything else.

Python 3 should include namespace for libraries and a CPAN repo

Posted Sep 1, 2007 13:03 UTC (Sat) by peace (guest, #10016) [Link]

What I think Dag is saying is that the reason your package manager gets Perl right is that the Perl community has made it easy for package managers to package Perl modules. You may not like CPAN proper but is does apply a consistency to Perl modules that Python lacks.

As for cheese shop, close only cuts it if packagers such as Dag can rely on it in the same way that they can CPAN. Meaning it's Comprehensive and up to date.

Python 3 should include namespace for libraries and a CPAN repo

Posted Sep 1, 2007 19:03 UTC (Sat) by ArbitraryConstant (subscriber, #42725) [Link]

> What I think Dag is saying is that the reason your package manager gets
> Perl right is that the Perl community has made it easy for package managers
> to package Perl modules.

If that's so, then why does the package manager get Python/C/etc right as well?

Particularly given that CPAN sometimes needs external C libraries, I think it's appropriate to delegate the task to package managers.

Python 3 should include namespace for libraries and a CPAN repo

Posted Sep 4, 2007 18:20 UTC (Tue) by jdivine (guest, #18042) [Link]

Anecdotally, fewer Python packages seem to be available through native package managers, possibly because CPAN makes it easier to find and package the Perl modules.

Whenever possible, I install Perl or Python packages (all software in general, really) through the OS's package manager. That said, it's not always possible:

- the package might not be provided
- the desired version might not be available
- the system in question may not have a Linux-style package manager at all

I use Python more than Perl these days and I really miss Python's lack of a CPAN equivalent. CheeseShop and easy_install don't match up at all.

Python 3 should include namespace for libraries and a CPAN repo

Posted Sep 1, 2007 2:04 UTC (Sat) by zooko (subscriber, #2589) [Link]

The closest thing to CPAN is the Python Cheese Shop:

http://cheeseshop.python.org/pypi

Python 3 should include namespace for libraries and a CPAN repo

Posted Sep 1, 2007 19:33 UTC (Sat) by chrism (guest, #4713) [Link]

More importantly, easy_install (http://peak.telecommunity.com/DevCenter/EasyInstall), which is
part of setuptools is willing to attempt to install any package that's on PyPi (aka the cheeseshop)
as well as its dependencies if any. E.g.::

[chrism@kingfish chrism]$ easy_install dateutil
Searching for dateutil
Reading http://cheeseshop.python.org/pypi/dateutil/
Reading http://labix.org/python-dateutil
Reading http://cheeseshop.python.org/pypi/dateutil/1.2
Best match: dateutil 1.2
Downloading http://pypi.python.org/packages/2.4/d/dateutil/dateutil-1.2-
py2.4.egg#md5=219d3eb65507a985b4218321224e00cb
Processing dateutil-1.2-py2.4.egg
creating /Users/chrism/opt/Python-2.4.3/lib/python2.4/site-packages/dateutil-1.2-py2.4.egg
Extracting dateutil-1.2-py2.4.egg to /Users/chrism/opt/Python-2.4.3/lib/python2.4/site-
packages
Adding dateutil 1.2 to easy-install.pth file

Installed /Users/chrism/opt/Python-2.4.3/lib/python2.4/site-packages/dateutil-1.2-py2.4.egg
Processing dependencies for dateutil
Finished processing dependencies for dateutil

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds