aboutsummaryrefslogtreecommitdiff
path: root/net/py-pynsq
diff options
context:
space:
mode:
authorKubilay Kocak <koobs@FreeBSD.org>2013-06-22 10:43:26 +0000
committerKubilay Kocak <koobs@FreeBSD.org>2013-06-22 10:43:26 +0000
commit493e765c37451f2bb2582a61dbf4914c29448e48 (patch)
treea110f7122896161c73fcd19d08f9af3c90daba63 /net/py-pynsq
parent3e00d8932156810458df806b508b22863e6302b0 (diff)
downloadports-493e765c37451f2bb2582a61dbf4914c29448e48.tar.gz
ports-493e765c37451f2bb2582a61dbf4914c29448e48.zip
Notes
Diffstat (limited to 'net/py-pynsq')
-rw-r--r--net/py-pynsq/Makefile41
-rw-r--r--net/py-pynsq/distinfo2
-rw-r--r--net/py-pynsq/files/patch-setup.py54
-rw-r--r--net/py-pynsq/pkg-descr8
-rw-r--r--net/py-pynsq/pkg-plist29
5 files changed, 134 insertions, 0 deletions
diff --git a/net/py-pynsq/Makefile b/net/py-pynsq/Makefile
new file mode 100644
index 000000000000..b4194506acf9
--- /dev/null
+++ b/net/py-pynsq/Makefile
@@ -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>
diff --git a/net/py-pynsq/distinfo b/net/py-pynsq/distinfo
new file mode 100644
index 000000000000..cbe45e9e7731
--- /dev/null
+++ b/net/py-pynsq/distinfo
@@ -0,0 +1,2 @@
+SHA256 (pynsq-0.4.2.tar.gz) = 7452e4a77969a17f208df245ab63bbfcfd75c57541cf4508a3ef5d3f50c80a00
+SIZE (pynsq-0.4.2.tar.gz) = 14906
diff --git a/net/py-pynsq/files/patch-setup.py b/net/py-pynsq/files/patch-setup.py
new file mode 100644
index 000000000000..f37462725b00
--- /dev/null
+++ b/net/py-pynsq/files/patch-setup.py
@@ -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},
++)
++
++
diff --git a/net/py-pynsq/pkg-descr b/net/py-pynsq/pkg-descr
new file mode 100644
index 000000000000..e9ba684fd3d1
--- /dev/null
+++ b/net/py-pynsq/pkg-descr
@@ -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
diff --git a/net/py-pynsq/pkg-plist b/net/py-pynsq/pkg-plist
new file mode 100644
index 000000000000..694133094943
--- /dev/null
+++ b/net/py-pynsq/pkg-plist
@@ -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%%