Matching package names across distributions
Michael Scherer
misc at zarb.org
Wed Feb 2 09:47:06 PST 2011
Le mercredi 02 février 2011 à 18:41 +0100, Tarek Ziadé a écrit :
> On Wed, Feb 2, 2011 at 6:20 PM, Michael Scherer <misc at zarb.org> wrote:
> > Le mercredi 02 février 2011 à 18:17 +0100, Olivier Thauvin a écrit :
> >> * Enrico Zini (enrico at enricozini.org) wrote:
> >> > On Wed, Feb 02, 2011 at 05:36:25PM +0100, Tarek Ziadé wrote:
> >> >
> >> > > Interesting ! One thing I would really love to have is the same
> >> > > matching tool for Python projects.
> >> > >
> >> > > e.g. Distro name <-> Python / PyPI Name
> >> >
> >> > I use some regexp in distromatch to 'stem' python package names to a
> >> > name which is common across distribution, and which should get quite
> >> > close to the PyPI name. Here they are (the capture parentesis catch
> >> > the name):
> >> >
> >> > Debian: ^python\d?-(.+)$
> >> > Fedora: ^(.+)-python\d?$
> >> > Mandriva: ^python-(.+)$
> >> > OpenSUSE: ^python-(.+)$
> >> >
> >> > This is guesswork, except for Debian for which I know the naming
> >> > policy[1]. Since I'm posting to the list, can people from other
> >> > distributions please check their own python module naming policies and
> >> > let me know if those regexps need to be fixed[2]?
> >>
> >>
> >> Mandriva/Mageia has as policy everybody language module must be name
> >> LANGUAGE-MODULE (eg perl-foo-bar, python-foo, haskell-foo).
> >
> > Well, not everybody follow the policy :/
> >
> > ( at least for python ).
> > And there is the case issue.
>
> Having a default mapping rule is already a good thing, it's a valuable
> information for both sides
>
> For instance, instead of doing my custom function to generate a RPM
> out of my Python projects with the correct name, I could use that
> tool and just tell it under which flavor of Fedora or CentOS I am.
>
> Now, if a package does not follow the convention, does each packaging
> system keep the original name of the Python project somewhere ?
You can get the name of the tarball from the src.rpm.
And the url from the src.rpm and the binary one.
> If so, how hard would it be to fetch this information ?
--
Michael Scherer
More information about the Distributions
mailing list