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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
PYTHON = python3
build:
echo "Run make build_py"
echo "or make install"
install: install_py install_c
uninstall: uninstall_py
build_py:
pip install build
build
build_c:
doc: install_py
(cd doc && make html)
cp doc/index.html doc/build/index.html
check:
flake8 src/ tests/
test:
pytest -xv tests/
linux_exe:
windows_exe:
release:
ifeq (${RELEASE}, )
@echo "You must specify a release version (make release RELEASE=1.2.3)"
else
@echo "Will release: ${RELEASE}"
@echo "Checking release is in ChangeLog ..."
grep ${RELEASE} ChangeLog | grep -v "/xx"
@echo "Releasing ..."
git tag -a ${RELEASE} -m ${RELEASE}
git push origin ${RELEASE}
make clean
${PYTHON} ./setup.py sdist
twine upload dist/pyocr-${RELEASE}.tar.gz
@echo "All done"
endif
clean:
rm -rf doc/build
rm -rf build dist *.egg-info
rm -rf src/pyocr/__pycache__
rm -f src/pyocr/_version.py
install_py:
${PYTHON} -m pip install ${PIP_ARGS} .
install_c:
uninstall_py:
pip3 uninstall -y pyocr
uninstall_c:
help:
@echo "make build || make build_py"
@echo "make check"
@echo "make doc"
@echo "make help: display this message"
@echo "make install || make install_py"
@echo "make release"
@echo "make test"
@echo "make uninstall || make uninstall_py"
.PHONY: \
build \
build_c \
build_py \
check \
doc \
linux_exe \
windows_exe \
help \
install \
install_c \
install_py \
release \
test \
uninstall \
uninstall_c
|