fixing install requirement for the new pip installation
#!/usr/bin/env python
import re
-
-from pip.req import parse_requirements
from setuptools import setup, find_packages
+def parse_requirements(filename):
+ """ load requirements from a pip requirements file """
+ lineiter = (line.strip() for line in open(filename))
+ return [line for line in lineiter if line and not line.startswith("#")]
+
try:
- install_reqs = parse_requirements('requirements.txt', session=False)
- requirements = [str(ir.req) for ir in install_reqs]
+ install_reqs = parse_requirements('requirements.txt')
+ requirements = install_reqs
except OSError:
requirements = []
