kmos c45cd79fc7 Add RUN_DEPENDS to TEST_DEPENDS automatically for ports using the
lang/python port module. I've not yet come up with a port that
would not need this and one can always set MODPY_TESTDEP to "no"
to prevent the module from touching TEST_DEPENDS.

Idea from afresh1 who pointed out the cpan module already does this.

aja "I support this move."

OK sthen@
2019-05-15 12:04:34 +00:00

38 lines
769 B
Makefile

# $OpenBSD: Makefile,v 1.13 2019/05/15 12:04:36 kmos Exp $
COMMENT= python mocking and patching library for testing
MODPY_EGG_VERSION= 2.0.0
DISTNAME= mock-${MODPY_EGG_VERSION}
PKGNAME= py-${DISTNAME}
CATEGORIES= devel
REVISION= 1
HOMEPAGE= http://www.voidspace.org.uk/python/mock/
# BSD
PERMIT_PACKAGE_CDROM= Yes
MODULES= lang/python
BUILD_DEPENDS= devel/py-pbr${MODPY_FLAVOR}
RUN_DEPENDS= devel/py-six${MODPY_FLAVOR} \
devel/py-pbr${MODPY_FLAVOR}
FLAVORS = python3
FLAVOR ?=
MODPY_PI = Yes
MODPY_SETUPTOOLS= Yes
.if !${FLAVOR:Mpython3}
RUN_DEPENDS += devel/py-funcsigs
.endif
post-patch:
cd ${WRKSRC}/mock/tests && perl -i -pe 's/unittest2/unittest/g' *.py
do-test:
cd ${WRKSRC} && ${MODPY_BIN} -m unittest discover
.include <bsd.port.mk>