pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/py-celery py-celery: Fix for Python 3.7 (async is ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6d10ab349d56
branches:  trunk
changeset: 382516:6d10ab349d56
user:      adam <adam%pkgsrc.org@localhost>
date:      Fri Jul 06 07:51:21 2018 +0000

description:
py-celery: Fix for Python 3.7 (async is a reserved keyword)

diffstat:

 net/py-celery/Makefile                               |  11 ++++-
 net/py-celery/PLIST                                  |   8 ++--
 net/py-celery/distinfo                               |   5 ++-
 net/py-celery/patches/patch-celery_backends_redis.py |  34 +++++++++++++++++++
 net/py-celery/patches/patch-celery_backends_rpc.py   |  35 ++++++++++++++++++++
 net/py-celery/patches/patch-requirements_test.txt    |  10 +++++
 6 files changed, 95 insertions(+), 8 deletions(-)

diffs (155 lines):

diff -r 1fe5296fb8e6 -r 6d10ab349d56 net/py-celery/Makefile
--- a/net/py-celery/Makefile    Fri Jul 06 07:07:45 2018 +0000
+++ b/net/py-celery/Makefile    Fri Jul 06 07:51:21 2018 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.13 2018/06/18 07:15:17 adam Exp $
+# $NetBSD: Makefile,v 1.14 2018/07/06 07:51:21 adam Exp $
 
 DISTNAME=      celery-4.2.0
+PKGREVISION=   1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    net python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=c/celery/}
@@ -16,9 +17,13 @@
 TEST_DEPENDS+= ${PYPKGPREFIX}-case>=1.3.1:../../devel/py-case
 TEST_DEPENDS+= ${PYPKGPREFIX}-test>=3.0:../../devel/py-test
 
+# Fix for Python 3.7 (async is a reserved keyword).
+# https://github.com/celery/celery/pull/4879/files
+pre-configure:
+       cd ${WRKSRC}/celery/backends && ${MV} async.py asynchronous.py || ${TRUE}
+
 post-install:
-       ${MV} ${DESTDIR}${PREFIX}/bin/celery \
-               ${DESTDIR}${PREFIX}/bin/celery${PYVERSSUFFIX} || ${TRUE}
+       cd ${DESTDIR}${PREFIX}/bin && ${MV} celery celery${PYVERSSUFFIX} || ${TRUE}
 
 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 1fe5296fb8e6 -r 6d10ab349d56 net/py-celery/PLIST
--- a/net/py-celery/PLIST       Fri Jul 06 07:07:45 2018 +0000
+++ b/net/py-celery/PLIST       Fri Jul 06 07:51:21 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2017/08/25 20:03:39 joerg Exp $
+@comment $NetBSD: PLIST,v 1.4 2018/07/06 07:51:21 adam Exp $
 bin/celery${PYVERSSUFFIX}
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
@@ -79,9 +79,9 @@
 ${PYSITELIB}/celery/backends/amqp.py
 ${PYSITELIB}/celery/backends/amqp.pyc
 ${PYSITELIB}/celery/backends/amqp.pyo
-${PYSITELIB}/celery/backends/async.py
-${PYSITELIB}/celery/backends/async.pyc
-${PYSITELIB}/celery/backends/async.pyo
+${PYSITELIB}/celery/backends/asynchronous.py
+${PYSITELIB}/celery/backends/asynchronous.pyc
+${PYSITELIB}/celery/backends/asynchronous.pyo
 ${PYSITELIB}/celery/backends/base.py
 ${PYSITELIB}/celery/backends/base.pyc
 ${PYSITELIB}/celery/backends/base.pyo
diff -r 1fe5296fb8e6 -r 6d10ab349d56 net/py-celery/distinfo
--- a/net/py-celery/distinfo    Fri Jul 06 07:07:45 2018 +0000
+++ b/net/py-celery/distinfo    Fri Jul 06 07:51:21 2018 +0000
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.7 2018/06/18 07:15:17 adam Exp $
+$NetBSD: distinfo,v 1.8 2018/07/06 07:51:21 adam Exp $
 
 SHA1 (celery-4.2.0.tar.gz) = 75a7f526efcdb93d3c8ce5028b129d9683cff6a5
 RMD160 (celery-4.2.0.tar.gz) = c5b575e8f3e20ea6eea9ce2a36b85fc8285f1cf1
 SHA512 (celery-4.2.0.tar.gz) = ad7d18c318b6383e2a44a03f55f44d30f4d2fb6f3d05529376f0b05cbc28a8acbf3961a8d24a039e46917f439c1679d1f55a5957e4bc9587a6643a5c766ca487
 Size (celery-4.2.0.tar.gz) = 1351778 bytes
+SHA1 (patch-celery_backends_redis.py) = bf2c356adf6cb79a7a0cfb4483a83352a472acbf
+SHA1 (patch-celery_backends_rpc.py) = efb7a2acda99b4f998aa1c34dec8a2ab631e2347
+SHA1 (patch-requirements_test.txt) = d2aa5524643e9804e72235cc1af0aa17123cf2b7
diff -r 1fe5296fb8e6 -r 6d10ab349d56 net/py-celery/patches/patch-celery_backends_redis.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/py-celery/patches/patch-celery_backends_redis.py      Fri Jul 06 07:51:21 2018 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-celery_backends_redis.py,v 1.1 2018/07/06 07:51:21 adam Exp $
+
+Fix for Python 3.7 (async is a reserved keyword).
+https://github.com/celery/celery/pull/4879/files
+
+--- celery/backends/redis.py.orig      2018-06-10 13:53:06.000000000 +0000
++++ celery/backends/redis.py
+@@ -19,7 +19,7 @@ from celery.utils.functional import dict
+ from celery.utils.log import get_logger
+ from celery.utils.time import humanize_seconds
+ 
+-from . import async, base
++from . import asynchronous, base
+ 
+ try:
+     from urllib.parse import unquote
+@@ -74,7 +74,7 @@ E_LOST = 'Connection to Redis lost: Retr
+ logger = get_logger(__name__)
+ 
+ 
+-class ResultConsumer(async.BaseResultConsumer):
++class ResultConsumer(asynchronous.BaseResultConsumer):
+     _pubsub = None
+ 
+     def __init__(self, *args, **kwargs):
+@@ -138,7 +138,7 @@ class ResultConsumer(async.BaseResultCon
+             self._pubsub.unsubscribe(key)
+ 
+ 
+-class RedisBackend(base.BaseKeyValueStoreBackend, async.AsyncBackendMixin):
++class RedisBackend(base.BaseKeyValueStoreBackend, asynchronous.AsyncBackendMixin):
+     """Redis task result store."""
+ 
+     ResultConsumer = ResultConsumer
diff -r 1fe5296fb8e6 -r 6d10ab349d56 net/py-celery/patches/patch-celery_backends_rpc.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/py-celery/patches/patch-celery_backends_rpc.py        Fri Jul 06 07:51:21 2018 +0000
@@ -0,0 +1,35 @@
+$NetBSD: patch-celery_backends_rpc.py,v 1.1 2018/07/06 07:51:21 adam Exp $
+
+Fix for Python 3.7 (async is a reserved keyword).
+https://github.com/celery/celery/pull/4879/files
+
+--- celery/backends/rpc.py.orig        2018-05-21 09:48:16.000000000 +0000
++++ celery/backends/rpc.py
+@@ -16,8 +16,7 @@ from celery import states
+ from celery._state import current_task, task_join_will_block
+ from celery.five import items, range
+ 
+-from . import base
+-from .async import AsyncBackendMixin, BaseResultConsumer
++from . import asynchronous, base
+ 
+ __all__ = ('BacklogLimitExceeded', 'RPCBackend')
+ 
+@@ -39,7 +38,7 @@ def _on_after_fork_cleanup_backend(backe
+     backend._after_fork()
+ 
+ 
+-class ResultConsumer(BaseResultConsumer):
++class ResultConsumer(asynchronous.BaseResultConsumer):
+     Consumer = kombu.Consumer
+ 
+     _connection = None
+@@ -89,7 +88,7 @@ class ResultConsumer(BaseResultConsumer)
+             self._consumer.cancel_by_queue(self._create_binding(task_id).name)
+ 
+ 
+-class RPCBackend(base.Backend, AsyncBackendMixin):
++class RPCBackend(base.Backend, asynchronous.AsyncBackendMixin):
+     """Base class for the RPC result backend."""
+ 
+     Exchange = kombu.Exchange
diff -r 1fe5296fb8e6 -r 6d10ab349d56 net/py-celery/patches/patch-requirements_test.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/py-celery/patches/patch-requirements_test.txt Fri Jul 06 07:51:21 2018 +0000
@@ -0,0 +1,10 @@
+$NetBSD: patch-requirements_test.txt,v 1.1 2018/07/06 07:51:21 adam Exp $
+
+Allow newer pytest.
+
+--- requirements/test.txt.orig 2018-05-21 08:01:42.000000000 +0000
++++ requirements/test.txt
+@@ -1,2 +1,2 @@
+ case>=1.3.1
+-pytest>=3.0,<3.3
++pytest>=3.0



Home | Main Index | Thread Index | Old Index