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
|
|
@@ -945,7 +945,7 @@
|
|
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()): # noqa: E501
|
|
# pylint: disable=import-outside-toplevel
|
|
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)
|
|
|
|
if OSX:
|
|
@@ -1011,7 +1011,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",
|
|
@@ -1025,7 +1025,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")
|