ungleich_hack_3/Makefile

45 lines
854 B
Makefile

.PHONY: \
build \
clean \
check_code_format \
format_code \
generate_requirements_file \
install \
install_dev \
lint \
run \
test
build:
python3 ./manage.py collectstatic
clean:
rm -rf static \
# https://stackoverflow.com/a/41386937/162086
python3 -Bc "for p in __import__('pathlib').Path('.').rglob('*.py[co]'): p.unlink()"; \
python3 -Bc "for p in __import__('pathlib').Path('.').rglob('__pycache__'): p.rmdir()"
check_code_format:
python3 -m black --target-version=py36 --diff .
format_code:
python3 -m black --target-version=py36 .
generate_requirements_file:
python3 -m piptools compile --output-file=requirements.txt
install:
python3 -m pip install -r requirements.txt
install_dev:
python3 -m pip install -e ".[dev]"
lint:
python3 -m flake8
run:
python3 ./manage.py runserver --ipv6
test:
python3 ./manage.py test