-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
57 lines (47 loc) · 1.32 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import setuptools
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
import sys
import platform
from os import path
if platform.system() == "Windows":
compile_args = ["/openmp"]
elif platform.system() == "Darwin":
compile_args = ["-Xpreprocessor", "-fopenmp", "-std=c++11"]
else:
compile_args = ["-fopenmp", "-std=c++11"]
module = Extension(
name="*",
sources=["cpt/*.pyx"],
extra_compile_args=compile_args,
extra_link_args=compile_args,
)
version = "1.3.4"
author = "Bluesheeptoken"
author_email = "louis.fruleux1@gmail.com"
description = (
"Compact Prediction Tree: A Lossless Model for Accurate Sequence Prediction"
)
license = "MIT"
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.md")) as f:
long_description = f.read()
url = "https://github.com/bluesheeptoken/CPT"
setup(
name="cpt",
ext_modules=cythonize(
module,
annotate=False,
compiler_directives={"language_level": sys.version_info[0]},
),
version=version,
author=author,
author_email=author_email,
description=description,
license=license,
long_description=long_description,
long_description_content_type="text/markdown",
url=url,
python_requires=">=3.8, <4",
)