MCPcopy Index your code
hub / github.com/RustPython/RustPython / _main

Function _main

Lib/ensurepip/__init__.py:206–264  ·  view source on GitHub ↗
(argv=None)

Source from the content-addressed store, hash-verified

204
205
206def _main(argv=None):
207 import argparse
208 parser = argparse.ArgumentParser(color=True)
209 parser.add_argument(
210 "--version",
211 action="version",
212 version="pip {}".format(version()),
213 help="Show the version of pip that is bundled with this Python.",
214 )
215 parser.add_argument(
216 "-v", "--verbose",
217 action="count",
218 default=0,
219 dest="verbosity",
220 help=("Give more output. Option is additive, and can be used up to 3 "
221 "times."),
222 )
223 parser.add_argument(
224 "-U", "--upgrade",
225 action="store_true",
226 default=False,
227 help="Upgrade pip and dependencies, even if already installed.",
228 )
229 parser.add_argument(
230 "--user",
231 action="store_true",
232 default=False,
233 help="Install using the user scheme.",
234 )
235 parser.add_argument(
236 "--root",
237 default=None,
238 help="Install everything relative to this alternate root directory.",
239 )
240 parser.add_argument(
241 "--altinstall",
242 action="store_true",
243 default=False,
244 help=("Make an alternate install, installing only the X.Y versioned "
245 "scripts (Default: pipX, pipX.Y)."),
246 )
247 parser.add_argument(
248 "--default-pip",
249 action="store_true",
250 default=False,
251 help=("Make a default pip install, installing the unqualified pip "
252 "in addition to the versioned scripts."),
253 )
254
255 args = parser.parse_args(argv)
256
257 return _bootstrap(
258 root=args.root,
259 upgrade=args.upgrade,
260 user=args.user,
261 verbosity=args.verbosity,
262 altinstall=args.altinstall,
263 default_pip=args.default_pip,

Callers

nothing calls this directly

Calls 5

parse_argsMethod · 0.95
_bootstrapFunction · 0.85
versionFunction · 0.70
add_argumentMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected