pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/py-tweepy Don't parse requirements. Don't use 'asy...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/38041bdc24bc
branches:  trunk
changeset: 423698:38041bdc24bc
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Feb 24 00:02:59 2020 +0000

description:
Don't parse requirements. Don't use 'async', which got promoted to
keyword in Python 3.7. Bump revision.

diffstat:

 net/py-tweepy/Makefile                          |   3 +-
 net/py-tweepy/PLIST                             |   3 +-
 net/py-tweepy/distinfo                          |   4 +-
 net/py-tweepy/patches/patch-setup.py            |  32 ++++++++
 net/py-tweepy/patches/patch-tweepy_streaming.py |  92 +++++++++++++++++++++++++
 5 files changed, 130 insertions(+), 4 deletions(-)

diffs (171 lines):

diff -r c7cc04825f39 -r 38041bdc24bc net/py-tweepy/Makefile
--- a/net/py-tweepy/Makefile    Sun Feb 23 23:59:44 2020 +0000
+++ b/net/py-tweepy/Makefile    Mon Feb 24 00:02:59 2020 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.7 2018/01/07 21:01:28 joerg Exp $
+# $NetBSD: Makefile,v 1.8 2020/02/24 00:02:59 joerg Exp $
 
 DISTNAME=      tweepy-3.5.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION=   1
 CATEGORIES=    net python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=t/tweepy/}
 
diff -r c7cc04825f39 -r 38041bdc24bc net/py-tweepy/PLIST
--- a/net/py-tweepy/PLIST       Sun Feb 23 23:59:44 2020 +0000
+++ b/net/py-tweepy/PLIST       Mon Feb 24 00:02:59 2020 +0000
@@ -1,8 +1,7 @@
-@comment $NetBSD: PLIST,v 1.2 2017/10/14 10:23:01 adam Exp $
+@comment $NetBSD: PLIST,v 1.3 2020/02/24 00:02:59 joerg Exp $
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
 ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
-${PYSITELIB}/${EGG_INFODIR}/requires.txt
 ${PYSITELIB}/${EGG_INFODIR}/top_level.txt
 ${PYSITELIB}/${EGG_INFODIR}/zip-safe
 ${PYSITELIB}/examples/__init__.py
diff -r c7cc04825f39 -r 38041bdc24bc net/py-tweepy/distinfo
--- a/net/py-tweepy/distinfo    Sun Feb 23 23:59:44 2020 +0000
+++ b/net/py-tweepy/distinfo    Mon Feb 24 00:02:59 2020 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.3 2017/10/14 10:23:01 adam Exp $
+$NetBSD: distinfo,v 1.4 2020/02/24 00:02:59 joerg Exp $
 
 SHA1 (tweepy-3.5.0.tar.gz) = 572ab73540ac6aadd19c125dfaa3208c661ca65d
 RMD160 (tweepy-3.5.0.tar.gz) = 96db56b0233e8ec01b57e2d28b1176b6f42c328c
 SHA512 (tweepy-3.5.0.tar.gz) = cf87f0b7dea0ca444c17a3fdb9c2ebef814683c110511876c1997630b3202393276d3dd2de3b37fc21eb7a15382d22cc886109bda5a11b3d06a08081704c8c2a
 Size (tweepy-3.5.0.tar.gz) = 24348 bytes
+SHA1 (patch-setup.py) = 45429ecb0f37893df924aca353cd85add2fdd0dd
+SHA1 (patch-tweepy_streaming.py) = 456652db7f555a8c0bb57e3cc168b039f6e637a3
diff -r c7cc04825f39 -r 38041bdc24bc net/py-tweepy/patches/patch-setup.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/py-tweepy/patches/patch-setup.py      Mon Feb 24 00:02:59 2020 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-setup.py,v 1.1 2020/02/24 00:02:59 joerg Exp $
+
+Don't use obsolete parse_requirements.
+
+--- setup.py.orig      2020-02-22 21:25:23.469977185 +0000
++++ setup.py
+@@ -2,7 +2,6 @@
+ #from distutils.core import setup
+ import re, uuid
+ from setuptools import setup, find_packages
+-from pip.req import parse_requirements
+ 
+ VERSIONFILE = "tweepy/__init__.py"
+ ver_file = open(VERSIONFILE, "rt").read()
+@@ -14,9 +13,6 @@ if mo:
+ else:
+     raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
+ 
+-install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
+-reqs = [str(req.req) for req in install_reqs]
+-
+ setup(name="tweepy",
+       version=version,
+       description="Twitter library for python",
+@@ -25,7 +21,6 @@ setup(name="tweepy",
+       author_email="tweepy%googlegroups.com@localhost",
+       url="http://github.com/tweepy/tweepy";,
+       packages=find_packages(exclude=['tests']),
+-      install_requires=reqs,
+       keywords="twitter library",
+       classifiers=[
+           'Development Status :: 4 - Beta',
diff -r c7cc04825f39 -r 38041bdc24bc net/py-tweepy/patches/patch-tweepy_streaming.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/py-tweepy/patches/patch-tweepy_streaming.py   Mon Feb 24 00:02:59 2020 +0000
@@ -0,0 +1,92 @@
+$NetBSD: patch-tweepy_streaming.py,v 1.1 2020/02/24 00:02:59 joerg Exp $
+
+async is a keyword with Python 3.7+.
+
+--- tweepy/streaming.py.orig   2020-02-22 21:32:10.478599720 +0000
++++ tweepy/streaming.py
+@@ -352,9 +352,9 @@ class Stream(object):
+         if resp.raw.closed:
+             self.on_closed(resp)
+ 
+-    def _start(self, async):
++    def _start(self, do_async):
+         self.running = True
+-        if async:
++        if do_async:
+             self._thread = Thread(target=self._run)
+             self._thread.start()
+         else:
+@@ -370,7 +370,7 @@ class Stream(object):
+                    replies=None,
+                    track=None,
+                    locations=None,
+-                   async=False,
++                   do_async=False,
+                    encoding='utf8'):
+         self.session.params = {'delimited': 'length'}
+         if self.running:
+@@ -391,34 +391,34 @@ class Stream(object):
+         if track:
+             self.session.params['track'] = u','.join(track).encode(encoding)
+ 
+-        self._start(async)
++        self._start(do_async)
+ 
+-    def firehose(self, count=None, async=False):
++    def firehose(self, count=None, do_async=False):
+         self.session.params = {'delimited': 'length'}
+         if self.running:
+             raise TweepError('Stream object already connected!')
+         self.url = '/%s/statuses/firehose.json' % STREAM_VERSION
+         if count:
+             self.url += '&count=%s' % count
+-        self._start(async)
++        self._start(do_async)
+ 
+-    def retweet(self, async=False):
++    def retweet(self, do_async=False):
+         self.session.params = {'delimited': 'length'}
+         if self.running:
+             raise TweepError('Stream object already connected!')
+         self.url = '/%s/statuses/retweet.json' % STREAM_VERSION
+-        self._start(async)
++        self._start(do_async)
+ 
+-    def sample(self, async=False, languages=None):
++    def sample(self, do_async=False, languages=None):
+         self.session.params = {'delimited': 'length'}
+         if self.running:
+             raise TweepError('Stream object already connected!')
+         self.url = '/%s/statuses/sample.json' % STREAM_VERSION
+         if languages:
+             self.session.params['language'] = ','.join(map(str, languages))
+-        self._start(async)
++        self._start(do_async)
+ 
+-    def filter(self, follow=None, track=None, async=False, locations=None,
++    def filter(self, follow=None, track=None, do_async=False, locations=None,
+                stall_warnings=False, languages=None, encoding='utf8', filter_level=None):
+         self.body = {}
+         self.session.headers['Content-type'] = "application/x-www-form-urlencoded"
+@@ -442,10 +442,10 @@ class Stream(object):
+             self.body['filter_level'] = unicode(filter_level, encoding)
+         self.session.params = {'delimited': 'length'}
+         self.host = 'stream.twitter.com'
+-        self._start(async)
++        self._start(do_async)
+ 
+     def sitestream(self, follow, stall_warnings=False,
+-                   with_='user', replies=False, async=False):
++                   with_='user', replies=False, do_async=False):
+         self.body = {}
+         if self.running:
+             raise TweepError('Stream object already connected!')
+@@ -458,7 +458,7 @@ class Stream(object):
+             self.body['with'] = with_
+         if replies:
+             self.body['replies'] = replies
+-        self._start(async)
++        self._start(do_async)
+ 
+     def disconnect(self):
+         if self.running is False:



Home | Main Index | Thread Index | Old Index