build-system/python: Move the check phase after the install phase.
A reproducibility problem was discovered while packaging python-pygithub where the bytecode produced by running the tests would interfere with the result of the install phase byte compilation. Moving the check phase after the install phase solves the problem. * guix/build/python-build-system.scm (%standard-phases): Add comment, move the check phase after the install phase.
This commit is contained in:
parent
db65a4fd91
commit
6bbb37a545
|
@ -250,16 +250,21 @@ installed with setuptools."
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
(define %standard-phases
|
(define %standard-phases
|
||||||
;; 'configure' phase is not needed.
|
;; The build phase only builds C extensions and copies the Python sources,
|
||||||
|
;; while the install phase byte-compiles and copies them to the prefix
|
||||||
|
;; directory. The tests are run after the install phase because otherwise
|
||||||
|
;; the cached .pyc generated during the tests execution seem to interfere
|
||||||
|
;; with the byte compilation of the install phase.
|
||||||
(modify-phases gnu:%standard-phases
|
(modify-phases gnu:%standard-phases
|
||||||
(add-after 'unpack 'ensure-no-mtimes-pre-1980 ensure-no-mtimes-pre-1980)
|
(add-after 'unpack 'ensure-no-mtimes-pre-1980 ensure-no-mtimes-pre-1980)
|
||||||
(add-after 'ensure-no-mtimes-pre-1980 'enable-bytecode-determinism
|
(add-after 'ensure-no-mtimes-pre-1980 'enable-bytecode-determinism
|
||||||
enable-bytecode-determinism)
|
enable-bytecode-determinism)
|
||||||
(delete 'bootstrap)
|
(delete 'bootstrap)
|
||||||
(delete 'configure)
|
(delete 'configure) ;not needed
|
||||||
(replace 'install install)
|
|
||||||
(replace 'check check)
|
|
||||||
(replace 'build build)
|
(replace 'build build)
|
||||||
|
(delete 'check) ;moved after the install phase
|
||||||
|
(replace 'install install)
|
||||||
|
(add-after 'install 'check check)
|
||||||
(add-after 'install 'wrap wrap)
|
(add-after 'install 'wrap wrap)
|
||||||
(add-before 'strip 'rename-pth-file rename-pth-file)))
|
(add-before 'strip 'rename-pth-file rename-pth-file)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue