Skip to contentSkip to conversation

python3-packaging: DEPENDS on python3-setuptools-native

PATCH In review Tim Orling 2 participants 4 messages Oct 17, 2021

lore
Share & tools
lore

Tim Orling

author
#0 lore raw

PATCH 1/3 python3-packaging: DEPENDS on python3-setuptools-native

Not python3-setuptools-scm-native

Upgrade to python3-setuptools-scm introduces a circular dependency.

Drop python3-six from RDEPENDS as this was removed in 20.5

---
 meta/recipes-devtools/python/python3-packaging_21.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/python/python3-packaging_21.0.bb +2 -2
index 201b583de2..aef3ccae9a 100644
@@ -9,5 +9,5 @@ inherit pypi setuptools3
 
 BBCLASSEXTEND = "native"
 
-DEPENDS += "${PYTHON_PN}-setuptools-scm-native"
-RDEPENDS:${PN} += "${PYTHON_PN}-six ${PYTHON_PN}-pyparsing"
+DEPENDS += "${PYTHON_PN}-setuptools-native"
+RDEPENDS:${PN} += "${PYTHON_PN}-pyparsing"
Signature · 1 line
2.30.2
author
#1 lore raw

PATCH 2/3 python3-tomli: add recipe for 1.2.1

A lil' TOML parser

This is a runtime dependency for setuptools-scm upgrade as well as for several other Python Packaging Authority (pypa) tools that will be replacing distutils and setuptools in the future.

Upstream does not have a setup.py, but rather relies on flit_core to build. This introduces a circular dependency, as flit_core has a runtime dependency on tomli.

Borrow a setup.py from Gentoo until a better solution is found by upstream Python Packaging Authority (pypa).

---
 meta/conf/distro/include/maintainers.inc      |  1 +
 .../python/python3-tomli_1.2.1.bb             | 20 +++++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-tomli_1.2.1.bb
meta/conf/distro/include/maintainers.inc +1 -0
index 3ffb065804..baec2bef4d 100644
@@ -637,6 +637,7 @@ RECIPE_MAINTAINER:pn-python3-sortedcontainers = "Tim Orling <timothy.t.orling@in
 RECIPE_MAINTAINER:pn-python3-subunit = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-testtools = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-toml = "Tim Orling <[email protected]>"
+RECIPE_MAINTAINER:pn-python3-tomli = "Tim Orling <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-typogrify = "Alexander Kanavin <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-wcwidth = "Tim Orling <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-zipp = "Tim Orling <[email protected]>"
meta/recipes-devtools/python/python3-tomli_1.2.1.bb new file +20 -0
new file mode 100644
index 0000000000..f62690ff2d
@@ -0,0 +1,20 @@
+SUMMARY = "A lil' TOML parser"
+DESCRIPTION = "Tomli is a Python library for parsing TOML. Tomli is fully \
+compatible with TOML v1.0.0."
+HOMEPAGE = "https://github.com/hukkin/tomli"
+BUGTRACKER = "https://github.com/hukkin/tomli/issues"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=aaaaf0879d17df0110d1aa8c8c9f46f5"
+
+inherit pypi setuptools3
+
+SRC_URI[sha256sum] = "a5b75cb6f3968abb47af1b40c1819dc519ea82bcc065776a866e8d74c5ca9442"
+
+do_configure:prepend() {
+cat > ${S}/setup.py <<-EOF
+from setuptools import setup
+setup(name="tomli", version="${PV}", packages=["tomli"], package_data={"": ["*"]})
+EOF
+}
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.30.2
author
#2 lore raw

PATCH 3/3 python3-setuptools-scm: upgrade 6.0.1 -> 6.3.2

In reply to Tim Orling

RDEPENDS on python3-tomli instead of python3-toml

Cleanup RDEPENDS (common vs. class-target)

For changes, see:
https://github.com/pypa/setuptools_scm/blob/main/CHANGELOG.rst#632

---
 ..._6.0.1.bb => python3-setuptools-scm_6.3.2.bb} | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
 rename meta/recipes-devtools/python/{python3-setuptools-scm_6.0.1.bb => python3-setuptools-scm_6.3.2.bb} (73%)
meta/recipes-devtools/python/python3-setuptools-scm_6.3.2.bb renamed from meta/recipes-devtools/python/python3-setuptools-scm_6.0.1.bb +8 -8
similarity index 73%
rename from meta/recipes-devtools/python/python3-setuptools-scm_6.0.1.bb
rename to meta/recipes-devtools/python/python3-setuptools-scm_6.3.2.bb
index afbed17a2d..bc594d9620 100644
@@ -4,7 +4,7 @@ DESCRIPTION = "setuptools_scm handles managing your Python package versions in S
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
 
-SRC_URI[sha256sum] = "d1925a69cb07e9b29416a275b9fadb009a23c148ace905b2fb220649a6c18e92"
+SRC_URI[sha256sum] = "a49aa8081eeb3514eb9728fa5040f2eaa962d6c6f4ec9c32f6c1fba88f88a0f2"
 
 PYPI_PACKAGE = "setuptools_scm"
 inherit pypi setuptools3
@@ -12,15 +12,15 @@ inherit pypi setuptools3
 UPSTREAM_CHECK_REGEX = "setuptools_scm-(?P<pver>.*)\.tar"
 
 RDEPENDS:${PN} = "\
-    ${PYTHON_PN}-debugger \
-    ${PYTHON_PN}-json \
-    ${PYTHON_PN}-py \
+    ${PYTHON_PN}-packaging \
+    ${PYTHON_PN}-pyparsing \
     ${PYTHON_PN}-setuptools \
-    ${PYTHON_PN}-toml \
+    ${PYTHON_PN}-tomli \
 "
-RDEPENDS:${PN}:class-native = "\
-    ${PYTHON_PN}-setuptools-native \
-    ${PYTHON_PN}-toml-native \
+
+RDEPENDS:${PN}:append:class-target = " \
+    ${PYTHON_PN}-debugger \
+    ${PYTHON_PN}-json \
 "
 
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.30.2
#3 lore raw

Re: [OE-core] [PATCH 3/3] python3-setuptools-scm: upgrade 6.0.1 -> 6.3.2

Quoted 42 lines · Tim Orling

RDEPENDS on python3-tomli instead of python3-toml

Cleanup RDEPENDS (common vs. class-target)

For changes, see:
https://github.com/pypa/setuptools_scm/blob/main/CHANGELOG.rst#632

---
 ..._6.0.1.bb => python3-setuptools-scm_6.3.2.bb} | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
 rename meta/recipes-devtools/python/{python3-setuptools-scm_6.0.1.bb => python3-setuptools-scm_6.3.2.bb} (73%)
meta/recipes-devtools/python/python3-setuptools-scm_6.3.2.bb renamed from meta/recipes-devtools/python/python3-setuptools-scm_6.0.1.bb +4 -5
similarity index 73%
rename from meta/recipes-devtools/python/python3-setuptools-scm_6.0.1.bb
rename to meta/recipes-devtools/python/python3-setuptools-scm_6.3.2.bb
index afbed17a2d..bc594d9620 100644
@@ -4,7 +4,7 @@ DESCRIPTION = "setuptools_scm handles managing your Python package versions in S
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489"
 
-SRC_URI[sha256sum] = "d1925a69cb07e9b29416a275b9fadb009a23c148ace905b2fb220649a6c18e92"
+SRC_URI[sha256sum] = "a49aa8081eeb3514eb9728fa5040f2eaa962d6c6f4ec9c32f6c1fba88f88a0f2"
 
 PYPI_PACKAGE = "setuptools_scm"
 inherit pypi setuptools3
@@ -12,15 +12,15 @@ inherit pypi setuptools3
 UPSTREAM_CHECK_REGEX = "setuptools_scm-(?P<pver>.*)\.tar"
 
 RDEPENDS:${PN} = "\
-    ${PYTHON_PN}-debugger \
-    ${PYTHON_PN}-json \
-    ${PYTHON_PN}-py \
+    ${PYTHON_PN}-packaging \
+    ${PYTHON_PN}-pyparsing \
     ${PYTHON_PN}-setuptools \
-    ${PYTHON_PN}-toml \
+    ${PYTHON_PN}-tomli \
 "

meta/recipes-devtools/python/python3-setuptools-scm_6.3.2.bb inherit pypi setuptools3 · line 26

Quoted 10 lines
meta/recipes-devtools/python/python3-setuptools-scm_6.3.2.bb renamed from meta/recipes-devtools/python/python3-setuptools-scm_6.0.1.bb +4 -3
-RDEPENDS:${PN}:class-native = "\
-    ${PYTHON_PN}-setuptools-native \
-    ${PYTHON_PN}-toml-native \
+
+RDEPENDS:${PN}:append:class-target = " \
+    ${PYTHON_PN}-debugger \
+    ${PYTHON_PN}-json \
 "
 
 BBCLASSEXTEND = "native nativesdk"

I think python3-packaging needs a nativesdk BBCLASSEXTEND for this to work:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/2766/steps/13/logs/warnings

Cheers,

Richard