summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2021-10-25 10:38:21 +0200
committerLudovic Courtès <ludo@gnu.org>2021-10-25 14:32:59 +0200
commitb87fe805aa66851f17f56078cb0e94f7cc4525df (patch)
tree362a26efeffafa44c5683073614bb59aa4fcf884 /gnu/packages/patches
parentbb524f43fb1722f4a3e948b7fae5b795077e86d1 (diff)
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>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/python-peachpy-determinism.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-peachpy-determinism.patch b/gnu/packages/patches/python-peachpy-determinism.patch
new file mode 100644
index 0000000000..f326a4b6b0
--- /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