Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCompiler.has_function: Do not fail if self.outputdir is set #65

Merged
merged 3 commits into from
Nov 9, 2021

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Nov 7, 2021

Previously submitted as pypa/setuptools#2860

Fixes #64

Copy link
Member

@FFY00 FFY00 left a comment

Choose a reason for hiding this comment

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

Aren't the other os.remove calls also affected?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 7, 2021

Aren't the other os.remove calls also affected?

No, they are using the result of self.compile

Copy link
Member

@FFY00 FFY00 left a comment

Choose a reason for hiding this comment

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

Alright then. This looks okay to me, but I would like @jaraco to have a look, as I am not too familiar with this part of the code and don't have time to do an in-depth dive.

distutils/ccompiler.py Outdated Show resolved Hide resolved
@jaraco jaraco merged commit f1b0a2b into pypa:main Nov 9, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 9, 2021

Thanks.

@jaraco
Copy link
Member

jaraco commented Nov 28, 2021

I've discovered this test creates a directory 'scratch' with subdirectories:

distutils main $ find scratch
scratch
scratch/var
scratch/var/folders
scratch/var/folders/c6
scratch/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn
scratch/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T

Probably the test should clean this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

has_function broken when CCompiler.output_dir is set.
3 participants