Skip to content

Commit c8826db

Browse files
authored
feat: Python 3.13 support and CI builds (#214)
- Set minimum required Python version 3.9 in `pyproject.toml`. - Added Python 3.13 to `cibuildwheel` build list in `pyproject.toml` and removed 3.8. - Added Python 3.13 to meta-data classifiers in `pyproject.toml` and removed 3.8. - Added Python 3.13 to `tox.ini` and removed 3.8. - Updated minimum supported Python version mentioned in readme etc. - Updated latest Python version mentioned in windows install docs. - ci: Use GitHub Action Linux arm runners, remove dedicated pipeline for aarch64. - ci: Let cibuildwheel install needed Python versions. Signed-off-by: Christopher Arndt <[email protected]>
1 parent acd3409 commit c8826db

File tree

8 files changed

+22
-138
lines changed

8 files changed

+22
-138
lines changed

.github/workflows/pr_to_master.yml

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
strategy:
4141
fail-fast: true
4242
matrix:
43-
os: [ubuntu-latest, windows-latest, macos-latest]
43+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest]
4444
steps:
4545

4646
- uses: actions/checkout@v4
@@ -50,58 +50,19 @@ jobs:
5050
- uses: ilammy/msvc-dev-cmd@v1
5151
if: matrix.os == 'windows-latest'
5252

53-
- name: Install Python
54-
uses: actions/setup-python@v5
55-
with:
56-
python-version: |
57-
3.9
58-
3.10
59-
3.11
60-
3.12
61-
pypy3.9
62-
pypy3.10
63-
6453
- name: Build wheels
65-
uses: pypa/cibuildwheel@v2.16
54+
uses: pypa/cibuildwheel@v2.22
6655
env:
6756
# Skip trying to test arm64 builds on Intel Macs
6857
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64"
6958

70-
- name: Upload wheels
71-
uses: actions/upload-artifact@v4
72-
with:
73-
name: bdist-${{ matrix.os }}
74-
path: wheelhouse/*.whl
75-
compression-level: 0
76-
77-
build_arch_wheels:
78-
name: Build wheels on Linux ${{ matrix.arch }}
79-
runs-on: ubuntu-20.04
80-
strategy:
81-
matrix:
82-
arch: [aarch64]
83-
steps:
84-
85-
- uses: actions/checkout@v4
86-
with:
87-
submodules: true
88-
89-
- uses: docker/setup-qemu-action@v3
90-
with:
91-
platforms: all
92-
93-
- name: Build wheels
94-
uses: pypa/[email protected]
95-
env:
96-
CIBW_ARCHS: ${{ matrix.arch }}
97-
9859
- name: Verify clean directory
9960
run: git diff --exit-code
10061
shell: bash
10162

10263
- name: Upload wheels
10364
uses: actions/upload-artifact@v4
10465
with:
105-
name: bdist-linux-${{ matrix.arch }}
66+
name: bdist-${{ matrix.os }}
10667
path: wheelhouse/*.whl
10768
compression-level: 0

.github/workflows/push_to_master.yml

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
strategy:
4141
fail-fast: true
4242
matrix:
43-
os: [ubuntu-latest, windows-latest, macos-latest]
43+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest]
4444
steps:
4545

4646
- uses: actions/checkout@v4
@@ -50,59 +50,20 @@ jobs:
5050
- uses: ilammy/msvc-dev-cmd@v1
5151
if: matrix.os == 'windows-latest'
5252

53-
- name: Install Python
54-
uses: actions/setup-python@v5
55-
with:
56-
python-version: |
57-
3.9
58-
3.10
59-
3.11
60-
3.12
61-
pypy3.9
62-
pypy3.10
63-
6453
- name: Build wheels
65-
uses: pypa/cibuildwheel@v2.16
54+
uses: pypa/cibuildwheel@v2.22
6655
env:
6756
# Skip trying to test arm64 builds on Intel Macs
6857
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64"
6958

70-
- name: Upload wheels
71-
uses: actions/upload-artifact@v4
72-
with:
73-
name: bdist-${{ matrix.os }}
74-
path: wheelhouse/*.whl
75-
compression-level: 0
76-
77-
build_arch_wheels:
78-
name: Build wheels on Linux ${{ matrix.arch }}
79-
runs-on: ubuntu-20.04
80-
strategy:
81-
matrix:
82-
arch: [aarch64]
83-
steps:
84-
85-
- uses: actions/checkout@v4
86-
with:
87-
submodules: true
88-
89-
- uses: docker/setup-qemu-action@v3
90-
with:
91-
platforms: all
92-
93-
- name: Build wheels
94-
uses: pypa/[email protected]
95-
env:
96-
CIBW_ARCHS: ${{ matrix.arch }}
97-
9859
- name: Verify clean directory
9960
run: git diff --exit-code
10061
shell: bash
10162

10263
- name: Upload wheels
10364
uses: actions/upload-artifact@v4
10465
with:
105-
name: bdist-linux-${{ matrix.arch }}
66+
name: bdist-${{ matrix.os }}
10667
path: wheelhouse/*.whl
10768
compression-level: 0
10869

.github/workflows/release.yml

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
runs-on: ${{ matrix.os }}
4444
strategy:
4545
matrix:
46-
os: [ubuntu-latest, windows-latest, macos-latest]
46+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest]
4747
steps:
4848

4949
- uses: actions/checkout@v
@@ -53,59 +53,20 @@ jobs:
5353
- uses: ilammy/msvc-dev-cmd@v1
5454
if: matrix.os == 'windows-latest'
5555

56-
- name: Install Python
57-
uses: actions/setup-python@v5
58-
with:
59-
python-version: |
60-
3.9
61-
3.10
62-
3.11
63-
3.12
64-
pypy3.9
65-
pypy3.10
66-
6756
- name: Build wheels
68-
uses: pypa/cibuildwheel@v2.16
57+
uses: pypa/cibuildwheel@v2.22
6958
env:
7059
# Skip trying to test arm64 builds on Intel Macs
7160
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64"
7261

73-
- name: Upload wheels
74-
uses: actions/upload-artifact@v4
75-
with:
76-
name: bdist-${{ matrix.os }}
77-
path: wheelhouse/*.whl
78-
compression-level: 0
79-
80-
build_arch_wheels:
81-
name: Build wheels on Linux ${{ matrix.arch }}
82-
runs-on: ubuntu-20.04
83-
strategy:
84-
matrix:
85-
arch: [aarch64]
86-
steps:
87-
88-
- uses: actions/checkout@v4
89-
with:
90-
submodules: true
91-
92-
- uses: docker/setup-qemu-action@v3
93-
with:
94-
platforms: all
95-
96-
- name: Build wheels
97-
uses: pypa/[email protected]
98-
env:
99-
CIBW_ARCHS: ${{ matrix.arch }}
100-
10162
- name: Verify clean directory
10263
run: git diff --exit-code
10364
shell: bash
10465

10566
- name: Upload wheels
10667
uses: actions/upload-artifact@v4
10768
with:
108-
name: bdist-linux-${{ matrix.arch }}
69+
name: bdist-${{ matrix.os }}
10970
path: wheelhouse/*.whl
11071
compression-level: 0
11172

INSTALL-windows.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# How to install python-rtmidi from source on Windows
22

33
These instructions should work for installing `python-rtmidi` from source with
4-
Python 3.8+ in the 64-bit or 32-bit versions (you can run the latter on Windows
4+
Python 3.9+ in the 64-bit or 32-bit versions (you can run the latter on Windows
55
64-bit versions with no problems).
66

77
Please follow all the steps below in the exact order.
@@ -10,8 +10,8 @@ Please follow all the steps below in the exact order.
1010

1111
You probably need administrator rights for some or all of the following steps.
1212

13-
1. Install the latest release of Python (3.12 at the time of writing, at least
14-
3.8+) from <https://www.python.org/downloads/windows/> to the default
13+
1. Install the latest release of Python (3.13 at the time of writing, at least
14+
3.9+) from <https://www.python.org/downloads/windows/> to the default
1515
location (e.g. `C:\Python312`). You can install either or both the 32-bit
1616
and the 64-bit version.
1717

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Windows (MultiMedia System) operating systems.
2020
provides a thin wrapper around the RtMidi C++ interface. The API is basically
2121
the same as the C++ one but with the naming scheme of classes, methods and
2222
parameters adapted to the Python PEP-8 conventions and requirements of the
23-
Python package naming structure. **python-rtmidi** supports Python 3 (3.8+).
23+
Python package naming structure. **python-rtmidi** supports Python 3 (3.9+).
2424

2525
The [documentation] provides installation instructions, a history of changes
2626
per release and an API reference.

pyproject.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ classifiers = [
2828
"Operating System :: MacOS :: MacOS X",
2929
"Programming Language :: Python",
3030
"Programming Language :: Python :: 3",
31-
"Programming Language :: Python :: 3.8",
3231
"Programming Language :: Python :: 3.9",
3332
"Programming Language :: Python :: 3.10",
3433
"Programming Language :: Python :: 3.11",
3534
"Programming Language :: Python :: 3.12",
35+
"Programming Language :: Python :: 3.13",
3636
"Topic :: Multimedia :: Sound/Audio :: MIDI",
3737
"Topic :: Software Development :: Libraries :: Python Modules",
3838
]
@@ -63,11 +63,11 @@ file = "LICENSE.md"
6363
[tool.black]
6464
line-length = 99
6565
target-version = [
66-
"py38",
6766
"py39",
6867
"py310",
6968
"py311",
7069
"py312",
70+
"py313",
7171
]
7272

7373
[tool.isort]
@@ -96,10 +96,11 @@ manylinux-aarch64-image = "manylinux_2_28"
9696
test-requires = "pytest"
9797
test-command = "pytest -v -m ci {package}/tests"
9898

99-
# Install system library
10099
[tool.cibuildwheel.linux]
101-
build = ["cp3{9,10,11,12}-manylinux*", "pp3{9,10}-manylinux*"]
100+
build = ["cp3{9,10,11,12,13}-manylinux*", "pp3{9,10,11}-manylinux*"]
102101
archs = ["auto64"]
102+
enable = ["pypy"]
103+
# Install system libraries
103104
before-all = [
104105
"dnf -y install alsa-lib-devel alsa-utils",
105106
"curl -o jack2-1.9.22.tar.gz https://codeload.github.com/jackaudio/jack2/tar.gz/refs/tags/v1.9.22",
@@ -112,9 +113,9 @@ before-all = [
112113
repair-wheel-command = "auditwheel repair --exclude libasound.so.2 --lib-sdir . -w {dest_dir} {wheel}"
113114

114115
[tool.cibuildwheel.macos]
115-
build = "cp3{9,10,11,12}-macosx*"
116+
build = "cp3{9,10,11,12,13}-macosx*"
116117
archs = ["x86_64", "arm64"]
117118

118119
[tool.cibuildwheel.windows]
119-
build = "cp3{9,10,11,12}-win*"
120+
build = "cp3{9,10,11,12,13}-win*"
120121
archs = ["AMD64"]

src/_rtmidi.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ and Windows (MultiMedia System) operating systems.
1919
provides a thin wrapper around the RtMidi C++ interface. The API is basically
2020
the same as the C++ one but with the naming scheme of classes, methods and
2121
parameters adapted to the Python PEP-8 conventions and requirements of the
22-
Python package naming structure. **python-rtmidi** supports Python 3 (3.8+).
22+
Python package naming structure. **python-rtmidi** supports Python 3 (3.9+).
2323
2424
2525
Usage example

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = flake8, py38, py39, py310, py311, py312
2+
envlist = flake8, py39, py310, py311, py312, py313
33
skip_missing_interpreters = True
44
isolated_build = True
55

0 commit comments

Comments
 (0)