Skip to content

Commit 4bfc3db

Browse files
committed
use dynamic version in pyproject.toml
1 parent a81211a commit 4bfc3db

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
"python.defaultInterpreterPath": "python3",
66
"modulename": "${workspaceFolderBasename}",
77
"distname": "${workspaceFolderBasename}",
8-
"moduleversion": "1.0.2"
98
}

.vscode/tasks.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@
128128
"type": "process",
129129
"command": "sphinx-apidoc",
130130
"args": [
131-
"--doc-project=${config:modulename}",
132-
"--doc-author=semuadmin",
133-
"--doc-version=${config:moduleversion}",
134-
"--doc-release=${config:moduleversion}",
135131
"--ext-autodoc",
136132
"--ext-viewcode",
137133
"--templatedir=docs",
@@ -180,15 +176,15 @@
180176
},
181177
{
182178
"label": "Install Locally",
183-
"type": "process",
179+
"type": "shell",
184180
"command": "${config:python.defaultInterpreterPath}",
185181
"args": [
186182
"-m",
187183
"pip",
188184
"install",
189-
"${workspaceFolder}/dist/${config:distname}-${config:moduleversion}-py3-none-any.whl",
190185
"--user",
191-
"--force-reinstall"
186+
"--force-reinstall",
187+
"*.whl"
192188
],
193189
"dependsOrder": "sequence",
194190
"dependsOn": [
@@ -202,6 +198,9 @@
202198
"Build",
203199
"Sphinx HTML"
204200
],
201+
"options": {
202+
"cwd": "dist"
203+
},
205204
"problemMatcher": []
206205
},
207206
]

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta:__legacy__"
44

55
[project]
66
name = "pyubxutils"
7+
dynamic = ["version"]
78
authors = [{ name = "semuadmin", email = "semuadmin@semuconsulting.com" }]
89
maintainers = [{ name = "semuadmin", email = "semuadmin@semuconsulting.com" }]
910
description = "UBX Protocol Command Line Utilities"
10-
version = "1.0.2"
1111
license = { file = "LICENSE" }
1212
readme = "README.md"
1313
requires-python = ">=3.9"
@@ -62,6 +62,9 @@ test = [
6262
"sphinx-rtd-theme",
6363
]
6464

65+
[tool.setuptools.dynamic]
66+
version = { attr = "pyubxutils._version.__version__" }
67+
6568
[tool.black]
6669
target-version = ['py39']
6770

0 commit comments

Comments
 (0)