cleanup flags and platforms

This commit is contained in:
Scott Lessans 2025-08-05 10:36:49 -07:00
parent 2d077f3745
commit b16552ff24
4 changed files with 8 additions and 12 deletions

View file

@ -32,10 +32,6 @@ jobs:
target: aarch64
- runner: ubuntu-22.04
target: armv7
# - runner: ubuntu-22.04
# target: s390x
# - runner: ubuntu-22.04
# target: ppc64le
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
@ -48,7 +44,7 @@ jobs:
CFLAGS_aarch64_unknown_linux_gnu: -D__ARM_ARCH=8
with:
target: ${{ matrix.platform.target }}
args: -F python-binding --release --out dist --find-interpreter
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
- name: Upload wheels
@ -82,7 +78,7 @@ jobs:
CFLAGS_aarch64_unknown_linux_musl: -D__ARM_ARCH=8
with:
target: ${{ matrix.platform.target }}
args: -F python-binding --release --out dist --find-interpreter
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
- name: Upload wheels
@ -110,7 +106,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: -F python-binding --release --out dist --find-interpreter
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v4
@ -136,7 +132,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: -F python-binding --release --out dist --find-interpreter
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v4

View file

@ -177,10 +177,10 @@ source .venv/bin/activate
# Install maturin and test dependencies
pip install maturin pytest mypy ruff # tailor to your workflow
# Compile the Rust crate *and* install the Python package in editable mode
maturin develop -F python-binding --release
maturin develop --release
```
`maturin develop -F python-binding` builds _harmony_ with Cargo, produces a native extension
`maturin develop` builds _harmony_ with Cargo, produces a native extension
(`openai_harmony.<abi>.so`) and places it in your virtualenv next to the pure-
Python wrapper similar to `pip install -e .` for pure Python projects.

View file

@ -16,7 +16,7 @@ description = "OpenAI's response format for its open-weight model series gpt-oss
readme = "README.md"
[project.optional-dependencies]
demo = []
demo = ["uvicorn", "fastapi"]
[tool.maturin]
features = ["python-binding", "pyo3/extension-module"]

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -e
source .venv/bin/activate
maturin develop -F python-binding --release
maturin develop --release
pytest "$@"