python-telegram-bot/Makefile

54 lines
1.3 KiB
Makefile
Raw Normal View History

.DEFAULT_GOAL := help
.PHONY: clean pep8 black lint test install
2015-07-07 22:19:26 +02:00
PYLINT := pylint
PYTEST := pytest
PEP8 := flake8
BLACK := black
2020-10-06 19:28:40 +02:00
MYPY := mypy
PIP := pip
2015-07-07 22:19:26 +02:00
clean:
rm -fr build
rm -fr dist
find . -name '*.pyc' -exec rm -f {} \;
find . -name '*.pyo' -exec rm -f {} \;
find . -name '*~' -exec rm -f {} \;
find . -regex "./telegram[0-9]*.\(jpg\|mp3\|mp4\|ogg\|png\|webp\)" -exec rm {} \;
pep8:
$(PEP8) telegram tests examples
black:
$(BLACK) .
2015-07-07 22:19:26 +02:00
lint:
$(PYLINT) --rcfile=setup.cfg telegram examples
2015-07-07 22:19:26 +02:00
2020-10-06 19:28:40 +02:00
mypy:
$(MYPY) -p telegram
$(MYPY) examples
2020-10-06 19:28:40 +02:00
2015-07-07 22:19:26 +02:00
test:
$(PYTEST) -v
2015-09-07 21:28:00 +02:00
2015-11-10 15:10:50 +01:00
install:
$(PIP) install -r requirements.txt -r requirements-dev.txt
2015-11-10 15:10:50 +01:00
2015-08-28 18:02:02 +02:00
help:
@echo "Available targets:"
@echo "- clean Clean up the source directory"
@echo "- pep8 Check style with flake8"
@echo "- lint Check style with pylint"
@echo "- black Check style with black"
2020-10-06 19:28:40 +02:00
@echo "- mypy Check type hinting with mypy"
@echo "- test Run tests using pytest"
@echo
@echo "Available variables:"
@echo "- PYLINT default: $(PYLINT)"
@echo "- PYTEST default: $(PYTEST)"
@echo "- PEP8 default: $(PEP8)"
@echo "- BLACK default: $(BLACK)"
2020-10-06 19:28:40 +02:00
@echo "- MYPY default: $(MYPY)"
@echo "- PIP default: $(PIP)"