Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jan 2021 21:25:30 +0000 (UTC)
From:      Rene Ladan <rene@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r561385 - in head: devel/py-columnize devel/py-pystorm devel/py-qt5-core devel/py-streamparse mail/py-validate_email math/py-networkx print/hplip security/py-fail2ban www/py-lektor
Message-ID:  <202101122125.10CLPUXT002352@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rene
Date: Tue Jan 12 21:25:30 2021
New Revision: 561385
URL: https://svnweb.freebsd.org/changeset/ports/561385

Log:
  Simplify some ports using PYTHON_MAJOR_VER and Python 3.6+

Modified:
  head/devel/py-columnize/Makefile
  head/devel/py-pystorm/Makefile
  head/devel/py-qt5-core/Makefile
  head/devel/py-streamparse/Makefile
  head/mail/py-validate_email/Makefile
  head/math/py-networkx/Makefile
  head/print/hplip/Makefile
  head/security/py-fail2ban/Makefile
  head/www/py-lektor/Makefile

Modified: head/devel/py-columnize/Makefile
==============================================================================
--- head/devel/py-columnize/Makefile	Tue Jan 12 21:21:14 2021	(r561384)
+++ head/devel/py-columnize/Makefile	Tue Jan 12 21:25:30 2021	(r561385)
@@ -19,12 +19,6 @@ RUN_DEPENDS=	${MY_DEPENDS}
 USES=		python:3.6+
 USE_PYTHON=	autoplist distutils
 
-.include <bsd.port.pre.mk>
+EXTRA_PATCHES=      ${FILESDIR}/extra-patch-____pkginfo____.py
 
-.if ${PYTHON_MAJOR_VER} == "3"
-EXTRA_PATCHES+=      ${FILESDIR}/extra-patch-____pkginfo____.py
-.else
-MY_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}backports.shutil_get_terminal_size>=1.0:devel/py-backports.shutil_get_terminal_size@${PY_FLAVOR}
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/devel/py-pystorm/Makefile
==============================================================================
--- head/devel/py-pystorm/Makefile	Tue Jan 12 21:21:14 2021	(r561384)
+++ head/devel/py-pystorm/Makefile	Tue Jan 12 21:25:30 2021	(r561385)
@@ -25,15 +25,7 @@ USE_PYTHON=	autoplist distutils
 
 NO_ARCH=	yes
 
-.include <bsd.port.pre.mk>
-
-.if ${PYTHON_MAJOR_VER} < 3
-RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}contextlib2>0:devel/py-contextlib2@${PY_FLAVOR}
-TEST_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}unittest2>=0:devel/py-unittest2@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}mock>=0:devel/py-mock@${PY_FLAVOR}
-.endif
-
 post-patch:
 	${RM} ${WRKSRC}/test/__init__.py
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/devel/py-qt5-core/Makefile
==============================================================================
--- head/devel/py-qt5-core/Makefile	Tue Jan 12 21:21:14 2021	(r561384)
+++ head/devel/py-qt5-core/Makefile	Tue Jan 12 21:25:30 2021	(r561385)
@@ -30,16 +30,9 @@ DEBUG_CONFIGURE_ON=	--debug --trace
 
 .include <bsd.port.pre.mk>
 
-# Bug 180467: We need to remove the port_v${VERSION} directory that does not
-# correspond to the Python version being used to avoid failures in the
-# bytecompilation calls in post-install.
 PLIST_SUB+=	PYTHON_MAJOR_VER="${PYTHON_MAJOR_VER}"
 post-patch:
-.if ${PYTHON_MAJOR_VER} == "2"
-	${RM} -r ${WRKSRC}/pyuic/uic/port_v3
-.elif ${PYTHON_MAJOR_VER} == "3"
 	${RM} -r ${WRKSRC}/pyuic/uic/port_v2
-.endif
 
 post-install:
 	${INSTALL_DATA} ${FILESDIR}/Qt.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/PyQt5

Modified: head/devel/py-streamparse/Makefile
==============================================================================
--- head/devel/py-streamparse/Makefile	Tue Jan 12 21:21:14 2021	(r561384)
+++ head/devel/py-streamparse/Makefile	Tue Jan 12 21:25:30 2021	(r561385)
@@ -30,14 +30,7 @@ USE_PYTHON=	autoplist distutils
 
 NO_ARCH=	yes
 
-.include <bsd.port.pre.mk>
-
-.if ${PYTHON_MAJOR_VER} < 3
-RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}contextlib2>0:devel/py-contextlib2@${PY_FLAVOR}
-TEST_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}graphviz>=0:graphics/py-graphviz@${PY_FLAVOR}
-.endif
-
 post-patch:
 	${RM} ${WRKSRC}/test/__init__.py
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/mail/py-validate_email/Makefile
==============================================================================
--- head/mail/py-validate_email/Makefile	Tue Jan 12 21:21:14 2021	(r561384)
+++ head/mail/py-validate_email/Makefile	Tue Jan 12 21:25:30 2021	(r561385)
@@ -12,21 +12,11 @@ COMMENT=	Verifies if an email address is valid and rea
 LICENSE=	LGPL3+
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-# If the default version (2.7) of Python is used, use package py-dns
-MY_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dns>0:dns/py-dns@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}py3dns>0:dns/py-py3dns@${PY_FLAVOR}
 
-RUN_DEPENDS=	${MY_DEPENDS}
-
 USES=		python:3.6+
 USE_PYTHON=	distutils autoplist
 
 NO_ARCH=	yes
 
-.include <bsd.port.pre.mk>
-
-# If Python 3+ is used then use package py-py3dns instead
-.if ${PYTHON_MAJOR_VER} == "3"
-MY_DEPENDS=	${PYTHON_PKGNAMEPREFIX}py3dns>0:dns/py-py3dns@${PY_FLAVOR}
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/math/py-networkx/Makefile
==============================================================================
--- head/math/py-networkx/Makefile	Tue Jan 12 21:21:14 2021	(r561384)
+++ head/math/py-networkx/Makefile	Tue Jan 12 21:25:30 2021	(r561385)
@@ -14,8 +14,6 @@ COMMENT=	Tools for complex networks
 LICENSE=	BSD3CLAUSE
 
 RUN_DEPENDS:=	${PYTHON_PKGNAMEPREFIX}decorator>=4.1.0:devel/py-decorator@${PY_FLAVOR}
-
-#		${PY_SPHINX} \
 #		${PYTHON_PKGNAMEPREFIX}docutils>=0.12:textproc/py-docutils@${PY_FLAVOR}
 
 USES=		python:3.6+ shebangfix zip

Modified: head/print/hplip/Makefile
==============================================================================
--- head/print/hplip/Makefile	Tue Jan 12 21:21:14 2021	(r561384)
+++ head/print/hplip/Makefile	Tue Jan 12 21:25:30 2021	(r561385)
@@ -16,7 +16,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 LIB_DEPENDS=	libcupsimage.so:print/cups \
 		libdbus-1.so:devel/dbus
 RUN_DEPENDS=	cups-filters>=0:print/cups-filters \
-		${PYTHON_PKGNAMEPREFIX}dbus>=0:devel/py-dbus@${PY_FLAVOR}
+		${PYTHON_PKGNAMEPREFIX}dbus>=0:devel/py-dbus@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}gobject3>=0:devel/py-gobject3@${PY_FLAVOR}
 
 CONFLICTS_INSTALL=	hpijs-[0-9]*
 
@@ -69,12 +70,6 @@ XSANE_DESC=		Install XSane for scanning (implies SCAN)
 XSANE_IMPLIES=		SCAN
 XSANE_RUN_DEPENDS=	xsane:graphics/xsane
 
-.include <bsd.port.pre.mk>
-
-.if ${PYTHON_MAJOR_VER} >= 3
-RUN_DEPENDS+=  ${PYTHON_PKGNAMEPREFIX}gobject3>=0:devel/py-gobject3@${PY_FLAVOR}
-.endif
-
 post-patch:
 	@${REINPLACE_CMD} -e 's|-ldld||g;' \
 		-e 's|-ldl||g' \
@@ -136,4 +131,4 @@ post-install-SCAN-on:
 	${MV} ${STAGEDIR}${PREFIX}/etc/sane.d/dll.conf \
 		${STAGEDIR}${PREFIX}/etc/sane.d/dll.d/hpaio
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/security/py-fail2ban/Makefile
==============================================================================
--- head/security/py-fail2ban/Makefile	Tue Jan 12 21:21:14 2021	(r561384)
+++ head/security/py-fail2ban/Makefile	Tue Jan 12 21:25:30 2021	(r561385)
@@ -56,8 +56,6 @@ FAIL2BAN_DBDIR=	/var/db/${PORTNAME}
 PY2TO3_CMD=	${LOCALBASE}/bin/2to3-${PYTHON_VER}
 PY2TO3_ARG=	--no-diffs --write --nobackups --fix=all
 
-.include <bsd.port.pre.mk>
-
 post-patch:
 	@${REINPLACE_CMD} -e 's,/etc/fail2ban,${ETCDIR},g' ${FILES}
 	@${REINPLACE_CMD} -e 's,paths-debian.conf,paths-freebsd.conf,g' \
@@ -69,9 +67,7 @@ post-patch:
 	@${REINPLACE_CMD} -e 's, sed , ${SED} ,g' \
 		${WRKSRC}/config/action.d/hostsdeny.conf
 
-.	if ${PYTHON_MAJOR_VER} >= 3
-		(cd ${WRKSRC}/ && ${PY2TO3_CMD} ${PY2TO3_ARG} bin/* fail2ban)
-.	endif
+	(cd ${WRKSRC}/ && ${PY2TO3_CMD} ${PY2TO3_ARG} bin/* fail2ban)
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${FAIL2BAN_DBDIR} ${STAGEDIR}/var/run/fail2ban
@@ -87,4 +83,4 @@ post-install-DOCS-on:
 do-test:
 	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/www/py-lektor/Makefile
==============================================================================
--- head/www/py-lektor/Makefile	Tue Jan 12 21:21:14 2021	(r561384)
+++ head/www/py-lektor/Makefile	Tue Jan 12 21:25:30 2021	(r561385)
@@ -28,10 +28,4 @@ USE_PYTHON=	autoplist distutils
 
 NO_ARCH=	yes
 
-.include <bsd.port.pre.mk>
-
-.if ${PYTHON_MAJOR_VER} < 3
-RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}functools32>=0:devel/py-functools32@${PY_FLAVOR}
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>



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