瀏覽代碼

setup.py now removes old celery.app.task package (which is now a module)

Ask Solem 13 年之前
父節點
當前提交
93c2a040f7
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      setup.py

+ 6 - 2
setup.py

@@ -22,11 +22,15 @@ NAME = "celery"
 entrypoints = {}
 extra = {}
 
-print("CALLING SETUP.PY")
 try:
     from celery.app import task
     if "__init__.py" in task.__file__:
-        os.unlink(os.path.abspath(task.__file__))
+        print("- force upgrading previous installation")
+        print("  - removing celery.app.task package...")
+        try:
+            os.unlink(os.path.abspath(task.__file__))
+        except Exception, exc:
+            sys.stderr.write("Couldn't remove %r: %r\n" % (task.__file__, exc))
 except ImportError:
     pass