Linux "dh_python2" Command Line Options and Examples
calculates Python dependencies, adds maintainer scripts to byte compile files, etc.

QUICK GUIDE FOR MAINTAINERS · if necessary, describe supported Python versions via X-Python-Version field in debian/control, · build-depend on python or python-all or python-all-dev (>= 2.6.


Usage:

dh_python2 -p PACKAGE [-V [X.Y][-][A.B]] DIR_OR_FILE [-X REGEXPR]




Command Line Options:

--version
show program's version number and exit
dh_python2 --version ...
-h
show help message and exit
dh_python2 -h ...
--no-guessing-versions
disable guessing other supported Python versions
dh_python2 --no-guessing-versions ...
--no-guessing-deps
disable guessing dependencies
dh_python2 --no-guessing-deps ...
--no-dbg-cleaning
do not remove any files from debug packages
dh_python2 --no-dbg-cleaning ...
--no-shebang-rewrite
do not rewrite shebangs
dh_python2 --no-shebang-rewrite ...
--skip-private
don't check private directories
dh_python2 --skip-private ...
-v
turn verbose mode on
dh_python2 -v ...
-i
act on architecture independent packages
dh_python2 -i ...
-a
act on architecture dependent packages
dh_python2 -a ...
-p
act on the package named PACKAGE
dh_python2 -p ...
-N
do not act on the specified package
dh_python2 -N ...
-V
specify list of supported Python versions. See pycompile(1) for examples
dh_python2 -V ...
-X
exclude items that match given REGEXPR. You may use this option multiple times to build up a list of things to exclude.
dh_python2 -X ...
--compile-all
compile all files from given private directory in postinst/rtupdate not just the ones provided by the package (i.e. do notpass the --package parameter to pycompile/pyclean)
dh_python2 --compile-all ...
--depends
translate given requirements into Debian dependencies and add them to ${python:Depends}. Use it for missing items inrequires.txt
dh_python2 --depends ...
--recommends
translate given requirements into Debian dependencies and add them to ${python:Recommends}
dh_python2 --recommends ...
--suggests
translate given requirements into Debian dependencies and add them to ${python:Suggests}
dh_python2 --suggests ...
--namespace
use this option (multiple time if necessary) if namespace_packages.txt is not complete
dh_python2 --namespace ...
--ignore-namespace
ignore Egg's namespace declaration and --namespace option. This option will disable removing (and recreating at install time)empty __init__.py files. Removing namespace_packages.txt from egg-info directory has the same effect.
dh_python2 --ignore-namespace ...
--clean-pycentral
generate maintainer script that will remove byte code generated by python-central helper
dh_python2 --clean-pycentral ...
--shebang
use given command as shebang in scripts
dh_python2 --shebang ...
--ignore-shebangs
do not translate shebangs into Debian dependencies
dh_python2 --ignore-shebangs ...