Skip to main content

No project description provided

Project description

hatch-buildext

PyPI - Version PyPI - Python Version Checks & Tests


Table of Contents

Usage

The only key currently recognised is extensions. This should be a map of key-value pairs mapping the extension name to a resolver.

# pyproject.toml
[tool.hatch.build.targets.wheel.hooks.buildext]
dependencies = ["hatch-buildext"]

[tool.hatch.build.targets.wheel.hooks.buildext.extensions]
libsome = "path.to.resolver"
libother =  "path.to.another"

Example

For instance, if using src layout, the directory structure could look as follows:

.
├── LICENSE.txt
├── README.md
├── pyproject.toml
├── src
│   ├── resolvers
│   │   ├── lib_a.py
│   │   └── lib_b.py
│   ├── liba
│   │   ├── foo.h
│   │   └── foo.c
│   ├── libb
│   │   ├── bar.h
│   │   └── bar.c
│   └── mypackage
│       ├── __about__.py
│       ├── __init__.py
│       ├── ...
│       └── core.py
└── tests
    ├── __init__.py
    ├── conftest.py
    ├── ...
    └── test_core.py

Then, if that you want to include both libraries as module extensions in mypackage, the extensions configuration would look as follows:

[tool.hatch.build.targets.wheel.hooks.buildext.extensions]
"mypackage.lib_a" = "src.resolvers.lib_a"
"mypackage.lib_b" =  "src.resolvers.lib_b"

[!WARNING] The configuration may change at any time until this package is stable.

Resolvers

Resolvers may implement or omit any part of the interface here. Each function will be passed the root of of the project directory while building, in order to make it easier to provide paths to build requirements in the project tree.

The meaning of these functions are identical to those in the setuptools Extension API.

[!WARNING] The interface may change at any time until this package is stable.

License

hatch-buildext is distributed under the terms of the Apache-2.0 license.

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_buildext-0.2.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

hatch_buildext-0.2.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file hatch_buildext-0.2.0.tar.gz.

File metadata

  • Download URL: hatch_buildext-0.2.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hatch_buildext-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b11dae010cdad3ec607bbbfa828780ad585656a191a8c788c5fda4eaebe53c03
MD5 b2361c2e6a0260ccc3510815c20efc49
BLAKE2b-256 1585a57217b83dd1ab291f088ceb5cf9bcdae9580af97dd32182564839ffc404

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_buildext-0.2.0.tar.gz:

Publisher: release.yml on xoudini/hatch-buildext

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_buildext-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: hatch_buildext-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for hatch_buildext-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29aef40b776b7be1b8d72ebae4858a1a4ac94ad3e4e345f38bdb103a650998d4
MD5 f3add763634f345bd832066aab330a06
BLAKE2b-256 e2cfea8890a39d1efa5a62291e4297d556346b4704d08cddf318c18143537956

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_buildext-0.2.0-py3-none-any.whl:

Publisher: release.yml on xoudini/hatch-buildext

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