python-defaults-2.7.18/0000755000000000000000000000000014100236262011621 5ustar python-defaults-2.7.18/Makefile0000644000000000000000000000304014100235331013252 0ustar #!/usr/bin/make -f INSTALL ?= install PREFIX ?= /usr/local MANPAGES ?= dh_python2.1 pycompile.1 pyclean.1 clean: find . -name '*.py[co]' -delete rm -f .coverage install-dev: $(INSTALL) -m 755 -d $(DESTDIR)$(PREFIX)/bin \ $(DESTDIR)$(PREFIX)/share/python/runtime.d $(INSTALL) -m 755 runtime.d/* $(DESTDIR)$(PREFIX)/share/python/runtime.d/ install-runtime: $(INSTALL) -m 755 -d $(DESTDIR)$(PREFIX)/share/python/debpython $(DESTDIR)$(PREFIX)/bin $(INSTALL) -m 644 debpython/*.py $(DESTDIR)$(PREFIX)/share/python/debpython/ $(INSTALL) -m 755 pycompile $(DESTDIR)$(PREFIX)/bin/ $(INSTALL) -m 755 pyclean $(DESTDIR)$(PREFIX)/bin/ install: install-dev install-runtime check_versions: @set -e;\ DEFAULT=`sed -rn 's,^DEFAULT = \(([0-9]+)\, ([0-9]+)\),\1.\2,p' debpython/version.py`;\ SUPPORTED=`sed -rn 's,^SUPPORTED = \[\(([0-9]+)\, ([0-9]+)\)\, \(([0-9]+)\, ([0-9]+)\)\],\1.\2 \3.\4,p' debpython/version.py`;\ DEB_DEFAULT=`sed -rn 's,^default-version = python([0-9.]*),\1,p' debian/debian_defaults`;\ DEB_SUPPORTED=`sed -rn 's|^supported-versions = (.*)|\1|p' debian/debian_defaults | sed 's/python//g;s/,//g'`;\ [ "$$DEFAULT" = "$$DEB_DEFAULT" ] || \ (echo "Please update DEFAULT in debpython/version.py ($$DEFAULT vs. $$DEB_DEFAULT)" >/dev/stderr; false);\ [ "$$SUPPORTED" = "$$DEB_SUPPORTED" ] || \ (echo "Please update SUPPORTED in debpython/version.py ($$SUPPORTED vs. $$DEB_SUPPORTED)" >/dev/stderr; false) pdebuild: pdebuild --debbuildopts -I # TESTS nose: nosetests --with-doctest --with-coverage .PHONY: clean tests test% check_versions python-defaults-2.7.18/README.derivatives0000644000000000000000000000273614100235331015031 0ustar How to change a list of supported Python versions? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Open debian/debian_defaults file and change `supported-versions` variable * Open debian/control.in file and edit python-all, python-all-dev and python-all-dbg's Depends line (add or remove pythonX.Y packages) * Open debian/pyversions.py file and edit `_supported_versions` list around line 141 * Open debpython/version.py file and edit `SUPPORTED` list around line 26 How to change default Python version? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Open debian/debian_defaults file and change `default-version` variable * Open debian/rules file and edit `VER` variable (default version), `NVER` (default + 1 version) and `PVER` (default version with "python" prefix) * Open debian/pyversions.py file and edit `debian_default` variable around line 171 * Open debpython/version.py file and edit `DEFAULT` variable around line 27 How to bump minimum required Python version by dh_python2? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Open debpython/depends.py file and edit `MINPYCDEP` variable around line 26 How to regenerate dist_fallback file for dh_python2? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Please note that we recommend to extend this file instead (i.e. removing items from it can break other packages' dependencies) * Update pydist/sources.list file to point to your distro/suit * Remove pydist/dist_fallback file * Run `make dist_fallback` python-defaults-2.7.18/debian/0000755000000000000000000000000014100236262013043 5ustar python-defaults-2.7.18/debian/README.Debian0000644000000000000000000000071614100235331015104 0ustar More documentation and README's for this package can be found in the directory /usr/share/doc/python2.7/ The upstream documentation can be found after installation of the python-doc package in the directory /usr/share/doc/python/html A draft of the "Debian Python Policy", mostly needed for Debian package maintainers can be found in /usr/share/doc/python3 Sometime it will be moved to /usr/share/doc/debian-policy in the debian-policy package. python-defaults-2.7.18/debian/changelog0000644000000000000000000015331114100236262014721 0ustar python-defaults (2.7.18-3) unstable; urgency=medium * Install pycompile and pyclean accidentally removed in -1 -- Piotr Ożarowski Wed, 28 Jul 2021 13:17:06 +0200 python-defaults (2.7.18-2) unstable; urgency=medium * Don't ship a duplicate README.Debian in python2-doc. Closes: #966823. -- Matthias Klose Tue, 04 Aug 2020 10:22:34 +0200 python-defaults (2.7.18-1) unstable; urgency=medium [ Piotr Ożarowski ] * Remove deprecated dh_python2. Please add dh-python or dh-sequence-python2 to Build-Depends if your package still supports Python 2.X. [ Matthias Klose ] * Correct command-not-found XB-Cnf headers: - Drop Extra-Commands headers, not needed - Add XB- to ensure Visible-Pkgname actually is included in the binary package heders * Stop building the python, python-dev, python-dbg, python-doc, python-minimal, libpython-dev, libpython-dbg, libpython-stdlib packages. * Bump standards version. * Bump version to 2.7.18. * Bump debhelper version. -- Matthias Klose Sun, 02 Aug 2020 14:51:22 +0200 python-defaults (2.7.17-2) unstable; urgency=medium * dh_python2.py: Use python2 in the shebang. Closes: #944894. -- Matthias Klose Mon, 18 Nov 2019 07:36:33 +0100 python-defaults (2.7.17-1) unstable; urgency=medium * Bump version to 2.7.17. * Bump standards version. * Bump debhelper compat for the tests to 9. -- Matthias Klose Thu, 10 Oct 2019 13:32:13 +0200 python-defaults (2.7.16-1) unstable; urgency=medium * Bump version to 2.7.16. -- Matthias Klose Mon, 04 Mar 2019 16:48:56 +0100 python-defaults (2.7.15-4) unstable; urgency=medium [ Matthias Klose ] * Fix some lintian warnings. * Fix typo in dh_python2(1) (Chris Lamb). Closes: #901079. * Bump standards version. * python-minimal: Make the python-central conflict unversioned. Closes: #910234. [ Scott Kitterman ] * Remove myself from uploaders -- Matthias Klose Fri, 18 Jan 2019 11:56:03 +0100 python-defaults (2.7.15-3) unstable; urgency=medium * Fix pyversions -d invocation. Closes: #900983. -- Matthias Klose Thu, 07 Jun 2018 18:57:11 +0200 python-defaults (2.7.15-2) unstable; urgency=medium * Don't install the pyclean and pycompile manpages in python-minimal. * Don't install dh_python2 manpage in python. * Remove unused xsl files, remove unused code in the rules file. -- Matthias Klose Wed, 06 Jun 2018 23:25:58 +0200 python-defaults (2.7.15-1) unstable; urgency=medium * Bump version to 2.7.15. * Split out a set of python2 packages, and let the python packages depend on it. No changes for the "-all" packages. * Update Vcs attributes. * Remove Barry Warsaw as uploader. * Remove the FAQ for Python2. * Remove the Debian Python policy, now found in the python3 package. -- Matthias Klose Wed, 06 Jun 2018 18:35:07 +0200 python-defaults (2.7.15~rc1-1) unstable; urgency=medium * Bump version to 2.7.15~rc1. * debian/control.in (Michael Vogt): - add Cnf-Visible-Pkgname hint to ensure command-not-found recommends installing "python" instead of "python-minimal" when it is missing. -- Matthias Klose Mon, 16 Apr 2018 16:31:18 +0200 python-defaults (2.7.14-4) unstable; urgency=medium * Stop building the python-examples and idle2 packages. * python: Stop shipping the 2to3 symlink (now in the 2to3 package). -- Matthias Klose Wed, 13 Dec 2017 23:39:49 +0100 python-defaults (2.7.14-3) unstable; urgency=medium * Stop using priority extra for the -dbg packages. * pycompile, pyclean, pyversions: Use python2 as the shebang to guard against people fiddling around with the python symlink or having a python3 installed as python in /usr/local. Closes: #864599. LP: #1715062. * Rename the idle package to idle2. idle is now built for python3. * Fix quoting in the prerm-clean autoscript. Closes: #815134. * README.Debian: Reference 2.7 and point to the python3 package for the Debian Python Policy. * Mark python-examples as M-A: foreign. -- Matthias Klose Fri, 08 Dec 2017 10:56:48 +0100 python-defaults (2.7.14-1) unstable; urgency=medium * Bump version to 2.7.14. * python-examples: Fix Multi-Arch warning. * Change policy format from debiandoc SGML to DocBook/XML (W. Martin Borgert). Closes: #872421. -- Matthias Klose Mon, 18 Sep 2017 10:17:15 +0200 python-defaults (2.7.13-2) unstable; urgency=medium [ Matthias Klose ] * Lower priority of packages from standard to optional. [ Scott Kitterman ] * Make another attempt at Django specific binary naming -- Matthias Klose Tue, 24 Jan 2017 14:00:42 +0100 python-defaults (2.7.13-1) unstable; urgency=medium [ Matthias Klose ] * Bump version to 2.7.13. * Mark python-doc as M-A: foreign. * Bump debhelper version. [ Helmut Grohne ] * Fix FTCBFS: Annotate python build dependencies with :any (Closes: #841682) [ Chris Lamb ] * Consistently order python substvars to support reproducibility (Closes: #844111) [ Scott Kitterman ] * Add Django specific binary naming policy to align to current practice. -- Matthias Klose Tue, 20 Dec 2016 11:15:12 +0100 python-defaults (2.7.11-2) unstable; urgency=medium [ Scott Kitterman ] * Python policy updates for Stretch (Many thanks to Ben Finney for all the updates) - Change focus in text to python3 - Remove/deprecate features no longer needed due to only a single Python 2 version - Discuss update process in more detail - Revamp tools section to better align to current practice [ Matthias Klose ] * Update valgrind suppression file. Issue #12612. LP: #1512622. * Rebuild to pick up the GNU triplet change on i386 archs. Addresses: #826128. -- Matthias Klose Fri, 03 Jun 2016 01:29:55 +0200 python-defaults (2.7.11-1) unstable; urgency=medium * Bump version to 2.7.11. * Stop shipping menu files. * Fix some lintian warnings. -- Matthias Klose Wed, 09 Dec 2015 13:07:35 +0100 python-defaults (2.7.9-1) unstable; urgency=medium * Bump version to 2.7.9. -- Matthias Klose Mon, 16 Mar 2015 23:32:04 +0100 python-defaults (2.7.8-4) unstable; urgency=medium [ Barry Warsaw ] * Update policy document to clarify the purpose and use of the wheel files. No actual change in policy is made. -- Scott Kitterman Mon, 02 Mar 2015 15:45:19 -0500 python-defaults (2.7.8-3) unstable; urgency=medium [ Michael Gilbert ] * Make python-minimal a pre-dependency for python (closes: #769106). -- Scott Kitterman Mon, 02 Feb 2015 16:12:38 -0500 python-defaults (2.7.8-2) unstable; urgency=medium [ Matthias Klose ] * Build-depend on python2.7 and dpkg-dev versions to consistently generate the i586-* symlinks. Closes: #758301. [ Piotr Ożarowski ] * dh_python2: add a warning abount missing dh-python in Build-Depends [ Scott Kitterman ] * Minor updates to python policy - Reflect disuse of pyshared directory in favor of /usr/lib/python2.7/ dist-packages since python2.7 is the last and only python version supported (Closes: #763451) - Update python-central information to reflect its removal from Jessie -- Scott Kitterman Fri, 24 Oct 2014 10:58:42 -0400 python-defaults (2.7.8-1) unstable; urgency=medium [ Barry Warsaw ] * Fix typo in policy doc re: wheel package exception list. * Add myself to Uploaders. [ Scott Kitterman ] * Fix error in pydist package relationship regex (Closes: #735163) - Thanks to Rafael Laboissiere for the patch * Switch from using lsb-release to dpkg-vendor to determine distro and drop lsb-release from build-depends (Closes: #751706) - Thanks to Peter Pentchev for the patch * Drop unused build-depends on libhtml-tree-perl * Clarify discussion of requirement to use python:Provides (Closes: #669346) * Add clarification of naming requirements for submocules (Closes: #701192) * Minor cleanups in debian/pyversions.py * Stop automatically regenerating static content (dh_python2 man pages and Python FAQ) and drop build-dep on python-docutils to ease bootstrapping (Closes: #754060) - Add direct build-dep on python-all to replace indirect build-dep * Bump version to 2.7.8 * Drop ancient Breaks on python-csv, python-bz2, and python-email -- Scott Kitterman Fri, 11 Jul 2014 17:10:37 -0400 python-defaults (2.7.6-2) unstable; urgency=medium [ Barry Warsaw ] * Add python policy for Python Wheels. -- Scott Kitterman Wed, 21 May 2014 00:04:16 -0400 python-defaults (2.7.6-1) unstable; urgency=medium * Bump version to 2.7.6. * dh_python2: no longer move files to /usr/share/pyshared, don't create /usr/lib/pyshared symlinks for extensions. * Use UTF-8 encoding for the python policy in HTML format. Closes: #689931. * Add a chapter for the python policy to prefer Python 3 over Python 2. -- Matthias Klose Mon, 12 May 2014 12:16:34 +0200 python-defaults (2.7.5-5) unstable; urgency=low [ Steve Langasek ] * Adjust debpython/depends.py to be multiarch-friendly. [ Piotr Ożarowski ] * Set "Multi-Arch: allowed" in python, python-dev, python-minimal, python-dbg, python-all, python-all-dev, python-all-dbg * Replace /usr/bin/dh_python2 with a Python script that invokes dh-python's dh_python2 if Build-Depends{,-Indep} contains dh-python -- Piotr Ożarowski Thu, 12 Sep 2013 21:25:01 +0200 python-defaults (2.7.5-4) unstable; urgency=low * Add libpython-all-dbg.postinst to convert the doc directory to a symlink on upgrade (Closes: #718736) -- Scott Kitterman Tue, 13 Aug 2013 00:23:58 -0400 python-defaults (2.7.5-3) unstable; urgency=low [ Matthias Klose ] * Fix libpython-all-dbg doc dir symlink. Closes: #712270. [ Piotr Ożarowski ] * Replace /usr/bin/dh_python2 with a shell script that invokes dh-python's dh_python2 if debian/control mentions dh-python * dh_python2: warnings about --install-layout=deb and translating dependencies are just an info now -- Piotr Ożarowski Fri, 02 Aug 2013 08:54:32 +0200 python-defaults (2.7.5-2) unstable; urgency=low * Add dependencies on the new libpython-{stdlib,all-dev,all-dbg} packages. -- Matthias Klose Thu, 13 Jun 2013 15:07:18 +0200 python-defaults (2.7.5-1) unstable; urgency=low [ Matthias Klose ] * Bump version to 2.7.5. * Drop python2.6 as a supported python version. * Bump standards version to 3.9.4. * Start building the libpython-stdlib, libpython-all-dev, libpython-all-dbg packages. * Drop Python 2.6 as a supported Python version. * Fix some lintian warnings. [ Scott Kitterman ] * When X(S)-Python-Version or debian/pyversions is not present, do not describe them as missing, just indicate they are not there -- Matthias Klose Thu, 06 Jun 2013 14:57:03 +0200 python-defaults (2.7.3-13) experimental; urgency=low * Always build the policy files. -- Matthias Klose Thu, 28 Feb 2013 16:46:08 +0100 python-defaults (2.7.3-12) experimental; urgency=low * Move python-docutils to build-depends (from build-depends-indep). -- Matthias Klose Thu, 28 Feb 2013 15:58:09 +0100 python-defaults (2.7.3-11) experimental; urgency=low * Add Multi-Arch: same packages libpython-all-{dev,dbg} (not yet built, python2.6 doesn't have support for multiarch). * python-dbg: Stop providing python-gdbm-dbg, python-tk-dbg. Closes: #700716. * Add a libpython-stdlib package (not yet built). -- Matthias Klose Thu, 28 Feb 2013 14:43:06 +0100 python-defaults (2.7.3-10) experimental; urgency=low * Build dependency packages as architecture dependent packages. * Make python, python-{minimal,dev,dbg} Multi-Arch: allowed. * Build Multi-Arch: any packages libpython-{dev,dbg} packages providing $(DEB_HOST_GNU_TYPE/DEB_HOST_MULTIARCH)-python-config symlinks. * Provide python2 symlinks. -- Matthias Klose Wed, 12 Dec 2012 00:25:00 +0100 python-defaults (2.7.3-5) unstable; urgency=low * Drop Python 2.6 as a supported Python version. -- Matthias Klose Mon, 06 May 2013 02:48:48 +0200 python-defaults (2.7.3-4) unstable; urgency=low [ Dmitry Shachnev ] * Revert previous prerm/postrm changes: - prerm is never called as `prerm purge`. - configuration files shouldn't be deleted on package remove. -- Scott Kitterman Fri, 08 Feb 2013 16:26:12 -0500 python-defaults (2.7.3-3) unstable; urgency=low [ Piotr Ożarowski ] * dh_python2: - no longer sensitive to trailing slash in private dir names (closes: #686358) - ignore /usr/bin/python3 shebangs in all packages, not just in python3-* ones - generates correct "python (<< 2.X)" dependencies for packages with private Python extensions (typo fixed) * pyversions.py: fix parsing DEBPYTHON_SUPPORTED env. variable (versions should be separated using comma, as in debian_defaults config file) [ Dmitry Shachnev ] * debian/python.{pre,post}rm.in: Handle purge command the same way as remove (thanks to Mitsuya Shibata for the bug report) -- Piotr Ożarowski Sun, 21 Oct 2012 22:40:55 +0200 python-defaults (2.7.3-2) unstable; urgency=low * dh_python2: ignore empty files while trying to normalize shebangs (Closes: #680793) * Fix lack of python-imaging in pydist/dist_fallback - Add python-imaging override to pydist/generate_fallback_list.py - pydist/dist_fallback: Regenerate to add python-imaging (which wasn't recognized before due to .pth file) along with a few automatic adjustments -- Piotr Ożarowski Thu, 26 Jul 2012 23:03:32 +0200 python-defaults (2.7.3-1) unstable; urgency=low [ Piotr Ożarowski ] * dh_python2: - remove even more \.so.* dangling symlinks, thanks to Stefano Rivera for providing a test case - rewrite shebangs by default (disable via --no-shebang-rewrite), examples: + "/usr/bin/env python*" → "/usr/bin/python*" + "/usr/local/bin/python foo" → "/usr/bin/python foo" + "/usr/bin/python2" → "/usr/bin/python" - new --shebang option to replace all shebangs in bin dirs (example: --shebang /usr/bin/python2.6) - no longer generates python2.X | python2.Y depenendies for public modules (Closes: 625740) - translate Python version numbers into Debian ones for those require.txt items that have a pydist file with (uscan like) rules or PEP386 flag (Closes: #653740) * Improve dh_python2 manpage a bit, add information about cleaning debug packages (Closes: #653741) * pyversions, dh_python2, pycompile: allow to override system's list of supported Python versions via DEBPYTHON_SUPPORTED and default Python version via DEBPYTHON_DEFAULT env. variables * Debhelper's python2 sequence now inserts dh_python2 before dh_installinit (closes: 670418) [ Scott Kitterman ] * Bump upstream version to match current unstable/wheezy python2.7 version -- Piotr Ożarowski Sat, 30 Jun 2012 20:23:59 +0200 python-defaults (2.7.3~rc2-1) unstable; urgency=low [ Scott Kitterman ] * Bump minimum debhelper version to 8 so all tests will run - dh_python2 tests 1 - 5 require dh 7 and test 6 needs dh 8 * Move idle.xpm symlink from python to idle and add Breaks/Replaces * Move /usr/bin/pyversions from python to python-minimal since that's where the actual script it's a symlink to lives, add Breaks/Replaces * Bump standards version to 3.9.3 without further change * Correct Python package names with hyphens in them being ignored (Closes: #657665) * Drop -n from /usr/bin/idle invocations in debian/idle.desktop and debian/idle.menu (Closes: #482156) * Update Python policy - Describe addition of /usr/bin/python2 due to upstream changes - Remove redundant text on Python provides and clarify when they should be used - Update description of functionality related to X-Python-Version for Wheezy - Update X/XS-Python-Versions to also include X-Python-Version examples - Add appropriage Breaks/Replaces * Bump upstream version to match current unstable/wheezy python2.7 version [ Piotr Ożarowski ] * dh_python2, pyversions: make comparison of X(S)-Python-Version field names case-insensitive (Closes: #676224) -- Scott Kitterman Tue, 05 Jun 2012 22:43:11 -0400 python-defaults (2.7.2-10) unstable; urgency=low [ Matthias Klose ] * dh_python2: For argparse eggs, generate dependencies of the form "python (>= 2.7) | python-argparse". Closes: #653644, #657119. * Regenerate pydist/dist_fallback. [ Piotr Ożarowski ] * pycompile: fix -O option * dh_python2: do not try to add python2.X dependency if private dir works with all Python versions -- Matthias Klose Tue, 24 Jan 2012 11:49:24 +0100 python-defaults (2.7.2-9) unstable; urgency=low * Generate correct dependencies if private directory supports one Python version only (closes: #644573) -- Piotr Ożarowski Sat, 08 Oct 2011 17:16:46 +0200 python-defaults (2.7.2-8) unstable; urgency=high * Fix update-manager Breaks (Closes: #644491) -- Scott Kitterman Thu, 06 Oct 2011 15:48:06 -0500 python-defaults (2.7.2-7) unstable; urgency=low * Adjust version numbers for upload to unstable. * python: Break update-manager (<= 0.200.5-1). -- Matthias Klose Tue, 27 Sep 2011 18:21:42 +0200 python-defaults (2.7.2-6) experimental; urgency=low [ Scott Kitterman ] * Fixed typo in python-policy (thanks to Jakub Wilk) [ Piotr Ożarowski ] * dh_python2: - handle private dir paths without leading slash - add python to Depends if unversioned python shebang is detected in private directory - dist_fallback: add /usr/share/python-support/package/ to paths searched for Egg metadata; add "wsgiref" and "python" fallbacks - do not try to remove .so.foo symlinks twice (if files were listed in an unfortunate order) -- Piotr Ożarowski Sat, 24 Sep 2011 16:36:29 +0200 python-defaults (2.7.2-5) experimental; urgency=low [ Piotr Ożarowski ] * dh_python2: - generates rtupdate scripts for private directories that compile files from given package only, add --compile-all to dh_python2's call if you want the old behaviour (i.e. compile also files (plugins?) provided by other packages, which do not use a helper/bytecompile them) - add --no-dbg-cleaning option (to disable removing files from debug packages) - fix handling "distname[features]" in debpython.pydist.guess_dependency (closes: 636255) * pyclean now accepts --package and private dir argument at the same time [ Scott Kitterman ] * debpyhton/pydist: Incorporate patch from Jonathan Lange to stop printing to stderr (LP: #812960) * Add Piotr Ożarowski back to Uploaders -- Scott Kitterman Mon, 08 Aug 2011 10:28:50 -0400 python-defaults (2.7.2-4) experimental; urgency=low [ Piotr Ożarowski ] * dh_python2: - no longer moves .so.foo files to pyshared dir (closes: 635316) - replaces .so symlinks with .so.foo files in dist-packages [ Scott Kitterman ] * Drop python2 symlink pending further discussion (closes: 634967) * Update recent Python policy changes based on feedback from Debian Python -- Scott Kitterman Wed, 27 Jul 2011 10:15:38 -0400 python-defaults (2.7.2-3) experimental; urgency=low * python: Provide python profiler. * Provide a python2 symlink according to PEP 394. * Bump standards version. * Fix some lintian warnings. * Add 2to3.1 manual page symlink. -- Matthias Klose Sun, 10 Jul 2011 20:57:27 +0200 python-defaults (2.7.2-2) experimental; urgency=low [ Piotr Ożarowski ] * dh_python2: - no longer generates maintainer scripts that invoke pycentral's pkgremove script, use --clean-pycentral if you want the old behaviour - egg-info directories are parsed even if cleaning the name was necessary (thanks to Arnaud Fontaine for the patch) - private directory names with apostrophes are escaped properly in maintainer script's -X arguments (thanks to Jakub Wilk for the patch) - deal with original symlinks more carefully (closes: 627969, thanks to Leonid Borisenko for the original patch) - add --ignore-shebangs option that will disable translating shebangs into Debian dependencies - add --ignore-namespace option that will disable handling Egg-info's namespace_packages.txt (AKA namespace feature) - PyDist: update dist_fallback file (with atypical Debian package names) - disable PyDist feature if dh sequencer is invoked --with pydeb (closes: 630502, thanks to Gediminas Paulauskas for the original patch) - warn if public Python extension is linked to libpython2.X, fail if it's linked to a wrong version - warn if both XS-Python-Version and X-Python-Version are defined - private dirs: if there is more than one Python version parsed from shebangs, byte-compile the dir with default Python version (or the one requested via X-Python-Version) instead od failing. Add dependency for each (supported) interpreter detected in shebangs - /usr/share/pyshared is not added to the package if empty (closes: 623909) - dh_python2's manpage updated (among other changes, no longer advertises python:Breaks - closes: 631397, describes .pyinstall and .pyremove files) - remove setuptools from requires.txt (it is replaced with python-pkg-resources Debian dependency) - "--namespace foo" no longer triggers .../dist-packages/bar/foo/__init__.py creation, use "--namespace bar.foo" instead [ Scott Kitterman ] * Python policy: - Add deprecation information about python-central and python-support - Clarify Python module and package descriptions -- Scott Kitterman Thu, 07 Jul 2011 01:06:08 -0400 python-defaults (2.7.2-1) experimental; urgency=low [ Piotr Ożarowski ] * dh_python2: generate more strict dependencies for packages with private extensions (closes: #625760) [ Scott Kitterman ] * Set python2.7 as default for testing in experimental - Update version references in patching file debian/control, control.in, debian_defaults, python.postinst.in, python.preinst.in, pyversions.py, and rules -- Scott Kitterman Tue, 31 May 2011 07:44:33 -0400 python-defaults (2.6.6-14) unstable; urgency=low [ Piotr Ożarowski ] * python.mk: add py_builddir macro. $(call py_builddir, 2.6) returns "build/lib.linux-x86_64-2.6" on amd64 * dh_python2, pycompile, pyclean: add "namespace" feature: dh_python2 parses Egg's namespace_packages.txt files (in addition to --namespace command line argument(s)) and drops empty __init__.py files from binary package. pycompile will regenerates them at install time and pyclean will remove them at uninstall time (if they're no longer used in installed packages * Remove myself from Uploaders [ Scott Kitterman ] * Upload to Unstable (adds Python 2.7 as a supported Python in Unstable) * Drop python2.5 as a supported Python version - Update debian/debian_defaults - Update debpython/version.py - Update debian/control.in * Update copyright years for dh_python2, pycompile, pyclean and debpython in debian/copyright -- Scott Kitterman Fri, 15 Apr 2011 00:04:07 -0400 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 Mon, 21 Mar 2011 10:53:42 -0400 python-defaults (2.6.6-12) unstable; urgency=low [ Piotr Ożarowski ] * dh_python2: - use Depends: python (<< 2.X), python (>= 2.Y) rather than Breaks in packages with public modules (after a discussion on debian-devel mailing list) - do not try to check dangling symlinks's shebang (closes: 619005) [ Scott Kitterman ] * Start Python Policy updates for Wheezy: - Document current practice to not provide /usr/bin/python2 - Strengthen warning aginst using /usr/bin/env python - Update paths section for python2.7 and python3 - Deprecate XB-Python-Version - Clarify use of {python:Provides} - Clarify that build-dependencies on -dev packages should not be used except when required * Upload to unstable: - Drop python2.7 from supported versions, not ready for Python transition yet -- Scott Kitterman Mon, 21 Mar 2011 10:22:06 -0400 python-defaults (2.6.6-11) experimental; urgency=low * dh_python2 and pycompile: read /usr/share/python/debian_defaults to get default Python version and a list of supported Python versions * dh_python2: - fix parsing .pyinstall files (a space between file name and module name is now required) - replace a file with a symlink also if there's a matching one in pyshared directory already - add support for DH_OPTIONS env. variable - fix checking shebangs in private directories (executable bit wasn't checked correctly) - add test4 to test handling private directories - make egg-info files/dirs searches case insensitive (closes: #614910) * pycompile: - --exclude now works with private dirs - use /usr/bin/pythonX.Y rather than pythonX.Y (to avoid /usr/local interpreters) * rewrite dh_python2.1, pycompile.1 and pyclean.1 manpages in ReStructured Text, add quick guide for maintainers to dh_python2 manpage -- Piotr Ożarowski Mon, 28 Feb 2011 20:28:05 +0100 python-defaults (2.6.6-10) experimental; urgency=low * dh_python2: fix moving files from old debug locations (due to typo) * python-minimal now Breaks python-support << 1.0.12 (Python 2.7 support was added in 1.0.12) * pycompile: skip dangling symlinks -- Piotr Ożarowski Mon, 10 Jan 2011 23:05:47 +0100 python-defaults (2.6.6-9) experimental; urgency=low * dh_python2: fix a crash in packages with private extension (closes: 607555) - test3 added (to test architecture dependent packages) -- Piotr Ożarowski Sun, 19 Dec 2010 20:27:23 +0100 python-defaults (2.6.6-8) experimental; urgency=low * Fix typo in minimum required python version for packages generated with dh_python2 -- Piotr Ożarowski Sun, 19 Dec 2010 14:57:58 +0100 python-defaults (2.6.6-7) experimental; urgency=high * pycompile: - Don't over-optimize, check the timestamps of byte-code files. - Add options -f/--force, -O. - Copy stdout/stderr of py_compile processes in case of error. - Propagate the exit value of the py_compile processes. - Update manual page. * Bump depends to require the fixed pycompile for dh_python2 based package builds. * Don't touch the standard python library in rtupdate scripts. -- Matthias Klose Sun, 12 Dec 2010 17:46:13 +0100 python-defaults (2.6.6-6) experimental; urgency=low * dh_python2: - make the error message about missing extension more clear (and more verbose in --verbose mode) - install files listed in debian/pkg.pyinstall file as public modules for all requested Python versions (use dh_install's package.install files for private modules) - remove public modules listed in debian/pkg.pyremove (glob.glob pattern and version range can be used in both .pyinstall and .pyremove files) - create symlinks for files installed into /usr/share/pyshared/ if there are no other public modules available * pycompile: - `pycompile $DESTDIR/usr/lib/python*` will recognize public site-packages directories and use the right interpreter instead of raising KeyError - do not try to check if interpreter is present when version range is empty -- Piotr Ożarowski Wed, 01 Dec 2010 19:43:50 +0100 python-defaults (2.6.6-5) experimental; urgency=low * pycompile: if installed Python is requested via -V option, use it even if it's not in a list of supported Python versions (closes: 600529) -- Piotr Ożarowski Sun, 17 Oct 2010 23:22:22 +0200 python-defaults (2.6.6-4) 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-4) and python2.7 is installed. -- Matthias Klose Sat, 16 Oct 2010 11:58:31 +0200 python-defaults (2.6.6-3+squeeze5) unstable; urgency=low * dh_python2: fix moving files from old debug locations * pycompile: skip dangling symlinks to fix upgrade problem introduced in -3+squeeze3 (closes: 607988) -- Piotr Ożarowski Tue, 11 Jan 2011 22:14:56 +0100 python-defaults (2.6.6-3+squeeze4) unstable; urgency=medium * dh_python2: fix a crash in packages with private extension (closes: 607555) -- Piotr Ożarowski Sun, 19 Dec 2010 21:12:38 +0100 python-defaults (2.6.6-3+squeeze3) unstable; urgency=medium * pycompile: - Don't over-optimize, check the timestamps of byte-code files. - Add options -f/--force, -O. - Propagate the exit value of the py_compile processes. - Update manual page. * Bump depends to require the fixed pycompile for dh_python2 based package builds. * Don't touch the standard python library in rtupdate scripts. -- Matthias Klose Sun, 12 Dec 2010 22:23:03 +0100 python-defaults (2.6.6-3+squeeze2) unstable; urgency=low * pycompile: - `pycompile $DESTDIR/usr/lib/python*` will recognize public site-packages directories and use the right interpreter instead of raising KeyError - do not try to check if interpreter is present when version range is empty (closes: 605356) -- Piotr Ożarowski Tue, 30 Nov 2010 19:57:51 +0100 python-defaults (2.6.6-3+squeeze1) unstable; urgency=medium * pycompile: if installed Python is requested via -V option, use it even if it's not in a list of supported Python versions -- Piotr Ożarowski Mon, 18 Oct 2010 19:04:55 +0200 python-defaults (2.6.6-3) unstable; urgency=low * Upload to unstable * dh_python2: egg renaming fixed -- Piotr Ożarowski Wed, 22 Sep 2010 23:03:15 +0200 python-defaults (2.6.6-2) experimental; urgency=low [ Piotr Ożarowski ] * Add README.derivatives (source package) * dh_python2: - add dist_fallback file with a list of Python distribution name and Debian package name pairs (to be used as a fall back source for PyDist feature) - if dist_fallback and `dpkg -S` fails to find the right package name, fall back to package name recommended by Debian Python Policy (use debian/pydist-overrides file to override) - disable PyDist feature if dh_pydeb is in debian/rules * Use versioned interpreter name rather than "python" only in python-minimal.postinst (closes: 595826) [ Matthias Klose ] * python.mk (py_libdir): Return /usr/lib/python3/dist-packages for 3.x versions. * python.mk (py_pkgname): New macro to refer the package name depending on the python version. -- Piotr Ożarowski Sun, 12 Sep 2010 18:41:04 +0200 python-defaults (2.6.6-1) unstable; urgency=low [ Piotr Ożarowski ] * dh_python2: typo in --help output fixed (thanks to Adam D. Barratt) * Bump python-minimal's Breaks of python2.5-minimal to << 2.5.5-7 (due to missing runpy module) * Set the right minimum required python package version in packages with private modules [ Scott Kitterman ] * debian/python-policy.sgml and debian/pyversions.py fix typos (thanks to Adam D. Barratt) [ Matthias Klose ] * Bump version to 2.6.6. -- Piotr Ożarowski Tue, 31 Aug 2010 19:09:30 +0200 python-defaults (2.6.5-13) unstable; urgency=low [ Scott Kitterman ] * Python policy changes for X-Python-Version and X-Python3-Version - Minimum changes for Squeeze * In pyversions, do not silently ignore Python 3 versions * Add support for X-Python-Version to match X-Python3-Version [ Piotr Ożarowski ] * Fix documentation typo in pycompile/pycompile.1 * dh_python2: - pass shallow=False to cmpfiles to make sure only exactly the same files are moved to pyshared - add support for X-Python-Version -- Piotr Ożarowski Fri, 13 Aug 2010 22:39:37 +0200 python-defaults (2.6.5-12) unstable; urgency=low * pycompile: do not hang if interpreters are not started in the same order as they're used (LP: #613675) * Add manpage for dh_python2, pycompile and pyclean * Standards-Version bumped to 3.9.1 (no other changes required) -- Piotr Ożarowski Thu, 05 Aug 2010 19:15:52 -0400 python-defaults (2.6.5-11) unstable; urgency=medium * Add README.PyDist to python-doc package * pycompile: compile public module for the right Python version (really closes: 590224) * dh_python2: rename --depend to --depends, --recommend to --recommends and --suggest to --suggests -- Piotr Ożarowski Tue, 27 Jul 2010 21:25:54 +0200 python-defaults (2.6.5-10) unstable; urgency=medium * dh_python2: - add --depend, --recommend and --suggest command line options (use it if requires.txt doesn't contain dependency that package needs) - add {/usr,}/sbin to the list of directories with checked shebangs * pycompile: do not exit before all background byte compilation is finished (closes: 590224) -- Piotr Ożarowski Sun, 25 Jul 2010 12:34:56 +0200 python-defaults (2.6.5-9) unstable; urgency=low [ Piotr Ożarowski ] * pyclean, pycompile: use .communicate() instead of .wait() to avoid hanging `dpkg -L PACKAGE` in few situations * dh_python2: follow Distribute and replace all non-alphanumeric characters with underscore in distribution name [ Matthias Klose ] * Require python (>= 2.6.5-9~) in generated dependencies to use the fixed pycompile. -- Piotr Ożarowski Mon, 19 Jul 2010 20:27:50 +0200 python-defaults (2.6.5-8) unstable; urgency=low * Revert: - python-minimal: Provide symlink to binary and manpage for /usr/bin/python2. This interpreter name is not created in the upstream sources. python should be used instead. -- Matthias Klose Sat, 17 Jul 2010 13:10:06 +0200 python-defaults (2.6.5-7) unstable; urgency=low * pyversions.py: fall back to the list of supported Python versions if debian/pyversions doesn't exist (as in -5, closes: 588820, thanks to Vincent Legout) -- Piotr Ożarowski Mon, 12 Jul 2010 19:15:17 +0200 python-defaults (2.6.5-6) unstable; urgency=low [ Piotr Ożarowski ] * dh_python2: - invoke `pycentral pkgremove PACKAGE` in preinst if upgrading from python-central based packages - block python package transitions via ${python:Breaks} or ${python:Depends} (Breaks will be used if available) - recognize more requires.txt patterns in debpython.pydist * pyversions.py: - print error message if file cannot be opened (closes: 521508, thanks to Carl Chenet for the original patch) - print nice error message if computed set of supported versions is empty (closes: 583392) * debian/rules: do not ignore errors (two more `set -e`s added, closes: 397499) * python-doc now suggests python-examples (closes: #585774) * python package doesn't conflict with python2.1 and python2.3 anymore (2.1 and 2.3 are no longer in Debian) * Standards-Version bumped to 3.9.0: - some packages moved from Conflicts to versioned Breaks - Homepage field added [ Scott Kitterman ] * Merge changes back from Ubuntu package: - Tighten ${binary:Version} depends relationships to "=" - python: Add an unversioned `2to3' binary - python-minimal: Provide symlink to binary and manpage for /usr/bin/python2 (Closes: #566266) * Update hard coded fallbacks in debian/pyversions.py to add python2.6 to supported versions and to make it the default version -- Piotr Ożarowski Sun, 11 Jul 2010 17:08:19 +0200 python-defaults (2.6.5-5) unstable; urgency=medium * Use Python's compileall module instead of pycompile to byte-compile debpython module as logging module is not available in pythonX.Y-minimal package (Closes: 586743) -- Piotr Ożarowski Tue, 22 Jun 2010 10:46:48 +0200 python-defaults (2.6.5-4) unstable; urgency=low [ Piotr Ożarowski ] * dh_python2: - fix parsing "XS-Python-Version: X.Y" - ignore everything after ", >= 3" in XS-Python-Version * Add python-minimal.{postinst,prerm} files to handle .py files byte-compilation [ Scott Kitterman ] * Additonal Python 3 related policy changes: - Clarify that helper specific policy does not apply to Python 3 -- Piotr Ożarowski Mon, 21 Jun 2010 23:50:22 +0200 python-defaults (2.6.5-3) unstable; urgency=low * Remove '-V' option from pyclean call in runtime.d/public_modules.rtremove * Add ${misc:Depends} to Depends in all binary packages * Add Vcs-Browser field * Add some lintian overrides (for false positives) - bump minimum required debhelper version to 6.0.7 (due to dh_lintian) -- Piotr Ożarowski Fri, 18 Jun 2010 10:25:59 +0200 python-defaults (2.6.5-2) unstable; urgency=low [ Piotr Ożarowski ] * dh_python2: - create extension symlinks in /usr/lib/pyshared/pythonX.Y - add support for debian/pydist-overrides - add dh sequence file (use "--with python2" in debian/rules) - some bugs fixed - moved from python-dev to python package * Support for Python3 removed in dh_python2, pycompile and pyclean (moved to python3-defaults) * debian/copyright: Add a note about dh_python2, pycompile, pyclean and the debpython package. * Add myself to Uploaders [ Scott Kitterman ] * debian/pyversions.py: Exclude python3 versions from results - those are handled by py3versions in python3-defaults * Update debian/copyright from LICENSE in python2.6 (Closes: #446671) * Update debian/python-policy.sgml to cover py3versions, py(3)versions as the only defined interface for determining supported/default python versions in Debian, and run time separation of python and python3 as two distinct systems * In debian/python-policy.sgml specify the correct debian/control paragraphs for XS/XB-Python-Version (Closes: #567941) - Thanks to Loïc Minier for the patch [ Matthias Klose ] * Depend on python2.6 version including the fix for issue #8223. * Don't allow installation of a mix of defaults packages for different python versions. Closes: #583683. -- Matthias Klose Thu, 17 Jun 2010 23:47:08 +0200 python-defaults (2.6.5-1) experimental; urgency=low [ Matthias Klose ] * Bump version to 2.6.5. * Make python2.6 the default Python version. * Build a python-doc package. * python: Update the valgrind file to 2.6. [ Piotr Ozarowski ] * python-minimal: Install pycompile and pyclean binaries. * Add lsb-release to Build-Depends * Add dh_python2 stuff -- Matthias Klose Fri, 14 May 2010 18:50:21 +0200 python-defaults (2.5.4-9) unstable; urgency=low * python-all-dev: Fix typo in dependency list. Closes: #566278. -- Matthias Klose Fri, 22 Jan 2010 18:38:31 +0100 python-defaults (2.5.4-6) unstable; urgency=low * Add python2.6 as a supported Python version. * python-all{,-dev,-dbg}: Depend on the 2.6 packages. * Run the rtinstall script, when 2.5 became a supported version (2.4.4-3) and python2.5 is installed. * Run the rtinstall script, when 2.6 became a supported version (2.5.4-6) and python2.6 is installed. Closes: #565952. * Fix reference to list of modules in the python-minimal package. Closes: #558403. -- Matthias Klose Sun, 17 Jan 2010 01:38:21 +0100 python-defaults (2.5.4-5) unstable; urgency=low * Fix typos from policy update (Closes: #561091, #561093) * Drop python2.4 as a supported Python - Remove python2.4 depends and update descriptions for python-all, python-all-dev, and python-all-dbg - Drop python2.4 from supported versions and add to old and unsupported versions - Update pyversions.py to drop python2.4 from the supported list * Correct path to Konsole Python desktop file (Closes: #381659) -- Scott Kitterman Wed, 23 Dec 2009 19:59:15 -0500 python-defaults (2.5.4-4) unstable; urgency=low [ Scott Kitterman ] * Update Python Policy to match current packaging practice: - Major overall update. - Remove extraneous paragraph from Provides section. (Closes: #415213) - Remove obsolete mentions of dh_python. (Closes: #527009) - Fix policy typo. (Closes: #523226) - Add pointer to doc of the site module for site-specific paths. (Closes: #287197) - Correct package dependency rules (Closes: #379455) * Move debhelper from build-depends-indep to build-depends to satisfy clean requirements. * Drop unneeded build-depends-indep on python. * Bump standards version to 3.8.3. * Drop deprecated dh_desktop from debian/rules. * Move dbg packages to section debug. * Make python-all-dbg priority extra. * Remove redundant debian/FAQ.html. * Update (= ${Source-Version}) depends to (>= ${binary:Version}). * Correct Idle depends and description (Closes: #482163). * Update python version reference in README.Debian (Closes: #494068). * Update Debian menu section for idle. * Fix capitalization of Python in the python-dev descriptions. * Add myself to uploaders. [ Matthias Klose ] * python-{dev,dbg}-dev: Add bogus dependencies on python to work around lintian's broken usr-share-doc-symlink-without-dependency check. -- Scott Kitterman Mon, 14 Dec 2009 06:03:32 -0500 python-defaults (2.5.4-2) unstable; urgency=high * python-all*: Tighten the dependencies on the python-* packages. -- Matthias Klose Thu, 26 Feb 2009 12:44:47 +0000 python-defaults (2.5.4-1) unstable; urgency=medium * Depend on python2.5-2.5.4. * python: Install /usr/share/python/python.mk, helper functions for getting the python library dir and install args for distutils installs. * Accept initial blank line in debian/control when parsing version information. -- Matthias Klose Wed, 25 Feb 2009 02:19:09 +0000 python-defaults (2.5.2-3) unstable; urgency=low * python: Provide python-ctypes and python-wsgiref. -- Matthias Klose Sat, 01 Nov 2008 09:15:19 +0100 python-defaults (2.5.2-2) unstable; urgency=low * python: Provide python-plistlib. * python-minimal: Recommend python (suggested by Neil McGovern). -- Matthias Klose Sat, 26 Jul 2008 02:37:00 +0200 python-defaults (2.5.2-1) unstable; urgency=low * Maintainer upload; asking the Release Team to better coordinate things. Being in contact with two members of the release team for two or three weeks when to upload without getting in the way of other transitions, an unannounced upload of a third member of this team is at least surprising. * debian/python.postinst.in: Fix the bug introduced in the NMU, run the rtupdate hooks when upgrading from a version < 2.5.2-1. Closes: #476095. -- Matthias Klose Thu, 17 Apr 2008 20:32:59 +0200 python-defaults (2.5.2-0.1) unstable; urgency=low * NMU by the Release Team not to lose the sweet spot for the Python transition. * Make python2.5 the default Python version. -- Adeodato Simó Sun, 13 Apr 2008 11:29:32 +0200 python-defaults (2.4.4-6) unstable; urgency=low * python.postinst: Fix cleanup of temporary files. Closes: #424703, #424704. -- Matthias Klose Thu, 17 May 2007 08:17:16 +0200 python-defaults (2.4.4-5) unstable; urgency=low * Run the python2.5 rtinstall hooks, if python2.5 was already installed as an unsupported version. -- Matthias Klose Wed, 16 May 2007 21:19:51 +0200 python-defaults (2.4.4-4) unstable; urgency=low * New package python-all-dbg. -- Matthias Klose Fri, 04 May 2007 06:56:27 +0200 python-defaults (2.4.4-3) unstable; urgency=low * Add python2.5 as a supported python version. * Depend on python2.4 packages (>= 2.4.4-4), built for ldbl128 on alpha, powerpc, s390, sparc. * python-all*: Depend on python2.5 packages (>= 2.4.5-1), built for ldbl128 on alpha, powerpc, s390, sparc. * Merge pyversions.py changes from python-central. * Merge changes from Ubuntu: - Add a sanity check, that /usr/bin/python points to the default python version. Users tend to modify this symlink, which then breaks stuff in obscure ways. Ubuntu #75557, closes: #418002. - python-dbg: Provide python-gdbm-dbg, python-tk-dbg, link to README.debug, SpecialBuilds.txt.gz. - python-dev: Add an unversioned python-config binary (backport from python2.5 (appears in python2.4 2.4.4-4). - Robustify building the faq html pages. - Make the suggestions of various packages versioned. * Update the upstream FAQ. -- Matthias Klose Fri, 4 May 2007 06:05:12 +0200 python-defaults (2.4.4-2) unstable; urgency=medium * python-all{,-dev}: Drop dependencies on python2.3{,-dev}. -- Matthias Klose Sat, 16 Dec 2006 15:42:21 +0100 python-defaults (2.4.4-1) unstable; urgency=medium * Depend on the 2.4.4 versions of the packages. * Sync pyversions.py with python-central. * Move 2.3 to old-versions, from supported-versions. * Add 2.5 to unsupported-versions. -- Matthias Klose Sun, 29 Oct 2006 11:06:39 +0100 python-defaults (2.4.3-11) unstable; urgency=low * Add a conflict to python-central (<< 0.5.5). -- Matthias Klose Sun, 13 Aug 2006 19:32:59 +0000 python-defaults (2.4.3-10) unstable; urgency=low * Upload to unstable. Closes: #347440, #360851. * Let the preinst fail on the first failing pre-rtupdate hook, after running the corresponding failed-pre-rtupdate hook. * Reflect renaming of the docutils binaries. Closes: #377601. * Update the upstream FAQ. -- Matthias Klose Sat, 12 Aug 2006 20:28:30 +0200 python-defaults (2.4.3-9) experimental; urgency=low * Fix syntax error in python.preinst. Closes: #381673. -- Matthias Klose Sun, 6 Aug 2006 12:39:34 +0000 python-defaults (2.4.3-8) experimental; urgency=low * idle: Depend on python-tk, add desktop and menu files. -- Matthias Klose Sat, 5 Aug 2006 18:38:31 +0000 python-defaults (2.4.3-7) experimental; urgency=low * Update pyversions.py from 2.3.5-11. * Fix pyversions(1), -r takes exactly one parameter. * idle: Remove the dependency on idle-pythonX.Y, add start script and man page. -- Matthias Klose Sat, 5 Aug 2006 17:34:43 +0000 python-defaults (2.4.3-6) experimental; urgency=low * Remove python's dependency on python-central. Closes: #372658. * On upgrade of the runtime to a new major version, call the hooks (executable files) in /usr/share/python/runtime.d/*.rtupdate. - in python.preinst, call the script with parameters pre-rtupdate . run all hooks, then return exit with the correct exit status. - in python.postinst, call the script with parameters rtupdate . run all hooks, then return exit with the correct exit status. - in python.postinst, call the script with parameters post-rtupdate . run all hooks, then return exit with the correct exit status. * pyversions -r: If the XS-Python-Version field cannot be found in debian/control, fall back to debian/pyversions for the version information. Return with an error code, if the intersection of the versions in debian/pyversions and the supported python versions is empty. Fall back to the supported versions if no version information can be found. Based on a patch from Raphael Hertzog. * Reflect renaming of the docutils binaries. Closes: #377601. -- Matthias Klose Sat, 5 Aug 2006 17:54:43 +0200 python-defaults (2.4.3-5) experimental; urgency=low * Tighten dependencies between packages built from this source. A versioned dependency on python-all / python-all-dev is enough to depend on the same version of python / python-dev. * python: Conflict with python-central (<< 0.4.17). * python: Depend on a python2.4 built for the updated Python policy. * python: Conflict with a python2.3 using the old Python policy. -- Matthias Klose Fri, 16 Jun 2006 18:15:00 +0200 python-defaults (2.4.3-4) experimental; urgency=low * Include version 0.4.1.0 of the python policy. * Fix 'pyversions -i'. -- Matthias Klose Tue, 13 Jun 2006 09:44:22 +0200 python-defaults (2.4.3-3) experimental; urgency=low * Point to the draft of the reworked Python policy. * Fix 'pyversions -r current' (Raphael Hertzog). -- Matthias Klose Mon, 12 Jun 2006 13:40:52 +0200 python-defaults (2.4.3-02) experimental; urgency=low * Really do not build python-doc. -- Matthias Klose Sun, 11 Jun 2006 23:25:02 +0000 python-defaults (2.4.3-01) experimental; urgency=low * Do not build the python-doc package from this source. -- Matthias Klose Sun, 11 Jun 2006 23:59:17 +0200 python-defaults (2.4.3-0) experimental; urgency=low * Upload to experimental. * Do not build the python-tk and python-gdbm packages from this source. * Let the -all packages depend on the default packages (closes: #365219). * Add /usr/share/python/debian_defaults for some default values (i.e. the supported python versions). * Add /etc/python/debian_config for byte-compilation options. * Add a pyversions script to give information about python versions and parse the XS-Python-Version attribute. -- Matthias Klose Sun, 11 Jun 2006 12:57:03 +0000 python-defaults (2.4.2-1) unstable; urgency=low * Change the default python version to 2.4. * Depend on python-central. -- Matthias Klose Thu, 12 Jan 2006 01:16:10 +0000 python-defaults (2.3.5-4) unstable; urgency=low * Add a package python-minimal. This package still depends on python2.3, will depend on python2.4-minimal when changing the default python version. * Add two dependency packages python-all and python-all-dev. These packages are used as build dependencies to determine the set of python version and implementations, which should be / currently are supported. Currently it depends on python2.3 and python2.4. Future versions may add an updated version of jython and ironpython. * Update FAQ. -- Matthias Klose Thu, 12 Jan 2006 00:32:32 +0100 python-defaults (2.3.5-3) unstable; urgency=low * Add python-dbg package. * debian/control.in: idle enhances python. -- Matthias Klose Sun, 19 Jun 2005 13:49:16 +0200 python-defaults (2.3.5-2) unstable; urgency=low * Add valgrind support file /usr/lib/valgrind/python.supp (closes: #291128). * python-doc: Add an conflict/replace to older python packages. Closes: #297266. -- Matthias Klose Sat, 19 Mar 2005 22:49:29 +0100 python-defaults (2.3.5-1) unstable; urgency=low * Depend on python-2.3.5 packages. * Update FAQ. * python suggests python-profiler. -- Matthias Klose Sat, 12 Feb 2005 19:26:48 +0100 python-defaults (2.3.4-6) unstable; urgency=low * Add an 'Enhances: konsole' to the python package (closes: #286161). -- Matthias Klose Sun, 16 Jan 2005 12:53:58 +0100 python-defaults (2.3.4-5) unstable; urgency=low * Add conflict/replaces to ooold python-base package (closes: #279035). -- Matthias Klose Sun, 14 Nov 2004 11:44:14 +0100 python-defaults (2.3.4-4) unstable; urgency=low * Regenerate control file after adding python-docutils build dependency. Closes: #270177. -- Matthias Klose Mon, 6 Sep 2004 07:19:49 +0200 python-defaults (2.3.4-3sid) unstable; urgency=low * Add build dependency on python-docutils (closes: #266550). -- Matthias Klose Wed, 18 Aug 2004 12:30:37 +0200 python-defaults (2.3.4-3) testing-proposed-updates; urgency=low * Unmodified 2.3.4-3sid, destination sarge, fixing build failure. -- Matthias Klose Fri, 20 Aug 2004 18:24:25 +0200 python-defaults (2.3.4-2sid) unstable; urgency=low * Add pdb and pdb.1 symlinks. * Update FAQ. -- Matthias Klose Tue, 17 Aug 2004 16:17:06 +0200 python-defaults (2.3.4-1) unstable; urgency=low * Depend on python-2.3.4 packages. * Update FAQ. -- Matthias Klose Mon, 10 May 2004 06:58:24 +0200 python-defaults (2.3.3-7) unstable; urgency=low * Fix symlinks to proposed policy files (closes: #234874). -- Matthias Klose Thu, 26 Feb 2004 22:28:07 +0100 python-defaults (2.3.3-6) unstable; urgency=low * Build the default packages from a separate source package to ease migration between python versions. * Update to the proposed python-policy: byte-compile using -E. -- Matthias Klose Wed, 4 Feb 2004 23:16:35 +0100 python-defaults-2.7.18/debian/compat0000644000000000000000000000000314100235331014236 0ustar 11 python-defaults-2.7.18/debian/control0000644000000000000000000002112414100235331014442 0ustar Source: python-defaults Section: python Priority: optional Maintainer: Matthias Klose Uploaders: Piotr Ożarowski Build-Depends: debhelper (>= 11~), dpkg-dev (>= 1.17.11), python2.7:any (>= 2.7.18~), lsb-release, python-all:any, python2.7:any (>= 2.7.18~), Standards-Version: 4.5.0 Homepage: https://www.python.org/ Vcs-Git: https://salsa.debian.org/cpython-team/python-defaults.git Vcs-Browser: https://salsa.debian.org/cpython-team/python-defaults Package: python-all Architecture: any Multi-Arch: allowed Depends: ${misc:Depends}, python2 (= ${binary:Version}), python2.7 (>= 2.7.2-3) Description: package depending on all supported Python2 runtime versions The package currently depends on python2.7, in the future, dependencies on jython (Python2 for a JVM) and ironpython (Python2 for Mono) may be added. . This package is a dependency package used as a build dependency for other packages to avoid hardcoded dependencies on specific Python2 runtimes. Package: python-all-dev Architecture: any Multi-Arch: allowed Depends: ${misc:Depends}, python2 (= ${binary:Version}), python-all (= ${binary:Version}), libpython-all-dev (= ${binary:Version}), python2-dev (= ${binary:Version}), python2.7-dev (>= 2.7-7) Description: package depending on all supported Python2 development packages The package currently depends on python2.7-dev, in the future, dependencies on jython (Python2 for a JVM) and ironpython (Python2 for Mono) may be added. . This package is a dependency package used as a build dependency for other packages to avoid hardcoded dependencies on specific Python2 development packages. Package: python-all-dbg Architecture: any Multi-Arch: allowed Section: debug Depends: ${misc:Depends}, python2 (= ${binary:Version}), python-all (= ${binary:Version}), libpython-all-dbg (= ${binary:Version}), python2-dbg (= ${binary:Version}), python2.7-dbg (>= 2.7-7) Description: package depending on all supported Python2 debugging packages The package currently depends on python2.7-dbg, in the future, dependencies on jython (Python for a JVM) and ironpython (Python2 for Mono) may be added. . This package is a dependency package used as a build dependency for other packages to avoid hardcoded dependencies on specific Python2 debug packages. Package: libpython-all-dev Architecture: any Multi-Arch: same Section: libdevel Depends: libpython2-dev (= ${binary:Version}), ${misc:Depends}, libpython2.7-dev Description: package depending on all supported Python2 development packages The package currently depends on libpython2.7-dev, in the future, dependencies on jython (Python2 for a JVM) and ironpython (Python2 for Mono) may be added. . This package is a dependency package used as a build dependency for other packages to avoid hardcoded dependencies on specific Python2 development packages. Package: libpython-all-dbg Architecture: any Multi-Arch: same Section: debug Depends: libpython2-dbg (= ${binary:Version}), ${misc:Depends}, libpython2.7-dbg Description: package depending on all supported Python2 debugging packages The package currently depends on libpython2.7-dbg, in the future, dependencies on jython (Python2 for a JVM) and ironpython (Python2 for Mono) may be added. . This package is a dependency package used as a build dependency for other packages to avoid hardcoded dependencies on specific Python2 debug packages. Package: python2 Architecture: any Multi-Arch: allowed Priority: optional Pre-Depends: python2-minimal (= ${binary:Version}) Depends: ${misc:Depends}, python2.7 (>= 2.7.18~), libpython2-stdlib (= ${binary:Version}) Suggests: python2-doc (= ${binary:Version}), python-tk (>= 2.7.18~) Conflicts: python-central (<< 0.5.5) Breaks: update-manager-core (<< 0.200.5-2), python (<< 2.7.15-2), python2-doc (<< 2.7.18-2) Replaces: python-dev (<< 2.6.5-2), python (<< 2.7.15-2), python2-doc (<< 2.7.18-2) Provides: python-email, python-ctypes, python-wsgiref, python-importlib, python-profiler Description: interactive high-level object-oriented language (Python2 version) Python2, the high-level, interactive object oriented language, includes an extensive class library with lots of goodies for network programming, system administration, sounds and graphics. . This package is a dependency package, which depends on Debian's Python2 version (currently v2.7). Package: python2-minimal Architecture: any Multi-Arch: allowed Priority: optional Depends: ${misc:Depends}, python2.7-minimal (>= 2.7.18~), dpkg (>= 1.13.20) Recommends: python2 Conflicts: python-central (<< 0.5.5) Breaks: python (<= 2.7.3-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.10ubuntu2), python-minimal (<< 2.7.15-2) Replaces: python (<= 2.7.3-1~), python-minimal (<< 2.7.15-2) Description: minimal subset of the Python2 language This package contains the interpreter and some essential modules. It's used in the boot process for some basic tasks. See /usr/share/doc/python2.7-minimal/README.Debian for a list of the modules contained in this package. XB-Cnf-Visible-Pkgname: python2 Package: python2-dev Architecture: any Multi-Arch: allowed Depends: ${misc:Depends}, python2 (= ${binary:Version}), libpython2-dev (= ${binary:Version}), python2.7-dev (>= 2.7.18~) Breaks: python-dev (<< 2.7.15-2) Replaces: python-dev (<< 2.7.15-2) Description: header files and a static library for Python2 Header files, a static library and development tools for building Python2 modules, extending the Python2 interpreter or embedding Python2 in applications. . This package is a dependency package, which depends on Debian's Python2 version (currently v2.7). Package: libpython2-dev Architecture: any Multi-Arch: same Section: libdevel Depends: libpython2.7-dev (>= 2.7.18~), ${misc:Depends} Breaks: libpython-dev (<< 2.7.15-2) Replaces: libpython-dev (<< 2.7.15-2) Description: header files and a static library for Python2 Header files, a static library and development tools for building Python2 modules, extending the Python2 interpreter or embedding Python2 in applications. . This package is a dependency package, which depends on Debian's Python2 version (currently v2.7). Package: libpython2-stdlib Architecture: any Multi-Arch: same Priority: optional Depends: libpython2.7-stdlib (>= 2.7.18~), ${misc:Depends} Breaks: libpython-stdlib (<< 2.7.15-2) Replaces: libpython-stdlib (<< 2.7.15-2) Description: interactive high-level object-oriented language (Python2) Python2, the high-level, interactive object oriented language, includes an extensive class library with lots of goodies for network programming, system administration, sounds and graphics. . This package is a dependency package, which depends on Debian's Python2 version (currently v2.7). Package: python2-doc Section: doc Architecture: all Multi-Arch: foreign Depends: ${misc:Depends}, python2.7-doc (>= 2.7.18~) Suggests: python2 (= ${binary:Version}) Breaks: python-doc (<< 2.7.15-2) Replaces: python-doc (<< 2.7.15-2) Description: documentation for the high-level object-oriented language Python2 This is the official set of documentation for the interactive high-level object-oriented language Python2 (v2.7). All documents are provided in HTML format, some in info format. The package consists of nine documents: . * Tutorial * Python Library Reference * Macintosh Module Reference * Python Language Reference * Extending and Embedding Python * Python/C API Reference * Installing Python Modules * Documenting Python * Distributing Python Modules . This package is a dependency package, which depends on Debian's Python2 version (currently v2.7). Package: python2-dbg Architecture: any Multi-Arch: allowed Section: debug Depends: ${misc:Depends}, python2 (= ${binary:Version}), libpython2-dbg (= ${binary:Version}), python2.7-dbg (>= 2.7.18~) Breaks: python-dbg (<< 2.7.15-2) Replaces: python-dbg (<< 2.7.15-2) Description: debug build of the Python2 interpreter (version 2.7) Python2 interpreter configured with --pydebug. Dynamically loaded modules are searched in /usr/lib/python2.7/lib-dynload/debug first. Package: libpython2-dbg Architecture: any Multi-Arch: same Section: debug Depends: libpython2.7-dbg (>= 2.7.18~), ${misc:Depends} Breaks: libpython-dbg (<< 2.7.15-2) Replaces: libpython-dbg (<< 2.7.15-2) Description: debug build of the Python2 interpreter (version 2.7) Python2 interpreter configured with --pydebug. Dynamically loaded modules are searched in /usr/lib/python2.7/lib-dynload/debug first. python-defaults-2.7.18/debian/control.in0000644000000000000000000002110514100235331015046 0ustar Source: python-defaults Section: python Priority: optional Maintainer: Matthias Klose Uploaders: Piotr Ożarowski Build-Depends: debhelper (>= 11~), @bd_i586@, lsb-release, python-all:any, @PVER@:any (>= @PREVVER@), Standards-Version: 4.5.0 Homepage: https://www.python.org/ Vcs-Git: https://salsa.debian.org/cpython-team/python-defaults.git Vcs-Browser: https://salsa.debian.org/cpython-team/python-defaults Package: python-all Architecture: any Multi-Arch: allowed Depends: ${misc:Depends}, python2 (= ${binary:Version}), python2.7 (>= 2.7.2-3) Description: package depending on all supported Python2 runtime versions The package currently depends on python2.7, in the future, dependencies on jython (Python2 for a JVM) and ironpython (Python2 for Mono) may be added. . This package is a dependency package used as a build dependency for other packages to avoid hardcoded dependencies on specific Python2 runtimes. Package: python-all-dev Architecture: any Multi-Arch: allowed Depends: ${misc:Depends}, python2 (= ${binary:Version}), python-all (= ${binary:Version}), libpython-all-dev (= ${binary:Version}), python2-dev (= ${binary:Version}), python2.7-dev (>= 2.7-7) Description: package depending on all supported Python2 development packages The package currently depends on python2.7-dev, in the future, dependencies on jython (Python2 for a JVM) and ironpython (Python2 for Mono) may be added. . This package is a dependency package used as a build dependency for other packages to avoid hardcoded dependencies on specific Python2 development packages. Package: python-all-dbg Architecture: any Multi-Arch: allowed Section: debug Depends: ${misc:Depends}, python2 (= ${binary:Version}), python-all (= ${binary:Version}), libpython-all-dbg (= ${binary:Version}), python2-dbg (= ${binary:Version}), python2.7-dbg (>= 2.7-7) Description: package depending on all supported Python2 debugging packages The package currently depends on python2.7-dbg, in the future, dependencies on jython (Python for a JVM) and ironpython (Python2 for Mono) may be added. . This package is a dependency package used as a build dependency for other packages to avoid hardcoded dependencies on specific Python2 debug packages. Package: libpython-all-dev Architecture: any Multi-Arch: same Section: libdevel Depends: libpython2-dev (= ${binary:Version}), ${misc:Depends}, libpython2.7-dev Description: package depending on all supported Python2 development packages The package currently depends on libpython2.7-dev, in the future, dependencies on jython (Python2 for a JVM) and ironpython (Python2 for Mono) may be added. . This package is a dependency package used as a build dependency for other packages to avoid hardcoded dependencies on specific Python2 development packages. Package: libpython-all-dbg Architecture: any Multi-Arch: same Section: debug Depends: libpython2-dbg (= ${binary:Version}), ${misc:Depends}, libpython2.7-dbg Description: package depending on all supported Python2 debugging packages The package currently depends on libpython2.7-dbg, in the future, dependencies on jython (Python2 for a JVM) and ironpython (Python2 for Mono) may be added. . This package is a dependency package used as a build dependency for other packages to avoid hardcoded dependencies on specific Python2 debug packages. Package: python2 Architecture: any Multi-Arch: allowed Priority: optional Pre-Depends: python2-minimal (= ${binary:Version}) Depends: ${misc:Depends}, @PVER@ (>= @PREVVER@), libpython2-stdlib (= ${binary:Version}) Suggests: python2-doc (= ${binary:Version}), python-tk (>= @PREVVER@) Conflicts: python-central (<< 0.5.5) Breaks: update-manager-core (<< 0.200.5-2), python (<< 2.7.15-2), python2-doc (<< 2.7.18-2) Replaces: python-dev (<< 2.6.5-2), python (<< 2.7.15-2), python2-doc (<< 2.7.18-2) Provides: python-email, python-ctypes, python-wsgiref, python-importlib, python-profiler Description: interactive high-level object-oriented language (Python2 version) Python2, the high-level, interactive object oriented language, includes an extensive class library with lots of goodies for network programming, system administration, sounds and graphics. . This package is a dependency package, which depends on Debian's Python2 version (currently v@VER@). Package: python2-minimal Architecture: any Multi-Arch: allowed Priority: optional Depends: ${misc:Depends}, @PVER@-minimal (>= @PREVVER@), dpkg (>= 1.13.20) Recommends: python2 Conflicts: python-central (<< 0.5.5) Breaks: python (<= 2.7.3-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.10ubuntu2), python-minimal (<< 2.7.15-2) Replaces: python (<= 2.7.3-1~), python-minimal (<< 2.7.15-2) Description: minimal subset of the Python2 language This package contains the interpreter and some essential modules. It's used in the boot process for some basic tasks. See /usr/share/doc/@PVER@-minimal/README.Debian for a list of the modules contained in this package. XB-Cnf-Visible-Pkgname: python2 Package: python2-dev Architecture: any Multi-Arch: allowed Depends: ${misc:Depends}, python2 (= ${binary:Version}), libpython2-dev (= ${binary:Version}), @PVER@-dev (>= @PREVVER@) Breaks: python-dev (<< 2.7.15-2) Replaces: python-dev (<< 2.7.15-2) Description: header files and a static library for Python2 Header files, a static library and development tools for building Python2 modules, extending the Python2 interpreter or embedding Python2 in applications. . This package is a dependency package, which depends on Debian's Python2 version (currently v@VER@). Package: libpython2-dev Architecture: any Multi-Arch: same Section: libdevel Depends: lib@PVER@-dev (>= @PREVVER@), ${misc:Depends} Breaks: libpython-dev (<< 2.7.15-2) Replaces: libpython-dev (<< 2.7.15-2) Description: header files and a static library for Python2 Header files, a static library and development tools for building Python2 modules, extending the Python2 interpreter or embedding Python2 in applications. . This package is a dependency package, which depends on Debian's Python2 version (currently v@VER@). Package: libpython2-stdlib Architecture: any Multi-Arch: same Priority: optional Depends: libpython@VER@-stdlib (>= @PREVVER@), ${misc:Depends} Breaks: libpython-stdlib (<< 2.7.15-2) Replaces: libpython-stdlib (<< 2.7.15-2) Description: interactive high-level object-oriented language (Python2) Python2, the high-level, interactive object oriented language, includes an extensive class library with lots of goodies for network programming, system administration, sounds and graphics. . This package is a dependency package, which depends on Debian's Python2 version (currently v@VER@). Package: python2-doc Section: doc Architecture: all Multi-Arch: foreign Depends: ${misc:Depends}, python@VER@-doc (>= @PREVVER@) Suggests: python2 (= ${binary:Version}) Breaks: python-doc (<< 2.7.15-2) Replaces: python-doc (<< 2.7.15-2) Description: documentation for the high-level object-oriented language Python2 This is the official set of documentation for the interactive high-level object-oriented language Python2 (v@VER@). All documents are provided in HTML format, some in info format. The package consists of nine documents: . * Tutorial * Python Library Reference * Macintosh Module Reference * Python Language Reference * Extending and Embedding Python * Python/C API Reference * Installing Python Modules * Documenting Python * Distributing Python Modules . This package is a dependency package, which depends on Debian's Python2 version (currently v@VER@). Package: python2-dbg Architecture: any Multi-Arch: allowed Section: debug Depends: ${misc:Depends}, python2 (= ${binary:Version}), libpython2-dbg (= ${binary:Version}), python@VER@-dbg (>= @PREVVER@) Breaks: python-dbg (<< 2.7.15-2) Replaces: python-dbg (<< 2.7.15-2) Description: debug build of the Python2 interpreter (version @VER@) Python2 interpreter configured with --pydebug. Dynamically loaded modules are searched in /usr/lib/python@VER@/lib-dynload/debug first. Package: libpython2-dbg Architecture: any Multi-Arch: same Section: debug Depends: lib@PVER@-dbg (>= @PREVVER@), ${misc:Depends} Breaks: libpython-dbg (<< 2.7.15-2) Replaces: libpython-dbg (<< 2.7.15-2) Description: debug build of the Python2 interpreter (version @VER@) Python2 interpreter configured with --pydebug. Dynamically loaded modules are searched in /usr/lib/python@VER@/lib-dynload/debug first. python-defaults-2.7.18/debian/copyright0000644000000000000000000003713214100235331015000 0ustar This is the Debian GNU/Linux prepackaged version of the Python programming language. Python was written by Guido van Rossum and others. This package was put together by Klee Dienes from sources from ftp.python.org:/pub/python, based on the Debianization by the previous maintainers Bernd S. Brentrup and Bruce Perens. Current maintainer is Matthias Klose until the final 2.3 version is released. Copyright notice (as found in LICENSE in the original source). -------------------------------------------------------------- A. HISTORY OF THE SOFTWARE ========================== Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands as a successor of a language called ABC. Guido remains Python's principal author, although it includes many contributions from others. In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) in Reston, Virginia where he released several versions of the software. In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same year, the PythonLabs team moved to Digital Creations (now Zope Corporation, see http://www.zope.com). In 2001, the Python Software Foundation (PSF, see http://www.python.org/psf/) was formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corporation is a sponsoring member of the PSF. All Python releases are Open Source (see http://www.opensource.org for the Open Source Definition). Historically, most, but not all, Python releases have also been GPL-compatible; the table below summarizes the various releases. Release Derived Year Owner GPL- from compatible? (1) 0.9.0 thru 1.2 1991-1995 CWI yes 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes 1.6 1.5.2 2000 CNRI no 2.0 1.6 2000 BeOpen.com no 1.6.1 1.6 2001 CNRI yes (2) 2.1 2.0+1.6.1 2001 PSF no 2.0.1 2.0+1.6.1 2001 PSF yes 2.1.1 2.1+2.0.1 2001 PSF yes 2.2 2.1.1 2001 PSF yes 2.1.2 2.1.1 2002 PSF yes 2.1.3 2.1.2 2002 PSF yes 2.2.1 2.2 2002 PSF yes 2.2.2 2.2.1 2002 PSF yes 2.2.3 2.2.2 2003 PSF yes 2.3 2.2.2 2002-2003 PSF yes 2.3.1 2.3 2002-2003 PSF yes 2.3.2 2.3.1 2002-2003 PSF yes 2.3.3 2.3.2 2002-2003 PSF yes 2.3.4 2.3.3 2004 PSF yes 2.3.5 2.3.4 2005 PSF yes 2.4 2.3 2004 PSF yes 2.4.1 2.4 2005 PSF yes 2.4.2 2.4.1 2005 PSF yes 2.4.3 2.4.2 2006 PSF yes 2.4.4 2.4.3 2006 PSF yes 2.5 2.4 2006 PSF yes 2.5.1 2.5 2007 PSF yes 2.5.2 2.5.1 2008 PSF yes 2.5.3 2.5.2 2008 PSF yes 2.6 2.5 2008 PSF yes 2.6.1 2.6 2008 PSF yes 2.6.2 2.6.1 2009 PSF yes 2.6.3 2.6.2 2009 PSF yes 2.6.4 2.6.3 2009 PSF yes 2.6.5 2.6.4 2010 PSF yes Footnotes: (1) GPL-compatible doesn't mean that we're distributing Python under the GPL. All Python licenses, unlike the GPL, let you distribute a modified version without making your changes open source. The GPL-compatible licenses make it possible to combine Python with other software that is released under the GPL; the others don't. (2) According to Richard Stallman, 1.6.1 is not GPL-compatible, because its license has a choice of law clause. According to CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 is "not incompatible" with the GPL. Thanks to the many outside volunteers who have worked under Guido's direction to make these releases possible. B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON =============================================================== PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 -------------------------------------------- 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation. 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python. 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement. BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 ------------------------------------------- BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization ("Licensee") accessing and otherwise using this software in source or binary form and its associated documentation ("the Software"). 2. Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any derivative version prepared by Licensee. 3. BeOpen is making the Software available to Licensee on an "AS IS" basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 5. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 6. This License Agreement shall be governed by and interpreted in all respects by the law of the State of California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. As an exception, the "BeOpen Python" logos available at http://www.pythonlabs.com/logos.html may be used according to the permissions granted on that web page. 7. By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and conditions of this License Agreement. CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 --------------------------------------- 1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation. 2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) 1995-2001 Corporation for National Research Initiatives; All Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes): "Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: http://hdl.handle.net/1895.22/1013". 3. In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 1.6.1. 4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7. This License Agreement shall be governed by the federal intellectual property law of the United States, including without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply, by the law of the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. Notwithstanding the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable material that was previously distributed under the GNU General Public License (GPL), the law of the Commonwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8. By clicking on the "ACCEPT" button where indicated, or by copying, installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement. ACCEPT CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 -------------------------------------------------- Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dh_python2, pycompile, pyclean and debpython module: ==================================================== Copyright © 2010,2011 Piotr Ożarowski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. python-defaults-2.7.18/debian/debian_defaults0000644000000000000000000000052714100235331016077 0ustar [DEFAULT] # the default python version default-version = python2.7 # all supported python versions supported-versions = python2.7 # formerly supported python versions old-versions = python2.3, python2.4, python2.5, python2.6 # unsupported versions, including older versions unsupported-versions = python2.3, python2.4, python2.5, python2.6 python-defaults-2.7.18/debian/idle.10000644000000000000000000000473414100235331014046 0ustar .TH IDLE 1 "21 September 2004" .SH NAME \fBIDLE\fP \- An Integrated DeveLopment Environment for Python .SH SYNTAX .B idle [ \fI-dins\fP ] [ \fI-t title\fP ] [ \fIfile\fP ...] .PP .B idle [ \fI-dins\fP ] [ \fI-t title\fP ] ( \fI-c cmd\fP | \fI-r file\fP ) [ \fIarg\fP ...] .PP .B idle [ \fI-dins\fP ] [ \fI-t title\fP ] - [ \fIarg\fP ...] .SH DESCRIPTION This manual page documents briefly the .BR idle command. This manual page was written for Debian because the original program does not have a manual page. For more information, refer to IDLE's help menu. .PP .B IDLE is an Integrated DeveLopment Environment for Python. IDLE is based on Tkinter, Python's bindings to the Tk widget set. Features are 100% pure Python, multi-windows with multiple undo and Python colorizing, a Python shell window subclass, a debugger. IDLE is cross-platform, i.e. it works on all platforms where Tk is installed. .LP .SH OPTIONS .TP .B \-h .PD Print this help message and exit. .TP .B \-n .PD Run IDLE without a subprocess (see Help/IDLE Help for details). .PP The following options will override the IDLE 'settings' configuration: .TP .B \-e .PD Open an edit window. .TP .B \-i .PD Open a shell window. .PP The following options imply \-i and will open a shell: .TP .B \-c cmd .PD Run the command in a shell, or .TP .B \-r file .PD Run script from file. .PP .TP .B \-d .PD Enable the debugger. .TP .B \-s .PD Run $IDLESTARTUP or $PYTHONSTARTUP before anything else. .TP .B \-t title .PD Set title of shell window. .PP A default edit window will be bypassed when \-c, \-r, or \- are used. .PP [arg]* and [file]* are passed to the command (\-c) or script (\-r) in sys.argv[1:]. .SH EXAMPLES .TP idle .PD Open an edit window or shell depending on IDLE's configuration. .TP idle foo.py foobar.py .PD Edit the files, also open a shell if configured to start with shell. .TP idle \-est "Baz" foo.py .PD Run $IDLESTARTUP or $PYTHONSTARTUP, edit foo.py, and open a shell window with the title "Baz". .TP idle \-c "import sys; print sys.argv" "foo" .PD Open a shell window and run the command, passing "\-c" in sys.argv[0] and "foo" in sys.argv[1]. .TP idle \-d \-s \-r foo.py "Hello World" .PD Open a shell window, run a startup script, enable the debugger, and run foo.py, passing "foo.py" in sys.argv[0] and "Hello World" in sys.argv[1]. .TP echo "import sys; print sys.argv" | idle - "foobar" .PD Open a shell window, run the script piped in, passing '' in sys.argv[0] and "foobar" in sys.argv[1]. .SH SEE ALSO python(1). .SH AUTHORS Various. python-defaults-2.7.18/debian/idle.py0000755000000000000000000000013314100235331014326 0ustar #! /usr/bin/python from idlelib.PyShell import main if __name__ == '__main__': main() python-defaults-2.7.18/debian/idle2.desktop0000644000000000000000000000033314100235331015430 0ustar [Desktop Entry] Name=IDLE Comment=Integrated Development Environment for Python Exec=/usr/bin/idle Icon=/usr/share/pixmaps/idle.xpm Terminal=false Type=Application Categories=Application;Development; StartupNotify=true python-defaults-2.7.18/debian/idle2.lintian-overrides0000644000000000000000000000030714100235331017416 0ustar # icon file available in a dependent package. idle2 binary: menu-icon-missing # yes, we already have idle3, and idle pointing to it idle2 binary: dependency-on-python-version-marked-for-end-of-life python-defaults-2.7.18/debian/libpython-all-dbg.postinst0000644000000000000000000000027414100235331020157 0ustar #! /bin/sh set -e DOCDIR=/usr/share/doc/libpython-all-dbg DOCLINK=libpython-dbg if [ -d $DOCDIR ] && [ ! -L $DOCDIR ]; then rmdir $DOCDIR ln -s $DOCLINK $DOCDIR fi #DEBHELPER# python-defaults-2.7.18/debian/python.desktop0000644000000000000000000000021314100235331015747 0ustar [Desktop Entry] Type=KonsoleApplication Name=Python2 Interpreter Comment=Python2 Exec=/usr/bin/python2 Icon=/usr/share/pixmaps/python2.xpm python-defaults-2.7.18/debian/python.lintian-overrides0000644000000000000000000000033014100235331017734 0ustar # this is the only package that can depend on it python binary: depends-on-python-minimal # we rely on our patched python library, don't pick up a local version python binary: command-with-path-in-maintainer-script python-defaults-2.7.18/debian/python.mk0000644000000000000000000000415514100235331014716 0ustar # some macros useful for packaging python packages # to include it unconditionally: # include /usr/share/python/python.mk # # to include it conditionally, and have the packaging working with earlier releases # and backports: # -include /usr/share/python/python.mk # ifeq (,$(py_sitename)) # py_sitename = site-packages # py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages # py_sitename_sh = $(py_sitename) # py_libdir_sh = $(py_libdir) # endif # py_sitename: name of the site-packages/dist-packages directory depending # on the python version. Call as: $(call py_sitename, ). # Don't use this in shell snippets inside loops. py_sitename = $(if $(filter $(subst python,,$(1)), 2.3 2.4 2.5),site,dist)-packages # py_libdir: absolute path to the default python library for third party # stuff. Call as: $(call py_libdir, ). # Don't use this in shell snippets inside loops. py_libdir = /usr/lib/python$(strip $(if $(findstring 3.,$(subst python,,$(1))),3,$(subst python,,$(1))))/$(py_sitename) # py_pkgname: package name corresponding to the python version. # Call as: $(call py_pkgname, , ). py_pkgname = $(if $(findstring 3.,$(2)),$(subst python-,python3-,$(1)),$(1)) # distutils' build directory py_builddir = $(shell python$(strip $(subst python,,$(1))) -c 'from distutils.command.build import build; from distutils.core import Distribution; b = build(Distribution()); b.finalize_options(); print(b.build_platlib)') # The same macros for use inside loops in shell snippets py_sitename_sh = $$(basename $$(_py_=$(strip $(1)); python$${_py_\#python*} -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')) py_libdir_sh = $$(_py_=$(strip $(1)); python$${_py_\#python*} -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())') py_builddir_sh = $$(_py_=$(strip $(1)); python$${_py_\#python*} -c 'from distutils.command.build import build; from distutils.core import Distribution; b = build(Distribution()); b.finalize_options(); print(b.build_platlib)') # Arguments to pass to setup.py install py_setup_install_args = --install-layout=deb python-defaults-2.7.18/debian/python.postinst.in0000644000000000000000000001132114100235331016570 0ustar #! /bin/sh set -e new_config_file() { cat > /etc/python/debian_config <<-EOF [DEFAULT] # how to byte-compile (comma separated: standard, optimize) byte-compile = standard EOF } case "$1" in configure) [ -d /etc/python ] || mkdir /etc/python [ -f /etc/python/debian_config ] || new_config_file # run the rtinstall script, when 2.5 became a supported version if [ -x /usr/bin/python2.5 ] && [ -n "$2" ] && dpkg --compare-versions $2 lt 2.4.4-3; then if [ "$DEBIAN_FRONTEND" != noninteractive ]; then echo "Linking and byte-compiling packages for runtime python2.5..." fi version=$(dpkg -s python2.5-minimal | awk '/^Version:/ {print $2}') for hook in /usr/share/python/runtime.d/*.rtinstall; do [ -x $hook ] || continue $hook rtinstall python2.5 "$2" "$version" done fi # run the rtinstall script, when 2.6 became a supported version if [ -x /usr/bin/python2.6 ] && [ -n "$2" ] && dpkg --compare-versions $2 lt 2.5.4-6; then if [ "$DEBIAN_FRONTEND" != noninteractive ]; then echo "Linking and byte-compiling packages for runtime python2.6..." fi version=$(dpkg -s python2.6-minimal | awk '/^Version:/ {print $2}') for hook in /usr/share/python/runtime.d/*.rtinstall; do [ -x $hook ] || continue $hook rtinstall python2.6 "$2" "$version" 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.7.2-7~; then oldv=$(echo $2 | sed 's/^\(...\).*/\1/') if [ "$DEBIAN_FRONTEND" != noninteractive ]; then echo "running python rtupdate hooks for @PVER@..." fi for hook in /usr/share/python/runtime.d/*.rtupdate; do [ -x $hook ] || continue if ! $hook rtupdate python$oldv @PVER@; then hb=$(basename $hook .rtupdate) echo >&2 "error running python rtupdate hook $hb" errors=yes fi done [ -z "$errors" ] || exit 4 if [ "$DEBIAN_FRONTEND" != noninteractive ]; then echo "running python post-rtupdate hooks for @PVER@..." fi for hook in /usr/share/python/runtime.d/*.rtupdate; do [ -x $hook ] || continue if ! $hook post-rtupdate python$oldv @PVER@; then hb=$(basename $hook .rtupdate) echo >&2 "error running python post-rtupdate hook $hb" errors=yes fi done [ -z "$errors" ] || exit 5 fi if [ -f /var/lib/python/python2.5_already_installed ] \ && [ ! -f /var/lib/python/python2.5_installed ] then if [ "$DEBIAN_FRONTEND" != noninteractive ]; then echo "Linking and byte-compiling packages for runtime python2.5..." fi oldversion=$(cat /var/lib/python/python2.5_already_installed) newversion=$(dpkg -s python2.5-minimal | awk '/^Version:/ {print $2}') for hook in /usr/share/python/runtime.d/*.rtinstall; do [ -x $hook ] || continue $hook rtinstall python2.5 "$oldversion" "$newversion" done fi rm -f /var/lib/python/python2.5_already_installed if [ -f /var/lib/python/python2.6_already_installed ] \ && [ ! -f /var/lib/python/python2.6_installed ] then if [ "$DEBIAN_FRONTEND" != noninteractive ]; then echo "Linking and byte-compiling packages for runtime python2.6..." fi oldversion=$(cat /var/lib/python/python2.6_already_installed) newversion=$(dpkg -s python2.6-minimal | awk '/^Version:/ {print $2}') for hook in /usr/share/python/runtime.d/*.rtinstall; do [ -x $hook ] || continue $hook rtinstall python2.6 "$oldversion" "$newversion" done fi 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 #DEBHELPER# python-defaults-2.7.18/debian/python.postrm.in0000644000000000000000000000012114100235331016225 0ustar #! /bin/sh set -e case "$1" in purge) rm -rf /etc/python esac #DEBHELPER# python-defaults-2.7.18/debian/python.preinst.in0000644000000000000000000000436114100235331016377 0ustar #! /bin/sh set -e # remove the python alternatives before installing our own python link update-alternatives --auto /usr/bin/python >/dev/null 2>&1 || true update-alternatives --remove python /usr/bin/python1.5 || true update-alternatives --remove python /usr/bin/python2.1 || true update-alternatives --remove python /usr/bin/python2.2 || true [ -L /usr/share/doc/python/html ] || rm -rf /usr/share/doc/python/html case "$1" in upgrade) if dpkg --compare-versions $2 lt 2.6.1-1~; then oldv=$(echo $2 | sed 's/^\(...\).*/\1/') if [ "$DEBIAN_FRONTEND" != noninteractive ]; then echo "running python pre-rtupdate hooks for @PVER@..." fi for hook in /usr/share/python/runtime.d/*.rtupdate; do [ -x $hook ] || continue if ! $hook pre-rtupdate python$oldv @PVER@; then hb=$(basename $hook .rtupdate) echo >&2 "error running python pre-rtupdate hook $hb" echo >&2 "running python failed-pre-rtupdate hook $hb" $hook failed-pre-rtupdate python$oldv @PVER@ errors=yes break fi done [ -z "$errors" ] || exit 3 fi # 2.4.4-5 is the first version, which adds python2.5 as supported # version; need to run an rtinstall python2.5 in the postinst. if dpkg --compare-versions $2 lt 2.4.4-5 && [ -x /usr/bin/python2.5 ]; then version=$(dpkg -s python2.5-minimal | awk '/^Version:/ {print $2}') mkdir -p /var/lib/python echo "$version" > /var/lib/python/python2.5_already_installed fi # 2.5.4-6 is the first version, which adds python2.6 as supported # version; need to run an rtinstall python2.6 in the postinst. if dpkg --compare-versions $2 lt 2.5.4-6 && [ -x /usr/bin/python2.6 ]; then version=$(dpkg -s python2.6-minimal | awk '/^Version:/ {print $2}') 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# python-defaults-2.7.18/debian/python.prerm.in0000644000000000000000000000015114100235331016031 0ustar #! /bin/sh set -e case "$1" in remove) rm -f /usr/share/python/pyversions.py[co] esac #DEBHELPER# python-defaults-2.7.18/debian/python2-dev.dirs0000644000000000000000000000001114100235331016071 0ustar /usr/bin python-defaults-2.7.18/debian/python2-minimal.dirs0000644000000000000000000000001114100235331016741 0ustar /usr/bin python-defaults-2.7.18/debian/python2-minimal.manpages0000644000000000000000000000002614100235331017601 0ustar pyclean.1 pycompile.1 python-defaults-2.7.18/debian/python2-minimal.postinst.in0000644000000000000000000000013014100235331020272 0ustar #! /bin/sh set -e python@VER@ -m compileall /usr/share/python/ >/dev/null #DEBHELPER# python-defaults-2.7.18/debian/python2-minimal.prerm0000644000000000000000000000012114100235331017127 0ustar #! /bin/sh set -e find /usr/share/python/ -name '*.py[oc]' -delete #DEBHELPER# python-defaults-2.7.18/debian/python2.desktop0000644000000000000000000000021314100235331016031 0ustar [Desktop Entry] Type=KonsoleApplication Name=Python2 Interpreter Comment=Python2 Exec=/usr/bin/python2 Icon=/usr/share/pixmaps/python2.xpm python-defaults-2.7.18/debian/python2.lintian-overrides0000644000000000000000000000033214100235331020020 0ustar # this is the only package that can depend on it python2 binary: depends-on-python-minimal # we rely on our patched python library, don't pick up a local version python2 binary: command-with-path-in-maintainer-script python-defaults-2.7.18/debian/pyversions0000755000000000000000000000015214100235331015204 0ustar #! /usr/bin/python2 import sys sys.path[0:0] = ['/usr/share/python'] import pyversions pyversions.main() python-defaults-2.7.18/debian/pyversions.10000644000000000000000000000225414100235331015345 0ustar .TH PYVERSIONS .SH NAME pyversions \- print python version information .SH SYNOPSIS .PP .B pyversions .I [-h] [-v] [] .SH DESCRIPTION .PP .B pyversions prints information about installed, supported python runtimes, the default runtime, and parses the information of the PythonVersion fields in the package control file. .SH OPTIONS .TP .I -d, --default Show the default python version. .TP .I -s, --supported Show the supported python versions. .TP .I -r, --requested [|] Reads the value of the .B XS-Python-Version field in the source section of a control file and shows all matching python versions. The parameter is interpreted as a version string, if it is not the name of a file. If the XS-Python-Version field is missing, get the version information from debian/pyversions. Without any parameter, it will fall back to list the supported Python versions after checking debian/control and debian/pyversions. .TP .I -i, --installed Show the installed supported python versions. .TP .I -v, --version Limit the output to the version numbers of the python versions. .TP .I -h, --help Print a help text. .SH SEE ALSO Python policy. .SH AUTHOR Matthias Klose python-defaults-2.7.18/debian/pyversions.py0000644000000000000000000003541014100235331015635 0ustar #! /usr/bin/python2 import os, re, sys try: SetType = set except NameError: import sets SetType = sets.Set set = sets.Set _defaults = None def read_default(name=None): global _defaults from ConfigParser import SafeConfigParser, NoOptionError if not _defaults: if os.path.exists('/usr/share/python/debian_defaults'): config = SafeConfigParser() try: config.readfp(file('/usr/share/python/debian_defaults')) except IOError, msg: print msg sys.exit(1) _defaults = config if _defaults and name: try: value = _defaults.get('DEFAULT', name) except NoOptionError: raise ValueError return value return None def parse_versions(vstring, add_exact=False): import operator operators = { None: operator.eq, '=': operator.eq, '>=': operator.ge, '<=': operator.le, '<<': operator.lt } vinfo = {} exact_versions = set([]) version_range = set(supported_versions(version_only=True) + old_versions(version_only=True)) relop_seen = False for field in vstring.split(','): field = field.strip() if field == 'all': vinfo['all'] = 'all' continue if field in ('current', 'current_ext'): vinfo['current'] = field continue vinfo.setdefault('versions', set()) ve = re.compile('(>=|<=|<<|=)? *(\d\.\d)$') m = ve.match(field) try: if not m: raise ValueError('error parsing Python-Version attribute') op, v = m.group(1), m.group(2) vmaj, vmin = v.split('.') # Don't silently ignore Python 3 versions. if int(vmaj) > 2: raise ValueError('error parsing Python-Version attribute, Python 3 version found') if op in (None, '='): exact_versions.add(v) else: relop_seen = True filtop = operators[op] version_range = [av for av in version_range if filtop(av ,v)] except Exception: raise ValueError, 'error parsing Python-Version attribute' if add_exact: if exact_versions: vinfo['vexact'] = exact_versions if 'versions' in vinfo: if relop_seen: vinfo['versions'] = set(version_range) else: del vinfo['versions'] else: if 'versions' in vinfo: vinfo['versions'] = exact_versions if relop_seen: vinfo['versions'] = exact_versions.union(version_range) return vinfo _old_versions = None def old_versions(version_only=False): global _old_versions if not _old_versions: try: value = read_default('old-versions') _old_versions = [s.strip() for s in value.split(',')] except ValueError: _old_versions = [] if version_only: return [v[6:] for v in _old_versions] else: return _old_versions _unsupported_versions = None def unsupported_versions(version_only=False): global _unsupported_versions if not _unsupported_versions: try: value = read_default('unsupported-versions') _unsupported_versions = [s.strip() for s in value.split(',')] except ValueError: _unsupported_versions = [] if version_only: return [v[6:] for v in _unsupported_versions] else: return _unsupported_versions _supported_versions = ["python%s" % ver.strip() for ver in os.environ.get('DEBPYTHON_SUPPORTED', '').split(',') if ver.strip()] def supported_versions(version_only=False): global _supported_versions if not _supported_versions: try: value = read_default('supported-versions') _supported_versions = [s.strip() for s in value.split(',')] except ValueError: cmd = ['/usr/bin/apt-cache', '--no-all-versions', 'show', 'python-all'] try: import subprocess p = subprocess.Popen(cmd, bufsize=1, shell=False, stdout=subprocess.PIPE) fd = p.stdout except ImportError: fd = os.popen(' '.join(cmd)) depends = None for line in fd: if line.startswith('Depends:'): depends = line.split(':', 1)[1].strip().split(',') fd.close() if depends: depends = [re.sub(r'\s*(\S+)[ (]?.*', r'\1', s) for s in depends] _supported_versions = depends if not _supported_versions: # last resort: python-minimal not installed, apt-cache # not available, hard code the value, #394084 _supported_versions = ['python2.6', 'python2.7'] if version_only: return [v[6:] for v in _supported_versions] else: return _supported_versions _default_version = "python%s" % os.environ.get('DEBPYTHON_DEFAULT', '') if _default_version == 'python': _default_version = None def default_version(version_only=False): global _default_version if not _default_version: try: _default_version = link = os.readlink('/usr/bin/python2') except OSError: _default_version = None try: cmd = ['/usr/bin/python2', '-c', 'import sys; print sys.version[:3]'] import subprocess p = subprocess.Popen(cmd, bufsize=1, shell=False, stdout=subprocess.PIPE) fd = p.stdout except ImportError: fd = os.popen("/usr/bin/python2 -c 'import sys; print sys.version[:3]'") line = fd.readline().strip() fd.close() if re.match(r'\d\.\d$', line): _default_version = 'python' + line # consistency check try: debian_default = read_default('default-version') except ValueError: debian_default = "python2.7" if not _default_version in (debian_default, os.path.join('/usr/bin', debian_default)): raise ValueError, "/usr/bin/python2 does not match the python2 default version. It must be reset to point to %s" % debian_default _default_version = debian_default if version_only: return _default_version[6:] else: return _default_version def requested_versions(vstring, version_only=False): versions = None vinfo = parse_versions(vstring, add_exact=True) supported = supported_versions(version_only=True) if len(vinfo) == 1: if 'all' in vinfo: versions = supported elif 'current' in vinfo: versions = [default_version(version_only=True)] elif 'vexact' in vinfo: versions = vinfo['vexact'] else: versions = vinfo['versions'].intersection(supported) elif 'all' in vinfo and 'current' in vinfo: raise ValueError, "both `current' and `all' in version string" elif 'all' in vinfo: if 'versions' in vinfo: versions = vinfo['versions'].intersection(supported) else: versions = set(supported) if 'vexact' in vinfo: versions.update(vinfo['vexact']) elif 'current' in vinfo: current = default_version(version_only=True) if not current in vinfo['versions']: raise ValueError, "`current' version not in supported versions" versions = [current] elif 'versions' in vinfo or 'vexact' in vinfo: versions = set() if 'versions' in vinfo: versions = vinfo['versions'].intersection(supported) if 'vexact' in vinfo: versions.update(vinfo['vexact']) else: raise ValueError, 'No Python versions in version string' if not versions: raise ValueError('computed set of supported versions is empty') if version_only: return versions else: return ['python%s' % v for v in versions] def installed_versions(version_only=False): import glob supported = supported_versions() versions = [os.path.basename(s) for s in glob.glob('/usr/bin/python[0-9].[0-9]') if os.path.basename(s) in supported] versions.sort() if version_only: return [v[6:] for v in versions] else: return versions class ControlFileValueError(ValueError): pass class MissingVersionValueError(ValueError): pass def extract_pyversion_attribute(fn, pkg): """read the debian/control file, extract the X-Python-Version or XS-Python-Version field; check that XB-Python-Version exists for the package.""" version = None sversion = None section = None try: fp = file(fn, 'r') except IOError, msg: print "Cannot open %s: %s" % (fn, msg) sys.exit(2) for line in fp: line = line.strip() if line == '': if section == None: continue if pkg == 'Source': break section = None elif line.startswith('Source:'): section = 'Source' elif line.startswith('Package: ' + pkg): section = pkg elif line.lower().startswith(('xs-python-version:', 'x-python-version:')): if section != 'Source': raise ValueError, \ 'attribute X(S)-Python-Version not in Source section' sversion = line.split(':', 1)[1].strip() elif line.lower().startswith('xb-python-version:'): if section == pkg: version = line.split(':', 1)[1].strip() if section == None: raise ControlFileValueError, 'not a control file' if pkg == 'Source': if sversion == None: raise MissingVersionValueError, \ 'no X(S)-Python-Version in control file' return sversion if version == None: raise MissingVersionValueError, \ 'no XB-Python-Version for package `%s' % pkg return version # compatibility functions to parse debian/pyversions def version_cmp(ver1,ver2): v1=[int(i) for i in ver1.split('.')] v2=[int(i) for i in ver2.split('.')] return cmp(v1,v2) def requested_versions_bis(vstring, version_only=False): versions = [] py_supported_short = supported_versions(version_only=True) for item in vstring.split(','): v=item.split('-') if len(v)>1: if not v[0]: v[0] = py_supported_short[0] if not v[1]: v[1] = py_supported_short[-1] for ver in py_supported_short: try: if version_cmp(ver,v[0]) >= 0 \ and version_cmp(ver,v[1]) <= 0: versions.append(ver) except ValueError: pass else: if v[0] in py_supported_short: versions.append(v[0]) versions.sort(version_cmp) if not versions: raise ValueError, 'empty set of versions' if not version_only: versions=['python'+i for i in versions] return versions def extract_pyversion_attribute_bis(fn): vstring = file(fn).readline().rstrip('\n') return vstring def main(): from optparse import OptionParser usage = '[-v] [-h] [-d|--default] [-s|--supported] [-i|--installed] [-r|--requested |]' parser = OptionParser(usage=usage) parser.add_option('-d', '--default', help='print the default python version', action='store_true', dest='default') parser.add_option('-s', '--supported', help='print the supported python versions', action='store_true', dest='supported') parser.add_option('-r', '--requested', help='print the python versions requested by a build; the argument is either the name of a control file or the value of the X(S)-Python-Version attribute', action='store_true', dest='requested') parser.add_option('-i', '--installed', help='print the installed supported python versions', action='store_true', dest='installed') parser.add_option('-v', '--version', help='print just the version number(s)', default=False, action='store_true', dest='version_only') opts, args = parser.parse_args() program = os.path.basename(sys.argv[0]) if opts.default and len(args) == 0: try: print default_version(opts.version_only) except ValueError, msg: print "%s:" % program, msg sys.exit(1) elif opts.supported and len(args) == 0: print ' '.join(supported_versions(opts.version_only)) elif opts.installed and len(args) == 0: print ' '.join(installed_versions(opts.version_only)) elif opts.requested and len(args) <= 1: if len(args) == 0: versions = 'debian/control' else: versions = args[0] try: if os.path.isfile(versions): fn = versions try: vstring = extract_pyversion_attribute(fn, 'Source') vs = requested_versions(vstring, opts.version_only) except ControlFileValueError: sys.stderr.write("%s: not a control file: %s, " \ % (program, fn)) sys.exit(1) except MissingVersionValueError: fn = os.path.join(os.path.dirname(fn), 'pyversions') sys.stderr.write("%s: missing X(S)-Python-Version in control file, fall back to %s\n" \ % (program, fn)) try: vstring = extract_pyversion_attribute_bis(fn) vs = requested_versions_bis(vstring, opts.version_only) except IOError: sys.stderr.write("%s: missing debian/pyversions file, fall back to supported versions\n" \ % program) vs = supported_versions(opts.version_only) except ValueError, e: sys.stderr.write("%s: %s\n" % (program, e)) sys.exit(4) else: vs = requested_versions(versions, opts.version_only) print ' '.join(vs) except ValueError, msg: sys.stderr.write("%s: %s\n" % (program, msg)) sys.exit(1) else: sys.stderr.write("usage: %s %s\n" % (program, usage)) sys.exit(1) if __name__ == '__main__': main() python-defaults-2.7.18/debian/rules0000755000000000000000000002267314100236171014134 0ustar #!/usr/bin/make -f # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. export SHELL = /bin/bash # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) changelog_values := $(shell dpkg-parsechangelog \ | awk '/^(Version|Source):/ {print $$2}') PKGSOURCE := $(word 1, $(changelog_values)) PKGVERSION := $(word 2, $(changelog_values)) distribution := $(shell dpkg-vendor --query Vendor) distrelease := $(shell lsb_release -cs) export VER=2.7 export NVER=2.8 export PVER=python2.7 PREVVER := $(shell awk '/^python/ && NR > 1 {print substr($$2,2,length($$2)-2); exit}' debian/changelog) # first version with Multi-Arch: allowed PREVVER := 2.7.18~ # not yet allowed ma_allowed = yes ifeq (,$(filter $(distrelease),lenny etch squeeze wheezy lucid maverick natty oneiric precise quantal raring saucy trusty)) bd_i586 = dpkg-dev (>= 1.17.11), python2.7:any (>= 2.7.18~) endif PWD := $(shell pwd) d := debian/tmp scriptdir = usr/share/lib/python$(VER) scriptdir = usr/share/python$(VER) scriptdir = usr/lib/python$(VER) rst2html = rst2html with_doc = yes ifneq ($(with_doc),yes) NOPKGS = -Npython-doc endif build: stamp-build build-arch: stamp-build build-indep: stamp-build stamp-build: touch stamp-build control-file: sed -e "s/@PVER@/$(PVER)/g" \ -e "s/@NVER@/$(NVER)/g" \ -e "s/@VER@/$(VER)/g" \ -e "s/@PREVVER@/$(PREVVER)/g" \ -e "s/@bd_i586@/$(bd_i586)/g" \ debian/control.tmp ifeq ($(distribution),Ubuntu) ifneq (,$(findstring ubuntu, $(PKGVERSION))) m='Ubuntu Developers '; \ sed -i "/^Maintainer:/s/\(.*\)/Maintainer: $$m\nXSBC-Original-\1/" \ debian/control.tmp endif endif [ -e debian/control ] \ && cmp -s debian/control debian/control.tmp \ && rm -f debian/control.tmp && exit 0; \ mv debian/control.tmp debian/control clean: control-file dh_testdir dh_testroot rm -f stamp-* rm -f patch-stamp* set -e;\ for f in debian/*.in; do \ f2=`echo $$f | sed "s,PVER,$(PVER),g;s/VER/$(VER)/g;s,\.in$$,,"`; \ if [ $$f2 != debian/control ]; then \ rm -f $$f2; \ fi; \ done rm -f debian/*.py[co] make clean dh_clean stamp-control: : # We have to prepare the various control files set -e;\ for f in debian/*.in; do \ f2=`echo $$f | sed "s,PVER,$(PVER),g;s/VER/$(VER)/g;s,\.in$$,,"`; \ if [ $$f2 != debian/control ]; then \ sed -e "s/@PVER@/$(PVER)/g;s/@VER@/$(VER)/g" \ -e "s/@PRIORITY@/$(PRIORITY)/g" \ -e "s,@SCRIPTDIR@,/$(scriptdir),g" \ <$$f >$$f2; \ fi; \ done install: build stamp-install stamp-install: stamp-build control-file stamp-control dh_testdir dh_testroot # dh_installdirs -ppython usr/share/doc/python dh_install DESTDIR=debian/python2-minimal PREFIX=/usr make install-runtime touch stamp-install # Build architecture-independent files here. binary-indep: build install dh_testdir -i dh_testroot -i dh_installman -i ifeq ($(with_doc),yes) dh_installdocs -ppython2-doc debian/README.Debian dh_installchangelogs -ppython2-doc mkdir -p debian/python2-doc/usr/share/doc/python2 ln -sf ../python$(VER)-doc/html \ debian/python2-doc/usr/share/doc/python2/html mkdir -p debian/python2-doc/usr/share/doc/python2-doc ln -sf ../python$(VER)-doc/html \ debian/python2-doc/usr/share/doc/python2-doc/html endif # dh_installdebconf -i $(NOPKGS) dh_lintian -i dh_installdocs -i $(NOPKGS) --all debian/README.Debian rm -f debian/python2-doc/usr/share/doc/python2/README.Debian dh_installchangelogs -i $(NOPKGS) dh_compress -i $(NOPKGS) dh_fixperms -i $(NOPKGS) dh_installdeb -i $(NOPKGS) dh_gencontrol -i $(NOPKGS) dh_md5sums -i $(NOPKGS) dh_builddeb -i $(NOPKGS) # Build architecture-dependent files here. binary-arch: build install dh_testdir -a dh_testroot -a dh_installman -a : # provide the python2 and python2.1 defaults mkdir -p debian/python2-minimal/usr/bin ln -sf python$(VER) debian/python2-minimal/usr/bin/python2 mkdir -p debian/python2-minimal/usr/share/man/man1 ln -sf python$(VER).1.gz \ debian/python2-minimal/usr/share/man/man1/python2.1.gz : # mkdir -p debian/python2-minimal/usr/share/python cp -p debian/debian_defaults \ debian/python2-minimal/usr/share/python/ install -m 755 debian/pyversions.py \ debian/python2-minimal/usr/share/python/ install -m 644 debian/pyversions.1 \ debian/python2-minimal/usr/share/man/man1/ dh_link -ppython2-minimal /usr/share/python/pyversions.py /usr/bin/pyversions mkdir -p debian/python2/usr/bin ln -sf pydoc$(VER) debian/python2/usr/bin/pydoc2 ln -sf pygettext$(VER) debian/python2/usr/bin/pygettext2 ln -sf pdb$(VER) debian/python2/usr/bin/pdb2 mkdir -p debian/python2/usr/share/python install -m 644 debian/python.mk \ debian/python2/usr/share/python/ mkdir -p debian/python2/usr/share/man/man1 ln -sf pydoc$(VER).1.gz \ debian/python2/usr/share/man/man1/pydoc2.1.gz ln -sf pygettext$(VER).1.gz \ debian/python2/usr/share/man/man1/pygettext2.1.gz ln -sf pdb$(VER).1.gz \ debian/python2/usr/share/man/man1/pdb2.1.gz mkdir -p debian/python2/usr/share/pixmaps ln -sf python$(VER).xpm debian/python2/usr/share/pixmaps/python2.xpm mkdir -p debian/python2/usr/share/apps/konsole cp -p debian/python2.desktop debian/python2/usr/share/apps/konsole/ : # provide the python2-config default mkdir -p debian/python2-dev/usr/bin ln -sf python$(VER)-config debian/python2-dev/usr/bin/python2-config mkdir -p debian/python2-dev/usr/share/man/man1 ln -sf python$(VER)-config.1.gz \ debian/python2-dev/usr/share/man/man1/python2-config.1.gz : # provide pkgconfig defaults mkdir -p debian/python2-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig ln -sf python-$(VER).pc debian/python2-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/python2.pc mkdir -p debian/python2-dbg/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig ln -sf python-$(VER)-dbg.pc debian/python2-dbg/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/python2-dbg.pc : # provide the python2-dbg and python2-dbg.1 defaults mkdir -p debian/python2-dbg/usr/bin ln -sf python$(VER)-dbg debian/python2-dbg/usr/bin/python2-dbg ln -sf python$(VER)-dbg-config debian/python2-dbg/usr/bin/python2-dbg-config mkdir -p debian/python2-dbg/usr/share/man/man1 ln -sf python$(VER)-dbg.1.gz \ debian/python2-dbg/usr/share/man/man1/python2-dbg.1.gz ln -sf python$(VER)-dbg-config.1.gz \ debian/python2-dbg/usr/share/man/man1/python2-dbg-config.1.gz mkdir -p debian/python2-dbg/usr/share/doc/python2 ln -sf ../python$(VER)/SpecialBuilds.txt.gz \ debian/python2-dbg/usr/share/doc/python2/SpecialBuilds.txt.gz ln -sf ../python$(VER)/README.debug \ debian/python2-dbg/usr/share/doc/python2/README.debug mkdir -p debian/python2/usr/lib/valgrind cp -p debian/valgrind-python.supp \ debian/python2/usr/lib/valgrind/python2.supp : # provide the DEB_HOST_GNU_TYPE/DEB_HOST_MULTIRACH python2-config defaults mkdir -p debian/libpython2-dev/usr/bin ln -sf $(DEB_HOST_MULTIARCH)-python$(VER)-config \ debian/libpython2-dev/usr/bin/$(DEB_HOST_MULTIARCH)-python2-config mkdir -p debian/libpython2-dev/usr/share/man/man1 ln -sf $(DEB_HOST_MULTIARCH)-python$(VER)-config.1.gz \ debian/libpython2-dev/usr/share/man/man1/$(DEB_HOST_MULTIARCH)-python2-config.1.gz ifneq ($(DEB_HOST_MULTIARCH),$(DEB_HOST_GNU_TYPE)) ln -sf $(DEB_HOST_GNU_TYPE)-python$(VER)-config \ debian/libpython2-dev/usr/bin/$(DEB_HOST_GNU_TYPE)-python2-config ln -sf $(DEB_HOST_GNU_TYPE)-python$(VER)-config.1.gz \ debian/libpython2-dev/usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-python2-config.1.gz endif mkdir -p debian/libpython2-dbg/usr/bin ln -sf $(DEB_HOST_MULTIARCH)-python$(VER)-dbg-config \ debian/libpython2-dbg/usr/bin/$(DEB_HOST_MULTIARCH)-python2-dbg-config mkdir -p debian/libpython2-dbg/usr/share/man/man1 ln -sf $(DEB_HOST_MULTIARCH)-python$(VER)-dbg-config.1.gz \ debian/libpython2-dbg/usr/share/man/man1/$(DEB_HOST_MULTIARCH)-python2-dbg-config.1.gz ifneq ($(DEB_HOST_MULTIARCH),$(DEB_HOST_GNU_TYPE)) ln -sf $(DEB_HOST_GNU_TYPE)-python$(VER)-dbg-config \ debian/libpython2-dbg/usr/bin/$(DEB_HOST_GNU_TYPE)-python2-dbg-config ln -sf $(DEB_HOST_GNU_TYPE)-python$(VER)-dbg-config.1.gz \ debian/libpython2-dbg/usr/share/man/man1/$(DEB_HOST_GNU_TYPE)-python2-dbg-config.1.gz endif dh_lintian -a dh_installdocs -a $(NOPKGS) --all debian/README.Debian dh_installchangelogs -a $(NOPKGS) for p in dbg dev; do \ p=python2-$$p; \ rm -rf debian/$$p/usr/share/doc/$$p; \ ln -sf python2 debian/$$p/usr/share/doc/$$p; \ done for p in all all-dev all-dbg; do \ p=python-$$p; \ rm -rf debian/$$p/usr/share/doc/$$p; \ ln -sf python2 debian/$$p/usr/share/doc/$$p; \ done rm -rf debian/libpython-all-dev/usr/share/doc/libpython-all-dev ln -sf libpython2-dev debian/libpython-all-dev/usr/share/doc/libpython-all-dev rm -rf debian/libpython-all-dbg/usr/share/doc/libpython-all-dbg ln -sf libpython2-dbg debian/libpython-all-dbg/usr/share/doc/libpython-all-dbg dh_compress -a $(NOPKGS) dh_fixperms -a $(NOPKGS) dh_installdeb -a $(NOPKGS) dh_gencontrol -a $(NOPKGS) dh_md5sums -a $(NOPKGS) dh_builddeb -a $(NOPKGS) # Build architecture-dependent files here. binary-arch: build install # nothing to do binary: binary-indep binary-arch .PHONY: control-file configure build clean binary-indep binary-arch binary install # Local Variables: # mode: makefile # end: python-defaults-2.7.18/debian/source.lintian-overrides0000644000000000000000000000106014100235331017714 0ustar # this source package provides these packages so it cannot depend on them python-defaults source: dbg-package-missing-depends python-all-dbg python-defaults source: dbg-package-missing-depends python-dbg python-defaults source: dbg-package-missing-depends libpython-all-dbg python-defaults source: dbg-package-missing-depends libpython-dbg # it's upstream software, just splitted out. python-defaults source: native-package-with-dash-version # yes, that's going to be away as the second-last package ... python-defaults source: python-foo-but-no-python3-foo python-defaults-2.7.18/debian/valgrind-python.supp0000644000000000000000000001734514100235331017107 0ustar # # This is a valgrind suppression file that should be used when using valgrind. # # --------------------------------------------------------------------------- # Debian note: # The file Misc/valgrind-python.supp is placed in an modified form into the # directory /usr/lib/valgrind as python.supp. There's no need to to add it # with the --suppressions option. # The unmodified file is found in /usr/share/doc/python2.6/ # # The python2.6-dbg build has been compiled with -DPy_USING_MEMORY_DEBUGGER # so you can safely comment out the suppressions for PyObject_Free and # PyObject_Realloc. # --------------------------------------------------------------------------- # Here's an example of running valgrind: # # cd python/dist/src # valgrind --tool=memcheck --suppressions=Misc/valgrind-python.supp \ # ./python -E -tt ./Lib/test/regrtest.py -u bsddb,network # # You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER # to use the preferred suppressions with Py_ADDRESS_IN_RANGE. # # If you do not want to recompile Python, you can uncomment # suppressions for PyObject_Free and PyObject_Realloc. # # See /usr/share/doc/python2.6/README.valgrind for more information. # all tool names: Addrcheck,Memcheck,cachegrind,helgrind,massif { ADDRESS_IN_RANGE/Invalid read of size 4 Memcheck:Addr4 fun:Py_ADDRESS_IN_RANGE } { ADDRESS_IN_RANGE/Invalid read of size 4 Memcheck:Value4 fun:Py_ADDRESS_IN_RANGE } { ADDRESS_IN_RANGE/Invalid read of size 8 (x86_64 aka amd64) Memcheck:Value8 fun:Py_ADDRESS_IN_RANGE } { ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value Memcheck:Cond fun:Py_ADDRESS_IN_RANGE } # # Leaks (including possible leaks) # Hmmm, I wonder if this masks some real leaks. I think it does. # Will need to fix that. # { Suppress leaking the GIL. Happens once per process, see comment in ceval.c. Memcheck:Leak fun:malloc fun:PyThread_allocate_lock fun:PyEval_InitThreads } { Suppress leaking the GIL after a fork. Memcheck:Leak fun:malloc fun:PyThread_allocate_lock fun:PyEval_ReInitThreads } { Suppress leaking the autoTLSkey. This looks like it shouldn't leak though. Memcheck:Leak fun:malloc fun:PyThread_create_key fun:_PyGILState_Init fun:Py_InitializeEx fun:Py_Main } { Hmmm, is this a real leak or like the GIL? Memcheck:Leak fun:malloc fun:PyThread_ReInitTLS } { Handle PyMalloc confusing valgrind (possibly leaked) Memcheck:Leak fun:realloc fun:_PyObject_GC_Resize fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING } { Handle PyMalloc confusing valgrind (possibly leaked) Memcheck:Leak fun:malloc fun:_PyObject_GC_New fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING } { Handle PyMalloc confusing valgrind (possibly leaked) Memcheck:Leak fun:malloc fun:_PyObject_GC_NewVar fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING } # # Non-python specific leaks # { Handle pthread issue (possibly leaked) Memcheck:Leak fun:calloc fun:allocate_dtv fun:_dl_allocate_tls_storage fun:_dl_allocate_tls } { Handle pthread issue (possibly leaked) Memcheck:Leak fun:memalign fun:_dl_allocate_tls_storage fun:_dl_allocate_tls } ###{ ### ADDRESS_IN_RANGE/Invalid read of size 4 ### Memcheck:Addr4 ### fun:PyObject_Free ###} ### ###{ ### ADDRESS_IN_RANGE/Invalid read of size 4 ### Memcheck:Value4 ### fun:PyObject_Free ###} ### ###{ ### ADDRESS_IN_RANGE/Use of uninitialised value of size 8 ### Memcheck:Addr8 ### fun:PyObject_Free ###} ### ###{ ### ADDRESS_IN_RANGE/Use of uninitialised value of size 8 ### Memcheck:Value8 ### fun:PyObject_Free ###} ### ###{ ### ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value ### Memcheck:Cond ### fun:PyObject_Free ###} ###{ ### ADDRESS_IN_RANGE/Invalid read of size 4 ### Memcheck:Addr4 ### fun:PyObject_Realloc ###} ### ###{ ### ADDRESS_IN_RANGE/Invalid read of size 4 ### Memcheck:Value4 ### fun:PyObject_Realloc ###} ### ###{ ### ADDRESS_IN_RANGE/Use of uninitialised value of size 8 ### Memcheck:Addr8 ### fun:PyObject_Realloc ###} ### ###{ ### ADDRESS_IN_RANGE/Use of uninitialised value of size 8 ### Memcheck:Value8 ### fun:PyObject_Realloc ###} ### ###{ ### ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value ### Memcheck:Cond ### fun:PyObject_Realloc ###} ### ### All the suppressions below are for errors that occur within libraries ### that Python uses. The problems to not appear to be related to Python's ### use of the libraries. ### { Generic ubuntu ld problems Memcheck:Addr8 obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so obj:/lib/ld-2.4.so } { Generic gentoo ld problems Memcheck:Cond obj:/lib/ld-2.3.4.so obj:/lib/ld-2.3.4.so obj:/lib/ld-2.3.4.so obj:/lib/ld-2.3.4.so } { DBM problems, see test_dbm Memcheck:Param write(buf) fun:write obj:/usr/lib/libdb1.so.2 obj:/usr/lib/libdb1.so.2 obj:/usr/lib/libdb1.so.2 obj:/usr/lib/libdb1.so.2 fun:dbm_close } { DBM problems, see test_dbm Memcheck:Value8 fun:memmove obj:/usr/lib/libdb1.so.2 obj:/usr/lib/libdb1.so.2 obj:/usr/lib/libdb1.so.2 obj:/usr/lib/libdb1.so.2 fun:dbm_store fun:dbm_ass_sub } { DBM problems, see test_dbm Memcheck:Cond obj:/usr/lib/libdb1.so.2 obj:/usr/lib/libdb1.so.2 obj:/usr/lib/libdb1.so.2 fun:dbm_store fun:dbm_ass_sub } { DBM problems, see test_dbm Memcheck:Cond fun:memmove obj:/usr/lib/libdb1.so.2 obj:/usr/lib/libdb1.so.2 obj:/usr/lib/libdb1.so.2 obj:/usr/lib/libdb1.so.2 fun:dbm_store fun:dbm_ass_sub } { GDBM problems, see test_gdbm Memcheck:Param write(buf) fun:write fun:gdbm_open } { ZLIB problems, see test_gzip Memcheck:Cond obj:/lib/libz.so.1.2.3.3 obj:/lib/libz.so.1.2.3.3 fun:deflate } { Avoid problems w/readline doing a putenv and leaking on exit Memcheck:Leak fun:malloc fun:xmalloc fun:sh_set_lines_and_columns fun:_rl_get_screen_size fun:_rl_init_terminal_io obj:/lib/libreadline.so.6.1 fun:rl_initialize } ### ### These occur from somewhere within the SSL, when running ### test_socket_sll. They are too general to leave on by default. ### ###{ ### somewhere in SSL stuff ### Memcheck:Cond ### fun:memset ###} ###{ ### somewhere in SSL stuff ### Memcheck:Value4 ### fun:memset ###} ### ###{ ### somewhere in SSL stuff ### Memcheck:Cond ### fun:MD5_Update ###} ### ###{ ### somewhere in SSL stuff ### Memcheck:Value4 ### fun:MD5_Update ###} # # All of these problems come from using test_socket_ssl # { from test_socket_ssl Memcheck:Cond fun:BN_bin2bn } { from test_socket_ssl Memcheck:Cond fun:BN_num_bits_word } { from test_socket_ssl Memcheck:Value4 fun:BN_num_bits_word } { from test_socket_ssl Memcheck:Cond fun:BN_mod_exp_mont_word } { from test_socket_ssl Memcheck:Cond fun:BN_mod_exp_mont } { from test_socket_ssl Memcheck:Param write(buf) fun:write obj:/usr/lib/libcrypto.so.0.9.8 } { from test_socket_ssl Memcheck:Cond fun:RSA_verify } { from test_socket_ssl Memcheck:Value4 fun:RSA_verify } { from test_socket_ssl Memcheck:Value4 fun:DES_set_key_unchecked } { from test_socket_ssl Memcheck:Value4 fun:DES_encrypt2 } { from test_socket_ssl Memcheck:Cond obj:/usr/lib/libssl.so.0.9.8 } { from test_socket_ssl Memcheck:Value4 obj:/usr/lib/libssl.so.0.9.8 } { from test_socket_ssl Memcheck:Cond fun:BUF_MEM_grow_clean } { from test_socket_ssl Memcheck:Cond fun:memcpy fun:ssl3_read_bytes } { from test_socket_ssl Memcheck:Cond fun:SHA1_Update } { from test_socket_ssl Memcheck:Value4 fun:SHA1_Update } python-defaults-2.7.18/debpython/0000755000000000000000000000000014100235331013611 5ustar python-defaults-2.7.18/debpython/__init__.py0000644000000000000000000000000014100235331015710 0ustar python-defaults-2.7.18/debpython/files.py0000644000000000000000000000575614100235331015302 0ustar # -*- coding: UTF-8 -*- # Copyright © 2010-2019 Piotr Ożarowski # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. import logging from os import walk from os.path import abspath, isfile, join from subprocess import Popen, PIPE log = logging.getLogger(__name__) def from_directory(dname, extensions=('.py',)): """Generate *.py file names available in given directory.""" extensions = tuple(extensions) # .endswith doesn't like list if isinstance(dname, (list, tuple)): for item in dname: for fn in from_directory(item): yield fn elif isfile(dname) and dname.endswith(extensions): yield dname else: for root, dirs, file_names in walk(abspath(dname)): for fn in file_names: if fn.endswith(extensions): yield join(root, fn) def from_package(package_name, extensions=('.py',)): """Generate *.py file names available in given package.""" extensions = tuple(extensions) # .endswith doesn't like list process = Popen("/usr/bin/dpkg -L %s" % package_name,\ shell=True, stdout=PIPE) stdout, stderr = process.communicate() if process.returncode != 0: raise Exception("cannot get content of %s" % package_name) for line in stdout.splitlines(): if line.endswith(extensions): yield line def filter_directory(files, dname): """Generate *.py file names that match given directory.""" for fn in files: if fn.startswith(dname): yield fn def filter_public(files, versions): """Generate *.py file names that match given versions.""" versions_str = set("%d.%d" % i for i in versions) for fn in files: if fn.startswith('/usr/lib/python') and \ fn[15:18] in versions_str: yield fn def filter_out_ext(files, extensions): """Removes files with matching extensions from given generator.""" for fn in files: if not fn.endswith(extensions): yield fn python-defaults-2.7.18/debpython/namespace.py0000644000000000000000000001113614100235331016121 0ustar # -*- coding: UTF-8 -*- # Copyright © 2011-2019 Piotr Ożarowski # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. from __future__ import with_statement import logging from os import environ, listdir, remove, rmdir from os.path import dirname, exists, join, getsize, split from subprocess import Popen, PIPE from debpython.tools import memoize, sitedir, PUBLIC_DIR_RE log = logging.getLogger(__name__) def parse(fpaths, other=None): """Parse namespace_packages.txt files.""" result = set(other or []) for fpath in fpaths: with open(fpath, 'r') as fp: for line in fp: if line: result.add(line.strip()) return result @memoize def load(package=None): """Return a set of namespaces to regenerate/clean. :param package: limit namespaces to the ones needed by given package """ fpaths = None # DESTDIR is used in tests nsdir = "%s/usr/share/python/ns/" % environ.get('DESTDIR', '') if package: # only one package is processed, no need to load all files fpath = join(nsdir, package) if exists(fpath): fpaths = [fpath] else: # load all files if exists(nsdir): fpaths = [join(nsdir, i) for i in listdir(nsdir)] if fpaths: result = set(i.replace('.', '/') for i in parse(fpaths)) else: result = set() return result def add_namespace_files(files, package=None, action=None): """Add __init__.py files to given generator.""" if action is not None: namespaces = load(package) already_processed = set() removal_candidates = set() for fn in files: yield fn if action is None: continue dpath = dirname(fn) if dpath not in already_processed: already_processed.add(dpath) m = PUBLIC_DIR_RE.match(dpath) if m: public_dir = m.group() while dpath != public_dir: ns_dir = dpath[len(public_dir) + 1:] if ns_dir in namespaces: fpath = join(dpath, '__init__.py') if action is True: try: open(fpath, 'a').close() except Exception: log.error('cannot create %s', fpath) else: yield fpath else: # action is False # postpone it due to dpkg -S call removal_candidates.add(fpath) already_processed.add(dpath) dpath = split(dpath)[0] # now deal with to-be-removed namespace candidates (dpkg -S is expensive) # dpgk -S is used just to be safe (in case some other package is providing # __init__.py file although it's in /usr/share/python/ns dir) if action is False and removal_candidates: process = Popen("/usr/bin/dpkg -S %s 2>/dev/null" % \ ' '.join(removal_candidates), shell=True, stdout=PIPE) # FIXME: len(search_string) > 131072 stdout, stderr = process.communicate() for line in stdout.splitlines(): ns = line.split(': ', 1)[1] if ns in removal_candidates: removal_candidates.remove(ns) for fpath in removal_candidates: try: remove(fpath) except (IOError, OSError), e: log.error('cannot remove %s', fpath) log.debug(e) else: yield fpath python-defaults-2.7.18/debpython/option.py0000644000000000000000000000353614100235331015502 0ustar # -*- coding: UTF-8 -*- # Copyright © 2010-2019 Piotr Ożarowski # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. import re import optparse from copy import copy from debpython.version import parse_vrange def parse_version_range(option, opt, value): try: return parse_vrange(value) except ValueError: raise optparse.OptionValueError("version range is invalid: %s" % value) def compile_regexpr(option, opt, value): try: pattern = re.compile(value) except Exception: raise optparse.OptionValueError('regular expression is not valid') return pattern class Option(optparse.Option): TYPES = optparse.Option.TYPES + ('version_range', 'regexpr') TYPE_CHECKER = copy(optparse.Option.TYPE_CHECKER) TYPE_CHECKER['version_range'] = parse_version_range TYPE_CHECKER['regexpr'] = compile_regexpr python-defaults-2.7.18/debpython/tools.py0000644000000000000000000000430414100235331015324 0ustar # -*- coding: UTF-8 -*- # Copyright © 2010-2019 Piotr Ożarowski # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. import re from cPickle import dumps PUBLIC_DIR_RE = re.compile(r'.*?/usr/lib/python(\d.\d+)/(site|dist)-packages') def sitedir(version, package=None, gdb=False): """Return path to site-packages directory. >>> sitedir((2, 5)) '/usr/lib/python2.5/site-packages/' >>> sitedir((2, 7), 'python-foo', True) 'debian/python-foo/usr/lib/debug/usr/lib/python2.7/dist-packages/' """ if isinstance(version, basestring): version = tuple(int(i) for i in version.split('.')) if version >= (2, 6): path = "/usr/lib/python%d.%d/dist-packages/" % version else: path = "/usr/lib/python%d.%d/site-packages/" % version if gdb: path = "/usr/lib/debug%s" % path if package: path = "debian/%s%s" % (package, path) return path class memoize(object): def __init__(self, func): self.func = func self.cache = {} def __call__(self, *args, **kwargs): key = dumps((args, kwargs)) if key not in self.cache: self.cache[key] = self.func(*args, **kwargs) return self.cache[key] python-defaults-2.7.18/debpython/version.py0000644000000000000000000001551414100235331015656 0ustar # -*- coding: UTF-8 -*- # Copyright © 2010-2019 Piotr Ożarowski # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. import logging import re from ConfigParser import SafeConfigParser from os import environ from os.path import exists from types import GeneratorType # will be overriden via debian_defaults file few lines later SUPPORTED = [(2, 7),] DEFAULT = (2, 7) RANGE_PATTERN = r'(-)?(\d\.\d+)(?:(-)(\d\.\d+)?)?' RANGE_RE = re.compile(RANGE_PATTERN) log = logging.getLogger(__name__) # try to read debian_defaults and get a list of supported Python versions and # the default one from there _supported = environ.get('DEBPYTHON_SUPPORTED') _default = environ.get('DEBPYTHON_DEFAULT') if not _supported or not _default: _config = SafeConfigParser() _config.read('/usr/share/python/debian_defaults') if not _default: _default = _config.get('DEFAULT', 'default-version')[6:] if not _supported: _supported = _config.get('DEFAULT', 'supported-versions')\ .replace('python', '') try: DEFAULT = tuple(int(i) for i in _default.split('.')) except Exception: log.exception('cannot read debian_defaults') try: SUPPORTED = tuple(tuple(int(j) for j in i.strip().split('.')) for i in _supported.split(',')) except Exception: log.exception('cannot read debian_defaults') def get_requested_versions(vrange=None, available=None): """Return a set of requested and supported Python versions. :param available: if set to `True`, return installed versions only, if set to `False`, return requested versions that are not installed. By default returns all requested versions. :type available: bool >>> sorted(get_requested_versions([(2, 5), (3, 0)])) [(2, 7)] >>> sorted(get_requested_versions('')) == sorted(SUPPORTED) True >>> sorted(get_requested_versions([None, None])) == sorted(SUPPORTED) True >>> get_requested_versions([(5, 0), None]) set([]) """ if isinstance(vrange, basestring): vrange = parse_vrange(vrange) if not vrange or list(vrange) == [None, None]: versions = set(SUPPORTED) else: minv = (0, 0) if vrange[0] is None else vrange[0] maxv = (99, 99) if vrange[1] is None else vrange[1] if minv == maxv: versions = set((minv,) if minv in SUPPORTED else tuple()) else: versions = set(v for v in SUPPORTED if minv <= v < maxv) if available: versions = set(v for v in versions if exists("/usr/bin/python%d.%d" % v)) elif available is False: versions = set(v for v in versions if not exists("/usr/bin/python%d.%d" % v)) return versions def parse_vrange(value): """Return minimum and maximum Python version from given range. >>> parse_vrange('2.4-') ((2, 4), None) >>> parse_vrange('2.4-2.6') ((2, 4), (2, 6)) >>> parse_vrange('2.4-3.0') ((2, 4), (3, 0)) >>> parse_vrange('-2.7') (None, (2, 7)) >>> parse_vrange('2.5') ((2, 5), (2, 5)) >>> parse_vrange('') == parse_vrange('-') == (None, None) True """ if value in ('', '-'): return None, None match = RANGE_RE.match(value) if not match: raise ValueError("version range is invalid: %s" % value) groups = match.groups() if list(groups).count(None) == 3: # only one version is allowed minv = tuple(int(i) for i in groups[1].split('.')) return minv, minv minv = maxv = None if groups[0]: # maximum version only maxv = groups[1] else: minv = groups[1] maxv = groups[3] minv = tuple(int(i) for i in minv.split('.')) if minv else None maxv = tuple(int(i) for i in maxv.split('.')) if maxv else None if maxv and minv and minv > maxv: raise ValueError("version range is invalid: %s" % value) return minv, maxv def vrepr(value): """ >>> vrepr(([2, 7], [3, 2])) ['2.7', '3.2'] >>> vrepr(('2.6', '3.1')) ['2.6', '3.1'] >>> vrepr('2.7') '2.7' >>> vrepr((2, 7)) '2.7' """ if isinstance(value, basestring): return value elif not isinstance(value, (GeneratorType, set))\ and isinstance(value[0], int): return '.'.join(str(i) for i in value) result = [] for version in value: if isinstance(version, basestring): result.append(version) else: result.append('.'.join(str(i) for i in version)) return result def getver(value): """Return pair of integers that represent version. >>> getver('2.5') (2, 5) >>> getver('2.6.4') (2, 6) >>> getver(None) '' """ if not value: return '' return tuple(int(i) for i in value.split('.', 2))[:2] def debsorted(versions, return_str=None): """Return sorted list of versions starting with default Python version (if available) then list of suppored versions greater than default one followed by reversed list of older versions. List of versions sorted this way can be used in Depends field. :param vrepr: return string represenatations of versions, by default the same format is used as in :param:`versions` >>> debsorted([(2, 6), (3, 1), (2, 5), (2, 4), (2, 7)])[0] == DEFAULT True >>> debsorted(('2.4', '3.2', '2.6', '2.7'))[-1] (2, 4) >>> debsorted(set([(2, 1), (2, 2)])) [(2, 2), (2, 1)] >>> debsorted([(2, 1), (2, 2)], return_str=True) ['2.2', '2.1'] """ result = [] old_versions = [] for version in sorted(versions): if isinstance(version, basestring): version = getver(version) if version < DEFAULT: old_versions.append(version) else: result.append(version) result.extend(reversed(old_versions)) if return_str and result: return vrepr(result) return result python-defaults-2.7.18/pyclean0000755000000000000000000001003414100235331013174 0ustar #! /usr/bin/python2 # -*- coding: UTF-8 -*- vim: et ts=4 sw=4 # # Copyright © 2010-2019 Piotr Ożarowski # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. import logging import optparse import sys from os import environ, remove from os.path import exists sys.path.insert(1, '/usr/share/python/') from debpython import files as dpf from debpython.namespace import add_namespace_files # initialize script logging.basicConfig(format='%(levelname).1s: %(module)s:%(lineno)d: ' '%(message)s') log = logging.getLogger(__name__) """TODO: move it to manpage Examples: pyclean -p python-mako # all .py[co] files from the package pyclean /usr/lib/python2.6/dist-packages # python2.6 """ def destroyer(): # ;-) """Removes every .py[co] file associated to received .py file.""" def find_files_to_remove(pyfile): for filename in ("%sc" % pyfile, "%so" % pyfile): if exists(filename): yield filename counter = 0 try: while True: pyfile = (yield) for filename in find_files_to_remove(pyfile): try: log.debug('removing %s', filename) remove(filename) counter += 1 except (IOError, OSError), e: log.error('cannot remove %s', filename) log.debug(e) except GeneratorExit: log.info("removed files: %s", counter) def main(): usage = '%prog [-p PACKAGE] [DIR_OR_FILE]' parser = optparse.OptionParser(usage, version='%prog 1.0') parser.add_option('-v', '--verbose', action='store_true', dest='verbose', help='turn verbose more one') parser.add_option('-q', '--quiet', action='store_false', dest='verbose', default=False, help='be quiet') parser.add_option('-p', '--package', help='specify Debian package name to clean') options, args = parser.parse_args() if options.verbose or environ.get('PYCLEAN_DEBUG') == '1': log.setLevel(logging.DEBUG) log.debug('argv: %s', sys.argv) log.debug('options: %s', options) log.debug('args: %s', args) else: log.setLevel(logging.WARNING) d = destroyer() d.next() # initialize coroutine if not options.package and not args: parser.print_usage() exit(1) if options.package: log.info('cleaning package %s', options.package) pfiles = dpf.from_package(options.package, extensions=('.py', '.so')) pfiles = add_namespace_files(pfiles, options.package, action=False) pfiles = set(dpf.filter_out_ext(pfiles, ('.so',))) if args: log.info('cleaning directories: %s', args) files = dpf.from_directory(args, extensions=('.py', '.so')) files = add_namespace_files(files, action=False) files = set(dpf.filter_out_ext(files, ('.so',))) if options.package: files = files & pfiles else: files = pfiles for filename in files: d.send(filename) if __name__ == '__main__': main() python-defaults-2.7.18/pyclean.10000644000000000000000000000246214100235331013336 0ustar .\" Man page generated from reStructuredText. . .TH PYCLEAN 1 "" "" "" .SH NAME pyclean \- removes .pyc and .pyo files . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 pyclean [\-p PACKAGE | DIR_OR_FILE] .UNINDENT .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .B \-\-version show program\(aqs version number and exit .TP .B \-h\fP,\fB \-\-help show this help message and exit .TP .B \-v\fP,\fB \-\-verbose turn verbose more one .TP .B \-q\fP,\fB \-\-quiet be quiet .TP .BI \-p \ PACKAGE\fP,\fB \ \-\-package\fB= PACKAGE specify Debian package name to clean (combining with DIR_OR_FILE will additionally limit list of files) .UNINDENT .SH AUTHOR Piotr Ożarowski, 2012-201 .\" Generated by docutils manpage writer. . python-defaults-2.7.18/pyclean.rst0000644000000000000000000000102414100235331013777 0ustar ========= pyclean ========= --------------------------- removes .pyc and .pyo files --------------------------- :Manual section: 1 :Author: Piotr Ożarowski, 2012-201 SYNOPSIS ======== pyclean [-p PACKAGE | DIR_OR_FILE] OPTIONS ======= --version show program's version number and exit -h, --help show this help message and exit -v, --verbose turn verbose more one -q, --quiet be quiet -p PACKAGE, --package=PACKAGE specify Debian package name to clean (combining with DIR_OR_FILE will additionally limit list of files) python-defaults-2.7.18/pycompile0000755000000000000000000002713314100235331013552 0ustar #! /usr/bin/python2 # -*- coding: utf-8 -*- vim: et ts=4 sw=4 # # Copyright © 2010-2019 Piotr Ożarowski # Copyright © 2010 Canonical Ltd # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. from __future__ import with_statement import logging import optparse import os import sys from os import environ, listdir from os.path import exists, isdir, islink, join from subprocess import PIPE, STDOUT, Popen sys.path.insert(1, '/usr/share/python/') from debpython.version import SUPPORTED, debsorted, vrepr, \ get_requested_versions, parse_vrange, getver from debpython import files as dpf from debpython.namespace import add_namespace_files from debpython.option import Option, compile_regexpr from debpython.tools import memoize, PUBLIC_DIR_RE # initialize script logging.basicConfig(format='%(levelname).1s: %(module)s:%(lineno)d: ' '%(message)s') log = logging.getLogger(__name__) STDINS = {} WORKERS = {} """TODO: move it to manpage Examples: pycompile -p python-mako # package's public files pycompile -p foo /usr/share/foo # package's private files pycompile -p foo -V 2.6- /usr/share/foo # private files, Python >= 2.6 pycompile -V 2.6 /usr/lib/python2.6/dist-packages # python2.6 only pycompile -V 2.6 /usr/lib/foo/bar.py # python2.6 only """ ### EXCLUDES ################################################### @memoize def get_exclude_patterns_from_dir(name='/usr/share/python/bcep/'): """Return patterns for files that shouldn't be bytecompiled.""" if not isdir(name): return [] result = [] for fn in listdir(name): with file(join(name, fn), 'r') as lines: for line in lines: type_, vrange, dname, pattern = line.split('|', 3) vrange = parse_vrange(vrange) versions = get_requested_versions(vrange, available=True) if not versions: # pattern doesn't match installed Python versions continue pattern = pattern.rstrip('\n') if type_ == 're': pattern = compile_regexpr(None, None, pattern) result.append((type_, versions, dname, pattern)) return result def get_exclude_patterns(directory='/', patterns=None, versions=None): """Return patterns for files that shouldn't be compiled in given dir.""" if versions is not None: # make sure it's a set (debsorted returns a list) versions = set(versions) if patterns: if versions is None: versions = set(SUPPORTED) patterns = [('re', versions, directory, i) for i in patterns] else: patterns = [] for type_, vers, dname, pattern in get_exclude_patterns_from_dir(): # skip patterns that do not match requested directory if not dname.startswith(directory[:len(dname)]): continue # skip patterns that do not match requested versions if versions and not versions & vers: continue patterns.append((type_, vers, dname, pattern)) return patterns def filter_files(files, e_patterns, compile_versions): """Generate (file, versions_to_compile) pairs.""" for fn in files: valid_versions = set(compile_versions) # all by default for type_, vers, dname, pattern in e_patterns: if type_ == 'dir' and fn.startswith(dname): valid_versions = valid_versions - vers elif type_ == 're' and pattern.match(fn): valid_versions = valid_versions - vers # move to the next file if all versions were removed if not valid_versions: break if valid_versions: public_dir = PUBLIC_DIR_RE.match(fn) if public_dir: yield fn, set([getver(public_dir.group(1))]) else: yield fn, valid_versions ### COMPILE #################################################### def py_compile(version, optimize, workers): if not isinstance(version, basestring): version = vrepr(version) cmd = "/usr/bin/python%s%s -m py_compile -" \ % (version, ' -O' if optimize else '') process = Popen(cmd, bufsize=1, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True) workers[version] = process # keep the reference for .communicate() stdin = process.stdin while True: filename = (yield) stdin.write(filename + '\n') def compile(files, versions, force, optimize, e_patterns=None): global STDINS, WORKERS # start Python interpreters that will handle byte compilation for version in versions: if version not in STDINS: coroutine = py_compile(version, optimize, WORKERS) coroutine.next() STDINS[version] = coroutine # byte compile files for fn, versions_to_compile in filter_files(files, e_patterns, versions): cfn = fn + 'o' if optimize else 'c' if not exists(fn): # pycentral's hook should clean it later if islink(fn): log.warn('dangling symlink skipped: %s (%s)', fn, os.readlink(fn)) continue if exists(cfn) and not force: ftime = os.stat(fn).st_mtime try: ctime = os.stat(cfn).st_mtime except os.error: ctime = 0 if ctime > ftime: continue for version in versions_to_compile: try: pipe = STDINS[version] except KeyError: # `pycompile /usr/lib/` invoked, add missing worker pipe = py_compile(version, optimize, WORKERS) pipe.next() STDINS[version] = pipe pipe.send(fn) ################################################################ def main(): usage = '%prog [-V [X.Y][-][A.B]] DIR_OR_FILE [-X REGEXPR]\n' + \ ' %prog -p PACKAGE' parser = optparse.OptionParser(usage, version='%prog 1.0', option_class=Option) parser.add_option('-v', '--verbose', action='store_true', dest='verbose', help='turn verbose mode on') parser.add_option('-q', '--quiet', action='store_false', dest='verbose', default=False, help='be quiet') parser.add_option('-f', '--force', action='store_true', dest='force', default=False, help='force rebuild even if timestamps are up-to-date') parser.add_option('-O', action='store_true', dest='optimize', default=False, help="byte-compile to .pyo files") parser.add_option('-p', '--package', help='specify Debian package name whose files should be bytecompiled') parser.add_option('-V', type='version_range', dest='vrange', help="""force private modules to be bytecompiled with Python version from given range, regardless of the default Python version in the system. If there are no other options, bytecompile all public modules for installed Python versions that match given range. VERSION_RANGE examples: '2.5' (version 2.5 only), '2.5-' (version 2.5 or newer), '2.5-2.7' (version 2.5 or 2.6), '-3.0' (all supported 2.X versions)""") parser.add_option('-X', '--exclude', action='append', dest='regexpr', type='regexpr', help='exclude items that match given REGEXPR. You may use this option \ multiple times to build up a list of things to exclude.') (options, args) = parser.parse_args() if options.verbose or environ.get('PYCOMPILE_DEBUG') == '1': log.setLevel(logging.DEBUG) log.debug('argv: %s', sys.argv) log.debug('options: %s', options) log.debug('args: %s', args) else: log.setLevel(logging.WARN) if options.regexpr and not args: parser.error('--exclude option works with private directories ' 'only, please use /usr/share/python/bcep to specify ' 'public modules to skip') if options.vrange and options.vrange[0] == options.vrange[1] and\ options.vrange != (None, None) and\ exists("/usr/bin/python%d.%d" % options.vrange[0]): # specific version requested, use it even if it's not in SUPPORTED versions = set(options.vrange[:1]) else: versions = get_requested_versions(options.vrange, available=True) if not versions: log.error('Requested versions are not installed') exit(3) if options.package and args: # package's private directories # get requested Python version compile_versions = debsorted(versions)[:1] log.debug('compile versions: %s', versions) pkg_files = tuple(dpf.from_package(options.package)) for item in args: e_patterns = get_exclude_patterns(item, options.regexpr, \ compile_versions) if not exists(item): log.warn('No such file or directory: %s', item) else: log.debug('byte compiling %s using Python %s', item, compile_versions) files = dpf.filter_directory(pkg_files, item) compile(files, compile_versions, options.force, options.optimize, e_patterns) elif options.package: # package's public modules # no need to limit versions here, version is hardcoded in path or # via -V option e_patterns = get_exclude_patterns() files = dpf.from_package(options.package, extensions=('.py', '.so')) files = dpf.filter_public(files, versions) files = add_namespace_files(files, options.package, action=True) files = dpf.filter_out_ext(files, ('.so',)) compile(files, versions, options.force, options.optimize, e_patterns) elif args: # other directories/files versions = debsorted(versions)[:1] for item in args: e_patterns = get_exclude_patterns(item, options.regexpr, versions) files = dpf.from_directory(item, extensions=('.py', '.so')) files = add_namespace_files(files, action=True) files = dpf.filter_out_ext(files, ('.so',)) compile(files, versions, options.force, options.optimize, e_patterns) else: parser.print_usage() exit(1) # wait for all processes to finish rv = 0 for process in WORKERS.itervalues(): child_output, child_unused = process.communicate() if process.returncode not in (None, 0): # FIXME: find out the package the file belongs to sys.stderr.write(child_output) rv = process.returncode if rv != 0: rv += 100 exit(rv) if __name__ == '__main__': main() python-defaults-2.7.18/pycompile.10000644000000000000000000000452614100235331013707 0ustar .\" Man page generated from reStructuredText. . .TH PYCOMPILE 1 "" "" "" .SH NAME pycompile \- byte compile Python source files . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 pycompile [\-V [X.Y][\-][A.B]] DIR_OR_FILE [\-X REGEXPR] .sp pycompile \-p PACKAGE .UNINDENT .UNINDENT .SH DESCRIPTION .sp Wrapper around Python standard library\(aqs py_compile module to byte\-compile Python files. .SH OPTIONS .INDENT 0.0 .TP .B \-\-version show program\(aqs version number and exit .TP .B \-h\fP,\fB \-\-help show this help message and exit .TP .B \-f\fP,\fB \-\-force force rebuild of byte\-code files even if timestamps are up\-to\-date .TP .B \-O byte\-compile to .pyo files .TP .B \-q\fP,\fB \-\-quiet be quiet .TP .B \-v\fP,\fB \-\-verbose turn verbose mode on .TP .BI \-p \ PACKAGE\fP,\fB \ \-\-package\fB= PACKAGE specify Debian package name whose files should be bytecompiled (combining with DIR_OR_FILE will additionally limit list of files) .TP .BI \-V \ VRANGE force private modules to be bytecompiled with Python version from given range, regardless of the default Python version in the system. If there are no other options, bytecompile all public modules for installed Python versions that match given range. VERSION_RANGE examples: .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 \fB2.5\fP version 2.5 only .IP \(bu 2 \fB2.5\-\fP version 2.5 or newer .IP \(bu 2 \fB2.5\-2.7\fP version 2.5 or 2.6 .IP \(bu 2 \fB\-3.0\fP all supported 2.X versions .UNINDENT .UNINDENT .UNINDENT .TP .BI \-X \ REGEXPR\fP,\fB \ \-\-exclude\fB= REGEXPR exclude items that match given REGEXPR. You may use this option multiple times to build up a list of things to exclude .UNINDENT .SH AUTHOR Piotr Ożarowski, 2012-2013 .\" Generated by docutils manpage writer. . python-defaults-2.7.18/pycompile.rst0000644000000000000000000000263314100235331014354 0ustar ========== pycompile ========== -------------------------------- byte compile Python source files -------------------------------- :Manual section: 1 :Author: Piotr Ożarowski, 2012-2013 SYNOPSIS ======== pycompile [-V [X.Y][-][A.B]] DIR_OR_FILE [-X REGEXPR] pycompile -p PACKAGE DESCRIPTION =========== Wrapper around Python standard library's py_compile module to byte-compile Python files. OPTIONS ======= --version show program's version number and exit -h, --help show this help message and exit -f, --force force rebuild of byte-code files even if timestamps are up-to-date -O byte-compile to .pyo files -q, --quiet be quiet -v, --verbose turn verbose mode on -p PACKAGE, --package=PACKAGE specify Debian package name whose files should be bytecompiled (combining with DIR_OR_FILE will additionally limit list of files) -V VRANGE force private modules to be bytecompiled with Python version from given range, regardless of the default Python version in the system. If there are no other options, bytecompile all public modules for installed Python versions that match given range. VERSION_RANGE examples: * ``2.5`` version 2.5 only * ``2.5-`` version 2.5 or newer * ``2.5-2.7`` version 2.5 or 2.6 * ``-3.0`` all supported 2.X versions -X REGEXPR, --exclude=REGEXPR exclude items that match given REGEXPR. You may use this option multiple times to build up a list of things to exclude python-defaults-2.7.18/runtime.d/0000755000000000000000000000000014100235331013522 5ustar python-defaults-2.7.18/runtime.d/public_modules.rtinstall0000755000000000000000000000056714100235331020501 0ustar #! /bin/sh set -e VERSION=${2#python} case "$VERSION" in 2.[45]) sitedir=/usr/lib/python$VERSION/site-packages;; *) sitedir=/usr/lib/python$VERSION/dist-packages esac if which python >/dev/null 2>&1 && which pycompile >/dev/null 2>&1; then pycompile -V $VERSION $sitedir else echo >&2 "python or pycompile not found in $(basename $0) hook." exit 1 fi python-defaults-2.7.18/runtime.d/public_modules.rtremove0000755000000000000000000000047414100235331020325 0ustar #! /bin/sh set -e VERSION=${2#python} case "$VERSION" in 2.[45]) sitedir=/usr/lib/python$VERSION/site-packages;; *) sitedir=/usr/lib/python$VERSION/dist-packages esac if which python >/dev/null 2>&1 && which pyclean >/dev/null 2>&1; then pyclean $sitedir else find $sitedir -name '*.py[co]' -delete fi