svn commit: r344501 - in head/www/py-grequests: . files
Kubilay Kocak
koobs at FreeBSD.org
Sun Feb 16 07:01:04 UTC 2014
Author: koobs
Date: Sun Feb 16 07:01:03 2014
New Revision: 344501
URL: http://svnweb.freebsd.org/changeset/ports/344501
QAT: https://qat.redports.org/buildarchive/r344501/
Log:
www/py-grequests: Modernise and fix tests
- Enable STAGE support
- Enable AUTOPLIST support, delete pkg-plist
- RUN_DEPENDS: Use requests 2.x
- Deprecate easy_install target
- Update LICENSE (BSD2CLAUSE)
- Add TEST_DEPENDS
- Make tests work using standard setup.py test command [1]
- Backport commit for tests using requests hook **kwargs [2]
[1] https://github.com/kennethreitz/grequests/pull/47
[2] https://github.com/kennethreitz/grequests/commit/f50782ad63607b85e5e009f4a0a4ce0a8a6aef0d
Added:
head/www/py-grequests/files/patch-tests__test_grequests.py (contents, props changed)
Deleted:
head/www/py-grequests/pkg-plist
Modified:
head/www/py-grequests/Makefile
head/www/py-grequests/files/patch-setup.py
Modified: head/www/py-grequests/Makefile
==============================================================================
--- head/www/py-grequests/Makefile Sun Feb 16 06:06:48 2014 (r344500)
+++ head/www/py-grequests/Makefile Sun Feb 16 07:01:03 2014 (r344501)
@@ -3,17 +3,19 @@
PORTNAME= grequests
PORTVERSION= 0.2.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= koobs at FreeBSD.org
COMMENT= Requests with Gevent to make asyncronous HTTP requests
-LICENSE= BSD
+LICENSE= BSD2CLAUSE
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gevent>0:${PORTSDIR}/devel/py-gevent \
- ${PYTHON_PKGNAMEPREFIX}requests1>=1.0.0:${PORTSDIR}/www/py-requests1
+ ${PYTHON_PKGNAMEPREFIX}requests>=1.0.0:${PORTSDIR}/www/py-requests
+TEST_DEPENDS:= ${RUN_DEPENDS} \
+ ${PYTHON_PKGNAMEPREFIX}nose>0:${PORTSDIR}/devel/py-nose
USE_GITHUB= yes
GH_ACCOUNT= kennethreitz
@@ -21,10 +23,10 @@ GH_TAGNAME= v${DISTVERSION}
GH_COMMIT= aee3be6
USE_PYTHON= yes
-USE_PYDISTUTILS= easy_install
+USE_PYDISTUTILS= yes
+PYDISTUTILS_AUTOPLIST= yes
regression-test: build
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
-NO_STAGE= yes
.include <bsd.port.mk>
Modified: head/www/py-grequests/files/patch-setup.py
==============================================================================
--- head/www/py-grequests/files/patch-setup.py Sun Feb 16 06:06:48 2014 (r344500)
+++ head/www/py-grequests/files/patch-setup.py Sun Feb 16 07:01:03 2014 (r344501)
@@ -1,10 +1,14 @@
---- ./setup.py.orig 2013-03-05 10:04:42.000000000 +1100
-+++ ./setup.py 2013-04-29 20:25:38.800634016 +1000
-@@ -56,5 +56,6 @@
+# Support test command w/ tests_require & test_suite
+# https://github.com/kennethreitz/grequests/pull/47
+
+--- ./setup.py.orig 2014-02-16 17:35:13.772145487 +1100
++++ ./setup.py 2014-02-16 17:36:15.191123632 +1100
+@@ -56,5 +56,7 @@
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
- ]
+ ],
-+ test_suite='tests'
++ tests_require = ['nose'],
++ test_suite = 'nose.collector',
)
Added: head/www/py-grequests/files/patch-tests__test_grequests.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/py-grequests/files/patch-tests__test_grequests.py Sun Feb 16 07:01:03 2014 (r344501)
@@ -0,0 +1,23 @@
+# Fix: request use **kwargs with its hooks.
+# https://github.com/kennethreitz/grequests/commit/f50782ad63607b85e5e009f4a0a4ce0a8a6aef0d
+
+--- ./tests/test_grequests.py.orig 2014-02-16 17:23:40.926364751 +1100
++++ ./tests/test_grequests.py 2014-02-16 17:24:14.491232949 +1100
+@@ -38,7 +38,7 @@
+ def test_hooks(self):
+ result = {}
+
+- def hook(r):
++ def hook(r, **kwargs):
+ result[r.url] = True
+ return r
+
+@@ -49,7 +49,7 @@
+ def test_callback_kwarg(self):
+ result = {'ok': False}
+
+- def callback(r):
++ def callback(r, **kwargs):
+ result['ok'] = True
+ return r
+
More information about the svn-ports-all
mailing list