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:
|
2019-09-26 15:12:28 +03:00
|
|
|
python3 setup.py clean
|
2017-12-30 23:11:26 +03:00
|
|
|
rm src/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
|
|
|
|
|
2016-06-17 13:03:21 +03:00
|
|
|
coverage:
|
2019-09-26 15:12:28 +03:00
|
|
|
python3 selftest.py
|
|
|
|
python3 setup.py test
|
2014-06-27 23:07:53 +04:00
|
|
|
rm -r htmlcov || true
|
|
|
|
coverage report
|
|
|
|
|
2015-06-07 17:18:31 +03:00
|
|
|
doc:
|
2014-07-15 08:02:12 +04:00
|
|
|
$(MAKE) -C docs html
|
|
|
|
|
2016-04-09 22:28:43 +03:00
|
|
|
doccheck:
|
|
|
|
$(MAKE) -C docs html
|
2016-07-01 14:53:44 +03:00
|
|
|
# Don't make our tests rely on the links in the docs being up every single build.
|
2016-07-01 14:49:44 +03:00
|
|
|
# We don't control them. But do check, and update them to the target of their redirects.
|
2016-04-19 17:29:33 +03:00
|
|
|
$(MAKE) -C docs linkcheck || true
|
2016-04-09 22:28:43 +03:00
|
|
|
|
2015-06-07 17:18:31 +03:00
|
|
|
docserve:
|
2019-09-26 15:12:28 +03:00
|
|
|
cd docs/_build/html && python3 -mSimpleHTTPServer 2> /dev/null&
|
2015-04-01 13:16:36 +03:00
|
|
|
|
2015-06-07 17:08:38 +03:00
|
|
|
help:
|
2016-09-24 04:49:32 +03:00
|
|
|
@echo "Welcome to Pillow development. Please use \`make <target>\` where <target> is one of"
|
2017-10-02 14:56:05 +03:00
|
|
|
@echo " clean remove build products"
|
|
|
|
@echo " coverage run coverage test (in progress)"
|
|
|
|
@echo " doc make html docs"
|
|
|
|
@echo " docserve run an http server on the docs directory"
|
|
|
|
@echo " html to make standalone HTML files"
|
|
|
|
@echo " inplace make inplace extension"
|
|
|
|
@echo " install make and install"
|
|
|
|
@echo " install-coverage make and install with C coverage"
|
|
|
|
@echo " install-req install documentation and test dependencies"
|
|
|
|
@echo " install-venv install in virtualenv"
|
|
|
|
@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"
|
2015-06-07 17:08:38 +03:00
|
|
|
|
|
|
|
inplace: clean
|
2019-09-26 15:12:28 +03:00
|
|
|
python3 setup.py develop build_ext --inplace
|
2015-06-07 17:08:38 +03:00
|
|
|
|
|
|
|
install:
|
2019-09-26 15:12:28 +03:00
|
|
|
python3 setup.py install
|
|
|
|
python3 selftest.py
|
2015-06-07 17:08:38 +03:00
|
|
|
|
2017-10-02 14:56:05 +03:00
|
|
|
install-coverage:
|
2019-09-26 15:12:28 +03:00
|
|
|
CFLAGS="-coverage" python3 setup.py build_ext install
|
|
|
|
python3 selftest.py
|
2017-10-02 14:56:05 +03:00
|
|
|
|
2016-12-20 01:15:06 +03:00
|
|
|
debug:
|
|
|
|
# make a debug version if we don't have a -dbg python. Leaves in symbols
|
2017-10-02 14:56:05 +03:00
|
|
|
# for our stuff, kills optimization, and redirects to dev null so we
|
2016-12-20 01:15:06 +03:00
|
|
|
# see any build failures.
|
|
|
|
make clean > /dev/null
|
2019-09-26 15:12:28 +03:00
|
|
|
CFLAGS='-g -O0' python3 setup.py build_ext install > /dev/null
|
2016-12-20 01:15:06 +03:00
|
|
|
|
2015-06-07 17:08:38 +03:00
|
|
|
install-req:
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
2016-06-17 13:03:21 +03:00
|
|
|
install-venv:
|
2016-03-24 15:06:55 +03:00
|
|
|
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
|
2019-09-26 15:12:28 +03:00
|
|
|
python3 setup.py develop
|
|
|
|
python3 selftest.py
|
|
|
|
python3 -m pytest Tests
|
|
|
|
python3 setup.py install
|
|
|
|
python3 -m pytest -qq
|
2015-06-07 17:08:38 +03:00
|
|
|
check-manifest
|
|
|
|
pyroma .
|
|
|
|
viewdoc
|
|
|
|
|
|
|
|
sdist:
|
2019-09-26 15:12:28 +03:00
|
|
|
python3 setup.py sdist --format=gztar
|
2015-06-07 17:08:38 +03:00
|
|
|
|
|
|
|
test:
|
2017-11-16 19:27:07 +03:00
|
|
|
pytest -qq
|
2015-06-07 17:08:38 +03:00
|
|
|
|
2018-06-10 06:47:46 +03:00
|
|
|
# https://docs.python.org/3/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
|
2019-09-26 15:12:28 +03:00
|
|
|
python3 setup.py sdist --format=gztar upload -r test
|
2015-06-07 17:08:38 +03:00
|
|
|
|
2015-06-07 16:54:02 +03:00
|
|
|
upload:
|
2019-09-26 15:12:28 +03:00
|
|
|
python3 setup.py sdist --format=gztar upload
|
2015-09-29 13:35:07 +03:00
|
|
|
|
|
|
|
readme:
|
|
|
|
viewdoc
|