Skip to content

Commit 1b647fd

Browse files
authored
feat: Move the Python bindings into a standalone repository (#1)
1 parent 09e83e8 commit 1b647fd

13 files changed

+117
-1337
lines changed

.clippy.toml

-1
This file was deleted.

.github/workflows/ci.yml

+1-27
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ jobs:
2222
- name: cargo fmt
2323
run: cargo fmt --all -- --check
2424

25-
- name: clang-format
26-
uses: jidicula/[email protected]
27-
with:
28-
clang-format-version: 15
29-
check-path: bindings/c
30-
3125
- name: ruff format
3226
uses: chartboost/ruff-action@v1
3327
with:
@@ -39,7 +33,7 @@ jobs:
3933
cargo-deny:
4034
runs-on: ubuntu-22.04
4135
steps:
42-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
4337
- uses: EmbarkStudios/cargo-deny-action@v1
4438

4539
clippy:
@@ -101,23 +95,3 @@ jobs:
10195

10296
- name: cargo test
10397
run: cargo test
104-
105-
- name: cargo test -p accesskit_windows
106-
if: matrix.os == 'windows-2019'
107-
run: cargo test -p accesskit_windows
108-
109-
check-c-header:
110-
runs-on: ubuntu-latest
111-
name: Check committed C header
112-
steps:
113-
- uses: actions/checkout@v4
114-
115-
- name: install nightly toolchain
116-
uses: dtolnay/rust-toolchain@nightly
117-
118-
- uses: dtolnay/install@master
119-
with:
120-
crate: cbindgen
121-
- run: cmake -S bindings/c -B build -DACCESSKIT_BUILD_HEADERS=ON -DACCESSKIT_BUILD_LIBRARIES=OFF
122-
- run: cmake --build build
123-
- run: cmp build/accesskit.h bindings/c/include/accesskit.h

.github/workflows/python-bindings.yml renamed to .github/workflows/publish.yml

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
push:
33
tags:
4-
- 'accesskit_python-v*'
4+
- '*.*'
55

66
name: Publish Python bindings
77

@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
target: [universal2-apple-darwin]
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
- uses: actions/setup-python@v5
2121
with:
2222
python-version: ${{ env.MIN_PYTHON_VERSION }}
@@ -31,9 +31,9 @@ jobs:
3131
pip install accesskit --no-index --find-links dist --force-reinstall
3232
python -c "import accesskit"
3333
- name: Upload wheels
34-
uses: actions/upload-artifact@v3
34+
uses: actions/upload-artifact@v4
3535
with:
36-
name: wheels
36+
name: wheels-${{ matrix.target }}
3737
path: dist
3838

3939
linux-wheels:
@@ -43,7 +43,7 @@ jobs:
4343
matrix:
4444
target: [x86_64, x86, aarch64, armv7]
4545
steps:
46-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4
4747
- uses: actions/setup-python@v5
4848
with:
4949
python-version: ${{ env.MIN_PYTHON_VERSION }}
@@ -60,9 +60,9 @@ jobs:
6060
pip install accesskit --no-index --find-links dist --force-reinstall
6161
python -c "import accesskit"
6262
- name: Upload wheels
63-
uses: actions/upload-artifact@v3
63+
uses: actions/upload-artifact@v4
6464
with:
65-
name: wheels
65+
name: wheels-linux-${{ matrix.target }}
6666
path: dist
6767

6868
windows-wheels:
@@ -72,7 +72,7 @@ jobs:
7272
matrix:
7373
target: [x64, x86]
7474
steps:
75-
- uses: actions/checkout@v3
75+
- uses: actions/checkout@v4
7676
- uses: actions/setup-python@v5
7777
with:
7878
python-version: ${{ env.MIN_PYTHON_VERSION }}
@@ -88,24 +88,24 @@ jobs:
8888
pip install accesskit --no-index --find-links dist --force-reinstall
8989
python -c "import accesskit"
9090
- name: Upload wheels
91-
uses: actions/upload-artifact@v3
91+
uses: actions/upload-artifact@v4
9292
with:
93-
name: wheels
93+
name: wheels-windows-${{ matrix.target }}
9494
path: dist
9595

9696
sdist:
9797
runs-on: ubuntu-latest
9898
steps:
99-
- uses: actions/checkout@v3
99+
- uses: actions/checkout@v4
100100
- name: Build sdist
101101
uses: PyO3/maturin-action@v1
102102
with:
103103
command: sdist
104104
args: --out dist
105105
- name: Upload sdist
106-
uses: actions/upload-artifact@v3
106+
uses: actions/upload-artifact@v4
107107
with:
108-
name: wheels
108+
name: wheels-sdist
109109
path: dist
110110

111111
pypi-release:
@@ -117,9 +117,10 @@ jobs:
117117
needs: [macos-wheels, linux-wheels, windows-wheels, sdist]
118118
runs-on: ubuntu-latest
119119
steps:
120-
- uses: actions/download-artifact@v3
120+
- uses: actions/download-artifact@v4
121121
with:
122-
name: wheels
122+
pattern: wheels-*
123+
merge-multiple: true
123124
- uses: PyO3/maturin-action@v1
124125
with:
125126
command: upload
@@ -131,12 +132,13 @@ jobs:
131132
needs: [macos-wheels, linux-wheels, windows-wheels, sdist]
132133
runs-on: ubuntu-latest
133134
steps:
134-
- uses: actions/download-artifact@v3
135+
- uses: actions/download-artifact@v4
135136
with:
136-
name: wheels
137+
pattern: wheels-*
137138
path: dist
139+
merge-multiple: true
138140

139-
- uses: AButler/upload-release-assets@v2.0
141+
- uses: AButler/upload-release-assets@v3.0
140142
with:
141143
files: "dist/*"
142144
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-please.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ jobs:
77
release-please:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: GoogleCloudPlatform/release-please-action@v3
10+
- uses: GoogleCloudPlatform/release-please-action@v4
1111
with:
12-
command: manifest
1312
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,12 @@ target
1818

1919
#KDE
2020
.directory
21+
22+
# Environments
23+
.env
24+
.venv
25+
env/
26+
venv/
27+
ENV/
28+
env.bak/
29+
venv.bak/

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"common":"0.16.0","consumer":"0.24.0","platforms/macos":"0.17.0","platforms/windows":"0.22.0","platforms/winit":"0.22.0","platforms/unix":"0.12.0","bindings/c":"0.12.0","bindings/python":"0.5.0","platforms/atspi-common":"0.9.0"}
1+
{".":"0.5.0"}

AUTHORS

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# This is the list of AccessKit authors for copyright purposes.
1+
# This is the list of accesskit-python authors for copyright purposes.
22
#
33
# This does not necessarily list everyone who has contributed code, since in
44
# some cases, their employer may be the copyright holder. To see the full list
55
# of contributors, see the revision history in source control.
6-
Matt Campbell
76
Arnold Loubriat
8-
Google LLC
7+
Matt Campbell
98
Leonard de Ruijter

CONTRIBUTING.md

-18
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,3 @@ Our `CHANGELOG.md` files are auto generated using [Release Please](https://githu
3131

3232
To control how your work will be described in the changelog, use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) when writing the title of your pull request.
3333
If you think one line is not enough, mention it in your pull request so that maintainers can update the description of the merge commit.
34-
35-
### Testing Locally
36-
37-
We have platform-specific tests that do not run when doing `cargo test` from the project root directory.
38-
39-
1. Run cross-platform tests:
40-
``` shell
41-
cargo test
42-
```
43-
2. Run platform-specific tests by issuing the appropriate command for your platform:
44-
``` shell
45-
cargo test -p accesskit_macos
46-
cargo test -p accesskit_unix
47-
cargo test -p accesskit_windows
48-
```
49-
50-
> [!WARNING]
51-
> **Windows**: Some end-to-end tests may fail if the created window loses focus. This can happen when using the terminal built into your IDE. Try running them from Powershell or the Command Prompt instead.

0 commit comments

Comments
 (0)