Skip to content

Commit eb950a0

Browse files
authored
Fix XPK version in Pypi release (#428)
* Added manual option to pypi release * setuptools-git-versioning removed from build requirements
1 parent e4ac851 commit eb950a0

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/build_wheels.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ name: PyPi releases
1717
on:
1818
workflow_dispatch:
1919
inputs:
20+
pypi:
21+
type: boolean
22+
required: false
23+
default: false
2024
testpypi:
2125
type: boolean
2226
required: false
@@ -83,7 +87,7 @@ jobs:
8387
verbose: true
8488
publish-to-pypi:
8589
name: Publish Python distribution to PyPI
86-
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
90+
if: ${{inputs.pypi}} == true || startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
8791
needs:
8892
- build
8993
runs-on: ubuntu-latest

pyproject.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ dependencies = [
4848
"Bug Tracker" = "https://github.com/google/xpk/issues"
4949

5050
[build-system]
51-
requires = ["setuptools>=61.0", "setuptools-git-versioning"]
51+
requires = ["setuptools>=61.0"]
5252
build-backend = "setuptools.build_meta"
5353

5454
[project.scripts]
@@ -65,16 +65,14 @@ dev = [
6565
"docker==7.1.0"
6666
]
6767

68+
[tool.setuptools.dynamic]
69+
version = {attr = "xpk.core.config.__version__"}
70+
6871
[tool.setuptools]
6972
packages = ["xpk", "xpk.parser", "xpk.core", "xpk.commands", "xpk.api", "xpk.templates", "xpk.utils", "xpk.core.blueprint", "xpk.core.remote_state", "xpk.core.workload_decorators"]
7073
package-dir = {"" = "src"}
7174
package-data = {"xpk.api" = ["storage_crd.yaml"], "xpk.templates" = ["storage.yaml"]}
7275

73-
[tool.setuptools-git-versioning]
74-
enabled = true
75-
dev_template = "{tag}+{sha}"
76-
dirty_template = "{tag}+{sha}.dirty"
77-
7876
[tool.pyink]
7977
# Formatting configuration to follow Google style-guide.
8078
line-length = 80

0 commit comments

Comments
 (0)