diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2017-02-02 11:01:37 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-02-02 11:01:46 -0500 |
commit | 174e84e0ce297c38aa11f6618c7d0dad7f1a5acf (patch) | |
tree | 01e14606ad175aae6e796497eb5b60cbb6e7907a /bootstrap.py | |
parent | c182abae2af4cb5e12bb8200995a0026de07f146 (diff) | |
download | external_python_setuptools-174e84e0ce297c38aa11f6618c7d0dad7f1a5acf.tar.gz external_python_setuptools-174e84e0ce297c38aa11f6618c7d0dad7f1a5acf.tar.bz2 external_python_setuptools-174e84e0ce297c38aa11f6618c7d0dad7f1a5acf.zip |
In bootstrap, defer installation of dependencies if unneeded. Ref #958.
Diffstat (limited to 'bootstrap.py')
-rw-r--r-- | bootstrap.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/bootstrap.py b/bootstrap.py index 2ca678ff..ad9b067e 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -7,7 +7,6 @@ egg-info command to flesh out the egg-info directory. from __future__ import unicode_literals -import argparse import os import io import re @@ -92,16 +91,12 @@ def install_deps(): def main(): - parser = argparse.ArgumentParser(description='bootstrap setuptools') - parser.add_argument( - '--skip-dep-install', action='store_true', - help=("Do not attempt to install setuptools dependencies. These " - "should be provided in the environment in another manner.")) - args = parser.parse_args() ensure_egg_info() - if args.skip_dep_install: + try: + # first assume dependencies are present run_egg_info() - else: + except Exception: + # but if that fails, try again with dependencies just in time with install_deps(): run_egg_info() |