Using logic for finding README.rst to find requirements.txt

This commit is contained in:
Colin Jermain 2020-04-13 18:45:27 -04:00 коммит произвёл Changming Sun
Родитель 43d9f9190e
Коммит 06db89cf13
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -201,7 +201,13 @@ if bdist_wheel is not None :
cmd_classes['bdist_wheel'] = bdist_wheel
cmd_classes['build_ext'] = build_ext
with open('requirements.txt') as f:
requirements_path = path.join(getcwd(), "requirements.txt")
if not path.exists(requirements_path):
this = path.dirname(__file__)
requirements_path = path.join(this, "requirements.txt")
if not path.exists(requirements_path):
raise FileNotFoundError("Unable to find 'requirements.txt'")
with open(requirements_path) as f:
install_requires = f.read().splitlines()
# Setup