From 291a40eaa49b583349ba07ee155a214b22d76e01 Mon Sep 17 00:00:00 2001 From: Ethan Donowitz <8703826+ethowitz@users.noreply.github.com> Date: Wed, 16 Mar 2022 14:11:33 -0400 Subject: [PATCH] chore: add Python build to Makefile (#1244) Closes #1226 --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8737881e..08aa731a 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,10 @@ clippy: # Matches what's run in circleci cargo clippy --all --all-targets --all-features -- -D warnings +clean: + cargo clean + rm -r venv + docker_start_mysql: docker-compose -f docker-compose.mysql.yaml up -d @@ -35,8 +39,12 @@ docker_start_spanner_rebuild: docker_stop_spanner: docker-compose -f docker-compose.spanner.yaml down -run: - RUST_LOG=debug RUST_BACKTRACE=full cargo run --features tokenserver_test_mode -- --config config/local.toml +python: + python3 -m venv venv + venv/bin/python -m pip install -r requirements.txt + +run: python + PATH=./venv/bin:$(PATH) RUST_LOG=debug RUST_BACKTRACE=full cargo run --features tokenserver_test_mode -- --config config/local.toml run_spanner: GOOGLE_APPLICATION_CREDENTIALS=$(PATH_TO_SYNC_SPANNER_KEYS) GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=$(PATH_TO_GRPC_CERT) make run