summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-08-28 11:49:26 -0700
committerKhem Raj <raj.khem@gmail.com>2022-08-28 23:57:15 -0700
commitbb8b1640c93c1603b10fe2e91cb33b97291afc87 (patch)
treeddb5ffeb003170ab1ae7564925c8cdd5ecbff221
parent6dd82f3a04966c1cdf80ce76dfb7f5660449a6ad (diff)
downloadmeta-openembedded-bb8b1640c93c1603b10fe2e91cb33b97291afc87.tar.gz
python3-pyephem: Fix build with python3 and musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-python/recipes-extended/python-pyephem/python3-pyephem/0001-Don-t-set-tp_print-on-Python-3.patch44
-rw-r--r--meta-python/recipes-extended/python-pyephem/python3-pyephem_4.1.3.bb1
2 files changed, 45 insertions, 0 deletions
diff --git a/meta-python/recipes-extended/python-pyephem/python3-pyephem/0001-Don-t-set-tp_print-on-Python-3.patch b/meta-python/recipes-extended/python-pyephem/python3-pyephem/0001-Don-t-set-tp_print-on-Python-3.patch
new file mode 100644
index 000000000..a84d852fb
--- /dev/null
+++ b/meta-python/recipes-extended/python-pyephem/python3-pyephem/0001-Don-t-set-tp_print-on-Python-3.patch
@@ -0,0 +1,44 @@
1From 866f7560034e8b7a604432611b3cb2c92e76def9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 28 Aug 2022 11:03:39 -0700
4Subject: [PATCH] Don't set tp_print on Python 3.
5
6In 3.8 it produces a compilation warning, in earlier versions it is ignored.
7
8Upstream-Status: Submitted [https://github.com/brandon-rhodes/pyephem/pull/245]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 extensions/_libastro.c | 8 ++++++++
12 1 file changed, 8 insertions(+)
13
14diff --git a/extensions/_libastro.c b/extensions/_libastro.c
15index ce07d93..c9ef1e6 100644
16--- a/extensions/_libastro.c
17+++ b/extensions/_libastro.c
18@@ -372,7 +372,11 @@ static PyTypeObject AngleType = {
19 sizeof(AngleObject),
20 0,
21 0, /* tp_dealloc */
22+#if PY_MAJOR_VERSION < 3
23 Angle_print, /* tp_print */
24+#else
25+ 0, /* reserved in 3.x */
26+#endif
27 0, /* tp_getattr */
28 0, /* tp_setattr */
29 0, /* tp_compare */
30@@ -669,7 +673,11 @@ static PyTypeObject DateType = {
31 sizeof(PyFloatObject),
32 0,
33 0, /* tp_dealloc */
34+#if PY_MAJOR_VERSION < 3
35 Date_print, /* tp_print */
36+#else
37+ 0, /* tp_print slot is reserved and unused in Python 3 */
38+#endif
39 0, /* tp_getattr */
40 0, /* tp_setattr */
41 0, /* tp_compare */
42--
432.37.2
44
diff --git a/meta-python/recipes-extended/python-pyephem/python3-pyephem_4.1.3.bb b/meta-python/recipes-extended/python-pyephem/python3-pyephem_4.1.3.bb
index 29697bc25..8c4f0eb40 100644
--- a/meta-python/recipes-extended/python-pyephem/python3-pyephem_4.1.3.bb
+++ b/meta-python/recipes-extended/python-pyephem/python3-pyephem_4.1.3.bb
@@ -4,6 +4,7 @@ HOMEPAGE = "http://rhodesmill.org/pyephem/"
4LICENSE = "MIT" 4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=9c930b395b435b00bb13ec83b0c99f40" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=9c930b395b435b00bb13ec83b0c99f40"
6 6
7SRC_URI += "file://0001-Don-t-set-tp_print-on-Python-3.patch"
7SRC_URI[sha256sum] = "7fa18685981ba528edd504052a9d5212a09aa5bf15c11a734edc6a86e8a8b56a" 8SRC_URI[sha256sum] = "7fa18685981ba528edd504052a9d5212a09aa5bf15c11a734edc6a86e8a8b56a"
8 9
9PYPI_PACKAGE = "ephem" 10PYPI_PACKAGE = "ephem"