summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChangBo Guo(gcb) <eric.guo@easystack.cn>2016-06-02 11:43:27 +0800
committerAsk Solem <ask@celeryproject.org>2016-06-06 17:58:40 -0700
commit04dc8944285755353f571d26e9d9561cb63ca363 (patch)
treec7db745eb687667e9ef0fc7ba0cb917837998757
parenta644ff054410bc18197744f9cde31232d6f3d1b3 (diff)
downloadpy-amqp-04dc8944285755353f571d26e9d9561cb63ca363.tar.gz
Fixes install requirements on Python 3
Closes #91
-rw-r--r--setup.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 5819d61..116e5c2 100644
--- a/setup.py
+++ b/setup.py
@@ -91,8 +91,12 @@ def strip_comments(l):
def reqs(f):
- return filter(None, [strip_comments(l) for l in open(
+ req = filter(None, [strip_comments(l) for l in open(
os.path.join(os.getcwd(), 'requirements', f)).readlines()])
+ # filter returns filter object(iterator) in Python 3,
+ # but a list in Python 2.7, so make sure it returns a list.
+ return list(req)
+
# -*- Long Description -*-