Skip to content

Commit 9f39226

Browse files
committed
fix versioning issue
1 parent 35f8973 commit 9f39226

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,7 @@ localstack-pro-azure/tests/otherlangs/dotnet/*/obj
6363

6464
# setuptools_scm version.py
6565
*/*/*/*/version.py
66-
localstack-sdk-python-2/.openapi-generator/
66+
localstack-sdk-python-2/.openapi-generator/
67+
68+
# setuptools_scm version.py
69+
**/version.py

VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

localstack-sdk-python/localstack/sdk/clients.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from localstack.sdk import version
12
from localstack.sdk.api_client import ApiClient
23
from localstack.sdk.configuration import Configuration
34

@@ -30,3 +31,5 @@ def __init__(self, host: str | None = None, auth_token: str | None = None, **kwa
3031
self.auth_token = auth_token
3132
self.configuration = Configuration(host=self.host)
3233
self._api_client = ApiClient(configuration=self.configuration)
34+
# The generated code comes with 1.0.0 hard-coded. We set here the correct version
35+
self._api_client.user_agent = f"OpenAPI-Generator/{version.version}/python"

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ requires = ["setuptools>=64", "setuptools_scm>=8"]
2121
build-backend = "setuptools.build_meta"
2222

2323
[tool.setuptools_scm]
24+
version_file = "localstack-sdk-python/localstack/sdk/version.py"
2425
local_scheme = "no-local-version"
2526

2627
[tool.setuptools.dynamic]

0 commit comments

Comments
 (0)