From db573e6348c8738c1107aa91f8d8886809565b8d Mon Sep 17 00:00:00 2001 From: "Mads M. Pedersen" <mmpe@dtu.dk> Date: Fri, 13 Jan 2017 11:27:33 +0100 Subject: [PATCH] refactored extlist in setup.py to allow more ext modules --- setup.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index db5e773f..eb4cead7 100644 --- a/setup.py +++ b/setup.py @@ -26,12 +26,10 @@ from Cython.Distutils import build_ext def setup_package(): - path = 'wetb/fatigue_tools/rainflowcounting/' - module = 'wetb.fatigue_tools.rainflowcounting' - names = ['pair_range', 'peak_trough', 'rainflowcount_astm'] + ex_info = [('wetb.fatigue_tools.rainflowcounting', ['pair_range', 'peak_trough', 'rainflowcount_astm'])] extlist = [Extension('%s.%s' % (module, n), - [os.path.join(path, n)+'.pyx'], - include_dirs=[np.get_include()]) for n in names] + [os.path.join(module.replace(".","/"), n)+'.pyx'], + include_dirs=[np.get_include()]) for module, names in ex_info for n in names] needs_sphinx = {'build_sphinx', 'upload_docs'}.intersection(sys.argv) sphinx = ['sphinx'] if needs_sphinx else [] -- GitLab