(argv=None)
| 204 | |
| 205 | |
| 206 | def _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, |
nothing calls this directly
no test coverage detected