On Wed, 27 May 2015, Marc Espie wrote:
> py-oauth2-1.5.211(),py-paste-script-1.7.5() > /usr/local/lib/python2.7/site-packages/tests/__init__.py > /usr/local/lib/python2.7/site-packages/tests/__init__.pyc > > > Those files have surprisingly generic names. I wonder if they should > get packaged at all ? You can't get rid of them. See: http://stackoverflow.com/questions/448271/what-is-init-py-for > > To ponder for python people. > > I don't think it makes sense for tests to live directly under site-packages. Patch below moves the tests to a sub-dir for py-oauth2. ok? Index: Makefile =================================================================== RCS file: /home/cvs/ports/net/py-oauth2/Makefile,v retrieving revision 1.2 diff -u -p -u -r1.2 Makefile --- Makefile 2 Apr 2015 14:21:16 -0000 1.2 +++ Makefile 28 May 2015 02:56:27 -0000 @@ -5,6 +5,7 @@ COMMENT = Python library for OAuth MODPY_EGG_VERSION = 1.5.211 DISTNAME = oauth2-${MODPY_EGG_VERSION} PKGNAME = py-${DISTNAME} +REVISION = 0 CATEGORIES = net MAINTAINER = Johan Huldtgren <jhuldtg...@gmail.com> @@ -19,5 +20,8 @@ MODULES = lang/python MODPY_SETUPTOOLS = Yes RUN_DEPENDS = www/py-httplib2 + +post-extract: + mv ${WRKDIST}/tests ${WRKDIST}/oauth2 .include <bsd.port.mk> Index: patches/patch-setup_py =================================================================== RCS file: patches/patch-setup_py diff -N patches/patch-setup_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-setup_py 28 May 2015 02:44:03 -0000 @@ -0,0 +1,13 @@ +$OpenBSD$ + +move regress tests to avoid collisions with other ports. + +--- setup.py.orig Wed May 27 22:42:52 2015 ++++ setup.py Wed May 27 22:43:05 2015 +@@ -36,5 +36,5 @@ setup(name=PKG, + license = "MIT License", + keywords="oauth", + zip_safe = True, +- test_suite="tests", ++ test_suite="oauth2.tests", + tests_require=['coverage', 'mock']) Index: pkg/PLIST =================================================================== RCS file: /home/cvs/ports/net/py-oauth2/pkg/PLIST,v retrieving revision 1.1.1.1 diff -u -p -u -r1.1.1.1 PLIST --- pkg/PLIST 31 Oct 2014 11:59:07 -0000 1.1.1.1 +++ pkg/PLIST 28 May 2015 02:56:47 -0000 @@ -18,8 +18,8 @@ lib/python${MODPY_VERSION}/site-packages lib/python${MODPY_VERSION}/site-packages/oauth2/clients/imap.pyc lib/python${MODPY_VERSION}/site-packages/oauth2/clients/smtp.py lib/python${MODPY_VERSION}/site-packages/oauth2/clients/smtp.pyc -lib/python${MODPY_VERSION}/site-packages/tests/ -lib/python${MODPY_VERSION}/site-packages/tests/__init__.py -lib/python${MODPY_VERSION}/site-packages/tests/__init__.pyc -lib/python${MODPY_VERSION}/site-packages/tests/test_oauth.py -lib/python${MODPY_VERSION}/site-packages/tests/test_oauth.pyc +lib/python${MODPY_VERSION}/site-packages/oauth2/tests/ +lib/python${MODPY_VERSION}/site-packages/oauth2/tests/__init__.py +lib/python${MODPY_VERSION}/site-packages/oauth2/tests/__init__.pyc +lib/python${MODPY_VERSION}/site-packages/oauth2/tests/test_oauth.py +lib/python${MODPY_VERSION}/site-packages/oauth2/tests/test_oauth.pyc