-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
40 lines (35 loc) · 964 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
39
40
import sys
from Cython.Build import cythonize
from setuptools import Extension, setup
if sys.platform.startswith("linux"):
cflags = ["-O2"]
elif sys.platform == "win32":
cflags = ["/O2"]
elif sys.platform == "darwin":
cflags = ["-std=c++11", "-O2"]
else:
cflags = []
extensions = [
Extension(
"hattrie",
["hattrie.pyx"],
include_dirs=["include", "tessil-hat-trie/include/tsl"],
extra_compile_args=cflags,
language="c++",
)
]
with open("README.md", encoding="utf-8") as fr:
long_description = fr.read()
setup(
author="Dobatymo",
name="hat-trie-python",
version="0.6.0",
url="https://github.com/Dobatymo/hat-trie-python",
description="Python bindings for Tessil/hat-trie",
long_description=long_description,
long_description_content_type="text/markdown",
ext_modules=cythonize(extensions),
python_requires=">=3.6",
use_2to3=False,
zip_safe=False,
)