Skip to content

Commit f26d36c

Browse files
committed
fix: Make the library version dynamic.
The python build tooling was still using the version in the pyproject.toml file. Because of branch protection, we can't make updates to this file as a part of CI so we need to infer the version from version control during the build process.
1 parent 9ed7524 commit f26d36c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

backend/pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
[build-system]
2-
requires = ["setuptools"]
2+
requires = ["setuptools", "setuptools-scm>8.1"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "openedx-sample-plugin"
77
description = "A sample backend plugin for the Open edX Platform"
88
requires-python = ">=3.11"
99
license="Apache-2.0"
10-
version = "0.1.0"
1110
authors = [
1211
{name = "Open edX Project", email = "oscm@openedx.org"},
1312
]
@@ -25,7 +24,7 @@ keywords= [
2524
"edx",
2625
]
2726

28-
dynamic = ["readme", "dependencies"]
27+
dynamic = ["readme", "dependencies", "version"]
2928

3029
[project.entry-points."lms.djangoapp"]
3130
sample_plugin = "sample_plugin.apps:SamplePluginConfig"
@@ -47,6 +46,7 @@ exclude = ["sample_plugin.tests*"]
4746

4847
[tool.semantic_release]
4948
build_command = "pip install build && python -m build"
50-
version_toml = [
51-
"pyproject.toml:project.version"
52-
]
49+
50+
[tool.setuptools_scm]
51+
# The root for the gith repo is one directory up.
52+
root = ".."

0 commit comments

Comments
 (0)