diff --git a/0001-Patch-out-maximum-Python-version-check.patch b/0001-Patch-out-maximum-Python-version-check.patch deleted file mode 100644 index bd5f1fe..0000000 --- a/0001-Patch-out-maximum-Python-version-check.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 6e526cacbd163f10db5cda62e10744f31d2cb5ad Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Tue, 7 Mar 2023 10:47:38 -0500 -Subject: [PATCH] Patch out maximum Python version check - -Fedora must build this package with the current version of Python, -whether upstream is ready or not. ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 02b1604..b08653d 100644 ---- a/setup.py -+++ b/setup.py -@@ -46,7 +46,7 @@ def _guard_py_ver(): - max_py = parse(max_python_version) - cur_py = parse('.'.join(map(str, sys.version_info[:3]))) - -- if not min_py <= cur_py < max_py: -+ if not min_py <= cur_py: - msg = ('Cannot install on Python version {}; only versions >={},<{} ' - 'are supported.') - raise RuntimeError(msg.format(cur_py, min_py, max_py)) --- -2.39.2 - diff --git a/0001-Remove-maximum-Python-version-limit.patch b/0001-Remove-maximum-Python-version-limit.patch new file mode 100644 index 0000000..ff18e9f --- /dev/null +++ b/0001-Remove-maximum-Python-version-limit.patch @@ -0,0 +1,58 @@ +From 4ad14e2911329832c3fa9025a2fadc921f5bedd8 Mon Sep 17 00:00:00 2001 +From: Andre Masella +Date: Tue, 14 Mar 2023 14:55:40 -0400 +Subject: [PATCH] Remove maximum Python version limit + +Allow any new version of Python for llvmlite. Closes #912 +--- + azure-pipelines.yml | 4 ++++ + setup.py | 8 +++----- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/azure-pipelines.yml b/azure-pipelines.yml +index 0b14f97..759187a 100644 +--- a/azure-pipelines.yml ++++ b/azure-pipelines.yml +@@ -38,6 +38,10 @@ jobs: + PYTHON: '3.10' + CONDA_ENV: cienv + RUN_FLAKE8: yes ++ py311: ++ PYTHON: '3.11' ++ CONDA_ENV: cienv ++ RUN_FLAKE8: yes + RUN_CLANG_FORMAT: yes + # temporarily disabled + # pypy: +diff --git a/setup.py b/setup.py +index 02b1604..2a546e6 100644 +--- a/setup.py ++++ b/setup.py +@@ -33,7 +33,6 @@ except ImportError: + + + min_python_version = "3.7" +-max_python_version = "3.11" # exclusive + + + def _guard_py_ver(): +@@ -43,13 +42,12 @@ def _guard_py_ver(): + parse = _version_module.parse + + min_py = parse(min_python_version) +- max_py = parse(max_python_version) + cur_py = parse('.'.join(map(str, sys.version_info[:3]))) + +- if not min_py <= cur_py < max_py: +- msg = ('Cannot install on Python version {}; only versions >={},<{} ' ++ if not min_py <= cur_py: ++ msg = ('Cannot install on Python version {}; only versions >={} ' + 'are supported.') +- raise RuntimeError(msg.format(cur_py, min_py, max_py)) ++ raise RuntimeError(msg.format(cur_py, min_py)) + + + _guard_py_ver() +-- +2.39.2 + diff --git a/python-llvmlite.spec b/python-llvmlite.spec index d5426d4..52be545 100644 --- a/python-llvmlite.spec +++ b/python-llvmlite.spec @@ -33,18 +33,19 @@ License: BSD-2-Clause AND LicenseRef-Fedora-Public-Domain URL: http://llvmlite.pydata.org/ Source0: %{forgesource} -# Patch out maximum Python version check +# Backport upstream commit: +# Remove maximum Python version limit # -# Fedora must build this package with the current version of Python, -# whether upstream is ready or not. -# -# Feature request / discussion issue for doing this without a patch: +# Allow any new version of Python for llvmlite. Closes #912 +# https://github.com/numba/llvmlite/commit/9ea5668fff6d0e4099d7907aafae40df5b4c8655 +# Fixes: # “Escape hatch” for maximum Python version check # https://github.com/numba/llvmlite/issues/912 # See also: # python 3.10 support # https://github.com/numba/llvmlite/issues/740 -Patch: 0001-Patch-out-maximum-Python-version-check.patch +# To be released in 0.40.0 and 0.41.0. Cherry-picked onto tag v0.39.1: +Patch: 0001-Remove-maximum-Python-version-limit.patch BuildRequires: pyproject-rpm-macros BuildRequires: python3-devel