From: robk-org Date: Wed, 6 Jun 2007 19:49:03 +0000 (+0530) Subject: change the 'ez_setup.py' script to have distinct desired & minimum required versions... X-Git-Url: https://git.rkrishnan.org/about.html?a=commitdiff_plain;h=8ebc84ac7605350ac5459eaedf402b38a932ea42;p=tahoe-lafs%2Fzfec.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 darcs-hash:90f9f375e316df0fb43d3cb656ffbdae1a7b3ae2 --- diff --git a/zfec/ez_setup.py b/zfec/ez_setup.py index aa87786..d33c823 100755 --- a/zfec/ez_setup.py +++ b/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/zfec/setup.py b/zfec/setup.py index e04d54c..80d8b97 100755 --- a/zfec/setup.py +++ b/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