Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2019 16:43:41 +0000 (UTC)
From:      Nicola Vitale <nivit@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r512421 - in head/devel/py-virtualenv: . files
Message-ID:  <201909201643.x8KGhfh2042607@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nivit
Date: Fri Sep 20 16:43:41 2019
New Revision: 512421
URL: https://svnweb.freebsd.org/changeset/ports/512421

Log:
  - 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.

Added:
  head/devel/py-virtualenv/files/
  head/devel/py-virtualenv/files/patch-docs_conf.py   (contents, props changed)
Modified:
  head/devel/py-virtualenv/Makefile

Modified: head/devel/py-virtualenv/Makefile
==============================================================================
--- head/devel/py-virtualenv/Makefile	Fri Sep 20 15:56:44 2019	(r512420)
+++ head/devel/py-virtualenv/Makefile	Fri Sep 20 16:43:41 2019	(r512421)
@@ -14,15 +14,24 @@ 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
 
 NO_ARCH=	yes
 
 OPTIONS_DEFINE=	DOCS
+
+PYDISTUTILS_BUILDARGS=	-c ${WRKSRC}/docs
 
 USES=		python
 USE_GITHUB=	yes

Added: head/devel/py-virtualenv/files/patch-docs_conf.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-virtualenv/files/patch-docs_conf.py	Fri Sep 20 16:43:41 2019	(r512421)
@@ -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__
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909201643.x8KGhfh2042607>