1
2
3 import os.path
4
5 from numpy.distutils.misc_util import Configuration
6 from numpy.distutils.core import setup
7
8
12 config = Configuration('reduction', parent_package, top_path)
13
14 config.add_subpackage('lib')
15 config.add_data_dir('examples')
16
17
18 srcpath = os.path.join(config.package_path,'lib')
19 sources = [os.path.join(srcpath,s)
20 for s in ('reduction.cc','str2imat.c')]
21 depends = [os.path.join(srcpath,s)
22 for s in ('rebin.h', 'rebin2D.h')]
23
24 config.add_extension('_reduction',
25 include_dirs=[srcpath],
26 depends=depends,
27 sources=sources,
28 )
29
30
31 return config
32
33 if __name__ == '__main__':
34 setup(**configuration(top_path='').todict())
35