Paul Elliott <pelliott@blackpatchpanel.com> writes:
> My package uses a package that it makes public. What is the standard,
> established way to take that package private?
In the absence of better-informed answers (please, knowledgeable Debian
Python people, help us out with this information!):
The Debian Python Policy says:
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).
<URL:http://www.debian.org/doc/packaging-manuals/python-policy/ch-programs.html#s-current_version_progs>
but gives no specifics as to how to do that. This abstention from
specifying implementation is entirely appropriate for a policy document,
of course: it is not the business of the policy document to say how to
achieve it.
That said, there doesn't appear to be much easily-found documentation on
how to do that with the available tools. The best I can find is:
Add these three lines [to ‘debian/rules’]:
override_dh_auto_install:
python setup.py install --root=debian/charm --install-layout=deb --install-lib=/usr/share/charm --install-scripts=/usr/share/charm
override_dh_auto_build:
This is the important part, it will tell distutils that we want to use
private directory. This directory is not in sys.path, so charm script is
installed (via --install-scripts) to this directory as well --root is
distutils ' DESTDIR
We have to add override_dh_auto_build: line because dh detected setup.py
file and wants to build modules for all.
<URL:https://wiki.debian.org/Python/Packaging>
That page is largely based on a record of an interactive tutorial done
some time ago.
It would be very helpful if someone more knowledgeable about how these
tools (Python's Distutils, Debhelper's ‘dh_python2’, etc.) are intended
to work together could update that page to be less ad-hoc conversational
and more reference.
--
\ “Geeks like to think that they can ignore politics. You can |
`\ leave politics alone, but politics won't leave you alone.” |
_o__) —Richard M. Stallman, 2002-07-26 |
Ben Finney
Attachment:
pgpAXnax6KORG.pgp
Description: PGP signature