-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
30 lines (26 loc) · 827 Bytes
/
setup.py
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
#!/usr/bin/env python
# ~*~ coding: utf8 ~*~
# cython: embedsignature=True
"""Configure the py_toeplitz package.
Cython extension means not everything can be moved to `setup.cfg`.
"""
from setuptools import setup, Extension
from Cython.Build import cythonize
import numpy as np
with open("VERSION", "r") as in_file:
with open("src/py_toeplitz/__version__.py", "w") as out_file:
out_file.write("""\"\"\"Version for the package.\"\"\"
VERSION = "{ver:s}"
""".format(ver=in_file.read()))
setup(
package_dir={"": "src"},
ext_modules=cythonize(
Extension(
"py_toeplitz.cytoeplitz",
["src/py_toeplitz/cytoeplitz.pyx"],
include_dirs=[np.get_include()]
),
include_path=[np.get_include()],
compiler_directives=dict(embedsignature=True)
)
)