From e9cdf40da21e9cabbfe4ff594ac1a9dde06e5f17 Mon Sep 17 00:00:00 2001 From: Stijn de Boer Date: Fri, 8 Dec 2023 11:53:09 +0100 Subject: [PATCH] Parse setup requirements from requirements.txt --- requirements.txt | 13 +++++++++++++ setup.py | 25 ++++++++++--------------- 2 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..6d900998 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +argparse +nibabel>=2.5.1 +six +scikit-learn +bspline +matplotlib +numpy +scipy>=1.3.2 +pandas>=0.25.3 +torch>=1.1.0 +sphinx-tabs +pymc>=5.1.0 +arviz==0.13.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 24d23e60..7a183aa6 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,14 @@ from setuptools import setup, find_packages + +def parse_requirements(filename): + """Load requirements from a pip requirements file.""" + with open(filename, 'r') as f: + lineiter = (line.strip() for line in f) + return [line for line in lineiter if line and not line.startswith("#")] + +requirements = parse_requirements('requirements.txt') + setup(name='pcntoolkit', version='0.29', description='Predictive Clinical Neuroscience toolkit', @@ -8,19 +17,5 @@ author_email='andre.marquand@donders.ru.nl', license='GNU GPLv3', packages=find_packages(), - install_requires=[ - 'argparse', - 'nibabel>=2.5.1', - 'six', - 'scikit-learn', - 'bspline', - 'matplotlib', - 'numpy', - 'scipy>=1.3.2', - 'pandas>=0.25.3', - 'torch>=1.1.0', - 'sphinx-tabs', - 'pymc>=5.1.0', - 'arviz==0.13.0' - ], + install_requires=requirements, zip_safe=False)