From bd06b1d04c2e233fef4b68947f7e2dde050cd986 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org>
Date: Mon, 29 Nov 2010 20:11:48 +0100
Subject: [PATCH] do not try to check if interpreter is present when version
 range is empty (closes: 605356)

---
 debian/changelog | 9 ++++++---
 pycompile        | 1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index dfe2028..da993ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,9 +7,12 @@ python-defaults (2.6.6-6) UNRELEASED; urgency=low
     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 files)
-  * pycompile: `pycompile $DESTDIR/usr/lib/python*` will recognize public
-    site-packages directories and use the right interpreter instead of raising
-    KeyError
+  * 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 <piotr@debian.org>  Sun, 21 Nov 2010 23:49:32 +0100
 
diff --git a/pycompile b/pycompile
index 2d0a37c..8a3165e 100755
--- a/pycompile
+++ b/pycompile
@@ -242,6 +242,7 @@ multiple times to build up a list of things to exclude.')
             '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])
-- 
GitLab