Skip to content

Commit

Permalink
distutils-r1.eclass: workaround cython bug for Modern C
Browse files Browse the repository at this point in the history
Pass -Wno-error=incompatible-pointer-types for now to avoid many dupes for
the same cython bug.

Bug: cython/cython#2747
Bug: https://bugs.gentoo.org/918983
Bug: https://bugs.gentoo.org/919261
Bug: https://bugs.gentoo.org/919277
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Dec 14, 2023
1 parent 21f4a98 commit 786a157
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eclass/distutils-r1.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -1806,6 +1806,11 @@ distutils-r1_run_phase() {
tc-export AR CC CPP CXX

if [[ ${DISTUTILS_EXT} ]]; then
if [[ ${BDEPEND} == *dev-python/cython* ]] ; then
# Workaround for https://github.com/cython/cython/issues/2747 (bug #918983)
local -x CFLAGS="${CFLAGS} $(test-flags-CC -Wno-error=incompatible-pointer-types)"
fi

local -x CPPFLAGS="${CPPFLAGS} $(usex debug '-UNDEBUG' '-DNDEBUG')"
# always generate .c files from .pyx files to ensure we get latest
# bug fixes from Cython (this works only when setup.py is using
Expand Down

0 comments on commit 786a157

Please sign in to comment.