Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protos, python: use betterproto #315

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion protos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go:

# Creates the python libs in the python/ directory.
python:
protoc --python_out=../python $(shell find ./in_toto_attestation -name "*.proto")
make -C ../python protos
make -C ../python reformat

# Creates the java libs in the java/ directory.
Expand Down
12 changes: 12 additions & 0 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ BUMP_ARGS :=
# subset of development dependencies.
INSTALL_EXTRA := dev

PROTOS = $(shell find ../protos/in_toto_attestation -name "*.proto")

.PHONY: all
all:
@echo "Run my targets individually!"
Expand Down Expand Up @@ -61,3 +63,13 @@ package: $(VENV_STAMP)
.PHONY: edit
edit:
$(EDITOR) $(ALL_PY_SRCS)

.PHONY: protos
protos: $(VENV_STAMP)
@# TODO: Enable `--python_betterproto_opt=pydantic_dataclasses` once
@# Pydantic V2 is supported: https://github.com/danielgtaylor/python-betterproto/issues/530
protoc \
-I../protos \
--python_betterproto_out=./in_toto_attestation/_internal \
$(PROTOS)
$(MAKE) reformat
2 changes: 1 addition & 1 deletion python/in_toto_attestation/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "0.9.3"
__version__ = "0.9.3"
Empty file.
Empty file.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions python/in_toto_attestation/predicates/link/v0/link_pb2.py

This file was deleted.

Loading
Loading