forked from pymc-devs/pytensor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·38 lines (30 loc) · 873 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
31
32
33
34
35
36
37
38
#!/usr/bin/env python
import os
import numpy
import versioneer
from setuptools import Extension, setup
from setuptools.dist import Distribution
dist = Distribution()
dist.parse_config_files()
NAME: str = dist.get_name() # type: ignore
# Check if building for Pyodide
is_pyodide = os.getenv("PYODIDE", "0") == "1"
if is_pyodide:
# For pyodide we build a universal wheel that must be pure-python
# so we must omit the cython-version of scan.
ext_modules = []
else:
ext_modules = [
Extension(
name="pytensor.scan.scan_perform",
sources=["pytensor/scan/scan_perform.pyx"],
include_dirs=[numpy.get_include()],
),
]
if __name__ == "__main__":
setup(
name=NAME,
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
ext_modules=ext_modules,
)