-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
66 lines (56 loc) · 2.08 KB
/
setup.py
File metadata and controls
66 lines (56 loc) · 2.08 KB
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
import os
import glob
import re
import subprocess
import sys
from setuptools import setup, find_packages
from pybind11.setup_helpers import Pybind11Extension, build_ext
__version__ = "0.0.9"
def main():
cwd = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(cwd, "README.md"), encoding="utf-8") as f:
long_description = f.read()
tensor_array_lib_path = os.environ['TENSOR_ARRAY_INSTALL_PATH']
ext_modules = [
Pybind11Extension(
"tensor_array.tensor2",
sources = glob.glob(os.path.join("cpp", "*.cc")),
include_dirs=[tensor_array_lib_path + "/include"],
library_dirs=[tensor_array_lib_path + "/lib/tensor-array", tensor_array_lib_path + "/lib64/tensor-array"],
libraries=["tensorarray_core", "tensorarray_layers"],
define_macros=[("VERSION_INFO", __version__)],
),
]
setup(
name = "TensorArray",
version = __version__,
description = "A machine learning package",
long_description = long_description,
long_description_content_type = "text/markdown",
author = "TensorArray-Creators",
url = "http://github.com/Tensor-Array/Tensor-Array-Python",
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
"Environment :: GPU :: NVIDIA CUDA :: 12",
],
packages = find_packages("src"),
package_dir = {
"": "src",
},
ext_modules = ext_modules,
cmdclass = {
"build_ext": build_ext,
},
license = "MIT",
python_requires = ">=3.8",
)
if __name__ == "__main__":
main()