From 174e84e0ce297c38aa11f6618c7d0dad7f1a5acf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Feb 2017 11:01:37 -0500 Subject: In bootstrap, defer installation of dependencies if unneeded. Ref #958. --- bootstrap.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'bootstrap.py') 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() -- cgit v1.2.1