From d3dac3cfb255e1f6f018c4cd3fcbd04706b3c16e Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 11 Sep 2022 20:01:56 -0400 Subject: compilers: don't export every compiler as a top-level property This is wasteful and generally unneeded, since code can just use the compiler they detected instead of manually poking at the internals of this subpackage. It also avoids importing an absolute ton of code the instant one runs `from . import compilers` --- mesonbuild/compilers/__init__.py | 161 --------------------------------------- 1 file changed, 161 deletions(-) (limited to 'mesonbuild') diff --git a/mesonbuild/compilers/__init__.py b/mesonbuild/compilers/__init__.py index 034063a..c516aab 100644 --- a/mesonbuild/compilers/__init__.py +++ b/mesonbuild/compilers/__init__.py @@ -52,83 +52,6 @@ __all__ = [ 'detect_rust_compiler', 'detect_d_compiler', 'detect_swift_compiler', - - 'AppleClangCCompiler', - 'AppleClangCPPCompiler', - 'AppleClangObjCCompiler', - 'AppleClangObjCPPCompiler', - 'ArmCCompiler', - 'ArmCPPCompiler', - 'ArmclangCCompiler', - 'ArmclangCPPCompiler', - 'CCompiler', - 'ClangCCompiler', - 'ClangCompiler', - 'ClangCPPCompiler', - 'ClangObjCCompiler', - 'ClangObjCPPCompiler', - 'ClangClCCompiler', - 'ClangClCPPCompiler', - 'CPPCompiler', - 'DCompiler', - 'DmdDCompiler', - 'FortranCompiler', - 'G95FortranCompiler', - 'GnuCCompiler', - 'ElbrusCCompiler', - 'EmscriptenCCompiler', - 'GnuCompiler', - 'GnuLikeCompiler', - 'GnuCPPCompiler', - 'ElbrusCPPCompiler', - 'EmscriptenCPPCompiler', - 'GnuDCompiler', - 'GnuFortranCompiler', - 'ElbrusFortranCompiler', - 'FlangFortranCompiler', - 'GnuObjCCompiler', - 'GnuObjCPPCompiler', - 'IntelGnuLikeCompiler', - 'IntelVisualStudioLikeCompiler', - 'IntelCCompiler', - 'IntelCPPCompiler', - 'IntelClCCompiler', - 'IntelClCPPCompiler', - 'IntelFortranCompiler', - 'IntelClFortranCompiler', - 'JavaCompiler', - 'LLVMDCompiler', - 'MonoCompiler', - 'CudaCompiler', - 'VisualStudioCsCompiler', - 'NAGFortranCompiler', - 'ObjCCompiler', - 'ObjCPPCompiler', - 'Open64FortranCompiler', - 'PathScaleFortranCompiler', - 'NvidiaHPC_CCompiler', - 'NvidiaHPC_CPPCompiler', - 'NvidiaHPC_FortranCompiler', - 'PGICCompiler', - 'PGICPPCompiler', - 'PGIFortranCompiler', - 'RustCompiler', - 'ClippyRustCompiler', - 'CcrxCCompiler', - 'CcrxCPPCompiler', - 'Xc16CCompiler', - 'CompCertCCompiler', - 'C2000CCompiler', - 'C2000CPPCompiler', - 'TICCompiler', - 'TICPPCompiler', - 'SunFortranCompiler', - 'SwiftCompiler', - 'ValaCompiler', - 'VisualStudioLikeCompiler', - 'VisualStudioCCompiler', - 'VisualStudioCPPCompiler', - 'CythonCompiler', ] # Bring symbols from each module into compilers sub-package namespace @@ -172,87 +95,3 @@ from .detect import ( detect_d_compiler, detect_swift_compiler, ) -from .c import ( - CCompiler, - AppleClangCCompiler, - ArmCCompiler, - ArmclangCCompiler, - ClangCCompiler, - ClangClCCompiler, - GnuCCompiler, - ElbrusCCompiler, - EmscriptenCCompiler, - IntelCCompiler, - IntelClCCompiler, - NvidiaHPC_CCompiler, - PGICCompiler, - CcrxCCompiler, - Xc16CCompiler, - CompCertCCompiler, - C2000CCompiler, - TICCompiler, - VisualStudioCCompiler, -) -from .cpp import ( - CPPCompiler, - AppleClangCPPCompiler, - ArmCPPCompiler, - ArmclangCPPCompiler, - ClangCPPCompiler, - ClangClCPPCompiler, - GnuCPPCompiler, - ElbrusCPPCompiler, - EmscriptenCPPCompiler, - IntelCPPCompiler, - IntelClCPPCompiler, - NvidiaHPC_CPPCompiler, - PGICPPCompiler, - CcrxCPPCompiler, - C2000CPPCompiler, - TICPPCompiler, - VisualStudioCPPCompiler, -) -from .cs import MonoCompiler, VisualStudioCsCompiler -from .d import ( - DCompiler, - DmdDCompiler, - GnuDCompiler, - LLVMDCompiler, -) -from .cuda import CudaCompiler -from .fortran import ( - FortranCompiler, - G95FortranCompiler, - GnuFortranCompiler, - ElbrusFortranCompiler, - FlangFortranCompiler, - IntelFortranCompiler, - IntelClFortranCompiler, - NAGFortranCompiler, - Open64FortranCompiler, - PathScaleFortranCompiler, - NvidiaHPC_FortranCompiler, - PGIFortranCompiler, - SunFortranCompiler, -) -from .java import JavaCompiler -from .objc import ( - ObjCCompiler, - AppleClangObjCCompiler, - ClangObjCCompiler, - GnuObjCCompiler, -) -from .objcpp import ( - ObjCPPCompiler, - AppleClangObjCPPCompiler, - ClangObjCPPCompiler, - GnuObjCPPCompiler, -) -from .rust import RustCompiler, ClippyRustCompiler -from .swift import SwiftCompiler -from .vala import ValaCompiler -from .mixins.visualstudio import VisualStudioLikeCompiler -from .mixins.gnu import GnuCompiler, GnuLikeCompiler -from .mixins.intel import IntelGnuLikeCompiler, IntelVisualStudioLikeCompiler -from .mixins.clang import ClangCompiler -from .cython import CythonCompiler -- cgit v1.1