-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
33 lines (28 loc) · 836 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
import os
from multiprocessing import cpu_count
import numpy
from Cython.Build import cythonize
from pyproject_toml import setup
from setuptools import Extension
def get_extensions():
extensions = cythonize(
[
Extension(
"cotton2k.core._simulation",
["cotton2k/core/_simulation.pyx"],
include_dirs=[numpy.get_include()],
),
Extension(
"cotton2k.core._soil_thermology",
["cotton2k/core/_soil_thermology.pyx"],
include_dirs=[numpy.get_include()],
),
],
nthreads=cpu_count() if os.name != "nt" else 0,
)
return extensions
setup(
packages=["cotton2k.core"],
package_data={"cotton2k.core": ["*.json", "*.csv"]},
ext_modules=get_extensions(),
)