Author: Armin Rigo <[email protected]>
Branch: py3.6
Changeset: r97243:38055c21771a
Date: 2019-08-22 15:01 +0200
http://bitbucket.org/pypy/pypy/changeset/38055c21771a/

Log:    Make gettext be importable, at least, if sys.base_prefix is not set.
        See comment

diff --git a/lib-python/3/gettext.py b/lib-python/3/gettext.py
--- a/lib-python/3/gettext.py
+++ b/lib-python/3/gettext.py
@@ -57,7 +57,11 @@
            'ldngettext', 'lngettext', 'ngettext',
            ]
 
-_default_localedir = os.path.join(sys.base_prefix, 'share', 'locale')
+try:
+    _default_localedir = os.path.join(sys.base_prefix, 'share', 'locale')
+except AttributeError:
+    pass   # pypy: sys.base_prefix is not set if pypy3-c is issuing
+           # "Library path not found, using compiled-in sys.path"
 
 # Expression parsing for plural form selection.
 #
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to