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

build: add a protobuf target to Makefile #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ SYSDEPS_INSTALLED = .sysdeps-installed
DEVENV = venv
DEVENVPIP = $(DEVENV)/bin/pip

PBDIR = macaroonbakery/bakery/_internal

.DEFAULT_GOAL := setup

$(DEVENVPIP):
Expand Down Expand Up @@ -62,6 +64,7 @@ help:
@echo 'make test - Run tests.'
@echo 'make lint - Run linter and pep8.'
@echo 'make check - Run all the tests and lint in all supported scenarios.'
@echo 'make protobuf - Compile the protobuf files into python modules.'
@echo 'make source - Create source package.'
@echo 'make wheel - Create wheel package.'
@echo 'make clean - Get rid of bytecode files, build and dist dirs, venvs.'
Expand All @@ -73,6 +76,11 @@ help:
@echo '- use tox as usual on this project;'
@echo ' see https://tox.readthedocs.org/en/latest/'

$(PBDIR)/%_pb2.py: $(PBDIR)/%.proto
protoc --python_out=$(PBDIR) --proto_path=$(PBDIR) $(notdir $^)

.PHONY: protobuf
protobuf: $(PBDIR)/id_pb2.py

.PHONY: lint
lint: setup
Expand Down