Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Move the Python bindings into a standalone repository #1

Merged
merged 5 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clippy.toml

This file was deleted.

28 changes: 1 addition & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ jobs:
- name: cargo fmt
run: cargo fmt --all -- --check

- name: clang-format
uses: jidicula/[email protected]
with:
clang-format-version: 15
check-path: bindings/c

- name: ruff format
uses: chartboost/ruff-action@v1
with:
Expand All @@ -39,7 +33,7 @@ jobs:
cargo-deny:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1

clippy:
Expand Down Expand Up @@ -101,23 +95,3 @@ jobs:

- name: cargo test
run: cargo test

- name: cargo test -p accesskit_windows
if: matrix.os == 'windows-2019'
run: cargo test -p accesskit_windows

check-c-header:
runs-on: ubuntu-latest
name: Check committed C header
steps:
- uses: actions/checkout@v4

- name: install nightly toolchain
uses: dtolnay/rust-toolchain@nightly

- uses: dtolnay/install@master
with:
crate: cbindgen
- run: cmake -S bindings/c -B build -DACCESSKIT_BUILD_HEADERS=ON -DACCESSKIT_BUILD_LIBRARIES=OFF
- run: cmake --build build
- run: cmp build/accesskit.h bindings/c/include/accesskit.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
tags:
- 'accesskit_python-v*'
- '*.*'

name: Publish Python bindings

Expand All @@ -16,7 +16,7 @@ jobs:
matrix:
target: [universal2-apple-darwin]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
Expand All @@ -31,9 +31,9 @@ jobs:
pip install accesskit --no-index --find-links dist --force-reinstall
python -c "import accesskit"
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.target }}
path: dist

linux-wheels:
Expand All @@ -43,7 +43,7 @@ jobs:
matrix:
target: [x86_64, x86, aarch64, armv7]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
Expand All @@ -60,9 +60,9 @@ jobs:
pip install accesskit --no-index --find-links dist --force-reinstall
python -c "import accesskit"
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-linux-${{ matrix.target }}
path: dist

windows-wheels:
Expand All @@ -72,7 +72,7 @@ jobs:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
Expand All @@ -88,24 +88,24 @@ jobs:
pip install accesskit --no-index --find-links dist --force-reinstall
python -c "import accesskit"
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-windows-${{ matrix.target }}
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-sdist
path: dist

pypi-release:
Expand All @@ -117,9 +117,10 @@ jobs:
needs: [macos-wheels, linux-wheels, windows-wheels, sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
pattern: wheels-*
merge-multiple: true
- uses: PyO3/maturin-action@v1
with:
command: upload
Expand All @@ -131,12 +132,13 @@ jobs:
needs: [macos-wheels, linux-wheels, windows-wheels, sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
pattern: wheels-*
path: dist
merge-multiple: true

- uses: AButler/upload-release-assets@v2.0
- uses: AButler/upload-release-assets@v3.0
with:
files: "dist/*"
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
- uses: GoogleCloudPlatform/release-please-action@v4
with:
command: manifest
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ target

#KDE
.directory

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -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"}
{".":"0.5.0"}
5 changes: 2 additions & 3 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# This is the list of AccessKit authors for copyright purposes.
# This is the list of accesskit-python authors for copyright purposes.
#
# This does not necessarily list everyone who has contributed code, since in
# some cases, their employer may be the copyright holder. To see the full list
# of contributors, see the revision history in source control.
Matt Campbell
Arnold Loubriat
Google LLC
Matt Campbell
Leonard de Ruijter
18 changes: 0 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,3 @@ Our `CHANGELOG.md` files are auto generated using [Release Please](https://githu

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.
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.

### Testing Locally

We have platform-specific tests that do not run when doing `cargo test` from the project root directory.

1. Run cross-platform tests:
``` shell
cargo test
```
2. Run platform-specific tests by issuing the appropriate command for your platform:
``` shell
cargo test -p accesskit_macos
cargo test -p accesskit_unix
cargo test -p accesskit_windows
```

> [!WARNING]
> **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.
Loading
Loading