mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-03-03 07:45:45 +03:00
Allow building docs with Python 3
Use a .pth file to simplify finding the just-built psycopg package into the docs building env.
This commit is contained in:
parent
63ce5ca94f
commit
d177fa9bd0
|
@ -11,7 +11,7 @@ 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)
|
||||
SPHOPTS = SPHINXBUILD=$(SPHINXBUILD)
|
||||
|
||||
html: src/sqlstate_errors.rst
|
||||
$(MAKE) PYTHON=$(PYTHON) -C .. package
|
||||
|
@ -19,7 +19,7 @@ html: src/sqlstate_errors.rst
|
|||
cp -r src/_build/html .
|
||||
|
||||
src/sqlstate_errors.rst: ../psycopg/sqlstate_errors.h
|
||||
PYTHONPATH=`pwd`/../build/lib.$(PYTHON_VERSION) $(PYTHON) src/tools/make_sqlstate_docs.py $< > $@
|
||||
env/bin/python src/tools/make_sqlstate_docs.py $< > $@
|
||||
|
||||
doctest:
|
||||
$(MAKE) PYTHON=$(PYTHON) -C .. package
|
||||
|
@ -34,5 +34,7 @@ clean:
|
|||
rm -rf html src/sqlstate_errors.rst
|
||||
|
||||
env: requirements.txt
|
||||
virtualenv env
|
||||
virtualenv -p $(PYTHON) env
|
||||
./env/bin/pip install -r requirements.txt
|
||||
echo "$$(pwd)/../build/lib.$(PYTHON_VERSION)" \
|
||||
> env/lib/python$(PYTHON_VERSION)/site-packages/psycopg.pth
|
||||
|
|
Loading…
Reference in New Issue
Block a user