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 778947 - Build failure with python2
Build failure with python2
Status: RESOLVED OBSOLETE
Product: caribou
Classification: Applications
Component: default
git master
Other Linux
: Normal normal
: ---
Assigned To: caribou-maint
caribou-maint
Depends on:
Blocks:
 
 
Reported: 2017-02-20 10:26 UTC by Emmanuele Bassi (:ebassi)
Modified: 2021-05-25 17:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Update the Python interpreter selection (1.14 KB, patch)
2017-02-20 11:01 UTC, Emmanuele Bassi (:ebassi)
accepted-commit_now Details | Review
Default to Python 3 (813 bytes, patch)
2017-02-20 11:02 UTC, Emmanuele Bassi (:ebassi)
accepted-commit_now Details | Review

Description Emmanuele Bassi (:ebassi) 2017-02-20 10:26:41 UTC
Caribou fails to build in Continuous with this error:

Generating and caching the translation database
Merging translations into caribou-autostart.desktop.
Traceback (most recent call last):
  • File "../tools/make_schema.py", line 104 in <module>
    maker.create_schemas(args.output)
  • File "../tools/make_schema.py", line 25 in create_schemas
    self._pretty_xml(fp, schemafile)
  • File "../tools/make_schema.py", line 40 in _pretty_xml
    fp.write('%s<%s%s>\n' % (' '*indent*2, e.tagName, self._attribs(e)))
TypeError: must be unicode, not str
Makefile:847: recipe for target 'org.gnome.caribou.gschema.xml.in' failed
make[2]: *** [org.gnome.caribou.gschema.xml.in] Error 1
make[2]: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  • File "../tools/make_schema.py", line 104 in <module>
    maker.create_schemas(args.output)
  • File "../tools/make_schema.py", line 25 in create_schemas
    self._pretty_xml(fp, schemafile)
  • File "../tools/make_schema.py", line 40 in _pretty_xml
    fp.write('%s<%s%s>\n' % (' '*indent*2, e.tagName, self._attribs(e)))
TypeError: must be unicode, not str
Makefile:852: recipe for target 'org.gnome.antler.gschema.xml.in' failed
make[2]: *** [org.gnome.antler.gschema.xml.in] Error 1

After commit: https://git.gnome.org/browse/caribou/commit/?id=e5375dc19f2ca404e1c70081ac6eea4c5119460b
Comment 1 Daiki Ueno 2017-02-20 10:46:19 UTC
This was caused by:
https://git.gnome.org/browse/caribou/commit/?id=e5375dc19f2ca404e1c70081ac6eea4c5119460b

Sorry, but I have no idea how to make it work with both python2 and python3, or if we can eventually drop python2 compatibility.

Parag, perhaps you might know?
Comment 2 Emmanuele Bassi (:ebassi) 2017-02-20 11:01:14 UTC
The build failure went away on its own, which was weird.

As for supporting both Python 2 and 3, I'd start with a better Python selection check in configure.ac that defaults to Python 3, and then fix all the compatibility issues that crop up.
Comment 3 Emmanuele Bassi (:ebassi) 2017-02-20 11:01:37 UTC
Created attachment 346253 [details] [review]
Update the Python interpreter selection

We should use a `--with-python=PATH` configure argument instead of
AM_PATH_PYTHON with an ancient version that is not even supported any
more. This allows builders to select the appropriate version of Python
following a well-known approach.
Comment 4 Emmanuele Bassi (:ebassi) 2017-02-20 11:02:41 UTC
Created attachment 346254 [details] [review]
Default to Python 3

We should try and use Python 3, and only fall back to Python 2 if
necessary.
Comment 5 Daiki Ueno 2017-02-20 11:42:24 UTC
Review of attachment 346253 [details] [review]:

Thanks.
Comment 6 Daiki Ueno 2017-02-20 11:42:44 UTC
Review of attachment 346254 [details] [review]:

Thanks.
Comment 7 Kjartan Maraas 2017-03-06 19:44:09 UTC
I'm also seeing this in case you need more help debugging it.
Comment 8 Daiki Ueno 2017-03-07 14:51:34 UTC
Yes, it would be great if anyone can help me out here.
Comment 9 André Klapper 2021-05-25 17:46:14 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new enhancement request ticket at
  https://gitlab.gnome.org/GNOME/caribou/-/issues/

Thank you for your understanding and your help.