Re: Python namespace in packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/17/06, Jeff Pitman <jeff.pitman@xxxxxxxxx> wrote:
> On 1/12/06, Ignacio Vazquez-Abrams <ivazquez@xxxxxxxxxxxx> wrote:
> > Currently in Perl packages rpmbuild detects what modules are used and
> > provided by the package and creates Requires and Provides tags in the
> > form of "perl(Foo::Bar)". Supposedly there are scripts that can detect
> > module usage in Python apps as well and can generate the appropriate
> > tags, e.g., "Provides: python(kid)". I'm just wondering why Fedora isn't
> > taking advantage of this.
>
> Because, up until now, no one wanted to mess with sorting out
> upstream's inconsistent naming schemes. Perl works wonderfully because
> everything you see in CPAN follows a nominally unambiguous grammar
> whereas in Python, anything goes. But, the script on the mandrake
> archives might be the way around this, I dunno.
>

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.  For example, the yum
package would provider python(yum), python(repomd), and
python(rpmUtils).   Instead of depending on yum, yum-utils could
depend on python(yum).

Perl and Ruby work similarly.  Perl, at least for newer packages,
names the tarballs after the  modules contained inside.  Some of the
older modules don't follow the naming scheme.  Which is why there is a
separate namespace for the modules.  For example, perl(LWP) is
provided by perl-libwww-perl with the file
/usr/lib/perl5/vendor_perl/5.8.6/LWP.pm.

 - Ian

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux