unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#35117] [PATCH] build-system/python: Move the check phase after the install phase.
@ 2019-04-03  4:23 Maxim Cournoyer
  2019-04-19 13:47 ` bug#35117: " Maxim Cournoyer
  0 siblings, 1 reply; 2+ messages in thread
From: Maxim Cournoyer @ 2019-04-03  4:23 UTC (permalink / raw)
  To: 35117


[-- Attachment #1.1: Type: text/plain, Size: 322 bytes --]

Hello!

This fixes a (rare?) Python reproducibility problem that was discovered
when packaging PyGithub (see patch submission at
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35116).

You can try running a --check --no-grafts -K on the python-pygithub
package, before and after the fix to see the result.

Thanks,

Maxim


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-build-system-python-Move-the-check-phase-after-the-i.patch --]
[-- Type: text/x-patch, Size: 2139 bytes --]

From 6fdd6b942b1cddc25bab89b9e256a5dc83d89d35 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Wed, 3 Apr 2019 00:09:20 -0400
Subject: [PATCH] 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.
---
 guix/build/python-build-system.scm | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 5bb0ba49d5..9a1a95111a 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -251,16 +251,21 @@ installed with setuptools."
   #t)
 
 (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
     (add-after 'unpack 'ensure-no-mtimes-pre-1980 ensure-no-mtimes-pre-1980)
     (add-after 'ensure-no-mtimes-pre-1980 'enable-bytecode-determinism
       enable-bytecode-determinism)
     (delete 'bootstrap)
-    (delete 'configure)
-    (replace 'install install)
-    (replace 'check check)
+    (delete 'configure)                 ;not needed
     (replace 'build build)
+    (delete 'check)                     ;moved after the install phase
+    (replace 'install install)
+    (add-after 'install 'check check)
     (add-after 'install 'wrap wrap)
     (add-before 'strip 'rename-pth-file rename-pth-file)))
 
-- 
2.20.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#35117: [PATCH] build-system/python: Move the check phase after the install phase.
  2019-04-03  4:23 [bug#35117] [PATCH] build-system/python: Move the check phase after the install phase Maxim Cournoyer
@ 2019-04-19 13:47 ` Maxim Cournoyer
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2019-04-19 13:47 UTC (permalink / raw)
  To: 35117-done

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hello!
>
> This fixes a (rare?) Python reproducibility problem that was discovered
> when packaging PyGithub (see patch submission at
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35116).
>
> You can try running a --check --no-grafts -K on the python-pygithub
> package, before and after the fix to see the result.
>
> Thanks,
>
> Maxim

I went ahead and pushed this to core-updates with commit 6bbb37a545.

Closing.

Maxim

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-19 14:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03  4:23 [bug#35117] [PATCH] build-system/python: Move the check phase after the install phase Maxim Cournoyer
2019-04-19 13:47 ` bug#35117: " Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).