devel/py-pip: Fix build with DOCS option enabled on Python 3.6
PR: 255579 Reported by: John Hein <jcfyecrayz@liamekaens.com>
This commit is contained in:
parent
066d3dbe5c
commit
86c8db870a
@ -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>
|
||||
|
11
devel/py-pip/files/extra-patch-python36
Normal file
11
devel/py-pip/files/extra-patch-python36
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user