Skip to contentSkip to conversation

python3-iniconfig: remove obsolete DEPENDS

PATCH New Ross Burton 1 participant 2 messages Sep 8

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 python3-iniconfig: remove obsolete DEPENDS

hatch-vcs was removed as a build dependency in 2.2.0[1]. They moved to setuptools so now depend on setuptools-scm instead.

[1] https://github.com/pytest-dev/iniconfig/commit/3af74adab75bf42fbfca55848da60b7a5a116859

---
 meta/recipes-devtools/python/python3-iniconfig_2.3.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3-iniconfig_2.3.0.bb +1 -1
index 05b4dd6c749..6933ac49354 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=4a73af4b5f1f3a8731e5def70e8c1254"
 
 SRC_URI[sha256sum] = "c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730"
 
-DEPENDS += "python3-hatch-vcs-native"
+DEPENDS += "python3-setuptools-scm-native"
 
 inherit pypi python_setuptools_build_meta
 
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 python_hatching: remove empty site-packages workaround

Back in 2023 there were random failures from empty directories in the python site-packages directory, which at the time was believed to be specific to hatchling and so worked around in this build class[1]. This is not the case, but changes to hatchling and upgrades would result in rebuilds, which expose the issue if the build tree is not cleaned.

Since then fixes have been added to python3[2] and python3-build[3] which resolve this issue at a lower level, so the workaround in this class should be no longer needed.

[1] oe-core 3ded8b83ceb ("python_hatchling: remove empty python sysroot dirs")
[2] oe-core 73de8daa629 ("python3: backport the full fix for importlib scanning invalid distributions") oe-core 855d1111c3d ("python3: prefer valid dists when searching for entry points")
[3] oe-core bd7225f5b84 ("python3-build: verify that found dependencies are valid")

---
 meta/classes-recipe/python_hatchling.bbclass | 18 ------------------
 1 file changed, 18 deletions(-)
meta/classes-recipe/python_hatchling.bbclass +0 -18
index 6765ddbe8ce..8ad3ac7fbbb 100644
@@ -7,21 +7,3 @@
 inherit python_pep517
 
 DEPENDS += "python3-hatchling-native"
-
-# delete nested, empty directories from the python site-packages path. Make
-# sure that we remove the native ones for target builds as well
-hatchling_rm_emptydirs:class-target () {
-        find ${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/* -depth -type d -empty -delete
-        find ${STAGING_LIBDIR_NATIVE}/${PYTHON_DIR}/site-packages/* -depth -type d -empty -delete
-}
-
-hatchling_rm_emptydirs:class-native () {
-        find ${STAGING_LIBDIR_NATIVE}/${PYTHON_DIR}/site-packages/* -depth -type d -empty -delete
-}
-
-# Define a default empty version of hatchling_rm_emptydirs to appease bitbake
-hatchling_rm_emptydirs () {
-        :
-}
-
-do_prepare_recipe_sysroot[postfuncs] += " hatchling_rm_emptydirs"
Signature · 1 line
2.43.0