changeset 31:0b82d012e42c

Add thin script shells around master and slave.
author cmlenz
date Sun, 19 Jun 2005 23:26:08 +0000
parents 75ad81953032
children 21c52720ed32
files bitten/master.py bitten/slave.py scripts/bitten scripts/bittend setup.cfg setup.py
diffstat 6 files changed, 67 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bitten/master.py
+++ b/bitten/master.py
@@ -88,7 +88,7 @@
                          self.slave_name, platform, os, os_version, os_family)
 
 
-if __name__ == '__main__':
+def main():
     from optparse import OptionParser
 
     parser = OptionParser(usage='usage: %prog [options] env-path',
@@ -130,3 +130,6 @@
         master.run()
     except KeyboardInterrupt:
         pass
+
+if __name__ == '__main__':
+    main()
\ No newline at end of file
--- a/bitten/slave.py
+++ b/bitten/slave.py
@@ -67,7 +67,7 @@
         pass
 
 
-if __name__ == '__main__':
+def main():
     from optparse import OptionParser
 
     parser = OptionParser(usage='usage: %prog [options] host [port]',
@@ -97,3 +97,6 @@
 
     slave = Slave(host, port)
     slave.run()
+
+if __name__ == '__main__':
+    main()
\ No newline at end of file
new file mode 100755
--- /dev/null
+++ b/scripts/bitten
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+# -*- coding: iso8859-1 -*-
+#
+# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
+#
+# Bitten is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# Trac is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# Author: Christopher Lenz <cmlenz@gmx.de>
+
+import logging
+from optparse import OptionParser
+
+from bitten import slave
+
+slave.main()
new file mode 100755
--- /dev/null
+++ b/scripts/bittend
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+# -*- coding: iso8859-1 -*-
+#
+# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
+#
+# Bitten is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# Trac is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# Author: Christopher Lenz <cmlenz@gmx.de>
+
+import logging
+from optparse import OptionParser
+import socket
+
+from bitten import master
+
+master.main()
\ No newline at end of file
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,3 +1,6 @@
+[sdist]
+formats = bztar, gztar, zip
+
 [unittest]
 test-suite = bitten.tests
 xml-results = build/test-results.xml
--- a/setup.py
+++ b/setup.py
@@ -26,5 +26,6 @@
 
 setup(name='bitten', version=VERSION,
       packages=['bitten', 'bitten.build', 'bitten.util'],
+      scripts=['scripts/bitten', 'scripts/bittend'],
       author="Christopher Lenz", author_email="cmlenz@gmx.de",
       url="http://bitten.cmlenz.net/", cmdclass={'unittest': unittest})
Copyright (C) 2012-2017 Edgewall Software