Browse Source

finally add prototype for installing man pages

this this is seriously not documented,
credit to
http://www.niteoweb.com/blog/setuptools-run-custom-code-during-installing
oz123 11 năm trước cách đây
mục cha
commit
6c258a1bc4
1 tập tin đã thay đổi với 9 bổ sung1 xóa
  1. 9 1
      setup.py

+ 9 - 1
setup.py

@@ -32,6 +32,13 @@ class PyCryptoInstallCommand(install):
                    'to install pycrypto ...'))
 
 
+class CustomInstallCommand(install):
+    """Customized setuptools install command - prints a friendly greeting."""
+    def run(self):
+        print "Hello, developer, how are you? :)"
+        install.run(self)
+        print "Hello, developer, how are you? :)"
+
 setup(name=pwman.appname,
       version=pwman.version,
       description=pwman.description,
@@ -62,6 +69,7 @@ setup(name=pwman.appname,
           'Programming Language :: Python :: 2.7'
       ],
       test_suite='pwman.tests.suite',
-      cmdclass={'install_pycrypto': PyCryptoInstallCommand},
+      cmdclass={'install': CustomInstallCommand,
+                'install_pycrypto': PyCryptoInstallCommand},
 
       )