svn commit: r511404 - in head/devel/py-google-pasta: . files

Kubilay Kocak koobs at FreeBSD.org
Sat Sep 7 12:50:48 UTC 2019


Author: koobs
Date: Sat Sep  7 12:50:47 2019
New Revision: 511404
URL: https://svnweb.freebsd.org/changeset/ports/511404

Log:
  devel/py-google-pasta: Add missing dependency
  
  six is a documented [1][2] dependency, add it to install_requires
  accordingly.
  
  While I'm here, add a test target and patch setup.py so it doesn't run
  the tests twice.
  
  [1] https://github.com/google/pasta#dependencies
  [2] https://github.com/google/pasta/pull/77
  
  Approved by:	portmgr (blanket(s): missing dependencies, framework)
  MFH:		2019Q3

Added:
  head/devel/py-google-pasta/files/
  head/devel/py-google-pasta/files/patch-setup.py   (contents, props changed)
Modified:
  head/devel/py-google-pasta/Makefile

Modified: head/devel/py-google-pasta/Makefile
==============================================================================
--- head/devel/py-google-pasta/Makefile	Sat Sep  7 11:38:09 2019	(r511403)
+++ head/devel/py-google-pasta/Makefile	Sat Sep  7 12:50:47 2019	(r511404)
@@ -2,6 +2,7 @@
 
 PORTNAME=	google-pasta
 PORTVERSION=	0.1.7
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,9 +12,14 @@ COMMENT=	Library to refactor python code through AST m
 
 LICENSE=	APACHE20
 
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}
+
 USES=		python
 USE_PYTHON=	distutils autoplist
 
 NO_ARCH=	yes
+
+do-test:
+	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
 
 .include <bsd.port.mk>

Added: head/devel/py-google-pasta/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-google-pasta/files/patch-setup.py	Sat Sep  7 12:50:47 2019	(r511404)
@@ -0,0 +1,27 @@
+# Fix tests running twice
+# TODO: Upstream
+
+# Register six dependency
+# https://github.com/google/pasta/pull/77
+
+--- setup.py.orig	2019-05-29 17:07:01 UTC
++++ setup.py
+@@ -26,7 +26,8 @@ def all_tests():
+     test_suite = test_loader.discover('.', pattern='*_test.py')
+     return test_suite
+ 
+-setup(
++if __name__ == '__main__':
++  setup(
+     name="google-pasta",
+     version="0.1.7",
+     packages=find_packages(),
+@@ -43,4 +44,7 @@ setup(
+         "Development Status :: 2 - Pre-Alpha",
+         "License :: OSI Approved :: Apache Software License",
+     ],
+-)
++    install_requires=[
++        'six',
++    ],
++  )


More information about the svn-ports-all mailing list