Skip to content

Commit

Permalink
Normalize style
Browse files Browse the repository at this point in the history
  • Loading branch information
chrahunt committed Oct 12, 2019
1 parent f00d7a1 commit 8af0dc2
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions src/pip/_internal/utils/setuptools_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@


def make_setuptools_shim_args(
setup_py_path, # type: str
global_options=None, # type: Sequence[str]
no_user_config=False, # type: bool
unbuffered_output=False # type: bool
setup_py_path, # type: str
global_options=None, # type: Sequence[str]
no_user_config=False, # type: bool
unbuffered_output=False # type: bool
):
# type: (...) -> List[str]
"""
Expand All @@ -38,12 +38,12 @@ def make_setuptools_shim_args(
"""
args = [sys.executable]
if unbuffered_output:
args.append('-u')
args.extend(['-c', _SETUPTOOLS_SHIM.format(setup_py_path)])
args += ["-u"]
args += ["-c", _SETUPTOOLS_SHIM.format(setup_py_path)]
if global_options:
args.extend(global_options)
args += global_options
if no_user_config:
args.append('--no-user-cfg')
args += ["--no-user-cfg"]
return args


Expand All @@ -61,12 +61,12 @@ def make_setuptools_develop_args(
no_user_config=no_user_config,
)

args.extend(["develop", "--no-deps"])
args += ["develop", "--no-deps"]

args.extend(install_options)
args += install_options

if prefix:
args.extend(["--prefix", prefix])
args += ["--prefix", prefix]

return args

Expand All @@ -77,16 +77,16 @@ def make_setuptools_egg_info_args(
no_user_config, # type: bool
):
# type: (...) -> List[str]
base_cmd = make_setuptools_shim_args(setup_py_path)
args = make_setuptools_shim_args(setup_py_path)
if no_user_config:
base_cmd += ["--no-user-cfg"]
args += ["--no-user-cfg"]

base_cmd += ["egg_info"]
args += ["egg_info"]

if egg_info_dir:
base_cmd += ['--egg-base', egg_info_dir]
args += ["--egg-base", egg_info_dir]

return base_cmd
return args


def make_setuptools_install_args(
Expand All @@ -101,28 +101,28 @@ def make_setuptools_install_args(
pycompile # type: bool
):
# type: (...) -> List[str]
install_args = make_setuptools_shim_args(
args = make_setuptools_shim_args(
setup_py_path,
global_options=global_options,
no_user_config=no_user_config,
unbuffered_output=True
)
install_args += ['install', '--record', record_filename]
install_args += ['--single-version-externally-managed']
args += ["install", "--record", record_filename]
args += ["--single-version-externally-managed"]

if root is not None:
install_args += ['--root', root]
args += ["--root", root]
if prefix is not None:
install_args += ['--prefix', prefix]
args += ["--prefix", prefix]

if pycompile:
install_args += ["--compile"]
args += ["--compile"]
else:
install_args += ["--no-compile"]
args += ["--no-compile"]

if header_dir:
install_args += ['--install-headers', header_dir]
args += ["--install-headers", header_dir]

install_args += install_options
args += install_options

return install_args
return args

0 comments on commit 8af0dc2

Please sign in to comment.