From: Zooko O'Whielacronx Date: Thu, 4 Oct 2007 20:09:20 +0000 (-0700) Subject: setup: patch to fix bug in our latest ez_setup.py if pkg_resources can't be imported X-Git-Tag: allmydata-tahoe-0.6.1~56 X-Git-Url: https://git.rkrishnan.org/vdrive//%22news.html/%22?a=commitdiff_plain;h=93e1f832ffe823545e87b4318d126e3178141058;p=tahoe-lafs%2Ftahoe-lafs.git setup: patch to fix bug in our latest ez_setup.py if pkg_resources can't be imported --- 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)