-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·67 lines (60 loc) · 2.14 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from setuptools import setup, find_packages
from setuptools import Extension
from distutils.command.build import build as build_orig
ext_modules = [
Extension(
name="fastshermanmorrison.cython_fastshermanmorrison",
sources=[
"fastshermanmorrison/cython_fastshermanmorrison.pyx",
"fastshermanmorrison/fastshermanmorrison.c",
],
extra_compile_args=["-O2", "-fno-wrapv"],
)
]
class build(build_orig):
def finalize_options(self):
super().finalize_options()
# __builtins__.__NUMPY_SETUP__ = False
import numpy
for extension in self.distribution.ext_modules:
extension.include_dirs.append(numpy.get_include())
from Cython.Build import cythonize
self.distribution.ext_modules = cythonize(
self.distribution.ext_modules, language_level=3
)
setup(
name="fastshermanmorrison-pulsar",
use_scm_version={
"fallback_version": "0.0.0",
"write_to": "fastshermanmorrison/_version.py",
"write_to_template": "__version__ = '{version}'",
},
description="Fast Sherman Morrison calculations for Enterprise",
license="MIT",
author="Rutger van Haasteren",
author_email="[email protected]",
packages=find_packages(),
package_dir={"fastshermanmorrison": "fastshermanmorrison"},
url="http://github.com/nanograv/fastshermanmorrison/",
long_description=open("README.md").read(),
include_package_data=True,
zip_safe=False,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT",
"Operating System :: OS Independent",
"Programming Language :: Python",
],
ext_modules=ext_modules,
package_data={
"base": ["README", "LICENSE", "AUTHORS.md"],
"fastshermanmorrison": [
"fastshermanmorrison/cython_fastshermanmorrison.pyx",
"fastshermanmorrison/fastshermanmorrison.c",
"fastshermanmorrison/fastshermanmorrison.py",
],
},
cmdclass={"build": build},
)