File tree 4 files changed +3
-25
lines changed
4 files changed +3
-25
lines changed Original file line number Diff line number Diff line change 10
10
from collections .abc import Callable
11
11
from typing import ClassVar
12
12
13
+ from ..ccompiler import show_compilers
13
14
from ..core import Command
14
15
from ..errors import DistutilsOptionError
15
16
from ..util import get_platform
16
17
17
18
18
- def show_compilers ():
19
- from ..ccompiler import show_compilers
20
-
21
- show_compilers ()
22
-
23
-
24
19
class build (Command ):
25
20
description = "build everything needed to install"
26
21
Original file line number Diff line number Diff line change 19
19
from distutils ._log import log
20
20
from typing import ClassVar
21
21
22
+ from ..ccompiler import new_compiler , show_compilers
22
23
from ..core import Command
23
24
from ..errors import DistutilsSetupError
24
25
from ..sysconfig import customize_compiler
25
26
26
27
27
- def show_compilers ():
28
- from ..ccompiler import show_compilers
29
-
30
- show_compilers ()
31
-
32
-
33
28
class build_clib (Command ):
34
29
description = "build C/C++ libraries used by Python extensions"
35
30
@@ -93,9 +88,6 @@ def run(self) -> None:
93
88
if not self .libraries :
94
89
return
95
90
96
- # Yech -- this is cut 'n pasted from build_ext.py!
97
- from ..ccompiler import new_compiler
98
-
99
91
self .compiler = new_compiler (
100
92
compiler = self .compiler , dry_run = self .dry_run , force = self .force
101
93
)
Original file line number Diff line number Diff line change 16
16
from typing import ClassVar
17
17
18
18
from .._modified import newer_group
19
+ from ..ccompiler import new_compiler , show_compilers
19
20
from ..core import Command
20
21
from ..errors import (
21
22
CCompilerError ,
34
35
extension_name_re = re .compile (r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$' )
35
36
36
37
37
- def show_compilers ():
38
- from ..ccompiler import show_compilers
39
-
40
- show_compilers ()
41
-
42
-
43
38
class build_ext (Command ):
44
39
description = "build C/C++ extensions (compile/link to build directory)"
45
40
@@ -303,8 +298,6 @@ def finalize_options(self) -> None: # noqa: C901
303
298
raise DistutilsOptionError ("parallel should be an integer" )
304
299
305
300
def run (self ) -> None : # noqa: C901
306
- from ..ccompiler import new_compiler
307
-
308
301
# 'self.extensions', as supplied by setup.py, is a list of
309
302
# Extension instances. See the documentation for Extension (in
310
303
# distutils.extension) for details.
Original file line number Diff line number Diff line change @@ -258,8 +258,6 @@ def try_run(
258
258
built from 'body' and 'headers'. Return true on success, false
259
259
otherwise.
260
260
"""
261
- from ..ccompiler import CompileError , LinkError
262
-
263
261
self ._check_compiler ()
264
262
try :
265
263
src , obj , exe = self ._link (
You can’t perform that action at this time.
0 commit comments