2015-03-03 04:43:31 +08:00
|
|
|
# Set of targets useful for development/release process
|
2015-03-01 20:54:43 +08:00
|
|
|
PYTHON = python2.7
|
2015-03-03 04:43:31 +08:00
|
|
|
PATH := $(PWD)/.env/bin:$(PATH)
|
2015-06-07 05:30:49 +08:00
|
|
|
REGENDOC_ARGS := \
|
|
|
|
--normalize "/={8,} (.*) ={8,}/======= \1 ========/" \
|
|
|
|
--normalize "/_{8,} (.*) _{8,}/_______ \1 ________/" \
|
|
|
|
--normalize "/in \d+.\d+ seconds/in 0.12 seconds/" \
|
|
|
|
--normalize "@/tmp/pytest-\d+/@/tmp/pytest-NaN/@"
|
2015-03-01 20:54:43 +08:00
|
|
|
|
2015-03-03 04:43:31 +08:00
|
|
|
# prepare virtual python environment
|
2015-03-01 20:54:43 +08:00
|
|
|
.env:
|
|
|
|
virtualenv .env -p $(PYTHON)
|
|
|
|
|
|
|
|
# install all needed for development
|
|
|
|
develop: .env
|
2015-03-03 04:43:31 +08:00
|
|
|
pip install -e . tox -r requirements-docs.txt
|
2015-03-01 20:54:43 +08:00
|
|
|
|
|
|
|
# clean the development envrironment
|
|
|
|
clean:
|
|
|
|
-rm -rf .env
|
2015-03-03 04:43:31 +08:00
|
|
|
|
|
|
|
# generate documentation
|
|
|
|
docs: develop
|
2015-06-07 05:30:49 +08:00
|
|
|
find doc/en -name '*.txt' -not -path 'doc/en/_build/*' | xargs .env/bin/regendoc ${REGENDOC_ARGS}
|
2015-03-03 04:43:31 +08:00
|
|
|
cd doc/en; make html
|
|
|
|
|
|
|
|
# upload documentation
|
|
|
|
upload-docs: develop
|
2015-06-07 05:30:49 +08:00
|
|
|
find doc/en -name '*.txt' -not -path 'doc/en/_build/*' | xargs .env/bin/regendoc ${REGENDOC_ARGS} --update
|
|
|
|
#cd doc/en; make install
|
|
|
|
|