summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/asciidoc')
-rw-r--r--meta/recipes-extended/asciidoc/asciidoc/detect-python-version.patch42
-rw-r--r--meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb5
2 files changed, 45 insertions, 2 deletions
diff --git a/meta/recipes-extended/asciidoc/asciidoc/detect-python-version.patch b/meta/recipes-extended/asciidoc/asciidoc/detect-python-version.patch
new file mode 100644
index 0000000000..14c1cd806e
--- /dev/null
+++ b/meta/recipes-extended/asciidoc/asciidoc/detect-python-version.patch
@@ -0,0 +1,42 @@
1From 44d2d6095246124c024230f89c1029794491839f Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
3Date: Fri, 30 Oct 2020 15:10:35 +0100
4Subject: [PATCH] Properly detect and compare Python version 3.10+ (#151)
5
6Upstream commit: https://github.com/asciidoc-py/asciidoc-py/commit/44d2d6095246124c024230f89c1029794491839f
7
8Slightly modified to cleanly apply to asciidoc 8.6.9:
9- VERSION and MIN_PYTHON_VERSION changed to reflect values in 8.6.9
10- line numbers corrected to eliminate offset warnings
11
12Upstream-Status: Backport
13Signed-off-by: Steve Sakoman <steve@sakoman.com>
14
15---
16 asciidoc.py | 6 +++---
17 1 file changed, 3 insertions(+), 3 deletions(-)
18
19diff --git a/asciidoc.py b/asciidoc.py
20index f960e7d8..42868c4b 100755
21--- a/asciidoc.py
22+++ b/asciidoc.py
23@@ -30,7 +30,7 @@
24 # Used by asciidocapi.py #
25 VERSION = '8.6.10' # See CHANGELOG file for version history.
26
27-MIN_PYTHON_VERSION = '3.4' # Require this version of Python or better.
28+MIN_PYTHON_VERSION = (3, 4) # Require this version of Python or better.
29
30 # ---------------------------------------------------------------------------
31 # Program constants.
32@@ -4704,8 +4704,8 @@ def init(self, cmd):
33 directory.
34 cmd is the asciidoc command or asciidoc.py path.
35 """
36- if float(sys.version[:3]) < float(MIN_PYTHON_VERSION):
37- message.stderr('FAILED: Python %s or better required' % MIN_PYTHON_VERSION)
38+ if sys.version_info[:2] < MIN_PYTHON_VERSION:
39+ message.stderr('FAILED: Python %d.%d or better required' % MIN_PYTHON_VERSION)
40 sys.exit(1)
41 if not os.path.exists(cmd):
42 message.stderr('FAILED: Missing asciidoc command: %s' % cmd)
diff --git a/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb b/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
index 751bf0f19f..325ff9aa15 100644
--- a/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
+++ b/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
@@ -8,8 +8,9 @@ LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ 8LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
9 file://COPYRIGHT;md5=029ad5428ba5efa20176b396222d4069" 9 file://COPYRIGHT;md5=029ad5428ba5efa20176b396222d4069"
10 10
11SRC_URI = "git://github.com/asciidoc/asciidoc-py3;protocol=https \ 11SRC_URI = "git://github.com/asciidoc/asciidoc-py;protocol=https;branch=main \
12 file://auto-catalogs.patch" 12 file://auto-catalogs.patch \
13 file://detect-python-version.patch"
13SRCREV = "618f6e6f6b558ed1e5f2588cd60a5a6b4f881ca0" 14SRCREV = "618f6e6f6b558ed1e5f2588cd60a5a6b4f881ca0"
14PV .= "+py3-git${SRCPV}" 15PV .= "+py3-git${SRCPV}"
15 16