build arguments
This commit is contained in:
17
setup.py
17
setup.py
@@ -18,6 +18,22 @@
|
|||||||
# 51 Franklin Street, Fifth Floor
|
# 51 Franklin Street, Fifth Floor
|
||||||
# Boston, MA 02110-1301, USA.
|
# Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
|
||||||
|
## Modify the build arguments
|
||||||
|
from distutils import sysconfig
|
||||||
|
|
||||||
|
removals = ['-g', '-DNDEBUG', '-O2', '-Wstrict-prototypes']
|
||||||
|
additions = ['-DNDEBUG', '-O2']
|
||||||
|
|
||||||
|
cv = sysconfig.get_config_vars()
|
||||||
|
for removal in removals:
|
||||||
|
cv["OPT"] = cv["OPT"].replace(" " + removal + " ", " ")
|
||||||
|
for addition in additions:
|
||||||
|
cv["OPT"] = cv["OPT"] + " " + addition
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import platform, os
|
import platform, os
|
||||||
|
|
||||||
pythonVersion = platform.python_version()[0:3]
|
pythonVersion = platform.python_version()[0:3]
|
||||||
@@ -31,7 +47,6 @@ deluge_core = Extension('deluge_core',
|
|||||||
'boost_program_options', 'boost_regex',
|
'boost_program_options', 'boost_regex',
|
||||||
'boost_serialization', 'boost_thread', 'z', 'pthread'],
|
'boost_serialization', 'boost_thread', 'z', 'pthread'],
|
||||||
extra_compile_args = ["-Wno-missing-braces"],
|
extra_compile_args = ["-Wno-missing-braces"],
|
||||||
# extra_link_args = [""],
|
|
||||||
sources = ['cpp/alert.cpp',
|
sources = ['cpp/alert.cpp',
|
||||||
'cpp/allocate_resources.cpp',
|
'cpp/allocate_resources.cpp',
|
||||||
'cpp/bt_peer_connection.cpp',
|
'cpp/bt_peer_connection.cpp',
|
||||||
|
Reference in New Issue
Block a user