git: 86c8db870a52 - main - devel/py-pip: Fix build with DOCS option enabled on Python 3.6

Po-Chuan Hsieh sunpoet at FreeBSD.org
Fri May 7 09:55:12 UTC 2021


The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=86c8db870a52032313dcdabfc0e99974f42255ea

commit 86c8db870a52032313dcdabfc0e99974f42255ea
Author:     Po-Chuan Hsieh <sunpoet at FreeBSD.org>
AuthorDate: 2021-05-07 09:27:27 +0000
Commit:     Po-Chuan Hsieh <sunpoet at FreeBSD.org>
CommitDate: 2021-05-07 09:53:01 +0000

    devel/py-pip: Fix build with DOCS option enabled on Python 3.6
    
    PR:             255579
    Reported by:    John Hein <jcfyecrayz at liamekaens.com>
---
 devel/py-pip/Makefile                   |  9 ++++++++-
 devel/py-pip/files/extra-patch-python36 | 11 +++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

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


More information about the dev-commits-ports-all mailing list