diff options
author | koobs <koobs@FreeBSD.org> | 2016-02-25 21:48:06 +0800 |
---|---|---|
committer | koobs <koobs@FreeBSD.org> | 2016-02-25 21:48:06 +0800 |
commit | f5e2c242e76d8bc4bc74f2043fbc7225a93ec504 (patch) | |
tree | 6dfbd07349a7ac2ff48734f059f435f9916df162 /net | |
parent | 8b342e9a89f7806f35a5388a24dc2d9f82414d97 (diff) | |
download | freebsd-ports-gnome-f5e2c242e76d8bc4bc74f2043fbc7225a93ec504.tar.gz freebsd-ports-gnome-f5e2c242e76d8bc4bc74f2043fbc7225a93ec504.tar.zst freebsd-ports-gnome-f5e2c242e76d8bc4bc74f2043fbc7225a93ec504.zip |
net/py-pynsq: Update to 0.6.9, Modernize
- Update PORTVERSION and distinfo checksum (0.6.9)
- Update TEST_DEPENDS and test target
- Remove TESTS option bits accordingly
- Sort USE{S} entries
- Enable NO_ARCH (architecture independent)
- Patch setup.py to remove unnecessary tornado entry and exclude tests
from installation, for a future upstream patch that adds tests to the
PyPI sdist.
Changes:
https://github.com/nsqio/pynsq/blob/v0.6.9/ChangeLog.md
Diffstat (limited to 'net')
-rw-r--r-- | net/py-pynsq/Makefile | 30 | ||||
-rw-r--r-- | net/py-pynsq/distinfo | 4 | ||||
-rw-r--r-- | net/py-pynsq/files/patch-setup.py | 43 |
3 files changed, 58 insertions, 19 deletions
diff --git a/net/py-pynsq/Makefile b/net/py-pynsq/Makefile index dd21a70d1050..9ea9c3a76773 100644 --- a/net/py-pynsq/Makefile +++ b/net/py-pynsq/Makefile @@ -2,9 +2,8 @@ # $FreeBSD$ PORTNAME= pynsq -PORTVERSION= 0.5.1 +PORTVERSION= 0.6.9 DISTVERSIONPREFIX= v -PORTREVISION= 1 CATEGORIES= net python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,27 +11,24 @@ MAINTAINER= koobs@FreeBSD.org COMMENT= Official Python client library for NSQ LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tornado>0:${PORTSDIR}/www/py-tornado -TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tornado>0:${PORTSDIR}/www/py-tornado \ - ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest \ - ${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest \ + ${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock \ + ${PYTHON_PKGNAMEPREFIX}python-snappy>0:${PORTSDIR}/archivers/py-python-snappy \ + ${PYTHON_PKGNAMEPREFIX}simplejson>0:${PORTSDIR}/devel/py-simplejson -OPTIONS_DEFINE= TESTS -TESTS_DESC= Install tools to run test suite - -USES= python -USE_PYTHON= distutils autoplist +USES= python:-2.7 USE_GITHUB= yes -GH_ACCOUNT= bitly +USE_PYTHON= distutils autoplist -.include <bsd.port.options.mk> +GH_ACCOUNT= bitly -.if ${PORT_OPTIONS:MTESTS} -BUILD_DEPENDS:= ${TEST_DEPENDS} -.endif +NO_ARCH= yes -regression-test: build - @cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test +# test_reader requires nsqd(8) +do-test: + @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test -a "--ignore=tests/test_reader.py" .include <bsd.port.mk> diff --git a/net/py-pynsq/distinfo b/net/py-pynsq/distinfo index 0961fd06f5a6..183354007235 100644 --- a/net/py-pynsq/distinfo +++ b/net/py-pynsq/distinfo @@ -1,2 +1,2 @@ -SHA256 (bitly-pynsq-v0.5.1_GH0.tar.gz) = a0c2714faef2401cbebddd3f95bf26bedd34f09e7063e5f15cb1bbf0a40215b2 -SIZE (bitly-pynsq-v0.5.1_GH0.tar.gz) = 25714 +SHA256 (bitly-pynsq-v0.6.9_GH0.tar.gz) = c874715a843528c7f10480c7137cd3bb3b867f5f080d34798071a9629dfdb281 +SIZE (bitly-pynsq-v0.6.9_GH0.tar.gz) = 40001 diff --git a/net/py-pynsq/files/patch-setup.py b/net/py-pynsq/files/patch-setup.py new file mode 100644 index 000000000000..50b64f6a70e2 --- /dev/null +++ b/net/py-pynsq/files/patch-setup.py @@ -0,0 +1,43 @@ +--- setup.py.orig 2016-02-21 16:49:18 UTC ++++ setup.py +@@ -1,17 +1,19 @@ +-from setuptools import setup ++from setuptools import setup, find_packages + from setuptools.command.test import test as TestCommand + import sys + + + class PyTest(TestCommand): +- def finalize_options(self): +- TestCommand.finalize_options(self) +- self.test_args = [] +- self.test_suite = True ++ user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] ++ ++ def initialize_options(self): ++ TestCommand.initialize_options(self) ++ self.pytest_args = [] + + def run_tests(self): ++ #import here, cause outside the eggs aren't loaded + import pytest +- errno = pytest.main(self.test_args) ++ errno = pytest.main(self.pytest_args) + sys.exit(errno) + + +@@ -31,12 +33,12 @@ setup( + 'https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % + version + ), +- packages=['nsq'], + install_requires=['tornado'], + include_package_data=True, ++ packages=find_packages(exclude=['tests']), + zip_safe=False, + tests_require=['pytest', 'mock', 'simplejson', +- 'python-snappy', 'tornado'], ++ 'python-snappy'], + cmdclass={'test': PyTest}, + classifiers=[ + 'Development Status :: 4 - Beta', |