From a9d6794c4d77dd435a56c87b20199fc7e94d614f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Thu, 10 May 2018 16:51:47 +0200 Subject: [PATCH] Make setup.py parse requirements.txt --- setup.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 9e95d29..01e30f0 100644 --- a/setup.py +++ b/setup.py @@ -2,11 +2,12 @@ from setuptools import setup, find_packages from os.path import dirname, realpath, join -LIB_DIR = dirname(realpath(__file__)) +here = dirname(realpath(__file__)) -version = None -with open(join(LIB_DIR, 'VERSION'), 'r') as ifile: +with open(join(here, 'VERSION'), 'r') as ifile: version = ifile.read().strip('\n') +with open(join(here, 'requirements.txt'), 'r') as ifile: + requirements = ifile.read().splitlines() setup(name='tfw', version=version, @@ -17,4 +18,5 @@ setup(name='tfw', license='custom', packages=find_packages('lib'), package_dir={'': 'lib'}, + install_requires=requirements, zip_safe=False)