From 0eed8bcb306eb4f4b80c2206c4e23ad211754aed Mon Sep 17 00:00:00 2001 From: Alok Saldanha Date: Mon, 5 Sep 2022 14:51:01 -0400 Subject: [PATCH] Moved prometheus-flask-exporter into extras_require --- requirements.txt | 17 +++++++++-------- setup.cfg | 30 +++++++++++++++++++++++++++++- setup.py | 27 +-------------------------- 3 files changed, 39 insertions(+), 35 deletions(-) diff --git a/requirements.txt b/requirements.txt index 06ea65c..69a24b7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,9 @@ -cellxgene -flask -flask-api -werkzeug -psutil -requests -prometheus-flask-exporter -typer \ No newline at end of file + # requirements.txt + # + # installs dependencies from ./setup.py, and the package itself, + # in editable mode + -e .[prometheus] + + # (the -e above is optional). you could also just install the package + # normally with just the line below (after uncommenting) + # . diff --git a/setup.cfg b/setup.cfg index b88034e..87601b3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,30 @@ [metadata] -description-file = README.md +description_file = README.md +description = "Cellxgene Gateway" +author = "Niket Patel, Yohann Potier, Alok Saldanha" +author_email = "alok.saldanha@novartis.com" +long_description_content_type="text/markdown" +license = "MIT" +keywords ="visualization, genomics" +url = "http://github.com/Novartis/cellxgene-gateway" +python_requires = ">=3.6" +classifier = + "Topic :: Scientific/Engineering :: Visualization" + +[options] +install_requires = + cellxgene + flask + flask-api + werkzeug + psutil + requests + typer + +[options.extras_require] +prometheus = + prometheus-flask-exporter + +[entry_points] +console_scripts = + cellxgene-gateway = cellxgene_gateway.cli:run diff --git a/setup.py b/setup.py index 00c3755..95c16ef 100644 --- a/setup.py +++ b/setup.py @@ -4,9 +4,6 @@ import sys from setuptools import find_packages, setup -if sys.version_info < (3, 6): - sys.exit("Sorry, Python < 3.6 is not supported") - def read(rel_path): here = os.path.abspath(os.path.dirname(__file__)) @@ -23,33 +20,15 @@ def get_version(rel_path): raise RuntimeError("Unable to find version string.") -def parse_requirements(): - reqs = [] - with open("requirements.txt", "r") as f: - for line in f.readlines(): - reqs.append(line.strip("\n")) - return reqs - - with open("README.md", "r") as fh: long_description = fh.read() -install_reqs = parse_requirements() - setup( - # mandatory - name="cellxgene-gateway", # mandatory version=get_version("cellxgene_gateway/__init__.py"), # mandatory - author="Niket Patel, Yohann Potier, Alok Saldanha", - author_email="alok.saldanha@novartis.com", - description=("Cellxgene Gateway"), long_description=long_description, - long_description_content_type="text/markdown", - license="MIT", - keywords="visualization, genomics", - url="http://github.com/Novartis/cellxgene-gateway", + name="cellxgene-gateway", packages=find_packages(), package_data={ "cellxgene_gateway": [ @@ -60,8 +39,4 @@ setup( ] }, data_files=[("", ["README.md", "LICENSE"])], - install_requires=install_reqs, - entry_points={"console_scripts": ["cellxgene-gateway=cellxgene_gateway.cli:run"]}, - classifiers=["Topic :: Scientific/Engineering :: Visualization"], - python_requires=">=3.6", )