Skip to content

Commit ce98e61

Browse files
committed
fix(python-internal): The python-sdk-beta does not contain a core package.
The generation of the internal python sdk needs to be adjusted to not reference a local core package Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
1 parent 4fe467b commit ce98e61

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

languages/python/templates/pyproject.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ dev = [
4747
[tool.uv]
4848
default-groups = "all"
4949

50+
{{#useLocalCore}}
5051
[tool.uv.sources]
5152
stackit-core = { path = "../../core" }
53+
{{/useLocalCore}}
5254

5355
[tool.hatch.build.targets.sdist]
5456
include = ["src/stackit"]

scripts/generate-sdk/languages/python.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ generate_python_sdk() {
8080

8181
warning=""
8282

83+
# There is no core in the internal python sdk, therefore the generation of pyproject.toml
84+
# needs some adjustment.
85+
local extra_props_internal="useLocalCore=true"
86+
if [[ "${GIT_REPO_ID}" == "stackit-sdk-python-beta" ]]; then
87+
extra_props_internal=""
88+
fi
89+
8390
# TODO: add to generator below when adding multi-API-version support:
8491
# --inline-schema-options "SKIP_SCHEMA_REUSE=true"
8592

@@ -118,7 +125,7 @@ generate_python_sdk() {
118125
--git-user-id "${GIT_USER_ID}" \
119126
--git-repo-id "${GIT_REPO_ID}" \
120127
--global-property apis,models,modelTests=false,modelDocs=false,apiDocs=false,apiTests=false,supportingFiles \
121-
--additional-properties=pythonPackageName="stackit-${service},removeEnumValuePrefix=false" >/dev/null \
128+
--additional-properties=pythonPackageName="stackit-${service},removeEnumValuePrefix=false,${extra_props_internal}" >/dev/null \
122129
--http-user-agent "stackit-sdk-python/${service}"
123130

124131
# Remove unnecessary files

0 commit comments

Comments
 (0)