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@gentoo.org>
This commit is contained in:
Sam James
2024-06-14 08:57:57 +01:00
parent d86bc0181c
commit a7a550ba59
3 changed files with 24 additions and 36 deletions

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"