From: Paul Brossier Date: Mon, 28 Nov 2016 14:48:34 +0000 (+0100) Subject: setup.py, python/lib/: use sorted glob.glob to improve reproducibility X-Git-Tag: 0.4.4~148 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=2e4023135370fc0f5ece3a34b14f79e882c2b47d setup.py, python/lib/: use sorted glob.glob to improve reproducibility --- diff --git a/python/lib/gen_external.py b/python/lib/gen_external.py index 533116eb..c6a13d4f 100644 --- a/python/lib/gen_external.py +++ b/python/lib/gen_external.py @@ -174,7 +174,7 @@ def print_cpp_output_results(lib, cpp_output): def generate_external(header=header, output_path=output_path, usedouble=False, overwrite=True): if not os.path.isdir(output_path): os.mkdir(output_path) - elif not overwrite: return glob.glob(os.path.join(output_path, '*.c')) + elif not overwrite: return sorted(glob.glob(os.path.join(output_path, '*.c'))) cpp_output, cpp_objects = get_cpp_objects(header) diff --git a/python/lib/moresetuptools.py b/python/lib/moresetuptools.py index 8eb61139..08f45920 100644 --- a/python/lib/moresetuptools.py +++ b/python/lib/moresetuptools.py @@ -58,8 +58,8 @@ def add_local_aubio_sources(ext, usedouble = False): # create an empty header, macros will be passed on the command line fake_config_header = os.path.join('python', 'ext', 'config.h') distutils.file_util.write_file(fake_config_header, "") - aubio_sources = glob.glob(os.path.join('src', '**.c')) - aubio_sources += glob.glob(os.path.join('src', '*', '**.c')) + aubio_sources = sorted(glob.glob(os.path.join('src', '**.c'))) + aubio_sources += sorted(glob.glob(os.path.join('src', '*', '**.c'))) ext.sources += aubio_sources # define macros (waf puts them in build/src/config.h) for define_macro in ['HAVE_STDLIB_H', 'HAVE_STDIO_H', diff --git a/setup.py b/setup.py index f79e59a1..277669cd 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ except ImportError: if sys.platform.startswith('darwin'): extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox'] -sources = glob.glob(os.path.join('python', 'ext', '*.c')) +sources = sorted(glob.glob(os.path.join('python', 'ext', '*.c'))) aubio_extension = Extension("aubio._aubio", sources,