diff --git a/meta/recipes-devtools/python/python3-urllib3_2.5.0.bb b/meta/recipes-devtools/python/python3-urllib3_2.5.0.bb index a4f3995730..62fdf8e345 100644 --- a/meta/recipes-devtools/python/python3-urllib3_2.5.0.bb +++ b/meta/recipes-devtools/python/python3-urllib3_2.5.0.bb @@ -7,18 +7,23 @@ SRC_URI[sha256sum] = "3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbf inherit pypi python_hatchling -DEPENDS += " \ - python3-hatch-vcs-native \ -" +DEPENDS += "python3-hatch-vcs-native" + +PACKAGECONFIG ??= "" +# This is not recommended for use upstream, and has large dependencies +PACKAGECONFIG[openssl] = ",,,python3-cryptography python3-pyopenssl" + +do_install:append() { + if ! ${@bb.utils.contains("PACKAGECONFIG", "openssl", "true", "false", d)}; then + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/urllib3/contrib/pyopenssl.py + fi +} RDEPENDS:${PN} += "\ - python3-certifi \ - python3-cryptography \ - python3-email \ python3-idna \ + python3-email \ python3-json \ python3-netclient \ - python3-pyopenssl \ python3-threading \ python3-logging \ "