From 847b44f2a5e8c8a18540709683f708b4f4e58d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr@debian.org> Date: Sun, 21 Oct 2012 23:05:39 +0200 Subject: [PATCH] fix regression from rev. 338 - parsing shebang from string with newlines works fine again --- debian/changelog | 6 ++---- debpython/tools.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index a062167..fb6cda4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-defaults (2.7.3-3) UNRELEASED; urgency=low +python-defaults (2.7.3-3) unstable; urgency=low [ Piotr Ożarowski ] * dh_python2: @@ -8,8 +8,6 @@ python-defaults (2.7.3-3) UNRELEASED; urgency=low python3-* ones - generates correct "python (<< 2.X)" dependencies for packages with private Python extensions (typo fixed) - - TODO: parse interpreter version number from --shebang option and add - apropriate dependency/rt* script arguments * pyversions.py: fix parsing DEBPYTHON_SUPPORTED env. variable (versions should be separated using comma, as in debian_defaults config file) @@ -18,7 +16,7 @@ python-defaults (2.7.3-3) UNRELEASED; urgency=low * 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 <piotr@debian.org> Fri, 31 Aug 2012 18:06:26 +0200 + -- Piotr Ożarowski <piotr@debian.org> Sun, 21 Oct 2012 22:40:55 +0200 python-defaults (2.7.3-2) unstable; urgency=low diff --git a/debpython/tools.py b/debpython/tools.py index 7cd6e27..bab780f 100644 --- a/debpython/tools.py +++ b/debpython/tools.py @@ -33,7 +33,7 @@ from debpython.version import RANGE_PATTERN, getver, get_requested_versions log = logging.getLogger(__name__) EGGnPTH_RE = re.compile(r'(.*?)(-py\d\.\d(?:-[^.]*)?)?(\.egg-info|\.pth)$') -SHEBANG_RE = re.compile(r'^#!\s*(.*?/bin/.*?)(python(2\.\d+)?(?:-dbg)?)(?:\s(.*))?$') +SHEBANG_RE = re.compile(r'^#!\s*(.*?/bin/.*?)(python(2\.\d+)?(?:-dbg)?)(?:\s(.*))?[$\r\n].*') SHAREDLIB_RE = re.compile(r'NEEDED.*libpython(\d\.\d)') INSTALL_RE = re.compile(r""" (?P<pattern>.+?) # file pattern -- GitLab