diff --git a/debian/changelog b/debian/changelog index 8d240281bb94b61eee7e6e1118ed8a4051826af5..aed4e4dd678f080057b514e300284610d108d203 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ -python-defaults (2.6.5-11) UNRELEASED; urgency=low +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) -- Piotr Ożarowski <piotr@debian.org> Tue, 27 Jul 2010 21:25:54 +0200 diff --git a/pycompile b/pycompile index 6ad8ec3d4491bd57b8b96e69452f0aa9ca843bd5..f70aa2853b06409866d0d43e6a1bedb2f2df1cdd 100755 --- a/pycompile +++ b/pycompile @@ -31,8 +31,9 @@ from os.path import abspath, exists, isdir, isfile, join from subprocess import PIPE, Popen sys.path.insert(1, '/usr/share/python/') from debpython.version import SUPPORTED, debsorted, vrepr, \ - get_requested_versions, parse_vrange + get_requested_versions, parse_vrange, getver from debpython.option import Option, compile_regexpr +from debpython.pydist import PUBLIC_DIR_RE from debpython.tools import memoize # initialize script @@ -155,7 +156,11 @@ def filter_files(files, e_patterns, compile_versions): if not valid_versions: break if valid_versions: - yield fn, 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 ####################################################