From 93e1f832ffe823545e87b4318d126e3178141058 Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Thu, 4 Oct 2007 13:09:20 -0700 Subject: [PATCH] setup: patch to fix bug in our latest ez_setup.py if pkg_resources can't be imported --- ez_setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ez_setup.py b/ez_setup.py index a14f7350..26d48220 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -48,7 +48,11 @@ def setuptools_is_new_enough(required_version): """Return True if setuptools is already installed and has a version number >= required_version.""" verstr = get_setuptools_version() - import pkg_resources + try: + import pkg_resources + except ImportError: + # Well then I guess it is definitely not new enough. + return False try: ver = pkg_resources.parse_version(verstr) newenough = ver and ver >= pkg_resources.parse_version(required_version) -- 2.45.2