From 418630ae6cfbcdb9ab97f8382375637dc6ec6816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org> Date: Sun, 17 Oct 2010 23:44:47 +0200 Subject: [PATCH] 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) --- debian/changelog | 7 +++++++ pycompile | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 66c4b61..16f3fb5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +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 <piotr@debian.org> 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. diff --git a/pycompile b/pycompile index b1ff118..bcef097 100755 --- a/pycompile +++ b/pycompile @@ -235,7 +235,12 @@ multiple times to build up a list of things to exclude.') 'only, please use /usr/share/python/bcep to specify ' 'public modules to skip') - versions = get_requested_versions(options.vrange, available=True) + if options.vrange and options.vrange[0] == options.vrange[1] 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) -- GitLab