[Python-apps-team] How to best package private modules

Stefano Rivera stefanor at debian.org
Thu Jun 16 16:13:04 UTC 2011


Hi Nikolaus (2011.06.15_19:35:31_+0200)
> I would like to package S3QL, a Python application (ITP: #626651). From
> the python policy, I understand that the application's private modules
> should go into /usr/share/[app]/, rather than /usr/share/pyshared/[app].
> However, I am not sure how to best achieve that.

setup.py should be able to take a --install-lib option. If you
--install-scripts there too (and symlink them to /usr/bin), then the
scripts should be able to find the private library without patching
sys.path or setting PYTHONPATH.

> Could someone point me to an example package that uses this technique,
> or some documentation on the web?

in my PAPT checkout:
grep install-lib */trunk/debian/rules
points to quite a few.

Ones I've touched and are thus probably sane: didjvu, laudio
(incomplete), xdot.

SR

PS: This list is pretty quiet, debian-python at lists.debian.org is far
more active.

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 465 6908 C: +27 72 419 8559  UCT: x3127



More information about the Python-apps-team mailing list