Skip to content

Commit

Permalink
Use setuptools_scm to compute version number
Browse files Browse the repository at this point in the history
  • Loading branch information
giograno committed Dec 9, 2024
1 parent c62d61e commit 2e83eb5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 587 deletions.
2 changes: 1 addition & 1 deletion bin/generate.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.10.0 generate \
-i https://raw.githubusercontent.com/localstack/openapi/refs/heads/main/openapi/emulators/localstack-spec-latest.yml \
Expand Down
4 changes: 2 additions & 2 deletions packages/localstack-sdk-generated/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "localstack-sdk-generated"
version = "0.0.4"
version = "0.1.dev9"
description = "LocalStack REST API - Generated Code"
authors = [
{ name = "LocalStack Contributors", email = "[email protected]" }
Expand All @@ -27,4 +27,4 @@ package-dir = { "" = "."}
[tool.setuptools.packages.find]
where = ["."]
include = ["*"]
exclude = ["tests*"]
exclude = ["tests*"]
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Python SDK for LocalStack"
authors = [
{ name = "LocalStack Team", email = "[email protected]"}
]
version = "0.0.4"
dynamic = ["version"]
dependencies = [
"localstack-sdk-generated"
]
Expand All @@ -17,9 +17,12 @@ Repository = "https://github.com/localstack/localstack-sdk-python.git"
Issues = "https://github.com/localstack/localstack-sdk-python/issues"

[build-system]
requires = ["setuptools>=64"]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
local_scheme = "no-local-version"

[tool.setuptools.dynamic]
readme = { file = ["README.md"], content-type = "text/markdown"}

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

[tool.uv.sources]
localstack-sdk-generated = { workspace = true }
Expand Down
Loading

0 comments on commit 2e83eb5

Please sign in to comment.