Skip to content

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

Merged
jaraco merged 3 commits intopypa:mainfrom
mkoeppe:ccompiler__has_function__output_dir
Nov 9, 2021
Merged

CCompiler.has_function: Do not fail if self.outputdir is set#65
jaraco merged 3 commits intopypa:mainfrom
mkoeppe:ccompiler__has_function__output_dir

Conversation

@mkoeppe
Copy link
Copy Markdown
Contributor

@mkoeppe mkoeppe commented Nov 7, 2021

Previously submitted as pypa/setuptools#2860

Fixes #64

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
@jaraco jaraco merged commit f1b0a2b into pypa:main Nov 9, 2021
@mkoeppe
Copy link
Copy Markdown
Contributor Author

mkoeppe commented Nov 9, 2021

Thanks.

@jaraco
Copy link
Copy Markdown
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