-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
31 lines (26 loc) · 859 Bytes
/
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
lint:
ruff check --show-source imsize/[^a]*.py
download:
ifeq (,$(wildcard ./test/images/*.DNG))
cd ./test/images && http --download https://support.theta360.com/intl/download/sample/R0010001.DNG
endif
ifeq (,$(wildcard ./test/images/*.CR2))
cd ./test/images && http --download http://www.rawsamples.ch/raws/canon/RAW_CANON_1000D.CR2
endif
test: download
pytest -v
make lint
install:
pip3 install --user build
rm -rf build dist || true
pip3 uninstall --yes imsize || true
ping -c 3 www.google.com # pyproject-build requires internet access
pyproject-build || true
pip3 install --user dist/*.whl || true
rm -rf build imsize.egg-info || true
@python3 -c 'import imsize; print(f"Installed imsize version {imsize.__version__}.")'
release:
pip3 install --user twine
make install
twine upload dist/*
.PHONY: lint download test install release