From dfb5b24d68c05457b91af0448e586a1e304f23d0 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 7 Aug 2023 07:11:33 +0000 Subject: [PATCH] eclass/distutils-r1: Sync with Gentoo It's from Gentoo commit 8cc7354d298d9906237e696831ddbcbcc898fc5e. --- .../portage-stable/eclass/distutils-r1.eclass | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/distutils-r1.eclass b/sdk_container/src/third_party/portage-stable/eclass/distutils-r1.eclass index fd9bf47aa9..658d26f2a4 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/distutils-r1.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/distutils-r1.eclass @@ -191,6 +191,7 @@ esac if [[ -z ${_DISTUTILS_R1_ECLASS} ]]; then _DISTUTILS_R1_ECLASS=1 +inherit flag-o-matic inherit multibuild multilib multiprocessing ninja-utils toolchain-funcs if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then @@ -271,8 +272,7 @@ _distutils_set_globals() { ;; setuptools) bdep+=' - >=dev-python/setuptools-67.7.2[${PYTHON_USEDEP}] - >=dev-python/wheel-0.40.0[${PYTHON_USEDEP}] + >=dev-python/setuptools-67.8.0-r1[${PYTHON_USEDEP}] ' ;; sip) @@ -292,7 +292,7 @@ _distutils_set_globals() { eqawarn "is enabled." fi else - local setuptools_dep='>=dev-python/setuptools-67.7.2[${PYTHON_USEDEP}]' + local setuptools_dep='>=dev-python/setuptools-67.8.0-r1[${PYTHON_USEDEP}]' case ${DISTUTILS_USE_SETUPTOOLS:-bdepend} in no|manual) @@ -1718,7 +1718,7 @@ distutils-r1_python_install() { # python likes to compile any module it sees, which triggers sandbox # failures if some packages haven't compiled their modules yet. addpredict "${EPREFIX}/usr/lib/${EPYTHON}" - addpredict "${EPREFIX}/usr/lib/pypy3.9" + addpredict "${EPREFIX}/usr/lib/pypy3.10" addpredict "${EPREFIX}/usr/local" # bug 498232 if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then @@ -1836,6 +1836,12 @@ distutils-r1_run_phase() { local -x CYTHON_FORCE_REGEN=1 fi + # Rust extensions are incompatible with C/C++ LTO compiler + # see e.g. https://bugs.gentoo.org/910220 + if has cargo ${INHERITED}; then + filter-lto + fi + # How to build Python modules in different worlds... local ldopts case "${CHOST}" in @@ -1974,7 +1980,7 @@ _distutils-r1_post_python_compile() { die "${rscriptdir} should not exist!" if [[ -d ${bindir} ]]; then mkdir -p "${rscriptdir}" || die - cp -a --reflink=auto "${bindir}"/. "${rscriptdir}"/ || die + cp -a "${bindir}"/. "${rscriptdir}"/ || die fi # enable venv magic inside the install tree