Merge "setup.py to work without requirements.txt"
This commit is contained in:
commit
9d4006e186
7
setup.py
7
setup.py
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user