Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 561050 - net-p2p/qbittorrent-9999 supports python 3
Summary: net-p2p/qbittorrent-9999 supports python 3
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-21 16:23 UTC by Eugene Shalygin
Modified: 2016-05-02 18:59 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Shalygin 2015-09-21 16:23:23 UTC
qBittorrent-9999 (and maybe 3.2.3 too) uses python 3 if present for search plugins, while ebuild depends on python 2 only. Please add python3_4 to PYTHON_COMPAT.

Reproducible: Always

Steps to Reproduce:
run search and look for spawned python processes or check https://github.com/qbittorrent/qBittorrent/blob/master/src/core/utils/misc.cpp
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2015-09-25 14:44:13 UTC
as usual i am going to need some python@ help here for multiple python implementations
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2015-09-25 17:38:33 UTC
(In reply to Markos Chandras from comment #1)
> as usual i am going to need some python@ help here for multiple python
> implementations

Delete lines 260-275 in https://github.com/qbittorrent/qBittorrent/blob/master/src/core/utils/misc.cpp

Use plain python not python2/3. The rest will be handled by the Gentoo python system.
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2015-11-04 21:10:24 UTC
Is there no way to do it without patching the sources?
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2015-11-05 07:28:41 UTC
Is it linked to python?

If it is only calling the python interpreter, but has no python modules installed, you can just leave it as is, use python-single-r1.eclass and depend on all python versions. 

If it installs modules, you need to delete those lines and patch line 279 to explicitly call the python used during installation e.g. /python/python3.4/.
Comment 5 Eugene Shalygin 2015-11-05 11:49:03 UTC
It does not install python modules in the system.
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2015-11-07 13:25:54 UTC
A patch would be much appreciated
Comment 7 Eugene Shalygin 2015-11-10 16:51:44 UTC
diff --git a/src/core/utils/misc.cpp b/src/core/utils/misc.cpp
index ceef86d..93a3cec 100644
--- a/src/core/utils/misc.cpp
+++ b/src/core/utils/misc.cpp
@@ -258,7 +258,7 @@ QString Utils::Misc::pythonExecutable()
     static QString executable;
     if (executable.isEmpty()) {
         QProcess pythonProc;
-#if defined(Q_OS_UNIX)
+#if 0
         /*
          * On Unix-Like Systems python2 and python3 should always exist
          * http://legacy.python.org/dev/peps/pep-0394/
Comment 8 Eugene Shalygin 2015-11-10 17:43:24 UTC
For me a ebuild with the following changes works:
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
and 
inherit python-any-r1
Comment 9 Davide Pesavento (RETIRED) gentoo-dev 2016-05-02 18:59:03 UTC
All python stuff in the ebuild is gone with 3.3.4-r1. This is therefore obsolete.