Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1304822 - glances: Provide a Python 3 (sub-)package
Summary: glances: Provide a Python 3 (sub-)package
Alias: None
Product: Fedora
Classification: Fedora
Component: glances
Version: 24
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Edouard Bourguignon
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: PYTHON3
TreeView+ depends on / blocked
Reported: 2016-02-04 17:26 UTC by Petr Viktorin (pviktori)
Modified: 2017-07-26 09:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2017-07-26 09:09:06 UTC
Type: Bug

Attachments (Terms of Use)
Version update, fixed file section (deleted)
2016-09-27 08:31 UTC, Dominika Krejčí
no flags Details | Diff

Description Petr Viktorin (pviktori) 2016-02-04 17:26:01 UTC
Upstream, this software supports Python 3. Please provide a Python 3
package for Fedora.

According to the Python packaging guidelines [0], software must be
packaged for Python 3 if upstream supports it.
The guidelines give detailed information on how to do this, and even
provide an example spec file [1].

The current best practice is to provide subpackages for the two Python
versions (called "Common SRPM" in the guidelines). Alternatively, if
nothing depends on your Python2 package, you can just switch to Python 3

It's fine to do this in Rawhide only.

If anything is unclear, or if you need any kind of assistance with the
porting, you can ask on IRC (#fedora-python on Freenode), or reply here.
We'll be happy to help!


Comment 1 Jan Kurik 2016-02-24 14:24:37 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:

Comment 2 Dominika Krejčí 2016-04-20 12:07:23 UTC
Hello Edouard,

Do you need any help adding Python 3 support to the RPM?

If you need more instructions, a [guide] for porting Python-based RPMs is available.


Comment 3 Edouard Bourguignon 2016-04-30 12:35:23 UTC
I've followed the guide and now fedpkg build fails because python-glances is not in tag list for f25.

here is my new spec file:
%global srcname glances 
%global sum	CLI curses based monitoring tool

Name:		python-%{srcname}		
Version:	2.6.1
Release:	1%{?dist}
Summary:	%{sum}

Group:		Applications/System		
License:	GPLv3
BuildArch:	noarch
BuildRequires:  python2-devel python3-devel
BuildRequires:	python-setuptools python3-setuptools
BuildRequires:	python2-psutil >= 2.0.0
BuildRequires:	python3-psutil >= 2.0.0
Requires:	python-setuptools python3-setuptools
Requires:	python2-psutil >= 2.0.0
Requires:	python3-psutil >= 2.0.0

Glances is a CLI curses based monitoring tool for both GNU/Linux and BSD.

Glances uses the PsUtil library to get information from your system.

It is developed in Python.

%package -n python2-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
Glances is a CLI curses based monitoring tool for both GNU/Linux and BSD.

Glances uses the PsUtil library to get information from your system.

It is developed in Python.

%package -n python3-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
Glances is a CLI curses based monitoring tool for both GNU/Linux and BSD.

Glances uses the PsUtil library to get information from your system.

It is developed in Python.

%autosetup -n %{srcname}-%{version}


# Must do the python2 install first because the scripts in /usr/bin are
# overwritten with every install, and in general we want the
# python3 version to be the default.

%{__python2} test
%{__python3} test

rm -rf %{buildroot} 

%files -n python2-%{srcname}
%exclude %{_datadir}/doc/glances

%files -n python3-%{srcname}
%exclude %{_datadir}/doc/glances

* Thu Apr 28 2016 Edouard Bourguignon <madko> - 2.6.1
- Update to 2.6.1
- Provides python2 and python3 packages

Any idea?

Comment 4 Miro Hrončok 2016-04-30 21:38:35 UTC
You cannot rename the package that's already in dist-git.

For the sake of simplicity, just keep the package main name as glances.

It would also be good to provide glances from the python2 subpackage just to not break upgrade path:

%package -n python2-%{srcname}
# ...
Provides: %{srcname} = %{version}-%{release}

Comment 5 Miro Hrončok 2016-04-30 21:41:29 UTC
Also, you are trying to package %{_bindir}/glances to both subpackages, this is not going to work. See

Comment 6 Dominika Krejčí 2016-09-27 08:31:41 UTC
Created attachment 1205109 [details]
Version update, fixed file section

what about this patch? It provides the latest version, original name of the package and fixed file section. 

Koji scratch build:

Comment 7 Fedora End Of Life 2017-07-25 19:53:36 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 8 Petr Viktorin (pviktori) 2017-07-26 09:09:06 UTC
In f26 this is fixed: The `glances` package uses Python 3, and a python2-glances package is available with code.

Note You need to log in before you can comment on or make changes to this bug.