Преглед изворни кода

- The 'supervisorctl' and 'supervisord' wrapper scripts were disused
in favor of using setuptools' 'console_scripts' entry point settings.

- Documentation files and the sample configuration file are put into
the generated supervisor egg's 'doc' directory.

Chris McDonough пре 18 година
родитељ
комит
e147690aec
7 измењених фајлова са 26 додато и 26 уклоњено
  1. 6 0
      CHANGES.txt
  2. 7 6
      README.txt
  3. 0 3
      TODO.txt
  4. 11 2
      setup.py
  5. 0 7
      src/supervisor/supervisorctl
  6. 0 7
      src/supervisor/supervisord
  7. 2 1
      src/supervisor/tests/base.py

+ 6 - 0
CHANGES.txt

@@ -53,6 +53,12 @@
     the "assertTrue" and "assertFalse" methods of unittest.TestCase
     the "assertTrue" and "assertFalse" methods of unittest.TestCase
     didn't exist in those versions.
     didn't exist in those versions.
 
 
+  - The 'supervisorctl' and 'supervisord' wrapper scripts were disused
+    in favor of using setuptools' 'console_scripts' entry point settings.
+
+  - Documentation files and the sample configuration file are put into
+    the generated supervisor egg's 'doc' directory.
+
 3.0a1
 3.0a1
 
 
   - Default config file comment documented 10 secs as default for
   - Default config file comment documented 10 secs as default for

+ 7 - 6
README.txt

@@ -94,12 +94,13 @@ Installing
   Run "python setup.py install".  This will download and install all
   Run "python setup.py install".  This will download and install all
   distributions depended upon by supervisor and finally install
   distributions depended upon by supervisor and finally install
   supervisor itself.  Once that's done, copy the "sample.conf" file
   supervisor itself.  Once that's done, copy the "sample.conf" file
-  you'll find in the same directory as this file to
-  /etc/supervisord.conf and modify to your liking.  If you'd rather
-  not put the supervisord.conf file in /etc, you can place it anywhere
-  and start supervisord and point it at the configuration file via the
-  -c flag, e.g. "python supervisord.py -c /path/to/sample/conf" or, if
-  you use the shell script named "supervisord", "supervisord -c
+  you'll find in the same directory as this file (or within the
+  installed supervisor egg's 'doc' directory) to /etc/supervisord.conf
+  and modify to your liking.  If you'd rather not put the
+  supervisord.conf file in /etc, you can place it anywhere and start
+  supervisord and point it at the configuration file via the -c flag,
+  e.g. "python supervisord.py -c /path/to/sample/conf" or, if you use
+  the shell script named "supervisord", "supervisord -c
   /path/to/sample.conf".
   /path/to/sample.conf".
 
 
   If your system does not have a C compiler, or you don't have
   If your system does not have a C compiler, or you don't have

+ 0 - 3
TODO.txt

@@ -12,9 +12,6 @@
    - When we try to kill a process and the os.kill command raises an
    - When we try to kill a process and the os.kill command raises an
      exception (stopProcess)
      exception (stopProcess)
 
 
-- Figure out how to make sample.conf evident when supervisor is installed
-  via easy_install.
-
 - Support stopping and starting groups in supervisorctl / web
 - Support stopping and starting groups in supervisorctl / web
   interface.
   interface.
 
 

+ 11 - 2
setup.py

@@ -14,7 +14,6 @@
 
 
 __revision__ = '$Id$'
 __revision__ = '$Id$'
 
 
-
 import urllib
 import urllib
 import urllib2
 import urllib2
 if not hasattr(urllib2, 'splituser'):
 if not hasattr(urllib2, 'splituser'):
@@ -73,11 +72,21 @@ dist = setup(
     maintainer_email = "chrism@plope.com",
     maintainer_email = "chrism@plope.com",
     package_dir = {'':'src'},
     package_dir = {'':'src'},
     packages = find_packages(os.path.join(here, 'src')),
     packages = find_packages(os.path.join(here, 'src')),
-    scripts=['src/supervisor/supervisord', 'src/supervisor/supervisorctl'],
+    # put data files in egg 'doc' dir
+    data_files=[ ('doc', ['sample.conf', 'README.txt', 'UPGRADING.txt',
+                          'CHANGES.txt', 'TODO.txt', 'LICENSES.txt',
+                          'COPYRIGHT.txt'])],
     install_requires = ['medusa >= 0.5.4', 'meld3 >= 0.6.1',
     install_requires = ['medusa >= 0.5.4', 'meld3 >= 0.6.1',
                         'elementtree >= 1.2.6'],
                         'elementtree >= 1.2.6'],
     include_package_data = True,
     include_package_data = True,
     zip_safe = False,
     zip_safe = False,
     namespace_packages = ['supervisor'],
     namespace_packages = ['supervisor'],
     test_suite = "supervisor.tests",
     test_suite = "supervisor.tests",
+    entry_points = {
+     'supervisor_rpc':['main = supervisor.rpcinterface:make_main_rpcinterface'],
+     'console_scripts': [
+         'supervisord = supervisor.supervisord:main',
+         'supervisorctl = supervisor.supervisorctl:main',
+         ],
+      },
     )
     )

+ 0 - 7
src/supervisor/supervisorctl

@@ -1,7 +0,0 @@
-#!/usr/bin/python
-from supervisor.supervisorctl import main
-
-# __doc__ required to make supervisorctl -h work
-from supervisor.supervisorctl import __doc__
-main()
-

+ 0 - 7
src/supervisor/supervisord

@@ -1,7 +0,0 @@
-#!/usr/bin/python
-from supervisor.supervisord import main
-
-# __doc__ required to make supervisord -h work
-from supervisor.supervisord import __doc__
-main()
-

+ 2 - 1
src/supervisor/tests/base.py

@@ -70,8 +70,9 @@ class DummyOptions:
         logger.args = args, kw
         logger.args = args, kw
         return logger
         return logger
 
 
-    def realize(self, args):
+    def realize(self, args, **kw):
         self.realizeargs = args
         self.realizeargs = args
+        self.realizekw = kw
 
 
     def cleanup_fds(self):
     def cleanup_fds(self):
         self.fds_cleaned_up = True
         self.fds_cleaned_up = True