skyline-apiserver/libs/skyline-nginx/Makefile
zhu.boxiang 809802d920 fix: Change the version of setuptools
The setuptools(>=58.0.0) has removed the support of use_2to3 during build[1].
There is a package named tempita[2] which has set use_2to3 in setup.py.

So here, we set the version of setuptools less than 58.0.0

[1]: https://setuptools.readthedocs.io/en/latest/history.html#v58-0-0
[2]: https://github.com/agramfort/tempita/blob/master/setup.py#L53

Change-Id: I0fffaa63eb91c4d4c4bf8d7e149e7087e514aa51
2021-09-10 17:56:44 +08:00

47 lines
889 B
Makefile

PYTHON ?= python3
.PHONY: all
all: install fmt lint test package
.PHONY: venv
venv:
poetry env use $(PYTHON)
.PHONY: install
install: venv
poetry run pip install -U pip setuptools'<58.0.0'
poetry install -vvv
.PHONY: package
package:
poetry build -f wheel
.PHONY: fmt
fmt:
poetry run isort $$(git ls-files -- **/*.py)
poetry run black --config ../../pyproject.toml $$(git ls-files -- **/*.py)
poetry run add-trailing-comma --py36-plus --exit-zero-even-if-changed $$(git ls-files -- **/*.py)
.PHONY: lint
lint:
poetry run mypy --config-file=../../mypy.ini $$(git ls-files -- **/*.py)
poetry run isort --check-only --diff $$(git ls-files -- **/*.py)
poetry run black --check --diff --color --config ../../pyproject.toml $$(git ls-files -- **/*.py)
poetry run flake8 $$(git ls-files -- **/*.py)
.PHONY: test
test:
echo TODO
.PHONY: clean
clean:
rm -rf .venv dist