Skip to content

Commit 559c814

Browse files
committed
Supports llvmlite 0.45.0
1 parent 15059e5 commit 559c814

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

docs/source/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.5.1
4+
- Support llvmlite 0.45.0
5+
36
## 0.5.0
47
- Overhaul of the nonlinear programming interface and now PyOptInterface can solve nonlinear programming problems with COPT, Gurobi and IPOPT.
58
- Use `model.add_linear_constraint(x+y, (1.0, 2.0))` to add two-sided linear constraints

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
44

55
[project]
66
name = "pyoptinterface"
7-
version = "0.5.0"
7+
version = "0.5.1"
88
description = "Python interface to multiple optimization solvers"
99
readme = "README.md"
1010
requires-python = ">=3.9"

src/pyoptinterface/_src/jit_llvm.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
from llvmlite import ir, binding
2-
import atexit
32

43
from typing import List
54

65
# Initialize LLVM
7-
binding.initialize()
6+
try:
7+
# llvmlite older than 0.45.0 still requires this
8+
binding.initialize()
9+
except Exception:
10+
pass
11+
812
binding.initialize_native_target()
913
binding.initialize_native_asmprinter()
1014

11-
# Register shutdown function to clean up LLVM resources
12-
atexit.register(binding.shutdown)
13-
1415

1516
class LLJITCompiler:
1617
def __init__(self):

0 commit comments

Comments
 (0)