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.3.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.3.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hatch_buildext-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6756ee345953352d57b9336a9ea9a263d753c38346e2072ddcfc1591ed233f0d
MD5 1b726e1b90f38fa62c9eddb4f43c97f3
BLAKE2b-256 45336ee17585bb6795d32fb48a6fbe078edd8777f550b780fdbf79819fd68079

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_buildext-0.3.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.3.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for hatch_buildext-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 250c16bcd0954b3a8c98476be5b8dbb8aa2b311e82980fd86c1f829854ac3405
MD5 420a1a4cbb7f7b79aa9b9ec5cc1bdaeb
BLAKE2b-256 a743e8f9469f58e4cf040b66c2fbc5963d5a58179596b2912ebfd68bd14039da

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_buildext-0.3.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