diff carton.py @ 27:dace84448c25

carry carton along with carton
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 10 Jul 2011 18:48:30 -0700
parents e6ee0410ceef
children dabf5e1bdf92
line wrap: on
line diff
--- a/carton.py	Sun Jul 10 18:37:42 2011 -0700
+++ b/carton.py	Sun Jul 10 18:48:30 2011 -0700
@@ -123,22 +123,21 @@
 if os.path.exists(os.path.join(virtualenv_dir, 'setup.py')):
     call([python, 'setup.py', 'install'], cwd=virtualenv_dir, stdout=subprocess.PIPE)
 
-# TODO:
 
-# - add carton to the virtualenv (!)
-# if CARTON:
-#     CARTON = CARTON.decode('base64').decode('zlib')
-#     carton_filename = os.path.join(scripts_dir, 'carton.py')
-#     f = file(carton_filename, 'w')
-#     f.write(CARTON)
-#     f.close()
-#     try:
-#         os.chmod(carton_filename, 0755)
-#     except:
-#         # you probably don't have os.chmod
-#         pass
+# add carton to the virtualenv (!)
+if CARTON:
+    CARTON = CARTON.decode('base64').decode('zlib')
+    carton_filename = os.path.join(scripts_dir, 'carton.py')
+    f = file(carton_filename, 'w')
+    f.write(CARTON)
+    f.close()
+    try:
+        os.chmod(carton_filename, 0755)
+    except:
+        # you probably don't have os.chmod
+        pass
 
-# - cleanup tempdir
+# TODO: cleanup tempdir
 # shutil.rmtree(tempdir)
 """