Skip to content

Commit

Permalink
update Makefile and conf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HansBug committed Aug 31, 2021
1 parent 0945a2a commit 8e95aa5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 7 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ GRAPHVIZ := $(MAKE) -f "${GRAPHVIZ_MK}" SOURCE=${SOURCEDIR}
DEMOS_MK := ${SOURCEDIR}/demos.mk
DEMOS := $(MAKE) -f "${DEMOS_MK}" SOURCE=${SOURCEDIR}

_CURRENT_PATH := ${PATH}
_CURRENT_PYTHONPATH := ${PYTHONPATH}
_CURRENT_PATH := ${PATH}
_PROJ_DIR := $(shell readlink -f ${CURDIR}/..)
_LIBS_DIR := $(shell readlink -f ${SOURCEDIR}/_libs)
_SHIMS_DIR := $(shell readlink -f ${SOURCEDIR}/_shims)

.EXPORT_ALL_VARIABLES:

PYTHONPATH = $(shell readlink -f ${CURDIR}/..)
PATH = $(shell readlink -f ${SOURCEDIR}/_shims):${_CURRENT_PATH}
PYTHONPATH = ${_PROJ_DIR}:${_LIBS_DIR}:${_CURRENT_PYTHONPATH}
PATH = ${_SHIMS_DIR}:${_CURRENT_PATH}
NO_CONTENTS_BUILD = true

# Catch-all target: route all unknown targets to Sphinx using the new
Expand Down
5 changes: 3 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
# Get current location
_DOC_PATH = os.path.dirname(os.path.abspath(__file__))
_PROJ_PATH = os.path.abspath(os.path.join(_DOC_PATH, '..', '..'))
_LIBS_PATH = os.path.join(_DOC_PATH, '_libs')
_SHIMS_PATH = os.path.join(_DOC_PATH, '_shims')
os.chdir(_PROJ_PATH)

Expand All @@ -41,8 +42,8 @@
if not os.environ.get("NO_CONTENTS_BUILD"):
_env = dict(os.environ)
_env.update(dict(
PYTHONPATH=_PROJ_PATH,
PATH=_SHIMS_PATH + ':' + os.environ.get('PATH', ''),
PYTHONPATH=':'.join([_PROJ_PATH, _LIBS_PATH, os.environ.get('PYTHONPATH', '')]),
PATH=':'.join([_SHIMS_PATH, os.environ.get('PATH', '')]),
))

pip_cmd = (where.first('pip'), 'install', '-r', os.path.join(_PROJ_PATH, 'requirements.txt'))
Expand Down

0 comments on commit 8e95aa5

Please sign in to comment.