Skip to content

Commit

Permalink
set up setuptools_scm
Browse files Browse the repository at this point in the history
  • Loading branch information
phinate committed Sep 20, 2024
1 parent 6539034 commit 524013a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[build-system]
requires = ["setuptools>=61"]
requires = ["setuptools>=61", "setuptools_scm[toml]>=7"]
build-backend = "setuptools.build_meta"


[project]
name = "cloudcasting"
version = "0.3.0"
dynamic = ["version"]
authors = [
{ name = "cloudcasting Maintainers", email = "[email protected]" },
]
Expand Down Expand Up @@ -60,6 +60,9 @@ dev = [
[tool.setuptools.package-data]
"cloudcasting" = ["data/*.zip"]

[tool.setuptools_scm]
write_to = "src/cloudcasting/_version.py"

[project.scripts]
cloudcasting = "cloudcasting.cli:app"

Expand Down
5 changes: 2 additions & 3 deletions src/cloudcasting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from __future__ import annotations

from importlib.metadata import version

from jaxtyping import install_import_hook

# Any module imported inside this `with` block, whose
Expand All @@ -19,6 +17,8 @@

from cloudcasting import cli, dataset, download, metrics

from ._version import version as __version__

__all__ = (
"__version__",
"download",
Expand All @@ -28,4 +28,3 @@
"validation",
"metrics",
)
__version__ = version(__name__)
1 change: 1 addition & 0 deletions src/cloudcasting/_version.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version: str

0 comments on commit 524013a

Please sign in to comment.