--- python-policy.sgml~	2006-06-12 21:38:22.000000000 +0200
+++ python-policy.sgml	2006-06-13 01:11:20.224586464 +0200
@@ -94,6 +94,11 @@
 	  <package>python<var>X</var>.<var>Y</var></package>.
 	</p>
 
+	<p>
+	  The set of currently supported python versions can be found
+	  in <file>/usr/share/python/debian_defaults</var></file>.
+	</p>
+
       </sect>
 
       <sect id="base">
@@ -227,8 +232,17 @@
 	  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 libpython library, and so can only be
-	  used by one version of Python.
+	  specific version of the libpython library, and so can only
+	  be used by one version of Python.
+	</p>
+	<p>
+          Python packages are directories containing at least a
+          <file>__init__.py</file>, 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, IDE's.
 	</p>
 	<p>
 	  There are two ways to distribute Python modules. Public
@@ -292,9 +306,13 @@
 	  </example>
 	  The python:Versions 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.)
+	  <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
+	  <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
+	  explicitely.
 	</p>
 	<p>
 	  If your package is used by another module or application
@@ -326,6 +344,25 @@
 	</p>
       </sect>
 
+      <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.
+	</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>.
+	</p>
+      </sect>
+
       <sect id="bytecompilation">
         <heading>Modules Bytecompilation</heading>
 	<p>
@@ -334,7 +371,23 @@
 	  modules (<file>foo.pyc</file> files) and optimized modules
 	  (<file>foo.pyo</file> files) must not ship in the
 	  package. Instead, they should be generated in the package's
-	  postinst, and removed in the package's prerm.
+	  postinst, and removed in the package's prerm. The package's
+	  prerm has to make sure that both <file>foo.pyc</file> and
+	  <file>foo.pyo</file> are removed.
+	</p>
+	<p>
+          A package should only byte-compile the files which belong to
+          the package.
+	</p>
+	<p>
+          The file <file>/etc/python/debian_config</file> allows
+          configuration how modules should be byte-compiled. The
+          postinst scripts should respect these settings.
+	</p>
+	<p>
+          Modules in private installation directories and in
+          <file>/usr/lib/site-python</file> should be byte-compiled,
+          when the default python version changes.
 	</p>
       </sect>
     </chapt>
@@ -473,8 +526,7 @@
 	Some applications and pure Python modules may be able to
 	depend only on <package>python</package>
 	or <package>python-all</package> and not require the -dev
-	packages. However, note that using distutils (a.k.a. setup.py)
-	requires the -dev packages.
+	packages.
       </p>
 
       <p>
@@ -493,9 +545,9 @@
       </p>
       <p>
 	If you use either <package>python-support</package> or
-	<package>python-central</package> you should Build-Depend on
-	those. If you are using <prgn>dh_python</prgn> at all, you
-	must Build-Depend on <package>python</package>, as
+	<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.
       </p>
     </appendix>
@@ -585,6 +637,16 @@
 	  containing them to <prgn>dh_python</prgn> (but
 	  not <prgn>dh_pycentral</prgn>).
 	</p>
+	<p>
+          If python-central should not move the files to its private
+          directory, use<prgn>DH_PYCENTRAL=nomove dh_pycentral</prgn>
+          instead.
+	</p>
+	<p>
+          Examples for source packages using python-central are
+          pyenchant, python-imaging (modules and extensions),
+          pyparallel (modules only).
+	</p>
       </sect>
 
       <sect id="cdbs">
