Merge "setup.py to work without requirements.txt"

This commit is contained in:
Jenkins 2015-02-24 09:13:11 +00:00 committed by Gerrit Code Review
commit 9d4006e186

View File

@ -3,9 +3,14 @@ import re
from setuptools import setup from setuptools import setup
with open('requirements.txt', 'r') as fp: try:
# Distributions have to delete *requirements.txt
with open('requirements.txt', 'r') as fp:
install_requires = [re.split(r'[<>=]', line)[0] install_requires = [re.split(r'[<>=]', line)[0]
for line in fp if line.strip()] for line in fp if line.strip()]
except EnvironmentError:
print("No requirements.txt, not handling dependencies")
install_requires = []
with open('ironic_discoverd/__init__.py', 'rb') as fp: with open('ironic_discoverd/__init__.py', 'rb') as fp: