pip/setup.py: introduce platform dependency in build
This commit is contained in:
parent
6b7e0258b3
commit
d2453427c7
22
pip/setup.py
22
pip/setup.py
@ -1,12 +1,24 @@
|
|||||||
|
|
||||||
from setuptools import setup, Extension
|
from setuptools import setup, Extension
|
||||||
|
import sys
|
||||||
|
|
||||||
|
print("building on platform: "+sys.platform)
|
||||||
|
|
||||||
|
if sys.platform == "linux" or sys.platform == "darwin" :
|
||||||
|
cmpargs = ['-std=c++17','-Wno-unused-variable']
|
||||||
|
lnkargs = ['-std=c++17','-Wno-unused-variable']
|
||||||
|
elif sys.platform == "win32" :
|
||||||
|
cmpargs = ['/EHsc','/std:c++17']
|
||||||
|
lnkargs = ['/EHsc','/std:c++17']
|
||||||
|
else :
|
||||||
|
raise RuntimeError("unknown platform")
|
||||||
|
|
||||||
with open("README.md", "r", encoding="utf-8") as fh:
|
with open("README.md", "r", encoding="utf-8") as fh:
|
||||||
long_description = fh.read()
|
long_description = fh.read()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="TDMtermite",
|
name="TDMtermite",
|
||||||
version="1.0.1", #version,
|
version="1.0.1",
|
||||||
author="Record Evolution GmbH",
|
author="Record Evolution GmbH",
|
||||||
author_email="mario.fink@record-evolution.de",
|
author_email="mario.fink@record-evolution.de",
|
||||||
maintainer="Record Evolution GmbH",
|
maintainer="Record Evolution GmbH",
|
||||||
@ -30,8 +42,8 @@ setup(
|
|||||||
# include_dirs = ["3rdparty/pugixml/","lib/"],
|
# include_dirs = ["3rdparty/pugixml/","lib/"],
|
||||||
# depends = ["../lib/tdm_termite.hpp"]
|
# depends = ["../lib/tdm_termite.hpp"]
|
||||||
language = 'c++',
|
language = 'c++',
|
||||||
#extra_compile_args=['-std=c++17','-Wno-unused-variable'],
|
extra_compile_args = cmpargs,
|
||||||
extra_compile_args=['-std=c++17'],
|
extra_link_args = lnkargs,
|
||||||
extra_link_args=['-std=c++17'],
|
)
|
||||||
)],
|
],
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user