aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2019-11-30 14:50:31 -0800
committerTim Orling <ticotimo@gmail.com>2019-12-01 18:08:12 -0800
commita54c8165dbf75e8db0aa130668c90e5401d47354 (patch)
treea0b4479ffd670cc548d0ad2fc22de805f08750fc /recipes-devtools
parent18615f47dbbd109bc2350b86e078da93d066e5e5 (diff)
downloadmeta-python2-a54c8165dbf75e8db0aa130668c90e5401d47354.tar.gz
python-backports-init: Add helper class and recipe
Recipes that install in the backports namespace have a tendency to conflict in the installation of .../site-packages/backports/__init__.py Add a class and recipe to help avoid the conflict. Modify recipes that are affected: - python-backports-functools-lru-cache - python-backports-ssl - python-configparser Signed-off-by: Tim Orling <ticotimo@gmail.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/python/python-backports-functools-lru-cache_1.5.bb2
-rw-r--r--recipes-devtools/python/python-backports-init/backports/__init__.py5
-rw-r--r--recipes-devtools/python/python-backports-init_1.0.bb25
-rw-r--r--recipes-devtools/python/python-backports-ssl_3.7.0.1.bb3
-rw-r--r--recipes-devtools/python/python-configparser_3.8.1.bb2
5 files changed, 34 insertions, 3 deletions
diff --git a/recipes-devtools/python/python-backports-functools-lru-cache_1.5.bb b/recipes-devtools/python/python-backports-functools-lru-cache_1.5.bb
index 825444f..11c1533 100644
--- a/recipes-devtools/python/python-backports-functools-lru-cache_1.5.bb
+++ b/recipes-devtools/python/python-backports-functools-lru-cache_1.5.bb
@@ -11,7 +11,7 @@ SRC_URI[sha256sum] = "9d98697f088eb1b0fa451391f91afb5e3ebde16bbdb272819fd091151f
DEPENDS += "python-setuptools-scm-native"
-inherit setuptools pypi
+inherit setuptools pypi python-backports-init
RDEPENDS_${PN} += "\
${PYTHON_PN}-pickle \
diff --git a/recipes-devtools/python/python-backports-init/backports/__init__.py b/recipes-devtools/python/python-backports-init/backports/__init__.py
new file mode 100644
index 0000000..febdb2f
--- /dev/null
+++ b/recipes-devtools/python/python-backports-init/backports/__init__.py
@@ -0,0 +1,5 @@
+# A Python "namespace package" http://www.python.org/dev/peps/pep-0382/
+# This always goes inside of a namespace package's __init__.py
+
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)
diff --git a/recipes-devtools/python/python-backports-init_1.0.bb b/recipes-devtools/python/python-backports-init_1.0.bb
new file mode 100644
index 0000000..29e712a
--- /dev/null
+++ b/recipes-devtools/python/python-backports-init_1.0.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Helper package to avoid backports/__init__.py conflicts"
+DETAIL = "backports packages in python2 suffer from a flaw in the namespace \
+implementation and can conflict with each other. For OE purposes, at least \
+fix the conflicting install of .../site-packages/backports/__init__.py"
+AUTHOR = "Tim Orling <ticotimo@gmail.com>"
+SECTION = "devel/python"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = "file://backports/__init__.py"
+
+inherit python-dir
+
+# provide to avoid warnings
+do_compile() {
+ :
+}
+
+do_install() {
+ install -d ${D}${PYTHON_SITEPACKAGES_DIR}/backports
+ install ${WORKDIR}/backports/__init__.py ${D}${PYTHON_SITEPACKAGES_DIR}/backports/
+}
+
+FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py"
diff --git a/recipes-devtools/python/python-backports-ssl_3.7.0.1.bb b/recipes-devtools/python/python-backports-ssl_3.7.0.1.bb
index 9032a7c..126d0ee 100644
--- a/recipes-devtools/python/python-backports-ssl_3.7.0.1.bb
+++ b/recipes-devtools/python/python-backports-ssl_3.7.0.1.bb
@@ -13,6 +13,7 @@ SRC_URI[md5sum] = "32d2f593af01a046bec3d2f5181a420a"
SRC_URI[sha256sum] = "bb82e60f9fbf4c080eabd957c39f0641f0fc247d9a16e31e26d594d8f42b9fd2"
PYPI_PACKAGE = "backports.ssl_match_hostname"
-inherit pypi setuptools
+
+inherit pypi setuptools python-backports-init
RDEPENDS_${PN} += "${PYTHON_PN}-pkgutil"
diff --git a/recipes-devtools/python/python-configparser_3.8.1.bb b/recipes-devtools/python/python-configparser_3.8.1.bb
index 3d59ce8..c864e35 100644
--- a/recipes-devtools/python/python-configparser_3.8.1.bb
+++ b/recipes-devtools/python/python-configparser_3.8.1.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=10;endline=10;md5=23f9ad5cad3d8cc0
SRC_URI[md5sum] = "bc1558ed941cb1acb80ff650726d5af8"
SRC_URI[sha256sum] = "bc37850f0cc42a1725a796ef7d92690651bf1af37d744cc63161dac62cabee17"
-inherit pypi setuptools
+inherit pypi setuptools python-backports-init
RDEPENDS_${PN} += "python-pkgutil"