| 1 | BUILD_VIRTUAL_ENV:=build/venv |
| 2 | |
| 3 | test: |
| 4 | pytest |
| 5 | |
| 6 | test_nvim: |
| 7 | VSPEC_VIM=nvim pytest |
| 8 | |
| 9 | test_coverage: export PYTEST_ADDOPTS:=--cov pythonx --cov test --cov-report=term-missing:skip-covered |
| 10 | test_coverage: test_nvim |
| 11 | |
| 12 | $(dir $(BUILD_VIRTUAL_ENV)): |
| 13 | mkdir -p $@ |
| 14 | |
| 15 | $(BUILD_VIRTUAL_ENV): | $(dir $(BUILD_VIRTUAL_ENV)) |
| 16 | python -m venv $@ |
| 17 | |
| 18 | $(BUILD_VIRTUAL_ENV)/bin/vint: | $(BUILD_VIRTUAL_ENV) |
| 19 | $|/bin/python -m pip install vim-vint==0.3.21 |
| 20 | |
| 21 | $(BUILD_VIRTUAL_ENV)/bin/flake8: | $(BUILD_VIRTUAL_ENV) |
| 22 | $|/bin/python -m pip install -q flake8==3.7.8 |
| 23 | |
| 24 | vint: $(BUILD_VIRTUAL_ENV)/bin/vint |
| 25 | $(BUILD_VIRTUAL_ENV)/bin/vint after autoload ftplugin plugin |
| 26 | |
| 27 | flake8: $(BUILD_VIRTUAL_ENV)/bin/flake8 |
| 28 | $(BUILD_VIRTUAL_ENV)/bin/flake8 pythonx/jedi_*.py |
| 29 | |
| 30 | check: vint flake8 |
| 31 | |
| 32 | clean: |
| 33 | rm -rf build |
| 34 | |
| 35 | .PHONY: test check clean vint flake8 |