[Python-checkins] distutils2 (merge default -> python3): Merge default
eric.araujo
python-checkins at python.org
Wed Oct 12 18:09:19 CEST 2011
http://hg.python.org/distutils2/rev/c732ae1db3a8
changeset: 1209:c732ae1db3a8
branch: python3
parent: 1208:7a875901c205
parent: 1207:0d838447c4ab
user: Éric Araujo <merwok at netwok.org>
date: Sat Oct 08 03:54:58 2011 +0200
summary:
Merge default
files:
distutils2/_backport/tests/test_sysconfig.py | 8 +++++++-
distutils2/tests/test_command_config.py | 4 ++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/distutils2/_backport/tests/test_sysconfig.py b/distutils2/_backport/tests/test_sysconfig.py
--- a/distutils2/_backport/tests/test_sysconfig.py
+++ b/distutils2/_backport/tests/test_sysconfig.py
@@ -3,7 +3,6 @@
import subprocess
import shutil
from copy import copy
-from configparser import RawConfigParser
from io import StringIO
from distutils2._backport import sysconfig
@@ -260,8 +259,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))
diff --git a/distutils2/tests/test_command_config.py b/distutils2/tests/test_command_config.py
--- a/distutils2/tests/test_command_config.py
+++ b/distutils2/tests/test_command_config.py
@@ -29,10 +29,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):
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list