summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/gammu
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2022-01-13 21:20:06 -0600
committerKhem Raj <raj.khem@gmail.com>2022-01-18 08:59:58 -0800
commit6d5426249728daef3a92d8c67c60d6b2100fba05 (patch)
tree84a1b1d75dbca959fe2f5178c1f7615b0a527d7c /meta-oe/recipes-connectivity/gammu
parent012d10408eb714a6febb91b0436a402d70be95ad (diff)
downloadmeta-openembedded-6d5426249728daef3a92d8c67c60d6b2100fba05.tar.gz
python3-gammu: add recipe for v3.2.4
The Python bindings for gammu have been moved into a separate package python-gammu. Send patch upstream to replace distutils.version.StrictVersion with packaging.version.parse and .Version Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Diffstat (limited to 'meta-oe/recipes-connectivity/gammu')
-rw-r--r--meta-oe/recipes-connectivity/gammu/python3-gammu/0001-setup.py-StrictVersion-packaging.version.patch49
-rw-r--r--meta-oe/recipes-connectivity/gammu/python3-gammu_3.2.4.bb21
2 files changed, 70 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/gammu/python3-gammu/0001-setup.py-StrictVersion-packaging.version.patch b/meta-oe/recipes-connectivity/gammu/python3-gammu/0001-setup.py-StrictVersion-packaging.version.patch
new file mode 100644
index 000000000..23fe4441d
--- /dev/null
+++ b/meta-oe/recipes-connectivity/gammu/python3-gammu/0001-setup.py-StrictVersion-packaging.version.patch
@@ -0,0 +1,49 @@
1From 96e8f0b2d13e890d9ffff8673f18dcc94290efb2 Mon Sep 17 00:00:00 2001
2From: Tim Orling <tim.orling@konsulko.com>
3Date: Thu, 13 Jan 2022 20:06:33 -0600
4Subject: [PATCH] setup.py: StrictVersion -> packaging.version.*
5
6distutils is deprecated in Python 3.10 and will be removed in Python
73.12 [1]
8
9The recommended replacement for distutils.version is to use
10packaging.version
11
12StrictVersion can be replaced by packaging.version.Version and helpers
13like packaging.version.parse()
14
15[1] https://www.python.org/dev/peps/pep-0632/
16[2] https://packaging.pypa.io/en/latest/version.html
17
18Upstream-Status: Submitted [https://github.com/gammu/python-gammu/pull/67]
19
20Signed-off-by: Tim Orling <tim.orling@konsulko.com>
21---
22 setup.py | 6 +++---
23 1 file changed, 3 insertions(+), 3 deletions(-)
24
25diff --git a/setup.py b/setup.py
26index a458181..bffb09d 100755
27--- a/setup.py
28+++ b/setup.py
29@@ -30,7 +30,7 @@ import os
30 import platform
31 import subprocess
32 import sys
33-from distutils.version import StrictVersion
34+from packaging.version import parse, Version
35
36 from setuptools import Extension, setup
37
38@@ -112,9 +112,9 @@ class GammuConfig:
39 with open(self.config_path(self.path)) as handle:
40 for line in handle:
41 if line.startswith("#define GAMMU_VERSION "):
42- version = line.split('"')[1]
43+ version = parse(line.split('"')[1])
44
45- if version is None or StrictVersion(version) < StrictVersion(GAMMU_REQUIRED):
46+ if version is None or version < parse(GAMMU_REQUIRED):
47 print("Too old Gammu version, please upgrade!")
48 sys.exit(100)
49
diff --git a/meta-oe/recipes-connectivity/gammu/python3-gammu_3.2.4.bb b/meta-oe/recipes-connectivity/gammu/python3-gammu_3.2.4.bb
new file mode 100644
index 000000000..1fdb76eeb
--- /dev/null
+++ b/meta-oe/recipes-connectivity/gammu/python3-gammu_3.2.4.bb
@@ -0,0 +1,21 @@
1SUMMARY = "Gammu bindings for Python"
2DESCRIPTION ="Python bindings for the Gammu library."
3HOMEPAGE = "https://wammu.eu/python-gammu/"
4BUGRACKER = "https://github.com/gammu/python-gammu/issues"
5LICENSE = "GPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7
8PYPI_PACKAGE = "python-gammu"
9
10inherit pypi setuptools3 pkgconfig
11
12SRC_URI += "file://0001-setup.py-StrictVersion-packaging.version.patch"
13SRC_URI[sha256sum] = "49fc70f01bc192c43ff3ec815e082df5261ea4c8d36a695e977734c4eb4df868"
14
15S = "${WORKDIR}/python-gammu-${PV}"
16
17DEPENDS += "gammu python3-packaging-native"
18
19RDEPENDS:${PN} += "python3-asyncio python3-core python3-threading"
20
21RRECOMMENDS:${PN} += "gammu"