소스 검색

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