Skip to content

Commit f91fa5e

Browse files
author
Géry Casiez
committed
Compile binding for python 3.13 and 3.14
1 parent 1c54a99 commit f91fa5e

2 files changed

Lines changed: 45 additions & 28 deletions

File tree

.github/workflows/CI.yml

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ on:
66
pull_request:
77
branches: [ "master" ]
88

9-
env:
10-
PYTHON_VERSION: '3.14'
9+
x-python-matrix: &python-matrix
10+
python-version: ['3.13', '3.14']
1111

1212
jobs:
1313
buildLinux:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
<<: *python-matrix
1418

1519
runs-on: ubuntu-latest
1620
container: ubuntu:latest
@@ -20,7 +24,7 @@ jobs:
2024
- name: Setup Python
2125
uses: actions/setup-python@v6
2226
with:
23-
python-version: ${{ env.PYTHON_VERSION }}
27+
python-version: ${{ matrix.python-version }}
2428
- name: Install Qt6 and python
2529
run: |
2630
apt-get update
@@ -46,12 +50,16 @@ jobs:
4650
- name: Save the compiled libraries
4751
uses: actions/upload-artifact@v5
4852
with:
49-
name: LinuxArtifact
53+
name: LinuxArtifact-${{ matrix.python-version }}
5054
path: |
5155
pointing/libpointing.a
5256
bindings/Python/cython/libpointing/*.so
5357
5458
buildMacOS:
59+
strategy:
60+
fail-fast: false
61+
matrix:
62+
<<: *python-matrix
5563

5664
runs-on: macos-latest
5765

@@ -61,12 +69,12 @@ jobs:
6169
run: |
6270
brew update
6371
brew install qt
64-
brew install python@${PYTHON_VERSION}
72+
brew install python@${{ matrix.python-version }}
6573
mkdir venv
66-
python${PYTHON_VERSION} -m venv venv/
74+
python${{ matrix.python-version }} -m venv venv/
6775
source venv/bin/activate
68-
python${PYTHON_VERSION} -m pip install --upgrade pip
69-
python${PYTHON_VERSION} -m pip install setuptools cython
76+
python${{ matrix.python-version }} -m pip install --upgrade pip
77+
python${{ matrix.python-version }} -m pip install setuptools cython
7078
7179
- name: compile library
7280
run: |
@@ -79,18 +87,22 @@ jobs:
7987
source venv/bin/activate
8088
cp pointing/libpointing.a bindings/Python/cython/
8189
cd bindings/Python/cython/
82-
python${PYTHON_VERSION} buildcythonlib.py build_ext --inplace
90+
python${{ matrix.python-version }} buildcythonlib.py build_ext --inplace
8391
8492
- name: Save the compiled libraries
8593
uses: actions/upload-artifact@v5
8694
with:
87-
name: macOSArtifact
95+
name: macOSArtifact-${{ matrix.python-version }}
8896
path: |
8997
pointing/libpointing.a
9098
bindings/Python/cython/libpointing/*.so
9199
92100
buildWindows:
93-
101+
strategy:
102+
fail-fast: false
103+
matrix:
104+
<<: *python-matrix
105+
94106
runs-on: windows-latest
95107

96108
steps:
@@ -118,7 +130,7 @@ jobs:
118130
- name: Install Python
119131
uses: actions/setup-python@v6
120132
with:
121-
python-version: ${{ env.PYTHON_VERSION }}
133+
python-version: ${{ matrix.python-version }}
122134

123135
- name: Install Python librairies
124136
run: |
@@ -147,13 +159,17 @@ jobs:
147159
- name: Save the compiled libraries
148160
uses: actions/upload-artifact@v5
149161
with:
150-
name: WindowsArtifact
162+
name: WindowsArtifact-${{ matrix.python-version }}
151163
path: |
152164
pointing/release/pointing.lib
153165
bindings/Python/cython/libpointing/*.pyd
154166
155167
buildPythonBinding:
156168
needs: [buildLinux, buildMacOS, buildWindows]
169+
strategy:
170+
fail-fast: false
171+
matrix:
172+
<<: *python-matrix
157173

158174
runs-on: ubuntu-latest
159175

@@ -164,7 +180,7 @@ jobs:
164180
- name: Setup Python
165181
uses: actions/setup-python@v6
166182
with:
167-
python-version: ${{ env.PYTHON_VERSION }}
183+
python-version: ${{ matrix.python-version }}
168184
- name: Install python
169185
run: |
170186
apt-get update
@@ -176,23 +192,26 @@ jobs:
176192
python -m pip install --upgrade pip
177193
python -m pip install setuptools build cython twine
178194
179-
- name: Download Linux artifact
195+
- name: Download Linux artifacts
180196
uses: actions/download-artifact@v5
181197
with:
182-
name: LinuxArtifact
198+
pattern: LinuxArtifact-*
183199
path: linux-artifact
200+
merge-multiple: true
184201

185-
- name: Download macOS artifact
202+
- name: Download macOS artifacts
186203
uses: actions/download-artifact@v5
187204
with:
188-
name: macOSArtifact
205+
pattern: macOSArtifact-*
189206
path: macOS-artifact
207+
merge-multiple: true
190208

191-
- name: Download Windows artifact
209+
- name: Download Windows artifacts
192210
uses: actions/download-artifact@v5
193211
with:
194-
name: WindowsArtifact
212+
pattern: WindowsArtifact-*
195213
path: windows-artifact
214+
merge-multiple: true
196215

197216
- name: Copy files from artifacts
198217
run: |
@@ -222,7 +241,7 @@ jobs:
222241
- name: Save the compiled libraries
223242
uses: actions/upload-artifact@v5
224243
with:
225-
name: librairiesAndPythonBinding
244+
name: librairiesAndPythonBinding-${{ matrix.python-version }}
226245
path: |
227246
libraries/
228247
python/

bindings/Python/cython/pyproject.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "libpointing"
7-
version = "1.1.4"
7+
version = "1.1.5"
88
description = "Python binding for libpointing."
9-
requires-python = "==3.14.*"
9+
requires-python = ">=3.13,<3.15"
1010
authors = [
1111
{name = "Nicolas Roussel", email = "nicolas.roussel@inria.fr"},
1212
{name = "Géry Casiez", email = "gery.casiez@univ-lille.fr"},
@@ -15,14 +15,12 @@ authors = [
1515
maintainers = [
1616
{name = "Géry Casiez", email = "gery.casiez@univ-lille.fr"},
1717
]
18-
license = {text = "GPLv2"}
18+
license = "GPL-2.0-only"
1919
readme = {file = "PIP.md", content-type = "text/markdown"}
2020
keywords = ["mouse", "hid", "pointing", "input", "device", "transfer function", "subpixel", "raw-input"]
2121
classifiers = [
2222
"Programming Language :: Python :: 3",
23-
"License :: OSI Approved :: MIT License",
24-
"Operating System :: OS Independent",
25-
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)"
23+
"Operating System :: OS Independent"
2624
]
2725

2826
[project.urls]
@@ -33,4 +31,4 @@ packages = ["libpointing"]
3331
include-package-data = true
3432

3533
[tool.setuptools.package-data]
36-
libpointing = ["libpointing.cpython-314-darwin.so", "libpointing.cpython-314-x86_64-linux-gnu.so", "libpointing.cp314-win_amd64.pyd"]
34+
libpointing = ["libpointing.cpython-313-darwin.so", "libpointing.cpython-313-x86_64-linux-gnu.so", "libpointing.cp313-win_amd64.pyd","libpointing.cpython-314-darwin.so", "libpointing.cpython-314-x86_64-linux-gnu.so", "libpointing.cp314-win_amd64.pyd"]

0 commit comments

Comments
 (0)