Pillow/Makefile

107 lines
3.0 KiB
Makefile
Raw Normal View History

# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
.PHONY: clean coverage doc docserve help inplace install install-req release-test sdist test upload upload-test
.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
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:
python selftest.py
python setup.py test
2014-06-27 23:07:53 +04:00
rm -r htmlcov || true
coverage report
doc:
2014-07-15 08:02:12 +04:00
$(MAKE) -C docs html
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
docserve:
cd docs/_build/html && python -mSimpleHTTPServer 2> /dev/null&
help:
2016-09-24 04:49:32 +03:00
@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)"
@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"
inplace: clean
python setup.py build_ext --inplace
install:
python setup.py install
python selftest.py --installed
install-coverage:
CFLAGS="-coverage" python setup.py build_ext install
python selftest.py --installed
debug:
# 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
# see any build failures.
make clean > /dev/null
CFLAGS='-g -O0' python setup.py build_ext install > /dev/null
install-req:
pip install -r requirements.txt
2016-06-17 13:03:21 +03:00
install-venv:
virtualenv .
bin/pip install -r requirements.txt
release-test:
$(MAKE) install-req
python setup.py develop
python selftest.py
2017-10-26 18:07:34 +03:00
python -m pytest Tests
python setup.py install
2017-12-13 16:49:21 +03:00
python -m pytest -qq
check-manifest
pyroma .
viewdoc
sdist:
python setup.py sdist --format=gztar
test:
pytest -qq
2015-06-07 17:28:40 +03:00
# https://docs.python.org/2/distutils/packageindex.html#the-pypirc-file
upload-test:
2015-06-07 17:29:52 +03:00
# [test]
# username:
# password:
# repository = http://test.pythonpackages.com
python setup.py sdist --format=gztar upload -r test
upload:
python setup.py sdist --format=gztar upload
readme:
viewdoc