From 289c4d322f08becec5e6a57104849f203540df41 Mon Sep 17 00:00:00 2001 From: Dave Bunten Date: Wed, 14 Sep 2022 09:03:40 -0600 Subject: [PATCH] Address Installation Dependency Gaps (#232) * use requirements.txt for setup install_requires * formatting and simplifying variable usage --- setup.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/setup.py b/setup.py index d796f605..8d9b44c2 100644 --- a/setup.py +++ b/setup.py @@ -1,24 +1,28 @@ import pathlib -from setuptools import setup -from setuptools import find_packages + +from setuptools import find_packages, setup with open("README.md", encoding="utf-8") as readme_file: - long_description = readme_file.read() + LONG_DESCRIPTION = readme_file.read() -about = {} +ABOUT = {} with open(pathlib.Path("pycytominer/__about__.py")) as fp: - exec(fp.read(), about) -print(about) + exec(fp.read(), ABOUT) + +# pull requirements for install_requires +with open("requirements.txt") as f: + REQUIRED_PKGS = f.read().splitlines() + setup( name="pycytominer", - version=about["__version__"], + version=ABOUT["__version__"], description="Processing perturbation profiling readouts.", - long_description=long_description, + long_description=LONG_DESCRIPTION, long_description_content_type="text/markdown", url="https://github.com/cytomining/pycytominer", packages=find_packages(), - license=about["__license__"], - install_requires=["numpy", "pandas", "scikit-learn", "sqlalchemy"], + license=ABOUT["__license__"], + install_requires=REQUIRED_PKGS, extras_require={"collate": ["cytominer-database==0.3.4"]}, python_requires=">=3.4", include_package_data=True,