hatch-deps-selector
This package provides a Hatch plugin for configuring "variants" of dependencies according to an environment variable. This can be used e.g. to change the package dependencies for conda-forge vs PyPI builds.
Table of Contents
Global dependency
Ensure hatch-deps-selector is defined within the build-system.requires field in your pyproject.toml file.
[build-system]
requires = ["hatchling", "hatch-deps-selector"]
build-backend = "hatchling.build"
Build plugin
The build plugin name is selector.
-
pyproject.toml
[tool.hatch.build.hooks.selector] default-variant = "foo" env-var = <ENV-VAR-NAME> [tool.hatch.build.hooks.selector.variants.foo] dependencies = ["numpy"]
-
hatch.toml
[build.hooks.selector] default-variant = "foo" env-var = <ENV-VAR-NAME> [build.hooks.selector.variants.foo] dependencies = ["numpy"]
By default, set HATCH_SELECTOR_VARIANT=<VARIANT> to select the dependencies from <VARIANT> as additional project dependencies.
This might be used to only pull in certain dependencies when building for PyPI vs conda-forge.
Build plugin options
| Option | Type | Default | Description |
|---|---|---|---|
default-variant |
str |
None | Name of default variant to use if environment variable is unset. |
env-var |
str |
HATCH_SELECTOR_VARIANT |
Name of environment variable to control built variant. |
variants |
dict |
{} |
Table of variant-tables with dependencies field. |
License
hatch-deps-selector is distributed under the terms of the MIT license.
Metadata
Release files for hatch-deps-selector 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hatch_deps_selector-0.1.2.tar.gz | 3.9 kB | Without provenance | Details for hatch_deps_selector-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hatch_deps_selector-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for hatch_deps_selector-0.1.2-py3-none-any.whl |
Total release size: 10.3 kB
Release files / hatch_deps_selector-0.1.2.tar.gz
| Download URL | hatch_deps_selector-0.1.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d87d62c83292ce356e9f1b0386dd4f88de7f2ab0e52bfe476fc3e4ee2421e61
|
|
BLAKE2b-256 checksum How to use checksums |
d9901ad348089226ad1c2190f5be2dacc487d17ed745db666e62c80b4c0907e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / hatch_deps_selector-0.1.2-py3-none-any.whl
| Download URL | hatch_deps_selector-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa257b0d1b11cf4936a8301cacccb9185d0bf51913a59a276eae124d2ac9bc4d
|
|
BLAKE2b-256 checksum How to use checksums |
b6332f808dc1445e5a4f056d034f1dc031b0242879abd6b6ce18596860f4e4ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for hatch-deps-selector 0.1.2
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.