From b8c0ff29d27c981b2c73a4b4fb5a3cae13fd9048 Mon Sep 17 00:00:00 2001 From: Taddes Date: Thu, 18 Jul 2024 14:56:36 -0400 Subject: [PATCH] base poetry make command and ref --- Makefile | 9 +++++++++ pyproject.toml | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 73b95c7171..e78012cf72 100644 --- a/Makefile +++ b/Makefile @@ -9,10 +9,19 @@ PATH_TO_SYNC_SPANNER_KEYS = `pwd`/service-account.json # Assumes you've cloned the server-syncstorage repo locally into a peer dir. # https://github.com/mozilla-services/server-syncstorage PATH_TO_GRPC_CERT = ../server-syncstorage/local/lib/python2.7/site-packages/grpc/_cython/_credentials/roots.pem +INSTALL_STAMP := .install.stamp +POETRY := $(shell command -v poetry 2> /dev/null) SRC_ROOT = $(shell pwd) PYTHON_SITE_PACKGES = $(shell $(SRC_ROOT)/venv/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +.PHONY: install +install: $(INSTALL_STAMP) ## Install dependencies with poetry +$(INSTALL_STAMP): pyproject.toml poetry.lock + @if [ -z $(POETRY) ]; then echo "Poetry could not be found. See https://python-poetry.org/docs/"; exit 2; fi + $(POETRY) install + touch $(INSTALL_STAMP) + clippy_mysql: # Matches what's run in circleci cargo clippy --workspace --all-targets --no-default-features --features=syncstorage-db/mysql --features=py_verifier -- -D warnings diff --git a/pyproject.toml b/pyproject.toml index 571f99f8cc..97f5eb2772 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,6 @@ mypy = "^1.10.1" pydocstyle = "^6.3.0" bandit = "^1.7.9" - [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"