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 1546682 - recoll: recoll requires both Python 2 and Python 3
Summary: recoll: recoll requires both Python 2 and Python 3
Alias: None
Product: Fedora
Classification: Fedora
Component: recoll
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Terje Røsten
QA Contact: Fedora Extras Quality Assurance
: 1738807 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2018-02-19 10:32 UTC by Iryna Shcherbina
Modified: 2019-08-08 15:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-08-07 06:45:01 UTC
Type: Bug

Attachments (Terms of Use)

Description Iryna Shcherbina 2018-02-19 10:32:03 UTC
The recoll RPM requires both Python 2 and Python 3.

Except in very special circumstances, there is no need for one package
to drag in both Python stacks. Usually, this is a packaging error: for
example, a stray "/usr/bin/python" shebang in a Python 3 package can
introduce a Python 2 dependency.

Please split your package, or remove the stray dependencies.
There is a section on shebangs in the Python RPM Porting Guide [0]
which covers this issue.

It's ok to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 27 as well.

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


Comment 1 Terje Røsten 2018-02-19 13:01:05 UTC

This is not a bug, recoll have helper scripts (filters) written in 
both Python 2 and 3, for recoll to work both stacks are needed.

In the future upstream might convert everything to Python 3, however 
no eta for that to happen.

Comment 2 Iryna Shcherbina 2018-02-19 17:57:40 UTC
Thanks for the information.

Comment 3 "FeRD" (Frank Dana) 2018-09-30 14:35:56 UTC
Part of the release notes for recoll 1.24.0 (see bug #1565866 for release-monitoring's automated "is available" updates, the latest upstream is 1.24.1) reads:

* All input handlers should now be compatible with Python3, but still use Python2.

So, it sounds like recoll SHOULD be ready to go full Python3, if we were inclined to repackage 1.24.x that way by regexp-updating all of the shebangs during rpmbuild.

Comment 4 Terje Røsten 2018-09-30 16:54:58 UTC

I have talked to upstream maintainer, next release will use Python 3 only,
he had to reimplement some filters as some were Python 2 only.

Release should be available long before Fedora 30 is here.

Comment 5 Petr Viktorin (pviktori) 2019-07-08 15:48:07 UTC
Re-opening, then.
What is the status for Fedora 31?

Comment 6 "FeRD" (Frank Dana) 2019-07-08 18:04:10 UTC
(In reply to Petr Viktorin from comment #5)
> Re-opening, then.
> What is the status for Fedora 31?

Current recoll-1.25.16-1.fc30.x86_64 in Fedora 30 includes both Python2 and Python3 modules together in the same package, but all files are present in both packages. All of the filters in /usr/share/recoll/filters/ use python3 shebangs:

$ grep usr/bin/python /usr/share/recoll/filters/*

So, recoll in F30 is already fully migrated to Python3. The F31 builds can just drop /usr/lib/64/python2.7/site-packages/recoll* as no longer needed.

Comment 7 "FeRD" (Frank Dana) 2019-08-01 20:43:47 UTC
(In reply to "FeRD" (Frank Dana) from comment #6)
> All of the filters in /usr/share/recoll/filters/ use python3
> shebangs:

"...except" (I have no idea how I missed that one.)
> $ grep usr/bin/python /usr/share/recoll/filters/*
> /usr/share/recoll/filters/!/usr/bin/python2

The comments at the top of the file say:

# wnck does not have a python3 binding as far as I can see (or at
# least it's not packaged by, e.g. Debian. So python2 only for now.

So it sounds like that script will just have to be dropped when Python 2 goes away. (It's not a filter anyway, it's a hotkey-bindable control script for the Recoll GUI. So, no loss of Recoll functionality without it.)

Comment 8 Terje Røsten 2019-08-05 18:12:57 UTC
Python 2 deps has been removed from recoll package:

Comment 9 Miro Hrončok 2019-08-05 21:59:09 UTC
Thank you.

I have noticed the build dependency is still there:

    BuildRequires:  python2-devel
    BuildRequires:  python2-setuptools

From this line it seems the Python 2 bits are built an removed:

    rm -rf %{buildroot}%{python2_sitearch}

Any chance to build entirely without Python 2?

Comment 10 Terje Røsten 2019-08-06 04:41:35 UTC
Yeah, this requires more work, need to patch the auto* generated files, will have  a look.

Comment 12 Miro Hrončok 2019-08-07 06:45:01 UTC
Thank You!

Comment 13 Terje Røsten 2019-08-08 15:19:01 UTC
*** Bug 1738807 has been marked as a duplicate of this bug. ***

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