diff options
author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-05-07 17:27:27 +0800 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2021-05-07 17:53:01 +0800 |
commit | 86c8db870a52032313dcdabfc0e99974f42255ea (patch) | |
tree | b6e3b818aaf8cc0af2a6ac7dbcd591cd696e48f8 /devel | |
parent | 066d3dbe5cca34958c37627ee2a0363f118d2ecd (diff) | |
download | freebsd-ports-gnome-86c8db870a52032313dcdabfc0e99974f42255ea.tar.gz freebsd-ports-gnome-86c8db870a52032313dcdabfc0e99974f42255ea.tar.zst freebsd-ports-gnome-86c8db870a52032313dcdabfc0e99974f42255ea.zip |
devel/py-pip: Fix build with DOCS option enabled on Python 3.6
PR: 255579
Reported by: John Hein <jcfyecrayz@liamekaens.com>
Diffstat (limited to 'devel')
-rw-r--r-- | devel/py-pip/Makefile | 9 | ||||
-rw-r--r-- | devel/py-pip/files/extra-patch-python36 | 11 |
2 files changed, 19 insertions, 1 deletions
diff --git a/devel/py-pip/Makefile b/devel/py-pip/Makefile index b5c26166c749..025de2f06240 100644 --- a/devel/py-pip/Makefile +++ b/devel/py-pip/Makefile @@ -59,6 +59,13 @@ DOCS_PORTDOCS= * DOCS_VARS= PYDISTUTILS_BUILD_TARGET=build_sphinx \ PYDISTUTILS_BUILDARGS="-n --all-files --fresh-env" +.include <bsd.port.pre.mk> + +.if ${PYTHON_REL} < 3700 && ${PORT_OPTIONS:MDOCS} +BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}future-annotations>=0:devel/py-future-annotations@${PY_FLAVOR} +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-python36 +.endif + post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/build/sphinx/html && \ @@ -72,4 +79,4 @@ do-test: ${LN} -sf ${LOCALBASE}/bin/pip ${LOCALBASE}/bin/pip3 cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/devel/py-pip/files/extra-patch-python36 b/devel/py-pip/files/extra-patch-python36 new file mode 100644 index 000000000000..2e8a97bca88b --- /dev/null +++ b/devel/py-pip/files/extra-patch-python36 @@ -0,0 +1,11 @@ +--- docs/docs_feedback_sphinxext.py.orig 2021-01-23 11:51:53 UTC ++++ docs/docs_feedback_sphinxext.py +@@ -1,6 +1,7 @@ ++# -*- coding: future_annotations -*- + """A sphinx extension for collecting per doc feedback.""" + +-from __future__ import annotations ++import future_annotations + + from itertools import chain + from typing import TYPE_CHECKING |