forked from dbolya/yolact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (30 loc) · 1.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
PYTHON_VERSION = 3.9.13
PIP = poetry run pip
PYTHON = poetry run python
VERSION := $(shell sed -rn 's/^__version__\s*=\s*"(.+)"/\1/p' yolact/__init__.py)
env:
# make sure expected python version is available
PYTHON_CONFIGURE_OPTS=--enable-shared pyenv install -s $(PYTHON_VERSION)
pyenv local $(PYTHON_VERSION)
poetry install --with dev
$(PIP) install -qU pip
clean: clean-build clean-pyc ## remove all artifacts
clean-build: ## remove build artifacts
@rm -rf build/
@rm -rf dist/
@rm -rf *.egg-info
clean-pyc: ## remove Python file artifacts
-@find . -name '*.pyc' -not -path "./.tox/*" -follow -print0 | xargs -0 rm -f
-@find . -name '*.pyo' -not -path "./.tox/*" -follow -print0 | xargs -0 rm -f
-@find . -name '__pycache__' -type d -not -path "./.tox/*" -follow -print0 | xargs -0 rm -rf
dist: clean
poetry check
ifneq ($(VERSION),$(strip $(shell poetry version | cut -d " " -f 2 )))
$(error Package and code versions mismatch, please try poetry install)
endif
poetry build
tag:
git tag -f -a -m "Auto-generated tag" $(VERSION)
git push --tags --force
release: clean dist tag
poetry publish -r psycle