-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathsetup.py
More file actions
32 lines (29 loc) · 915 Bytes
/
setup.py
File metadata and controls
32 lines (29 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from setuptools import setup, Extension, find_packages
import numpy
try:
from Cython.Build import cythonize
except ImportError:
use_cython = False
else:
use_cython = True
ext_modules = []
if use_cython:
ext_modules = cythonize([
Extension('sgtpy.coloc_cy', ['sgtpy/src/coloc_cy.pyx'],
include_dirs=[numpy.get_include()]),
Extension('sgtpy.sgt.cijmix_cy', ['sgtpy/src/cijmix_cy.pyx'],
include_dirs=[numpy.get_include()])
])
else:
ext_modules = [
Extension('sgtpy.coloc_cy', ['sgtpy/src/coloc_cy.c'],
include_dirs=[numpy.get_include()]),
Extension('sgtpy.sgt.cijmix_cy', ['sgtpy/src/cijmix_cy.c'],
include_dirs=[numpy.get_include()])
]
setup(
packages=find_packages(include=['sgtpy', 'sgtpy.*']),
ext_modules=ext_modules,
include_package_data=True,
zip_safe=False
)