1 # copyright 2016 Apache 2 sddekit authors
5 from distutils
.core
import setup
6 from distutils
.extension
import Extension
7 from Cython
.Build
import cythonize
10 here
= os
.path
.dirname(os
.path
.abspath(__file__
))
11 up
= os
.path
.dirname(here
)
15 for d, p in ((here, '*.pyx'), (up, 'src/*.c')):
16 sources += glob.glob(os.path.join(d, p))
18 exts = [Extension('hist',
21 os.path.join(up, 'src'),
28 c_sources
= glob
.glob(os
.path
.join(up
, 'src/*.c'))
32 for pyx_file
in glob
.glob(os
.path
.join(here
, '*.pyx')):
33 exts
.append(Extension(pyx_file
.split('.pyx')[0],
34 sources
=[pyx_file
] + c_sources
,
36 os
.path
.join(up
, 'src'),
44 ext_modules
=cythonize(exts
),