From 4436f5d1c46635ddadb16c05b8f489a527e2fdbf Mon Sep 17 00:00:00 2001 From: Scott Kitterman <scott@kitterman.com> Date: Wed, 27 Jul 2011 10:39:52 -0400 Subject: [PATCH] [ Scott Kitterman ] * Drop python2 symlink pending further discussion * Update recent Python policy changes based on feedback from Debian Python --- debian/changelog | 6 ++++- debian/python-policy.sgml | 49 +++++++++++++++++++++------------------ debian/rules | 3 --- 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9df4190..ed66a85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,11 @@ python-defaults (2.7.2-4) UNRELEASED; urgency=low - no longer moves .so.foo files to pyshared dir (closes: 635316) - replaces .so symlinks with .so.foo files in dist-packages - -- Piotr Ożarowski <piotr@debian.org> Tue, 26 Jul 2011 19:58:48 +0200 + [ Scott Kitterman ] + * Drop python2 symlink pending further discussion + * Update recent Python policy changes based on feedback from Debian Python + + -- Scott Kitterman <scott@kitterman.com> Wed, 27 Jul 2011 10:15:38 -0400 python-defaults (2.7.2-3) experimental; urgency=low diff --git a/debian/python-policy.sgml b/debian/python-policy.sgml index 5395ef6..d3b26e1 100644 --- a/debian/python-policy.sgml +++ b/debian/python-policy.sgml @@ -32,7 +32,7 @@ <name>Scott Kitterman</name> <email>scott@kitterman.com</email> </author> - <version>version 0.9.4.0</version> + <version>version 0.9.4.1</version> <abstract> This document describes the packaging of Python within the @@ -371,9 +371,12 @@ <p> 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. These policies encourage - automated dependency generation and loose version bounds whenever - possible. + 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. <sect> <heading>Types of Python Modules</heading> <p> @@ -390,9 +393,11 @@ linked to libpython. </p> <p> - Python packages are either files or directories containing at least - a <file>__init__.py</file>, other modules, extensions and - packages (A package in the Python sense is unrelated to a + Python packages are a way of structuring Python’s module namespace + by using “dotted module namesâ€. See + <url id="http://docs.python.org/tutorial/modules.html#packages" + name="Python's documentation"> for details on how packages are + defined in Python terms (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 @@ -728,17 +733,6 @@ Build-Depends: python3-all-dev (>= 3.1) versa). This appendix is just an overview. If you use these tools, you should read their full documentation. </p> - <sect id="dh_python2_3"> - <heading>dh_python2 and dh_python3</heading> - <p> - dh_python2 and dh_python3 are <package>debhelper</package> 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. - </p> <sect id="distutils"> <heading>distutils</heading> <p> @@ -778,10 +772,10 @@ Build-Depends: python3-all-dev (>= 3.1) </p> </sect> - <sect id="pysupport"> + <sect id="pysupport (deprecated)"> <heading>python-support</heading> <p> - python-support is deprecated. It was system intended to provide + python-support is deprecated. It is a system intended to provide a simple way to byte-compile pure Python modules and manage dependencies. It integrates with <package>debhelper</package>, manages byte-compilation, private modules, will properly use the @@ -795,10 +789,10 @@ Build-Depends: python3-all-dev (>= 3.1) </p> </sect> - <sect id="pycentral"> + <sect id="pycentral (deprecated)"> <heading>python-central</heading> <p> - python-central is deprecated. It provided another way to manage + python-central is deprecated. It provides another way to manage Python modules. It integrates with <package>debhelper</package>, manages byte-compilation, private modules, will properly use the /usr/share/pyshared directory, integrates with runtime update @@ -818,6 +812,17 @@ Build-Depends: python3-all-dev (>= 3.1) based Python packages. </p> </sect> + <sect id="dh_python2_3"> + <heading>dh_python2 and dh_python3</heading> + <p> + dh_python2 and dh_python3 are <package>debhelper</package> 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. + </p> </appendix> diff --git a/debian/rules b/debian/rules index 6c23972..0307e91 100755 --- a/debian/rules +++ b/debian/rules @@ -166,12 +166,9 @@ binary-indep: build install stamp-doc : # provide the python and python.1 defaults mkdir -p debian/python-minimal/usr/bin ln -sf python$(VER) debian/python-minimal/usr/bin/python - ln -sf python$(VER) debian/python-minimal/usr/bin/python2 mkdir -p debian/python-minimal/usr/share/man/man1 ln -sf python$(VER).1.gz \ debian/python-minimal/usr/share/man/man1/python.1.gz - ln -sf python$(VER).1.gz \ - debian/python-minimal/usr/share/man/man1/python2.1.gz : # mkdir -p debian/python-minimal/usr/share/python -- GitLab