[Zope3-checkins] SVN: Zope3/branches/Zope-3.1/bin/mkzeoinstance Proper ZEO instance creation script; modelled after bin/mkzopeinstance.

Philipp von Weitershausen philikon at philikon.de
Thu Aug 4 09:14:46 EDT 2005


Log message for revision 37694:
  Proper ZEO instance creation script; modelled after bin/mkzopeinstance.
  

Changed:
  A   Zope3/branches/Zope-3.1/bin/mkzeoinstance

-=-
Copied: Zope3/branches/Zope-3.1/bin/mkzeoinstance (from rev 37610, Zope3/branches/Zope-3.1/bin/mkzopeinstance)
===================================================================
--- Zope3/branches/Zope-3.1/bin/mkzopeinstance	2005-07-31 09:23:22 UTC (rev 37610)
+++ Zope3/branches/Zope-3.1/bin/mkzeoinstance	2005-08-04 13:14:45 UTC (rev 37694)
@@ -0,0 +1,38 @@
+#!/usr/bin/env python2.3
+##############################################################################
+#
+# Copyright (c) 2005 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL 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.
+#
+##############################################################################
+"""Script to create a new ZEO instance home.
+
+$Id$
+"""
+
+import os
+import sys
+
+here = os.path.dirname(os.path.realpath(__file__))
+swhome = os.path.dirname(here)
+
+for parts in [("src",), ("lib", "python"), ("Lib", "site-packages")]:
+    d = os.path.join(swhome, *(parts + ("ZEO",)))
+    if os.path.isdir(d):
+        d = os.path.join(swhome, *parts)
+        sys.path.insert(0, d)
+        break
+else:
+    print >>sys.stderr, "Could not locate ZODB software installation!"
+    sys.exit(1)
+
+
+from ZEO.mkzeoinst import ZEOInstanceBuilder
+ZEOInstanceBuilder().run()



More information about the Zope3-Checkins mailing list