From e4a07d8f825c986774a11bf52a7d20a23062163e Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Sat, 27 Nov 2021 21:23:06 -0800 Subject: [PATCH] LP#1922975: install python3 dependencies, rather than python2 Also specifies python3 in the shebang lines of python scripts, and improves the documentation for translators about installing these dependencies. Signed-off-by: Jane Sandberg Signed-off-by: Bill Erickson --- Open-ILS/src/extras/install/Makefile.debian-bullseye | 12 ++++++------ Open-ILS/src/extras/install/Makefile.debian-buster | 12 ++++++------ Open-ILS/src/extras/install/Makefile.debian-stretch | 12 ++++++------ Open-ILS/src/extras/install/Makefile.ubuntu-bionic | 12 ++++++------ build/i18n/scripts/basel10n.py | 2 +- build/i18n/scripts/db-seed-i18n.py | 2 +- build/i18n/scripts/dojo_resource.py | 2 +- build/i18n/scripts/fieldmapper.py | 2 +- build/i18n/scripts/ils_events.py | 2 +- build/i18n/scripts/marc_tooltip_maker.py | 2 +- build/i18n/scripts/merge_ils_events.py | 2 +- build/i18n/tests/check_entities.py | 2 +- build/i18n/tests/check_properties.py | 2 +- build/i18n/tests/testIDL.py | 2 +- build/i18n/tests/testSQL.py | 2 +- build/i18n/tests/testbase.py | 2 +- build/i18n/tests/testpo.py | 2 +- .../development/pages/updating_translations_launchpad.adoc | 12 ++++++++++++ 18 files changed, 49 insertions(+), 37 deletions(-) diff --git a/Open-ILS/src/extras/install/Makefile.debian-bullseye b/Open-ILS/src/extras/install/Makefile.debian-bullseye index 60476e0062..673c02a406 100644 --- a/Open-ILS/src/extras/install/Makefile.debian-bullseye +++ b/Open-ILS/src/extras/install/Makefile.debian-bullseye @@ -145,12 +145,12 @@ TRANSLATOR_DEBS = \ libtemplate-perl \ liblocale-maketext-lexicon-perl \ translate-toolkit \ - python-dev \ - python-levenshtein \ - python-polib \ - python-setuptools \ - python-simplejson \ - python-lxml \ + python3-dev \ + python3-levenshtein \ + python3-polib \ + python3-setuptools \ + python3-simplejson \ + python3-lxml \ bzr all: diff --git a/Open-ILS/src/extras/install/Makefile.debian-buster b/Open-ILS/src/extras/install/Makefile.debian-buster index 1a9ac1609e..8278d5c661 100644 --- a/Open-ILS/src/extras/install/Makefile.debian-buster +++ b/Open-ILS/src/extras/install/Makefile.debian-buster @@ -144,12 +144,12 @@ TRANSLATOR_DEBS = \ libtemplate-perl \ liblocale-maketext-lexicon-perl \ translate-toolkit \ - python-dev \ - python-levenshtein \ - python-polib \ - python-setuptools \ - python-simplejson \ - python-lxml \ + python3-dev \ + python3-levenshtein \ + python3-polib \ + python3-setuptools \ + python3-simplejson \ + python3-lxml \ bzr all: diff --git a/Open-ILS/src/extras/install/Makefile.debian-stretch b/Open-ILS/src/extras/install/Makefile.debian-stretch index 656025e94d..2922b26cea 100644 --- a/Open-ILS/src/extras/install/Makefile.debian-stretch +++ b/Open-ILS/src/extras/install/Makefile.debian-stretch @@ -144,12 +144,12 @@ TRANSLATOR_DEBS = \ libtemplate-perl \ liblocale-maketext-lexicon-perl \ translate-toolkit \ - python-dev \ - python-levenshtein \ - python-polib \ - python-setuptools \ - python-simplejson \ - python-lxml \ + python3-dev \ + python3-levenshtein \ + python3-polib \ + python3-setuptools \ + python3-simplejson \ + python3-lxml \ bzr all: diff --git a/Open-ILS/src/extras/install/Makefile.ubuntu-bionic b/Open-ILS/src/extras/install/Makefile.ubuntu-bionic index 96557bc8e6..a13d6c3a24 100644 --- a/Open-ILS/src/extras/install/Makefile.ubuntu-bionic +++ b/Open-ILS/src/extras/install/Makefile.ubuntu-bionic @@ -147,12 +147,12 @@ TRANSLATOR_DEBS = \ libtemplate-perl \ liblocale-maketext-lexicon-perl \ translate-toolkit \ - python-dev \ - python-levenshtein \ - python-polib \ - python-setuptools \ - python-simplejson \ - python-lxml \ + python3-dev \ + python3-levenshtein \ + python3-polib \ + python3-setuptools \ + python3-simplejson \ + python3-lxml \ bzr all: diff --git a/build/i18n/scripts/basel10n.py b/build/i18n/scripts/basel10n.py index bb816e6a8f..3c0985fd82 100755 --- a/build/i18n/scripts/basel10n.py +++ b/build/i18n/scripts/basel10n.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # basel10n.py """ This class enables translation of Evergreen's seed database strings diff --git a/build/i18n/scripts/db-seed-i18n.py b/build/i18n/scripts/db-seed-i18n.py index 7c59374c50..5e9a72fadb 100755 --- a/build/i18n/scripts/db-seed-i18n.py +++ b/build/i18n/scripts/db-seed-i18n.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # vim:et:ts=4:sw=4: """ This class enables translation of Evergreen's seed database strings. diff --git a/build/i18n/scripts/dojo_resource.py b/build/i18n/scripts/dojo_resource.py index 64ece4bdc0..75af7004ba 100755 --- a/build/i18n/scripts/dojo_resource.py +++ b/build/i18n/scripts/dojo_resource.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # dojo_resource.py """ This class enables translation of Dojo resource bundles using gettext format. diff --git a/build/i18n/scripts/fieldmapper.py b/build/i18n/scripts/fieldmapper.py index 99a58024ac..4782a5c092 100755 --- a/build/i18n/scripts/fieldmapper.py +++ b/build/i18n/scripts/fieldmapper.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # fieldmapper.py """ This class enables translation of Evergreen's fieldmapper IDL XML. diff --git a/build/i18n/scripts/ils_events.py b/build/i18n/scripts/ils_events.py index 9e359c49c8..989e7d6c37 100755 --- a/build/i18n/scripts/ils_events.py +++ b/build/i18n/scripts/ils_events.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ils_events.py """ This class enables translation of Evergreen's ils_events XML file. diff --git a/build/i18n/scripts/marc_tooltip_maker.py b/build/i18n/scripts/marc_tooltip_maker.py index f563166fc1..4147d47afe 100755 --- a/build/i18n/scripts/marc_tooltip_maker.py +++ b/build/i18n/scripts/marc_tooltip_maker.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # vim: set fileencoding=utf-8 : # vim:et:ts=4:sw=4: diff --git a/build/i18n/scripts/merge_ils_events.py b/build/i18n/scripts/merge_ils_events.py index 57491e35c2..b56636e6cf 100755 --- a/build/i18n/scripts/merge_ils_events.py +++ b/build/i18n/scripts/merge_ils_events.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import xml.dom.minidom import optparse diff --git a/build/i18n/tests/check_entities.py b/build/i18n/tests/check_entities.py index d9d8818c5f..34c96635f3 100755 --- a/build/i18n/tests/check_entities.py +++ b/build/i18n/tests/check_entities.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ----------------------------------------------------------------------- # Copyright (C) 2008 Laurentian University # Dan Scott diff --git a/build/i18n/tests/check_properties.py b/build/i18n/tests/check_properties.py index 8fc9b862da..9f1596efcf 100755 --- a/build/i18n/tests/check_properties.py +++ b/build/i18n/tests/check_properties.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # ----------------------------------------------------------------------- # Copyright (C) 2008 Laurentian University # Dan Scott diff --git a/build/i18n/tests/testIDL.py b/build/i18n/tests/testIDL.py index 568af9ecdc..6b4b30c545 100755 --- a/build/i18n/tests/testIDL.py +++ b/build/i18n/tests/testIDL.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # vim: set fileencoding=utf-8 : """ Perform the following tests: diff --git a/build/i18n/tests/testSQL.py b/build/i18n/tests/testSQL.py index 5cd9b33434..807a976932 100755 --- a/build/i18n/tests/testSQL.py +++ b/build/i18n/tests/testSQL.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Perform the following tests: # 1. Generate a POT file from a set of marked SQL statements diff --git a/build/i18n/tests/testbase.py b/build/i18n/tests/testbase.py index d7e83bbb12..11a1969243 100755 --- a/build/i18n/tests/testbase.py +++ b/build/i18n/tests/testbase.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf=8 -*- # vim: set fileencoding=utf-8 : """ diff --git a/build/i18n/tests/testpo.py b/build/i18n/tests/testpo.py index 021e1868d1..215ef67b72 100755 --- a/build/i18n/tests/testpo.py +++ b/build/i18n/tests/testpo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import filecmp import glob diff --git a/docs/modules/development/pages/updating_translations_launchpad.adoc b/docs/modules/development/pages/updating_translations_launchpad.adoc index 9b177395f9..40ba14c9e5 100644 --- a/docs/modules/development/pages/updating_translations_launchpad.adoc +++ b/docs/modules/development/pages/updating_translations_launchpad.adoc @@ -10,6 +10,18 @@ You must install all of the Python prerequisites required for building translations, per http://evergreen-ils.org/dokuwiki/doku.php?id=evergreen-admin:customizations:i18n +If you are using a supported operating system, you can use this simple command to +install the necessary dependencies: + +[source, bash] +------------------------------------------------------------------------------ +make -f Open-ILS/src/extras/Makefile.install -translator +------------------------------------------------------------------------------ + +Otherwise, install the following dependencies using the method that works +best for your system. For python packages, you will want to use the python 3 +version: + * https://bitbucket.org/izi/polib/wiki/Home[polib] * http://translate.sourceforge.net[translate-toolkit] * http://pypi.python.org/pypi/python-Levenshtein/[levenshtein] -- 2.11.0