mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Split phony targets
This commit is contained in:
parent
96a125911a
commit
a23ec9cfb7
19
Makefile
19
Makefile
|
@ -1,7 +1,6 @@
|
||||||
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
|
|
||||||
.PHONY: clean co coverage doc doccheck docserve help inplace install install-coverage debug install-req install-venv release-test sdist test readme
|
|
||||||
.DEFAULT_GOAL := release-test
|
.DEFAULT_GOAL := release-test
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
python3 setup.py clean
|
python3 setup.py clean
|
||||||
rm src/PIL/*.so || true
|
rm src/PIL/*.so || true
|
||||||
|
@ -9,28 +8,34 @@ clean:
|
||||||
find . -name __pycache__ | xargs rm -r || true
|
find . -name __pycache__ | xargs rm -r || true
|
||||||
|
|
||||||
BRANCHES=`git branch -a | grep -v HEAD | grep -v master | grep remote`
|
BRANCHES=`git branch -a | grep -v HEAD | grep -v master | grep remote`
|
||||||
|
.PHONY: co
|
||||||
co:
|
co:
|
||||||
-for i in $(BRANCHES) ; do \
|
-for i in $(BRANCHES) ; do \
|
||||||
git checkout -t $$i ; \
|
git checkout -t $$i ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
.PHONY: coverage
|
||||||
coverage:
|
coverage:
|
||||||
pytest -qq
|
pytest -qq
|
||||||
rm -r htmlcov || true
|
rm -r htmlcov || true
|
||||||
coverage report
|
coverage report
|
||||||
|
|
||||||
|
.PHONY: doc
|
||||||
doc:
|
doc:
|
||||||
$(MAKE) -C docs html
|
$(MAKE) -C docs html
|
||||||
|
|
||||||
|
.PHONY: doccheck
|
||||||
doccheck:
|
doccheck:
|
||||||
$(MAKE) -C docs html
|
$(MAKE) -C docs html
|
||||||
# Don't make our tests rely on the links in the docs being up every single build.
|
# Don't make our tests rely on the links in the docs being up every single build.
|
||||||
# We don't control them. But do check, and update them to the target of their redirects.
|
# We don't control them. But do check, and update them to the target of their redirects.
|
||||||
$(MAKE) -C docs linkcheck || true
|
$(MAKE) -C docs linkcheck || true
|
||||||
|
|
||||||
|
.PHONY: docserve
|
||||||
docserve:
|
docserve:
|
||||||
cd docs/_build/html && python3 -mSimpleHTTPServer 2> /dev/null&
|
cd docs/_build/html && python3 -mSimpleHTTPServer 2> /dev/null&
|
||||||
|
|
||||||
|
.PHONY: help
|
||||||
help:
|
help:
|
||||||
@echo "Welcome to Pillow development. Please use \`make <target>\` where <target> is one of"
|
@echo "Welcome to Pillow development. Please use \`make <target>\` where <target> is one of"
|
||||||
@echo " clean remove build products"
|
@echo " clean remove build products"
|
||||||
|
@ -48,17 +53,21 @@ help:
|
||||||
@echo " upload build and upload sdists to PyPI"
|
@echo " upload build and upload sdists to PyPI"
|
||||||
@echo " upload-test build and upload sdists to test.pythonpackages.com"
|
@echo " upload-test build and upload sdists to test.pythonpackages.com"
|
||||||
|
|
||||||
|
.PHONY: inplace
|
||||||
inplace: clean
|
inplace: clean
|
||||||
python3 setup.py develop build_ext --inplace
|
python3 setup.py develop build_ext --inplace
|
||||||
|
|
||||||
|
.PHONY: install
|
||||||
install:
|
install:
|
||||||
python3 setup.py install
|
python3 setup.py install
|
||||||
python3 selftest.py
|
python3 selftest.py
|
||||||
|
|
||||||
|
.PHONY: install-coverage
|
||||||
install-coverage:
|
install-coverage:
|
||||||
CFLAGS="-coverage" python3 setup.py build_ext install
|
CFLAGS="-coverage" python3 setup.py build_ext install
|
||||||
python3 selftest.py
|
python3 selftest.py
|
||||||
|
|
||||||
|
.PHONY: debug
|
||||||
debug:
|
debug:
|
||||||
# make a debug version if we don't have a -dbg python. Leaves in symbols
|
# make a debug version if we don't have a -dbg python. Leaves in symbols
|
||||||
# for our stuff, kills optimization, and redirects to dev null so we
|
# for our stuff, kills optimization, and redirects to dev null so we
|
||||||
|
@ -66,13 +75,16 @@ debug:
|
||||||
make clean > /dev/null
|
make clean > /dev/null
|
||||||
CFLAGS='-g -O0' python3 setup.py build_ext install > /dev/null
|
CFLAGS='-g -O0' python3 setup.py build_ext install > /dev/null
|
||||||
|
|
||||||
|
.PHONY: install-req
|
||||||
install-req:
|
install-req:
|
||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt
|
||||||
|
|
||||||
|
.PHONY: install-venv
|
||||||
install-venv:
|
install-venv:
|
||||||
virtualenv .
|
virtualenv .
|
||||||
bin/pip install -r requirements.txt
|
bin/pip install -r requirements.txt
|
||||||
|
|
||||||
|
.PHONY: release-test
|
||||||
release-test:
|
release-test:
|
||||||
$(MAKE) install-req
|
$(MAKE) install-req
|
||||||
python3 setup.py develop
|
python3 setup.py develop
|
||||||
|
@ -84,11 +96,14 @@ release-test:
|
||||||
pyroma .
|
pyroma .
|
||||||
viewdoc
|
viewdoc
|
||||||
|
|
||||||
|
.PHONY: sdist
|
||||||
sdist:
|
sdist:
|
||||||
python3 setup.py sdist --format=gztar
|
python3 setup.py sdist --format=gztar
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
pytest -qq
|
pytest -qq
|
||||||
|
|
||||||
|
.PHONY: readme
|
||||||
readme:
|
readme:
|
||||||
viewdoc
|
viewdoc
|
||||||
|
|
Loading…
Reference in New Issue
Block a user