Make setup.py parse requirements.txt

This commit is contained in:
Kristóf Tóth 2018-05-10 16:51:47 +02:00
parent 1fb13fefff
commit a9d6794c4d

View File

@ -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)