#4 Replace downstream patch with backported upstream commit
Merged a year ago by music. Opened a year ago by music.
rpms/ music/python-llvmlite patches-etc  into  rawhide

@@ -1,27 +0,0 @@ 

- From 6e526cacbd163f10db5cda62e10744f31d2cb5ad Mon Sep 17 00:00:00 2001

- From: "Benjamin A. Beasley" <code@musicinmybrain.net>

- 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

- 

@@ -0,0 +1,58 @@ 

+ From 4ad14e2911329832c3fa9025a2fadc921f5bedd8 Mon Sep 17 00:00:00 2001

+ From: Andre Masella <andre@masella.name>

+ 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

+ 

file modified
+10 -9
@@ -33,21 +33,22 @@ 

  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

+ 

  # 0.39.1 only supports llvm11

  BuildRequires:  llvm11-devel

  BuildRequires:  gcc-c++
@@ -119,7 +120,7 @@ 

  %pyproject_wheel

  

  %if %{with doc_pdf}

- %make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}'

+ %make_build -C docs latex SPHINXOPTS='-j%{?_smp_build_ncpus}'

  %make_build -C docs/_build/latex LATEXMKOPTS='-quiet'

  %endif

  
@@ -129,7 +130,7 @@ 

  

  %check

  %if %{with tests}

- LD_LIBRARY_PATH="%{buildroot}%{python3_sitearch}/llvmlite/binding/" PYTHONPATH="$PYTHONPATH:%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}" %{python3} runtests.py

+ PYTHONPATH='%{buildroot}%{python3_sitearch}' %{python3} runtests.py

  %endif

  

  %files -n python3-llvmlite -f %{pyproject_files}

  • Replace downstream patch with backported upstream commit
  • Minor spec-file housekeeping

LGTM, please proceed with builds for all appropriate Fedora releases etc :thumbsup:

Pull-Request has been merged by music

a year ago