- Fix documentation build

- Add textproc/py-sphinx_rtd_theme and textproc/towncrier to build dependencies
- Add files/patch-docs_conf.py to fix ModuleNotFoundError (virtualenv)
- Set LANG and LC_ALL environment variables to mitigate a RuntimeError during the
  build stage of the doc.:

  RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/en/7.x/python3/ for mitigation steps.
This commit is contained in:
Nicola Vitale 2019-09-20 16:43:41 +00:00
parent 27178fbe07
commit c8a2293cdc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=512421
2 changed files with 21 additions and 2 deletions

View file

@ -14,9 +14,16 @@ LICENSE= MIT
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR}
DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=1.1.3:textproc/py-sphinx@${PY_FLAVOR}
DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=1.1.3:textproc/py-sphinx@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}towncrier>0:textproc/py-towncrier@${PY_FLAVOR}
DOCS_PORTDOCS= *
DOCS_VARS= PYDISTUTILS_BUILD_TARGET+=build_sphinx
DOCS_VARS= PYDISTUTILS_BUILD_TARGET="build build_sphinx"
# Required by towncrier/click when Python < 3.7
# see https://click.palletsprojects.com/en/7.x/python3/
# Documentation is in English, so...
MAKE_ENV= LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
GH_ACCOUNT= pypa
@ -24,6 +31,8 @@ NO_ARCH= yes
OPTIONS_DEFINE= DOCS
PYDISTUTILS_BUILDARGS= -c ${WRKSRC}/docs
USES= python
USE_GITHUB= yes
USE_PYTHON= autoplist concurrent distutils

View file

@ -0,0 +1,10 @@
--- docs/conf.py.orig 2019-09-03 16:32:54 UTC
+++ docs/conf.py
@@ -5,6 +5,7 @@ import re
import subprocess
import sys
from pathlib import Path
+sys.path.insert(0, os.path.abspath('../build/lib'))
from virtualenv import __version__