New python-defaults upload to experimental
I've just uploaded 2.7.2-2 to experimental. It's mostly about dh_python2
improvements from POX, but also has some minor updates to Python Policy that I
think improve the currency of it a bit. Please review the changes and I'll fix
them up if I got it wrong. Diff of the text version attached.
Assuming the dh_python2 changes work out and and we have some consensus on
changes in policy, I'll backport this update to Unstable, probably next week.
Scott K
--- python-policy.txt.old 2011-07-07 01:25:27.645846903 -0400
+++ python-policy.txt.new 2011-07-07 01:24:37.613846929 -0400
@@ -16,7 +16,7 @@
Scott Kitterman <scott@kitterman.com>
- version 0.9.3.0
+ version 0.9.4.0
-------------------------------------------------------------------------------
@@ -94,10 +94,11 @@
A. Build Dependencies
B. Packaging Tools
- B.1. distutils
- B.2. python-support
- B.3. python-central
- B.4. CDBS
+ B.1. dh_python2 and dh_python3
+ B.2. distutils
+ B.3. python-support
+ B.4. python-central
+ B.5. CDBS
C. Upgrade Procedure
@@ -325,12 +326,8 @@
The goal of these policies is to reduce the work necessary for Python
transitions. Python modules are internally very dependent on a
- specific Python version. However, we want to automate recompiling
- modules when possible, either during the upgrade itself
- (re-byte-compiling pyc and pyo files) or shortly thereafter with
- automated rebuilds (to handle C extensions). These policies encourage
- automated dependency generation and loose version bounds whenever
- possible.
+ specific Python version. These policies encourage automated
+ dependency generation and loose version bounds whenever possible.
2.1. Types of Python Modules
@@ -338,19 +335,19 @@
There are two kinds of Python modules, "pure" Python modules, and
extension modules. Pure Python modules are Python source code that
- works across many versions of Python. Extensions are C code compiled
- and linked against a specific version of the python runtime, and so
- can only be used by one version of Python. Some distributions link
- extensions to libpython, but this is not the case in Debian as symbols
- might as well be resolved by `/usr/bin/python<X>.<Y>' which is not
- linked to libpython.
-
- Python packages are directories containing at least a `__init__.py',
- other modules, extensions and packages (A package in the Python sense
- is unrelated to a Debian package). Python packages must be packaged
- into the same directory (as done by upstream). Splitting components
- of a package across directories changes the import order and may
- confuse documentation tools and IDEs.
+ generally works across many versions of Python. Extensions are C code
+ compiled and linked against a specific version of the python runtime,
+ and so can only be used by one version of Python. Some distributions
+ link extensions to libpython, but this is not the case in Debian as
+ symbols might as well be resolved by `/usr/bin/python<X>.<Y>' which is
+ not linked to libpython.
+
+ Python packages are either files or directories containing at least a
+ `__init__.py', other modules, extensions and packages (A package in
+ the Python sense is unrelated to a Debian package). Python packages
+ must be packaged into the same directory (as done by upstream).
+ Splitting components of a package across directories changes the
+ import order and may confuse documentation tools and IDEs.
There are two ways to distribute Python modules. Public modules are
installed in a public directory as listed in Section 1.5, `Module
@@ -626,7 +623,18 @@
documentation.
-B.1. distutils
+B.1. dh_python2 and dh_python3
+------------------------------
+
+ dh_python2 and dh_python3 are `debhelper' extensions provided as part
+ of Python and Python3 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 Python maintainers. See man dh_python2 or
+ man dh_python3 for details.
+
+
+B.2. distutils
--------------
The standard Python distutils module has been modified in Debian to
@@ -655,31 +663,32 @@
directory.
-B.2. python-support
+B.3. python-support
-------------------
- The python-support system provides a simple way to byte-compile pure
- Python modules and manage dependencies. It integrates with
- `debhelper', manages byte-compilation, private modules, will properly
- use the /usr/share/pyshared directory, integrates with runtime update
- hooks, and will fill-in the `${python:Depends}', `${python:Versions}',
- and `${python:Provides}' substvars. See the python-support
- documentation in /usr/share/doc/python-support for details.
+ python-support is deprecated. It was system intended to provide a
+ simple way to byte-compile pure Python modules and manage
+ dependencies. It integrates with `debhelper', manages
+ byte-compilation, private modules, will properly use the
+ /usr/share/pyshared directory, integrates with runtime update hooks,
+ and will fill-in the `${python:Depends}', `${python:Versions}', and
+ `${python:Provides}' substvars. See the python-support documentation
+ in /usr/share/doc/python-support for details.
-B.3. python-central
+B.4. python-central
-------------------
- python-central provides another way to manage Python modules. It
- integrates with `debhelper', manages byte-compilation, private
- modules, will properly use the /usr/share/pyshared directory,
- integrates with runtime update hooks, and will fill-in the
- `${python:Depends}', `${python:Versions}', and `${python:Provides}'
- substvars. See the python-central documentation in the pycentral(1)
- and dh_pycentral(1) man pages.
+ python-central is deprecated. It provided another way to manage
+ Python modules. It integrates with `debhelper', manages
+ byte-compilation, private modules, will properly use the
+ /usr/share/pyshared directory, integrates with runtime update hooks,
+ and will fill-in the `${python:Depends}', `${python:Versions}', and
+ `${python:Provides}' substvars. See the python-central documentation
+ in the pycentral(1) and dh_pycentral(1) man pages.
-B.4. CDBS
+B.5. CDBS
---------
The CDBS python-distutils.mk class helps packaging of setup.py based
@@ -734,5 +743,5 @@
Scott Kitterman <scott@kitterman.com>
- version 0.9.3.0
+ version 0.9.4.0
Reply to: