mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 20:07:25 +00:00
python3-cson: Make PEP440 compatible version scheme
- Update to latest tip of trunk - Fix build with latest setuptools Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
|||||||
|
From 0d0ffab004306b1379f247016200ade381d1d181 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Wed, 8 Feb 2023 23:03:47 -0800
|
||||||
|
Subject: [PATCH] setup.py: Do not poke at git describe to find version
|
||||||
|
|
||||||
|
OE uses git snapshot and git describe --tags will emit a string which is
|
||||||
|
not PEP440 compliant version scheme. setuptools 67+ is strict about it
|
||||||
|
and fails to build. Therefore inject a static version.py from OE
|
||||||
|
environment and use that for version number based on PV
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
setup.py | 10 ++--------
|
||||||
|
1 file changed, 2 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index a77138f..df675cd 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -28,14 +28,8 @@ def main():
|
||||||
|
# Also, when git is not available (PyPi package), use stored version.py.
|
||||||
|
version_py = os.path.join(os.path.dirname(__file__), 'version.py')
|
||||||
|
|
||||||
|
- try:
|
||||||
|
- if sys.version_info < (2, 7) or (3,) <= sys.version_info < (3, 2):
|
||||||
|
- version_git = subprocess.Popen(['ls', '-l'], stdout=subprocess.PIPE).communicate()[0]
|
||||||
|
- else:
|
||||||
|
- version_git = subprocess.check_output(["git", "describe", "--tags"]).rstrip()
|
||||||
|
- except:
|
||||||
|
- with open(version_py, 'r') as fh:
|
||||||
|
- version_git = open(version_py).read().strip().split('=')[-1].replace('"','')
|
||||||
|
+ with open(version_py, 'r') as fh:
|
||||||
|
+ version_git = open(version_py).read().strip().split('=')[-1].replace('"','')
|
||||||
|
|
||||||
|
version_msg = "# Do not edit this file, pipeline versioning is governed by git tags"
|
||||||
|
with open(version_py, 'w') as fh:
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
||||||
@@ -7,8 +7,10 @@ LICENSE = "MIT"
|
|||||||
SECTION = "devel/python"
|
SECTION = "devel/python"
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=7709d2635e63ab96973055a23c2a4cac"
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=7709d2635e63ab96973055a23c2a4cac"
|
||||||
|
|
||||||
SRCREV = "f3f2898c44bb16b951d3e9f2fbf6d1c4158edda2"
|
PV = "1.0.9+1.0.10"
|
||||||
SRC_URI = "git://github.com/gt3389b/python-cson.git;branch=master;protocol=https"
|
SRCREV = "69090778bccc5ed124342ba288597fbb2bfa9f39"
|
||||||
|
SRC_URI = "git://github.com/gt3389b/python-cson.git;branch=master;protocol=https \
|
||||||
|
file://0001-setup.py-Do-not-poke-at-git-describe-to-find-version.patch"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
@@ -19,5 +21,9 @@ inherit setuptools3
|
|||||||
|
|
||||||
PIP_INSTALL_PACKAGE = "python_cson"
|
PIP_INSTALL_PACKAGE = "python_cson"
|
||||||
|
|
||||||
|
do_configure:prepend() {
|
||||||
|
echo "__version__=${PV}" > ${S}/version.py
|
||||||
|
}
|
||||||
|
|
||||||
BBCLASSEXTEND = "native"
|
BBCLASSEXTEND = "native"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user