15
B<dh_python> [S<I<debhelper options>>] [B<-n>] [B<-V> I<version>] [S<I<module dirs ...>>]
15
B<dh_python> [S<I<debhelper options>>] [B<-n>] [B<-V> I<version>] [S<I<module dirs> ...>]
19
Note: This program is deprecated. You should use dh_pysupport or
20
dh_pycentral instead. This program will do nothing if debian/pycompat
21
or a Python-Version control file field exists.
23
dh_python is a debhelper program that is responsible for generating the
24
${python:Depends} substitutions and adding them to substvars files. It
25
will also add a postinst and a prerm script if required.
27
The program will look at python scripts and modules in your package, and
28
will use this information to generate a dependency on python, with the
29
current major version, or on pythonX.Y if your scripts or modules need a
30
specific python version. The dependency will be substituted into your
31
package's control file wherever you place the token "${python:Depends}".
19
Note: This program is deprecated. You should use B<dh_pysupport> or
20
B<dh_pycentral> instead. This program will do nothing if F<debian/pycompat>
21
or a B<Python-Version> F<control> file field exists.
23
B<dh_python> is a debhelper program that is responsible for generating the
24
B<${python:Depends}> substitutions and adding them to substvars files. It
25
will also add a F<postinst> and a F<prerm> script if required.
27
The program will look at Python scripts and modules in your package, and
28
will use this information to generate a dependency on B<python>, with the
29
current major version, or on B<python>I<X>B<.>I<Y> if your scripts or modules need a
30
specific B<python> version. The dependency will be substituted into your
31
package's F<control> file wherever you place the token B<${python:Depends}>.
33
33
If some modules need to be byte-compiled at install time, appropriate
34
postinst and prerm scripts will be generated. If already byte-compiled
34
F<postinst> and F<prerm> scripts will be generated. If already byte-compiled
35
35
modules are found, they are removed.
37
If you use this program, your package should build-depend on python.
37
If you use this program, your package should build-depend on B<python>.
43
43
=item I<module dirs>
45
If your package installs python modules in non-standard directories, you
46
can make dh_python check those directories by passing their names on the
47
command line. By default, it will check /usr/lib/site-python,
48
/usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/lib/games/$PACKAGE,
49
/usr/share/games/$PACKAGE and /usr/lib/python?.?/site-packages.
45
If your package installs Python modules in non-standard directories, you
46
can make F<dh_python> check those directories by passing their names on the
47
command line. By default, it will check F</usr/lib/site-python,
48
/usr/lib/$PACKAGE>, F</usr/share/$PACKAGE>, F</usr/lib/games/$PACKAGE>,
49
F</usr/share/games/$PACKAGE> and F</usr/lib/python?.?/site-packages>.
51
Note: only /usr/lib/site-python, /usr/lib/python?.?/site-packages and the
52
extra names on the command line are searched for binary (.so) modules.
51
Note: only F</usr/lib/site-python>, F</usr/lib/python?.?/site-packages> and the
52
extra names on the command line are searched for binary (F<.so>) modules.
54
54
=item B<-V> I<version>
56
If the .py files your package ships are meant to be used by a specific
57
pythonX.Y version, you can use this option to specify the desired version,
58
such as 2.3. Do not use if you ship modules in /usr/lib/site-python.
56
If the F<.py> files your package ships are meant to be used by a specific
57
B<python>I<X>B<.>I<Y> version, you can use this option to specify the desired version,
58
such as B<2.3>. Do not use if you ship modules in F</usr/lib/site-python>.
60
60
=item B<-n>, B<--noscripts>
62
Do not modify postinst/postrm scripts.
62
Do not modify F<postinst>/F<postrm> scripts.