commit:     a7a550ba59e0fe463675c8602f4685ef4aad5040
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 14 07:57:57 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 08:02:26 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7a550ba

net-misc/ntpsec: more idiomatic use of distutils-r1

Bug: https://bugs.gentoo.org/910009
Bug: https://bugs.gentoo.org/922819
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild | 20 ++++++++------------
 net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild  | 20 ++++++++------------
 net-misc/ntpsec/ntpsec-9999.ebuild      | 20 ++++++++------------
 3 files changed, 24 insertions(+), 36 deletions(-)

diff --git a/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild 
b/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
index a14653efe462..00428f679c48 100644
--- a/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
@@ -3,6 +3,7 @@
 
 EAPI=8
 
+DISTUTILS_EXT=1
 DISTUTILS_USE_PEP517="flit"
 PYTHON_COMPAT=( python3_{10..13} )
 PYTHON_REQ_USE='threads(+)'
@@ -137,10 +138,15 @@ src_configure() {
 
 src_compile() {
        waf-utils_src_compile --notests
+
+       ln -svf pylib build/main/ntp || die
+       cd build/main || die
+       distutils-r1_src_compile
 }
 
 src_test() {
-       python_test
+       cd build/main || die
+       distutils-r1_src_test
 }
 
 python_test() {
@@ -176,22 +182,12 @@ src_install() {
        use doc && mv -v "${ED}"/usr/share/doc/"${PN}" 
"${ED}"/usr/share/doc/"${P}"/html
 
        ln -svf pylib build/main/ntp || die
-       wheel_name=$(
-               cd build/main && \
-               gpep517 build-wheel --output-fd 3 --wheel-dir ../.. 3>&1 >&2 || 
die
-       )
-       python_foreach_impl python_install
+       distutils-r1_src_install
        waf-utils_src_install --notests
        python_fix_shebang "${ED}"
        python_optimize
 }
 
-python_install() {
-       ${PYTHON} -m gpep517 \
-               install-wheel "${wheel_name}" \
-               --optimize all --destdir "${D}" || die
-}
-
 pkg_postinst() {
        einfo "If you want to serve time on your local network, then"
        einfo "you should disable all the ref_clocks unless you have"

diff --git a/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild 
b/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
index 7bf78aa18efb..2268d6f6574a 100644
--- a/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
@@ -3,6 +3,7 @@
 
 EAPI=8
 
+DISTUTILS_EXT=1
 DISTUTILS_USE_PEP517="flit"
 PYTHON_COMPAT=( python3_{10..13} )
 PYTHON_REQ_USE='threads(+)'
@@ -133,10 +134,15 @@ src_configure() {
 
 src_compile() {
        waf-utils_src_compile --notests
+
+       ln -svf pylib build/main/ntp || die
+       cd build/main || die
+       distutils-r1_src_compile
 }
 
 src_test() {
-       python_test
+       cd build/main || die
+       distutils-r1_src_test
 }
 
 python_test() {
@@ -172,22 +178,12 @@ src_install() {
        use doc && mv -v "${ED}"/usr/share/doc/"${PN}" 
"${ED}"/usr/share/doc/"${P}"/html
 
        ln -svf pylib build/main/ntp || die
-       wheel_name=$(
-               cd build/main && \
-               gpep517 build-wheel --output-fd 3 --wheel-dir ../.. 3>&1 >&2 || 
die
-       )
-       python_foreach_impl python_install
+       distutils-r1_src_install
        waf-utils_src_install --notests
        python_fix_shebang "${ED}"
        python_optimize
 }
 
-python_install() {
-       ${PYTHON} -m gpep517 \
-               install-wheel "${wheel_name}" \
-               --optimize all --destdir "${D}" || die
-}
-
 pkg_postinst() {
        einfo "If you want to serve time on your local network, then"
        einfo "you should disable all the ref_clocks unless you have"

diff --git a/net-misc/ntpsec/ntpsec-9999.ebuild 
b/net-misc/ntpsec/ntpsec-9999.ebuild
index 7bf78aa18efb..2268d6f6574a 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-9999.ebuild
@@ -3,6 +3,7 @@
 
 EAPI=8
 
+DISTUTILS_EXT=1
 DISTUTILS_USE_PEP517="flit"
 PYTHON_COMPAT=( python3_{10..13} )
 PYTHON_REQ_USE='threads(+)'
@@ -133,10 +134,15 @@ src_configure() {
 
 src_compile() {
        waf-utils_src_compile --notests
+
+       ln -svf pylib build/main/ntp || die
+       cd build/main || die
+       distutils-r1_src_compile
 }
 
 src_test() {
-       python_test
+       cd build/main || die
+       distutils-r1_src_test
 }
 
 python_test() {
@@ -172,22 +178,12 @@ src_install() {
        use doc && mv -v "${ED}"/usr/share/doc/"${PN}" 
"${ED}"/usr/share/doc/"${P}"/html
 
        ln -svf pylib build/main/ntp || die
-       wheel_name=$(
-               cd build/main && \
-               gpep517 build-wheel --output-fd 3 --wheel-dir ../.. 3>&1 >&2 || 
die
-       )
-       python_foreach_impl python_install
+       distutils-r1_src_install
        waf-utils_src_install --notests
        python_fix_shebang "${ED}"
        python_optimize
 }
 
-python_install() {
-       ${PYTHON} -m gpep517 \
-               install-wheel "${wheel_name}" \
-               --optimize all --destdir "${D}" || die
-}
-
 pkg_postinst() {
        einfo "If you want to serve time on your local network, then"
        einfo "you should disable all the ref_clocks unless you have"

Reply via email to