Skip to main content

hatch native

Shared native-build helpers for hatch plugins

Build Status codecov License PyPI

Overview

Helpers shared by the hatch native build plugins (hatch-rs, hatch-cpp) for wheels that ship a C ABI library next to a Python extension. It is a library for plugin authors, not a hatch plugin, and has no configuration of its own.

Module Provides
symbols exported_symbols(path): the export table of an ELF, Mach-O (including fat), PE, or WebAssembly binary, read without loading it
headers header_symbols(text, prefix), check_headers(...) for expected headers and ABI strings, prefixed_header_symbols(...)
validation check_exports(...) for expected symbols plus an optional ctypes load, run_validation_command(...)
config pydantic models LibraryValidationConfig, ExternalLibraryConfig, ValidationCommandConfig, so every plugin uses the same field names
external resolve_library_source(...) for bundled, external, static, direct; resolve_external_library(...) from a root, a Python package, pkg-config, or $PREFIX/$CONDA_PREFIX
manifest write_artifact_manifest(...): {"version": 1, "module": ..., "artifacts": [...]}
naming shared_library_name(name, platform=...): libfoo.so, libfoo.dylib, foo.dll, foo.wasm

Plugins mix the config models into their own artifact models, so a project writes the same keys whichever plugin builds the library:

expected-headers = ["include/foo/foo.h"]
header-symbol-prefix = "foo_"
expected-abi-strings = ["FOO_ABI_VERSION 1"]
validate = false

Each key also accepts its snake_case spelling.

Metadata

Release files for hatch-native 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hatch-native 0.1.0
File Size Uploaded Provenance Actions
hatch_native-0.1.0.tar.gz 15.5 kB Without provenance Details for hatch_native-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hatch-native 0.1.0
File Interpreter ABI Platform Actions
hatch_native-0.1.0-py3-none-any.whl Python 3 none any Details for hatch_native-0.1.0-py3-none-any.whl

Total release size: 33.9 kB

Release files / hatch_native-0.1.0.tar.gz

Download URL hatch_native-0.1.0.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a75a8473336caa1440e40ffdd80a9390910c953ba38bf0a7b875fedf6ab69910
BLAKE2b-256 checksum
How to use checksums
9894691c972bdba72019468d46f5972310659aa069003aa622bdfa7eff0d8d0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / hatch_native-0.1.0-py3-none-any.whl

Download URL hatch_native-0.1.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6f76ab6606df5487e1aa09d71746b7b5f30e08821b993bc5a2f86c4a5a0d60b
BLAKE2b-256 checksum
How to use checksums
38b6997be48f2275429b763abed93da3401859fd4c04454444d2cf36ca096284
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for hatch-native 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page