Commits

J.A. Roberts Tunney committed 29e04ef

fuck it! we'll just download the image if setuptools won't include it

Comments (0)

Files changed (3)

 If you want to use setuptools in your package's setup.py, just include this
 file in the same directory with it, and add this to the top of your setup.py::
 
-    from ez_setup import use_setuptools
-    use_setuptools()
+from ez_setup import use_setuptools
+use_setuptools()
 
 If you want to require a specific version of setuptools, set a download
 mirror, or use an alternate download directory, you can do so by supplying
 This file can also be run as a script to install or upgrade setuptools.
 """
 import sys
-DEFAULT_VERSION = "0.6c9"
+DEFAULT_VERSION = "0.6c11"
 DEFAULT_URL     = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3]
 
 md5_data = {
     'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4',
     'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c',
     'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b',
+    'setuptools-0.6c10-py2.3.egg': 'ce1e2ab5d3a0256456d9fc13800a7090',
+    'setuptools-0.6c10-py2.4.egg': '57d6d9d6e9b80772c59a53a8433a5dd4',
+    'setuptools-0.6c10-py2.5.egg': 'de46ac8b1c97c895572e5e8596aeb8c7',
+    'setuptools-0.6c10-py2.6.egg': '58ea40aef06da02ce641495523a0b7f5',
+    'setuptools-0.6c11-py2.3.egg': '2baeac6e13d414a9d28e7ba5b5a596de',
+    'setuptools-0.6c11-py2.4.egg': 'bd639f9b0eac4c42497034dec2ec0c2b',
+    'setuptools-0.6c11-py2.5.egg': '64c94f3bf7a72a13ec83e0b24f2749b2',
+    'setuptools-0.6c11-py2.6.egg': 'bfa92100bd772d5a213eedd356d64086',
     'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27',
     'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277',
     'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa',
     'setuptools-0.6c9-py2.4.egg': '260a2be2e5388d66bdaee06abec6342a',
     'setuptools-0.6c9-py2.5.egg': 'fe67c3e5a17b12c0e7c541b7ea43a8e6',
     'setuptools-0.6c9-py2.6.egg': 'ca37b1ff16fa2ede6e19383e7b59245a',
-}
+    }
 
 import sys, os
 try: from hashlib import md5
             print >>sys.stderr, (
                 "md5 validation of %s failed!  (Possible download problem?)"
                 % egg_name
-            )
+                )
             sys.exit(2)
     return data
 
 def use_setuptools(
     version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
     download_delay=15
-):
+    ):
     """Automatically find/download setuptools and make it available on sys.path
 
     `version` should be a valid setuptools version number that is available
     except pkg_resources.VersionConflict, e:
         if was_imported:
             print >>sys.stderr, (
-            "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, using 'easy_install -U setuptools'."
-            "\n\n(Currently using %r)"
-            ) % (version, e.args[0])
+                "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, using 'easy_install -U setuptools'."
+                "\n\n(Currently using %r)"
+                ) % (version, e.args[0])
             sys.exit(2)
         else:
             del pkg_resources, sys.modules['pkg_resources']    # reload ok
 def download_setuptools(
     version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
     delay = 15
-):
+    ):
     """Download setuptools from a specified location and return its filename
 
     `version` should be a valid setuptools version number that is available
 
 and place it in this directory before rerunning this script.)
 ---------------------------------------------------------------------------""",
-                    version, download_base, delay, url
-                ); from time import sleep; sleep(delay)
+                         version, download_base, delay, url
+                         ); from time import sleep; sleep(delay)
             log.warn("Downloading %s", url)
             src = urllib2.urlopen(url)
             # Read/write all in one block, so we don't create a corrupt file
     else:
         if setuptools.__version__ == '0.0.1':
             print >>sys.stderr, (
-            "You have an obsolete version of setuptools installed.  Please\n"
-            "remove it from your system entirely before rerunning this script."
-            )
+                "You have an obsolete version of setuptools installed.  Please\n"
+                "remove it from your system entirely before rerunning this script."
+                )
             sys.exit(2)
 
     req = "setuptools>="+version
 
 
 
-
     balls = 'balls.png'
     fabdir = os.path.dirname(fabulous.__file__)
 
-    print os.path.join(fabdir, 'balls.png')
     for fn in ['balls.png',
                'fabulous/balls.png',
                os.path.join(fabdir, 'balls.png')]:
             balls = fn
             break
 
+    if not os.path.exists(balls):
+        import urllib
+        ugh = urllib.urlopen('http://lobstertech.com/media/img/balls.png')
+        open('balls.png', 'w').write(ugh.read())
+        balls = 'balls.png'
+
     for line in image.Image(balls):
         print line
     wait()
 # http://pypi.python.org/pypi?:action=list_classifiers
 
 from ez_setup import use_setuptools
-use_setuptools(version='0.6c9')
+use_setuptools(version='0.6c11')
 
 import os
 from setuptools import setup, find_packages
     packages             = find_packages(),
     zip_safe             = False,
     include_package_data = True,
-    package_data         = {
-        'fabulous': ['*.png', '*.otf', '*.ttf'],
-    },
     classifiers = [
         "Development Status :: 2 - Pre-Alpha",
         "License :: OSI Approved :: MIT License",
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.