forked from ciotto/pyheif-pillow-opener
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) · 1.06 KB
/
Makefile
File metadata and controls
37 lines (27 loc) · 1.06 KB
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
.PHONY: clean lint commit check docker_build docker_shell
xargs=$(if $(shell xargs -r </dev/null 2>/dev/null && echo 1), xargs -r, xargs)
clean:
find . -type f \( -name \*.pyc -o -name \*.pyo \) -delete
find . -type d -name __pycache__ -print0 | $(xargs) -0 rm -rf
lint: clean
isort --diff HeifImagePlugin.py ./tests
flake8 HeifImagePlugin.py ./tests
GIT_DIFF=git diff --name-only --cached --diff-filter=dt
commit:
${GIT_DIFF} -- '*.py' | $(xargs) isort --diff
${GIT_DIFF} -- '*.py' | $(xargs) flake8
check: clean
pytest --cov=. --cov-report=xml tests
docker_build:
docker build --platform=linux/amd64 -t heif-image-plugin:latest .
docker_shell: docker_build
docker run --platform=linux/amd64 --rm -it -v .:/src heif-image-plugin:latest
no-binary ?= pyheif
.PHONY: install-pillow-latest
install-pillow-latest:
pip install --no-binary $(no-binary) .[test]
.PHONY: install-pillow-prod
install-pillow-prod:
pip install --no-binary $(no-binary) .[test] \
./pip-stubs/pillow \
git+https://github.com/uploadcare/pillow-simd.git@simd/9.5-png-truncated#egg=pillow-simd