Skip to contentSkip to conversation

python3-asgiref: add recipe

PATCH In review Jagadeesh Krishnanjanappa 2 participants 5 messages Aug 23, 2022 – Aug 24, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 python3-asgiref: add recipe

The default version of python3-django 2.2.x is no longer supported. So, python3-django either 3.x or 4.x should be preferred, that requires python3-asgiref at runtime.

More info at https://bugzilla.yoctoproject.org/show_bug.cgi?id=14888

---
 .../python/python3-asgiref/run-ptest          |  3 ++
 .../python/python3-asgiref_3.5.2.bb           | 29 +++++++++++++++++++
 2 files changed, 32 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-asgiref/run-ptest
 create mode 100644 meta-python/recipes-devtools/python/python3-asgiref_3.5.2.bb
meta-python/recipes-devtools/python/python3-asgiref/run-ptest new file +3 -0
new file mode 100644
index 000000000..3385d6893
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
meta-python/recipes-devtools/python/python3-asgiref_3.5.2.bb new file +29 -0
new file mode 100644
index 000000000..860479199
@@ -0,0 +1,29 @@
+DESCRIPTION = "ASGI is a standard for Python asynchronous web apps and servers to communicate with each other, and positioned as an asynchronous successor to WSGI."
+HOMEPAGE = "https://pypi.org/project/asgiref/"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f09eb47206614a4954c51db8a94840fa"
+
+SRC_URI += "file://run-ptest \
+	    "
+
+SRC_URI[sha256sum] = "4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424"
+
+export BUILD_SYS
+export HOST_SYS
+
+inherit pypi ptest setuptools3
+
+RDEPENDS:${PN}-ptest += " \
+    ${PYTHON_PN}-pytest \
+    ${PYTHON_PN}-asyncio \
+    ${PYTHON_PN}-io \
+    ${PYTHON_PN}-multiprocessing \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/3 python3-django: make 3.2.x as default version

According to https://www.djangoproject.com/download/ python3-django 3.2.x has LTS support upto 2024, hence make it as default version to build.
Also, add runtime dependency on python3-asgiref as the "django-admin" script needs asgiref module.

More info: https://bugzilla.yoctoproject.org/show_bug.cgi?id=14888

---
 .../recipes-devtools/python/python3-django_3.2.12.bb        | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
meta-python/recipes-devtools/python/python3-django_3.2.12.bb +1 -5
index adbc498bd..17d402d65 100644
@@ -5,9 +5,5 @@ SRC_URI[sha256sum] = "9772e6935703e59e993960832d66a614cf0233a1c5123bc6224ecc6ad6
 
 RDEPENDS:${PN} += "\
     ${PYTHON_PN}-sqlparse \
+    ${PYTHON_PN}-asgiref \
 "
-
-# Set DEFAULT_PREFERENCE so that the LTS version of django is built by
-# default. To build the 3.x branch, 
-# PREFERRED_VERSION_python3-django = "3.2.2" can be added to local.conf
-DEFAULT_PREFERENCE = "-1"
Signature · 1 line
2.17.1
#4 lore raw

PATCH 3/3 python3-django: Add python3-asgiref runtime dependency

In reply to Jagadeesh Krishnanjanappa

Add runtime dependency on python3-asgiref as the "django-admin" script needs asgiref module.

More info: https://bugzilla.yoctoproject.org/show_bug.cgi?id=14888

---
 meta-python/recipes-devtools/python/python3-django_4.0.2.bb | 1 +
 1 file changed, 1 insertion(+)
meta-python/recipes-devtools/python/python3-django_4.0.2.bb +1 -0
index 690b9809d..7f933d1a3 100644
@@ -5,6 +5,7 @@ SRC_URI[sha256sum] = "110fb58fb12eca59e072ad59fc42d771cd642dd7a2f2416582aa9da7a8
 
 RDEPENDS:${PN} += "\
     ${PYTHON_PN}-sqlparse \
+    ${PYTHON_PN}-asgiref \
 "
 
 # Set DEFAULT_PREFERENCE so that the LTS version of django is built by
Signature · 1 line
2.17.1
#2 lore raw

Re: [oe] [meta-python][PATCH 2/3] python3-django: make 3.2.x as default version

In reply to Jagadeesh Krishnanjanappa
Quoted 4 lines · Jagadeesh Krishnanjanappa

According to https://www.djangoproject.com/download/ python3-django 3.2.x has LTS support upto 2024, hence make it as default version to build.

It seems 2.2 LTS went EOL on April 11, 2022, can you also send a patch to remove those recipes while you are here.

Quoted 37 lines

Also, add runtime dependency on python3-asgiref as the "django-admin" script needs asgiref module.

More info: https://bugzilla.yoctoproject.org/show_bug.cgi?id=14888

---
 .../recipes-devtools/python/python3-django_3.2.12.bb        | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
meta-python/recipes-devtools/python/python3-django_3.2.12.bb +1 -6
index adbc498bd..17d402d65 100644
@@ -5,9 +5,5 @@ SRC_URI[sha256sum] = "9772e6935703e59e993960832d66a614cf0233a1c5123bc6224ecc6ad6
 
 RDEPENDS:${PN} += "\
     ${PYTHON_PN}-sqlparse \
+    ${PYTHON_PN}-asgiref \
 "
-
-# Set DEFAULT_PREFERENCE so that the LTS version of django is built by
-# default. To build the 3.x branch,
-# PREFERRED_VERSION_python3-django = "3.2.2" can be added to local.conf
-DEFAULT_PREFERENCE = "-1"
--

2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#98398): https://lists.openembedded.org/g/openembedded-devel/message/98398
Mute This Topic: https://lists.openembedded.org/mt/93209460/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw

Re: [oe] [meta-python][PATCH 2/3] python3-django: make 3.2.x as default version

Quoted 11 lines · Khem Raj
Quoted 4 lines · Jagadeesh Krishnanjanappa

According to https://www.djangoproject.com/download/ python3-django 3.2.x has LTS support upto 2024, hence make it as default version to build.

It seems 2.2 LTS went EOL on April 11, 2022, can you also send a patch to remove those recipes while you are here.

Sure. I was planning to send the patch to remove the recipe after these

patches are merged as it should not break the build. Now the patches are merged and the remove patch is also sent.

Thanks,
Jagadeesh

Quoted 43 lines

Review

Quoted 11 lines

Also, add runtime dependency on python3-asgiref as the "django-admin" script needs asgiref module.

More info: https://bugzilla.yoctoproject.org/show_bug.cgi?id=14888

---
 .../recipes-devtools/python/python3-django_3.2.12.bb        | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
(quoted diff) +0 -0

python3-django_3.2.12.bb b/meta-python/recipes-devtools/python/ python3-django_3.2.12.bb

meta-python/recipes-devtools/python/python3-django_3.2.12.bb SRC_URI[sha256sum] =

Quoted 4 lines

index adbc498bd..17d402d65 100644

meta-python/recipes-devtools/python/python3-django_3.2.12.bb +0 -0
@@ -5,9 +5,5 @@ SRC_URI[sha256sum] =

"9772e6935703e59e993960832d66a614cf0233a1c5123bc6224ecc6ad6

Quoted 14 lines
meta-python/recipes-devtools/python/python3-django_3.2.12.bb +1 -6
 RDEPENDS:${PN} += "\
     ${PYTHON_PN}-sqlparse \
+    ${PYTHON_PN}-asgiref \
 "
-
-# Set DEFAULT_PREFERENCE so that the LTS version of django is built by
-# default. To build the 3.x branch,
-# PREFERRED_VERSION_python3-django = "3.2.2" can be added to local.conf
-DEFAULT_PREFERENCE = "-1"
--

2.17.1

Quoted 3 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#98398):

https://lists.openembedded.org/g/openembedded-devel/message/98398

Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/93209460/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [

[email protected]]

Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-