From ebfa79fd73654bc843a3d175ab4f712a158e5673 Mon Sep 17 00:00:00 2001 From: "Neal D. Becker" Date: Fri, 5 Feb 2016 08:32:38 -0500 Subject: [PATCH] try gcc6 patch --- Cython.spec | 4 ++-- gcc6.patch | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 gcc6.patch diff --git a/Cython.spec b/Cython.spec index 7e56d24..405603f 100644 --- a/Cython.spec +++ b/Cython.spec @@ -19,7 +19,7 @@ Group: Development/Tools License: Python URL: http://www.cython.org Source: http://www.cython.org/release/%{srcname}-%{upstreamversion}.tar.gz - +Patch0: gcc6.patch BuildRequires: python-devel python-setuptools %if 0%{?with_python3} BuildRequires: python3-devel @@ -69,7 +69,7 @@ For more info, see: %prep %setup -q -n %{name}-%{upstreamversion} - +%patch0 -p1 %build %py2_build diff --git a/gcc6.patch b/gcc6.patch new file mode 100644 index 0000000..648d8ab --- /dev/null +++ b/gcc6.patch @@ -0,0 +1,12 @@ +--- Cython-0.23/Cython/Compiler/PyrexTypes.py.orig 2016-02-05 07:56:42.411235179 -0500 ++++ Cython-0.23/Cython/Compiler/PyrexTypes.py 2016-02-05 07:59:35.926182417 -0500 +@@ -1960,7 +1960,8 @@ + #define __Pyx_CIMAG(z) ((z).imag) + #endif + +-#if (defined(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX ++#if defined(__cplusplus) && !CYTHON_COMPLEX \ ++ && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && GCC_VERSION >= 40400) || __cplusplus >= 201103) + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) + #else