commit:     a0359d5441b73a07358be07a8bcb20d4a90373d1
Author:     James Browning <JamesB.fe80 <AT> gmail <DOT> com>
AuthorDate: Tue Jun  4 18:31:51 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 08:01:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0359d54

net-misc/ntpsec: Replace egg-info with a Flit pyproject.toml file

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

 net-misc/ntpsec/files/flit.toml                    | 34 +++++++++++++++++++
 .../ntpsec/files/ntpsec-1.2.3-pep517-no-egg.patch  | 38 ++++++++++++++++++++++
 net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild            |  2 ++
 net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild             |  2 ++
 net-misc/ntpsec/ntpsec-9999.ebuild                 |  2 ++
 5 files changed, 78 insertions(+)

diff --git a/net-misc/ntpsec/files/flit.toml b/net-misc/ntpsec/files/flit.toml
new file mode 100644
index 000000000000..b3c782f9bc30
--- /dev/null
+++ b/net-misc/ntpsec/files/flit.toml
@@ -0,0 +1,34 @@
+[project]
+name = "ntp"
+version = "@NTPSEC_VERSION_EXTENDED@"
+dependencies = ["argparse"]
+requires-python = ">=2.6"
+authors = [
+  {name = "the NTPsec project", email = "[email protected]"},
+]
+maintainers = [
+  {name = "the NTPsec project", email = "[email protected]"}
+]
+description = "The NTP reference implementation, refactored"
+license = {text = "BSD 2 License"}
+keywords = ["ntp"]
+classifiers = [
+    'Development Status :: 5 - Production/Stable',
+    'License :: OSI Approved :: BSD License',
+    'Operating System :: POSIX',
+    'Programming Language :: Python',
+]
+
+[project.urls]
+Homepage = "https://www.ntpsec.org/";
+Documentation = "https://www.ntpsec.org/latest/";
+Repository = "https://gitlab.com/NTPsec/ntpsec/";
+"Bug Tracker" = "https://gitlab.com/NTPsec/ntpsec/-/issues";
+Changelog = "https://gitlab.com/NTPsec/ntpsec/-/blob/master/NEWS.adoc";
+
+[build-system]
+requires = ["flit_core >=3.2,<4"]
+build-backend = "flit_core.buildapi"
+
+[tool.flit.module]
+name = "ntp"

diff --git a/net-misc/ntpsec/files/ntpsec-1.2.3-pep517-no-egg.patch 
b/net-misc/ntpsec/files/ntpsec-1.2.3-pep517-no-egg.patch
new file mode 100644
index 000000000000..549a69792af4
--- /dev/null
+++ b/net-misc/ntpsec/files/ntpsec-1.2.3-pep517-no-egg.patch
@@ -0,0 +1,38 @@
+diff --git a/pylib/ntp-in.egg-info b/pylib/ntp-in.egg-info
+deleted file mode 100644
+index b672a8431..000000000
+--- a/pylib/ntp-in.egg-info
++++ /dev/null
+@@ -1,12 +0,0 @@
+-Metadata-Version: 1.0
+-Name: ntpsec
+-Version: @NTPSEC_VERSION_EXTENDED@
+-Platform: POSIX
+-Summary: The NTP reference implementation, refactored
+-Home-page: https://ntpsec.org/
+-License:  Beerware, BSD-2-Clause, BSD-3-Clause, BSD-4-Clause, CC-BY-4.0, ISC, 
MIT, NTP
+-Description: 
+-         The Network Time Protocol suite, refactored
+-Author: the NTPsec project
+-Author-email: [email protected]
+-Keywords: 
+\ No newline at end of file
+diff --git a/pylib/wscript b/pylib/wscript
+index e285b768b..1137fb814 100644
+--- a/pylib/wscript
++++ b/pylib/wscript
+@@ -96,11 +96,9 @@ def build(ctx):
+         install_path='${PYTHONARCHDIR}/ntp'
+     )
+ 
+-    # pep241  lay an egg
+-    egg = ['ntp-%s.egg-info' % ctx.env.NTPSEC_VERSION]
++    # pep517 pyproject.toml
+     ctx(
+         features="subst",
+-        source=['ntp-in.egg-info'],
+-        target=egg
++        source=['pyproject.toml'],
++        target=['../pyproject.toml']
+     )
+-    ctx.install_files(ctx.env.PYTHONARCHDIR, egg)

diff --git a/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild 
b/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
index 95735be7c7bf..9db716210dab 100644
--- a/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.2a-r1.ebuild
@@ -71,6 +71,7 @@ BDEPEND+="
 PATCHES=(
        "${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
        "${FILESDIR}/${PN}-1.2.2-logrotate.patch"
+       "${FILESDIR}/${PN}-1.2.3-pep517-no-egg.patch"
 )
 
 WAF_BINARY="${S}/waf"
@@ -123,6 +124,7 @@ src_configure() {
 }
 
 python_configure() {
+       cp -v "${FILESDIR}/flit.toml" "pylib/pyproject.toml"
        waf-utils_src_configure "${myconf[@]}"
 }
 

diff --git a/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild 
b/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
index a2c87b866336..760ab7ded80c 100644
--- a/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
+++ b/net-misc/ntpsec/ntpsec-1.2.3-r1.ebuild
@@ -71,6 +71,7 @@ BDEPEND+="
 PATCHES=(
        "${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
        "${FILESDIR}/${PN}-1.2.2-logrotate.patch"
+       "${FILESDIR}/${PN}-1.2.3-pep517-no-egg.patch"
 )
 
 WAF_BINARY="${S}/waf"
@@ -122,6 +123,7 @@ src_configure() {
 }
 
 python_configure() {
+       cp -v "${FILESDIR}/flit.toml" "pylib/pyproject.toml"
        waf-utils_src_configure "${myconf[@]}"
 }
 

diff --git a/net-misc/ntpsec/ntpsec-9999.ebuild 
b/net-misc/ntpsec/ntpsec-9999.ebuild
index 68b047560c2a..79ca14fe71f2 100644
--- a/net-misc/ntpsec/ntpsec-9999.ebuild
+++ b/net-misc/ntpsec/ntpsec-9999.ebuild
@@ -71,6 +71,7 @@ BDEPEND+="
 PATCHES=(
        "${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
        "${FILESDIR}/${PN}-1.2.2-logrotate.patch"
+       "${FILESDIR}/${PN}-1.2.3-pep517-no-egg.patch"
 )
 
 WAF_BINARY="${S}/waf"
@@ -122,6 +123,7 @@ src_configure() {
 }
 
 python_configure() {
+       cp -v "${FILESDIR}/flit.toml" "pylib/pyproject.toml"
        waf-utils_src_configure "${myconf[@]}"
 }
 

Reply via email to