"""Legacy editable installation process, i.e. `setup.py develop`.
"""importloggingfromtypingimportOptional,Sequencefrompip._internal.build_envimportBuildEnvironmentfrompip._internal.utils.loggingimportindent_logfrompip._internal.utils.setuptools_buildimportmake_setuptools_develop_argsfrompip._internal.utils.subprocessimportcall_subprocesslogger=logging.getLogger(__name__)definstall_editable(
*,global_options:Sequence[str],prefix:Optional[str],home:Optional[str],use_user_site:bool,name:str,setup_py_path:str,isolated:bool,build_env:BuildEnvironment,unpacked_source_directory:str,)->None:"""Install a package in editable mode. Most arguments are pass-through
to setuptools.
"""logger.info("Running setup.py develop for %s",name)args=make_setuptools_develop_args(setup_py_path,global_options=global_options,no_user_config=isolated,prefix=prefix,home=home,use_user_site=use_user_site,)withindent_log():withbuild_env:call_subprocess(args,command_desc="python setup.py develop",cwd=unpacked_source_directory,)