-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
30 lines (26 loc) · 845 Bytes
/
setup.py
File metadata and controls
30 lines (26 loc) · 845 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
from setuptools import Extension, setup
import numpy
import platform
extra_compile_args = []
extra_link_args = []
if platform.system() == 'Windows':
extra_compile_args = ["/std:c++17", "/W4", "/DTARGET_PYTHON"]
extra_link_args = []
elif platform.system() == 'Linux':
extra_compile_args = ["-std=c++17", "-Wall", "-DTARGET_PYTHON"]
extra_link_args = []
sheetreader = Extension(
"pysheetreader",
sources=[
"src/interface.cpp",
"src/sheetreader-core/src/XlsxSheet.cpp",
"src/sheetreader-core/src/XlsxFile.cpp",
"src/sheetreader-core/src/miniz/miniz.cpp",
],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
include_dirs=[numpy.get_include()]
)
setup(
name="pysheetreader",
ext_modules=[sheetreader])#, options={"build": {"build_lib": "."}})