From 2a1eb07755871aaf1e3f35547b7315237592ea27 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Tue, 8 Apr 2025 17:38:21 +0800 Subject: buildtools-tarball: move setting of envvars to respective envfile * make git,curl,python3-requests align with openssl, move the setting of envvars into respective envfile * for environment.d-openssl.sh, also check if ca-certificates.crt exist before export envvars (From OE-Core rev: 9d8ebfcd55ad274e79cb81f162397c8f39f4287b) Signed-off-by: Changqing Li Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- .../python/python3-requests/environment.d-python3-requests.sh | 3 +++ meta/recipes-devtools/python/python3-requests_2.32.3.bb | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh (limited to 'meta/recipes-devtools/python') diff --git a/meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh b/meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh new file mode 100644 index 0000000000..f2eee203ca --- /dev/null +++ b/meta/recipes-devtools/python/python3-requests/environment.d-python3-requests.sh @@ -0,0 +1,3 @@ +if [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then + export REQUESTS_CA_BUNDLE="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" +fi diff --git a/meta/recipes-devtools/python/python3-requests_2.32.3.bb b/meta/recipes-devtools/python/python3-requests_2.32.3.bb index 4f0638b50c..bc9b2289f6 100644 --- a/meta/recipes-devtools/python/python3-requests_2.32.3.bb +++ b/meta/recipes-devtools/python/python3-requests_2.32.3.bb @@ -3,10 +3,19 @@ HOMEPAGE = "https://requests.readthedocs.io" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" +SRC_URI:append:class-nativesdk = " \ + file://environment.d-python3-requests.sh \ +" + SRC_URI[sha256sum] = "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760" inherit pypi python_setuptools_build_meta +do_install:append:class-nativesdk() { + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${UNPACKDIR}/environment.d-python3-requests.sh ${D}${SDKPATHNATIVE}/environment-setup.d/python3-requests.sh +} + RDEPENDS:${PN} += " \ python3-certifi \ python3-email \ @@ -19,6 +28,8 @@ RDEPENDS:${PN} += " \ python3-compression \ " +FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/python3-requests.sh" + CVE_PRODUCT = "requests" BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf