Python namespace in packages
Paul Howarth
paul at city-fan.org
Wed Jan 18 16:00:50 UTC 2006
Jeff Pitman wrote:
> On 1/17/06, Ian Burrell <ianburrell at gmail.com> wrote:
>
>>Python does have a namespace for imports. It maps directly to
>>directories and files in the site-packages tree. The inconsistency is
>>in the naming of projects and rpm packages. A separate namespace for
>>Python packages like with Perl modules should.
>
>
> Yeah, that's what the script on Mandrake list does. I'm wondering if
> the provide should be versioned somehow because a package
> python-elementtree could provide
> /usr/lib/python2.3/site-packages/elementtree and another
> python-elementtree could provide
> /usr/lib/python2.4/site-packages/elementtree. However, using the
> algorithm as-is we're looking at a Provides that says both packages
> provide the same thing when in reality, they do not.
>
> The Provides string could be made more robust such that it would
> alleviate the 3 billion questions to Yum list about why yum doesn't
> work. Many times the problem is rooted in the wrong python version lib
> installed as people have migrated systems from one release of fedora
> to another.
>
> So, potentially, the following would cover our bases:
>
> Provides: python2.3(elementtree)
> Provides: python2.4(elementtree)
>
> This would be relatively to script-kiddie out as long as everyone sees
> the value in it.
The way this is done for the perl namespace is:
Provides: perl(Module::Name)
Requires: perl(:MODULE_COMPAT_x.y.z)
The main perl package itself (perl-x.y.z) provides
perl(:MODULE_COMPAT_x.y.z) (it may also provide support for perl modules
built using other versions of perl too, such as
perl(:MODULE_COMPAT_x.y.z-1, but that's a separate issue).
So a python equivalent might be:
* Main python package
Provides: python(:PACKAGE_COMPAT_2.3)
* Other Python packages:
Provides: python(elementtree)
Requires: python(:PACKAGE_COMPAT_2.3)
So a python upgrade should trigger updates for all other python packages.
Paul.
More information about the fedora-devel-list
mailing list