Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
046fe4d313 | ||
|
f378855713 | ||
|
ab51b48ccc | ||
|
c092f2dc28 | ||
|
d588e577f8 | ||
|
2705c84861 | ||
|
88e62744b1 | ||
|
44b63719ef | ||
|
cdfca1029a | ||
|
9ebe444dd0 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/llvmlite-0.37.0.tar.gz
|
/llvmlite-0.37.0.tar.gz
|
||||||
|
/llvmlite-0.39.1.tar.gz
|
||||||
|
58
0001-Remove-maximum-Python-version-limit.patch
Normal file
58
0001-Remove-maximum-Python-version-limit.patch
Normal file
@ -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
|
||||||
|
|
170
769.patch
170
769.patch
@ -1,170 +0,0 @@
|
|||||||
From 34a85c218423b959b66a8aa74986423d280bcba6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Valentin Haenel <vhaenel@anaconda.com>
|
|
||||||
Date: Tue, 31 Aug 2021 15:24:24 +0200
|
|
||||||
Subject: [PATCH 1/5] bump supported Pyton version
|
|
||||||
|
|
||||||
As title
|
|
||||||
---
|
|
||||||
setup.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index 263fb6c6..75a6d42c 100644
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -33,7 +33,7 @@
|
|
||||||
|
|
||||||
|
|
||||||
min_python_version = "3.7"
|
|
||||||
-max_python_version = "3.10" # exclusive
|
|
||||||
+max_python_version = "3.11" # exclusive
|
|
||||||
|
|
||||||
|
|
||||||
def _guard_py_ver():
|
|
||||||
|
|
||||||
From 87c86ae5e9cc9005d2a7ef64cdf8bcd05e3e4067 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Valentin Haenel <vhaenel@anaconda.com>
|
|
||||||
Date: Tue, 31 Aug 2021 15:24:35 +0200
|
|
||||||
Subject: [PATCH 2/5] update trove classifiers
|
|
||||||
|
|
||||||
As title
|
|
||||||
---
|
|
||||||
setup.py | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index 75a6d42c..b390db91 100644
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -212,6 +212,7 @@ def finalize_options(self):
|
|
||||||
"Programming Language :: Python :: 3.7",
|
|
||||||
"Programming Language :: Python :: 3.8",
|
|
||||||
"Programming Language :: Python :: 3.9",
|
|
||||||
+ "Programming Language :: Python :: 3.10",
|
|
||||||
"Topic :: Software Development :: Code Generators",
|
|
||||||
"Topic :: Software Development :: Compilers",
|
|
||||||
],
|
|
||||||
|
|
||||||
From 334c000d5a6d19133e3ce3b7a2c847cd682f4ebf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Valentin Haenel <vhaenel@anaconda.com>
|
|
||||||
Date: Thu, 2 Sep 2021 14:23:39 +0200
|
|
||||||
Subject: [PATCH 3/5] print the OSError instead of swallowing it
|
|
||||||
|
|
||||||
As title
|
|
||||||
---
|
|
||||||
llvmlite/binding/ffi.py | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/llvmlite/binding/ffi.py b/llvmlite/binding/ffi.py
|
|
||||||
index 94df3ae7..66254f99 100644
|
|
||||||
--- a/llvmlite/binding/ffi.py
|
|
||||||
+++ b/llvmlite/binding/ffi.py
|
|
||||||
@@ -183,7 +183,8 @@ def __call__(self, *args, **kwargs):
|
|
||||||
for _lib_path in _lib_paths:
|
|
||||||
try:
|
|
||||||
lib = ctypes.CDLL(_lib_path)
|
|
||||||
- except OSError:
|
|
||||||
+ except OSError as e:
|
|
||||||
+ print(e)
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
|
|
||||||
From 8cc3c39515ac03dc77d3b8ea4370513cec0e4308 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Valentin Haenel <vhaenel@anaconda.com>
|
|
||||||
Date: Wed, 13 Oct 2021 11:02:51 +0200
|
|
||||||
Subject: [PATCH 4/5] buffer all errors, and echo them at the end
|
|
||||||
|
|
||||||
This will avoid printing errors unnecessarily.
|
|
||||||
---
|
|
||||||
llvmlite/binding/ffi.py | 7 +++++--
|
|
||||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/llvmlite/binding/ffi.py b/llvmlite/binding/ffi.py
|
|
||||||
index 66254f99..556c7c8f 100644
|
|
||||||
--- a/llvmlite/binding/ffi.py
|
|
||||||
+++ b/llvmlite/binding/ffi.py
|
|
||||||
@@ -180,16 +180,19 @@ def __call__(self, *args, **kwargs):
|
|
||||||
|
|
||||||
|
|
||||||
# Try to load from all of the different paths
|
|
||||||
+errors = []
|
|
||||||
for _lib_path in _lib_paths:
|
|
||||||
try:
|
|
||||||
lib = ctypes.CDLL(_lib_path)
|
|
||||||
except OSError as e:
|
|
||||||
- print(e)
|
|
||||||
+ errors.append(e)
|
|
||||||
continue
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
- raise OSError("Could not load shared object file: {}".format(_lib_name))
|
|
||||||
+ msg = ("Could not load shared object file: {}\n".format(_lib_name) +
|
|
||||||
+ "Errors were: {}".format(errors))
|
|
||||||
+ raise OSError(msg)
|
|
||||||
|
|
||||||
|
|
||||||
lib = _lib_wrapper(lib)
|
|
||||||
|
|
||||||
From 408c7ba935b43e052410a2bf444db9b8a56a4723 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Valentin Haenel <vhaenel@anaconda.com>
|
|
||||||
Date: Wed, 13 Oct 2021 18:52:53 +0200
|
|
||||||
Subject: [PATCH 5/5] setup using Python 3.10 on public CI too
|
|
||||||
|
|
||||||
As title
|
|
||||||
---
|
|
||||||
azure-pipelines.yml | 11 +++++++++++
|
|
||||||
buildscripts/azure/azure-windows.yml | 3 +++
|
|
||||||
2 files changed, 14 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
|
|
||||||
index d1d5efd3..a99d90d4 100644
|
|
||||||
--- a/azure-pipelines.yml
|
|
||||||
+++ b/azure-pipelines.yml
|
|
||||||
@@ -14,6 +14,9 @@ jobs:
|
|
||||||
py39:
|
|
||||||
PYTHON: '3.9'
|
|
||||||
CONDA_ENV: cienv
|
|
||||||
+ py310:
|
|
||||||
+ PYTHON: '3.10'
|
|
||||||
+ CONDA_ENV: cienv
|
|
||||||
|
|
||||||
- template: buildscripts/azure/azure-linux-macos.yml
|
|
||||||
parameters:
|
|
||||||
@@ -31,6 +34,10 @@ jobs:
|
|
||||||
PYTHON: '3.9'
|
|
||||||
CONDA_ENV: cienv
|
|
||||||
RUN_FLAKE8: yes
|
|
||||||
+ py310:
|
|
||||||
+ PYTHON: '3.10'
|
|
||||||
+ CONDA_ENV: cienv
|
|
||||||
+ RUN_FLAKE8: yes
|
|
||||||
# temporarily disabled
|
|
||||||
# pypy:
|
|
||||||
# PYTHON: pypy
|
|
||||||
@@ -47,6 +54,10 @@ jobs:
|
|
||||||
PYTHON: '3.9'
|
|
||||||
CONDA_ENV: cienv
|
|
||||||
WHEEL: 'yes'
|
|
||||||
+ py310_wheel:
|
|
||||||
+ PYTHON: '3.10'
|
|
||||||
+ CONDA_ENV: cienv
|
|
||||||
+ WHEEL: 'yes'
|
|
||||||
|
|
||||||
- template: buildscripts/azure/azure-windows.yml
|
|
||||||
parameters:
|
|
||||||
diff --git a/buildscripts/azure/azure-windows.yml b/buildscripts/azure/azure-windows.yml
|
|
||||||
index 1dd02611..e51f39fc 100644
|
|
||||||
--- a/buildscripts/azure/azure-windows.yml
|
|
||||||
+++ b/buildscripts/azure/azure-windows.yml
|
|
||||||
@@ -12,6 +12,9 @@ jobs:
|
|
||||||
py39:
|
|
||||||
PYTHON: '3.9'
|
|
||||||
CONDA_ENV: cienv
|
|
||||||
+ py310:
|
|
||||||
+ PYTHON: '3.10'
|
|
||||||
+ CONDA_ENV: cienv
|
|
||||||
|
|
||||||
|
|
||||||
steps:
|
|
@ -1,26 +1,55 @@
|
|||||||
%bcond_without tests
|
%bcond_without tests
|
||||||
|
# Sphinx-generated HTML documentation is not suitable for packaging; see
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion.
|
||||||
|
#
|
||||||
|
# We can generate PDF documentation as a substitute.
|
||||||
|
%bcond_without doc_pdf
|
||||||
|
|
||||||
%global forgeurl https://github.com/numba/llvmlite
|
%global forgeurl https://github.com/numba/llvmlite
|
||||||
|
|
||||||
Name: python-llvmlite
|
Name: python-llvmlite
|
||||||
Version: 0.37.0
|
Version: 0.39.1
|
||||||
Release: %{autorelease}
|
Release: %{autorelease}
|
||||||
Summary: Lightweight LLVM Python binding for writing JIT compilers
|
Summary: Lightweight LLVM Python binding for writing JIT compilers
|
||||||
|
|
||||||
%forgemeta
|
%forgemeta
|
||||||
|
|
||||||
License: BSD
|
# The entire source is BSD-2-Clause, except:
|
||||||
|
# - The bundled versioneer.py, and the _version.py it generates (which is
|
||||||
|
# packaged) is LicenseRef-Fedora-Public-Domain. In later versions of
|
||||||
|
# versioneer, this becomes CC0-1.0 and then Unlicense.
|
||||||
|
# Public-domain text added to fedora-license-data in commit
|
||||||
|
# 830d88d4d89ee5596839de5b2c1f48426488841f:
|
||||||
|
# https://gitlab.com/fedora/legal/fedora-license-data/-/merge_requests/210
|
||||||
|
# Additionally, the following does not affect the license of the binary RPMs:
|
||||||
|
# - conda-recipes/appveyor/run_with_env.cmd is CC0-1.0; for distribution in
|
||||||
|
# the source RPM, it is covered by “Existing uses of CC0-1.0 on code files
|
||||||
|
# in Fedora packages prior to 2022-08-01, and subsequent upstream versions
|
||||||
|
# of those files in those packages, continue to be allowed. We encourage
|
||||||
|
# Fedora package maintainers to ask upstreams to relicense such files.”
|
||||||
|
# https://gitlab.com/fedora/legal/fedora-license-data/-/issues/91#note_1151947383
|
||||||
|
License: BSD-2-Clause AND LicenseRef-Fedora-Public-Domain
|
||||||
|
|
||||||
URL: http://llvmlite.pydata.org/
|
URL: http://llvmlite.pydata.org/
|
||||||
Source0: %{forgesource}
|
Source0: %{forgesource}
|
||||||
|
|
||||||
# Python 3.10
|
# Backport upstream commit:
|
||||||
# https://github.com/numba/llvmlite/pull/769
|
# Remove maximum Python version limit
|
||||||
# See also: https://github.com/numba/llvmlite/issues/740#issuecomment-937830985
|
#
|
||||||
Patch0: https://github.com/numba/llvmlite/pull/769.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
|
||||||
|
# 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
|
BuildRequires: python3-devel
|
||||||
# 0.37.0 only supports llvm11
|
|
||||||
|
# 0.39.1 only supports llvm11
|
||||||
BuildRequires: llvm11-devel
|
BuildRequires: llvm11-devel
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
|
||||||
@ -58,8 +87,14 @@ Summary: %{summary}
|
|||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
BuildRequires: %{py3_dist sphinx}
|
%if %{with doc_pdf}
|
||||||
BuildRequires: %{py3_dist sphinx-rtd-theme}
|
BuildRequires: make
|
||||||
|
BuildRequires: python3dist(sphinx)
|
||||||
|
BuildRequires: python3-sphinx-latex
|
||||||
|
BuildRequires: latexmk
|
||||||
|
# The HTML theme is imported in conf.py even when not generating HTML
|
||||||
|
BuildRequires: python3dist(sphinx-rtd-theme)
|
||||||
|
%endif
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
Documentation for %{name}.
|
Documentation for %{name}.
|
||||||
@ -67,10 +102,6 @@ Documentation for %{name}.
|
|||||||
%prep
|
%prep
|
||||||
%forgeautosetup -p1
|
%forgeautosetup -p1
|
||||||
|
|
||||||
# seems to be fine with 3.11 but we need to loosen the guard
|
|
||||||
# see also: “python 3.10 support” https://github.com/numba/llvmlite/issues/740
|
|
||||||
sed -i 's/max_python_version =.*/max_python_version = "3.12"/' setup.py
|
|
||||||
|
|
||||||
# increase verbosity of tests to 2
|
# increase verbosity of tests to 2
|
||||||
sed -i 's/\(def run_tests.*verbosity=\)1/\12/' llvmlite/tests/__init__.py
|
sed -i 's/\(def run_tests.*verbosity=\)1/\12/' llvmlite/tests/__init__.py
|
||||||
|
|
||||||
@ -78,6 +109,9 @@ sed -i 's/\(def run_tests.*verbosity=\)1/\12/' llvmlite/tests/__init__.py
|
|||||||
# Can use something similar to correct/remove /usr/bin/python shebangs also
|
# Can use something similar to correct/remove /usr/bin/python shebangs also
|
||||||
# find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'
|
# find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'
|
||||||
|
|
||||||
|
# No network access
|
||||||
|
echo 'intersphinx_mapping.clear()' >> docs/source/conf.py
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%pyproject_buildrequires
|
%pyproject_buildrequires
|
||||||
|
|
||||||
@ -85,8 +119,10 @@ sed -i 's/\(def run_tests.*verbosity=\)1/\12/' llvmlite/tests/__init__.py
|
|||||||
export LLVM_CONFIG="%{_libdir}/llvm11/bin/llvm-config"
|
export LLVM_CONFIG="%{_libdir}/llvm11/bin/llvm-config"
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
|
||||||
make -C docs SPHINXBUILD=sphinx-build-3 html
|
%if %{with doc_pdf}
|
||||||
rm -rf docs/_build/html/{.doctrees,.buildinfo,_static/EMPTY} -vf
|
%make_build -C docs latex SPHINXOPTS='-j%{?_smp_build_ncpus}'
|
||||||
|
%make_build -C docs/_build/latex LATEXMKOPTS='-quiet'
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
@ -94,7 +130,7 @@ rm -rf docs/_build/html/{.doctrees,.buildinfo,_static/EMPTY} -vf
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with tests}
|
%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
|
%endif
|
||||||
|
|
||||||
%files -n python3-llvmlite -f %{pyproject_files}
|
%files -n python3-llvmlite -f %{pyproject_files}
|
||||||
@ -102,7 +138,10 @@ LD_LIBRARY_PATH="%{buildroot}%{python3_sitearch}/llvmlite/binding/" PYTHONPATH="
|
|||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc docs/_build/html examples/
|
%doc examples/
|
||||||
|
%if %{with doc_pdf}
|
||||||
|
%doc docs/_build/latex/llvmlite.pdf
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
%autochangelog
|
%autochangelog
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (llvmlite-0.37.0.tar.gz) = 665f486fd38c9cc4ee91b15fc75f33451ada6391fc9f1b371091ece844693e0cd8e23766400bf76d9879e8f10f53f4e21f8bb19f3ff1e01c4a95ce9004b0884a
|
SHA512 (llvmlite-0.39.1.tar.gz) = 16b341300e4034aff4ce9553fec6b5923b9f4cb261c1ec0ee2cef6d87addcbebe8f4805dbc2fb30f357800fa029c3b6fc8ed62a5fdaad7c262e723c3b9c4ad32
|
||||||
|
Loading…
Reference in New Issue
Block a user