Skip to content

Commit 76db37b

Browse files
authored
bpo-40112: distutils test_search_cpp: Fix logic to determine if C compiler is xlc on AIX (GH-19225)
1 parent b74468e commit 76db37b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Lib/distutils/tests/test_config_cmd.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ def test_search_cpp(self):
4747
cmd = config(dist)
4848
cmd._check_compiler()
4949
compiler = cmd.compiler
50-
is_xlc = shutil.which(compiler.preprocessor[0]).startswith("/usr/vac")
51-
if is_xlc:
50+
if sys.platform[:3] == "aix" and "xlc" in compiler.preprocessor[0].lower():
5251
self.skipTest('xlc: The -E option overrides the -P, -o, and -qsyntaxonly options')
5352

5453
# simple pattern searches

0 commit comments

Comments
 (0)