-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
35 lines (32 loc) · 836 Bytes
/
setup.py
File metadata and controls
35 lines (32 loc) · 836 Bytes
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
from setuptools import Extension, find_packages, setup
from Cython.Build import cythonize
import numpy as np
import os
ext = [
Extension(
"mega.op.arithmethic",
["mega/op/arithmethic.pyx"],
include_dirs=[np.get_include()],
),
Extension(
"mega.op.function",
["mega/op/function.pyx"],
include_dirs=[np.get_include()],
),
Extension(
"mega.op.tensor", ["mega/op/tensor.pyx"], include_dirs=[np.get_include()]
),
Extension(
"mega.utils.constant",
["mega/utils/constant.pyx"],
),
]
os.makedirs("mega/utils", exist_ok=True)
os.makedirs("mega/op", exist_ok=True)
setup(
name="mega number utils",
version="1.0",
packages=find_packages(),
ext_modules=cythonize(ext, language_level=3),
include_dirs=[np.get_include()],
)