Hi,
I think it's time to update the python policy with the progress that has
been made in how we build python packages. The proposed diff is
attached. In summary it includes:
* the deprecation of the "current" keyword;
* making Provides: meaningful in the case of inter-module
dependencies, as discussed at Debconf;
* fixes to the erroneous python-support section.
Comments anyone?
--
.''`.
: :' : We are debian.org. Lower your prices, surrender your code.
`. `' We will add your hardware and software distinctiveness to
`- our own. Resistance is futile.
--- python-policy.sgml.orig 2007-03-21 20:00:04.000000000 +0100
+++ python-policy.sgml 2007-03-21 19:57:22.000000000 +0100
@@ -24,7 +24,7 @@
<name>Joe Wreschnig</name>
<email>piman@debian.org</email>
</author>
- <version>version 0.4.1.0</version>
+ <version>version 0.4.2pre</version>
<abstract>
This document describes the packaging of Python within the
@@ -288,15 +288,12 @@
one of the following:
<example>
XS-Python-Version: all
-XS-Python-Version: current
-XS-Python-Version: current, >= X.Y
XS-Python-Version: >= X.Y
XS-Python-Version: >= A.B, << X.Y
XS-Python-Version: A.B, X.Y
</example>
Where "all" means the package supports any Python version
- available, and "current" means it supports Debian's current
- Python version. Explicit Versions or version ranges can also
+ available. Explicit Versions or version ranges can also
be used.
</p>
<p>
@@ -304,11 +301,11 @@
<example>
XB-Python-Version: ${python:Versions}
</example>
- The python:Versions is substituted by the supported Python
+ The python:Versions variable is substituted by the supported Python
versions of the binary package, based on
<tt>XS-Python-Version</tt>. (If you are not using
- <prgn>dh_python</prgn> you will need to handle this
- substitution yourself.) The format of the field
+ <prgn>dh_pysupport</prgn> or <prgn>dh_pycentral</prgn>,
+ you will need to handle this yourself.) The format of the field
<tt>XB-Python-Version</tt> is the same as the
<tt>XS-Python-Version</tt> field for packages not containing
extensions. Packages with extensions must list the versions
@@ -330,9 +327,7 @@
in <ref id="package_names"> must depend on "<package>python
(>= <var>X</var>.<var>Y</var></package>)". If they
require other modules to work, they must depend on the
- corresponding <package>python-foo</package>. They must not
- depend on
- any <package>python<var>X</var>.<var>Y</var>-foo</package>.
+ corresponding <package>python-foo</package>.
</p>
<p>
Packaged modules available for one particular version of Python must
@@ -347,19 +342,27 @@
<sect id="provides">
<heading>Provides</heading>
<p>
- Provides in packages of the form
- <package>python-<var>foo</var></package> must be specified,
- if the package contains an extension for more than one
- python version. Provides should also be added on request of
- maintainers who depend on a non-default python version.
+ Packages of the form <package>python-<var>foo</var></package>, that
+ contain modules or extensions for one or more python versions,
+ should specify a Provides: for all
+ <package>python<var>X</var>.<var>Y</var>-foo</package> corresponding
+ to the python versions they support.
</p>
<p>
- Packaged modules available for one particular version of Python must
- depend on the corresponding
- <package>python<var>X</var>.<var>Y</var></package> package instead.
- If they need other modules, they must depend on the corresponding
- <package>python<var>X</var>.<var>Y</var>-foo</package> packages, and
- must not depend on any <package>python-foo</package>.
+ If they do so and also need other modules, they must depend on all
+ corresponding <package>python<var>X</var>.<var>Y</var>-bar</package>
+ for each version they support, in addition to the
+ <package>python-<var>bar</var></package> dependency. These dependencies
+ should be generated at build time, and should be based on the
+ <tt>Python-Depends</tt> control field:
+ <example>
+Depends: ${python:Depends}
+Python-Depends: python-bar (>= 1.2.3)
+Provides: ${python:Provides}
+ </example>
+ In the binary package, the generated dependencies should include the
+ contents of the <tt>Python-Depends</tt> field, plus all corresponding
+ <package>python<var>X</var>.<var>Y</var>-bar</package>.
</p>
</sect>
@@ -546,9 +549,7 @@
<p>
If you use either <package>python-support</package> or
<package>python-central</package> you must additionally
- Build-Depend on those. If you are using <prgn>dh_python</prgn>
- at all, you must Build-Depend on <package>python</package>, as
- <package>debhelper</package> does not depend on it.
+ Build-Depend on those.
</p>
</appendix>
@@ -567,11 +568,8 @@
<p>
The python-support system provides a simple way to
bytecompile pure Python modules and manage dependencies. It
- integrates with <package>debhelper</package>. When using
- python-support, you should install your modules
- to <file>/usr/share/python-support/<var>package</var></file>
- rather than the standard Python directories. python-support
- will then handle compiling the modules and making
+ integrates with <package>debhelper</package>; python-support
+ will handle compiling the modules and making
appropriate symbolic links for installed Python versions to
find them,
substitute <tt>${python:Depends}</tt>, <tt>${python:Versions}</tt>,
@@ -579,29 +577,26 @@
manage bytecompilation in your postinst/prerm.
</p>
<p>
- To use it, call <prgn>dh_pysupport</prgn>
- before <prgn>dh_python</prgn>, and make sure you've
- installed the modules in the right place:
+ To use it, call <prgn>dh_pysupport</prgn> in the binary target:
<example>
-PREFIX := debian/python-package/usr
...
install:
...
- ./setup.py install --no-compile \
- --install-lib=$(PREFIX)/share/python-support/python-package
+ ./setup.py install --no-compile
binary-indep: build install
...
dh_pysupport
- dh_python
...
</example>
</p>
<p>
python-support can also manage private modules. To use this
feature, pass a list of directories to be managed by
- python-support to <prgn>dh_pysupport</prgn>
- and <prgn>dh_python</prgn>. python-support cannot handle
- compiled extensions.
+ python-support to <prgn>dh_pysupport</prgn>.
+ </p>
+ <p>
+ The complete python-support documentation is available in
+ /usr/share/doc/python-support/README.gz.
</p>
</sect>
@@ -616,8 +611,7 @@
python-support does.
</p>
<p>
- To use it, call <prgn>dh_pycentral</prgn>
- before <prgn>dh_python</prgn>:
+ To use it, call <prgn>dh_pycentral</prgn> in the binary target:
<example>
install:
...
@@ -626,7 +620,6 @@
binary-indep: build install
...
dh_pycentral
- dh_python
...
</example>
</p>
@@ -634,8 +627,7 @@
python-central can handle compiled extensions for multiple
Python versions. If you want python-central to handle
private modules, you must pass the list of directories
- containing them to <prgn>dh_python</prgn> (but
- not <prgn>dh_pycentral</prgn>).
+ containing them to <prgn>dh_pycentral</prgn>.
</p>
<p>
If python-central should not move the files to its private
Attachment:
signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=