diff --git a/pyproject.toml b/pyproject.toml index c2a6186..b1c60e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [build-system] -requires = ["hatchling", "hatch-fancy-pypi-readme"] +requires = ["hatchling", "hatch-fancy-pypi-readme", "hatch-requirements-txt"] build-backend = "hatchling.build" [project] name = "PROJECT_NAME" -dynamic = ["version", "readme"] +dynamic = ["version", "readme", "optional-dependencies"] description = "__DESCRIPTION__" license = {file = "LICENSE"} requires-python = ">= 3.7" @@ -36,6 +36,9 @@ classifiers = [ ] dependencies = [] +[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies] +example-depends = ["requirements-examples.txt"] + [project.urls] GitHub = "https://www.github.com/pimoroni/PROJECT_NAME-python" Homepage = "https://www.pimoroni.com" @@ -48,7 +51,8 @@ include = [ "PROJECT_NAME", "README.md", "CHANGELOG.md", - "LICENSE" + "LICENSE", + "requirements-examples.txt" ] [tool.hatch.build.targets.sdist] diff --git a/requirements-dev.txt b/requirements-dev.txt index 525b042..d392e8f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,5 +5,6 @@ isort twine hatch hatch-fancy-pypi-readme +hatch-requirements-txt tox pdoc diff --git a/requirements-examples.txt b/requirements-examples.txt new file mode 100644 index 0000000..e69de29 diff --git a/tox.ini b/tox.ini index 4726cef..2b6d87b 100644 --- a/tox.ini +++ b/tox.ini @@ -23,12 +23,5 @@ commands = ruff check . codespell . deps = - check-manifest - ruff - codespell - isort - twine - build - hatch - hatch-fancy-pypi-readme + -r{toxinidir}/requirements-dev.txt