forked from premiere/premiere-libtorrent
strip unneeded cflag in setup.py for python bindings
This commit is contained in:
parent
90ce06bb47
commit
b59c93392a
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
from distutils import sysconfig
|
||||||
from distutils.core import setup, Extension
|
from distutils.core import setup, Extension
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
@ -52,6 +53,12 @@ if platform.system() == 'Windows':
|
||||||
)
|
)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
config_vars = sysconfig.get_config_vars()
|
||||||
|
if "CFLAGS" in config_vars and "-Wstrict-prototypes" in config_vars["CFLAGS"]:
|
||||||
|
config_vars["CFLAGS"] = config_vars["CFLAGS"].replace("-Wstrict-prototypes", " ")
|
||||||
|
if "OPT" in config_vars and "-Wstrict-prototypes" in config_vars["OPT"]:
|
||||||
|
config_vars["OPT"] = config_vars["OPT"].replace("-Wstrict-prototypes", " ")
|
||||||
|
|
||||||
source_list = os.listdir(os.path.join(os.path.dirname(__file__), "src"))
|
source_list = os.listdir(os.path.join(os.path.dirname(__file__), "src"))
|
||||||
source_list = [os.path.join("src", s) for s in source_list if s.endswith(".cpp")]
|
source_list = [os.path.join("src", s) for s in source_list if s.endswith(".cpp")]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue