comparison Resources/EmbedResources.py @ 3587:76b3228f99b0

Sort file lists to make builds reproducible in spite of nondeterministic filesystem readdir order. See https://reproducible-builds.org/ for why this matters.
author Bernhard M. Wiedemann <bernhard+hgcommit@lsmod.de>
date Thu, 05 Dec 2019 16:21:41 +0100
parents e60e194531e5
children 94f4a18a79cc
comparison
equal deleted inserted replaced
3586:732922e48937 3587:76b3228f99b0
99 99
100 if os.path.isdir(pathName): 100 if os.path.isdir(pathName):
101 # The resource is a directory: Recursively explore its files 101 # The resource is a directory: Recursively explore its files
102 content = {} 102 content = {}
103 for root, dirs, files in os.walk(pathName): 103 for root, dirs, files in os.walk(pathName):
104 dirs.sort()
105 files.sort()
104 base = os.path.relpath(root, pathName) 106 base = os.path.relpath(root, pathName)
105 107
106 # Fix issue #24 (Build fails on OSX when directory has .DS_Store files): 108 # Fix issue #24 (Build fails on OSX when directory has .DS_Store files):
107 # Ignore folders whose name starts with a dot (".") 109 # Ignore folders whose name starts with a dot (".")
108 if base.find('/.') != -1: 110 if base.find('/.') != -1: