From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DA683158094 for ; Sat, 17 Sep 2022 11:49:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E4C42E0924; Sat, 17 Sep 2022 11:49:56 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C230FE0923 for ; Sat, 17 Sep 2022 11:49:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C3045341069 for ; Sat, 17 Sep 2022 11:49:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 32A845E2 for ; Sat, 17 Sep 2022 11:49:53 +0000 (UTC) From: "Ronny Gutbrod" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ronny Gutbrod" Message-ID: <1663346443.ff87825370e57408d6f5aeee8c2021e99d636a61.tastytea@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-util/blueprint-compiler/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild X-VCS-Directories: dev-util/blueprint-compiler/ X-VCS-Committer: tastytea X-VCS-Committer-Name: Ronny Gutbrod X-VCS-Revision: ff87825370e57408d6f5aeee8c2021e99d636a61 X-VCS-Branch: master Date: Sat, 17 Sep 2022 11:49:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1d53a1e8-8dba-481d-a772-90790accef71 X-Archives-Hash: cbfd6a390793a90a401acdd884f4b7f3 commit: ff87825370e57408d6f5aeee8c2021e99d636a61 Author: Yuan Liao gmail com> AuthorDate: Fri Sep 16 16:40:43 2022 +0000 Commit: Ronny Gutbrod tastytea de> CommitDate: Fri Sep 16 16:40:43 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ff878253 dev-util/blueprint-compiler: Sync live ebuild for Py module path change This is the third time the upstream changes where the package's Python module is installed, yet it is merely a backtrack to pre-v0.2.0 behavior... Nevertheless, the good news is that this package can be installed as a multi-impl Python package (again). Signed-off-by: Yuan Liao gmail.com> .../blueprint-compiler-9999.ebuild | 51 +++++++++++++++++----- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild b/dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild index b55e91db8..65b53ce6a 100644 --- a/dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild +++ b/dev-util/blueprint-compiler/blueprint-compiler-9999.ebuild @@ -5,7 +5,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{9..11} ) -inherit meson python-single-r1 +inherit meson python-r1 if [[ ${PV} == *9999 ]]; then inherit git-r3 @@ -29,10 +29,8 @@ RESTRICT="!test? ( test )" BDEPEND=" ${PYTHON_DEPS} doc? ( - $(python_gen_cond_dep ' - dev-python/sphinx[${PYTHON_USEDEP}] - dev-python/furo[${PYTHON_USEDEP}] - ') + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/furo[${PYTHON_USEDEP}] ) " @@ -50,12 +48,45 @@ src_configure() { local emesonargs=( $(meson_use doc docs) ) - meson_src_configure + python_foreach_impl meson_src_configure +} + +src_compile() { + python_foreach_impl meson_src_compile +} + +src_test() { + python_foreach_impl meson_src_test } src_install() { - use doc && HTML_DOCS=( "${BUILD_DIR}/docs"/* ) - meson_src_install - python_optimize "${D}/usr/share/${PN}" - python_fix_shebang "${D}/usr/bin/${PN}" + my_src_install() { + local exe="${ED}/usr/bin/${PN}" + + # Meson installs a Python script at ${ED}/usr/bin/${PN}; on + # Gentoo, the script should go into ${ED}/usr/lib/python-exec, + # and ${ED}/usr/bin/${PN} should be a symbolic link to + # ${ED}/usr/lib/python-exec/python-exec2. + # + # When multiple PYTHON_TARGETS are enabled, then after the + # package has been installed for one Python implementation, + # Meson will follow the ${ED}/usr/bin/${PN} symbolic link and + # install the script at ${ED}/usr/lib/python-exec/python-exec2 + # for the remaining implementations, leading to file collision. + if [[ -L "${exe}" ]]; then + rm -v "${exe}" || die "Failed to remove symbolic link ${exe}" + fi + + meson_src_install + python_doscript "${exe}" + python_optimize + + # Install Sphinx-generated documentation only once + # since the documentation is supposed to be identical + # between different Python implementations + use doc && HTML_DOCS=( "${BUILD_DIR}/docs"/* ) + } + + python_foreach_impl my_src_install + einstalldocs }