[Python-checkins] cpython (merge 2.7 -> 2.7): Branch merge

eric.araujo python-checkins at python.org
Sun Oct 9 09:00:17 CEST 2011


http://hg.python.org/cpython/rev/86ffa3d59c36
changeset:   72833:86ffa3d59c36
branch:      2.7
parent:      72812:8d4e5ee96ff8
parent:      72832:27045f93e4cb
user:        Éric Araujo <merwok at netwok.org>
date:        Sun Oct 09 06:33:54 2011 +0200
summary:
  Branch merge

files:
  Doc/library/gettext.rst                |   6 +++---
  Lib/distutils/tests/test_config_cmd.py |   4 ++--
  Lib/test/test_sysconfig.py             |  13 ++++++++-----
  3 files changed, 13 insertions(+), 10 deletions(-)


diff --git a/Doc/library/gettext.rst b/Doc/library/gettext.rst
--- a/Doc/library/gettext.rst
+++ b/Doc/library/gettext.rst
@@ -300,7 +300,7 @@
 
    .. method:: lngettext(singular, plural, n)
 
-      If a fallback has been set, forward :meth:`ngettext` to the
+      If a fallback has been set, forward :meth:`lngettext` to the
       fallback. Otherwise, return the translated message.  Overridden in derived
       classes.
 
@@ -756,8 +756,8 @@
 .. [#] See the footnote for :func:`bindtextdomain` above.
 
 .. [#] François Pinard has written a program called :program:`xpot` which does a
-   similar job.  It is available as part of his :program:`po-utils` package at http
-   ://po-utils.progiciels-bpi.ca/.
+   similar job.  It is available as part of his `po-utils package
+   <http://po-utils.progiciels-bpi.ca/>`_.
 
 .. [#] :program:`msgfmt.py` is binary compatible with GNU :program:`msgfmt` except that
    it provides a simpler, all-Python implementation.  With this and
diff --git a/Lib/distutils/tests/test_config_cmd.py b/Lib/distutils/tests/test_config_cmd.py
--- a/Lib/distutils/tests/test_config_cmd.py
+++ b/Lib/distutils/tests/test_config_cmd.py
@@ -44,10 +44,10 @@
         cmd = config(dist)
 
         # simple pattern searches
-        match = cmd.search_cpp(pattern='xxx', body='// xxx')
+        match = cmd.search_cpp(pattern='xxx', body='/* xxx */')
         self.assertEqual(match, 0)
 
-        match = cmd.search_cpp(pattern='_configtest', body='// xxx')
+        match = cmd.search_cpp(pattern='_configtest', body='/* xxx */')
         self.assertEqual(match, 1)
 
     def test_finalize_options(self):
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -1,9 +1,5 @@
-"""Tests for 'site'.
+"""Tests for sysconfig."""
 
-Tests assume the initial paths in sys.path once the interpreter has begun
-executing have not been removed.
-
-"""
 import unittest
 import sys
 import os
@@ -259,8 +255,15 @@
         # is similar to the global posix_prefix one
         base = get_config_var('base')
         user = get_config_var('userbase')
+        # the global scheme mirrors the distinction between prefix and
+        # exec-prefix but not the user scheme, so we have to adapt the paths
+        # before comparing (issue #9100)
+        adapt = sys.prefix != sys.exec_prefix
         for name in ('stdlib', 'platstdlib', 'purelib', 'platlib'):
             global_path = get_path(name, 'posix_prefix')
+            if adapt:
+                global_path = global_path.replace(sys.exec_prefix, sys.prefix)
+                base = base.replace(sys.exec_prefix, sys.prefix)
             user_path = get_path(name, 'posix_user')
             self.assertEqual(user_path, global_path.replace(base, user, 1))
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list