--- Begin Message ---
Subject: |
New format/layout for byte-compiled files in python >= 3.2 penalizes automake support |
Date: |
Mon, 13 Jun 2011 11:45:45 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
Python 3.2 has changed the way in which byte-compiled files are stored
and searched for, introducing the new concept of a cache directory
`__pycache__' where version-specific byte-compiled files can be stored,
for many different python versions and implementations at once:
<http://www.python.org/dev/peps/pep-3147/>
This bit (from the "Proposal" section) is mostly relevant to us:
``.pyc file outside of __pycache__ will only be imported if the .py
source file is missing.''
This means that the byte-compiled files installed by the Python support in
Automake will not be used by newer (>= 3.2) python versions :-(
Luckily for us, this is "just" an optimization issue, not a correctness one:
python 3.2 and later will simply use the *.py files installed by automake,
the only downside being that it will have to recompile them on the fly each
time.
Nonetheless, I think this issue should be fixed in automake 1.12.
Regards,
Stefano
--- End Message ---
--- Begin Message ---
Subject: |
Re: [PATCH 0/8] tests: support for PEP-3147, and testsuite fixes |
Date: |
Wed, 21 Nov 2012 14:23:11 +0100 |
On 11/19/2012 11:12 PM, Stefano Lattarini wrote:
> Original patch:
> <http://lists.gnu.org/archive/html/automake-patches/2012-11/msg00023.html>
>
> Yaakov Selkowitz (1):
> python: improve support for modern python (CPython 3.2 and PyPy)
>
> Stefano Lattarini (7):
> news: document fix for bug#8847 (PEP-3147, __pycache__)
> tests: typofix in message
> tests: honour $PYTHON override
> tests: improve a comment
> python: uninstall cater to PEP-3147
> python tests: support PEP-3147 installation layout
> tests: fix a spurious failure when $PYTHON is in the environment
>
> NEWS | 3 ++
> lib/am/python.am | 30 ++++++++++---
> lib/py-compile | 18 ++++++--
> m4/python.m4 | 2 +-
> t/ax/am-test-lib.sh | 66 ++++++++++++++++++++++++++--
> t/list-of-tests.mk | 1 -
> t/nobase-python.sh | 50 +++++++++++----------
> t/py-compile-basedir.sh | 18 +++++---
> t/py-compile-basic.sh | 19 +++++---
> t/py-compile-basic2.sh | 70 -----------------------------
> t/py-compile-destdir.sh | 22 ++++++----
> t/py-compile-option-terminate.sh | 20 ++++-----
> t/python-pr10995.sh | 8 ++--
> t/python-too-old.sh | 3 +-
> t/python-vars.sh | 2 -
> t/python-virtualenv.sh | 95
> +++++++++++++++++++++++-----------------
> t/python10.sh | 36 +++++++--------
> t/python11.sh | 3 ++
> t/python12.sh | 14 +++---
> t/python3.sh | 6 +--
> 20 files changed, 272 insertions(+), 214 deletions(-)
> delete mode 100755 t/py-compile-basic2.sh
>
I've pushed this series to maint. Will soon merge into master as well.
I'm thus closing automake bug#8847.
Regards,
Stefano
--- End Message ---