Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH] distutils-r1.eclass: Use underscores in .pydistutils.cfg keys
Date: Mon, 08 Mar 2021 19:07:07
Message-Id: 20210308190657.241001-1-mgorny@gentoo.org
1 Switch to using underscore instead of hyphens in .pydistutils.cfg keys.
2 The latter form is now deprecated by setuptools, while both seem to work
3 fine with plain distutils.
4
5 Signed-off-by: Michał Górny <mgorny@g.o>
6 ---
7 eclass/distutils-r1.eclass | 12 ++++++------
8 1 file changed, 6 insertions(+), 6 deletions(-)
9
10 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
11 index f5b151d4b8e2..e384b6d43d4e 100644
12 --- a/eclass/distutils-r1.eclass
13 +++ b/eclass/distutils-r1.eclass
14 @@ -714,7 +714,7 @@ distutils-r1_python_configure() {
15 _distutils-r1_create_setup_cfg() {
16 cat > "${HOME}"/.pydistutils.cfg <<-_EOF_ || die
17 [build]
18 - build-base = ${BUILD_DIR}
19 + build_base = ${BUILD_DIR}
20
21 # using a single directory for them helps us export
22 # ${PYTHONPATH} and ebuilds find the sources independently
23 @@ -723,16 +723,16 @@ _distutils-r1_create_setup_cfg() {
24 # note: due to some packages (wxpython) relying on separate
25 # platlib & purelib dirs, we do not set --build-lib (which
26 # can not be overridden with --build-*lib)
27 - build-platlib = %(build-base)s/lib
28 - build-purelib = %(build-base)s/lib
29 + build_platlib = %(build_base)s/lib
30 + build_purelib = %(build_base)s/lib
31
32 # make the ebuild writer lives easier
33 - build-scripts = %(build-base)s/scripts
34 + build_scripts = %(build_base)s/scripts
35
36 # this is needed by distutils_install_for_testing since
37 # setuptools like to create .egg files for install --home.
38 [bdist_egg]
39 - dist-dir = ${BUILD_DIR}/dist
40 + dist_dir = ${BUILD_DIR}/dist
41 _EOF_
42
43 # we can't refer to ${D} before src_install()
44 @@ -749,7 +749,7 @@ _distutils-r1_create_setup_cfg() {
45
46 if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
47 cat >> "${HOME}"/.pydistutils.cfg <<-_EOF_ || die
48 - install-scripts = $(python_get_scriptdir)
49 + install_scripts = $(python_get_scriptdir)
50 _EOF_
51 fi
52 fi
53 --
54 2.30.1