Skip to content

Commit c98abf2

Browse files
committed
Merge #8373: Fix OSX non-deterministic dmg
3b3ce25 build: fix non-deterministic biplist (Cory Fields)
2 parents 045106b + 3b3ce25 commit c98abf2

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

depends/packages/native_biplist.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ $(package)_download_path=https://pypi.python.org/packages/source/b/biplist
44
$(package)_file_name=biplist-$($(package)_version).tar.gz
55
$(package)_sha256_hash=b57cadfd26e4754efdf89e9e37de87885f9b5c847b2615688ca04adfaf6ca604
66
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
7+
$(package)_patches=sorted_list.patch
8+
9+
define $(package)_preprocess_cmds
10+
patch -p1 < $($(package)_patch_dir)/sorted_list.patch
11+
endef
712

813
define $(package)_build_cmds
914
python setup.py build
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--- a/biplist/__init__.py 2014-10-26 19:03:11.000000000 +0000
2+
+++ b/biplist/__init__.py 2016-07-19 19:30:17.663521999 +0000
3+
@@ -541,7 +541,7 @@
4+
return HashableWrapper(n)
5+
elif isinstance(root, dict):
6+
n = {}
7+
- for key, value in iteritems(root):
8+
+ for key, value in sorted(iteritems(root)):
9+
n[self.wrapRoot(key)] = self.wrapRoot(value)
10+
return HashableWrapper(n)
11+
elif isinstance(root, list):
12+
@@ -616,7 +616,7 @@
13+
elif isinstance(obj, dict):
14+
size = proc_size(len(obj))
15+
self.incrementByteCount('dictBytes', incr=1+size)
16+
- for key, value in iteritems(obj):
17+
+ for key, value in sorted(iteritems(obj)):
18+
check_key(key)
19+
self.computeOffsets(key, asReference=True)
20+
self.computeOffsets(value, asReference=True)
21+
@@ -714,7 +714,7 @@
22+
keys = []
23+
values = []
24+
objectsToWrite = []
25+
- for key, value in iteritems(obj):
26+
+ for key, value in sorted(iteritems(obj)):
27+
keys.append(key)
28+
values.append(value)
29+
for key in keys:

0 commit comments

Comments
 (0)