Viewing file: ap-packaging_tools.html (4.64 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
Debian Python Policy - Packaging Tools
[ previous ]
[ Contents ]
[ 1 ]
[ 2 ]
[ 3 ]
[ 4 ]
[ 5 ]
[ A ]
[ B ]
[ C ]
[ next ]
Debian Python Policy
Appendix B - Packaging Tools
This section describes the various tools to help package Python programs and
modules for Debian. Although none of these tools are mandatory, their use is
strongly encouraged, as the above policy has been designed with them in mind
(and vice versa). This appendix is just an overview. If you use these tools,
you should read their full documentation.
B.1 python-support
The python-support system provides a simple way to bytecompile pure Python
modules and manage dependencies. It integrates with debhelper .
When using python-support, you should install your modules to
/usr/share/python-support/package rather than the
standard Python directories. python-support will then handle compiling the
modules and making appropriate symbolic links for installed Python versions to
find them, substitute ${python:Depends},
${python:Versions}, and ${python:Provides} in your
control file, and manage bytecompilation in your postinst/prerm.
To use it, call dh_pysupport before dh_python , and
make sure you've installed the modules in the right place:
PREFIX := debian/python-package/usr
...
install:
...
./setup.py install --no-compile \
--install-lib=$(PREFIX)/share/python-support/python-package
binary-indep: build install
...
dh_pysupport
dh_python
...
python-support can also manage private modules. To use this feature, pass a
list of directories to be managed by python-support to
dh_pysupport and dh_python . python-support cannot
handle compiled extensions.
B.2 python-central
python-central provides another way to manage Python modules. It integrates
with debhelper , but can also be used without it. When using
python-central, you should install your modules normally. It will then move
them to its private directory, and manage the same things python-support does.
To use it, call dh_pycentral before dh_python :
install:
...
./setup.py install
binary-indep: build install
...
dh_pycentral
dh_python
...
python-central can handle compiled extensions for multiple Python versions. If
you want python-central to handle private modules, you must pass the list of
directories containing them to dh_python (but not
dh_pycentral ).
If python-central should not move the files to its private directory,
useDH_PYCENTRAL=nomove dh_pycentral instead.
Examples for source packages using python-central are pyenchant, python-imaging
(modules and extensions), pyparallel (modules only).
B.3 CDBS
FIXME: Someone familiar with CDBS should write this part.
[ previous ]
[ Contents ]
[ 1 ]
[ 2 ]
[ 3 ]
[ 4 ]
[ 5 ]
[ A ]
[ B ]
[ C ]
[ next ]
Debian Python Policy
version 0.4.1.0
Neil Schemenauer nas@debian.org
Matthias Klose doko@debian.org
Gregor Hoffleit flight@debian.org
Josselin Mouette joss@debian.org
Joe Wreschnig piman@debian.org
|