From b61e778de2a4e9531208f035ef385561ef8fcf57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org>
Date: Sat, 15 Jan 2011 21:59:49 +0100
Subject: [PATCH] one more INSTALL_RE fix

---
 debpython/tools.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debpython/tools.py b/debpython/tools.py
index 8e97867..bd441d5 100644
--- a/debpython/tools.py
+++ b/debpython/tools.py
@@ -35,8 +35,9 @@ EGGnPTH_RE = re.compile(r'(.*?)(-py\d\.\d(?:-[^.]*)?)?(\.egg-info|\.pth)$')
 SHEBANG_RE = re.compile(r'^#!\s*/usr/bin/(?:env\s+)?(python(\d+\.\d+)?(?:-dbg)?).*')
 INSTALL_RE = re.compile(r"""
     (?P<pattern>.+?)  # file pattern
-    \s+  # optional Python module name:
+    (?:\s+  # optional Python module name:
     (?P<module>[A-Za-z][A-Za-z0-9_.]*)?
+    )?
     \s*  # optional version range:
     (?P<vrange>%s)?$
 """ % RANGE_PATTERN, re.VERBOSE)
-- 
GitLab