diff -Nru python3-defaults-3.6.5/.bzrignore python3-defaults-3.6.7/.bzrignore --- python3-defaults-3.6.5/.bzrignore 2017-12-13 22:32:59.000000000 +0000 +++ python3-defaults-3.6.7/.bzrignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -debian/*.debhelper* -debian/*.substvars -debian/files -debian/python3-minimal.postinst -debian/python3.postinst -debian/python3.postrm -debian/python3.preinst - -debian/2to3 -debian/idle -debian/idle3 -debian/libpython3-all-dbg -debian/libpython3-all-dev -debian/libpython3-dbg -debian/libpython3-dev -debian/libpython3-stdlib -debian/python3 -debian/python3-all -debian/python3-all-dbg -debian/python3-all-dev -debian/python3-dbg -debian/python3-dev -debian/python3-doc -debian/python3-examples -debian/python3-minimal -debian/python3-venv - -py3clean.1 -py3compile.1 -stamp-* diff -Nru python3-defaults-3.6.5/debian/changelog python3-defaults-3.6.7/debian/changelog --- python3-defaults-3.6.5/debian/changelog 2018-06-21 21:52:37.000000000 +0000 +++ python3-defaults-3.6.7/debian/changelog 2018-10-25 11:11:00.000000000 +0000 @@ -1,3 +1,31 @@ +python3-defaults (3.6.7-1~18.04) bionic-proposed; urgency=medium + + * SRU: LP: #1799206. + * Drop python3.7 as a supported python3 version for the bionic SRU. + + -- Matthias Klose Thu, 25 Oct 2018 13:11:00 +0200 + +python3-defaults (3.6.7-1) unstable; urgency=high + + * Really ship the policy in the python3 package, and update from the last + version found in the python package. Closes: #910113. + * Bump version to 3.6.7. + + -- Matthias Klose Sun, 21 Oct 2018 11:21:31 +0200 + +python3-defaults (3.6.6-1) unstable; urgency=medium + + [ Matthias Klose ] + * Fix the idle desktop file. Closes: #901096. + * Install the policy files in the python3 package. Closes: #901486. + * python3-minimal: Pre-Depend on python3.6-minimal. Closes: #901001. + * Bump version to 3.6.6. + + [ Scott Kitterman ] + * Remove myself from uploaders + + -- Matthias Klose Wed, 27 Jun 2018 18:18:20 +0200 + python3-defaults (3.6.5-3ubuntu1) bionic; urgency=medium * Switch python3.x-minimal to a pre-dependency for python3-minimal so that @@ -5,6 +33,19 @@ -- Brian Murray Thu, 21 Jun 2018 14:52:37 -0700 +python3-defaults (3.6.5-5) experimental; urgency=medium + + * Fix typo in the defaults file. Closes: #900937, #900949. + + -- Matthias Klose Thu, 07 Jun 2018 17:57:53 +0200 + +python3-defaults (3.6.5-4) experimental; urgency=medium + + * Update Vcs attributes. + * Add Python 3.7 to the list of supported Python3 versions. + + -- Matthias Klose Wed, 06 Jun 2018 18:26:50 +0200 + python3-defaults (3.6.5-3) unstable; urgency=medium * Update valgrind support file. LP: #1513364. diff -Nru python3-defaults-3.6.5/debian/control python3-defaults-3.6.7/debian/control --- python3-defaults-3.6.5/debian/control 2018-06-21 21:52:37.000000000 +0000 +++ python3-defaults-3.6.7/debian/control 2018-10-24 17:29:21.000000000 +0000 @@ -3,8 +3,8 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Matthias Klose -Uploaders: Piotr Ożarowski , Scott Kitterman -Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.17.11), python3.6, +Uploaders: Piotr Ożarowski +Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.17.11), python3.6 (>= 3.6.7-1~), lsb-release, python3-minimal:any, python3-docutils, @@ -12,17 +12,17 @@ docbook-xsl, w3m, xsltproc, -Standards-Version: 4.1.4 -Homepage: http://www.python.org/ -Vcs-Bzr: http://alioth.debian.org/anonscm/bzr/pkg-python/python3-defaults-debian -Vcs-Browser: http://alioth.debian.org/scm/loggerhead/pkg-python/python3-defaults-debian/files +Standards-Version: 4.2.1 +Homepage: https://www.python.org/ +Vcs-Git: https://salsa.debian.org/cpython-team/python3-defaults.git +Vcs-Browser: https://salsa.debian.org/cpython-team/python3-defaults Package: python3 Architecture: any Multi-Arch: allowed Pre-Depends: python3-minimal (= ${binary:Version}) -Depends: python3.6 (>= 3.6.5-2~), libpython3-stdlib (= ${binary:Version}), ${misc:Depends} -Suggests: python3-doc (>= ${binary:Version}), python3-tk (>= 3.6.5-2~) , python3-venv (>= ${binary:Version}) +Depends: python3.6 (>= 3.6.7-1~), libpython3-stdlib (= ${binary:Version}), ${misc:Depends} +Suggests: python3-doc (>= ${binary:Version}), python3-tk (>= 3.6.7-1~) , python3-venv (>= ${binary:Version}) Replaces: python3-minimal (<< 3.1.2-2) Provides: python3-profiler Description: interactive high-level object-oriented language (default python3 version) @@ -38,8 +38,8 @@ Package: python3-venv Architecture: any Multi-Arch: allowed -Depends: python3.6-venv (>= 3.6.5-2~), python3 (= ${binary:Version}), - python3-distutils (>= 3.6.5-2~), ${misc:Depends} +Depends: python3.6-venv (>= 3.6.7-1~), python3 (= ${binary:Version}), + python3-distutils (>= 3.6.7-1~), ${misc:Depends} Description: pyvenv-3 binary for python3 (default python3 version) Python, the high-level, interactive object oriented language, includes an extensive class library with lots of goodies for @@ -51,7 +51,7 @@ Package: python3-minimal Architecture: any Multi-Arch: allowed -Pre-Depends: python3.6-minimal (>= 3.6.5-2~) +Pre-Depends: python3.6-minimal (>= 3.6.7-1~) Depends: dpkg (>= 1.13.20), ${misc:Depends} Description: minimal subset of the Python language (default python3 version) This package contains the interpreter and some essential modules. It's used @@ -63,7 +63,7 @@ Package: python3-examples Architecture: all Multi-Arch: foreign -Depends: python3 (>= ${binary:Version}), python3.6-examples (>= 3.6.5-2~), ${misc:Depends} +Depends: python3 (>= ${binary:Version}), python3.6-examples (>= 3.6.7-1~), ${misc:Depends} Description: examples for the Python language (default version) Examples, Demos and Tools for Python. These are files included in the upstream Python distribution. @@ -75,7 +75,7 @@ Architecture: any Multi-Arch: allowed Depends: python3 (= ${binary:Version}), libpython3-dev (= ${binary:Version}), - python3.6-dev (>= 3.6.5-2~), python3-distutils (>= 3.6.5-2~), + python3.6-dev (>= 3.6.7-1~), python3-distutils (>= 3.6.7-1~), ${misc:Depends}, dh-python Replaces: python3.1 (<< 3.1.2+20100706-3) Description: header files and a static library for Python (default) @@ -90,7 +90,7 @@ Architecture: any Multi-Arch: same Section: libdevel -Depends: libpython3.6-dev (>= 3.6.5-2~), ${misc:Depends} +Depends: libpython3.6-dev (>= 3.6.7-1~), ${misc:Depends} Description: header files and a static library for Python (default) Header files, a static library and development tools for building Python modules, extending the Python interpreter or embedding Python @@ -102,7 +102,7 @@ Package: libpython3-stdlib Architecture: any Multi-Arch: same -Depends: libpython3.6-stdlib (>= 3.6.5-2~), ${misc:Depends} +Depends: libpython3.6-stdlib (>= 3.6.7-1~), ${misc:Depends} Description: interactive high-level object-oriented language (default python3 version) Python, the high-level, interactive object oriented language, includes an extensive class library with lots of goodies for @@ -137,7 +137,7 @@ Section: doc Architecture: all Multi-Arch: foreign -Depends: python3.6-doc (>= 3.6.5-2~), ${misc:Depends} +Depends: python3.6-doc (>= 3.6.7-1~), ${misc:Depends} Suggests: python3 (>= ${binary:Version}), python3-examples Description: documentation for the high-level object-oriented language Python 3 This is the official set of documentation for the interactive high-level @@ -161,7 +161,7 @@ Architecture: any Multi-Arch: allowed Section: debug -Depends: python3 (= ${binary:Version}), libpython3-dbg (= ${binary:Version}), python3.6-dbg (>= 3.6.5-2~), ${misc:Depends} +Depends: python3 (= ${binary:Version}), libpython3-dbg (= ${binary:Version}), python3.6-dbg (>= 3.6.7-1~), ${misc:Depends} Description: debug build of the Python 3 Interpreter (version 3.6) Python 3 interpreter configured with --pydebug. Dynamically loaded modules are searched in /usr/lib/python3.6/lib-dynload/debug first. @@ -170,7 +170,7 @@ Architecture: any Multi-Arch: same Section: debug -Depends: libpython3.6-dbg (>= 3.6.5-2~), ${misc:Depends} +Depends: libpython3.6-dbg (>= 3.6.7-1~), ${misc:Depends} Description: debug build of the Python 3 Interpreter (version 3.6) Python 3 interpreter configured with --pydebug. Dynamically loaded modules are searched in /usr/lib/python3.6/lib-dynload/debug first. @@ -178,9 +178,11 @@ Package: python3-all Architecture: any Multi-Arch: allowed -Depends: python3 (= ${binary:Version}), ${misc:Depends}, - dh-python, python3-distutils (>= 3.6.5-2~), - python3.6 +Depends: python3 (= ${binary:Version}), + ${misc:Depends}, + dh-python, + python3-distutils (>= 3.6.7-1~), + python3.6, Description: package depending on all supported Python 3 runtime versions The package currently depends on python3.6, in the future, dependencies on jython (Python for a JVM) and ironpython (Python for Mono) @@ -192,8 +194,12 @@ Package: python3-all-dev Architecture: any Multi-Arch: allowed -Depends: python3 (= ${binary:Version}), libpython3-all-dev (= ${binary:Version}), python3-all (= ${binary:Version}), python3-dev (= ${binary:Version}), ${misc:Depends}, - python3.6-dev +Depends: python3 (= ${binary:Version}), + libpython3-all-dev (= ${binary:Version}), + python3-all (= ${binary:Version}), + python3-dev (= ${binary:Version}), + ${misc:Depends}, + python3.6-dev, Description: package depending on all supported Python 3 development packages The package currently depends on python3.6-dev, in the future, dependencies on jython (Python for a JVM) and ironpython (Python @@ -207,8 +213,12 @@ Architecture: any Multi-Arch: allowed Section: debug -Depends: python3 (= ${binary:Version}), libpython3-all-dbg (= ${binary:Version}), python3-all (= ${binary:Version}), python3-dbg (= ${binary:Version}), ${misc:Depends}, - python3.6-dbg +Depends: python3 (= ${binary:Version}), + libpython3-all-dbg (= ${binary:Version}), + python3-all (= ${binary:Version}), + python3-dbg (= ${binary:Version}), + ${misc:Depends}, + python3.6-dbg, Description: package depending on all supported Python 3 debugging packages The package currently depends on python3.6-dbg, in the future, dependencies on jython (Python for a JVM) and ironpython (Python @@ -221,8 +231,9 @@ Architecture: any Multi-Arch: same Section: libdevel -Depends: libpython3-dev (= ${binary:Version}), ${misc:Depends}, - libpython3.6-dev +Depends: libpython3-dev (= ${binary:Version}), + ${misc:Depends}, + libpython3.6-dev, Description: package depending on all supported Python 3 development packages The package currently depends on libpython3.6-dev, in the future, dependencies on jython (Python for a JVM) and ironpython (Python @@ -236,7 +247,8 @@ Architecture: any Multi-Arch: same Section: debug -Depends: libpython3-dbg (= ${binary:Version}), ${misc:Depends}, +Depends: libpython3-dbg (= ${binary:Version}), + ${misc:Depends}, libpython3.6-dbg Description: package depending on all supported Python 3 debugging packages The package currently depends on libpython3.6-dbg, in the @@ -249,7 +261,7 @@ Package: 2to3 Architecture: all Multi-Arch: foreign -Depends: python3-lib2to3 (>= 3.6.5-2~), python3 (>= ${binary:Version}), ${misc:Depends} +Depends: python3-lib2to3 (>= 3.6.7-1~), python3 (>= ${binary:Version}), ${misc:Depends} Breaks: python (<< 2.7.14-4) Replaces: python (<< 2.7.14-4) Description: 2to3 binary using python3 diff -Nru python3-defaults-3.6.5/debian/control.in python3-defaults-3.6.7/debian/control.in --- python3-defaults-3.6.5/debian/control.in 2018-06-21 21:52:09.000000000 +0000 +++ python3-defaults-3.6.7/debian/control.in 2018-10-24 17:25:48.000000000 +0000 @@ -1,8 +1,9 @@ Source: python3-defaults Section: python Priority: optional -Maintainer: Matthias Klose -Uploaders: Piotr Ożarowski , Scott Kitterman +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Matthias Klose +Uploaders: Piotr Ożarowski Build-Depends: debhelper (>= 9), @bd_i586@ lsb-release, python3-minimal:any, @@ -11,10 +12,10 @@ docbook-xsl, w3m, xsltproc, -Standards-Version: 4.1.4 -Homepage: http://www.python.org/ -Vcs-Bzr: http://alioth.debian.org/anonscm/bzr/pkg-python/python3-defaults-debian -Vcs-Browser: http://alioth.debian.org/scm/loggerhead/pkg-python/python3-defaults-debian/files +Standards-Version: 4.2.1 +Homepage: https://www.python.org/ +Vcs-Git: https://salsa.debian.org/cpython-team/python3-defaults.git +Vcs-Browser: https://salsa.debian.org/cpython-team/python3-defaults Package: python3 Architecture: any @@ -177,9 +178,11 @@ Package: python3-all Architecture: any Multi-Arch: allowed -Depends: python3 (= ${binary:Version}), ${misc:Depends}, - dh-python, python3-distutils (>= @STDLIBVER@), - python3.6 +Depends: python3 (= ${binary:Version}), + ${misc:Depends}, + dh-python, + python3-distutils (>= @STDLIBVER@), + python3.6, Description: package depending on all supported Python 3 runtime versions The package currently depends on python3.6, in the future, dependencies on jython (Python for a JVM) and ironpython (Python for Mono) @@ -191,8 +194,12 @@ Package: python3-all-dev Architecture: any Multi-Arch: allowed -Depends: python3 (= ${binary:Version}), libpython3-all-dev (= ${binary:Version}), python3-all (= ${binary:Version}), python3-dev (= ${binary:Version}), ${misc:Depends}, - python3.6-dev +Depends: python3 (= ${binary:Version}), + libpython3-all-dev (= ${binary:Version}), + python3-all (= ${binary:Version}), + python3-dev (= ${binary:Version}), + ${misc:Depends}, + python3.6-dev, Description: package depending on all supported Python 3 development packages The package currently depends on python3.6-dev, in the future, dependencies on jython (Python for a JVM) and ironpython (Python @@ -206,8 +213,12 @@ Architecture: any Multi-Arch: allowed Section: debug -Depends: python3 (= ${binary:Version}), libpython3-all-dbg (= ${binary:Version}), python3-all (= ${binary:Version}), python3-dbg (= ${binary:Version}), ${misc:Depends}, - python3.6-dbg +Depends: python3 (= ${binary:Version}), + libpython3-all-dbg (= ${binary:Version}), + python3-all (= ${binary:Version}), + python3-dbg (= ${binary:Version}), + ${misc:Depends}, + python3.6-dbg, Description: package depending on all supported Python 3 debugging packages The package currently depends on python3.6-dbg, in the future, dependencies on jython (Python for a JVM) and ironpython (Python @@ -220,8 +231,9 @@ Architecture: any Multi-Arch: same Section: libdevel -Depends: libpython3-dev (= ${binary:Version}), ${misc:Depends}, - libpython3.6-dev +Depends: libpython3-dev (= ${binary:Version}), + ${misc:Depends}, + libpython3.6-dev, Description: package depending on all supported Python 3 development packages The package currently depends on libpython3.6-dev, in the future, dependencies on jython (Python for a JVM) and ironpython (Python @@ -235,7 +247,8 @@ Architecture: any Multi-Arch: same Section: debug -Depends: libpython3-dbg (= ${binary:Version}), ${misc:Depends}, +Depends: libpython3-dbg (= ${binary:Version}), + ${misc:Depends}, libpython3.6-dbg Description: package depending on all supported Python 3 debugging packages The package currently depends on libpython3.6-dbg, in the diff -Nru python3-defaults-3.6.5/debian/idle.desktop python3-defaults-3.6.7/debian/idle.desktop --- python3-defaults-3.6.5/debian/idle.desktop 2017-10-10 08:39:45.000000000 +0000 +++ python3-defaults-3.6.7/debian/idle.desktop 2018-06-08 22:16:26.000000000 +0000 @@ -1,9 +1,9 @@ [Desktop Entry] -Name=IDLE 3 +Name=IDLE Comment=Integrated DeveLopment Environment for Python3 -Exec=/usr/bin/idle %U +Exec=/usr/bin/idle %F TryExec=/usr/bin/idle -Icon=/usr/share/pixmaps/idle3.xpm +Icon=/usr/share/pixmaps/idle.xpm Terminal=false Type=Application Categories=Application;Development; diff -Nru python3-defaults-3.6.5/debian/python-policy.dbk python3-defaults-3.6.7/debian/python-policy.dbk --- python3-defaults-3.6.5/debian/python-policy.dbk 2017-09-01 06:38:08.000000000 +0000 +++ python3-defaults-3.6.7/debian/python-policy.dbk 2017-09-01 06:27:31.000000000 +0000 @@ -16,14 +16,30 @@ flight@debian.org - Josselin Mouette + Josselin Mouette joss@debian.org - Joe Wreschnig + Joe Wreschnig piman@debian.org - version 0.4.1.0 + + Loïc Minier + lool@debian.org + + + Scott Kitterman + scott@kitterman.com + + + Barry Warsaw + barry@debian.org + + + Ben Finney + ben+debian@benfinney.id.au + + version 0.10.1.1 This document describes the packaging of Python within the @@ -31,8 +47,7 @@ packaged Python programs and modules. - 1999 2001 2003 2006 Software in the - Public Interest + 1999 2016Software in the Public Interest This manual is free software; you can redistribute it and/or @@ -47,159 +62,421 @@ the GNU General Public License for more details. - A copy of the GNU General Public License is available as - /usr/share/common-licences/GPL in the Debian GNU/Linux - distribution or on the World Wide Web at - The GNU Public Licence. + A copy of the GNU General Public License version 2 is available as + /usr/share/common-licences/GPL-2 in the Debian + GNU/Linux system, or on the World Wide Web at + GNU General Public License, version 2. You can also obtain it by writing to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. - + + On the move to Python 3 + + Debian currently supports two Python stacks, one for Python 3 + and one for Python 2. The long term goal for Debian is to + reduce this to one stack, dropping the Python 2 stack at some + time. + + + PEP 404 states that no more major Python 2 releases + are planned, although the latest released minor version 2.7 + will see some extended support, documented in + PEP 466. + + + Packages in Debian should use Python 3 if Python 3 is + supported. New packages should use Python 3 from the initial + upload, new upstream versions for existing packages should + use Python 3 if the new upstream version supports it. + + + + + + Programs should use Python 3, and should not be packaged + for Python 2 as well. Python 3 should be used for the + packaging if the packaging scripts use Python. + + + + + Python libraries, if they support Python 3, should be always + packaged for Python 3. If an application supports only Python + 2, the Python libraries for that application should also be + packaged for Python 2. + + + + + Existing Python 2 libraries should not be dropped before + the last reverse dependency is removed. + + + + + + + Python Packaging
Versions - At any given time, the package python will - represent the current default Debian Python version. + At any given time, the binary package python3 + will represent the current default Debian Python 3 version; the + binary package python will represent the + current default Debian Python 2 version. As far as is reasonable, + Python 3 and Python 2 should be treated as separate runtime + systems with minimal interdependencies. + + + In some cases, Python policy explicitly references Python helper + tools. For Debian Stretch, the dh-python + package provides the only such tools; earlier helpers have been + removed from Debian. + + + It is a design goal to fully specify required interfaces and + functions in policy for Python 3 and to avoid enshrining specific + implementation details in policy. Except as noted, policy for + Python 2 is the same as Python 3 with the exception of the + different major version number as needed to distinguish them. - The default Debian Python version should alway be the latest stable - upstream release that can be integrated in the distribution. + The default Debian Python version, for each of Python 3 and Python + 2, should always be the latest stable upstream version that can be + fully integrated in Debian. - Apart from the default version, legacy versions of Python - or beta versions of future releases - may be included as well in the distribution, as long as they - are needed by other packages, or as long as it seems - reasonable to provide them. (Note: For the scope of this - document, Python versions are synonymous to feature - releases, i.e. Python 2.0 and 2.0.1 are subminor versions of - the same Python version 2.0, but Python 2.1 and 2.2 are - indeed different versions.) + There may be newer supported or unsupported versions included in + Debian if they are not fully integrated for a particular release. - For any version, the main package must be called + Apart from the default version, legacy versions of Python or beta + releases of future upstream versions may be included as well in + Debian, as long as they are needed by other packages, or as long + as it seems reasonable to provide them. + + + Note: For the scope of this document, a Python version is + synonymous with all micro versions within that minor version. e.g. + Python 3.5.0 and 3.5.1 are micro versions of the same Python + version 3.5, but Python 3.4 and 3.5 are indeed different versions. + + + For any version, the main binary package must be called pythonX.Y. - The set of currently supported python versions can be found - in /usr/share/python/debian_defaults. + The set of currently supported Python 3 versions can be found + in /usr/share/python3/debian_defaults; the supported + interface to this information is + through /usr/bin/py3versions. + The set of currently supported Python 2 versions can be found in + /usr/share/python/debian_defaults; the supported + interface to this information is /usr/bin/pyversions. + + + These files are in Python configparser format. They + define (in the DEFAULT section) the following options: + + default-version: The name of the interpreter for + the current default Debian Python. + supported-versions: The set of interpreter names + currently supported and for which modules should be built and + byte-compiled. This includes default-version. + old-versions: The set of interpreter names which + might still be on the system but for which modules should not + be built. + unsupported-versions: The set of interpreter + names which should not be supported at all, that is modules + should not be built or byte-compiled for these. This includes + (is a superset of) old-versions. + + + + Newer versions might also appear in unsupported-versions + before being moved to supported-versions.
- Main package + Main packages - For every Python version provided in the distribution, the - package pythonX.Y - shall comprise a complete distribution for - deployment of Python scripts and applications. The - package includes the binary - /usr/bin/pythonX.Y and - all modules of the upstream Python distribution. - - - Excluded are any modules that depend on - non-required packages, they will be provided in - separate packages. Some tools and files for the - development of Python modules are split off in a - separate package + For every Python version provided in Debian, the binary + package pythonX.Y shall + provide a complete distribution for deployment of Python + scripts and applications. The package must ensure that the binary + /usr/bin/pythonX.Y is provided. + + + Installation of pythonX.Y + shall provide the modules of the upstream Python distribution with + some exceptions. + + + Excluded are modules that cannot be included for licensing reasons + (for example the profile module), for dependency tracking + purposes (for example the GPL-licensed gdbm module), or + that should not be included for packaging reasons (for example + the tk module which depends on Xorg). + + + Some tools and files for the development of Python + modules are split off in a separate binary package pythonX.Y-dev. + + Documentation will be provided separately as well. - At any time, the python package must contain - a symlink /usr/bin/python to the the appropriate binary - /usr/bin/pythonX.Y. The - python package must also depend on the - appropriate pythonX.Y - to ensure this binary is installed. The version of the - python package must be greater than or equal to - X.Y and smaller than X.Y+1. + At any time, the python3 binary package must + ensure that /usr/bin/python3 is provided, as a + symlink to the current python3.Y + executable. The package must depend on + the python3.Y package that installs + the executable. + + + The version of the python3 package must be + greater than or equal to 3.Y and lower than + 3.Y+1. + + + At any time, the python binary package must + ensure that /usr/bin/python2 is provided, as a + symlink to the current python2.Y + executable. The package must depend on + the python2.Y package that installs + the executable. + + + The version of the python package must be + greater than or equal to 2.Y and lower than + 2.Y+1. + + + The python binary package must also ensure + that /usr/bin/python is provided, as a symlink to the + current python2.Y executable. See + PEP 394 for details. + +
+ +
+ Minimal packages + + For every Python version provided in Debian, the binary package + pythonX.Y-minimal might + exist and should not be depended upon by other packages except the + Python runtime packages themselves.
- Python Interpreter -
- Interpreter Name - - Python scripts depending on the default Python version (see ) or not depending on a specific Python version should - use python (unversioned) as the interpreter name. - - - Python scripts that only work with a specific Python version must - explicitly use the versioned interpreter name + Python Interpreter +
+ Interpreter Name + + The different Python major versions require different + interpreters (see ). + + + Python scripts that require the default Python 3 version should + specify python3 as the interpreter name. + + + Python scripts that require the default Python 2 version should + specify python2 as the interpreter name. + + + Python scripts may specify python as the + interpreter name only if they do not require any particular + version of Python. (Note: this means any python2 version) + + + Python scripts that only work with a specific Python minor + version must explicitly use the versioned interpreter name (pythonX.Y). - -
-
- Interpreter Location - - The preferred specification for the Python interpreter is - /usr/bin/python or - /usr/bin/pythonX.Y. - This ensures that a Debian installation of python is used - and all dependencies on additional python modules are met. - - - If a maintainer would like to provide the user with the - possibility to override the Debian Python interpreter, he - may want to use /usr/bin/env python or - /usr/bin/env pythonX.Y. - However this is not advisable as it bypasses Debian's dependency - checking and makes the package vulnerable to incomplete local - installations of python. -
+
+
+ Interpreter Location + + Python scripts should specify the Debian Python interpreter, to + ensure that the Debian Python installation is used and all + dependencies on additional Python modules are met. + + + The preferred specification for the Python 3 interpreter is + /usr/bin/python3 (or + /usr/bin/python3.Y if it requires Python + 3.Y). + + + The preferred specification for the Python 2 interpreter is + /usr/bin/python2 (or + /usr/bin/python2.Y if it requires Python + 2.Y). + + + Scripts requiring the default Python 2 version may instead + specify the interpreter /usr/bin/python. + + + Maintainers should not override the Debian Python interpreter + using /usr/bin/env name. This is not + advisable as it bypasses Debian's dependency checking and makes + the package vulnerable to incomplete local installations of + Python. + +
Module Path - The module search path for Debian has been amended to - include a directory tree in /usr/local at the beginning of - the path. By default, sys.path is searched in the following - order: - -/usr/lib/pythonXY.zip -/usr/lib/pythonX.Y -/usr/lib/pythonX.Y/plat-linux2 -/usr/lib/pythonX.Y/lib-tk -/usr/lib/pythonX.Y/lib-dynload -/usr/local/lib/pythonX.Y/site-packages -/usr/lib/pythonX.Y/site-packages -/var/lib/python-support/pythonX.Y -/usr/lib/pythonX.Y/site-packages/module-dir -/usr/lib/site-python - + By default, Python modules are searched in the directories listed + in the PYTHONPATH environment variable and in + the sys.path Python variable. For all supported Debian + releases, sys.path does not include + a /usr/lib/pythonXY.zip entry. + + + Directories with private Python modules must be absent from the + sys.path. + + + Public Python 3 modules must be installed in the system Python 3 + modules directory, /usr/lib/python3/dist-packages. + + + Public Python 2 modules must be installed in the system Python 2 + modules directory + /usr/lib/python2.Y/dist-packages, where + 2.Y is the Python 2 version. + + + A special directory is dedicated to public Python modules + installed by the local administrator, + /usr/lib/python3/dist-packages for all Python 3 versions, + /usr/local/lib/python2.Y/dist-packages for + Python 2. + + + For local installation of Python modules by the system + administrator, special directories are reserved. The + directory /usr/local/lib/python3/site-packages is in + the Python 3 runtime module search path. The + directory /usr/local/lib/python2.Y/site-packages + is in the Python 2.Y runtime module search path. + + + Additional information on appending site-specific paths to the + module search path is available in the official documentation of + the site module. + + + Python modules which work with multiple supported Python 2 + versions must install to version-specific locations, for instance + /usr/lib/python2.6/dist-packages/foo.py and + /usr/lib/python2.7/dist-packages/foo.py. These should + point to a common file. + + + Architecture-independent public Python 3 modules must be installed + to /usr/lib/python3/dist-packages. + + + Architecture-independent public Python 2 modules should be + installed to /usr/lib/python2.7/dist-packages. The + historical location for this was /usr/share/pyshared. + Since Python 2.7 is the last Python 2 version and the only + supported version in Wheezy and later releases, a version-specific + location is sufficient. + +
+ +
+ Hooks for updates to installed runtimes + + The python binary package has special hooks to + allow other packages to act upon updates to the installed + runtimes. + + + This mechanism is required to handle changes of the default Python + runtime in some packages and to enable the Python packaging + helpers. - The use of the /usr/lib/site-python directory - is deprecated. The directory may be dropped from the path in - a future version. The /usr/lib/pythonXY.zip - archive appeared in python2.3; it is not currently used in - Debian. Modules should not install directly to the - /var/lib/python-support directory; it is for - use by . + There are three supported hook types which come in the form of + scripts which are invoked from the maintainer scripts of the + Python runtime packages when specific installations, + removals, or upgrades occur. + + + + /usr/share/python3/runtime.d/*.rtinstall, + /usr/share/python/runtime.d/*.rtinstall: These + are called when a runtime is installed or becomes supported. + The first argument is rtinstall, the second argument + is the affected runtime (for + example pythonX.Y) and the + third and fourth argument are the old and new version of this + packaged runtime if this runtime was already installed but + unsupported. + + + + + /usr/share/python3/runtime.d/*.rtremove, + /usr/share/python/runtime.d/*.rtremove: These are + called when a runtime is removed or stops being supported. The + first argument is rtremove, and the second argument + is the affected runtime (for + example pythonX.Y). + + + + + /usr/share/python3/runtime.d/*.rtupdate, + /usr/share/python/runtime.d/*.rtupdate: These are + called when the default runtime changes. The first argument is + either pre-rtupdate, called before changing the + default runtime, or rtupdate, called when changing + the default runtime, or post-rtupdate, called + immediately afterwards. The second argument is the old default + runtime (for + example pythonX.Y), and the + third argument is the new default runtime (for example + pythonX.Z). + + +
Documentation - Python documentation is split out in separate packages - pythonX.Y-doc. The package - python-doc will always provide the documentation - for the default Debian Python version. + Python documentation is split out in separate binary packages + pythonX.Y-doc. + + + The binary package python3-doc will always + provide the documentation for the default Debian Python 3 version. + The binary package python-doc will always + provide the documentation for the default Debian Python 2 version. TODO: Policy for documentation of third party packages. @@ -211,177 +488,289 @@ Packaged Modules 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-bytecompiling 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. + 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-compiling bytecode files *.pyc + and *.pyo) or shortly thereafter with automated + rebuilds (to handle C extensions). These policies encourage + automated dependency generation and loose version bounds whenever + possible.
Types of Python Modules 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 source code that generally 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 + specific version of the Python runtime, and so can only be used by one version of Python. - 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. - - - There are two ways to distribute Python modules. Public - modules are installed in one of the directories listed - in . They are accessible to any - program. Private modules are installed in a directory such - as /usr/share/packagename - or /usr/lib/packagename. They are + Debian Python does not link extensions to libpython + (as is done in some operating systems). Symbols are resolved by + /usr/bin/pythonX.Y which is not + linked to libpython. + + + Python packages are a way of structuring Python’s module namespace + by using “dotted module names”. See + Python's glossary 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 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 . + They are accessible to any program. Private modules are installed + in a private directory such + as /usr/share/package-name + or /usr/lib/package-name. They are generally only accessible to a specific program or suite of programs included in the same package.
+
+ Wheels + + PEP 427 + defines a built-package format called "wheels", which is a Zip + format archive containing Python code and + a *.dist-info metadata directory, in a single file + named with the .whl suffix. As Zip files, wheels + containing pure Python can be put on sys.path and modules in the + wheel can be imported directly by Python's import + statement. (Importing extension modules from wheels is not yet + supported as of Python 3.4.) + + + Except as described below, packages must not build or provide + wheels. They are redundant to the established way of providing + Python libraries to Debian users, take no advantage of + distro-based tools, and are less convenient to use. E.g. they must + be explicitly added to sys.path, cannot be easily + grepped, and stack traces through Zip files are more difficult to + debug. + + + A very limited set of wheel packages are available in the archive, + but these support the narrow purpose of enabling + the pip, virtualenv, + and pyvenv tools in a Debian policy compliant way. + These packages build their own dependent wheels through the use of + the dirtbike "rewheeling" tool, which takes installed + Debian packages and turns them back into wheels. Only universal + wheels (i.e. pure-Python, Python 3 and 2 compatible packages) are + supported. Since only the programs that require wheels need build + them, only they may provide -whl packages, + e.g. python3-pip-whl. + + + When these binary packages are installed, *.whl files + must be placed in the /usr/share/python-wheels + directory. The location inside a virtual environment will be + rooted in the virtual environment, instead of /usr. + +
Module Package Names - Public modules should be packaged with a name - of python-foo, - where foo is the name of the module. Such a - package should support the current Debian Python version, - and more if possible (there are several tools to help - implement this, see ). For - example, if Python 2.3, 2.4, and 2.5 are supported, the - Python command + Public Python modules must be packages separately by major Python + version, to preserve run time separation between Python 2 and + Python 3. + + + Public Python 3 modules used by other packages must have their + binary package name prefixed with python3-. + Public Python 2 modules used by other packages must have their + binary package name prefixed with python-. + It is recommended to use this prefix for all packages with public + modules as they may be used by other packages in the future. + + + The binary package for module foo should preferably be + named python3-foo (for Python 3) + or python-foo (for Python 2), if the + module name allows. This is not required if the binary package + installs multiple modules, in which case the maintainer shall + choose the name of the module which best represents the package. + + + For subpackages such as foo.bar, the recommendation is + to name the binary + package python3-foo.bar (for Python + 3) or python-foo.bar (for Python 2). + + + Such a package should support the current Debian Python version, + and more if possible (there are several tools to help implement + this, see ). For example, if Python 3.3, + 3.4, and 3.5 are supported, the Python statement import foo - should import the module when the user is running any - of /usr/bin/python2.3, /usr/bin/python2.4, - and /usr/bin/python2.5. This requirement also - applies to extension modules; binaries for all the supported - Python versions should be included in a single package. + should import the module when the program interpreter is any + of /usr/bin/python3.3, /usr/bin/python3.4, + and /usr/bin/python3.5. This requirement also applies + to extension modules; binaries for all the supported Python + versions should be included in a single package. + + + Packages intended for use with Django (python3-django/ + python-django) are installed in the same namespace as + other python packages for a variety of reasons. Many such packages are + named django_$name upstream. These are then packaged as + python3-django-$name and + python-django-$name. + This makes it clear that they are intended for use with Django + and not general purpose Python modules. Debian maintainers are + encouraged to work with their upstreams to support consistent use of + this approach.
Specifying Supported Versions - The XS-Python-Version field - in debian/control specifies the versions of - Python supported by the package. This is used to track - packages during Python transitions, and is also used by some - packaging scripts to automatically generate appropriate - Depends and Provides lines. The format of the field may be - one of the following: - -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 - - 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 - be used. + The debian/control source paragraph may contain + optional fields to specify the versions of Python the package + supports. + + + The optional X-Python3-Version field specifies the + versions of Python 3 supported. When not specified, it defaults to + all currently supported Python 3 versions. + + + Similarly, the optional fields X-Python-Version + or XS-Python-Version were used to specify the versions of + Python 2 supported by the source package. They are obsolete and + can be removed now that only Python 2.7 is supported. - Your control file should also have a line: + These fields are used by some packaging scripts to automatically + generate appropriate Depends and Provides lines. The format of the + field may be one of the following: -XB-Python-Version: ${python:Versions} +X-Python3-Version: >= X.Y +X-Python3-Version: >= A.B, << X.Y +XS-Python-Version: A.B, X.Y +XS-Python-Version: all - The python:Versions is substituted by the supported Python - versions of the binary package, based on - XS-Python-Version. (If you are not using - dh_python you will need to handle this - substitution yourself.) The format of the field - XB-Python-Version is the same as the - XS-Python-Version field for packages not containing - extensions. Packages with extensions must list the versions - explicitely. - If your package is used by another module or application - that requires a specific Python version, it should also - Provide: pythonX.Y-foo for - each version it supports. + The keyword all means that the package supports any + Python 2 version available but might be deprecated in the future + since using version numbers is clearer than all and + encodes more information. The keyword all is limited to + Python 2 versions and must be ignored for Python 3 versions. + + + A comma-separated list of multiple individual versions + (e.g. 3.3, 3.4, 3.5) in XS-Python-Version will + continue to be supported, but is not recommended. The use of + multiple individual versions in X-Python-Version + or X-Python3-Version is not supported for Wheezy and + later releases. + + + The keyword current has been deprecated and used to mean + that the package would only have to support a single Python 2 + version (even across default version changes). It must be ignored + for Python 3 versions. + + + The use of XB-Python-Version in the binary package + paragraphs of debian/control file has been deprecated + and should be removed in the normal course of package updates. It + never achieved sufficient deployment to support its intended + purpose of managing Python transitions. This purpose can be + adequately accomplished by examining package dependencies.
Dependencies - Packaged modules available for the default Python version + Any package that installs modules for the default Python version (or many versions including the default) as described - in must depend on "python - (>= X.Y)". If they - require other modules to work, they must depend on the - corresponding python-foo. They must not - depend on - any pythonX.Y-foo. + in , must declare a dependency on the + default Python runtime package. If it requires other modules to + work, the package must declare dependencies on the corresponding + packaged modules. The package must not declare dependency on any + version-specific Python runtime or module package. + + + For Python 3, the correct dependencies are Depends: + python3 (>= 3.Y) and any + corresponding python3-foo packages. + + + For Python 2, the correct dependencies are Depends: + python (>= 2.Y) and any + corresponding python-foo packages. - Packaged modules available for one particular version of Python must - depend on the corresponding - pythonX.Y package instead. - If they need other modules, they must depend on the corresponding - pythonX.Y-foo packages, and - must not depend on any python-foo. + Any package that installs Python modules or Python 3 binary + extensions must also declare a maximum version it supports as + currently built. This is accomplished by declaring a maximum + version constraint strictly less than one higher than the current + maximum version, i.e. Depends: + python3 (<< X.Y).
Provides - Provides in packages of the form - python-foo 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. - - - Packaged modules available for one particular version of Python must - depend on the corresponding - pythonX.Y package instead. - If they need other modules, they must depend on the corresponding - pythonX.Y-foo packages, and - must not depend on any python-foo. + Binary packages that declare Provides dependencies of the form + pythonX.Y-foo + were never supported for Python 3 and are no longer useful for + Python 2. They should be removed in the normal course of package + updates. Future provision of values for the substituation variable + python:Provides is not guaranteed.
-
- Modules Bytecompilation +
+ Modules Byte-Compilation + + If a binary package provides any binary-independent modules + (foo.py files), the corresponding + byte-compiled modules (foo.pyc files) and + optimized modules (foo.pyo files) must not + ship in the package. Instead, they should be generated in the + package's post-install script, and removed in the package's + pre-remove script. The package's prerm has to make sure that + both foo.pyc and + foo.pyo are removed. + - If a package provides any binary-independent modules - (foo.py files), the corresponding bytecompiled - modules (foo.pyc files) and optimized modules - (foo.pyo files) must not ship in the - package. Instead, they should be generated in the package's - postinst, and removed in the package's prerm. The package's - prerm has to make sure that both foo.pyc and - foo.pyo are removed. + A binary package should only byte-compile the files which belong to + the package. - A package should only byte-compile the files which belong to - the package. + The file /etc/python/debian_config allows + configuration how modules should be byte-compiled. The + post-install scripts should respect these settings. - The file /etc/python/debian_config allows - configuration how modules should be byte-compiled. The - postinst scripts should respect these settings. + Pure Python modules in private installation directories that are + byte-compiled with the default Python version must be forcefully + byte-compiled again when the default Python version changes. - Modules in private installation directories and in - /usr/lib/site-python should be byte-compiled, - when the default python version changes. + Public Python extensions should be bin-NMUed. + + + Private Python extensions should be subject to binary NMUs every + time the default interpreter changes, unless the extension is + updated through a *.rtupdate script.
@@ -389,48 +778,67 @@ Python Programs +
+ Interpreter directive (“Shebang”) + + Executables written for interpretation by Python must use an + appropraite interpreter directive, or “shebang”, as the first line + of the program. This line should be of the + form #!interpreter_location. + See for the interpreter name to use. + + + As noted in , the + form #!/usr/bin/env interpreter_name is + deprecated. + +
+
- Programs using the default python + Programs using the default Python - Programs that can run with any version of Python must - begin with #!/usr/bin/python or #!/usr/bin/env - python (the former is preferred). They must also - specify a dependency on python, with a - versioned dependency if necessary. + A package that installs a program that can be run by any version + of Python 3 must declare a dependency + on python3, with a versioned dependency if + necessary. - If the program needs the python module foo, - it must depend on python-foo. + A package that installs a program that can be run by any version + of Python 2 must declare a dependency + on python2, with a versioned dependency if + necessary. + + + If the program needs the public Python module foo, the + package must depend on the binary package that installs + the foo module. See for the + naming of packages that install public Python modules. -
- Programs Shipping Private Modules +
+ Programs Shipping Private Modules - A program using /usr/bin/python as - interpreter can come up with private Python modules. These - modules should be installed in - /usr/share/module, or - /usr/lib/module if the modules are + A program that specifies python3 + or python as its interpreter may require its own + private Python modules. These modules should be installed + in /usr/share/module, or + /usr/lib/module if the modules are architecture-dependent (e.g. extensions). - /usr/lib/site-python is deprecated and should - no longer be used for this purpose. - - - The rules explained in apply to - those private modules: the bytecompiled modules must not - be shipped with the package, they should be generated in - the package's postinst, using the current default Python - version, and removed in the prerm. Modules should be - bytecompiled using the current default Python version. + The rules explained in apply to + those private modules: the byte-compiled modules must not be + shipped with the binary package, they should be generated in the + package's post-install script using the current default Python + version, and removed in the pre-remove script. Modules should be + byte-compiled using the current default Python version. Programs that have private compiled extensions must either - handle multiple version support themselves, or declare a - tight dependency on the current Python version - (e.g. Depends: python (>= 2.4), python (<= 2.5). No - tools currently exist to alleviate this situation. + handle multiple version support themselves, or declare a tight + dependency on the current Python version (e.g. Depends: + python3 (>= 3.5), + python3 (<< 3.6).
@@ -438,26 +846,19 @@
Programs Using a Particular Python Version - A program which requires a specific version of Python must - begin with - #!/usr/bin/pythonX.Y (or - #!/usr/bin/env pythonX.Y). It - must also specify a dependency on - pythonX.Y and on - any pythonX.Y-foo - package providing necessary modules. It should not depend on - any python-foo package, unless it - requires a specific version of the package (since virtual - packages cannot be versioned). If this is the case, it - should depend on both the virtual package and the main - package (e.g. Depends: python2.4-foo, python-foo (>= - 1.0)). + A program which requires a specific minor version of Python must + specify the versioned + interpreter pythonX.Y. The + package that installs the programs must also specify a dependency + on + pythonX.Y and on any + packages that install necessary modules. - The notes on installation directories and bytecompilation + The notes on installation directories and byte-compilation for programs that support any version of Python also apply to programs supporting only a single Python version. Modules - to be bytecompiled should use the same Python version as the + to be byte-compiled should use the same Python version as the package itself.
@@ -469,12 +870,12 @@
Building Embedded Programs - Programs which embed a Python interpreter must declare a - Build-Depends on + Any package that installs a program which embeds a Python + interpreter must declare Build-Depends on pythonX.Y-dev, where - pythonX.Y is the python version the program - builds against. It should be the current default python version - unless the program doesn't work correctly with this version. + X.Y is the Python version the program + builds against. It should be the current default Python version + unless the program does not work correctly with this version.
@@ -482,10 +883,10 @@ Embedded Python Dependencies Dependencies for programs linking against the shared Python - library will be automatically created by - dpkg-shlibdeps. The - libpythonX.Y.so.Z library - the program is built against is provided by the + library will be automatically created + by dpkg-shlibdeps. The + libpythonX.Y.so.Z + library the program is built against is provided by the pythonX.Y package.
@@ -499,9 +900,9 @@ version. - If you install a different subrelease of the version of python - you've got installed, you'll need to be careful to install all - the modules you use for that version of python too. + If you install a different micro version of the version of Python + you have got installed, you will need to be careful to install all + the modules you use for that version of Python too.
@@ -509,41 +910,42 @@ Build Dependencies - Build dependencies for Python dependent packages must be - declared for every Python version that the package is built - for. The python-all-dev should be used when - building modules for any or all Python versions. To build for - a specific version or versions, Build-Depend on + Build dependencies for Python-dependent packages must be declared + for every Python version that the package is built for. + + + The python3-all-dev should be used when building + extensions for any or all Python 3 versions. + The python-all-dev should be used when building + extensions for any or all Python 2 versions. To build for a specific + version or versions, declare Build-Depends on pythonX.Y-dev. - Some applications and pure Python modules may be able to - depend only on python - or python-all and not require the -dev - packages. + Some applications and pure Python modules may be able to avoid + dependency on the -dev packages, and declare + Build-Depends on the runtime environment only + (python3, python3-all, + python, python-all). A package + that does not require the -dev packages must not + declare Build-Depends on them. - Build-Depend on at least: + Declare Build-Depends on at least: -Build-Depends: python2.3 (>= 2.3-1) -Build-Depends: python2.4 (>= 2.4-1) -Build-Depends: python (>= 2.3.5-7) +Build-Depends: python2.7 +Build-Depends: python2.6 (>= 2.6-1) +Build-Depends: python (>= 2.6.6-9) Build-Depends: python-all -Build-Depends: python2.3-dev (>= 2.3-1) -Build-Depends: python2.4-dev (>= 2.4-1) -Build-Depends: python-dev (>= 2.3.5-7) +Build-Depends: python2.7-dev +Build-Depends: python3.5-dev (>= 3.5.1-1) +Build-Depends: python-dev (>= 2.6.6-9) Build-Depends: python-all-dev +Build-Depends: python3-all-dev (>= 3.2) - - If you use either python-support or - python-central you must additionally - Build-Depend on those. If you are using dh_python - at all, you must Build-Depend on python, as - debhelper does not depend on it. - @@ -556,97 +958,101 @@ versa). This appendix is just an overview. If you use these tools, you should read their full documentation. -
- python-support +
+ distutils - The python-support system provides a simple way to - bytecompile pure Python modules and manage dependencies. It - integrates with debhelper. When using - python-support, you should install your modules - to /usr/share/python-support/package - rather than the standard Python directories. python-support - will then handle compiling the modules and making - appropriate symbolic links for installed Python versions to - find them, - substitute ${python:Depends}, ${python:Versions}, - and ${python:Provides} in your control file, and - manage bytecompilation in your postinst/prerm. - - - To use it, call dh_pysupport - before dh_python, and make sure you've - installed the modules in the right place: - -PREFIX := debian/python-package/usr -... -install: - ... - ./setup.py install --no-compile \ - --install-lib=$(PREFIX)/share/python-support/python-package -binary-indep: build install - ... - dh_pysupport - dh_python - ... - - - - python-support can also manage private modules. To use this - feature, pass a list of directories to be managed by - python-support to dh_pysupport - and dh_python. python-support cannot handle - compiled extensions. + The standard Python distutils module has been modified in + Debian to change the default installation directory of public + Python modules and to add a new flag to the install + command to override the default, --install-layout=. + + + Public Python modules installed with a modified distutils default + to + /usr/local/lib/pythonX.Y/dist-packages + for Python 2.6 and later. This directory is seen by the + system-provided Python 2.6. + + + When using a local Python installation, the default is + /usr/local/lib/pythonX.Y/site-packages + which is only seen by the local Python installation. + + + Using the --install-layout=deb flag to + the install command of setup.py with a + system-provided Python 2.6 or later versions, Python modules will + be installed to + /usr/lib/pythonX.Y/dist-packages + which is only seen by the system-provided Python, not by a local + installation.
-
- python-central +
+ setuptools + + The related Python setuptools module has been modified in + Debian along the same lines as distutils. + + + Upstream focus on developments and improvements for Python packaging + tools has largely shifted away from distutils and to + setuptools. They offer a similar API and at some point in + the future, setuptools may fully replace distutils + in Debian package builds. + +
+ +
+ <literal>dh-python</literal> - python-central provides another way to manage Python - modules. It integrates with debhelper, - but can also be used without it. When using python-central, - you should install your modules normally. It will then move - them to its private directory, and manage the same things - python-support does. + dh-python provides extensions + for debhelper 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 Debian Python + maintainers. - To use it, call dh_pycentral - before dh_python: - -install: - ... - ./setup.py install - -binary-indep: build install - ... - dh_pycentral - dh_python - ... - + See man dh_python3 or man dh_python2 for + details. +
+ +
+ pybuild - 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 dh_python (but - not dh_pycentral). + Pybuild is a Debian Python specific build system that invokes + various build systems for requested Python versions in order to + build modules and extensions. It supports automatically building + for multiple Python versions. +
+ +
+ CDBS - If python-central should not move the files to its private - directory, useDH_PYCENTRAL=nomove dh_pycentral - instead. + The CDBS python-distutils.mk class helps packaging of + distutils based Python packages. +
+ +
+ <literal>python-support</literal> (removed) - Examples for source packages using python-central are - pyenchant, python-imaging (modules and extensions), - pyparallel (modules only). + python-support provided another way to manage + Python modules. It has been removed from Debian Stretch and later + releases.
-
- CDBS +
+ <literal>python-central</literal> (removed) - FIXME: Someone familiar with CDBS should write this part. + python-central provided another way to manage + Python modules. It has been removed from Debian Jessie and later + releases.
@@ -656,26 +1062,42 @@ Upgrade Procedure This section describes the procedure for the upgrade when the - default python version is changed in the unstable - distribution, requiring recompilation of many python-related - packages. + default Python version is changed in the Debian unstable + release, requiring recompilation of many Python-related packages. + Selected pre-releases and release candidates of new Python + versions are uploaded to Debian experimental to + support pre-transition work and testing. + + + + + Application and module maintainers make sourceful changes + where needed to prepare for the new Python version when + needed. + + + + Have a long and heated discussion. - The Debian Python maintainer decides for the new default Debian - Python version and announces the upgrade. + The Debian Python maintainer and module/application + maintainers discuss the readiness for a new default Debian + Python version and associated packaging/policy changes. Once + there is some consensus, the Python maintainer announces the + upgrade and uploads to unstable. - Upload of the python core metapackages python, + Upload of the Python core meta-packages python, python-dev, python-doc and several python-module, depending on the new pythonX.Y, @@ -684,12 +1106,58 @@ - The release team schedules rebuilds for packages that - may need it. Packages that require manual work get + The Debian release team schedules rebuilds for packages that + may need it. Packages that require additional manual work get updated and uploaded. + + The necessary package builds are typcially done in three phases in + order to keep transitions as smooth as possible. For Python 3, there + is no general need to update architecture all packages for a new + Python 3 version. Only architecture any packages need to be rebuilt. + + + + The new Python 3 version is added to supported versions and + packages that support multiple Python 3 versions are binNMUed. + They now support both the new and older Python 3 versions. + This requires transition assistance from the release team in + the form of a transition tracker and binNMU scheduling, but is + not a transition that can cause entanglements with other + transitions in Debian. + + + + + Once the default Python 3 version is changed, binNMUs are done + for packages that only support one Python 3 version. Some + transient uninstallability is unavoidable. This is a + transition that can entangle other transitions in Debian and + requires more careful coordination with the release team. + + + + + After the old Python 3 version is dropped from supported + versions then packages with multi-version support are binNMUed + again to remove support for the old Python 3 version. This is + not a true transition and only needs a tracker and binNMU + scheduling. + + + + - + + + diff -Nru python3-defaults-3.6.5/debian/rules python3-defaults-3.6.7/debian/rules --- python3-defaults-3.6.5/debian/rules 2018-04-02 05:02:03.000000000 +0000 +++ python3-defaults-3.6.7/debian/rules 2018-10-24 17:29:15.000000000 +0000 @@ -22,13 +22,13 @@ distrelease := $(shell lsb_release -cs) # requiered python3.x version -UPSTRVER := 3.6.5-2~ +UPSTRVER := 3.6.7-1~ # required versions of python3-lib2to3 and python3-distutils -STDLIBVER := 3.6.5-2~ +STDLIBVER := 3.6.7-1~ ifeq (,$(filter $(distrelease),lenny etch squeeze wheezy lucid maverick natty oneiric precise quantal raring saucy trusty)) - bd_i586 = dpkg-dev (>= 1.17.11), python3.6, + bd_i586 = dpkg-dev (>= 1.17.11), python3.6 (>= 3.6.7-1~), else bd_i586 = dpkg-dev (>= 1.16.1~), endif @@ -64,7 +64,7 @@ mv -f python-policy.html debian/ touch stamp-doc-policy -stamp-doc: #stamp-doc-policy +stamp-doc: stamp-doc-policy touch stamp-doc control-file: @@ -228,7 +228,7 @@ dh_builddeb -i $(NOPKGS) # Build architecture-dependent files here. -binary-arch: build install +binary-arch: build install stamp-doc dh_testdir -a dh_testroot -a dh_installman -a @@ -275,22 +275,18 @@ debian/python3/usr/share/man/man1/pdb3.1.gz mkdir -p debian/python3/usr/share/doc/python3 -ifeq (0,1) cp -a debian/python-policy.{html,dbk,txt} \ - debian/python/usr/share/doc/python3/ -endif + debian/python3/usr/share/doc/python3/ mkdir -p debian/python3/usr/share/pixmaps ln -sf python$(VER).xpm debian/python3/usr/share/pixmaps/python3.xpm -ifeq (0,1) : # add symlinks to policy files - mkdir -p debian/python/usr/share/doc/python$(VER) + mkdir -p debian/python3/usr/share/doc/python$(VER) for ext in html dbk.gz txt.gz; do \ - ln -sf ../python/python-policy.$$ext \ - debian/python/usr/share/doc/python$(VER)/python-policy.$$ext; \ + ln -sf ../python3/python-policy.$$ext \ + debian/python3/usr/share/doc/python$(VER)/python-policy.$$ext; \ done -endif ifeq (0,1) mkdir -p debian/python3/usr/share/apps/konsole diff -Nru python3-defaults-3.6.5/.gitignore python3-defaults-3.6.7/.gitignore --- python3-defaults-3.6.5/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ python3-defaults-3.6.7/.gitignore 2018-06-05 21:35:36.000000000 +0000 @@ -0,0 +1,30 @@ +debian/*.debhelper* +debian/*.substvars +debian/files +debian/python3-minimal.postinst +debian/python3.postinst +debian/python3.postrm +debian/python3.preinst + +debian/2to3 +debian/idle +debian/idle3 +debian/libpython3-all-dbg +debian/libpython3-all-dev +debian/libpython3-dbg +debian/libpython3-dev +debian/libpython3-stdlib +debian/python3 +debian/python3-all +debian/python3-all-dbg +debian/python3-all-dev +debian/python3-dbg +debian/python3-dev +debian/python3-doc +debian/python3-examples +debian/python3-minimal +debian/python3-venv + +py3clean.1 +py3compile.1 +stamp-*