Skip to content

Commit b8c0ff2

Browse files
committed
base poetry make command and ref
1 parent da01209 commit b8c0ff2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@ PATH_TO_SYNC_SPANNER_KEYS = `pwd`/service-account.json
99
# Assumes you've cloned the server-syncstorage repo locally into a peer dir.
1010
# https://github.com/mozilla-services/server-syncstorage
1111
PATH_TO_GRPC_CERT = ../server-syncstorage/local/lib/python2.7/site-packages/grpc/_cython/_credentials/roots.pem
12+
INSTALL_STAMP := .install.stamp
13+
POETRY := $(shell command -v poetry 2> /dev/null)
1214

1315
SRC_ROOT = $(shell pwd)
1416
PYTHON_SITE_PACKGES = $(shell $(SRC_ROOT)/venv/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
1517

18+
.PHONY: install
19+
install: $(INSTALL_STAMP) ## Install dependencies with poetry
20+
$(INSTALL_STAMP): pyproject.toml poetry.lock
21+
@if [ -z $(POETRY) ]; then echo "Poetry could not be found. See https://python-poetry.org/docs/"; exit 2; fi
22+
$(POETRY) install
23+
touch $(INSTALL_STAMP)
24+
1625
clippy_mysql:
1726
# Matches what's run in circleci
1827
cargo clippy --workspace --all-targets --no-default-features --features=syncstorage-db/mysql --features=py_verifier -- -D warnings

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ mypy = "^1.10.1"
2121
pydocstyle = "^6.3.0"
2222
bandit = "^1.7.9"
2323

24-
2524
[build-system]
2625
requires = ["poetry-core"]
2726
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)