public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-portage/gentoolkit/
Date: Thu, 12 Oct 2023 05:04:39 +0000 (UTC)	[thread overview]
Message-ID: <1697087068.54b07999b19d0f3de682b6bec5c545cf1af20bc0.sam@gentoo> (raw)

commit:     54b07999b19d0f3de682b6bec5c545cf1af20bc0
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  9 05:19:33 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 12 05:04:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54b07999

app-portage/gentoolkit: Migrate 9999 to use Meson

Bug: https://bugs.gentoo.org/909888
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/33257
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-portage/gentoolkit/gentoolkit-9999.ebuild | 68 +++++++++++++++++++++++----
 1 file changed, 59 insertions(+), 9 deletions(-)

diff --git a/app-portage/gentoolkit/gentoolkit-9999.ebuild b/app-portage/gentoolkit/gentoolkit-9999.ebuild
index 018a60d8df98..e4a3125c8852 100644
--- a/app-portage/gentoolkit/gentoolkit-9999.ebuild
+++ b/app-portage/gentoolkit/gentoolkit-9999.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 PYTHON_COMPAT=( python3_{10..12} pypy3 )
 PYTHON_REQ_USE="xml(+),threads(+)"
 
-inherit distutils-r1 tmpfiles
+inherit meson python-r1 tmpfiles
 
 if [[ ${PV} = 9999* ]]; then
 	EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoolkit.git"
@@ -21,6 +21,7 @@ HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage-Tools"
 
 LICENSE="GPL-2"
 SLOT="0"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 # Need newer Portage for eclean-pkg API, bug #900224
 DEPEND="
@@ -28,19 +29,25 @@ DEPEND="
 "
 RDEPEND="
 	${DEPEND}
+	${PYTHON_DEPS}
 	app-alternatives/awk
 	sys-apps/gentoo-functions
 "
-BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 
-distutils_enable_tests setup.py
-
-python_prepare_all() {
-	python_setup
-	echo VERSION="${PVR}" "${PYTHON}" setup.py set_version
-	VERSION="${PVR}" "${PYTHON}" setup.py set_version
-	distutils-r1_python_prepare_all
+# setuptools is still needed as a workaround for Python 3.12+ for now.
+# https://github.com/mesonbuild/meson/issues/7702
+#
+# >=meson-1.2.1-r1 for bug #912051
+BDEPEND="
+	${PYTHON_DEPS}
+	>=dev-util/meson-1.2.1-r1
+	$(python_gen_cond_dep '
+		dev-python/setuptools[${PYTHON_USEDEP}]
+	' python3_12)
+"
 
+src_prepare() {
+	default
 	if use prefix-guest ; then
 		# use correct repo name, bug #632223
 		sed -i \
@@ -49,6 +56,49 @@ python_prepare_all() {
 	fi
 }
 
+src_configure() {
+	local code_only=false
+	python_foreach_impl my_src_configure
+}
+
+my_src_configure() {
+	local emesonargs=(
+		-Dcode-only=${code_only}
+		-Deprefix="${EPREFIX}"
+		-Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
+	)
+
+	meson_src_configure
+	code_only=true
+}
+
+src_compile() {
+	python_foreach_impl meson_src_compile
+}
+
+src_test() {
+	python_foreach_impl meson_src_test --no-rebuild --verbose
+}
+
+src_install() {
+	python_foreach_impl my_src_install
+	dotmpfiles data/tmpfiles.d/revdep-rebuild.conf
+
+	local scripts
+	mapfile -t scripts < <(awk '/^#!.*python/ {print FILENAME} {nextfile}' "${ED}"/usr/bin/* || die)
+	python_replicate_script "${scripts[@]}"
+}
+
+my_src_install() {
+	local pydirs=(
+		"${D}$(python_get_sitedir)"
+	)
+
+	meson_src_install
+	python_optimize "${pydirs[@]}"
+	python_fix_shebang "${pydirs[@]}"
+}
+
 pkg_postinst() {
 	tmpfiles_process revdep-rebuild.conf
 


             reply	other threads:[~2023-10-12  5:04 UTC|newest]

Thread overview: 160+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12  5:04 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-01  1:10 [gentoo-commits] repo/gentoo:master commit in: app-portage/gentoolkit/ Matt Turner
2024-10-22  1:34 Sam James
2024-09-10  8:10 Jakov Smolić
2024-09-10  2:32 Matt Turner
2024-07-09 14:50 Michał Górny
2024-07-09 14:50 Michał Górny
2024-06-02 21:16 Sam James
2024-05-08 21:44 Sam James
2024-04-25 20:40 Sam James
2024-03-29  4:18 Sam James
2024-03-12 21:46 Sam James
2024-01-19  6:38 Sam James
2024-01-18 21:01 Matt Turner
2024-01-18 21:01 Matt Turner
2024-01-09  0:06 Sam James
2023-12-28  3:53 Sam James
2023-12-23 17:29 Sam James
2023-12-12  8:01 Arthur Zamarin
2023-12-12  8:01 Arthur Zamarin
2023-12-12  8:01 Arthur Zamarin
2023-12-12  8:01 Arthur Zamarin
2023-12-12  8:01 Arthur Zamarin
2023-12-12  8:01 Arthur Zamarin
2023-12-12  8:01 Arthur Zamarin
2023-12-12  8:01 Arthur Zamarin
2023-10-20  0:58 Sam James
2023-10-03 15:45 Sam James
2023-10-03 15:44 Sam James
2023-08-29  0:39 Sam James
2023-08-27  0:09 Sam James
2023-08-21  5:23 Sam James
2023-03-20  3:51 Sam James
2023-03-20  3:51 Sam James
2022-12-03 12:13 Arthur Zamarin
2022-12-03 12:10 Sam James
2022-12-03 12:10 Sam James
2022-12-03 12:08 Arthur Zamarin
2022-07-12  7:45 Sam James
2022-07-12  0:36 Brian Dolbec
2022-07-10 19:20 Brian Dolbec
2022-05-05  7:10 WANG Xuerui
2022-05-05  7:10 WANG Xuerui
2021-08-17  0:56 Sam James
2021-08-07 20:26 Louis Sautier
2021-05-11 15:45 Sergei Trofimovich
2021-05-09  4:05 Sam James
2021-05-09  4:05 Sam James
2021-05-09  1:31 Sam James
2021-05-09  1:31 Sam James
2021-05-09  1:31 Sam James
2021-05-09  1:29 Sam James
2021-05-09  1:29 Sam James
2021-03-02  3:45 Matt Turner
2021-03-02  3:45 Matt Turner
2021-03-02  3:45 Matt Turner
2021-01-07 15:41 Fabian Groffen
2021-01-06 13:23 Fabian Groffen
2020-12-27 14:01 Fabian Groffen
2020-12-20 17:23 Matt Turner
2020-11-14  0:50 Zac Medico
2020-10-07  9:55 Georgy Yakovlev
2020-09-07  8:47 Sergei Trofimovich
2020-09-06  7:49 Sergei Trofimovich
2020-08-29 23:50 Sam James
2020-08-18 16:52 Agostino Sarubbo
2020-08-18 11:22 Agostino Sarubbo
2020-08-18 11:16 Agostino Sarubbo
2020-08-17 14:52 Agostino Sarubbo
2020-08-17 14:52 Agostino Sarubbo
2020-08-17  7:33 Sam James
2020-04-24  9:03 Michał Górny
2020-04-24  9:03 Michał Górny
2020-04-21 21:06 Sergei Trofimovich
2020-04-21 10:13 Mart Raudsepp
2020-04-20  9:52 Agostino Sarubbo
2020-04-20  9:50 Agostino Sarubbo
2020-04-20  9:48 Agostino Sarubbo
2020-04-20  9:46 Agostino Sarubbo
2020-04-20  9:45 Agostino Sarubbo
2020-04-20  9:29 Agostino Sarubbo
2020-04-19 23:55 Sergei Trofimovich
2020-03-12 16:56 Matt Turner
2020-02-26 12:38 Michał Górny
2020-01-26 15:29 Michał Górny
2020-01-26 15:29 Michał Górny
2020-01-26 15:29 Michał Górny
2019-12-16 14:38 Michał Górny
2019-10-11 22:32 Sergei Trofimovich
2019-10-11 20:44 Aaron Bauman
2019-10-06  5:50 Matt Turner
2019-10-04 21:53 Matt Turner
2019-10-03  8:09 Agostino Sarubbo
2019-10-02 18:53 Agostino Sarubbo
2019-09-29 21:00 Sergei Trofimovich
2019-09-29 20:54 Sergei Trofimovich
2019-09-29 19:26 Sergei Trofimovich
2019-09-29 10:47 Mikle Kolyada
2019-09-28 11:27 Sergei Trofimovich
2019-09-21  5:20 Matt Turner
2019-09-20  6:39 Sergei Trofimovich
2019-09-16 22:03 Sergei Trofimovich
2019-09-16 22:02 Sergei Trofimovich
2019-09-16 22:00 Sergei Trofimovich
2019-09-16  7:56 Agostino Sarubbo
2019-09-16  6:52 Agostino Sarubbo
2019-09-15  9:03 Agostino Sarubbo
2019-09-14  3:06 Aaron Bauman
2019-08-29 11:39 David Seifert
2019-08-19  5:07 Zac Medico
2019-05-18 10:02 Michał Górny
2019-05-11 23:56 Virgil Dupras
2019-05-11 23:56 Virgil Dupras
2019-05-11 20:28 Michał Górny
2019-05-04 14:28 Andreas K. Hüttel
2019-04-01  2:08 Virgil Dupras
2019-04-01  2:08 Virgil Dupras
2018-08-07 22:57 Zac Medico
2018-08-07 22:27 Patrice Clement
2018-08-02 15:41 Mike Pagano
2018-06-08  0:07 Mike Frysinger
2018-06-08  0:07 Mike Frysinger
2018-05-27 20:26 Mikle Kolyada
2018-05-26 10:20 Mart Raudsepp
2018-05-25  8:41 Sergei Trofimovich
2018-05-24 21:31 Mikle Kolyada
2018-01-30  7:32 Michał Górny
2018-01-30  7:32 Michał Górny
2018-01-30  7:32 Michał Górny
2018-01-10  4:18 Mike Frysinger
2017-12-12 21:15 Paul Varner
2017-10-17 19:07 Markus Meier
2017-10-12 21:19 Thomas Deutschmann
2017-10-11 18:07 Manuel Rüger
2017-10-08 19:32 Sergei Trofimovich
2017-10-06 10:30 Sergei Trofimovich
2017-10-05  8:05 Sergei Trofimovich
2017-09-02 15:04 Michael Palimaka
2017-06-05  2:01 Benda XU
2017-06-04 22:25 Sergei Trofimovich
2017-05-18 13:09 Michał Górny
2017-04-25  5:00 Jeroen Roovers
2017-03-22 21:33 Brian Dolbec
2017-03-22 18:25 Brian Dolbec
2017-03-17 10:42 Agostino Sarubbo
2017-03-17 10:26 Agostino Sarubbo
2017-03-16  7:28 Michael Weber
2017-02-24 23:14 Michael Weber
2016-12-29 19:12 Paul Varner
2016-12-18 10:58 Zac Medico
2016-12-17 13:26 Aaron Bauman
2016-10-02  8:04 Jeroen Roovers
2016-09-27 18:39 Markus Meier
2016-09-23 17:40 Tobias Klausmann
2016-08-10  8:48 Mike Frysinger
2016-07-08 17:44 Brian Dolbec
2016-06-06 15:54 Brian Dolbec
2016-03-12 17:36 Mike Gilbert
2015-12-16 18:00 Brian Dolbec
2015-10-15 20:22 Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1697087068.54b07999b19d0f3de682b6bec5c545cf1af20bc0.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox