Browse Source

Instead of making people find and copy sample.conf, provide a command which just echoes it to stdout.

Chris McDonough 17 years ago
parent
commit
2faa5421fb
3 changed files with 31 additions and 3 deletions
  1. 10 3
      setup.py
  2. 21 0
      src/supervisor/confecho.py
  3. 0 0
      src/supervisor/skel/sample.conf

+ 10 - 3
setup.py

@@ -72,9 +72,15 @@ dist = setup(
     package_dir = {'':'src'},
     packages = find_packages(os.path.join(here, 'src')),
     # put data files in egg 'doc' dir
-    data_files=[ ('doc', ['sample.conf', 'README.txt', 'UPGRADING.txt',
-                          'CHANGES.txt', 'TODO.txt', 'LICENSES.txt',
-                          'COPYRIGHT.txt'])],
+    data_files=[ ('doc', [
+        'README.txt',
+        'UPGRADING.txt',
+        'CHANGES.txt',
+        'TODO.txt',
+        'LICENSES.txt',
+        'COPYRIGHT.txt'
+        ]
+    )],
     install_requires = ['medusa >= 0.5.4', 'meld3 >= 0.6.4',
                         'elementtree >= 1.2.6,<1.2.7'],
     extras_require = {'iterparse':['cElementTree >= 1.0.2']},
@@ -88,6 +94,7 @@ dist = setup(
      'console_scripts': [
          'supervisord = supervisor.supervisord:main',
          'supervisorctl = supervisor.supervisorctl:main',
+         'echo_supervisord_conf = supervisor.confecho:main',
          ],
       },
     )

+ 21 - 0
src/supervisor/confecho.py

@@ -0,0 +1,21 @@
+##############################################################################
+#
+# Copyright (c) 2007 Agendaless Consulting and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the BSD-like license at
+# http://www.repoze.org/LICENSE.txt.  A copy of the license should accompany
+# this distribution.  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL
+# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND
+# FITNESS FOR A PARTICULAR PURPOSE
+#
+##############################################################################
+
+import pkg_resources
+
+def main():
+    config = pkg_resources.resource_string(__name__, 'skel/sample.conf')
+    print config
+    
+    

sample.conf → src/supervisor/skel/sample.conf