Skip to content

Commit

Permalink
Use requirements in hatch
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcampbell committed Dec 20, 2023
1 parent 17f7c72 commit 7d25b81
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
21 changes: 14 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
requires = ["hatchling", "hatch-vcs", "hatch-requirements-txt"]
build-backend = "hatchling.build"

[project]
name = "nsls2api"
dynamic = ["version"]
dynamic = ["version","dependencies"]
description = ''
readme = "README.md"
requires-python = ">=3.9"
Expand All @@ -24,11 +24,12 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"hatch",
"hatch-vcs",
"typer",
]
#dependencies = [
# "hatch",
# "hatch-requirements-txt",
# "hatch-vcs",
# "typer",
#]

[project.scripts]
nsls2api = "nsls2api.cli.cli:app"
Expand All @@ -37,6 +38,12 @@ nsls2api = "nsls2api.cli.cli:app"
version.source = "vcs"
build.hooks.vcs.version-file = "src/nsls2api/_version.py"

[tool.hatch.metadata.hooks.requirements_txt]
files = ["requirements.txt"]

#[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
#dev = ["requirements-dev.txt"]

[tool.black]
target_version = ['py311']
include = '\.pyi?$'
Expand Down
4 changes: 2 additions & 2 deletions src/nsls2api/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE

__version__ = version = '0.1.dev233+gacc406b.d20231218'
__version_tuple__ = version_tuple = (0, 1, 'dev233', 'gacc406b.d20231218')
__version__ = version = '0.1.dev243+g17f7c72.d20231220'
__version_tuple__ = version_tuple = (0, 1, 'dev243', 'g17f7c72.d20231220')

0 comments on commit 7d25b81

Please sign in to comment.