-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
43 lines (38 loc) · 1.15 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
from setuptools import Extension, setup, find_packages
from glob import glob
from Cython.Build import cythonize
from Cython.Compiler.Options import get_directive_defaults
directive_defaults = get_directive_defaults()
# directive_defaults['embedsignature'] = True
directive_defaults['binding'] = True
directive_defaults['language_level'] = 3
support_ss = True
use_cython = True
if use_cython:
suffix = '.pyx'
else:
suffix = '.c'
ext_modules = [
Extension(
name[:-len(suffix)].replace('/', '.'),
[name],
)
for name in glob(f'cygraphblas/**/*{suffix}', recursive=True)
]
if use_cython:
ext_modules = cythonize(ext_modules, compile_time_env={'CYGB_SS': support_ss})
setup(
name='cygraphblas',
version='0.0.0',
description="Cython interface to GraphBLAS",
author="Erik Welch",
url="https://github.com/metagraph-dev/cygraphblas",
# setup_requires=["cython", "pytest-runner"],
python_requires=">=3.7",
license="Apache License 2.0",
ext_modules=ext_modules,
packages=find_packages('cygraphblas'),
package_data={'cygraphblas': ['*.pyx', '*.pxd']},
include_package_data=True,
zip_safe=False,
)