mirror of
https://github.com/balkian/bitter.git
synced 2024-12-22 08:28:12 +00:00
Fix pip installation
This commit is contained in:
parent
5199d5b5aa
commit
dd662acd22
@ -516,7 +516,7 @@ def user_download_batch(wq, batch):
|
|||||||
try:
|
try:
|
||||||
user_ids.append(int(elem))
|
user_ids.append(int(elem))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
screen_names.append(elem)
|
screen_names.append(elem.lower())
|
||||||
print('Downloading: {} - {}'.format(user_ids, screen_names))
|
print('Downloading: {} - {}'.format(user_ids, screen_names))
|
||||||
users = wq.users.lookup(user_id=",".join(user_ids), screen_name=",".join(screen_names))
|
users = wq.users.lookup(user_id=",".join(user_ids), screen_name=",".join(screen_names))
|
||||||
found_ids = []
|
found_ids = []
|
||||||
@ -526,7 +526,7 @@ def user_download_batch(wq, batch):
|
|||||||
if uid in user_ids:
|
if uid in user_ids:
|
||||||
found_ids.append(uid)
|
found_ids.append(uid)
|
||||||
yield (uid, user)
|
yield (uid, user)
|
||||||
uname = user['screen_name']
|
uname = user['screen_name'].lower()
|
||||||
if uname in screen_names:
|
if uname in screen_names:
|
||||||
found_names.append(uname)
|
found_names.append(uname)
|
||||||
yield (uname, user)
|
yield (uname, user)
|
||||||
|
21
setup.py
21
setup.py
@ -1,17 +1,14 @@
|
|||||||
import pip
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from pip.req import parse_requirements
|
|
||||||
|
|
||||||
# parse_requirements() returns generator of pip.req.InstallRequirement objects
|
def parse_requirements(filename):
|
||||||
# pip 6 introduces the *required* session argument
|
""" load requirements from a pip requirements file """
|
||||||
try:
|
with open(filename, 'r') as f:
|
||||||
install_reqs = parse_requirements("requirements.txt", session=pip.download.PipSession())
|
lineiter = list(line.strip() for line in f)
|
||||||
py2_reqs = parse_requirements("requirements-py2.txt", session=pip.download.PipSession())
|
return [line for line in lineiter if line and not line.startswith("#")]
|
||||||
test_reqs = parse_requirements("test-requirements.txt", session=pip.download.PipSession())
|
|
||||||
except AttributeError:
|
install_reqs = parse_requirements("requirements.txt")
|
||||||
install_reqs = parse_requirements("requirements.txt")
|
test_reqs = parse_requirements("test-requirements.txt")
|
||||||
py2_reqs = parse_requirements("requirements-py2.txt")
|
extra_reqs = parse_requirements("extra-requirements.txt")
|
||||||
test_reqs = parse_requirements("test-requirements.txt")
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
Loading…
Reference in New Issue
Block a user