32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
Make sure the build script pulls the right CFLAGS and prevent -Werror.
|
|
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -750,7 +750,7 @@
|
|
#we have to add the python cflags:
|
|
if not (is_Fedora() or is_Debian() or is_CentOS() or is_RedHat() or is_AlmaLinux() or is_RockyLinux() or is_OracleLinux() or is_openSUSE()):
|
|
import sysconfig
|
|
- for cflag in shlex.split(sysconfig.get_config_var('CFLAGS') or ''):
|
|
+ for cflag in shlex.split(sysconfig.get_config_var('BUILD_CFLAGS') or ''):
|
|
add_to_keywords(kw, 'extra_compile_args', cflag)
|
|
|
|
def add_tokens(s, add_to="extra_link_args"):
|
|
@@ -809,7 +809,7 @@
|
|
#as of Cython 0.26 + clang 4.0. Other version combinations may require
|
|
#(un)commenting other switches.
|
|
if not hascflag("-Wno-error"):
|
|
- addcflags("-Werror")
|
|
+ addcflags("-Wno-error")
|
|
addcflags(
|
|
"-Wno-deprecated-register",
|
|
"-Wno-unused-command-line-argument",
|
|
@@ -823,7 +823,7 @@
|
|
)
|
|
else:
|
|
if not hascflag("-Wno-error"):
|
|
- addcflags("-Werror")
|
|
+ addcflags("-Wno-error")
|
|
if NETBSD:
|
|
#see: http://trac.cython.org/ticket/395
|
|
addcflags("-fno-strict-aliasing")
|