21
21
22
22
23
23
def make_setuptools_shim_args (
24
- setup_py_path , # type: str
25
- global_options = None , # type: Sequence[str]
26
- no_user_config = False , # type: bool
27
- unbuffered_output = False # type: bool
24
+ setup_py_path , # type: str
25
+ global_options = None , # type: Sequence[str]
26
+ no_user_config = False , # type: bool
27
+ unbuffered_output = False # type: bool
28
28
):
29
29
# type: (...) -> List[str]
30
30
"""
@@ -38,12 +38,12 @@ def make_setuptools_shim_args(
38
38
"""
39
39
args = [sys .executable ]
40
40
if unbuffered_output :
41
- args . append ( '-u' )
42
- args . extend ([ '-c' , _SETUPTOOLS_SHIM .format (setup_py_path )])
41
+ args += [ "-u" ]
42
+ args += [ "-c" , _SETUPTOOLS_SHIM .format (setup_py_path )]
43
43
if global_options :
44
- args . extend ( global_options )
44
+ args += global_options
45
45
if no_user_config :
46
- args . append ( ' --no-user-cfg' )
46
+ args += [ " --no-user-cfg" ]
47
47
return args
48
48
49
49
@@ -61,12 +61,12 @@ def make_setuptools_develop_args(
61
61
no_user_config = no_user_config ,
62
62
)
63
63
64
- args . extend ( ["develop" , "--no-deps" ])
64
+ args += ["develop" , "--no-deps" ]
65
65
66
- args . extend ( install_options )
66
+ args += install_options
67
67
68
68
if prefix :
69
- args . extend ( ["--prefix" , prefix ])
69
+ args += ["--prefix" , prefix ]
70
70
71
71
return args
72
72
@@ -77,15 +77,15 @@ def make_setuptools_egg_info_args(
77
77
no_user_config , # type: bool
78
78
):
79
79
# type: (...) -> List[str]
80
- base_cmd = make_setuptools_shim_args (setup_py_path )
80
+ args = make_setuptools_shim_args (setup_py_path )
81
81
if no_user_config :
82
- base_cmd += ["--no-user-cfg" ]
82
+ args += ["--no-user-cfg" ]
83
83
84
- base_cmd += ["egg_info" ]
84
+ args += ["egg_info" ]
85
85
86
- base_cmd += [' --egg-base' , egg_info_dir ]
86
+ args += [" --egg-base" , egg_info_dir ]
87
87
88
- return base_cmd
88
+ return args
89
89
90
90
91
91
def make_setuptools_install_args (
@@ -100,28 +100,28 @@ def make_setuptools_install_args(
100
100
pycompile # type: bool
101
101
):
102
102
# type: (...) -> List[str]
103
- install_args = make_setuptools_shim_args (
103
+ args = make_setuptools_shim_args (
104
104
setup_py_path ,
105
105
global_options = global_options ,
106
106
no_user_config = no_user_config ,
107
107
unbuffered_output = True
108
108
)
109
- install_args += [' install' , ' --record' , record_filename ]
110
- install_args += [' --single-version-externally-managed' ]
109
+ args += [" install" , " --record" , record_filename ]
110
+ args += [" --single-version-externally-managed" ]
111
111
112
112
if root is not None :
113
- install_args += [' --root' , root ]
113
+ args += [" --root" , root ]
114
114
if prefix is not None :
115
- install_args += [' --prefix' , prefix ]
115
+ args += [" --prefix" , prefix ]
116
116
117
117
if pycompile :
118
- install_args += ["--compile" ]
118
+ args += ["--compile" ]
119
119
else :
120
- install_args += ["--no-compile" ]
120
+ args += ["--no-compile" ]
121
121
122
122
if header_dir :
123
- install_args += [' --install-headers' , header_dir ]
123
+ args += [" --install-headers" , header_dir ]
124
124
125
- install_args += install_options
125
+ args += install_options
126
126
127
- return install_args
127
+ return args
0 commit comments