-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
44 lines (33 loc) · 1.58 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
VIRTUALENV ?= python3 -m venv
all:: compile
clean::
rm -rf build/contracts.json .requirements-installed
lint: install-requirements
flake8 tests py-deploy
black --check tests py-deploy
mypy --ignore-missing-imports tests py-deploy
test:: install
pytest tests
.requirements-installed: dev-requirements.txt
@echo "===> Installing requirements in your local virtualenv"
pip install -q -r dev-requirements.txt
pip install -q -r py-deploy/requirements.txt
@echo "This file controls for make if the requirements in your virtual env are up to date" > $@
install-requirements:: .requirements-installed
compile:: install-requirements
@echo "==> Compiling contracts"
deploy-tools compile --optimize
cp -p build/contracts.json py-bin/tlbin
python py-bin/scripts/merge_abis.py py-bin/tlbin/legacy_currency_networks.json py-bin/tlbin/contracts.json py-bin/tlbin/merged_abis.json
install0:: SETUPTOOLS_SCM_PRETEND_VERSION = $(shell python3 -c 'from setuptools_scm import get_version; print(get_version())')
install0:: compile
@echo "==> Installing py-bin/py-deploy into your local virtualenv"
/usr/bin/env SETUPTOOLS_SCM_PRETEND_VERSION=$(SETUPTOOLS_SCM_PRETEND_VERSION) pip install $(PIP_INSTALL_OPTIONS) ./py-bin
/usr/bin/env SETUPTOOLS_SCM_PRETEND_VERSION=$(SETUPTOOLS_SCM_PRETEND_VERSION) pip install $(PIP_INSTALL_OPTIONS) ./py-deploy
dist:: compile
cd py-bin; python setup.py sdist
cd py-deploy; python setup.py sdist
install:: PIP_INSTALL_OPTIONS = -q -e
install:: install-requirements install0
install-non-editable:: PIP_INSTALL_OPTIONS = -q
install-non-editable:: install-requirements install0