[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: gnu: python-peachpy: Make output deterministic.
From: |
guix-commits |
Subject: |
01/04: gnu: python-peachpy: Make output deterministic. |
Date: |
Mon, 25 Oct 2021 08:34:41 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit b87fe805aa66851f17f56078cb0e94f7cc4525df
Author: Ludovic Courtès <ludovic.courtes@inria.fr>
AuthorDate: Mon Oct 25 10:38:21 2021 +0200
gnu: python-peachpy: Make output deterministic.
Fixes <https://issues.guix.gnu.org/50672>.
This makes users of python-peachpy bit-reproducible, such as nnpack.
* gnu/packages/patches/python-peachpy-determinism.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/python-xyz.scm (python-peachpy)[source]: Use it.
Co-authored-by: Kyle Meyer <kyle@kyleam.com>
---
gnu/local.mk | 1 +
.../patches/python-peachpy-determinism.patch | 25 ++++++++++++++++++++++
gnu/packages/python-xyz.scm | 3 ++-
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 2d52bba..cfd608f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1675,6 +1675,7 @@ dist_patch_DATA =
\
%D%/packages/patches/python-execnet-read-only-fix.patch \
%D%/packages/patches/python-flask-restful-werkzeug-compat.patch \
%D%/packages/patches/python-keras-integration-test.patch \
+ %D%/packages/patches/python-peachpy-determinism.patch \
%D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
%D%/packages/patches/python-pyfakefs-remove-bad-test.patch \
%D%/packages/patches/python-flint-includes.patch \
diff --git a/gnu/packages/patches/python-peachpy-determinism.patch
b/gnu/packages/patches/python-peachpy-determinism.patch
new file mode 100644
index 0000000..f326a4b
--- /dev/null
+++ b/gnu/packages/patches/python-peachpy-determinism.patch
@@ -0,0 +1,25 @@
+Make PeachPy processes deterministic:
+
+ https://github.com/Maratyszcza/PeachPy/issues/88
+ https://issues.guix.gnu.org/50672
+
+diff --git a/peachpy/name.py b/peachpy/name.py
+index b6a03dc..412079d 100644
+--- a/peachpy/name.py
++++ b/peachpy/name.py
+@@ -86,13 +86,13 @@ def add_scoped_name(self, scoped_name):
+ self.names[scope_name.name] = scope
+ else:
+ assert scope_name.name is None
+- self.prenames.setdefault(scope_name.prename, set())
++ self.prenames.setdefault(scope_name.prename, {})
+ if subscoped_name:
+ for subscope in iter(self.prenames[scope_name.prename]):
+ if isinstance(subscope, Namespace) and
subscope.scope_name is scope_name:
+ subscope.add_scoped_name(subscoped_name)
+ return
+- self.prenames[scope_name.prename].add(scope)
++ self.prenames[scope_name.prename][scope] = None
+
+ def assign_names(self):
+ # Step 1: assign names to symbols with prenames with no conflicts
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index eb9fcc3..a7b1e0e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27118,7 +27118,8 @@ and BMI2).")
(file-name (git-file-name name version))
(sha256
(base32
- "1yy62k3cjr6556nbp651w6v4hzl7kz4y75wy2dfqgndgbnixskx2"))))
+ "1yy62k3cjr6556nbp651w6v4hzl7kz4y75wy2dfqgndgbnixskx2"))
+ (patches (search-patches "python-peachpy-determinism.patch"))))
(build-system python-build-system)
(arguments
'(#:phases (modify-phases %standard-phases