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

Merge with distutils@8c3c3d29 #3809

Merged
merged 35 commits into from
Feb 7, 2023
Merged

Merge with distutils@8c3c3d29 #3809

merged 35 commits into from
Feb 7, 2023

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Feb 6, 2023

Summary of changes

Closes

Pull Request Checklist

Because most Python packages maintain tests in top-level directory
`tests/` instead of `test/`, add both to source distributions for
consistency.
C99 removed support for implicit function declarations.  This means
that just calling a function, without declaring the function first,
can result in a compilation error.  Today, has_function works with
most compilers because they issue just a warning, create an object
file, and attempt a link, which then detects available of the symbol
at link time, as intended.  With future compilers, compilation will
already fail, and no link test is performed.

The has_function interface provides the caller with a way to supply
a list of header files to include.  However, even with today's
compilers, this only works if the function does not expect any
parameters.  Otherwise, the function call in the C fragment created
by has_function will not supply the correct argument list and fail
compilation.  Therefore, this change supplies and incorrect prototype
without arguments.  This is what autoconf does today in a very
similar situation, so it is quite likely that compilers will support
this construct in this context in the future.

The includes and include_dirs arguments are deprecated because of
the parameter list mismatch issue.

Fixes #3648.
[FURB123]: Replace `str(x)` with `x`
[FURB113]: Use `x.extend(...)` instead of repeatedly calling `x.append()`
[FURB108]: Use `x in (y, z)` instead of `x == y or x == z`
[FURB131]: Replace `del x[y]` with `x.pop(y)`
[FURB109]: Replace `in [x, y, z]` with `in (x, y, z)`
For 'get_python_inc', bypass missing config include dir
Fix MinGW-w64 segmentation fault
Add `tests/test*.py` to source distributions
distutils.ccompiler: Make has_function work with more C99 compilers
This reverts commit 0171aee, reversing
changes made to fb2a173.
The previous code did not take into account the .exe file extension
on Windows.
Fix MinGW-w64 segmentation fault (v2)
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.

get_python_inc returns wrong include directory for bundled Pythons
7 participants