diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-10-18 01:31:31 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-10-19 13:15:17 -0400 |
commit | c94a2864d4fbe11d86a94849c995f983b088ad58 (patch) | |
tree | 5bd4cb3204d1ab1bc70fe86c98b884f66d2eb272 /gnu/packages/python-xyz.scm | |
parent | 5e2140511c1ad9ccd731438b74d61b62111da1e6 (diff) |
build-system/python: Do not embed timestamps in the .pyc byte code files.
Fixes <https://issues.guix.gnu.org/22129>.
A previously worked around problem where running the test suite after byte
compiling the sources in commit 6bbb37a545912c6bb2513ee08587ee4fe39cc330 could
be broken by adding built sources to the PYTHONPATH, as is done for
python-matplotlib and many others. This seems to be caused by the timestamps
embedded in the sources (mtime), that can somehow change when running the
tests, or by picking up the different installed source files mtimes when their
location is added to the PYTHONPATH.
Since Python 3.7.0, it is possible to produce .pyc byte code files that do not
embed any timestamp, which solves the problem in a definitive way. This patch
makes use of this new feature.
* guix/build/python-build-system.scm (install): Add '--no-compile' parameter
to setup.py, and instead invoke the 'compileall' module with the
"--invalidation-mode=unchecked-hash" option to byte compile the source files.
(%standard-phases): Revert the workaround that moved the check phase after the
install phase, as it is no longer necessary. Update comment.
Reported-by: Mark H Weaver <mhw@netris.org>
Diffstat (limited to 'gnu/packages/python-xyz.scm')
0 files changed, 0 insertions, 0 deletions