mirror of
https://github.com/visioncortex/vtracer.git
synced 2025-12-06 17:15:41 -08:00
Python Bindings. Again. No, really! (#55)
* - Cargo.toml: add `crate-type = ["cdylib"] to [lib]; lacking this is what was causing the executable to be put in wheels - pyproject.toml: add "python-binding" to features for conditional compilation - main.rs: `cargo build` was failing for the vtracer executable; I think the previous import scheme had an implicit dependency on the library being built and called 'vtracer'. The other way to do this would have been to add an explicit dependency to the [[bin]], but making explicit imports here solves things directly * re-enable linux builds; features are defined in the pyproject.toml now rather than in the workflow arguments * And publish Linux, too!
This commit is contained in:
50
.github/workflows/python.yml
vendored
50
.github/workflows/python.yml
vendored
@@ -16,28 +16,28 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
# linux:
|
||||
# runs-on: ubuntu-latest
|
||||
# strategy:
|
||||
# matrix:
|
||||
# target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - uses: actions/setup-python@v4
|
||||
# with:
|
||||
# python-version: '3.10'
|
||||
# - name: Build wheels
|
||||
# uses: PyO3/maturin-action@v1
|
||||
# with:
|
||||
# target: ${{ matrix.target }}
|
||||
# args: -m cmdapp/Cargo.toml --release --features=python-binding --out dist --find-interpreter
|
||||
# sccache: 'true'
|
||||
# manylinux: auto
|
||||
# - name: Upload wheels
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: wheels
|
||||
# path: dist
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Build wheels
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
args: -m cmdapp/Cargo.toml --release --out dist --find-interpreter
|
||||
sccache: 'true'
|
||||
manylinux: auto
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: wheels
|
||||
path: dist
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
args: -m cmdapp/Cargo.toml --release --features=python-binding --out dist --find-interpreter
|
||||
args: -m cmdapp/Cargo.toml --release --out dist --find-interpreter
|
||||
sccache: 'true'
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
args: -m cmdapp/Cargo.toml --release --features=python-binding --out dist --find-interpreter
|
||||
args: -m cmdapp/Cargo.toml --release --out dist --find-interpreter
|
||||
sccache: 'true'
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -108,7 +108,7 @@ jobs:
|
||||
# IMPORTANT: this permission is mandatory for trusted publishing
|
||||
id-token: write
|
||||
if: "startsWith(github.ref, 'refs/tags/')"
|
||||
needs: [windows, macos, sdist] # linux
|
||||
needs: [windows, macos, sdist, linux]
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user