[issue10086] test_sysconfig failure with site-packages
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
Hallvard B Furuseth h.b.furus...@usit.uio.no added the comment: ,AC�ric Araujo writes: Attaching a patch with your two suggestions. Added file: http://bugs.python.org/file19264/fix10086.diff Not quite, since I suggested global_path.startswith(os.path.join(base, )) instead of global_path.startswith(base) I should have mentioned, the join appends a directory terminator to base. Not sure if that's the correct way to do it. Anyway, your patch does not catch a similar failure (if this can happen): base= /site global_path = /site-nonsense/... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
Éric Araujo mer...@netwok.org added the comment: Thanks for the fix, good catch! Do you want to write a patch to test_sysconfig to add a test? Otherwise I’ll do it. -- components: +Distutils2, Library (Lib) versions: +3rd party, Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
Éric Araujo mer...@netwok.org added the comment: I wrote too fast, I thought your diff was for sysconfig itself, not test_sysconfig. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
Éric Araujo mer...@netwok.org added the comment: Attaching a patch with your two suggestions. Two things worry me and prevent me from committing right now: 1) sysconfig was originally distutils.sysconfig, and some duplication remains. Can’t this bug happen with distutils.sysconfig too? Should we duplicate tests from test_sysconfig to distutils.test_sysconfig? 2) How to prevent a regression? That is, how to run tests with custom ./configure options? -- keywords: +needs review, patch stage: needs patch - patch review Added file: http://bugs.python.org/file19264/fix10086.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
Hallvard B Furuseth h.b.furus...@usit.uio.no added the comment: It's with 'purelib' because my prefix /site matches /site-packages. This fixes it for me, but maybe you should also assert that global_path.startswith(os.path.join(base, )). --- Lib/test/test_sysconfig.py~ 2010-09-20 +++ Lib/test/test_sysconfig.py 2010-10-14 @@ -278 +278 @@ class TestSysConfig(unittest.TestCase): -self.assertEquals(user_path, global_path.replace(base, user)) +self.assertEquals(user_path, global_path.replace(base, user, 1)) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
New submission from Hallvard B Furuseth h.b.furus...@usit.uio.no: test_sysconfig on Python 3.2a3 fails with AssertionError: '/home/sjef/.local/lib/python3.2/site-packages' != '/home/sjef/.local/lib/python3.2/home/sjef/.local-packages' Python-3.2a3$ ./python Lib/test/regrtest.py -v test_sysconfig == CPython 3.2a3 (r32a3:85355, Oct 13 2010, 07:34:15) [GCC 4.4.3] == Linux-2.6.32-25-generic-x86_64-with-debian-squeeze-sid little-endian == /home/sjef/src/python/Python-3.2a3/build/test_python_17497 [1/1] test_sysconfig test_get_config_h_filename (test.test_sysconfig.TestSysConfig) ... ok test_get_config_vars (test.test_sysconfig.TestSysConfig) ... ok test_get_makefile_filename (test.test_sysconfig.TestSysConfig) ... ok test_get_path (test.test_sysconfig.TestSysConfig) ... ok test_get_path_names (test.test_sysconfig.TestSysConfig) ... ok test_get_paths (test.test_sysconfig.TestSysConfig) ... ok test_get_platform (test.test_sysconfig.TestSysConfig) ... ok test_get_scheme_names (test.test_sysconfig.TestSysConfig) ... ok test_ldshared_value (test.test_sysconfig.TestSysConfig) ... ok test_main (test.test_sysconfig.TestSysConfig) ... ok test_symlink (test.test_sysconfig.TestSysConfig) ... ok test_user_similar (test.test_sysconfig.TestSysConfig) ... FAIL == FAIL: test_user_similar (test.test_sysconfig.TestSysConfig) -- Traceback (most recent call last): File /home/sjef/src/python/Python-3.2a3/Lib/test/test_sysconfig.py, line 278, in test_user_similar self.assertEquals(user_path, global_path.replace(base, user)) AssertionError: '/home/sjef/.local/lib/python3.2/site-packages' != '/home/sjef/.local/lib/python3.2/home/sjef/.local-packages' - /home/sjef/.local/lib/python3.2/site-packages ? ^^ + /home/sjef/.local/lib/python3.2/home/sjef/.local-packages ? + ^ -- Ran 12 tests in 0.145s FAILED (failures=1) test test_sysconfig failed -- Traceback (most recent call last): File /home/sjef/src/python/Python-3.2a3/Lib/test/test_sysconfig.py, line 278, in test_user_similar self.assertEquals(user_path, global_path.replace(base, user)) AssertionError: '/home/sjef/.local/lib/python3.2/site-packages' != '/home/sjef/.local/lib/python3.2/home/sjef/.local-packages' - /home/sjef/.local/lib/python3.2/site-packages ? ^^ + /home/sjef/.local/lib/python3.2/home/sjef/.local-packages ? + ^ 1 test failed: test_sysconfig -- components: Tests messages: 118525 nosy: hfuru priority: normal severity: normal status: open title: test_sysconfig failure with site-packages type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - tarek components: +Distutils -Tests nosy: +eric.araujo, tarek stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. Can you tell us what ./configure line you used before running make? Or maybe you edited site.py or created a sitecustomize.py? Tarek, Antoine: Is “Distutils” the right component for sysconfig bugs? (I thought it would be “Library”.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10086] test_sysconfig failure with site-packages
Hallvard B Furuseth h.b.furus...@usit.uio.no added the comment: ./configure --prefix=/site on Ubuntu. Unedited site.py. I had Python3.2a2 installed, but removing it did not make the test do anything different. Nor did removing /home/sjef/.local/lib/python3.2, which only contained an empty site-packages/. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com