MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _main

Function _main

tools/python-3.11.9-amd64/Lib/ensurepip/__init__.py:235–293  ·  view source on GitHub ↗
(argv=None)

Source from the content-addressed store, hash-verified

233
234
235def _main(argv=None):
236 import argparse
237 parser = argparse.ArgumentParser(prog="python -m ensurepip")
238 parser.add_argument(
239 "--version",
240 action="version",
241 version="pip {}".format(version()),
242 help="Show the version of pip that is bundled with this Python.",
243 )
244 parser.add_argument(
245 "-v", "--verbose",
246 action="count",
247 default=0,
248 dest="verbosity",
249 help=("Give more output. Option is additive, and can be used up to 3 "
250 "times."),
251 )
252 parser.add_argument(
253 "-U", "--upgrade",
254 action="store_true",
255 default=False,
256 help="Upgrade pip and dependencies, even if already installed.",
257 )
258 parser.add_argument(
259 "--user",
260 action="store_true",
261 default=False,
262 help="Install using the user scheme.",
263 )
264 parser.add_argument(
265 "--root",
266 default=None,
267 help="Install everything relative to this alternate root directory.",
268 )
269 parser.add_argument(
270 "--altinstall",
271 action="store_true",
272 default=False,
273 help=("Make an alternate install, installing only the X.Y versioned "
274 "scripts (Default: pipX, pipX.Y, easy_install-X.Y)."),
275 )
276 parser.add_argument(
277 "--default-pip",
278 action="store_true",
279 default=False,
280 help=("Make a default pip install, installing the unqualified pip "
281 "and easy_install in addition to the versioned scripts."),
282 )
283
284 args = parser.parse_args(argv)
285
286 return _bootstrap(
287 root=args.root,
288 upgrade=args.upgrade,
289 user=args.user,
290 verbosity=args.verbosity,
291 altinstall=args.altinstall,
292 default_pip=args.default_pip,

Callers 1

__main__.pyFile · 0.50

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