mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 07:01:13 +02:00
eclass/distutils-r1: Sync with Gentoo
It's from Gentoo commit 3f87d0f277763f1cd621a78e34eb226d89020863.
This commit is contained in:
parent
d8b23cf9f2
commit
5ec97a6227
@ -50,6 +50,7 @@ case ${EAPI} in
|
||||
esac
|
||||
|
||||
# @ECLASS_VARIABLE: DISTUTILS_EXT
|
||||
# @PRE_INHERIT
|
||||
# @DEFAULT_UNSET
|
||||
# @DESCRIPTION:
|
||||
# Set this variable to a non-null value if the package (possibly
|
||||
@ -1242,7 +1243,7 @@ _distutils-r1_get_backend() {
|
||||
if [[ -f pyproject.toml ]]; then
|
||||
# if pyproject.toml exists, try getting the backend from it
|
||||
# NB: this could fail if pyproject.toml doesn't list one
|
||||
build_backend=$(gpep517 get-backend)
|
||||
build_backend=$("${EPYTHON}" -m gpep517 get-backend)
|
||||
fi
|
||||
if [[ -z ${build_backend} && ${DISTUTILS_USE_PEP517} == setuptools &&
|
||||
-f setup.py ]]
|
||||
@ -1316,7 +1317,7 @@ distutils_wheel_install() {
|
||||
|
||||
einfo " Installing ${wheel##*/} to ${root}"
|
||||
local cmd=(
|
||||
gpep517 install-wheel
|
||||
"${EPYTHON}" -m gpep517 install-wheel
|
||||
--destdir="${root}"
|
||||
--interpreter="${PYTHON}"
|
||||
--prefix="${EPREFIX}/usr"
|
||||
@ -1445,7 +1446,7 @@ distutils_pep517_install() {
|
||||
local build_backend=$(_distutils-r1_get_backend)
|
||||
einfo " Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}"
|
||||
local cmd=(
|
||||
gpep517 build-wheel
|
||||
"${EPYTHON}" -m gpep517 build-wheel
|
||||
--prefix="${EPREFIX}/usr"
|
||||
--backend "${build_backend}"
|
||||
--output-fd 3
|
||||
@ -1806,6 +1807,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user