From 9e63cf4072fa5a0ed3a97380fbc7603e4a0da88c Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Mon, 27 Jul 2020 14:29:14 +0200 Subject: [PATCH] Load requirements from requirements.txt to avoid duplication and out-of-sync issues --- requirements.txt | 2 +- setup.py | 33 ++++++--------------------------- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/requirements.txt b/requirements.txt index 60706213..14c3a03d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ torch>=1.5 -tensorflow>=2.2 +tensorflow==2.3.0rc0 numpy>=1.16.0 scipy>=0.19.0 numba==0.48 diff --git a/setup.py b/setup.py index d80505af..1302dc99 100644 --- a/setup.py +++ b/setup.py @@ -76,34 +76,13 @@ def pip_install(package_name): ) +reqs_from_file = open('requirements.txt').readlines() +reqs_without_tf = [r for r in reqs_from_file if not r.startswith('tensorflow')] +tf_req = [r for r in reqs_from_file if r.startswith('tensorflow')] + requirements = { - 'install_requires':[ - "torch>=1.5", - "numpy>=1.16.0", - "numba==0.48", - "scipy>=0.19.0", - "librosa==0.7.2", - "unidecode==0.4.20", - "attrdict", - "tensorboardX", - "matplotlib", - "Pillow", - "flask", - "tqdm", - "inflect", - "pysbd", - "bokeh==1.4.0", - "soundfile", - "phonemizer>=2.2.0", - "nose==1.3.7", - "cardboardlint==1.3.0", - "pylint==2.5.3", - 'fuzzywuzzy', - 'gdown' - ], - 'pip_install':[ - 'tensorflow==2.3.0rc0', - ] + 'install_requires': reqs_without_tf, + 'pip_install': tf_req }