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
This commit is contained in:
robk-org 2007-06-06 12:49:03 -07:00
parent f4c048bbeb
commit 03e9b0d4d7
2 changed files with 7 additions and 5 deletions

View File

@ -15,7 +15,7 @@ This file can also be run as a script to install or upgrade setuptools.
""" """
import sys import sys
DEFAULT_VERSION = "0.6c3" DEFAULT_VERSION = "0.6c5"
DEFAULT_URL = "http://cheeseshop.python.org/packages/%s/s/setuptools/" % sys.version[:3] DEFAULT_URL = "http://cheeseshop.python.org/packages/%s/s/setuptools/" % sys.version[:3]
md5_data = { md5_data = {
@ -58,7 +58,7 @@ def _validate_md5(egg_name, data):
def use_setuptools( 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 """Automatically find/download setuptools and make it available on sys.path
@ -84,7 +84,9 @@ def use_setuptools(
import pkg_resources import pkg_resources
try: try:
pkg_resources.require("setuptools>="+version) if not min_version:
min_version = version
pkg_resources.require("setuptools>="+min_version)
except pkg_resources.VersionConflict, e: except pkg_resources.VersionConflict, e:
# XXX could we install in a subprocess here? # 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" "The required version of setuptools (>=%s) is not available, and\n"
"can't be installed while this script is running. Please install\n" "can't be installed while this script is running. Please install\n"
" a more recent version first.\n\n(Currently using %r)" " a more recent version first.\n\n(Currently using %r)"
) % (version, e.args[0]) ) % (min_version, e.args[0])
sys.exit(2) sys.exit(2)
def download_setuptools( def download_setuptools(

View File

@ -25,7 +25,7 @@
# more details. # more details.
from ez_setup import use_setuptools from ez_setup import use_setuptools
use_setuptools() use_setuptools(min_version='0.6a9')
from setuptools import Extension, find_packages, setup from setuptools import Extension, find_packages, setup