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

Skip to content

Commit 3d3e1ba

Browse files
committed
Issue #19340: Fix test_sysconfig when Python is built with an empty prefix.
Patch by Sunny K.
2 parents 3dd263f + dde25c4 commit 3d3e1ba

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
@@ -352,8 +352,10 @@ def test_srcdir(self):
352352
self.assertTrue(os.path.exists(Python_h), Python_h)
353353
self.assertTrue(sysconfig._is_python_source_dir(srcdir))
354354
elif os.name == 'posix':
355-
self.assertEqual(os.path.dirname(sysconfig.get_makefile_filename()),
356-
srcdir)
355+
makefile_dir = os.path.dirname(sysconfig.get_makefile_filename())
356+
# Issue #19340: srcdir has been realpath'ed already
357+
makefile_dir = os.path.realpath(makefile_dir)
358+
self.assertEqual(makefile_dir, srcdir)
357359

358360
def test_srcdir_independent_of_cwd(self):
359361
# 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
@@ -630,6 +630,7 @@ Sijin Joseph
630630
Andreas Jung
631631
Tattoo Mabonzo K.
632632
Sarah K.
633+
Sunny K
633634
Bohuslav Kabrda
634635
Alexey Kachayev
635636
Bob Kahn

0 commit comments

Comments
 (0)