diff --git a/debian/changelog b/debian/changelog index 67a2a3b8d58e996ce61df5947e415c9244b62b1a..8436033bc7f8836b1989028ce8907b44405eb9bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ python-defaults (2.6.6-6) UNRELEASED; urgency=low * dh_python2: install files listed in debian/package.pyinstall file as public modules for all requested Python versions (use dh_install's package.install files for private modules) + * pycompile: `pycompile $DESTDIR/usr/lib/python*` will recognize public + site-packages directories and use the right interpreter instead of raising + KeyError -- Piotr Ożarowski <piotr@debian.org> Sun, 21 Nov 2010 23:49:32 +0100 diff --git a/pycompile b/pycompile index bcef097f1bb84a66b96ed3339e8f9041ec638651..2d0a37c462886fbe7d3848ebe85e628877506dc4 100755 --- a/pycompile +++ b/pycompile @@ -191,7 +191,13 @@ def compile(files, versions, e_patterns=None): if exists("%sc" % fn): continue for version in versions_to_compile: - pipe = STDINS[version] + try: + pipe = STDINS[version] + except KeyError: + # `pycompile /usr/lib/` invoked, add missing worker + pipe = py_compile(version, WORKERS) + pipe.next() + STDINS[version] = pipe pipe.send(fn)