[Zope-Checkins] CVS: Zope/inst - compilezpy.py:1.10.4.1 configure.py:1.1.2.7 source_install.py:1.1.2.2 zope.conf.in:1.1.2.5 binary_install.py:NONE build_extensions.py:NONE build_pcgi.py:NONE make_start.py:NONE

Chris McDonough chrism@zope.com
Mon, 16 Sep 2002 01:49:43 -0400


Update of /cvs-repository/Zope/inst
In directory cvs.zope.org:/tmp/cvs-serv7838/inst

Modified Files:
      Tag: chrism-install-branch
	compilezpy.py configure.py source_install.py zope.conf.in 
Removed Files:
      Tag: chrism-install-branch
	binary_install.py build_extensions.py build_pcgi.py 
	make_start.py 
Log Message:
Removed now-unnecessary files including z2.py, wo_pcgi.py, w_pcgi.py,
and several files in the inst directory.

Server ports may now be disabled by using the 'off' argument to their
respective directives.

Python module compilation now happens in the 'make install' step inside
the destination directory.  This prevents tracebacks from containing
the filenames of the files in the build directory.


=== Zope/inst/compilezpy.py 1.10 => 1.10.4.1 ===
--- Zope/inst/compilezpy.py:1.10	Wed Aug 14 17:17:32 2002
+++ Zope/inst/compilezpy.py	Mon Sep 16 01:49:42 2002
@@ -39,30 +39,32 @@
             success = success and compile_non_test(fullname)
     return success
 
-print
-print '-'*78
-print 'Compiling python modules'
-stdout = sys.stdout
-stderr = sys.stderr
-try:
+def compile(dir):
+    """ compile all files in dir """
+    print
+    print '-'*78
+    print 'Compiling python modules'
+    stdout = sys.stdout
+    stderr = sys.stderr
     try:
+        try:
+            success = 0
+            sys.stdout = Shutup()
+            sys.stderr = NoteErr()
+            success = compile_non_test(dir)
+        finally:
+            success = success and not sys.stderr.wrote
+            sys.stdout = stdout
+            sys.stderr = stderr
+    except:
         success = 0
-        sys.stdout = Shutup()
-        sys.stderr = NoteErr()
-        success = compile_non_test(os.getcwd())
-    finally:
-        success = success and not sys.stderr.wrote
-        sys.stdout = stdout
-        sys.stderr = stderr
-except:
-    success = 0
-    import traceback
-    traceback.print_exc()
+        import traceback
+        traceback.print_exc()
 
-if not success:
-    print
-    print '!' * 78
-    print 'There were errors during Python module compilation.'
-    print '!' * 78
-    print
-    sys.exit(1)
+    if not success:
+        print
+        print '!' * 78
+        print 'There were errors during Python module compilation.'
+        print '!' * 78
+        print
+        sys.exit(1)


=== Zope/inst/configure.py 1.1.2.6 => 1.1.2.7 ===
--- Zope/inst/configure.py:1.1.2.6	Thu Aug 29 12:38:14 2002
+++ Zope/inst/configure.py	Mon Sep 16 01:49:42 2002
@@ -18,12 +18,12 @@
 """
 import getopt, sys, os
 
-BUILD_DIR     = os.path.abspath(os.path.split(os.path.dirname(sys.argv[0]))[0])
-ZOPE_HOME     = '/usr/local/zope'
-PYTHON        = sys.executable
-MAKEINSTANCE  = open(os.path.join(BUILD_DIR, 'makeinstance.in')).read()
-MAKEFILE = open(os.path.join(BUILD_DIR, 'Makefile.in')).read()
 def main():
+    BUILD_DIR=os.path.abspath(os.path.split(os.path.dirname(sys.argv[0]))[0])
+    ZOPE_HOME='/usr/local/zope'
+    PYTHON=sys.executable
+    MAKEINSTANCE=open(os.path.join(BUILD_DIR, 'makeinstance.in')).read()
+    MAKEFILE=open(os.path.join(BUILD_DIR, 'Makefile.in')).read()
     REQUIRE_LF_ENABLED = 1
     zope_home = ZOPE_HOME
     build_dir = BUILD_DIR
@@ -46,14 +46,16 @@
     if REQUIRE_LF_ENABLED:
         test_largefile()
     print "  - Zope top-level binary directory will be %s." % zope_home
-    opts = {'python':python,'zope_home':zope_home,'build_dir':build_dir}
-    mf = MAKEFILE % opts
+    idata = {'<<PYTHON>>':python,'<<ZOPE_HOME>>':zope_home,
+             '<<BUILD_DIR>>':build_dir}
+    for k,v in idata.items():
+        MAKEFILE = MAKEFILE.replace(k, v)
+        MAKEINSTANCE = MAKEINSTANCE.replace(k, v)
     f = open('Makefile', 'w')
-    f.write(mf)
+    f.write(MAKEFILE)
     print "  - Makefile written."
-    mi = MAKEINSTANCE % opts
     f = open('makeinstance', 'w')
-    f.write(mi)
+    f.write(MAKEINSTANCE)
     os.chmod('makeinstance', 0755)
     print "  - 'makeinstance' script written."
     print


=== Zope/inst/source_install.py 1.1.2.1 => 1.1.2.2 ===
--- Zope/inst/source_install.py:1.1.2.1	Wed Aug 28 00:12:30 2002
+++ Zope/inst/source_install.py	Mon Sep 16 01:49:42 2002
@@ -19,6 +19,7 @@
 """
 import sys, getopt, os, stat, glob, fnmatch
 from shutil import copy2, rmtree
+import compilezpy, default_content
 
 def main():
     source = None
@@ -62,6 +63,8 @@
         traceback.print_exc()
         usage()
         sys.exit(127)
+    compilezpy.compile(dest)
+    default_content.main(dest)
 
 def usage():
     print ("%s --src=sourcedir --dst=destdir "


=== Zope/inst/zope.conf.in 1.1.2.4 => 1.1.2.5 ===
--- Zope/inst/zope.conf.in:1.1.2.4	Sat Sep  7 10:03:55 2002
+++ Zope/inst/zope.conf.in	Mon Sep 16 01:49:42 2002
@@ -554,7 +554,8 @@
 #     A space-separated list of TCP port numbers on which Zope will listen
 #     for HTTP requests. Any value in the list may also be an IP
 #     addresses/port number specification in the form
-#     "an.ip.address:portnum".
+#     "an.ip.address:portnum". Use the word "off" as the argument to the
+#     directive to disable this feature.
 #
 # Influences: zope.py configuration
 #
@@ -571,7 +572,8 @@
 #     A space-separated list of TCP port numbers on which Zope will listen
 #     for FTP requests. Any value in the list may also be an IP
 #     addresses/port number specification in the form
-#     "an.ip.address:portnum".
+#     "an.ip.address:portnum". Use the word "off" as the argument to the
+#     directive to disable this feature.
 #
 # Influences: zope.py configuration
 #
@@ -588,11 +590,12 @@
 #     A space-separated list of TCP port numbers on which Zope will listen
 #     for ICP requests. Any value in the list may also be an IP
 #     addresses/port number specification in the form
-#     "an.ip.address:portnum".
+#     "an.ip.address:portnum". Use the word "off" as the argument to the
+#     directive to disable this feature.
 #
 # Influences: zope.py configuration
 #
-# Default: unset
+# Default: off
 #
 # Example:
 #
@@ -607,11 +610,12 @@
 #     addresses/port number specification in the form
 #     "an.ip.address:portnum". Connections to a medusa monitor port using
 #     the medusa monitor client allow a developer to remotely debug a
-#     running Zope. It is dangerous to enable this for this reason.
+#     running Zope. It is dangerous to enable this for this reason. Use the
+#     word "off" as the argument to the directive to disable this feature.
 #
 # Influences: zope.py configuration
 #
-# Default: unset
+# Default: off
 #
 # Example:
 #
@@ -627,7 +631,8 @@
 #     "an.ip.address:portnum". The source of the Zope object requested will
 #     be returned when requests are made to this set of ports, as opposed
 #     to the rendered version which is returned when the normal HTTP port
-#     is consulted.
+#     is consulted. Use the word "off" as the argument to the directive to
+#     disable this feature.
 #
 # Influences: zope.py configuration
 #
@@ -695,7 +700,7 @@
 # Description:
 #     Set this directive to 'on' to cause Zope to ignore ownership checking
 #     when attempting to execute "through the web" code. By default, this
-#     directive is off in order to prevent 'trojan horse' security problems
+#     directive is on in order to prevent 'trojan horse' security problems
 #     whereby a user with less privilege can cause a user with more
 #     privilege to execute dangerous code.
 #
@@ -831,7 +836,7 @@
 #
 # Influences: zope.py configuration
 #
-# Default: INSTANCE_HOME/var/Data.fs
+# Default: CLIENT_HOME/Data.fs
 #
 # Example:
 #

=== Removed File Zope/inst/binary_install.py ===

=== Removed File Zope/inst/build_extensions.py ===

=== Removed File Zope/inst/build_pcgi.py ===

=== Removed File Zope/inst/make_start.py ===