Skip to main content

very simple C build plugin for hatch, supporting CPython only

Project description

hatch-c

build PyPI

Very simple C build plugin for hatch, supporting CPython only.

[build-system]
requires = ["hatchling>=1.20", "hatch-c"]
build-backend = "hatchling.build"

[[tool.hatch.build.hooks.hatch-c.extension]]
name = "mypackage.mylib"
sources = ["src/module.c"]
include-dirs = ["src/"] # paths to add with `-I`
library-dirs = [] # paths to add with `-L`
libraries = [] # libraries to link with `-l` 
extra-compile-args = []
extra-link-args = []
extra-objects = []
define-macros = [] # macros to define with `-D`
undef-macros = [] # macros to undefine with `-U`
py-limited-api = "cp39"  # optional limited API to use

hatch-c is driven by pydantic models for configuration and execution of the build. These models can themselves be overridden by setting build-config-class / build-plan-class.

Other Python Build Backends for C Extensions

Acknowledgments

This project was heavily modified and stripped down from https://github.com/python-project-templates/hatch-cpp

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hatch_c-0.2.1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hatch_c-0.2.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file hatch_c-0.2.1.tar.gz.

File metadata

  • Download URL: hatch_c-0.2.1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hatch_c-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e6a17b4f3b3ba90365544f748ad60e9e557c262b0fe507ed5df003b903d4f546
MD5 411e4f1aeb002bc6147b049eb66c8ca1
BLAKE2b-256 f72211a0915ddcb25dbd742bc6cc31ca21b401e90e4bd4a1a8cde799824d834b

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_c-0.2.1.tar.gz:

Publisher: build.yml on zacharyburnett/hatch-c

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hatch_c-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: hatch_c-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hatch_c-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6534afda06312aaf056153a98723c891819957cc430e911ab449168882622f2b
MD5 afe1476c92f1497e0107f7eda56c9325
BLAKE2b-256 70622cd6626c5bdd0be150679a16bce4f8479ec3db175a913da0279730b8445b

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_c-0.2.1-py3-none-any.whl:

Publisher: build.yml on zacharyburnett/hatch-c

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page