diff --git a/debian/changelog b/debian/changelog index b984c07e45f0cdc76ac2c717e74dc6b94209c1ca..84e15efdcbee85cd9e84e4ac8963d0640789109d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +python-defaults (2.6.6-13) experimental; urgency=low + + * Add python2.7 as a supported Python version. + * python-all{,-dev,-dbg}: Depend on the 2.7 packages. + * Run the rtinstall script, when 2.7 became a supported version (2.6.6-13) + and python2.7 is installed. + * Python-minimal Breaks python-support (<< 1.0.12) + + -- Scott Kitterman <scott@kitterman.com> Mon, 21 Mar 2011 10:53:42 -0400 + python-defaults (2.6.6-12) unstable; urgency=low [ Piotr Ożarowski ] diff --git a/debian/control b/debian/control index 38fecbff620ee6119349c42fc2548dc22405058b..3d4625e6b4f1ec57c87a859974b6f630de38337f 100644 --- a/debian/control +++ b/debian/control @@ -33,7 +33,7 @@ Priority: standard Depends: ${misc:Depends}, python2.6-minimal (>= 2.6.6-1~), dpkg (>= 1.13.20) Recommends: python Conflicts: python-central (<< 0.5.5) -Breaks: python (<= 2.4-1), python-dev (<< 2.6), python-dbg (<< 2.6), python-all (<< 2.6), python-all-dev (<< 2.6), python-all-dbg (<< 2.6), python-examples (<< 2.6), idle (<< 2.6), python2.5-minimal (<< 2.5.5-7), python2.6-minimal (<< 2.6.5~rc2-2), python3.1-minimal (<< 3.1.2~rc1-2) +Breaks: python (<= 2.4-1), python-dev (<< 2.6), python-dbg (<< 2.6), python-all (<< 2.6), python-all-dev (<< 2.6), python-all-dbg (<< 2.6), python-examples (<< 2.6), idle (<< 2.6), python2.5-minimal (<< 2.5.5-7), python2.6-minimal (<< 2.6.5~rc2-2), python3.1-minimal (<< 3.1.2~rc1-2), python-support (<< 1.0.12) Replaces: python (<= 2.4-1) Description: minimal subset of the Python language (default version) This package contains the interpreter and some essential modules. It's used @@ -110,9 +110,9 @@ Description: debug build of the Python Interpreter (version 2.6) Package: python-all Architecture: all -Depends: ${misc:Depends}, python (= ${binary:Version}), python2.5 (>= 2.5.5-6), python2.6 (>= 2.6.5-2) +Depends: ${misc:Depends}, python (= ${binary:Version}), python2.5 (>= 2.5.5-6), python2.6 (>= 2.6.5-2), python2.7 (>= 2.7-7) Description: package depending on all supported Python runtime versions - The package currently depends on python2.5 and python2.6, in the future, + The package currently depends on python2.5, python2.6 and python2.7, in the future, dependencies on jython (Python for a JVM) and ironpython (Python for Mono) may be added. . @@ -121,9 +121,9 @@ Description: package depending on all supported Python runtime versions Package: python-all-dev Architecture: all -Depends: ${misc:Depends}, python (= ${binary:Version}), python-all (= ${binary:Version}), python-dev (= ${binary:Version}), python2.5-dev (>= 2.5.5-6), python2.6-dev (>= 2.6.5-2) +Depends: ${misc:Depends}, python (= ${binary:Version}), python-all (= ${binary:Version}), python-dev (= ${binary:Version}), python2.5-dev (>= 2.5.5-6), python2.6-dev (>= 2.6.5-2), python2.7-dev (>= 2.7-7) Description: package depending on all supported Python development packages - The package currently depends on python2.5-dev and python2.6-dev, in the + The package currently depends on python2.5-dev, python2.6-dev and python2.7-dev, in the future, dependencies on jython (Python for a JVM) and ironpython (Python for Mono) may be added. . @@ -134,9 +134,9 @@ Package: python-all-dbg Architecture: all Section: debug Priority: extra -Depends: ${misc:Depends}, python (= ${binary:Version}), python-all (= ${binary:Version}), python-dbg (= ${binary:Version}), python2.5-dbg (>= 2.5.5-6), python2.6-dbg (>= 2.6.5-2) +Depends: ${misc:Depends}, python (= ${binary:Version}), python-all (= ${binary:Version}), python-dbg (= ${binary:Version}), python2.5-dbg (>= 2.5.5-6), python2.6-dbg (>= 2.6.5-2), python2.7-dbg (>= 2.7-7) Description: package depending on all supported Python debugging packages - The package currently depends on python2.5-dbg and python2.6-dbg, in the + The package currently depends on python2.5-dbg, python2.6-dbg and python2.7-dbg, in the future, dependencies on jython (Python for a JVM) and ironpython (Python for Mono) may be added. . diff --git a/debian/control.in b/debian/control.in index a90bdb74cbda2bf15f2508f906370b194831e382..a248ce6c1c19cb6c0975e5a55fca25d396c3ada4 100644 --- a/debian/control.in +++ b/debian/control.in @@ -33,7 +33,7 @@ Priority: standard Depends: ${misc:Depends}, @PVER@-minimal (>= @PREVVER@), dpkg (>= 1.13.20) Recommends: python Conflicts: python-central (<< 0.5.5) -Breaks: python (<= 2.4-1), python-dev (<< 2.6), python-dbg (<< 2.6), python-all (<< 2.6), python-all-dev (<< 2.6), python-all-dbg (<< 2.6), python-examples (<< 2.6), idle (<< 2.6), python2.5-minimal (<< 2.5.5-7), python2.6-minimal (<< 2.6.5~rc2-2), python3.1-minimal (<< 3.1.2~rc1-2) +Breaks: python (<= 2.4-1), python-dev (<< 2.6), python-dbg (<< 2.6), python-all (<< 2.6), python-all-dev (<< 2.6), python-all-dbg (<< 2.6), python-examples (<< 2.6), idle (<< 2.6), python2.5-minimal (<< 2.5.5-7), python2.6-minimal (<< 2.6.5~rc2-2), python3.1-minimal (<< 3.1.2~rc1-2), python-support (<< 1.0.12) Replaces: python (<= 2.4-1) Description: minimal subset of the Python language (default version) This package contains the interpreter and some essential modules. It's used @@ -110,9 +110,9 @@ Description: debug build of the Python Interpreter (version @VER@) Package: python-all Architecture: all -Depends: ${misc:Depends}, python (= ${binary:Version}), python2.5 (>= 2.5.5-6), python2.6 (>= 2.6.5-2) +Depends: ${misc:Depends}, python (= ${binary:Version}), python2.5 (>= 2.5.5-6), python2.6 (>= 2.6.5-2), python2.7 (>= 2.7-7) Description: package depending on all supported Python runtime versions - The package currently depends on python2.5 and python2.6, in the future, + The package currently depends on python2.5, python2.6 and python2.7, in the future, dependencies on jython (Python for a JVM) and ironpython (Python for Mono) may be added. . @@ -121,9 +121,9 @@ Description: package depending on all supported Python runtime versions Package: python-all-dev Architecture: all -Depends: ${misc:Depends}, python (= ${binary:Version}), python-all (= ${binary:Version}), python-dev (= ${binary:Version}), python2.5-dev (>= 2.5.5-6), python2.6-dev (>= 2.6.5-2) +Depends: ${misc:Depends}, python (= ${binary:Version}), python-all (= ${binary:Version}), python-dev (= ${binary:Version}), python2.5-dev (>= 2.5.5-6), python2.6-dev (>= 2.6.5-2), python2.7-dev (>= 2.7-7) Description: package depending on all supported Python development packages - The package currently depends on python2.5-dev and python2.6-dev, in the + The package currently depends on python2.5-dev, python2.6-dev and python2.7-dev, in the future, dependencies on jython (Python for a JVM) and ironpython (Python for Mono) may be added. . @@ -134,9 +134,9 @@ Package: python-all-dbg Architecture: all Section: debug Priority: extra -Depends: ${misc:Depends}, python (= ${binary:Version}), python-all (= ${binary:Version}), python-dbg (= ${binary:Version}), python2.5-dbg (>= 2.5.5-6), python2.6-dbg (>= 2.6.5-2) +Depends: ${misc:Depends}, python (= ${binary:Version}), python-all (= ${binary:Version}), python-dbg (= ${binary:Version}), python2.5-dbg (>= 2.5.5-6), python2.6-dbg (>= 2.6.5-2), python2.7-dbg (>= 2.7-7) Description: package depending on all supported Python debugging packages - The package currently depends on python2.5-dbg and python2.6-dbg, in the + The package currently depends on python2.5-dbg, python2.6-dbg and python2.7-dbg, in the future, dependencies on jython (Python for a JVM) and ironpython (Python for Mono) may be added. . diff --git a/debian/debian_defaults b/debian/debian_defaults index 60564eb0bc99df5d7e7d25e6fd149c0bab44b889..62f7353ff9fa8500a25c90889097e3eb5d96f4fd 100644 --- a/debian/debian_defaults +++ b/debian/debian_defaults @@ -3,7 +3,7 @@ default-version = python2.6 # all supported python versions -supported-versions = python2.5, python2.6 +supported-versions = python2.5, python2.6, python2.7 # formerly supported python versions old-versions = python2.3, python2.4 diff --git a/debian/python.postinst.in b/debian/python.postinst.in index a00cd24caffa27aca6f47f6bb5e4cac4e8d68dc9..f89a2479061dfe408614e8dda90c27a49e4832b6 100644 --- a/debian/python.postinst.in +++ b/debian/python.postinst.in @@ -39,6 +39,18 @@ case "$1" in done fi + # run the rtinstall script, when 2.7 became a supported version + if [ -x /usr/bin/python2.7 ] && [ -n "$2" ] && dpkg --compare-versions $2 lt 2.6.6-13; then + if [ "$DEBIAN_FRONTEND" != noninteractive ]; then + echo "Linking and byte-compiling packages for runtime python2.7..." + fi + version=$(dpkg -s python2.7-minimal | awk '/^Version:/ {print $2}') + for hook in /usr/share/python/runtime.d/*.rtinstall; do + [ -x $hook ] || continue + $hook rtinstall python2.7 "$2" "$version" + done + fi + if [ -n "$2" ] && dpkg --compare-versions $2 lt 2.6.4-1~; then oldv=$(echo $2 | sed 's/^\(...\).*/\1/') if [ "$DEBIAN_FRONTEND" != noninteractive ]; then @@ -96,7 +108,22 @@ case "$1" in $hook rtinstall python2.6 "$oldversion" "$newversion" done fi - rm -f /var/lib/python/python2.5_already_installed + rm -f /var/lib/python/python2.6_already_installed + + if [ -f /var/lib/python/python2.7_already_installed ] \ + && [ ! -f /var/lib/python/python2.7_installed ] + then + if [ "$DEBIAN_FRONTEND" != noninteractive ]; then + echo "Linking and byte-compiling packages for runtime python2.7..." + fi + oldversion=$(cat /var/lib/python/python2.7_already_installed) + newversion=$(dpkg -s python2.7-minimal | awk '/^Version:/ {print $2}') + for hook in /usr/share/python/runtime.d/*.rtinstall; do + [ -x $hook ] || continue + $hook rtinstall python2.7 "$oldversion" "$newversion" + done + fi + rm -f /var/lib/python/python2.7_already_installed rmdir --ignore-fail-on-non-empty /var/lib/python 2>/dev/null || true esac diff --git a/debian/python.preinst.in b/debian/python.preinst.in index 720a6feea7bfead3e2d5b7dc17963ad2224de4c6..d59e2c1d2e0e1967dd2c15247b5f6a048cc92638 100644 --- a/debian/python.preinst.in +++ b/debian/python.preinst.in @@ -46,6 +46,14 @@ case "$1" in mkdir -p /var/lib/python echo "$version" > /var/lib/python/python2.6_already_installed fi + + # 2.6.6-13 is now the first version, which adds python2.7 as supported + # version; need to run an rtinstall python2.7 in the postinst. + if dpkg --compare-versions $2 lt 2.6.6-13 && [ -x /usr/bin/python2.7 ]; then + version=$(dpkg -s python2.7-minimal | awk '/^Version:/ {print $2}') + mkdir -p /var/lib/python + echo "$version" > /var/lib/python/python2.7_already_installed + fi esac #DEBHELPER# diff --git a/debpython/version.py b/debpython/version.py index 4afb96223ca4367350110d0d5c971e636e8f10a6..7a858cb65fc1da3979ef8797bab4716a4a30fbf1 100644 --- a/debpython/version.py +++ b/debpython/version.py @@ -26,7 +26,7 @@ from os.path import exists, dirname, join from types import GeneratorType # will be overriden via debian_defaults file few lines later -SUPPORTED = [(2, 5), (2, 6)] +SUPPORTED = [(2, 5), (2, 6), (2, 7)] DEFAULT = (2, 6) RANGE_PATTERN = r'(-)?(\d\.\d+)(?:(-)(\d\.\d+)?)?' @@ -61,7 +61,7 @@ def get_requested_versions(vrange=None, available=None): :type available: bool >>> sorted(get_requested_versions([(2, 5), (3, 0)])) - [(2, 5), (2, 6)] + [(2, 5), (2, 6), (2, 7)] >>> sorted(get_requested_versions('')) == sorted(SUPPORTED) True >>> sorted(get_requested_versions([None, None])) == sorted(SUPPORTED)