1. Tarek Ziadé
  2. pep345demo

Commits

tarek  committed dfe908b

fixed the forbidden access problem

  • Participants
  • Parent commits 0fca6d7
  • Branches default

Comments (0)

Files changed (2)

File bootstrap.py

View file
 import time
 import fnmatch
 from distutils import log
+from distutils.errors import DistutilsError
 
 is_jython = sys.platform.startswith('java')
 if is_jython:
 
 DEFAULT_VERSION = "0.6"
 #DEFAULT_URL     = "http://pypi.python.org/packages/%s/d/distribute/" % sys.version[:3]
-DEFAULT_URL     = "http://bitbucket.org/tarek/distribute/downloads/"
+DEFAULT_URL     = "http://nightly.ziade.org/"
 
 md5_data = {
     'distribute-0.6-py2.3.egg': '83789f9a3b2f32c7088065f6fd3de930',
                 )
                 sys.exit(2)
             from setuptools.command import easy_install
-            return easy_install.main(list(argv)+['-v']+[egg])
+            try:
+                return easy_install.main(list(argv)+['-v']+[egg])
+            except DistutilsError:
+                return sys.exit(2)
         finally:
             if egg and os.path.exists(egg):
                 os.unlink(egg)

File tests/install_test.py

View file
 # running it
 args = [sys.executable]  + ['bootstrap.py']
 if is_jython:
-    subprocess.Popen([sys.executable] + args).wait()
+    res = subprocess.call([sys.executable] + args)
 else:
-    os.spawnv(os.P_WAIT, sys.executable, args)
+    res = os.spawnv(os.P_WAIT, sys.executable, args)
+
+if res != 0:
+    print '**** Test failed, please send me the output at tarek@ziade.org'
+    os.remove('bootstrap.py')
+    sys.exit(2)
 
 # now checking if Distribute is installed
 script = """\
     f.close()
 
 try:
-    args = [sys.executable]  + ['script.py']
+    args = [sys.executable]  + [script_name]
     if is_jython:
         res = subprocess.call([sys.executable] + args)
     else: