Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dde25c4

Browse files
committed
Issue #19340: Fix test_sysconfig when Python is built with an empty prefix.
Patch by Sunny K.
1 parent 776b888 commit dde25c4

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Lib/test/test_sysconfig.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,10 @@ def test_srcdir(self):
354354
self.assertTrue(os.path.exists(Python_h), Python_h)
355355
self.assertTrue(sysconfig._is_python_source_dir(srcdir))
356356
elif os.name == 'posix':
357-
self.assertEqual(os.path.dirname(sysconfig.get_makefile_filename()),
358-
srcdir)
357+
makefile_dir = os.path.dirname(sysconfig.get_makefile_filename())
358+
# Issue #19340: srcdir has been realpath'ed already
359+
makefile_dir = os.path.realpath(makefile_dir)
360+
self.assertEqual(makefile_dir, srcdir)
359361

360362
def test_srcdir_independent_of_cwd(self):
361363
# srcdir should be independent of the current working directory

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ Sijin Joseph
613613
Andreas Jung
614614
Tattoo Mabonzo K.
615615
Sarah K.
616+
Sunny K
616617
Bohuslav Kabrda
617618
Bob Kahn
618619
Kurt B. Kaiser

0 commit comments

Comments
 (0)