Browse Source

Added setup.py upgrade

Ask Solem 14 years ago
parent
commit
401a4f9daf
1 changed files with 18 additions and 2 deletions
  1. 18 2
      setup.py

+ 18 - 2
setup.py

@@ -98,7 +98,20 @@ class quicktest(mytest):
         mytest.run(self, *args, **kwargs)
 
 
-class upgrade(install):
+class upgrade(Command):
+    user_options = []
+
+    def run(self, *args, **kwargs):
+        Upgrade().run()
+
+    def initialize_options(self):
+        pass
+
+    def finalize_options(self):
+        pass
+
+
+def upgrade_and_install(install):
 
     def run(self, *args, **kwargs):
         Upgrade().run()
@@ -147,7 +160,10 @@ setup(
     zip_safe=False,
     install_requires=install_requires,
     tests_require=['nose', 'nose-cover3', 'unittest2', 'simplejson'],
-    cmdclass={"install": upgrade, "test": mytest, "quicktest": quicktest},
+    cmdclass={"install": upgrade_and_install,
+              "upgrade": upgrade,
+              "test": mytest,
+              "quicktest": quicktest},
     test_suite="nose.collector",
     classifiers=[
         "Development Status :: 5 - Production/Stable",