Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python-defaults
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
python-defaults
Commits
ecfacdbd
Commit
ecfacdbd
authored
9 years ago
by
Ben Finney
Browse files
Options
Downloads
Patches
Plain Diff
Correct whitespace to conform to Policy style.
parent
5c9dc767
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
debian/python-policy.sgml
+90
-90
90 additions, 90 deletions
debian/python-policy.sgml
with
90 additions
and
90 deletions
debian/python-policy.sgml
+
90
−
90
View file @
ecfacdbd
...
@@ -17,24 +17,24 @@
...
@@ -17,24 +17,24 @@
<email>flight@debian.org</email>
<email>flight@debian.org</email>
</author>
</author>
<author>
<author>
<name>Josselin Mouette</name>
<name>Josselin Mouette</name>
<email>joss@debian.org</email>
<email>joss@debian.org</email>
</author>
</author>
<author>
<author>
<name>Joe Wreschnig</name>
<name>Joe Wreschnig</name>
<email>piman@debian.org</email>
<email>piman@debian.org</email>
</author>
</author>
<author>
<author>
<name>Loïc Minier</name>
<name>Loïc Minier</name>
<email>lool@debian.org</email>
<email>lool@debian.org</email>
</author>
</author>
<author>
<author>
<name>Scott Kitterman</name>
<name>Scott Kitterman</name>
<email>scott@kitterman.com</email>
<email>scott@kitterman.com</email>
</author>
</author>
<author>
<author>
<name>Barry Warsaw</name>
<name>Barry Warsaw</name>
<email>barry@debian.org</email>
<email>barry@debian.org</email>
</author>
</author>
<version>version 0.10.1.0</version>
<version>version 0.10.1.0</version>
...
@@ -83,11 +83,11 @@
...
@@ -83,11 +83,11 @@
Debian currently supports two Python stacks, one for Python 2
Debian currently supports two Python stacks, one for Python 2
and one for Python 3. The long term goal for Debian is to
and one for Python 3. The long term goal for Debian is to
reduce this to one stack, dropping the Python 2 stack at some
reduce this to one stack, dropping the Python 2 stack at some
time.
time.
<url id="http://legacy.python.org/dev/peps/pep-0404/"
<url id="http://legacy.python.org/dev/peps/pep-0404/"
name="PEP 404"> states that no more major Python 2 releases
name="PEP 404"> states that no more major Python 2 releases
are planned, although the last released major version 2.7
are planned, although the last released major version 2.7
will see some extended support, documented in
will see some extended support, documented in
<url id="http://legacy.python.org/dev/peps/pep-0466/"
<url id="http://legacy.python.org/dev/peps/pep-0466/"
name="PEP 466">.
name="PEP 466">.
</p>
</p>
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
upload, new upstream versions for existing packages should
upload, new upstream versions for existing packages should
use Python 3 if the new upstream version supports it.
use Python 3 if the new upstream version supports it.
</p>
</p>
<p><enumlist>
<p><enumlist>
<item>
<item>
<p>
<p>
...
@@ -209,7 +209,7 @@
...
@@ -209,7 +209,7 @@
some exceptions.
some exceptions.
</p>
</p>
<p>
<p>
Excluded are modules
that cannot be included for licensing
Excluded are modules that cannot be included for licensing
reasons (for example the profile module), for dependency tracking
reasons (for example the profile module), for dependency tracking
purposes (for example the GPL-licensed gdbm module) or that should
purposes (for example the GPL-licensed gdbm module) or that should
not be included for packaging reasons (for example the tk module
not be included for packaging reasons (for example the tk module
...
@@ -257,37 +257,37 @@
...
@@ -257,37 +257,37 @@
</sect>
</sect>
<sect id="interpreter">
<sect id="interpreter">
<heading>Python Interpreter</heading>
<heading>Python Interpreter</heading>
<sect1 id="interpreter_name">
<sect1 id="interpreter_name">
<heading>Interpreter Name</heading>
<heading>Interpreter Name</heading>
<p>
<p>
Python scripts depending on the default Python version (see <ref
Python scripts depending on the default Python version (see <ref
id="base">) or not depending on a specific Python version should
id="base">) or not depending on a specific Python version should
use <file>python</file> (without a version) as the interpreter name.
use <file>python</file> (without a version) as the interpreter name.
</p>
</p>
<p>
<p>
Python scripts that only work with a specific Python version must
Python scripts that only work with a specific Python version must
explicitly use the versioned interpreter name
explicitly use the versioned interpreter name
(<file>python<var>X</var>.<var>Y</var></file>).
(<file>python<var>X</var>.<var>Y</var></file>).
</p>
</p>
</sect1>
</sect1>
<sect1 id="interpreter_loc">
<sect1 id="interpreter_loc">
<heading>Interpreter Location</heading>
<heading>Interpreter Location</heading>
<p>
<p>
The preferred specification for the Python interpreter is
The preferred specification for the Python interpreter is
<file>/usr/bin/python</file> or
<file>/usr/bin/python</file> or
<file>/usr/bin/python<var>X</var>.<var>Y</var></file>.
<file>/usr/bin/python<var>X</var>.<var>Y</var></file>.
This ensures that a Debian installation of python is used
This ensures that a Debian installation of python is used
and all dependencies on additional python modules are met.
and all dependencies on additional python modules are met.
</p>
</p>
<p>
<p>
Maintainers should not override the Debian Python interpreter using
Maintainers should not override the Debian Python interpreter using
<file>/usr/bin/env python</file> or
<file>/usr/bin/env python</file> or
<file>/usr/bin/env python<var>X</var>.<var>Y</var></file>. This is
<file>/usr/bin/env python<var>X</var>.<var>Y</var></file>. This is
not advisable as it bypasses Debian's dependency checking and makes
not advisable as it bypasses Debian's dependency checking and makes
the package vulnerable to incomplete local installations of python.
the package vulnerable to incomplete local installations of python.
</p>
</p>
</sect1>
</sect1>
</sect>
</sect>
<sect id="paths">
<sect id="paths">
...
@@ -307,7 +307,7 @@
...
@@ -307,7 +307,7 @@
A special directory is dedicated to public Python modules
A special directory is dedicated to public Python modules
installed by the local administrator,
installed by the local administrator,
/usr/lib/python3/dist-packages for all python3 versions,
/usr/lib/python3/dist-packages for all python3 versions,
/usr/local/lib/python2.<var>Y</var>/dist-packages for python2.7.
/usr/local/lib/python2.<var>Y</var>/dist-packages for python2.7.
For a local installation by the administrator of python2.7, a
For a local installation by the administrator of python2.7, a
...
@@ -326,14 +326,14 @@
...
@@ -326,14 +326,14 @@
/usr/lib/python2.6/dist-packages/foo.py and
/usr/lib/python2.6/dist-packages/foo.py and
/usr/lib/python2.7/dist-packages/foo.py, these should point to a
/usr/lib/python2.7/dist-packages/foo.py, these should point to a
common file. Version specific directories for identical source code
common file. Version specific directories for identical source code
are not required for python3 and must not be used for this.
are not required for python3 and must not be used for this.
Since python2.7 is the last python2 version and the only supported
Since python2.7 is the last python2 version and the only supported
version in wheezy and later releases, a common location to share
version in wheezy and later releases, a common location to share
arch-independent files across Python versions is no longer needed.
arch-independent files across Python versions is no longer needed.
Historically the location for this was /usr/share/pyshared. For
Historically the location for this was /usr/share/pyshared. For
python2.7, use of /usr/lib/python2.7/dist-packages is sufficient.
python2.7, use of /usr/lib/python2.7/dist-packages is sufficient.
For python3, a special location is not required, use
For python3, a special location is not required, use
/usr/lib/python3/dist-packages
/usr/lib/python3/dist-packages
</p>
</p>
</sect>
</sect>
...
@@ -433,14 +433,14 @@
...
@@ -433,14 +433,14 @@
</p>
</p>
<p>
<p>
Python packages are a way of structuring Python’s module namespace
Python packages are a way of structuring Python’s module namespace
by using “dotted module names”. See
by using “dotted module names”. See
<url id="http://docs.python.org/tutorial/modules.html#packages"
<url id="http://docs.python.org/tutorial/modules.html#packages"
name="Python's documentation"> for details on how packages are
name="Python's documentation"> for details on how packages are
defined in Python terms (A package in the Python sense is unrelated to a
defined in Python terms (A package in the Python sense is unrelated to a
Debian package). Python packages must be packaged into the
Debian package). Python packages must be packaged into the
same directory (as done by upstream). Splitting components
same directory (as done by upstream). Splitting components
of a package across directories changes the import order and
of a package across directories changes the import order and
may confuse documentation tools and IDEs.
may confuse documentation tools and IDEs.
</p>
</p>
<p>
<p>
There are two ways to distribute Python modules. Public
There are two ways to distribute Python modules. Public
...
@@ -454,40 +454,40 @@
...
@@ -454,40 +454,40 @@
</p>
</p>
</sect>
</sect>
<sect id="wheels">
<sect id="wheels">
<heading>Wheels</heading>
<heading>Wheels</heading>
<p>
<p>
<url id="http://legacy.python.org/dev/peps/pep-0427/"
<url id="http://legacy.python.org/dev/peps/pep-0427/"
name="PEP 427">
name="PEP 427">
defines a built-package format called "wheels", which is a zip
defines a built-package format called "wheels", which is a zip
format archive containing Python code and a "dist-info" metadata
format archive containing Python code and a "dist-info" metadata
directory, in a single file named with the .whl suffix. As zip
directory, in a single file named with the .whl suffix. As zip
files, wheels containing pure-Python can be put on sys.path and
files, wheels containing pure-Python can be put on sys.path and
modules in the wheel can be imported directly by Python's "import"
modules in the wheel can be imported directly by Python's "import"
statement. (Importing extension modules from wheels is not yet
statement. (Importing extension modules from wheels is not yet
supported as of Python 3.4.)
supported as of Python 3.4.)
</p><p>
</p><p>
Except as described below, packages must not build or provide
Except as described below, packages must not build or provide
wheels. They are redundant to the established way of providing
wheels. They are redundant to the established way of providing
Python libraries to Debian users, take no advantage of distro-based
Python libraries to Debian users, take no advantage of distro-based
tools, and are less convenient to use. E.g. they must be explicitly
tools, and are less convenient to use. E.g. they must be explicitly
added to sys.path, cannot be easily grepped, and stack traces
added to sys.path, cannot be easily grepped, and stack traces
through zips are more difficult to debug.
through zips are more difficult to debug.
</p><p>
</p><p>
A very limited set of wheel packages are available in the archive,
A very limited set of wheel packages are available in the archive,
but these support the narrow purpose of enabling
but these support the narrow purpose of enabling
the <prgn>pip</prgn> tool, in a Debian policy compliant way. The
the <prgn>pip</prgn> tool, in a Debian policy compliant way. The
set of packages providing wheels for this purpose are (by source
set of packages providing wheels for this purpose are (by source
package name): chardet, distlib, html5lib, python-colorama,
package name): chardet, distlib, html5lib, python-colorama,
python-pip, python-setuptools, python-urllib3, requests, and six.
python-pip, python-setuptools, python-urllib3, requests, and six.
</p><p>
</p><p>
Wheel packages supporting <prgn>pyvenv</prgn> and <prgn>pip</prgn>
Wheel packages supporting <prgn>pyvenv</prgn> and <prgn>pip</prgn>
are named with the <var>python-</var> prefix, and the <var>-whl</var>
are named with the <var>python-</var> prefix, and the <var>-whl</var>
suffix, e.g. <package>python-chardet-whl</package>. When these
suffix, e.g. <package>python-chardet-whl</package>. When these
binary packages are installed, their .whl files must be placed in
binary packages are installed, their .whl files must be placed in
the /usr/share/python-wheels directory. Such wheels must be built
the /usr/share/python-wheels directory. Such wheels must be built
with the <tt>--universal</tt> flag so as to generate wheels
with the <tt>--universal</tt> flag so as to generate wheels
compatible with both Python 2 and Python 3.
compatible with both Python 2 and Python 3.
</p>
</p>
</sect>
</sect>
<sect id="package_names">
<sect id="package_names">
<heading>Module Package Names</heading>
<heading>Module Package Names</heading>
...
@@ -505,9 +505,9 @@
...
@@ -505,9 +505,9 @@
multiple modules. In the latter case the maintainer chooses the
multiple modules. In the latter case the maintainer chooses the
name of the module which represents the package the most.
name of the module which represents the package the most.
For subpackages such as <var>foo.bar</var>, the recommendation is to
For subpackages such as <var>foo.bar</var>, the recommendation is to
name the binary packages <package>python-<var>foo.bar</var></package>
name the binary packages <package>python-<var>foo.bar</var></package>
and <package>python3-<var>foo.bar</var></package>.
and <package>python3-<var>foo.bar</var></package>.
Such a package should support the current Debian Python version,
Such a package should support the current Debian Python version,
and more if possible (there are several tools to help implement
and more if possible (there are several tools to help implement
...
@@ -558,14 +558,14 @@ XS-Python-Version: all
...
@@ -558,14 +558,14 @@ XS-Python-Version: all
The keyword "current" has been deprecated and used to mean that
The keyword "current" has been deprecated and used to mean that
the package would only have to support a single version (even
the package would only have to support a single version (even
across default version changes). It must be ignored for Python 3
across default version changes). It must be ignored for Python 3
versions.
versions.
</p>
</p>
<p>
<p>
The use of XB-Python-Version in the binary package paragraphs of
The use of XB-Python-Version in the binary package paragraphs of
debian/control file has been deprecated and should be removed in the
debian/control file has been deprecated and should be removed in the
normal course of package updates. It never achieved sufficient
normal course of package updates. It never achieved sufficient
deployment to support it's intended purpose of managing Python
deployment to support it's intended purpose of managing Python
transitions. This can be adequately accomplished by examining
transitions. This can be adequately accomplished by examining
package dependencies.
package dependencies.
</p>
</p>
</sect>
</sect>
...
@@ -585,7 +585,7 @@ XS-Python-Version: all
...
@@ -585,7 +585,7 @@ XS-Python-Version: all
All python module packages and python3 binary extension packages must
All python module packages and python3 binary extension packages must
also declare a maximum version they support as currently built (this
also declare a maximum version they support as currently built (this
is accomplished by declaring a maximum version constraint strictly
is accomplished by declaring a maximum version constraint strictly
less than one higher than the current maxiumum version, i.e.
less than one higher than the current maxiumum version, i.e.
"<package>python (<< <var>X</var>.<var>Y</var></package>)"
"<package>python (<< <var>X</var>.<var>Y</var></package>)"
</p>
</p>
</sect>
</sect>
...
@@ -593,8 +593,8 @@ XS-Python-Version: all
...
@@ -593,8 +593,8 @@ XS-Python-Version: all
<sect id="provides">
<sect id="provides">
<heading>Provides</heading>
<heading>Provides</heading>
<p>
<p>
Python Provides in binary packages of the form
Python Provides in binary packages of the form
<package>python-<var>X</var>.<var>Y</var><var>>foo</var></package>
<package>python-<var>X</var>.<var>Y</var><var>>foo</var></package>
were never supported for Python 3 and are no longer useful for
were never supported for Python 3 and are no longer useful for
Python. They should be removed in the normal course of package
Python. They should be removed in the normal course of package
updates. Future provision of values for the substituation variable
updates. Future provision of values for the substituation variable
...
@@ -603,7 +603,7 @@ XS-Python-Version: all
...
@@ -603,7 +603,7 @@ XS-Python-Version: all
</sect>
</sect>
<sect id="byte_compilation">
<sect id="byte_compilation">
<heading>Modules Byte-Compilation</heading>
<heading>Modules Byte-Compilation</heading>
<p>
<p>
If a binary package provides any binary-independent modules
If a binary package provides any binary-independent modules
(<file>foo.py</file> files), the corresponding byte-compiled
(<file>foo.py</file> files), the corresponding byte-compiled
...
@@ -615,13 +615,13 @@ XS-Python-Version: all
...
@@ -615,13 +615,13 @@ XS-Python-Version: all
<file>foo.pyo</file> are removed.
<file>foo.pyo</file> are removed.
</p>
</p>
<p>
<p>
A binary package should only byte-compile the files which belong to
A binary package should only byte-compile the files which belong to
the package.
the package.
</p>
</p>
<p>
<p>
The file <file>/etc/python/debian_config</file> allows
The file <file>/etc/python/debian_config</file> allows
configuration how modules should be byte-compiled. The
configuration how modules should be byte-compiled. The
postinst scripts should respect these settings.
postinst scripts should respect these settings.
</p>
</p>
<p>
<p>
Pure Python modules in private installation directories that are
Pure Python modules in private installation directories that are
...
@@ -656,8 +656,8 @@ XS-Python-Version: all
...
@@ -656,8 +656,8 @@ XS-Python-Version: all
package ships multiple modules.
package ships multiple modules.
</p>
</p>
<sect1 id="current_version_progs">
<sect1 id="current_version_progs">
<heading>Programs Shipping Private Modules</heading>
<heading>Programs Shipping Private Modules</heading>
<p>
<p>
A program using <file>/usr/bin/python</file> as
A program using <file>/usr/bin/python</file> as
interpreter can come up with private Python modules. These
interpreter can come up with private Python modules. These
...
@@ -860,7 +860,7 @@ Build-Depends: python3-all-dev (>= 3.2)
...
@@ -860,7 +860,7 @@ Build-Depends: python3-all-dev (>= 3.2)
<heading>python-central (removed)</heading>
<heading>python-central (removed)</heading>
<p>
<p>
python-central has been removed from Jessie and later releases. It
python-central has been removed from Jessie and later releases. It
provided another way to manage Python modules.
provided another way to manage Python modules.
</p>
</p>
</sect>
</sect>
...
@@ -944,7 +944,7 @@ Build-Depends: python3-all-dev (>= 3.2)
...
@@ -944,7 +944,7 @@ Build-Depends: python3-all-dev (>= 3.2)
uninstallability is unavoidable. This is a transition that can
uninstallability is unavoidable. This is a transition that can
entangle other transitions in the distribution and requires more
entangle other transitions in the distribution and requires more
careful coordination with the release team.
careful coordination with the release team.
</p>
</p>
</item>
</item>
<item>
<item>
<p>
<p>
...
@@ -955,7 +955,7 @@ Build-Depends: python3-all-dev (>= 3.2)
...
@@ -955,7 +955,7 @@ Build-Depends: python3-all-dev (>= 3.2)
<p>
<p>
</item>
</item>
</enumlist>
</enumlist>
</appendix>
</appendix>
</book>
</book>
</debiandoc>
</debiandoc>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment