-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
44 lines (39 loc) · 932 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
41
42
43
44
import os
import setuptools
import sys
from pybind11.setup_helpers import Pybind11Extension, build_ext
CRC32C_DIR = os.path.join("third_party", "fastcrc")
extra_compile_args = []
if sys.platform == 'win32':
extra_compile_args += [
'/std:c++20', '/O2', '/arch:AVX2'
]
else:
extra_compile_args += [
'-std=c++2a', '-O3',
'-msse4.2', '-mpclmul' # for x86 and cross compiling x86
]
setuptools.setup(
setup_requires=['pbr','pybind11','numpy'],
cmdclass={"build_ext": build_ext},
extras_require={
"remote": [
"cloud-files",
],
},
ext_modules=[
Pybind11Extension(
"fastcrackle",
["src/fastcrackle.cpp"],
include_dirs=[CRC32C_DIR],
extra_compile_args=extra_compile_args,
language="c++",
),
],
entry_points={
"console_scripts": [
"crackle=crackle_cli:main"
],
},
pbr=True
)