2020-05-08 13:34:09 +00:00
|
|
|
VENV_NAME?=venv
|
|
|
|
VENV_ACTIVATE=. $(VENV_NAME)/bin/activate
|
|
|
|
PYTHON=${VENV_NAME}/bin/python3.8
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "clean - remove build and Python file artifacts"
|
2020-05-11 15:38:00 +00:00
|
|
|
# Run with venv
|
|
|
|
@echo "venv_deposit - run deposit cli with venv"
|
|
|
|
@echo "venv_build - install basic dependencies with venv"
|
|
|
|
@echo "venv_build_test - install testing dependencies with venv"
|
|
|
|
@echo "venv_lint - check style with flake8 and mypy with venv"
|
|
|
|
@echo "venv_test - run tests with venv"
|
2020-05-08 13:34:09 +00:00
|
|
|
|
2020-02-18 16:44:32 +00:00
|
|
|
clean:
|
|
|
|
rm -rf venv/
|
2020-05-07 04:39:04 +00:00
|
|
|
rm -rf build/
|
|
|
|
rm -rf dist/
|
|
|
|
rm -rf *.egg-info
|
2020-05-21 19:37:43 +00:00
|
|
|
rm -rf .tox/
|
2020-02-18 16:44:32 +00:00
|
|
|
find . -name __pycache__ -exec rm -rf {} \;
|
|
|
|
find . -name .mypy_cache -exec rm -rf {} \;
|
|
|
|
find . -name .pytest_cache -exec rm -rf {} \;
|
|
|
|
|
2020-05-08 13:34:09 +00:00
|
|
|
$(VENV_NAME)/bin/activate: requirements.txt
|
|
|
|
@test -d $(VENV_NAME) || python3 -m venv --clear $(VENV_NAME)
|
2020-05-21 16:18:09 +00:00
|
|
|
${VENV_NAME}/bin/python setup.py install
|
2020-05-08 13:34:09 +00:00
|
|
|
${VENV_NAME}/bin/python -m pip install -r requirements.txt
|
|
|
|
${VENV_NAME}/bin/python -m pip install -r requirements_test.txt
|
|
|
|
@touch $(VENV_NAME)/bin/activate
|
|
|
|
|
2020-05-11 15:38:00 +00:00
|
|
|
venv_build: $(VENV_NAME)/bin/activate
|
2020-05-08 13:34:09 +00:00
|
|
|
|
2020-05-11 15:38:00 +00:00
|
|
|
venv_build_test: venv_build
|
2020-05-08 13:34:09 +00:00
|
|
|
${VENV_NAME}/bin/python -m pip install -r requirements_test.txt
|
2020-03-04 17:38:34 +00:00
|
|
|
|
2020-05-11 15:38:00 +00:00
|
|
|
venv_test: venv_build_test
|
2020-05-08 13:34:09 +00:00
|
|
|
$(VENV_ACTIVATE) && python -m pytest .
|
2020-02-18 16:44:32 +00:00
|
|
|
|
2020-05-11 15:38:00 +00:00
|
|
|
venv_lint: venv_build_test
|
2020-05-23 14:35:22 +00:00
|
|
|
$(VENV_ACTIVATE) && flake8 --config=flake8.ini ./eth2deposit ./cli ./tests && mypy --config-file mypy.ini -p eth2deposit
|
2020-02-18 16:44:32 +00:00
|
|
|
|
2020-05-11 15:38:00 +00:00
|
|
|
venv_deposit: venv_build
|
|
|
|
$(VENV_ACTIVATE) && python ./eth2deposit/deposit.py
|
2020-07-24 12:23:37 +00:00
|
|
|
|
2020-07-24 14:16:45 +00:00
|
|
|
build_macos: venv_build
|
|
|
|
${VENV_NAME}/bin/python -m pip install -r ./build_configs/macos/requirements.txt
|
|
|
|
$(VENV_ACTIVATE) && pyinstaller ./build_configs/macos/build.spec
|
2020-07-27 09:43:32 +00:00
|
|
|
|
|
|
|
build_linux: venv_build
|
|
|
|
${VENV_NAME}/bin/python -m pip install -r ./build_configs/linux/requirements.txt
|
|
|
|
$(VENV_ACTIVATE) && pyinstaller ./build_configs/linux/build.spec
|