Compare commits

..

10 Commits
rawhide ... f37

Author SHA1 Message Date
Benjamin A. Beasley
046fe4d313 Don’t assume %_smp_mflags is -j%_smp_build_ncpus 2023-04-26 14:03:26 -04:00
Benjamin A. Beasley
f378855713 Simplify test-suite invocation 2023-04-26 14:03:24 -04:00
Benjamin A. Beasley
ab51b48ccc Drop unnecessary manual BR on pyproject-rpm-macros 2023-04-26 14:03:23 -04:00
Benjamin A. Beasley
c092f2dc28 Replace a downstream patch with a backported upstream commit 2023-04-26 14:03:22 -04:00
Benjamin A. Beasley
d588e577f8 Add public-domain text link in license breakdown 2023-04-26 14:03:20 -04:00
Benjamin A. Beasley
2705c84861 Patch out max. Python version check entirely 2023-03-10 10:02:25 -05:00
Benjamin A. Beasley
88e62744b1 Allow Python 3.12 (downstream-only); close RHBZ#2176128 2023-03-10 10:02:25 -05:00
Benjamin A. Beasley
44b63719ef Update to 0.39.1 2023-03-10 10:02:25 -05:00
Benjamin A. Beasley
cdfca1029a Convert to SPDX 2023-03-10 10:02:25 -05:00
Benjamin A. Beasley
9ebe444dd0 Build Sphinx docs as PDF instead of HTML
Avoid issues with precompiled and bundled JavaScript, CSS, fonts, etc.
2023-03-10 10:02:25 -05:00
4 changed files with 107 additions and 22 deletions

4
.gitignore vendored
View File

@ -1,6 +1,2 @@
/llvmlite-0.37.0.tar.gz
/llvmlite-0.39.1.tar.gz
/llvmlite-0.40.0.tar.gz
/llvmlite-0.40.1.tar.gz
/llvmlite-0.41.0.tar.gz
/llvmlite-0.41.1.tar.gz

View 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

View File

@ -1,15 +1,19 @@
%bcond tests 1
%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 doc_pdf 1
%bcond_without doc_pdf
%global forgeurl https://github.com/numba/llvmlite
Name: python-llvmlite
Version: 0.41.1
Version: 0.39.1
Release: %{autorelease}
Summary: Lightweight LLVM Python binding for writing JIT compilers
%forgemeta
# 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
@ -27,24 +31,51 @@ Summary: Lightweight LLVM Python binding for writing JIT compilers
License: BSD-2-Clause AND LicenseRef-Fedora-Public-Domain
URL: http://llvmlite.pydata.org/
%global forgeurl https://github.com/numba/llvmlite
Source: %{forgeurl}/archive/v%{version}/llvmlite-%{version}.tar.gz
Source0: %{forgesource}
# Backport upstream commit:
# Remove maximum Python version limit
#
# 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: python3-devel
# 0.41.0 only supports llvm14
BuildRequires: llvm14-devel
# 0.39.1 only supports llvm11
BuildRequires: llvm11-devel
BuildRequires: gcc-c++
%global _description %{expand:
llvmlite is a project originally tailored for Numbas needs, using the
following approach:
llvmlite provides a Python binding to LLVM for use in Numba.
Numba previously relied on llvmpy. While llvmpy exposed large parts of the
LLVM C++ API for direct calls into the LLVM library, llvmlite takes an entirely
different approach. Llvmlite starts from the needs of a JIT compiler and splits
them into two decoupled tasks:
- Construction of a Module, function by function, Instruction by instruction.
- Compilation and optimization of the module into machine code.
The construction of an LLVM module does not call the LLVM C++ API. Rather, it
constructs the LLVM intermediate representation (IR) in pure Python. This is
the role of the IR layer.
The compilation of an LLVM module takes the IR in textual form and feeds it
into LLVM's parsing API. It then returns a thin wrapper around LLVM's C++
module object. This is the role of the binding layer.
Once parsed, the module's source code cannot be modified, which loses the
flexibility of the direct mapping of C++ APIs into Python that was provided by
llvmpy but saves a great deal of maintenance.}
A small C wrapper around the parts of the LLVM C++ API we need that are not
already exposed by the LLVM C API.
A ctypes Python wrapper around the C API.
A pure Python implementation of the subset of the LLVM IR builder that we
need for Numba.}
%description %_description
@ -69,7 +100,7 @@ BuildRequires: python3dist(sphinx-rtd-theme)
Documentation for %{name}.
%prep
%autosetup -n llvmlite-%{version} -p1
%forgeautosetup -p1
# increase verbosity of tests to 2
sed -i 's/\(def run_tests.*verbosity=\)1/\12/' llvmlite/tests/__init__.py
@ -85,7 +116,7 @@ echo 'intersphinx_mapping.clear()' >> docs/source/conf.py
%pyproject_buildrequires
%build
export LLVM_CONFIG="%{_libdir}/llvm14/bin/llvm-config"
export LLVM_CONFIG="%{_libdir}/llvm11/bin/llvm-config"
%pyproject_wheel
%if %{with doc_pdf}
@ -99,7 +130,7 @@ export LLVM_CONFIG="%{_libdir}/llvm14/bin/llvm-config"
%check
%if %{with tests}
%{py3_test_envvars} %{python3} runtests.py
PYTHONPATH='%{buildroot}%{python3_sitearch}' %{python3} runtests.py
%endif
%files -n python3-llvmlite -f %{pyproject_files}

View File

@ -1 +1 @@
SHA512 (llvmlite-0.41.1.tar.gz) = 97ba6c97837ee2f4bd29d97fa3992dc2d316cac8aa8aee5dd653fa5b4261987613c83997a4d94d10eb5009c6976e202fd13ab37208b5fc1f4a6e6288d608b901
SHA512 (llvmlite-0.39.1.tar.gz) = 16b341300e4034aff4ce9553fec6b5923b9f4cb261c1ec0ee2cef6d87addcbebe8f4805dbc2fb30f357800fa029c3b6fc8ed62a5fdaad7c262e723c3b9c4ad32