After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777271 - Use python3
Use python3
Status: RESOLVED NOTABUG
Product: chrome-gnome-shell
Classification: Other
Component: Native messaging connector
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Yuri Konotopov
chrome-gnome-shell panel maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-01-15 11:41 UTC by Jeremy Bicha
Modified: 2017-01-15 18:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jeremy Bicha 2017-01-15 11:41:51 UTC
Distros are trying to stop including python2. Does chrome-gnome-shell support python3?

Since I don't see any reason this needs to support python2, please update the shebangs to python3 once chrome-gnome-shell is ready for it.
Comment 1 Yuri Konotopov 2017-01-15 12:07:44 UTC
> Does chrome-gnome-shell support python3?

Yes, it is support Python 3.x as well as Python 2.7.

> please update the shebangs to python3

While Python 2.7 is still supported I will not touch shebang.
Within chrome-gnome-shell sources there is distutils [1] setup.py script [2] provided (and called as part of cmake installation) that is replacing shebang in chrome-gnome-shell.py to point those Python interpreter that is used to run setup.py.

So there is should not be any problem for distros to use any wanted Python version. Just tell cmake which python interpreter to use.

[1] https://docs.python.org/3/library/distutils.html
[2] https://git.gnome.org/browse/chrome-gnome-shell/tree/connector/setup.py
Comment 2 Jeremy Bicha 2017-01-15 13:25:30 UTC
Do you maintain the chrome-gnome-shell PPA?

cmake's FindPythonInterp finds python 2.7 and then goes ahead and builds for python2 even though python3 is available. That's not a problem for Debian because python2 won't be available in a clean build environment so it finds the correct version there.

Ubuntu has a bug causing python2 to be present https://bugs.debian.org/851478 I don't know if that bug will be fixed for older Ubuntu releases.

Also, I'm working on officially backporting chrome-gnome-shell 8 to older Ubuntu releases https://launchpad.net/bugs/1652537
Comment 3 Yuri Konotopov 2017-01-15 18:01:27 UTC
> Do you maintain the chrome-gnome-shell PPA?

Yes, that's me

> cmake's FindPythonInterp finds python 2.7 and then goes ahead and builds
> for python2 even though python3 is available.

If there multiple Python versions are installed in build host then you should tell cmake which version you want to use.
In your case I think `-DPython_ADDITIONAL_VERSIONS=3` option should help.

> Also, I'm working on officially backporting chrome-gnome-shell 8 to
> older Ubuntu releases

Thanks for doing this! So I will obsolete PPA when this will happens.