svn commit: r517602 - head/devel/py-mock

Enji Cooper ngie at FreeBSD.org
Thu Nov 14 17:11:59 UTC 2019


Author: ngie (src committer)
Date: Thu Nov 14 17:11:58 2019
New Revision: 517602
URL: https://svnweb.freebsd.org/changeset/ports/517602

Log:
  Upgrade devel/py-mock from 2.0.0 to 3.0.5 and fix "make test" target
  
  Version 3.0.5 includes multiple bugfixes and such for the backport library
  that will aid in writing tests where the environment doesn't contain
  `unittest.mock`.
  
  In order to ensure that the code actually works, I needed to run the tests.
  This required working around https://github.com/testing-cabal/mock/issues/469
  by pulling the sources from the GitHub project that correspond with the
  release tag, as the source tarball tagged for the release doesn't contain the
  tests (prior to this change it would run 0 tests with `make test`, because
  there weren't any).
  
  Remove an unnecessary build dependency while here: pbr is no longer needed to
  build the package.
  
  Add py-pytest to TEST_DEPENDS, as running the tests as currently done via
  distutils doesn't work due to how the tests are enumerated.
  
  Conversely, remove the devel/py-tox dependency: it was never installed before
  due to a typo in the variable name and it adds a lot of unnecessary
  dependencies that aren't required when testing the port with `make test`. This
  helps keep the footprint down, which helps others upgrade the devel/py-mock
  port by itself.
  
  Address portlint issues while here.
  
  The changelog for the project can be found here on [GitHub](https://github.com/testing-cabal/mock/blob/master/CHANGELOG.rst).
  
  PR:		241780
  Approved by:	jessekempf at gmail.com (maintainer timeout), woodsdb (ports)
  Discussed with:	bdrewery, Vladimir.Chukharev at gmail.com
  Differential Revision:	https://reviews.freebsd.org/D21654

Modified:
  head/devel/py-mock/Makefile
  head/devel/py-mock/distinfo

Modified: head/devel/py-mock/Makefile
==============================================================================
--- head/devel/py-mock/Makefile	Thu Nov 14 16:55:22 2019	(r517601)
+++ head/devel/py-mock/Makefile	Thu Nov 14 17:11:58 2019	(r517602)
@@ -2,9 +2,8 @@
 # $FreeBSD$
 
 PORTNAME=	mock
-PORTVERSION=	2.0.0
+PORTVERSION=	3.0.5
 CATEGORIES=	devel python
-MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	jessekempf at gmail.com
@@ -13,22 +12,25 @@ COMMENT=	Mock unit tests for Python
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
-BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pbr>=1.3:devel/py-pbr@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}six>=1.9:devel/py-six@${PY_FLAVOR}
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}six>=1.9:devel/py-six@${PY_FLAVOR}
 RUN_DEPENDS:=	${BUILD_DEPENDS}
-TESTS_DEPENDS=	${PYTHON_PKGNAMEPREFIX}tox>0:devel/py-tox@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
 
-NO_ARCH=	yes
 USES=		python
 USE_PYTHON=	autoplist concurrent distutils
 
+NO_ARCH=	yes
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	testing-cabal
+
 .include <bsd.port.pre.mk>
 
 .if ${PYTHON_REL} < 3300
-RUN_DEPENDS+=  ${PYTHON_PKGNAMEPREFIX}funcsigs>=0:devel/py-funcsigs@${PY_FLAVOR}
+RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}funcsigs>=0:devel/py-funcsigs@${PY_FLAVOR}
 .endif
 
 do-test:
-	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
+	@cd ${WRKSRC} && pytest
 
 .include <bsd.port.post.mk>

Modified: head/devel/py-mock/distinfo
==============================================================================
--- head/devel/py-mock/distinfo	Thu Nov 14 16:55:22 2019	(r517601)
+++ head/devel/py-mock/distinfo	Thu Nov 14 17:11:58 2019	(r517602)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1490606425
-SHA256 (mock-2.0.0.tar.gz) = b158b6df76edd239b8208d481dc46b6afd45a846b7812ff0ce58971cf5bc8bba
-SIZE (mock-2.0.0.tar.gz) = 73684
+TIMESTAMP = 1572976175
+SHA256 (testing-cabal-mock-3.0.5_GH0.tar.gz) = ff286cec703de8770f735269575ecb7d1c937b8851eba8de94d800df084e627c
+SIZE (testing-cabal-mock-3.0.5_GH0.tar.gz) = 67887


More information about the svn-ports-all mailing list