File python-glances.spec of Package python-glances

# spec file for package python-glances
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017, Martin Hauke <>
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-glances
Version:        3.1.0
Release:        0
Summary:        A curses-based monitoring tool
License:        LGPL-3.0-only
Group:          Development/Languages/Python
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
Requires:       python-curses
Requires:       python-psutil >= 2.0.0
Suggests:       hddtemp
Suggests:       python-batinfo
Suggests:       python-bottle
Suggests:       python-matplotlib
Suggests:       python-netifaces
Suggests:       python-py3sensors
Suggests:       python-pysnmp
Suggests:       python-zeroconf >= 0.16
Suggests:       sensors
Provides:       glances
BuildArch:      noarch

Glances is a curses-based monitoring tool. Glances uses the PsUtil
library to get information from your system. It monitors CPU, load,
memory, network bandwidth, disk I/O, disk use, process.

%setup -q -n Glances-%{version}
#drop shebang
sed -i -e '/^#!\//, 1d' glances/


install -d %{buildroot}%{_docdir}/%{name}
mv %{buildroot}/%{_datadir}/doc/glances %{buildroot}%{_docdir}/%{name}
install -Dm0644 conf/glances.conf %{buildroot}%{_sysconfdir}/glances/glances.conf
rm %{buildroot}/%{_docdir}/%{name}/glances -Rf
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%files %{python_files}
%license COPYING
%python3_only %{_bindir}/glances
%dir %{_sysconfdir}/glances
%config %{_sysconfdir}/glances/glances.conf

openSUSE Build Service is sponsored by