mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-25 18:33:44 +03:00
e5e8cec350
Note that the column-spanning cells break text docs. I don't think anybody cares about them, so going to drop them.
44 lines
1.2 KiB
Makefile
44 lines
1.2 KiB
Makefile
.PHONY: env help clean html text doctest
|
|
|
|
docs: html text
|
|
|
|
check: doctest
|
|
|
|
# The environment is currently required to build the documentation.
|
|
# It is not clean by 'make clean'
|
|
|
|
PYTHON := python$(PYTHON_VERSION)
|
|
PYTHON_VERSION ?= $(shell $(PYTHON) -c 'import sys; print ("%d.%d" % sys.version_info[:2])')
|
|
|
|
SPHINXBUILD ?= $$(pwd)/env/bin/sphinx-build
|
|
SPHOPTS = PYTHONPATH=$$(pwd)/../build/lib.$(PYTHON_VERSION)/ SPHINXBUILD=$(SPHINXBUILD)
|
|
|
|
html: src/sqlstate_errors.rst
|
|
$(MAKE) PYTHON=$(PYTHON) -C .. package
|
|
$(MAKE) $(SPHOPTS) -C src $@
|
|
cp -r src/_build/html .
|
|
|
|
text: src/sqlstate_errors.rst
|
|
$(MAKE) PYTHON=$(PYTHON) -C .. package
|
|
$(MAKE) $(SPHOPTS) -C src $@
|
|
cd src && tools/stitch_text.py index.rst _build/text > ../psycopg2.txt
|
|
|
|
src/sqlstate_errors.rst: ../psycopg/sqlstate_errors.h
|
|
PYTHONPATH=`pwd`/../build/lib.$(PYTHON_VERSION) $(PYTHON) src/tools/make_sqlstate_docs.py $< > $@
|
|
|
|
doctest:
|
|
$(MAKE) PYTHON=$(PYTHON) -C .. package
|
|
$(MAKE) $(SPHOPTS) -C src $@
|
|
|
|
upload:
|
|
# this command requires ssh configured to the proper target
|
|
tar czf - -C html . | ssh psycoweb tar xzvf - -C docs/current
|
|
|
|
clean:
|
|
$(MAKE) $(SPHOPTS) -C src $@
|
|
rm -rf html psycopg2.txt src/sqlstate_errors.rst
|
|
|
|
env: requirements.txt
|
|
virtualenv env
|
|
./env/bin/pip install -r requirements.txt
|