Create and install locale files with Python 3

Bug #1922975 reported by Jeff Davis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Medium
Unassigned
3.7
Medium
Unassigned

Bug Description

The Python scripts in build/i18n/scripts don't quite work with Python 3, which is an obstacle to generating and installing translations on Ubuntu 20.04.

I was able to get the scripts working with some minor changes, which I will share in a moment.

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Working branch user/jeffdavis/lp1922975-build-i18n-scripts-python3 should make build/i18n/scripts Python3-compatible:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jeffdavis/lp1922975-build-i18n-scripts-python3

To test, do `cd build/i18n && make LOCALE=fr-CA install` (you may need to do configure && make first). In my Ubuntu 20.04 environment, this fails with current master, but succeeds if I apply the changes from my working branch. The issue does not arise on Ubuntu 18.04, which will use Python 2 by default.

I'm not sure how to make the changes available, since different environments need different versions of these scripts.

Jane Sandberg (sandbej)
Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbej)
Jane Sandberg (sandbej)
tags: added: i18n
Revision history for this message
Jane Sandberg (sandbej) wrote :

Thank you so much, Jeff! Works well for me on python 3, so I've signed off on it.

It looks like the recommendation is to specify the major python version in the shebang line if it only works on one python3 (https://docs.python.org/3/using/unix.html#miscellaneous).

It seemed simplest to just provide your python3 version of the scripts, and have packagers and translators use python3 for their work, regardless of which OS they use. So I've added another commit that installs python3 versions of all those dependencies, and specifies python3 in the shebang lines.

The signoff and follow-up commit are available at user/sandbergja/lp1922975_python3

Changed in evergreen:
assignee: Jane Sandberg (sandbej) → nobody
tags: added: pullrequest signedoff
Changed in evergreen:
milestone: none → 3.8.1
importance: Undecided → Medium
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers