Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 938490 - distutils-r1.eclass: cannot use "python_prepare()" with DISTUTILS_SINGLE_IMPL=1
Summary: distutils-r1.eclass: cannot use "python_prepare()" with DISTUTILS_SINGLE_IMPL=1
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-25 10:43 UTC by Anna Vyalkova
Modified: 2024-08-27 05:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anna Vyalkova 2024-08-25 10:43:11 UTC
The following ebuild:

EAPI=8

PYTHON_COMPAT=( python3_12 )
DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=no
inherit distutils-r1

S="${WORKDIR}"
SLOT=0

python_prepare() {
	:
}


fails with this error:

 * ERROR: <package> failed (prepare phase):
 *   DISTUTILS_IN_SOURCE_BUILD is not supported in PEP517 mode
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_prepare
 *   environment, line 4846:  Called distutils-r1_src_prepare
 *   environment, line 2839:  Called _distutils-r1_run_foreach_impl 'python_prepare'
 *   environment, line 1710:  Called distutils-r1_run_phase 'python_prepare'
 *   environment, line 2737:  Called die
 * The specific snippet of code:
 *           [[ -n ${DISTUTILS_USE_PEP517} ]] && die "DISTUTILS_IN_SOURCE_BUILD is not supported in PEP517 mode";

Setting DISTUTILS_IN_SOURCE_BUILD to empty value helps.
Comment 1 Ionen Wolkens gentoo-dev 2024-08-26 00:26:18 UTC
From my understanding, I don't think python_prepare really makes sense in a post-pep517 world which doesn't support in-source build (in-source is automagic enabled if it's defined). It also further doesn't make sense for single impl given it was meant to do "per-impl" preparation, and isn't needed when there's only one.

Any reason not just using src_prepare or python_prepare_all? python_prepare isn't used anywhere in the tree anymore (not counting a function named the same in non-distutils-r1 ebuild).
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-08-27 05:42:51 UTC
We don't support copying sources like that anymore.