Skip to content

Commit 702e793

Browse files
committed
Add: dynamic versioning
1 parent df5a2d0 commit 702e793

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,5 @@ venv.bak/
6666

6767
# Conda-forge recipe generated by grayskull
6868
pyospackage/*
69+
# setuptools scm generates this file - it should never be committed to history
70+
src/pyospackage/_version.py

changelog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Unreleased
44

5-
* Add: CI based pypi release workflow & dynamic versioning (@lwasser, #)
5+
* Add: CI based pypi release workflow & dynamic versioning (@lwasser, #32)
66
* Add: readthedocs config for building documentation (@lwasser)
77
* Add: Cleanup documentation structure (@lwasser)
88

pyproject.toml

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ build-backend = "hatchling.build"
66
name = "pyospackage"
77
description = "A package that adds numbers together"
88
readme = "README.md"
9-
version = "0.1.11"
9+
# version = "0.1.11" # Delete this line and add the line below to tell hatch to use dynamic versioning
10+
dynamic = ["version"]
1011
requires-python = ">=3.10"
1112
license = "MIT"
1213
keywords = []
@@ -25,7 +26,7 @@ dependencies = []
2526

2627
[project.urls]
2728
Homepage = "https://pypi.org/project/pyospackage/"
28-
Documentation = "https://github.com/pyopensci/pyospackage"
29+
Documentation = "https://pyospackage.readthedocs.io/en/latest/"
2930
Issues = "https://github.com/pyopensci/pyospackage/issues"
3031
Source = "https://github.com/pyopensci/pyospackage"
3132

@@ -47,15 +48,15 @@ docs = [
4748

4849
# ******* Hatch configuration here ******* #
4950

51+
# Setup dynamic versioning (this uses setuptools_scm on the backend)
5052
[tool.hatch]
5153
version.source = "vcs"
52-
build.hooks.vcs.version-file = "src/pyosmeta/_version.py"
54+
build.hooks.vcs.version-file = "src/pyospackage/_version.py"
5355

5456
[tool.hatch.envs.docs]
5557
# https://hatch.pypa.io/1.12/config/environment/overview/#features
5658
features = ["docs"]
5759

58-
5960
[tool.hatch.envs.docs.scripts]
6061
# Build your docs statically - html output
6162
# hatch run docs:docs-html

0 commit comments

Comments
 (0)