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

Restores _default_compilers to ccompilers.py for backwards compatibility #346

Merged
merged 7 commits into from
Mar 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions distutils/ccompiler.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from .compat.numpy import ( # noqa: F401
_default_compilers,
compiler_class,
)
from .compilers.C import base
from .compilers.C.base import (
compiler_class,
gen_lib_options,
gen_preprocess_options,
get_default_compiler,
@@ -12,7 +15,6 @@
__all__ = [
'CompileError',
'LinkError',
'compiler_class',
'gen_lib_options',
'gen_preprocess_options',
'get_default_compiler',
2 changes: 2 additions & 0 deletions distutils/compat/numpy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# required for older numpy versions on Pythons prior to 3.12; see pypa/setuptools#4876
from ..compilers.C.base import _default_compilers, compiler_class # noqa: F401
1 change: 1 addition & 0 deletions newsfragments/4876.bugfix.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Restore `distutils.ccompiler._default_compilers` -- by :user:`ManiacDC`
Loading