summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Brossier <piem@debian.org>2016-11-27 22:23:50 +0100
committerPaul Brossier <piem@debian.org>2016-11-27 22:23:50 +0100
commitd8e997284239f4e31b1f560c49fdd63070a0ba62 (patch)
treecc2380089db5f47e1c71392bc2744698292c4e3c
parent2ae29740be5afffdf24b4bb43dd4e407b33a4089 (diff)
sort_pysrc
Gbp-Pq: Name sort_pysrc.diff
-rw-r--r--python/lib/gen_external.py4
-rw-r--r--python/lib/moresetuptools.py4
-rwxr-xr-xsetup.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/python/lib/gen_external.py b/python/lib/gen_external.py
index 9c501a3..1fe8362 100644
--- a/python/lib/gen_external.py
+++ b/python/lib/gen_external.py
@@ -123,7 +123,7 @@ def get_cpp_objects(header=header):
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')))
sources_list = []
cpp_output, cpp_objects = get_cpp_objects(header)
lib = {}
@@ -241,7 +241,7 @@ void add_generated_objects( PyObject *m );
print ("wrote %s" % output_file )
# no need to add header to list of sources
- return sources_list
+ return sorted(sources_list)
if __name__ == '__main__':
if len(sys.argv) > 1: header = sys.argv[1]
diff --git a/python/lib/moresetuptools.py b/python/lib/moresetuptools.py
index 906b871..81c45d8 100644
--- a/python/lib/moresetuptools.py
+++ b/python/lib/moresetuptools.py
@@ -58,8 +58,8 @@ def add_local_aubio_sources(ext):
# 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 8c9552b..12ae76d 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,