Skip to content

Conversation

@hroncok
Copy link
Contributor

@hroncok hroncok commented Oct 16, 2025

The test did not expect it could be run with e.g. CFLAGS set to a custom value.

Fixes #140210

… ignore environment variables

The test did not expect it could be run with e.g. CFLAGS set to a custom value.

Fixes python#140210
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I confirm that I can easily reproduce the issue by setting CFLAGS environment variable:

$ CFLAGS="xxx" ./python -m test test_sysconfig -m test_parse_makefile_renamed_vars -v
...
-  'var1': 'xxx',
?           ^^^

+  'var1': '-Wall',
?           ^^^^^
...

With this PR, I can no longer reproduce the issue.

cc @serhiy-storchaka

@brettcannon brettcannon merged commit 69f54ce into python:main Nov 27, 2025
53 checks passed
@hroncok hroncok deleted the test_parse_makefile_renamed_vars branch November 27, 2025 18:01
@hroncok
Copy link
Contributor Author

hroncok commented Nov 27, 2025

Thanks for merging.

@vstinner
Copy link
Member

Oh sorry, I forgot to merge this PR.

@hroncok
Copy link
Contributor Author

hroncok commented Nov 27, 2025

I forgot I opened it, so I think it's fine :D

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
… ignore environment variables (python#140213)

The test did not expect it could be run with e.g. CFLAGS set to a custom value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_sysconfig test_parse_makefile_renamed_vars fails when $CFLAGS is set

3 participants