Hatchling plugin to read project dependencies from requirements.txt
Project description
Hatchling plugin to read project dependencies from requirements.txt
Tests |
|
---|---|
PyPI |
|
Anaconda |
|
Activity |
|
QA |
|
Other |
Usage
In your pyproject.toml make the following changes:
Append hatch-requirements-txt to build-system.requires.
Append "dependencies" to project.dynamic.
Add the following table:
[tool.hatch.metadata.hooks.requirements_txt]
files = ["requirements.txt"]
The resulting pyproject.toml should look something like:
[build-system]
requires = ["hatchling", "hatch-requirements-txt"]
build-backend = "hatchling.build"
[project]
name = "my-project"
version = "1.0.0"
dynamic = ["dependencies"]
[tool.hatch.metadata.hooks.requirements_txt]
files = ["requirements.txt"]
You can also define groups of optional dependencies (also known as “features”) by appending optional-dependencies to project.dynamic and adding a table like:
[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
crypto = ["requirements-crypto.txt"]
fastjson = ["requirements-fastjson.txt"]
cli = ["requirements-cli.txt"]
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
Built Distribution
Close
Hashes for hatch_requirements_txt-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb87ecee32e4ac05d09854ac3c279dd526fbd655154acd9cd10c2a4768a83669 |
|
MD5 | 8e61f4b3918e0a82e17ff4cf2260bb49 |
|
BLAKE2b-256 | efa0e0bf0e734026f6be03a6b752b4557c584638295a6d5e37cf70eff6b1aee5 |
Close
Hashes for hatch_requirements_txt-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c36deaa99fcbe63ff8613f6452cdb6a9453ec3be1722d36ffcefca66eea41c22 |
|
MD5 | b8d84d19e0d7c75edf5c09b3924fe439 |
|
BLAKE2b-256 | 8b14419832398d28d34e607ee1f98a9384a0a3bc214eeef88bb8c09a167c6213 |