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

Re: Tool support for private modules



Le lundi 01 octobre 2007 à 14:42 +1000, Ben Finney a écrit :
>     3.1.1 Programs Shipping Private Modules
> 
>     A program using /usr/bin/python as interpreter can come up with
>     private Python modules. These modules should be installed in
>     /usr/share/module, or /usr/lib/module if the modules are
>     architecture-dependent (e.g. extensions).
> 
>     /usr/lib/site-python is deprecated and should no longer be used
>     for this purpose.

I think the policy is a bit confusing here. The purpose
of /usr/lib/site-python has never been to ship private modules, but
rather to ship public modules supposed to work with any python version.
This is now handled by python-support or python-central instead.

> But the Python distutils and setuptools will install the modules to
> /usr/lib/site-python/. 

Hrm, they shouldn't. With a default setup, public modules are shipped
to /usr/lib/python2.X/site-packages.

> My 'debian/rules' already has a 'dh_pycentral' line.

That would work if the files were shipped
in /usr/lib/python2.X/site-packages.

> How can I best conform to the above policy?
> 
> The dumb way, I imagine, would be to manually install the foles to
> those specific locations. I'm wondering what tools (e.g. debhelper)
> support something better, and how to use them to conform to the
> policy.

If the modules are indeed private, it looks like you need to change the
path by hand, and to add it with sys.path.append("/the/path") at the
beginning of the binary.

If, as the location suggests, they are public, you should look at the
setup.py file to see if there's something unusual that would install the
modules in this unusual location.

-- 
 .''`.           Josselin Mouette        /\./\
: :' :           josselin.mouette@ens-lyon.org
`. `'                        joss@debian.org
  `-  Debian GNU/Linux -- The power of freedom

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


Reply to: