On Mon, 9 May 2016 23:01:22 +0200, Antoine Jacoutot <ajacou...@bsdfrog.org> wrote:
> > +FLAVORS = python3 > > +FLAVOR ?= > > + > > +post-install: > > + mv ${PREFIX}/bin/jsonschema > > ${PREFIX}/bin/jsonschema${MODPY_BIN_SUFFIX} > > Any reason not to do this only for the python3 FLAVOR? It doesn't change much thing, I think, but I don't have any strong opinion about it. Index: Makefile =================================================================== RCS file: /cvs/ports/devel/py-jsonschema/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- Makefile 29 Sep 2015 10:51:54 -0000 1.3 +++ Makefile 9 May 2016 21:29:10 -0000 @@ -5,18 +5,12 @@ COMMENT = implementation of JSON Schema MODPY_EGG_VERSION = 2.5.1 DISTNAME = jsonschema-${MODPY_EGG_VERSION} PKGNAME = py-${DISTNAME} -REVISION = 0 +REVISION = 1 CATEGORIES = devel HOMEPAGE = http://github.com/Julian/jsonschema -BUILD_DEPENDS = devel/py-vcversioner -RUN_DEPENDS = devel/py-functools32 -TEST_DEPENDS = ${RUN_DEPENDS} \ - devel/py-test \ - devel/py-mock - # MIT PERMIT_PACKAGE_CDROM = Yes @@ -24,8 +18,24 @@ MODULES = lang/python MODPY_PI = Yes MODPY_SETUPTOOLS = Yes +FLAVORS = python3 +FLAVOR ?= + +BUILD_DEPENDS = devel/py-vcversioner${MODPY_FLAVOR} +.if !${FLAVOR:Mpython3} +RUN_DEPENDS += devel/py-functools32 +.endif +TEST_DEPENDS = ${RUN_DEPENDS} \ + devel/py-test${MODPY_FLAVOR} \ + devel/py-mock${MODPY_FLAVOR} + +.if ${FLAVOR:Mpython3} +post-install: + mv ${PREFIX}/bin/jsonschema ${PREFIX}/bin/jsonschema${MODPY_BIN_SUFFIX} +.endif + do-test: cd ${WRKSRC}/jsonschema && \ - ${LOCALBASE}/bin/py.test + ${LOCALBASE}/bin/py.test${MODPY_BIN_SUFFIX} .include <bsd.port.mk> Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/devel/py-jsonschema/pkg/PLIST,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 PLIST --- pkg/PLIST 16 Aug 2015 19:46:22 -0000 1.1.1.1 +++ pkg/PLIST 9 May 2016 21:29:10 -0000 @@ -1,5 +1,5 @@ @comment $OpenBSD: PLIST,v 1.1.1.1 2015/08/16 19:46:22 edd Exp $ -bin/jsonschema +bin/jsonschema${MODPY_BIN_SUFFIX} lib/python${MODPY_VERSION}/site-packages/jsonschema/ lib/python${MODPY_VERSION}/site-packages/jsonschema-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/ lib/python${MODPY_VERSION}/site-packages/jsonschema-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO @@ -10,42 +10,44 @@ lib/python${MODPY_VERSION}/site-packages lib/python${MODPY_VERSION}/site-packages/jsonschema-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/requires.txt lib/python${MODPY_VERSION}/site-packages/jsonschema-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt lib/python${MODPY_VERSION}/site-packages/jsonschema/__init__.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/__init__.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/__main__.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/__main__.pyc +${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}/ +lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}__main__.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}_format.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}_reflect.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}_utils.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}_validators.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}_version.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}cli.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}compat.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}exceptions.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/${MODPY_PYCACHE}validators.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/_format.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/_format.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/_reflect.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/_reflect.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/_utils.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/_utils.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/_validators.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/_validators.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/_version.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/_version.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/cli.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/cli.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/compat.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/compat.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/exceptions.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/exceptions.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/schemas/ lib/python${MODPY_VERSION}/site-packages/jsonschema/schemas/draft3.json lib/python${MODPY_VERSION}/site-packages/jsonschema/schemas/draft4.json lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/ lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/__init__.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/__init__.pyc +${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/${MODPY_PYCACHE}/ +lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/${MODPY_PYCACHE}compat.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/${MODPY_PYCACHE}test_cli.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/${MODPY_PYCACHE}test_exceptions.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/${MODPY_PYCACHE}test_format.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/${MODPY_PYCACHE}test_jsonschema_test_suite.${MODPY_PYC_MAGIC_TAG}pyc +lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/${MODPY_PYCACHE}test_validators.${MODPY_PYC_MAGIC_TAG}pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/compat.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/compat.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/test_cli.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/test_cli.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/test_exceptions.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/test_exceptions.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/test_format.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/test_format.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/test_jsonschema_test_suite.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/test_jsonschema_test_suite.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/test_validators.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/tests/test_validators.pyc lib/python${MODPY_VERSION}/site-packages/jsonschema/validators.py -lib/python${MODPY_VERSION}/site-packages/jsonschema/validators.pyc