From 884e919edda5fc7425bc25ee378467ca95cd39f4 Mon Sep 17 00:00:00 2001 From: Kubilay Kocak Date: Sun, 20 Aug 2017 03:12:19 +0000 Subject: [PATCH] devel/py-extras: Fix Python 3.x packaging Python 3.x changes the location of the compiled python objects - pyc and pyo. The pkg-plist supplied with devel/py-extras doe not account for this, so packaging with Python 3 fails. This change replaces pkg-plist with autoplist to correct the issue [1] While I'm here: - Add TEST_DEPENDS and test target - Mark architecture independence - Add LICENSE_FILE PR: 219278 Submitted by: Johannes Jost Meixner [1] Approved by: portmgr (blanket) MFH: 2017Q3 --- devel/py-extras/Makefile | 11 ++++++++++- devel/py-extras/pkg-plist | 9 --------- 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 devel/py-extras/pkg-plist diff --git a/devel/py-extras/Makefile b/devel/py-extras/Makefile index 4bde11a2d039..810e12611123 100644 --- a/devel/py-extras/Makefile +++ b/devel/py-extras/Makefile @@ -2,6 +2,7 @@ PORTNAME= extras PORTVERSION= 1.0.0 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -10,8 +11,16 @@ MAINTAINER= cs@FreeBSD.org COMMENT= Useful extra bits for Python LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}testtools>0:devel/py-testtools USES= python -USE_PYTHON= distutils +USE_PYTHON= autoplist distutils + +NO_ARCH= yes + +do-test: + @cd ${WRKSRC} && ${PYTHON_CMD} -m testtools.run extras.tests.test_suite .include diff --git a/devel/py-extras/pkg-plist b/devel/py-extras/pkg-plist deleted file mode 100644 index 3e1c6c4058ba..000000000000 --- a/devel/py-extras/pkg-plist +++ /dev/null @@ -1,9 +0,0 @@ -%%PYTHON_SITELIBDIR%%/extras/__init__.py -%%PYTHON_SITELIBDIR%%/extras/__init__.pyc -%%PYTHON_SITELIBDIR%%/extras/__init__.pyo -%%PYTHON_SITELIBDIR%%/extras/tests/__init__.py -%%PYTHON_SITELIBDIR%%/extras/tests/__init__.pyc -%%PYTHON_SITELIBDIR%%/extras/tests/__init__.pyo -%%PYTHON_SITELIBDIR%%/extras/tests/test_extras.py -%%PYTHON_SITELIBDIR%%/extras/tests/test_extras.pyc -%%PYTHON_SITELIBDIR%%/extras/tests/test_extras.pyo