Simplify Python bindings and package builds
Read each input path through one opened stream, including gzip detection, and use direct numeric converter lookup while preserving byte-order handling and caller data. Read the package version from installed metadata and report range errors consistently as ValueError. Require the supplied Cargo.lock instead of generating it during builds, use the standard sdist command, and update package checks and development guides. Validation: 15 Python tests pass against source and the rebuilt installed wheel; the source archive and platform wheel build successfully.
This commit is contained in:
parent
54aa757678
commit
a723ba2265
2 changed files with 40 additions and 38 deletions
|
|
@ -6,7 +6,8 @@ with the [CLI](cli.md) or [Python](python.md) guide.
|
|||
## Build and test
|
||||
|
||||
The checkout selects the stable Rust toolchain; the minimum supported compiler
|
||||
is 1.88. Python bindings require Python 3.11 or newer.
|
||||
is 1.88. Python bindings require Python 3.11 or newer. Source builds require
|
||||
the tracked `Cargo.lock`; update dependencies explicitly with Cargo.
|
||||
|
||||
```sh
|
||||
cargo test --locked
|
||||
|
|
@ -17,14 +18,15 @@ python -I tools/check_installed.py
|
|||
```
|
||||
|
||||
Use `RUSTUP_TOOLCHAIN=1.88.0` to check source builds against the minimum compiler.
|
||||
The Python package bundles its native library during installation. To test a
|
||||
newly built library without reinstalling, set `PHEON_LIBRARY` to its absolute
|
||||
The Python package bundles its native library during installation and reads its
|
||||
version from installed package metadata. After installation, to test a newly
|
||||
built library without reinstalling, set `PHEON_LIBRARY` to its absolute
|
||||
path and run `python -m unittest discover -s tests/python` from the checkout.
|
||||
Unset this override when checking installed artifacts with `check_installed.py`.
|
||||
|
||||
## Interfaces and reports
|
||||
|
||||
The CFFI declarations live in [pheon/_ffi.h](../pheon/_ffi.h). Keep them aligned
|
||||
The CFFI declarations live in [pheon/_ffi.h](https://mpxd.net/code/jan/pheon/src/branch/master/pheon/_ffi.h). Keep them aligned
|
||||
with the exported native functions. The C API version and
|
||||
[Arrow layout version](arrow-schema.md) are independent of package releases and
|
||||
the [JSON report schema](diff-reports.md).
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ provides the CLI. Neither installation discovers or depends on the other.
|
|||
|
||||
## Validate artifacts
|
||||
|
||||
The [package workflow](../.github/workflows/packages.yml) builds one source archive
|
||||
The [package workflow](https://mpxd.net/code/jan/pheon/src/branch/master/.github/workflows/packages.yml) builds one source archive
|
||||
and uses cibuildwheel to build and repair wheels for Linux and macOS x86-64/ARM64,
|
||||
and Windows x86-64. Wheels use `py3-none` interpreter/ABI tags plus a platform tag.
|
||||
Linux releases need an appropriate manylinux tag; unrepaired local `linux_*`
|
||||
|
|
|
|||
Loading…
Reference in a new issue