ports/devel/py-pytest-mock/Makefile
Kubilay Kocak a1c440f7bd devel/py-pytest-mock: Update to 1.10.4
- Conditionalise mock dependency (Python 2.x only)
  - Add upstream patches to fix test failures with mock 3.x
  - Verbosify test target and print skipped messages/reasons
  - Pet portlint: NO_ARCH in USE/USES section

Changelog:

  https://github.com/pytest-dev/pytest-mock/blob/1.10.4/CHANGELOG.rst

Reviewed by:		olgeni
Approved by:		olgeni (maintainer)
Differential Revision:	D20167
2019-05-07 12:22:26 +00:00

35 lines
905 B
Makefile

# $FreeBSD$
PORTNAME= pytest-mock
PORTVERSION= 1.10.4
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
PATCH_SITES= https://github.com/pytest-dev/${PORTNAME}/commit/
PATCHFILES= b3badafebedea3605c90eb22a68adff2885a8bb0.patch:-p1
MAINTAINER= olgeni@FreeBSD.org
COMMENT= Thin wrapper around the mock package for easier use with py.test
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=2.7:devel/py-pytest@${PY_FLAVOR}
USES= python
USE_PYTHON= autoplist concurrent distutils
NO_ARCH= yes
.include <bsd.port.pre.mk>
.if ${PYTHON_VER} < 3.0
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR}
.endif
do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs test_pytest_mock.py
.include <bsd.port.post.mk>