diff mbox series

[v2] python3-calver: Add recipe

Message ID 20230502174300.2261694-1-tgamblin@baylibre.com
State New
Headers show
Series [v2] python3-calver: Add recipe | expand

Commit Message

Trevor Gamblin May 2, 2023, 5:43 p.m. UTC
calver is "a setuptools extension for automatically defining your Python
package version as a calendar version." It is required for
python3-trove-classifiers (another new recipe), which in turn is
required for the upgrade of python3-hatchling from 1.13.0 to work.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
 .../distro/include/ptest-packagelists.inc     |  1 +
 .../python/python3-calver_2022.6.26.bb        | 28 +++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-calver_2022.6.26.bb

Comments

Khem Raj May 3, 2023, 1:32 a.m. UTC | #1
On Tue, May 2, 2023 at 10:43 AM Trevor Gamblin <tgamblin@baylibre.com> wrote:
>
> calver is "a setuptools extension for automatically defining your Python
> package version as a calendar version." It is required for
> python3-trove-classifiers (another new recipe), which in turn is
> required for the upgrade of python3-hatchling from 1.13.0 to work.
>
> Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
> ---
>  .../distro/include/ptest-packagelists.inc     |  1 +
>  .../python/python3-calver_2022.6.26.bb        | 28 +++++++++++++++++++
>  2 files changed, 29 insertions(+)
>  create mode 100644 meta/recipes-devtools/python/python3-calver_2022.6.26.bb
>
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> index 2f83132aeb..bd95a13ff6 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -56,6 +56,7 @@ PTESTS_FAST = "\
>      popt \
>      python3-atomicwrites \
>      python3-bcrypt \
> +    python3-calver \
>      python3-hypothesis \
>      python3-jinja2 \
>      python3-jsonpointer \
> diff --git a/meta/recipes-devtools/python/python3-calver_2022.6.26.bb b/meta/recipes-devtools/python/python3-calver_2022.6.26.bb
> new file mode 100644
> index 0000000000..32b6cfbd42
> --- /dev/null
> +++ b/meta/recipes-devtools/python/python3-calver_2022.6.26.bb
> @@ -0,0 +1,28 @@
> +SUMMARY = "Setuptools extension for CalVer package versions"
> +HOMEPAGE = "https://github.com/di/calver"
> +LICENSE = "Apache-2.0"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
> +
> +SRC_URI = " \
> +    git://github.com/di/calver;branch=master;protocol=https \
> +    file://run-ptest \

run-ptest is in SRC_URI but I dont see it anywere added in patch
series, perhaps it got missed in git add ?

> +"
> +SRC_URI[sha256sum] = "e05493a3b17517ef1748fbe610da11f10485faa7c416b9d33fd4a52d74894f8b"
> +SRCREV ?= "3268d8acf2c345f32a1c5f08ba25dc67f76cca81"
> +
> +inherit python_setuptools_build_meta ptest
> +
> +S = "${WORKDIR}/git"
> +
> +RDEPENDS:${PN}-ptest += " \
> +    ${PYTHON_PN}-pretend \
> +    ${PYTHON_PN}-pytest \
> +    ${PYTHON_PN}-unittest-automake-output \
> +"
> +
> +do_install_ptest() {
> +    install -d ${D}${PTEST_PATH}/tests
> +    cp -rf ${S}/tests ${D}${PTEST_PATH}/
> +}
> +
> +BBCLASSEXTEND = "native nativesdk"
> --
> 2.40.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#180763): https://lists.openembedded.org/g/openembedded-core/message/180763
> Mute This Topic: https://lists.openembedded.org/mt/98644392/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 2f83132aeb..bd95a13ff6 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -56,6 +56,7 @@  PTESTS_FAST = "\
     popt \
     python3-atomicwrites \
     python3-bcrypt \
+    python3-calver \
     python3-hypothesis \
     python3-jinja2 \
     python3-jsonpointer \
diff --git a/meta/recipes-devtools/python/python3-calver_2022.6.26.bb b/meta/recipes-devtools/python/python3-calver_2022.6.26.bb
new file mode 100644
index 0000000000..32b6cfbd42
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-calver_2022.6.26.bb
@@ -0,0 +1,28 @@ 
+SUMMARY = "Setuptools extension for CalVer package versions"
+HOMEPAGE = "https://github.com/di/calver"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = " \
+    git://github.com/di/calver;branch=master;protocol=https \
+    file://run-ptest \
+"
+SRC_URI[sha256sum] = "e05493a3b17517ef1748fbe610da11f10485faa7c416b9d33fd4a52d74894f8b"
+SRCREV ?= "3268d8acf2c345f32a1c5f08ba25dc67f76cca81"
+
+inherit python_setuptools_build_meta ptest
+
+S = "${WORKDIR}/git"
+
+RDEPENDS:${PN}-ptest += " \
+    ${PYTHON_PN}-pretend \
+    ${PYTHON_PN}-pytest \
+    ${PYTHON_PN}-unittest-automake-output \
+"
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    cp -rf ${S}/tests ${D}${PTEST_PATH}/
+}
+
+BBCLASSEXTEND = "native nativesdk"