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 bugzilla.redhat.com.
Bug 1314524 - python2-grafyaml requires both python2 and python3
Summary: python2-grafyaml requires both python2 and python3
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-grafyaml
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Paul Belanger
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3
TreeView+ depends on / blocked
 
Reported: 2016-03-03 20:15 UTC by William Moreno
Modified: 2023-09-12 01:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-28 09:36:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description William Moreno 2016-03-03 20:15:36 UTC
There is a issue with the spec:

%install
# Must do the python2 install first because the scripts in /usr/bin are
# overwritten with every setup.py install, and in general we want the
# python3 version to be the default.
%py2_install
%if 0%{?with_python3}
%py3_install
%endif

The in files you include in both packages:

%{_bindir}/grafana-dashboard

This mean than you are including in the python2 package a executable than requires the python2 version of the package.

Please update the spec to something like:

%py2_install
mv %builroot/%{_bindir}/grafana-dashboard %builroot/%{_bindir}/grafana-dashboard-py2

and the include it in the python2 package files
%{_bindir}/grafana-dashboard-py2

Comment 1 Petr Viktorin 2016-03-04 09:54:36 UTC
Actually, the guidelines specify how the scripts should be named, so that users can use a sane "default" but also explicitly request a specific version:
https://fedoraproject.org/wiki/Packaging:Python#Naming

There are two cases:
1) If the script works the same under both python2 and python3, only the python3 scripts can be packaged

2) Otherwise, there should be /usr/bin/script, /usr/bin/script-2, /usr/bin/script-2.7 for Python 2, and /usr/bin/script-3, /usr/bin/script-3.5 for Python 3.
You could do that with something like this:

%py3_install
mv %{buildroot}/%{_bindir}/grafana-dashboard %{buildroot}/%{_bindir}/grafana-dashboard-3 
ln -s %{buildroot}/%{_bindir}/grafana-dashboard-3 %{buildroot}/%{_bindir}/grafana-dashboard-%{python3_version}

%py2_install
ln -s %{buildroot}/%{_bindir}/grafana-dashboard %{buildroot}/%{_bindir}/grafana-dashboard-%2
ln -s %{buildroot}/%{_bindir}/grafana-dashboard %{buildroot}/%{_bindir}/grafana-dashboard-%{python2_version}

Comment 2 Paul Belanger 2016-03-08 19:31:23 UTC
Thanks for the info, so number 1 should be the case. grafana-dashboard will work for both python2 and python3.  So, If I am reading both comments, I don't think I need to make any changes?  Since python3 installs after python2?

Otherwise, I don't have an issue setting up the symlinking above for #2. I was hoping you might has an example package I could look into as I still have some questions and looking at the code always helps.

Comment 3 Petr Viktorin 2016-03-09 09:23:30 UTC
Right, looks like #1 is right for you.
You should just remove %{_bindir}/grafana-dashboard from the python2 package, since it's the python3 version (and it's already in the python3 package).

Comment 4 Dominika Krejčí 2016-05-13 11:43:56 UTC
Hello Paul,

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.

[guide] http://python-rpm-porting.readthedocs.io/

Comment 5 Paul Belanger 2016-05-13 14:20:03 UTC
Sorry for the delay, I thought I fixed this already.  Apparently not, I'll work on it next week.

Comment 6 Paul Belanger 2016-05-13 14:38:21 UTC
Sigh, I will learn to use bugzilla one of these days.  Thanks for fixing, I was trying to set the status to assigned.

Comment 7 Dominika Krejčí 2016-09-23 07:55:06 UTC
Hi Paul,
could you please do the change suggested in the Comment #3? python2-grafyaml still depends on both 2 and 3.

Comment 8 Fedora End Of Life 2017-07-25 20:17:13 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 9 Jan Kurik 2017-08-15 08:24:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 10 Jan Beran 2017-09-01 13:34:55 UTC
Hello Paul,

I created a Pagure PR that fixes "python2-grafyaml requires both python2 and python3" according to the Comment #3:

https://src.fedoraproject.org/rpms/python-grafyaml/pull-request/1

May I ask you to review and rebuild?

Thanks.

Jan

Comment 11 Ben Cotton 2018-11-27 17:17:02 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. 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 '27'.

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 27 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 12 Petr Viktorin 2018-11-28 09:36:23 UTC
In Rawhide, the python2 subpackage was removed entirely.

Comment 13 Red Hat Bugzilla 2023-09-12 01:04:11 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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