2015-06-07 17:03:31 +03:00
|
|
|
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
|
2015-06-07 17:18:31 +03:00
|
|
|
.PHONY: clean coverage doc docserve help inplace install install-req release-test sdist test upload upload-test
|
2015-06-28 21:57:51 +03:00
|
|
|
.DEFAULT_GOAL := release-test
|
2014-07-15 08:02:12 +04:00
|
|
|
|
2014-06-27 23:07:53 +04:00
|
|
|
clean:
|
|
|
|
python setup.py clean
|
|
|
|
rm PIL/*.so || true
|
2014-07-09 21:13:02 +04:00
|
|
|
rm -r build || true
|
|
|
|
find . -name __pycache__ | xargs rm -r || true
|
|
|
|
|
2016-03-24 14:51:45 +03:00
|
|
|
BRANCHES=`git branch -a | grep -v HEAD | grep -v master | grep remote`
|
|
|
|
co:
|
|
|
|
-for i in $(BRANCHES) ; do \
|
|
|
|
git checkout -t $$i ; \
|
|
|
|
done
|
|
|
|
|
2014-06-27 23:07:53 +04:00
|
|
|
coverage:
|
|
|
|
coverage erase
|
|
|
|
coverage run --parallel-mode --include=PIL/* selftest.py
|
|
|
|
nosetests --with-cov --cov='PIL/' --cov-report=html Tests/test_*.py
|
2015-06-07 17:28:40 +03:00
|
|
|
# Doesn't combine properly before report, writing report instead of displaying invalid report.
|
2014-06-27 23:07:53 +04:00
|
|
|
rm -r htmlcov || true
|
|
|
|
coverage combine
|
|
|
|
coverage report
|
|
|
|
|
2015-06-07 17:18:31 +03:00
|
|
|
doc:
|
2014-07-15 08:02:12 +04:00
|
|
|
$(MAKE) -C docs html
|
|
|
|
|
2015-06-07 17:18:31 +03:00
|
|
|
docserve:
|
2015-04-01 13:16:36 +03:00
|
|
|
cd docs/_build/html && python -mSimpleHTTPServer 2> /dev/null&
|
|
|
|
|
2015-06-07 17:08:38 +03:00
|
|
|
help:
|
|
|
|
@echo "Welcome to Pillow development. Please use \`make <target>' where <target> is one of"
|
|
|
|
@echo " clean remove build products"
|
|
|
|
@echo " coverage run coverage test (in progress)"
|
2015-06-07 17:22:15 +03:00
|
|
|
@echo " doc make html docs"
|
|
|
|
@echo " docserve run an http server on the docs directory"
|
2015-06-07 17:08:38 +03:00
|
|
|
@echo " html to make standalone HTML files"
|
|
|
|
@echo " inplace make inplace extension"
|
|
|
|
@echo " install make and install"
|
|
|
|
@echo " install-req install documentation and test dependencies"
|
2016-03-24 14:44:42 +03:00
|
|
|
@echo " install-venv install in virtualenv"
|
2015-06-07 17:08:38 +03:00
|
|
|
@echo " release-test run code and package tests before release"
|
|
|
|
@echo " test run tests on installed pillow"
|
|
|
|
@echo " upload build and upload sdists to PyPI"
|
|
|
|
@echo " upload-test build and upload sdists to test.pythonpackages.com"
|
|
|
|
|
|
|
|
inplace: clean
|
|
|
|
python setup.py build_ext --inplace
|
|
|
|
|
|
|
|
install:
|
|
|
|
python setup.py install
|
|
|
|
python selftest.py --installed
|
|
|
|
|
|
|
|
install-req:
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
2016-03-24 15:06:55 +03:00
|
|
|
install-venv:
|
|
|
|
virtualenv .
|
|
|
|
bin/pip install -r requirements.txt
|
2016-03-24 14:44:42 +03:00
|
|
|
|
2015-06-07 17:08:38 +03:00
|
|
|
release-test:
|
|
|
|
$(MAKE) install-req
|
|
|
|
python setup.py develop
|
|
|
|
python selftest.py
|
|
|
|
nosetests Tests/test_*.py
|
|
|
|
python setup.py install
|
|
|
|
python test-installed.py
|
|
|
|
check-manifest
|
|
|
|
pyroma .
|
|
|
|
viewdoc
|
|
|
|
|
|
|
|
sdist:
|
|
|
|
python setup.py sdist --format=gztar,zip
|
|
|
|
|
|
|
|
test:
|
|
|
|
python test-installed.py
|
|
|
|
|
2015-06-07 17:28:40 +03:00
|
|
|
# https://docs.python.org/2/distutils/packageindex.html#the-pypirc-file
|
2015-06-07 16:54:02 +03:00
|
|
|
upload-test:
|
2015-06-07 17:29:52 +03:00
|
|
|
# [test]
|
|
|
|
# username:
|
|
|
|
# password:
|
|
|
|
# repository = http://test.pythonpackages.com
|
2015-06-07 03:27:09 +03:00
|
|
|
python setup.py sdist --format=gztar,zip upload -r test
|
2015-06-07 17:08:38 +03:00
|
|
|
|
2015-06-07 16:54:02 +03:00
|
|
|
upload:
|
2015-06-07 03:27:09 +03:00
|
|
|
python setup.py sdist --format=gztar,zip upload
|
2015-09-29 13:35:07 +03:00
|
|
|
|
|
|
|
readme:
|
|
|
|
viewdoc
|