Skip to contentSkip to conversation

python3-calver: Add recipe

PATCH Superseded Trevor Gamblin 2 participants 4 messages May 2, 2023 – May 5, 2023

v3 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 python3-calver: Add recipe

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.

v3 clarifies that the recipe now includes ptests, where v2 didn't make this clear and v1 didn't have them at all.

---
 .../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
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index 2f83132aeb..bd95a13ff6 100644
@@ -56,6 +56,7 @@ PTESTS_FAST = "\
     popt \
     python3-atomicwrites \
     python3-bcrypt \
+    python3-calver \
     python3-hypothesis \
     python3-jinja2 \
     python3-jsonpointer \
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +28 -0
new file mode 100644
index 0000000000..32b6cfbd42
@@ -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"
Signature · 1 line
2.40.0
#1 lore raw
Quoted 6 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Trevor Gamblin
Sent: den 2 maj 2023 19:45
To: [email protected]
Subject: [OE-core][PATCH v3] python3-calver: Add recipe

Quoted 7 lines

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.

v3 clarifies that the recipe now includes ptests, where v2 didn't make this clear and v1 didn't have them at all.

Comments related to the patch versions should go after the "---" below as they will otherwise become part of the commit message, where they typically do not make any sense.

Quoted 26 lines
---
 .../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
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index 2f83132aeb..bd95a13ff6 100644
@@ -56,6 +56,7 @@ PTESTS_FAST = "\
     popt \
     python3-atomicwrites \
     python3-bcrypt \
+    python3-calver \
     python3-hypothesis \
     python3-jinja2 \
     python3-jsonpointer \
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +0 -0
new file mode 100644
index 0000000000..32b6cfbd42

meta/recipes-devtools/python/python3-calver_2022.6.26.bb line 10

Quoted 10 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +10 -0
@@ -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"

This recipe uses Git, and thus should not need a SHA-256 checksum.

meta/recipes-devtools/python/python3-calver_2022.6.26.bb line 11

Quoted 1 line
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +1 -0
+SRCREV ?= "3268d8acf2c345f32a1c5f08ba25dc67f76cca81"

Change ?= to =.

Quoted 4 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +4 -0
+
+inherit python_setuptools_build_meta ptest
+
+S = "${WORKDIR}/git"

meta/recipes-devtools/python/python3-calver_2022.6.26.bb line 25

Quoted 10 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +10 -0
+
+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}/

Shell code in OE-Core is expected to be tab-indented.

Quoted 5 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +3 -1
+}
+
+BBCLASSEXTEND = "native nativesdk"
--

2.40.0

//Peter

#2 lore raw
Quoted 11 lines · Peter Kjellerstedt
Quoted 11 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Trevor Gamblin
Sent: den 2 maj 2023 19:45
To: [email protected]
Subject: [OE-core][PATCH v3] python3-calver: Add recipe

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.

Quoted 5 lines
Quoted 2 lines

v3 clarifies that the recipe now includes ptests, where v2 didn't make this clear and v1 didn't have them at all.

Comments related to the patch versions should go after the "---" below as they will otherwise become part of the commit message, where they typically do not make any sense.

Sorry, missed this earlier. I've resent with the revision notes moved.

-Trevor

Quoted 64 lines
Quoted 26 lines
---
  .../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

meta/conf/distro/include/ptest-packagelists.inc +1 -0
index 2f83132aeb..bd95a13ff6 100644
@@ -56,6 +56,7 @@ PTESTS_FAST = "\
      popt \
      python3-atomicwrites \
      python3-bcrypt \
+    python3-calver \
      python3-hypothesis \
      python3-jinja2 \
      python3-jsonpointer \
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +0 -0
new file mode 100644
index 0000000000..32b6cfbd42

meta/recipes-devtools/python/python3-calver_2022.6.26.bb line 10

Quoted 10 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +10 -0
@@ -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"

This recipe uses Git, and thus should not need a SHA-256 checksum.

meta/recipes-devtools/python/python3-calver_2022.6.26.bb line 11

Quoted 1 line
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +1 -0
+SRCREV ?= "3268d8acf2c345f32a1c5f08ba25dc67f76cca81"

Change ?= to =.

Quoted 4 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +4 -0
+
+inherit python_setuptools_build_meta ptest
+
+S = "${WORKDIR}/git"

meta/recipes-devtools/python/python3-calver_2022.6.26.bb line 25

Quoted 10 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +10 -0
+
+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}/

Shell code in OE-Core is expected to be tab-indented.

Quoted 5 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +3 -1
+}
+
+BBCLASSEXTEND = "native nativesdk"
--

2.40.0

//Peter

#3 lore raw
Quoted 18 lines

-----Original Message-----
From: Trevor Gamblin <[email protected]>
Sent: den 5 maj 2023 20:52
To: Peter Kjellerstedt <[email protected]>; [email protected]
Subject: Re: [OE-core][PATCH v3] python3-calver: Add recipe

Quoted 11 lines · Peter Kjellerstedt
Quoted 11 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Trevor Gamblin
Sent: den 2 maj 2023 19:45
To: [email protected]
Subject: [OE-core][PATCH v3] python3-calver: Add recipe

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.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

v3 clarifies that the recipe now includes ptests, where v2 didn't make this clear and v1 didn't have them at all.

Comments related to the patch versions should go after the "---" below as they will otherwise become part of the commit message, where they typically do not make any sense.

Sorry, missed this earlier. I've resent with the revision notes moved.

I also think you missed the comments below as they were not addressed in v5. ;)

Quoted 70 lines

-Trevor

Quoted 67 lines
Quoted 26 lines
---
  .../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

meta/conf/distro/include/ptest-packagelists.inc +1 -0
index 2f83132aeb..bd95a13ff6 100644
@@ -56,6 +56,7 @@ PTESTS_FAST = "\
      popt \
      python3-atomicwrites \
      python3-bcrypt \
+    python3-calver \
      python3-hypothesis \
      python3-jinja2 \
      python3-jsonpointer \
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +0 -0
new file mode 100644
index 0000000000..32b6cfbd42

meta/recipes-devtools/python/python3-calver_2022.6.26.bb line 10

Quoted 10 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +10 -0
@@ -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"

This recipe uses Git, and thus should not need a SHA-256 checksum.

meta/recipes-devtools/python/python3-calver_2022.6.26.bb line 11

Quoted 1 line
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +1 -0
+SRCREV ?= "3268d8acf2c345f32a1c5f08ba25dc67f76cca81"

Change ?= to =.

Quoted 4 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +4 -0
+
+inherit python_setuptools_build_meta ptest
+
+S = "${WORKDIR}/git"

meta/recipes-devtools/python/python3-calver_2022.6.26.bb line 25

Quoted 10 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +10 -0
+
+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}/

Shell code in OE-Core is expected to be tab-indented.

Quoted 5 lines
meta/recipes-devtools/python/python3-calver_2022.6.26.bb new file +3 -1
+}
+
+BBCLASSEXTEND = "native nativesdk"
--

2.40.0

//Peter

//Peter