From 62debf21b4e22425caa4b71c0b423638dd6daf36 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sun, 20 Jan 2019 10:56:30 +0100 Subject: [PATCH] Documentation is unclear how to get Docker information #1386 and also add a all target to the Pip install in order to install all dependencies --- NEWS | 5 +++++ docs/aoa/docker.rst | 6 ++++++ docs/install.rst | 4 ++-- docs/man/glances.1 | 6 +----- glances/__init__.py | 2 +- setup.py | 48 ++++++++++++++++++++++++++------------------- 6 files changed, 43 insertions(+), 28 deletions(-) diff --git a/NEWS b/NEWS index 1fb2e682..f8a60044 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,11 @@ Bugs corrected: * ... +Others: + + * Documentation is unclear how to get Docker information #1386 + * Add 'all' target to the Pip install (install all dependencies) + Version 3.1 =========== diff --git a/docs/aoa/docker.rst b/docs/aoa/docker.rst index 18325384..484dcd14 100644 --- a/docs/aoa/docker.rst +++ b/docs/aoa/docker.rst @@ -6,6 +6,12 @@ Docker If you use ``Docker``, Glances can help you to monitor your containers. Glances uses the Docker API through the `docker-py`_ library. +You can install this dependency using: + +.. code-block:: console + + pip install glances[docker] + .. image:: ../_static/docker.png It is possible to define limits and actions from the configuration file diff --git a/docs/install.rst b/docs/install.rst index dcd56bf8..5306db31 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -22,7 +22,7 @@ features (like the Web interface, export modules...): .. code-block:: console - pip install glances[action,browser,cloud,cpuinfo,chart,docker,export,folders,gpu,ip,raid,snmp,web,wifi] + pip install glances[all] To upgrade Glances and all its dependencies to the latest versions: @@ -30,7 +30,7 @@ To upgrade Glances and all its dependencies to the latest versions: pip install --upgrade glances pip install --upgrade psutil - pip install --upgrade glances[...] + pip install --upgrade glances[all] For additional installation methods, read the official `README`_ file. diff --git a/docs/man/glances.1 b/docs/man/glances.1 index 1d400bb2..ed434e56 100644 --- a/docs/man/glances.1 +++ b/docs/man/glances.1 @@ -1,10 +1,6 @@ .\" Man page generated from reStructuredText. . -<<<<<<< HEAD -.TH "GLANCES" "1" "Jan 19, 2019" "3.1.0" "Glances" -======= -.TH "GLANCES" "1" "Sep 29, 2018" "3.0.2" "Glances" ->>>>>>> master +.TH "GLANCES" "1" "Jan 20, 2019" "3.1.1b0" "Glances" .SH NAME glances \- An eye on your system . diff --git a/glances/__init__.py b/glances/__init__.py index efeea829..94db627b 100644 --- a/glances/__init__.py +++ b/glances/__init__.py @@ -27,7 +27,7 @@ import signal import sys # Global name -__version__ = '3.1.1_beta' +__version__ = '3.1.1b0' __author__ = 'Nicolas Hennion ' __license__ = 'LGPLv3' diff --git a/setup.py b/setup.py index 73883c1b..a6423655 100755 --- a/setup.py +++ b/setup.py @@ -49,6 +49,33 @@ def get_install_requires(): return requires +def get_install_extras_require(): + extras_require = { + 'action': ['pystache'], + # Zeroconf 0.19.1 is the latest one compatible with Python 2 (issue #1293) + 'browser': ['zeroconf==0.19.1' if PY2 else 'zeroconf>=0.19.1'], + 'cloud': ['requests'], + 'cpuinfo': ['py-cpuinfo'], + 'docker': ['docker>=2.0.0'], + 'export': ['bernhard', 'cassandra-driver', 'couchdb', 'elasticsearch', + 'influxdb>=1.0.0', 'kafka-python', 'pika', 'paho-mqtt', 'potsdb', + 'prometheus_client', 'pyzmq', 'statsd'], + 'folders': ['scandir'], # python_version<"3.5" + 'gpu': ['nvidia-ml-py3'], # python_version=="2.7" + 'graph': ['pygal'], + 'ip': ['netifaces'], + 'raid': ['pymdstat'], + 'smart': ['pySMART.smartx'], + 'snmp': ['pysnmp'], + 'web': ['bottle', 'requests'], + 'wifi': ['wifi'] + } + # Add automatically the 'all' target + extras_require.update({'all': [i[0] for i in extras_require.values()]}) + + return extras_require + + class tests(Command): user_options = [] @@ -82,26 +109,7 @@ setup( keywords="cli curses monitoring system", python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", install_requires=get_install_requires(), - extras_require={ - 'action': ['pystache'], - # Zeroconf 0.19.1 is the latest one compatible with Python 2 (issue #1293) - 'browser': ['zeroconf==0.19.1' if PY2 else 'zeroconf>=0.19.1'], - 'cloud': ['requests'], - 'cpuinfo': ['py-cpuinfo'], - 'docker': ['docker>=2.0.0'], - 'export': ['bernhard', 'cassandra-driver', 'couchdb', 'elasticsearch', - 'influxdb>=1.0.0', 'kafka-python', 'pika', 'paho-mqtt', 'potsdb', - 'prometheus_client', 'pyzmq', 'statsd'], - 'folders': ['scandir'], # python_version<"3.5" - 'gpu': ['nvidia-ml-py3'], # python_version=="2.7" - 'graph': ['pygal'], - 'ip': ['netifaces'], - 'raid': ['pymdstat'], - 'smart': ['pySMART.smartx'], - 'snmp': ['pysnmp'], - 'web': ['bottle', 'requests'], - 'wifi': ['wifi'] - }, + extras_require=get_install_extras_require(), packages=['glances'], include_package_data=True, data_files=get_data_files(),