Skip to content

Commit 9349bed

Browse files
author
Storm Knight
committed
py: add pyln-grpc-proto to PyPI publishing CI (fixes #7929)
Add pyln-grpc-proto to the pypi.yml publish matrix and create a dedicated update-pyln-grpc-version Makefile target that handles the package's non-standard directory layout (pyln/grpc/ instead of pyln/grpc-proto/) and strips the v-prefix from version tags. Also syncs the stale __version__ in pyln/grpc/__init__.py to match pyproject.toml.
1 parent c4c4d81 commit 9349bed

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/pypi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
WORKDIR: contrib/pyln-testing
2929
- PACKAGE: pyln-proto
3030
WORKDIR: contrib/pyln-proto
31+
- PACKAGE: pyln-grpc-proto
32+
WORKDIR: contrib/pyln-grpc-proto
3133
steps:
3234
- name: Checkout repository
3335
uses: actions/checkout@v4

Makefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -848,13 +848,23 @@ PYLNS=client proto testing
848848
update-versions: update-pyln-versions update-reckless-version update-dot-version # FIXME: update-doc-examples
849849
@uv lock
850850

851-
update-pyln-versions: $(PYLNS:%=update-pyln-version-%)
851+
update-pyln-versions: $(PYLNS:%=update-pyln-version-%) update-pyln-grpc-version
852852

853853
update-pyln-version-%:
854854
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
855855
@echo "Updating contrib/pyln-$* to $(NEW_VERSION)"
856-
@$(SED) -i.bak 's/^version = .*/version = "$(NEW_VERSION)"/' contrib/pyln-$*/pyproject.toml && rm contrib/pyln-$*/pyproject.toml.bak
857-
@$(SED) -i.bak 's/^__version__ = .*/__version__ = "$(NEW_VERSION)"/' contrib/pyln-$*/pyln/$*/__init__.py && rm contrib/pyln-$*/pyln/$*/__init__.py.bak
856+
@$(SED) -i.bak 's/^version = .*/version = "$(NEW_VERSION)"' contrib/pyln-$*/pyproject.toml && rm contrib/pyln-$*/pyproject.toml.bak
857+
@$(SED) -i.bak 's/^__version__ = .*/__version__ = "$(NEW_VERSION)"' contrib/pyln-$*/pyln/$*/__init__.py && rm contrib/pyln-$*/pyln/$*/__init__.py.bak
858+
859+
# pyln-grpc-proto uses a different directory layout (pyln/grpc/ not
860+
# pyln/grpc-proto/) and publishes versions without the 'v' prefix on
861+
# PyPI, so it needs its own update target.
862+
update-pyln-grpc-version:
863+
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
864+
@GRPC_VERSION=$$(echo "$(NEW_VERSION)" | $(SED) 's/^v//'); \
865+
echo "Updating contrib/pyln-grpc-proto to $$GRPC_VERSION"; \
866+
$(SED) -i.bak 's/^version = .*/version = "'$$GRPC_VERSION'"/' contrib/pyln-grpc-proto/pyproject.toml && rm contrib/pyln-grpc-proto/pyproject.toml.bak; \
867+
$(SED) -i.bak 's/^__version__ = .*/__version__ = "'$$GRPC_VERSION'"/' contrib/pyln-grpc-proto/pyln/grpc/__init__.py && rm contrib/pyln-grpc-proto/pyln/grpc/__init__.py.bak
858868

859869
pyln-release: $(PYLNS:%=pyln-release-%)
860870

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from pyln.grpc.primitives_pb2 import * # noqa: F401,F403
22
from pyln.grpc.node_pb2 import * # noqa: F401,F403
33
from pyln.grpc.node_pb2_grpc import * # noqa: F401,F403
4-
__version__ = "0.1.1"
4+
__version__ = "25.09"

0 commit comments

Comments
 (0)