-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
2,128 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
on: | ||
push: | ||
tags: | ||
- 'accesskit_python-v*' | ||
|
||
name: Publish Python bindings | ||
|
||
jobs: | ||
build-wheels: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- os: macos-latest | ||
python-arch: x64 | ||
rust-target: x86_64 | ||
- os: macos-latest | ||
python-arch: x64 | ||
rust-target: universal2-apple-darwin | ||
- os: ubuntu-latest | ||
python-arch: x64 | ||
rust-target: x86_64 | ||
- os: ubuntu-latest | ||
python-arch: x64 | ||
rust-target: i686 | ||
skip-wheel-installation: true | ||
- os: windows-latest | ||
python-arch: x64 | ||
rust-target: x64 | ||
- os: windows-latest | ||
python-arch: x86 | ||
rust-target: x86 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
architecture: ${{ matrix.python-arch }} | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Build wheel | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.rust-target }} | ||
manylinux: auto | ||
args: --release --out dist --sdist | ||
- name: Test wheel installation | ||
if: matrix.skip-wheel-installation != true | ||
run: | | ||
pip install accesskit --no-index --find-links dist --force-reinstall | ||
python -c "import accesskit" | ||
- name: Upload wheel | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
needs: [build-wheels] | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- name: Publish to PyPI | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
pip install --upgrade twine | ||
twine upload --skip-existing * |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[target.aarch64-apple-darwin] | ||
rustflags = [ | ||
"-C", "link-arg=-undefined", | ||
"-C", "link-arg=dynamic_lookup", | ||
] | ||
|
||
[target.x86_64-apple-darwin] | ||
rustflags = [ | ||
"-C", "link-arg=-undefined", | ||
"-C", "link-arg=dynamic_lookup", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[package] | ||
name = "accesskit_python" | ||
version = "0.1.0" | ||
authors = ["Arnold Loubriat <[email protected]>"] | ||
license = "MIT OR Apache-2.0" | ||
description = "Python bindings to the AccessKit library" | ||
readme = "README.md" | ||
publish = false | ||
edition = "2021" | ||
|
||
[lib] | ||
name = "accesskit" | ||
crate-type = ["cdylib"] | ||
doc = false | ||
|
||
[features] | ||
extension-module = ["pyo3/extension-module"] | ||
|
||
[dependencies] | ||
accesskit = { version = "0.12.0", path = "../../common", features = ["pyo3"] } | ||
pyo3 = { version = "0.20", features = ["abi3-py37", "multiple-pymethods"] } | ||
|
||
[target.'cfg(target_os = "windows")'.dependencies] | ||
accesskit_windows = { version = "0.15.0", path = "../../platforms/windows" } | ||
|
||
[target.'cfg(target_os = "macos")'.dependencies] | ||
accesskit_macos = { version = "0.10.0", path = "../../platforms/macos" } | ||
|
||
[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies] | ||
accesskit_unix = { version = "0.6.0", path = "../../platforms/unix" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# AccessKit | ||
|
||
These are the bindings to use AccessKit from Python. |
Oops, something went wrong.