[Zope-Checkins] CVS: Zope/inst - configure.py:1.10

Chris McDonough chrism@zope.com
Tue, 24 Jun 2003 18:35:35 -0400


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

Modified Files:
	configure.py 
Log Message:
Add a --no-compile option to prevent bytecode compilation (for binary packagers who don't want to ship compiled bytecode).


=== Zope/inst/configure.py 1.9 => 1.10 ===
--- Zope/inst/configure.py:1.9	Thu Jun 19 20:19:29 2003
+++ Zope/inst/configure.py	Tue Jun 24 18:35:35 2003
@@ -41,9 +41,9 @@
     INSTALL_FLAGS = ''
     DISTUTILS_OPTS = ''
     try:
-        longopts = ["help", "ignore-largefile", "ignore-zlib", "prefix=",
-                    "build-base=", "optimize", "quiet"]
-        opts, args = getopt.getopt(sys.argv[1:], "h", longopts)
+        longopts = ['help', 'ignore-largefile', 'ignore-zlib', 'prefix=',
+                    'build-base=', 'optimize', 'no-compile', 'quiet']
+        opts, args = getopt.getopt(sys.argv[1:], 'h', longopts)
     except getopt.GetoptError, v:
         print v
         usage()
@@ -54,12 +54,14 @@
             sys.exit()
         if o == '--prefix':
             PREFIX=os.path.abspath(os.path.expanduser(a))
-        if o == "--ignore-largefile":
+        if o == '--ignore-largefile':
             REQUIRE_LF_ENABLED=0
-        if o == "--ignore-zlib":
+        if o == '--ignore-zlib':
             REQUIRE_ZLIB=0
-        if o == "--optimize":
+        if o == '--optimize':
             INSTALL_FLAGS = '--optimize=1 --no-compile'
+        if o == '--no-compile':
+            INSTALL_FLAGS = '--no-compile'
         if o == '--build-base':
             BUILD_BASE = a
         if o == '--quiet':
@@ -70,9 +72,9 @@
         test_largefile()
     if REQUIRE_ZLIB:
         test_zlib()
-    out("  - Zope top-level binary directory will be %s." % PREFIX)
+    out('  - Zope top-level binary directory will be %s.' % PREFIX)
     if INSTALL_FLAGS:
-        out("  - Distutils install flags will be '%s'" % INSTALL_FLAGS)
+        out('  - Distutils install flags will be "%s"' % INSTALL_FLAGS)
     idata = {
         '<<PYTHON>>':PYTHON,
         '<<PREFIX>>':PREFIX,
@@ -88,10 +90,10 @@
         MAKEFILE = MAKEFILE.replace(k, v)
     f = open(os.path.join(os.getcwd(), 'makefile'), 'w')
     f.write(MAKEFILE)
-    out("  - Makefile written.")
-    out("")
-    out("  Next, run %s." % MAKE_COMMAND)
-    out("")
+    out('  - Makefile written.')
+    out('')
+    out('  Next, run %s.' % MAKE_COMMAND)
+    out('')
 
 def usage():
     usage = ("""
@@ -115,6 +117,8 @@
 
   --optimize                    compile Python files as .pyo files
                                 instead of as .pyc files
+
+  --no-compile                  don't compile Python files
 
 Directories: