psycopg2/doc/Makefile

36 lines
883 B
Makefile
Raw Normal View History

.PHONY: env help clean html text doctest
2010-02-14 19:11:01 +03:00
docs: html text
2010-02-14 08:01:00 +03:00
check: doctest
# The environment is currently required to build the documentation.
# It is not clean by 'make clean'
2015-04-28 11:30:59 +03:00
PYTHON := python$(PYTHON_VERSION)
PYTHON_VERSION ?= $(shell $(PYTHON) -c 'import sys; print ("%d.%d" % sys.version_info[:2])')
SPHOPTS=PYTHONPATH=$$(pwd)/../build/lib.$(PYTHON_VERSION)/ SPHINXBUILD=$$(pwd)/env/bin/sphinx-build
html:
2015-04-28 11:30:59 +03:00
$(MAKE) PYTHON=$(PYTHON) -C .. package
$(MAKE) $(SPHOPTS) -C src $@
2010-02-14 19:11:01 +03:00
cp -r src/_build/html .
text:
2015-04-28 11:30:59 +03:00
$(MAKE) PYTHON=$(PYTHON) -C .. package
$(MAKE) $(SPHOPTS) -C src $@
2010-02-14 19:11:01 +03:00
cd src && tools/stitch_text.py index.rst _build/text > ../psycopg2.txt
doctest:
2015-04-28 11:30:59 +03:00
$(MAKE) PYTHON=$(PYTHON) -C .. package
$(MAKE) $(SPHOPTS) -C src $@
2010-02-14 19:11:01 +03:00
clean:
2015-04-28 11:30:59 +03:00
$(MAKE) $(SPHOPTS) -C src $@
2010-02-14 19:11:01 +03:00
rm -rf html psycopg2.txt
env: requirements.txt
virtualenv env
./env/bin/pip install -r requirements.txt