Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Upgrade our version of ez_setup.py.

Our version of ez_setup.py was too old, pointing to an unavailable
version of setuptools.

Fixes bug #1849
  • Loading branch information...
commit ea2bdc75d9562a1f04d6cf9a090592cf3b2ed53c 1 parent 1141d1e
Christian Hammond authored February 06, 2011

Showing 1 changed file with 20 additions and 8 deletions. Show diff stats Hide diff stats

  1. 28  ez_setup.py
28  ez_setup.py
@@ -14,7 +14,7 @@
14 14
 This file can also be run as a script to install or upgrade setuptools.
15 15
 """
16 16
 import sys
17  
-DEFAULT_VERSION = "0.6c8"
  17
+DEFAULT_VERSION = "0.6c11"
18 18
 DEFAULT_URL     = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3]
19 19
 
20 20
 md5_data = {
@@ -28,6 +28,14 @@
28 28
     'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4',
29 29
     'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c',
30 30
     'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b',
  31
+    'setuptools-0.6c10-py2.3.egg': 'ce1e2ab5d3a0256456d9fc13800a7090',
  32
+    'setuptools-0.6c10-py2.4.egg': '57d6d9d6e9b80772c59a53a8433a5dd4',
  33
+    'setuptools-0.6c10-py2.5.egg': 'de46ac8b1c97c895572e5e8596aeb8c7',
  34
+    'setuptools-0.6c10-py2.6.egg': '58ea40aef06da02ce641495523a0b7f5',
  35
+    'setuptools-0.6c11-py2.3.egg': '2baeac6e13d414a9d28e7ba5b5a596de',
  36
+    'setuptools-0.6c11-py2.4.egg': 'bd639f9b0eac4c42497034dec2ec0c2b',
  37
+    'setuptools-0.6c11-py2.5.egg': '64c94f3bf7a72a13ec83e0b24f2749b2',
  38
+    'setuptools-0.6c11-py2.6.egg': 'bfa92100bd772d5a213eedd356d64086',
31 39
     'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27',
32 40
     'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277',
33 41
     'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa',
@@ -48,13 +56,18 @@
48 56
     'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902',
49 57
     'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de',
50 58
     'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b',
  59
+    'setuptools-0.6c9-py2.3.egg': 'a83c4020414807b496e4cfbe08507c03',
  60
+    'setuptools-0.6c9-py2.4.egg': '260a2be2e5388d66bdaee06abec6342a',
  61
+    'setuptools-0.6c9-py2.5.egg': 'fe67c3e5a17b12c0e7c541b7ea43a8e6',
  62
+    'setuptools-0.6c9-py2.6.egg': 'ca37b1ff16fa2ede6e19383e7b59245a',
51 63
 }
52 64
 
53 65
 import sys, os
  66
+try: from hashlib import md5
  67
+except ImportError: from md5 import md5
54 68
 
55 69
 def _validate_md5(egg_name, data):
56 70
     if egg_name in md5_data:
57  
-        from md5 import md5
58 71
         digest = md5(data).hexdigest()
59 72
         if digest != md5_data[egg_name]:
60 73
             print >>sys.stderr, (
@@ -64,7 +77,6 @@ def _validate_md5(egg_name, data):
64 77
             sys.exit(2)
65 78
     return data
66 79
 
67  
-
68 80
 def use_setuptools(
69 81
     version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
70 82
     download_delay=15
@@ -100,11 +112,11 @@ def do_download():
100 112
             "\n\n(Currently using %r)"
101 113
             ) % (version, e.args[0])
102 114
             sys.exit(2)
103  
-        else:
104  
-            del pkg_resources, sys.modules['pkg_resources']    # reload ok
105  
-            return do_download()
106 115
     except pkg_resources.DistributionNotFound:
107  
-        return do_download()
  116
+        pass
  117
+
  118
+    del pkg_resources, sys.modules['pkg_resources']    # reload ok
  119
+    return do_download()
108 120
 
109 121
 def download_setuptools(
110 122
     version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
@@ -233,7 +245,6 @@ def update_md5(filenames):
233 245
     """Update our built-in md5 registry"""
234 246
 
235 247
     import re
236  
-    from md5 import md5
237 248
 
238 249
     for name in filenames:
239 250
         base = os.path.basename(name)
@@ -270,3 +281,4 @@ def update_md5(filenames):
270 281
 
271 282
 
272 283
 
  284
+

0 notes on commit ea2bdc7

Please sign in to comment.
Something went wrong with that request. Please try again.