/usr/share/doc/python/python-policy.html/ap-packaging_tools.html is in python 2.7.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Debian Python Policy - Packaging Tools</title>
<link href="index.html" rel="start">
<link href="ap-build_dependencies.html" rel="prev">
<link href="ap-upgrade.html" rel="next">
<link href="index.html#contents" rel="contents">
<link href="index.html#copyright" rel="copyright">
<link href="ch-python3.html" rel="chapter" title="1 On the move to Python 3">
<link href="ch-python.html" rel="chapter" title="2 Python Packaging">
<link href="ch-module_packages.html" rel="chapter" title="3 Packaged Modules">
<link href="ch-programs.html" rel="chapter" title="4 Python Programs">
<link href="ch-embed.html" rel="chapter" title="5 Programs Embedding Python">
<link href="ch-other.html" rel="chapter" title="6 Interaction with Locally Installed Python Versions">
<link href="ap-build_dependencies.html" rel="appendix" title="A Build Dependencies">
<link href="ap-packaging_tools.html" rel="appendix" title="B Packaging Tools">
<link href="ap-upgrade.html" rel="appendix" title="C Upgrade Procedure">
<link href="ch-python.html#s-versions" rel="section" title="2.1 Versions">
<link href="ch-python.html#s-base" rel="section" title="2.2 Main packages">
<link href="ch-python.html#s-minimal" rel="section" title="2.3 Minimal packages">
<link href="ch-python.html#s-interpreter" rel="section" title="2.4 Python Interpreter">
<link href="ch-python.html#s-paths" rel="section" title="2.5 Module Path">
<link href="ch-python.html#s-runtimes_hooks" rel="section" title="2.6 Hooks for updates to installed runtimes">
<link href="ch-python.html#s-docs" rel="section" title="2.7 Documentation">
<link href="ch-module_packages.html#s3.1" rel="section" title="3.1 Types of Python Modules">
<link href="ch-module_packages.html#s-wheels" rel="section" title="3.2 Wheels">
<link href="ch-module_packages.html#s-package_names" rel="section" title="3.3 Module Package Names">
<link href="ch-module_packages.html#s-specifying_versions" rel="section" title="3.4 Specifying Supported Versions">
<link href="ch-module_packages.html#s-dependencies" rel="section" title="3.5 Dependencies">
<link href="ch-module_packages.html#s-provides" rel="section" title="3.6 Provides">
<link href="ch-module_packages.html#s-byte_compilation" rel="section" title="3.7 Modules Byte-Compilation">
<link href="ch-programs.html#s-interpreter-directive" rel="section" title="4.1 Interpreter directive (“Shebang”)">
<link href="ch-programs.html#s-version_indep_progs" rel="section" title="4.2 Programs using the default Python">
<link href="ch-programs.html#s-version_dep_progs" rel="section" title="4.3 Programs Using a Particular Python Version">
<link href="ch-embed.html#s-build_embedded" rel="section" title="5.1 Building Embedded Programs">
<link href="ch-embed.html#s-embedded_deps" rel="section" title="5.2 Embedded Python Dependencies">
<link href="ap-packaging_tools.html#s-distutils" rel="section" title="B.1 distutils">
<link href="ap-packaging_tools.html#s-setuptools" rel="section" title="B.2 setuptools">
<link href="ap-packaging_tools.html#s-dh-python" rel="section" title="B.3 dh-python">
<link href="ap-packaging_tools.html#s-pybuild" rel="section" title="B.4 pybuild">
<link href="ap-packaging_tools.html#s-cdbs" rel="section" title="B.5 CDBS">
<link href="ap-packaging_tools.html#s-pysupport" rel="section" title="B.6 python-support (removed)">
<link href="ap-packaging_tools.html#s-pycentral" rel="section" title="B.7 python-central (removed)">
<link href="ch-python.html#s-interpreter_name" rel="subsection" title="2.4.1 Interpreter Name">
<link href="ch-python.html#s-interpreter_loc" rel="subsection" title="2.4.2 Interpreter Location">
<link href="ch-programs.html#s-current_version_progs" rel="subsection" title="4.2.1 Programs Shipping Private Modules">
</head>
<body>
<p><a name="ap-packaging_tools"></a></p>
<hr>
<p>
[ <a href="ap-build_dependencies.html">previous</a> ]
[ <a href="index.html#contents">Contents</a> ]
[ <a href="ch-python3.html">1</a> ]
[ <a href="ch-python.html">2</a> ]
[ <a href="ch-module_packages.html">3</a> ]
[ <a href="ch-programs.html">4</a> ]
[ <a href="ch-embed.html">5</a> ]
[ <a href="ch-other.html">6</a> ]
[ <a href="ap-build_dependencies.html">A</a> ]
[ B ]
[ <a href="ap-upgrade.html">C</a> ]
[ <a href="ap-upgrade.html">next</a> ]
</p>
<hr>
<h1>
Debian Python Policy
<br>Appendix B - Packaging Tools</h1>
<hr>
<p>
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.
</p>
<hr>
<h2 id="s-distutils">B.1 distutils</h2>
<p>
The standard Python <samp>distutils</samp> module has been modified in Debian
to change the default installation directory of public Python modules and to
add a new flag to the <samp>install</samp> command to override the default,
<samp>--install-layout=</samp>.
</p>
<p>
Public Python modules installed with a modified distutils default to
<code>/usr/local/lib/python<var>X</var>.<var>Y</var>/dist-packages</code> for
Python 2.6 and later. This directory is seen by the system-provided Python
2.6.
</p>
<p>
When using a local Python installation, the default is
<code>/usr/local/lib/python<var>X</var>.<var>Y</var>/site-packages</code> which
is only seen by the local Python installation.
</p>
<p>
Using the <samp>--install-layout=deb</samp> flag to the <samp>install</samp>
command of <code>setup.py</code> with a system-provided Python 2.6 or later
versions, Python modules will be installed to
<code>/usr/lib/python<var>X</var>.<var>Y</var>/dist-packages</code> which is
only seen by the system-provided Python, not by a local installation.
</p>
<hr>
<h2 id="s-setuptools">B.2 setuptools</h2>
<p>
The related Python <samp>setuptools</samp> module has been modified in Debian
along the same lines as <samp>distutils</samp>.
</p>
<p>
Upstream focus on developments and improvements for Python packaging tools has
largely shifted away from <samp>distutils</samp> and to
<samp>setuptools</samp>. They offer a similar API and at some point in the
future, <samp>setuptools</samp> may fully replace <samp>distutils</samp> in
Debian package builds.
</p>
<hr>
<h2 id="s-dh-python">B.3 <code>dh-python</code></h2>
<p>
<code>dh-python</code> provides extensions for <code>debhelper</code> to make
it easier to package Python modules and extensions. They calculate Python
dependencies, add maintainer scripts to byte compile files, etc. Their use is
not mandatory, but they are recommended by the Debian Python maintainers.
</p>
<p>
See <samp>man dh_python3</samp> or <samp>man dh_python2</samp> for details.
</p>
<hr>
<h2 id="s-pybuild">B.4 pybuild</h2>
<p>
Pybuild is a Debian Python specific build system that invokes various build
systems for requested Python versions in order to build modules and extensions.
It supports automatically building for multiple Python versions.
</p>
<hr>
<h2 id="s-cdbs">B.5 CDBS</h2>
<p>
The CDBS <code>python-distutils.mk</code> class helps packaging of distutils
based Python packages.
</p>
<hr>
<h2 id="s-pysupport">B.6 <code>python-support</code> (removed)</h2>
<p>
<code>python-support</code> provided another way to manage Python modules. It
has been removed from Debian Stretch and later releases.
</p>
<hr>
<h2 id="s-pycentral">B.7 <code>python-central</code> (removed)</h2>
<p>
<code>python-central</code> provided another way to manage Python modules. It
has been removed from Debian Jessie and later releases.
</p>
<hr>
<p>
[ <a href="ap-build_dependencies.html">previous</a> ]
[ <a href="index.html#contents">Contents</a> ]
[ <a href="ch-python3.html">1</a> ]
[ <a href="ch-python.html">2</a> ]
[ <a href="ch-module_packages.html">3</a> ]
[ <a href="ch-programs.html">4</a> ]
[ <a href="ch-embed.html">5</a> ]
[ <a href="ch-other.html">6</a> ]
[ <a href="ap-build_dependencies.html">A</a> ]
[ B ]
[ <a href="ap-upgrade.html">C</a> ]
[ <a href="ap-upgrade.html">next</a> ]
</p>
<hr>
<p>
Debian Python Policy
</p>
<address>
version 0.10.1.1<br>
<br>
Neil Schemenauer <code><a href="mailto:nas@debian.org">mailto:nas@debian.org</a></code><br>
Matthias Klose <code><a href="mailto:doko@debian.org">mailto:doko@debian.org</a></code><br>
Gregor Hoffleit <code><a href="mailto:flight@debian.org">mailto:flight@debian.org</a></code><br>
Josselin Mouette <code><a href="mailto:joss@debian.org">mailto:joss@debian.org</a></code><br>
Joe Wreschnig <code><a href="mailto:piman@debian.org">mailto:piman@debian.org</a></code><br>
Loïc Minier <code><a href="mailto:lool@debian.org">mailto:lool@debian.org</a></code><br>
Scott Kitterman <code><a href="mailto:scott@kitterman.com">mailto:scott@kitterman.com</a></code><br>
Barry Warsaw <code><a href="mailto:barry@debian.org">mailto:barry@debian.org</a></code><br>
Ben Finney <code><a href="mailto:ben+debian@benfinney.id.au">mailto:ben+debian@benfinney.id.au</a></code><br>
<br>
</address>
<hr>
</body>
</html>
|