Skip to content

Commit 6b0d883

Browse files
committed
Python 3.13, NumPy 2.x support
Upgrade cross-python, pybind11
1 parent f4a3bfd commit 6b0d883

File tree

10 files changed

+31
-27
lines changed

10 files changed

+31
-27
lines changed

.github/workflows/matlab.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
CMAKE_C_COMPILER_LAUNCHER: ccache
152152
CMAKE_CXX_COMPILER_LAUNCHER: ccache
153153
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
154-
MACOSX_DEPLOYMENT_TARGET: '10.15'
154+
MACOSX_DEPLOYMENT_TARGET: '11.0'
155155
FC: NOTFOUND
156156
steps:
157157
# Git clone

.github/workflows/toolchain/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ inputs:
1212
type: string
1313
tools-version:
1414
required: false
15-
default: '0.1.2'
15+
default: '1.0.0'
1616
type: string
1717
tools-url:
1818
required: false

.github/workflows/wheel-short-test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
config = ["${{ matrix.config }}"]
6464
generator = "Ninja Multi-Config"
6565
[cmake.options]
66-
CMAKE_FIND_ROOT_PATH = "$staging/pybind11-2.11.1;$staging/eigen-master;$staging/casadi"
66+
CMAKE_FIND_ROOT_PATH = "$staging/pybind11-2.13.6;$staging/eigen-master;$staging/casadi"
6767
USE_GLOBAL_PYBIND11 = "On"
6868
ALPAQA_WITH_CUTEST = "On"
6969
ALPAQA_WITH_EXTERNAL_CASADI = "On"
@@ -123,7 +123,7 @@ jobs:
123123
CMAKE_CXX_COMPILER_LAUNCHER: ccache
124124
CCACHE_DIR: /tmp/.ccache
125125
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
126-
MACOSX_DEPLOYMENT_TARGET: '10.15'
126+
MACOSX_DEPLOYMENT_TARGET: '11.0'
127127
steps:
128128
- uses: actions/checkout@v4
129129
with:
@@ -169,7 +169,7 @@ jobs:
169169
run: |
170170
source ./py-venv/bin/activate
171171
CMAKE_PREFIX_PATH="$VIRTUAL_ENV:$CMAKE_PREFIX_PATH" \
172-
_PYTHON_HOST_PLATFORM='macosx-10.15-universal2' \
172+
_PYTHON_HOST_PLATFORM='macosx-11.0-universal2' \
173173
ARCHFLAGS='-arch arm64 -arch x86_64' \
174174
python -m build -w .
175175
- name: Upload

.github/workflows/wheel.yml

+13-10
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
restore-keys: ${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ env.HOST }}-ccache
4747
# Pip install dependencies
4848
- name: Install Python dependencies
49-
run: python${{ env.PYTHON_VERSION }} -m pip install -U 'pip' 'build' 'pybind11-stubgen~=2.5' 'numpy<2' 'py-build-cmake~=0.2.0a12'
49+
run: python${{ env.PYTHON_VERSION }} -m pip install -U 'pip' 'build' 'pybind11-stubgen~=2.5' 'numpy<3' 'py-build-cmake~=0.2.0a12'
5050
# Build
5151
- name: Native build
5252
run: |
@@ -60,7 +60,7 @@ jobs:
6060
-D USE_GLOBAL_PYBIND11=On \
6161
-D ALPAQA_WITH_CUTEST=On \
6262
-D ALPAQA_WITH_EXTERNAL_CASADI=On \
63-
-D CMAKE_FIND_ROOT_PATH="$staging/pybind11;$staging/eigen-master;$staging/casadi"
63+
-D CMAKE_FIND_ROOT_PATH="$staging/pybind11-2.13.6;$staging/eigen-master;$staging/casadi"
6464
$pbc_cli -B native-build build -- -t ${{ env.C_EXTENSIONS }}
6565
$pbc_cli -B native-build install --component python_stubs -- --prefix "$PWD/staging/python"
6666
tar cf stubs.tar -C "$PWD/staging" python
@@ -80,8 +80,11 @@ jobs:
8080
strategy:
8181
matrix:
8282
pypy: ['']
83-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
83+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
8484
host: [x86_64-centos7-linux-gnu, armv7-neon-linux-gnueabihf, armv6-rpi-linux-gnueabihf, aarch64-rpi3-linux-gnu]
85+
exclude:
86+
- python-version: '3.13'
87+
host: armv6-rpi-linux-gnueabihf
8588
env:
8689
CMAKE_C_COMPILER_LAUNCHER: ccache
8790
CMAKE_CXX_COMPILER_LAUNCHER: ccache
@@ -111,7 +114,7 @@ jobs:
111114
restore-keys: ${{ runner.os }}-${{ matrix.pypy }}${{ matrix.python-version }}-${{ matrix.host }}-ccache
112115
# Pip install dependencies
113116
- name: Install Python dependencies
114-
run: python${{ matrix.python-version }} -m pip install -U 'pip' 'build' 'pybind11-stubgen~=2.5' 'numpy<2' 'py-build-cmake~=0.2.0a12'
117+
run: python${{ matrix.python-version }} -m pip install -U 'pip' 'build' 'pybind11-stubgen~=2.5' 'numpy<3' 'py-build-cmake~=0.2.0a12'
115118
# Download stubs
116119
- name: Download stubs
117120
uses: actions/download-artifact@v4
@@ -130,7 +133,7 @@ jobs:
130133
config = ["Debug", "Release"]
131134
generator = "Ninja Multi-Config"
132135
[cmake.options]
133-
CMAKE_FIND_ROOT_PATH = "$staging/pybind11-2.11.1;$staging/eigen-master;$staging/casadi"
136+
CMAKE_FIND_ROOT_PATH = "$staging/pybind11-2.13.6;$staging/eigen-master;$staging/casadi"
134137
USE_GLOBAL_PYBIND11 = "On"
135138
ALPAQA_WITH_CUTEST = "On"
136139
ALPAQA_WITH_EXTERNAL_CASADI = "On"
@@ -201,7 +204,7 @@ jobs:
201204
config = ["Debug"]
202205
generator = "Ninja Multi-Config"
203206
[cmake.options]
204-
CMAKE_FIND_ROOT_PATH = "$staging/pybind11-2.11.1;$staging/eigen-master;$staging/casadi"
207+
CMAKE_FIND_ROOT_PATH = "$staging/pybind11-2.13.6;$staging/eigen-master;$staging/casadi"
205208
USE_GLOBAL_PYBIND11 = "On"
206209
ALPAQA_WITH_CUTEST = "On"
207210
ALPAQA_WITH_EXTERNAL_CASADI = "On"
@@ -248,7 +251,7 @@ jobs:
248251
strategy:
249252
matrix:
250253
arch: ['AMD64', 'ARM64', 'x86']
251-
python-id: ['cp38-', 'cp39-', 'cp310-', 'cp311-', 'cp312-']
254+
python-id: ['cp38-', 'cp39-', 'cp310-', 'cp311-', 'cp312-', 'cp313']
252255
exclude:
253256
- arch: 'ARM64'
254257
python-id: 'cp38-'
@@ -314,13 +317,13 @@ jobs:
314317
runs-on: macos-13
315318
strategy:
316319
matrix:
317-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
320+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
318321
env:
319322
CMAKE_C_COMPILER_LAUNCHER: ccache
320323
CMAKE_CXX_COMPILER_LAUNCHER: ccache
321324
CCACHE_DIR: /tmp/.ccache
322325
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
323-
MACOSX_DEPLOYMENT_TARGET: '10.15'
326+
MACOSX_DEPLOYMENT_TARGET: '11.0'
324327
steps:
325328
- uses: actions/checkout@v4
326329
with:
@@ -366,7 +369,7 @@ jobs:
366369
run: |
367370
source ./py-venv/bin/activate
368371
CMAKE_PREFIX_PATH="$VIRTUAL_ENV:$CMAKE_PREFIX_PATH" \
369-
_PYTHON_HOST_PLATFORM='macosx-10.15-universal2' \
372+
_PYTHON_HOST_PLATFORM='macosx-11.0-universal2' \
370373
ARCHFLAGS='-arch arm64 -arch x86_64' \
371374
python -m build -w .
372375
- name: Upload

CMakePresets.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"toolchainFile": "$env{TOOLCHAIN_PREFIX}/$env{CROSS_COMPILE}.toolchain.cmake",
6161
"cacheVariables": {
6262
"CMAKE_PREFIX_PATH": "$env{TOOLCHAIN_PREFIX}/mumps/usr/local;$env{TOOLCHAIN_PREFIX}/ipopt/usr/local",
63-
"CMAKE_FIND_ROOT_PATH": "$env{TOOLCHAIN_PREFIX}/eigen-master;$env{TOOLCHAIN_PREFIX}/googletest;$env{TOOLCHAIN_PREFIX}/casadi;$env{TOOLCHAIN_PREFIX}/openblas;$env{TOOLCHAIN_PREFIX}/mumps;$env{TOOLCHAIN_PREFIX}/ipopt;$env{TOOLCHAIN_PREFIX}/qpalm;$env{TOOLCHAIN_PREFIX}/pybind11-2.11.1"
63+
"CMAKE_FIND_ROOT_PATH": "$env{TOOLCHAIN_PREFIX}/eigen-master;$env{TOOLCHAIN_PREFIX}/googletest;$env{TOOLCHAIN_PREFIX}/casadi;$env{TOOLCHAIN_PREFIX}/openblas;$env{TOOLCHAIN_PREFIX}/mumps;$env{TOOLCHAIN_PREFIX}/ipopt;$env{TOOLCHAIN_PREFIX}/qpalm;$env{TOOLCHAIN_PREFIX}/pybind11-2.13.6"
6464
}
6565
},
6666
{

conanfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def requirements(self):
7272
if self.options.with_json:
7373
self.requires("nlohmann_json/3.11.2", transitive_headers=True)
7474
if self.options.with_python:
75-
self.requires("pybind11/2.11.1")
75+
self.requires("pybind11/2.13.6")
7676
if self.options.with_matlab:
7777
self.requires("utfcpp/4.0.4")
7878
if self.options.with_blas:

doxygen/scripts/gen-docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function run_doxygen_coverage {
4343
# See if we're cross-compiling and add dependencies to CMake's search path
4444
if [ -n "$CMAKE_TOOLCHAIN_FILE" ]; then
4545
pfx="$(dirname "$CMAKE_TOOLCHAIN_FILE")"
46-
extra_cmake_opts=("-D" "CMAKE_FIND_ROOT_PATH=$pfx/pybind11;$pfx/eigen-master;$pfx/casadi;$pfx/googletest")
46+
extra_cmake_opts=("-D" "CMAKE_FIND_ROOT_PATH=$pfx/pybind11-2.13.6;$pfx/eigen-master;$pfx/casadi;$pfx/googletest")
4747
fi
4848

4949
# Configure the project

pyproject.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ classifiers = [
1717
"Programming Language :: Python :: 3.10",
1818
"Programming Language :: Python :: 3.11",
1919
"Programming Language :: Python :: 3.12",
20+
"Programming Language :: Python :: 3.13",
2021
"Operating System :: POSIX :: Linux",
2122
"Operating System :: Microsoft :: Windows",
2223
"Operating System :: MacOS",
2324
"Typing :: Typed",
2425
]
25-
dependencies = ["numpy<2", "casadi~=3.6.0", "cmake~=3.28.3", "ninja~=1.11.1"]
26+
dependencies = ["numpy<3", "casadi~=3.6.0", "cmake~=3.31.2", "ninja~=1.11.1"]
2627
dynamic = ["version", "description"]
2728

2829
[project.optional-dependencies]
@@ -41,9 +42,9 @@ alpaqa = "alpaqa.__main__:main"
4142
[build-system]
4243
requires = [
4344
"py-build-cmake~=0.2.0a12",
44-
"pybind11==2.11.1",
45+
"pybind11==2.13.6",
4546
"pybind11-stubgen~=2.5",
46-
"numpy<2",
47+
"numpy<3",
4748
]
4849
build-backend = "py_build_cmake.build"
4950

python/alpaqa-debug/pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ description = "Debug symbols for the alpaqa package."
1818
[build-system]
1919
requires = [
2020
"py-build-cmake~=0.2.0a12",
21-
"pybind11==2.11.1",
21+
"pybind11==2.13.6",
2222
"pybind11-stubgen~=2.5",
23-
"numpy<2",
23+
"numpy<3",
2424
]
2525
build-backend = "py_build_cmake.build_component"
2626

scripts/dev/install-locally.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -ex
77
triple="x86_64-centos7-linux-gnu"
88

99
# Download compiler
10-
download_url="https://github.com/tttapa/cross-python/releases/download/0.1.2"
10+
download_url="https://github.com/tttapa/cross-python/releases/download/1.0.0"
1111
tools_dir="$PWD/toolchains"
1212
pfx="$tools_dir/$triple"
1313
mkdir -p "$tools_dir"
@@ -18,10 +18,10 @@ fi
1818

1919
# Install QPALM
2020
if [ ! -d "$pfx/qpalm" ]; then
21-
qpalm_download="https://github.com/kul-optec/QPALM/releases/download/1.2.2"
22-
wget "$qpalm_download/QPALM-1.2.2-Linux.tar.gz" -O- | \
21+
qpalm_download="https://github.com/kul-optec/QPALM/releases/download/1.2.5"
22+
wget "$qpalm_download/QPALM-1.2.5-Linux.tar.gz" -O- | \
2323
tar xz -C "$pfx"
24-
mv "$pfx/QPALM-1.2.2-Linux" "$pfx/qpalm"
24+
mv "$pfx/QPALM-1.2.5-Linux" "$pfx/qpalm"
2525
fi
2626

2727
# Configure

0 commit comments

Comments
 (0)