Files
python-Glances/python-Glances.spec
2025-11-05 10:16:53 -05:00

117 lines
4.1 KiB
RPMSpec

#
# spec file for package python-Glances
#
# Copyright (c) 2025 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define skip_python311 1
%define skip_python312 1
Name: python-Glances
Version: 4.4.1
Release: 0
Summary: A cross-platform curses-based monitoring tool
License: LGPL-3.0
URL: https://github.com/nicolargo/glances
#Source: https://files.pythonhosted.org/packages/source/g/glances/glances-%%{version}.tar.gz
Source0: https://github.com/nicolargo/glances/archive/refs/tags/v%{version}.tar.gz#/glances-%{version}.tar.gz
Source100: README.md
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
Requires: python3-defusedxml
Requires: python3-Jinja2
Requires: python3-packaging
Requires: python3-psutil
Requires: python3-shtab
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python3-curses
Recommends: (python3-docker if docker)
Recommends: python3-fastapi
Recommends: python3-netifaces2
Recommends: python3-orjson
Recommends: (python3-podman if podman)
Recommends: python3-pySMART
Recommends: python3-pymdstat
Recommends: python3-sparklines
Recommends: python3-uvicorn
BuildArch: noarch
%python_subpackages
%description
===============================
Glances - An eye on your system
===============================
Summary
=======
**Glances** is an open-source system cross-platform monitoring tool.
It allows real-time monitoring of various aspects of your system such as
CPU, memory, disk, network usage etc. It also allows monitoring of running processes,
logged in users, temperatures, voltages, fan speeds etc.
It also supports container monitoring, it supports different container management
systems such as Docker, LXC. The information is presented in an easy to read dashboard
and can also be used for remote monitoring of systems via a web interface or command
line interface. It is easy to install and use and can be customized to show only
the information that you are interested in.
In client/server mode, remote monitoring could be done via terminal,
Web interface or API (XML-RPC and RESTful).
Stats can also be exported to files or external time/value databases, CSV or direct
output to STDOUT.
Glances is written in Python and uses libraries to grab information from
your system. It is based on an open architecture where developers can
add new plugins or exports modules.
%prep
%autosetup -p1 -n glances-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_mandir}/man1/glances.1
%python_clone -a %{buildroot}%{_bindir}/glances
# move from /usr/share/doc -> /usr/share/doc/packages
mv -v %{buildroot}%{_datadir}/doc/glances _doc
rm -v _doc/COPYING
# remove hidden files
find %{buildroot} -name .eslintrc.js -exec rm -v {} \;
find %{buildroot} -name .prettierrc.js -exec rm -v {} \;
# remove execute bits from file(s)
chmod -c u-x,g-x,o-x %{buildroot}%{python_sitelib}/glances/exports/glances_mqtt/__init__.py
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative glances glances.1
%postun
%python_uninstall_alternative glances
%files %{python_files}
%license COPYING
%doc _doc/*
%python_alternative %{_bindir}/glances
%python_alternative %{_mandir}/man1/glances.1%{?ext_man}
%{python_sitelib}/glances
%{python_sitelib}/glances-%{version}.dist-info
%changelog