From: robk-org Date: Wed, 6 Jun 2007 19:49:03 +0000 (-0700) Subject: change the 'ez_setup.py' script to have distinct desired & minimum required versions... X-Git-Url: https://git.rkrishnan.org/reedownlee?a=commitdiff_plain;h=03e9b0d4d77ee0aee0de0d6bf9bf17907b0095b6;p=tahoe-lafs%2Ftahoe-lafs.git change the 'ez_setup.py' script to have distinct desired & minimum required versions of setuptools and change zfec/setup.py's invocation of ez_setup to require 0.6a9 (which happens to be the default version installed by apt-get on dapper machines) while leaving the default (desired) version at 0.6c5 --- diff --git a/src/zfec/ez_setup.py b/src/zfec/ez_setup.py index aa877860..d33c823c 100644 --- a/src/zfec/ez_setup.py +++ b/src/zfec/ez_setup.py @@ -15,7 +15,7 @@ This file can also be run as a script to install or upgrade setuptools. """ import sys -DEFAULT_VERSION = "0.6c3" +DEFAULT_VERSION = "0.6c5" DEFAULT_URL = "http://cheeseshop.python.org/packages/%s/s/setuptools/" % sys.version[:3] md5_data = { @@ -58,7 +58,7 @@ def _validate_md5(egg_name, data): def use_setuptools( - version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir + version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, min_version=None ): """Automatically find/download setuptools and make it available on sys.path @@ -84,7 +84,9 @@ def use_setuptools( import pkg_resources try: - pkg_resources.require("setuptools>="+version) + if not min_version: + min_version = version + pkg_resources.require("setuptools>="+min_version) except pkg_resources.VersionConflict, e: # XXX could we install in a subprocess here? @@ -92,7 +94,7 @@ def use_setuptools( "The required version of setuptools (>=%s) is not available, and\n" "can't be installed while this script is running. Please install\n" " a more recent version first.\n\n(Currently using %r)" - ) % (version, e.args[0]) + ) % (min_version, e.args[0]) sys.exit(2) def download_setuptools( diff --git a/src/zfec/setup.py b/src/zfec/setup.py index e04d54c8..80d8b976 100644 --- a/src/zfec/setup.py +++ b/src/zfec/setup.py @@ -25,7 +25,7 @@ # more details. from ez_setup import use_setuptools -use_setuptools() +use_setuptools(min_version='0.6a9') from setuptools import Extension, find_packages, setup