mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-25 08:21:04 -06:00
Simplify PYTHONPATH handling for Sphinx.
This commit is contained in:
parent
e256fc32d9
commit
e1aeaba942
@ -125,14 +125,11 @@ _build_docs() {
|
|||||||
cd "${SERVERROOT}" && mkdir -p "usr/${APP_NAME}/share/docs/en_US/html"
|
cd "${SERVERROOT}" && mkdir -p "usr/${APP_NAME}/share/docs/en_US/html"
|
||||||
cd "${SOURCEDIR}/docs/en_US"
|
cd "${SOURCEDIR}/docs/en_US"
|
||||||
python3 build_code_snippet.py
|
python3 build_code_snippet.py
|
||||||
if [ $1 == "redhat" ]; then
|
SYS_PYTHONPATH=$(/usr/bin/python3 -c "import sys; print(':'.join([p for p in sys.path if p]))")
|
||||||
if [ "${OS_VERSION}" == "7" ]; then
|
if [ $1 == "redhat" -a "${OS_VERSION}" == "7" ]; then
|
||||||
PYTHONPATH=$PYTHONPATH:/usr/local/lib64/python3.6/site-packages:/usr/local/lib/python3.6/site-packages:/usr/lib/python3.6/site-packages python3 /usr/local/bin/sphinx-build . "${SERVERROOT}/usr/${APP_NAME}/share/docs/en_US/html"
|
PYTHONPATH=$PYTHONPATH:${SYS_PYTHONPATH} python3 /usr/local/bin/sphinx-build . "${SERVERROOT}/usr/${APP_NAME}/share/docs/en_US/html"
|
||||||
else
|
else
|
||||||
PYTHONPATH=$PYTHONPATH:/usr/lib/python3.6/site-packages python3 -msphinx . "${SERVERROOT}/usr/${APP_NAME}/share/docs/en_US/html"
|
PYTHONPATH=$PYTHONPATH:${SYS_PYTHONPATH} python3 -msphinx . "${SERVERROOT}/usr/${APP_NAME}/share/docs/en_US/html"
|
||||||
fi
|
|
||||||
else
|
|
||||||
PYTHONPATH=$PYTHONPATH:/usr/lib/python3/:/usr/lib/python3/dist-packages python3 -msphinx . "${SERVERROOT}/usr/${APP_NAME}/share/docs/en_US/html"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user