diff mbox series

[meta-python,18/26] python3-socksio: allow building with flit_core 4

Message ID 20261129192919.14731-19-tim.orling@konsulko.com
State New
Headers show
Series allow building with flit_core 4 | expand

Commit Message

Tim Orling Nov. 29, 2026, 7:29 p.m. UTC
flit_core 4 no longer reads the [tool.flit.metadata] table, so move the
metadata to the standard [project] table and allow flit_core <5. Both
patches are backports; the unpin patch was merged upstream since it was
added.

Tested by building with flit_core 3.12.0 and 4.2.0.

AI-Generated: Uses Claude Code (Claude Opus 5.5)
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 .../0001-Unpin-flit-core-dependency.patch     |  2 +-
 ...adata-to-fix-building-with-flit-core.patch | 46 +++++++++++++++++++
 .../python/python3-socksio_1.0.0.bb           |  5 +-
 3 files changed, 51 insertions(+), 2 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-socksio/0002-Use-PEP-621-metadata-to-fix-building-with-flit-core.patch
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-socksio/0001-Unpin-flit-core-dependency.patch b/meta-python/recipes-devtools/python/python3-socksio/0001-Unpin-flit-core-dependency.patch
index 75be61fc4f..c7921ecdc3 100644
--- a/meta-python/recipes-devtools/python/python3-socksio/0001-Unpin-flit-core-dependency.patch
+++ b/meta-python/recipes-devtools/python/python3-socksio/0001-Unpin-flit-core-dependency.patch
@@ -3,7 +3,7 @@  From: Theodore Ni <3806110+tjni@users.noreply.github.com>
 Date: Sun, 13 Aug 2023 09:21:49 -0700
 Subject: [PATCH] Unpin flit-core dependency
 
-Upstream-Status: Submitted [https://github.com/sethmlarson/socksio/pull/61]
+Upstream-Status: Backport [https://github.com/sethmlarson/socksio/commit/b326406915fd98a8185c1c160165c5b8963b30c1]
 ---
  pyproject.toml | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-python/recipes-devtools/python/python3-socksio/0002-Use-PEP-621-metadata-to-fix-building-with-flit-core.patch b/meta-python/recipes-devtools/python/python3-socksio/0002-Use-PEP-621-metadata-to-fix-building-with-flit-core.patch
new file mode 100644
index 0000000000..babd4d2714
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-socksio/0002-Use-PEP-621-metadata-to-fix-building-with-flit-core.patch
@@ -0,0 +1,46 @@ 
+From: Michał Górny <mgorny@gentoo.org>
+Date: Tue, 18 Aug 2026 15:05:44 +0200
+Subject: [PATCH] Use PEP 621 metadata to fix building with flit-core >=5
+
+[Only the pyproject.toml part is backported. It applies on top of
+0001-Unpin-flit-core-dependency.patch.]
+
+Upstream-Status: Backport [https://github.com/sethmlarson/socksio/commit/61bd9df09c3da182f3d73cbff8e6479292ab7687]
+Signed-off-by: Tim Orling <tim.orling@konsulko.com>
+---
+diff --git a/pyproject.toml b/pyproject.toml
+index 70868e0..acf0a38 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -2,13 +2,14 @@
+ requires = ["flit_core >=2"]
+ build-backend = "flit_core.buildapi"
+ 
+-[tool.flit.metadata]
+-module = "socksio"
+-author = "Seth Michael Larson"
+-author-email = "sethmichaellarson@gmail.com"
+-home-page = "https://github.com/sethmlarson/socksio"
+-requires-python=">=3.6"
+-description-file="README.md"
++[project]
++name = "socksio"
++authors = [
++    { name = "Seth Michael Larson", email = "sethmichaellarson@gmail.com" },
++]
++readme = "README.md"
++requires-python = ">=3.6"
++dynamic = ["version", "description"]
+ classifiers = [
+     "License :: OSI Approved :: MIT License",
+     "Programming Language :: Python :: 3.6",
+@@ -19,6 +20,9 @@ classifiers = [
+     "Topic :: Internet :: Proxy Servers",
+ ]
+ 
++[project.urls]
++Homepage = "https://github.com/sethmlarson/socksio"
++
+ [tool.isort]
+ combine_as_imports = true
+ force_grid_wrap = 0
diff --git a/meta-python/recipes-devtools/python/python3-socksio_1.0.0.bb b/meta-python/recipes-devtools/python/python3-socksio_1.0.0.bb
index 4353a52ee1..810759523c 100644
--- a/meta-python/recipes-devtools/python/python3-socksio_1.0.0.bb
+++ b/meta-python/recipes-devtools/python/python3-socksio_1.0.0.bb
@@ -5,6 +5,9 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=0b4dda8edb09eec767aaded3cbf8f6b1"
 
 inherit pypi python_flit_core
 
-SRC_URI += "file://0001-Unpin-flit-core-dependency.patch"
+SRC_URI += "\
+    file://0001-Unpin-flit-core-dependency.patch \
+    file://0002-Use-PEP-621-metadata-to-fix-building-with-flit-core.patch \
+"
 
 SRC_URI[sha256sum] = "f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac"