comparison env/lib/python3.9/site-packages/pip/_internal/operations/install/editable_legacy.py @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4f3585e2f14b
1 """Legacy editable installation process, i.e. `setup.py develop`.
2 """
3 import logging
4
5 from pip._internal.utils.logging import indent_log
6 from pip._internal.utils.setuptools_build import make_setuptools_develop_args
7 from pip._internal.utils.subprocess import call_subprocess
8 from pip._internal.utils.typing import MYPY_CHECK_RUNNING
9
10 if MYPY_CHECK_RUNNING:
11 from typing import List, Optional, Sequence
12
13 from pip._internal.build_env import BuildEnvironment
14
15
16 logger = logging.getLogger(__name__)
17
18
19 def install_editable(
20 install_options, # type: List[str]
21 global_options, # type: Sequence[str]
22 prefix, # type: Optional[str]
23 home, # type: Optional[str]
24 use_user_site, # type: bool
25 name, # type: str
26 setup_py_path, # type: str
27 isolated, # type: bool
28 build_env, # type: BuildEnvironment
29 unpacked_source_directory, # type: str
30 ):
31 # type: (...) -> None
32 """Install a package in editable mode. Most arguments are pass-through
33 to setuptools.
34 """
35 logger.info('Running setup.py develop for %s', name)
36
37 args = make_setuptools_develop_args(
38 setup_py_path,
39 global_options=global_options,
40 install_options=install_options,
41 no_user_config=isolated,
42 prefix=prefix,
43 home=home,
44 use_user_site=use_user_site,
45 )
46
47 with indent_log():
48 with build_env:
49 call_subprocess(
50 args,
51 cwd=unpacked_source_directory,
52 )