Skip to content

Commit 2e83eb5

Browse files
committed
Use setuptools_scm to compute version number
1 parent c62d61e commit 2e83eb5

File tree

4 files changed

+9
-587
lines changed

4 files changed

+9
-587
lines changed

bin/generate.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
version=$(cat VERSION)
3+
version=$(uvx --from setuptools-scm python -m setuptools_scm)
44

55
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.10.0 generate \
66
-i https://raw.githubusercontent.com/localstack/openapi/refs/heads/main/openapi/emulators/localstack-spec-latest.yml \

packages/localstack-sdk-generated/pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "localstack-sdk-generated"
3-
version = "0.0.4"
3+
version = "0.1.dev9"
44
description = "LocalStack REST API - Generated Code"
55
authors = [
66
{ name = "LocalStack Contributors", email = "[email protected]" }
@@ -27,4 +27,4 @@ package-dir = { "" = "."}
2727
[tool.setuptools.packages.find]
2828
where = ["."]
2929
include = ["*"]
30-
exclude = ["tests*"]
30+
exclude = ["tests*"]

pyproject.toml

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Python SDK for LocalStack"
55
authors = [
66
{ name = "LocalStack Team", email = "[email protected]"}
77
]
8-
version = "0.0.4"
8+
dynamic = ["version"]
99
dependencies = [
1010
"localstack-sdk-generated"
1111
]
@@ -17,9 +17,12 @@ Repository = "https://github.com/localstack/localstack-sdk-python.git"
1717
Issues = "https://github.com/localstack/localstack-sdk-python/issues"
1818

1919
[build-system]
20-
requires = ["setuptools>=64"]
20+
requires = ["setuptools>=64", "setuptools_scm>=8"]
2121
build-backend = "setuptools.build_meta"
2222

23+
[tool.setuptools_scm]
24+
local_scheme = "no-local-version"
25+
2326
[tool.setuptools.dynamic]
2427
readme = { file = ["README.md"], content-type = "text/markdown"}
2528

@@ -30,6 +33,7 @@ dev-dependencies=[
3033
"boto3>=1.35.40",
3134
"sphinx>=8.1.3"
3235
]
36+
cache-keys = [{ file = "pyproject.toml" }, { git = { commit = true , tags = true }}]
3337

3438
[tool.uv.sources]
3539
localstack-sdk-generated = { workspace = true }

0 commit comments

Comments
 (0)