1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

net/py-pynsq: [NEW PORT] The official Python client library for NSQ

pynsq provides high-level nsq.Reader and nsq.Writer classes for building
consumers and producers and two low-level modules for both sync and async
communication over the NSQ Protocol (if you wanted to write your own
high-level functionality).

WWW: https://github.com/bitly/pynsq
This commit is contained in:
Kubilay Kocak 2013-06-22 10:43:26 +00:00
parent 3e00d89321
commit 493e765c37
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=321560
6 changed files with 135 additions and 0 deletions

View File

@ -929,6 +929,7 @@
SUBDIR += py-pcapy
SUBDIR += py-pcs
SUBDIR += py-port-for
SUBDIR += py-pynsq
SUBDIR += py-pypcap
SUBDIR += py-pysendfile
SUBDIR += py-pysphere

41
net/py-pynsq/Makefile Normal file
View File

@ -0,0 +1,41 @@
# Created by: Kubilay Kocak <koobs@FreeBSD.org>
# $FreeBSD$
PORTNAME= pynsq
PORTVERSION= 0.4.2
CATEGORIES= net python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= koobs@FreeBSD.org
COMMENT= Official Python client library for NSQ
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
OPTIONS_DEFINE= TESTS
TESTS_DESC= Install tools to run test suite
OPTIONSFILE?= ${PORT_DBDIR}/py-${PORTNAME}/options
.include <bsd.port.options.mk>
USE_GITHUB= yes
USE_PYTHON= yes
USE_PYDISTUTILS= easy_install
GH_ACCOUNT= bitly
GH_TAGNAME= v${PORTVERSION}
GH_COMMIT= 8dd5a49
post-patch:
${TOUCH} ${WRKSRC}/tests/__init__.py
.if ${PORT_OPTIONS:MTESTS}
BUILD_DEPENDS:= ${TEST_DEPENDS}
.endif
regression-test: build
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
.include <bsd.port.mk>

2
net/py-pynsq/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (pynsq-0.4.2.tar.gz) = 7452e4a77969a17f208df245ab63bbfcfd75c57541cf4508a3ef5d3f50c80a00
SIZE (pynsq-0.4.2.tar.gz) = 14906

View File

@ -0,0 +1,54 @@
--- ./setup.py.orig 2013-06-08 23:24:54.875536114 +1000
+++ ./setup.py 2013-06-08 23:25:23.966041820 +1000
@@ -1,17 +1,38 @@
from setuptools import setup
+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
+ def run_tests(self):
+ import pytest
+ errno = pytest.main(self.test_args)
+ sys.exit(errno)
+
+# also update in nsq/__init__.py
version = '0.4.2'
-setup(name='pynsq',
- version=version,
- description="a Python module for NSQ",
- keywords='python nsq',
- author='Matt Reiferson',
- author_email='snakes@gmail.com',
- url='http://github.com/bitly/pynsq',
- download_url='https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version,
- packages=['nsq'],
- requires=['tornado'],
- include_package_data=True,
- zip_safe=True,
- )
+
+setup(
+ name='pynsq',
+ version=version,
+ description="a Python module for NSQ",
+ keywords='python nsq',
+ author='Matt Reiferson',
+ author_email='snakes@gmail.com',
+ url='http://github.com/bitly/pynsq',
+ download_url='https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version,
+ packages=['nsq'],
+ requires=['tornado'],
+ include_package_data=True,
+ zip_safe=False,
+ tests_require=['pytest', 'mock', 'tornado'],
+ cmdclass={'test': PyTest},
+)
+
+

8
net/py-pynsq/pkg-descr Normal file
View File

@ -0,0 +1,8 @@
The official Python client library for NSQ
It provides high-level nsq.Reader and nsq.Writer classes for building
consumers and producers and two low-level modules for both sync and async
communication over the NSQ Protocol (if you wanted to write your own
high-level functionality).
WWW: https://github.com/bitly/pynsq

29
net/py-pynsq/pkg-plist Normal file
View File

@ -0,0 +1,29 @@
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/PKG-INFO
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/SOURCES.txt
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/dependency_links.txt
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/not-zip-safe
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO/top_level.txt
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/BackoffTimer.py
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/BackoffTimer.pyc
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/BackoffTimer.pyo
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/Reader.py
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/Reader.pyc
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/Reader.pyo
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/Writer.py
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/Writer.pyc
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/Writer.pyo
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/__init__.py
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/__init__.pyc
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/__init__.pyo
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/async.py
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/async.pyc
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/async.pyo
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/nsq.py
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/nsq.pyc
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/nsq.pyo
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/sync.py
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/sync.pyc
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq/sync.pyo
@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/nsq
@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%/EGG-INFO
@dirrm %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%