Made library search order deterministic by sorting the result of os.listdir()
This commit is contained in:
parent
c41b1fa115
commit
343351155c
|
@ -83,7 +83,7 @@ def make_parts(target, part_type, parts = None):
|
|||
#
|
||||
# Find all the scad files
|
||||
#
|
||||
lib_dirs = [path + '/' + lib + '/printed' for path in os.environ['OPENSCADPATH'].split(os.pathsep) for lib in os.listdir(path)]
|
||||
lib_dirs = [path + '/' + lib + '/printed' for path in os.environ['OPENSCADPATH'].split(os.pathsep) for lib in sorted(os.listdir(path))]
|
||||
module_suffix = '_dxf' if part_type == 'svg' else '_' + part_type
|
||||
for dir in [source_dir, source_dir + '/printed'] + lib_dirs:
|
||||
if os.path.isdir(dir):
|
||||
|
|
|
@ -124,7 +124,7 @@ def views(target, do_assemblies = None):
|
|||
# Find all the scad files
|
||||
#
|
||||
main_blurb = None
|
||||
lib_dirs = [path + '/' + lib + '/printed' for path in os.environ['OPENSCADPATH'].split(os.pathsep) for lib in os.listdir(path)]
|
||||
lib_dirs = [path + '/' + lib + '/printed' for path in os.environ['OPENSCADPATH'].split(os.pathsep) for lib in sorted(os.listdir(path))]
|
||||
for dir in [source_dir, source_dir + '/printed'] + lib_dirs:
|
||||
if os.path.isdir(dir):
|
||||
for filename in os.listdir(dir):
|
||||
|
|
Loading…
Reference in New Issue