summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorVagrant Cascadian <vagrant@reproducible-builds.org>2022-06-06 19:54:34 -0700
committerVagrant Cascadian <vagrant@debian.org>2022-06-07 08:42:41 -0700
commit96d47797dce361bd7f3b1ce860b1ec4851e2db5a (patch)
treedc577bc55871f69ba5f7813edcf8032851a4a975 /gnu/packages
parentceeb2bfcaeb4380e01d26c8425e28b94ac13558a (diff)
downloadguix-96d47797dce361bd7f3b1ce860b1ec4851e2db5a.tar.gz
gnu: python-debian: Set version to build reproducibly.
* gnu/packages/python-xyz.scm (python-debian)[arguments]: Add 'set-version
  phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-xyz.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2c76ff1922..f3d7fab973 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12465,6 +12465,13 @@ Python.")
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'set-version
+                    ;; for reproducible builds, otherwise python-debian
+                    ;; generates a _version.py including the date
+                    (lambda _
+                      (copy-file "lib/debian/_version.py.in" "lib/debian/_version.py")
+                      (substitute* "lib/debian/_version.py"
+                        (("__CHANGELOG_VERSION__") ,version))))
                   (add-after 'unpack 'remove-debian-specific-tests
                     ;; python-apt, apt and dpkg are not yet available in guix,
                     ;; and these tests heavily depend on them.