Commit 29ffdf8b authored by Chris McDonough's avatar Chris McDonough

Add a --no-compile option to prevent bytecode compilation (for binary...

Add a --no-compile option to prevent bytecode compilation (for binary packagers who don't want to ship compiled bytecode).
parent 1a9f582d
#!/bin/sh #!/bin/sh
# Zope configure script # Zope configure script
# $Id: configure,v 1.12 2003/06/24 20:22:39 chrism Exp $ # $Id: configure,v 1.13 2003/06/24 22:35:34 chrism Exp $
# $Revision: 1.12 $ # $Revision: 1.13 $
##################################################################### #####################################################################
# BEGIN EDITABLE PARAMETERS # # BEGIN EDITABLE PARAMETERS #
...@@ -53,6 +53,7 @@ usage() ...@@ -53,6 +53,7 @@ usage()
echo " --ignore-largefile ignore large file support warnings" echo " --ignore-largefile ignore large file support warnings"
echo " --ignore-zlib ignore warnings about zlib" echo " --ignore-zlib ignore warnings about zlib"
echo " --optimize optimize compiled Python bytecode" echo " --optimize optimize compiled Python bytecode"
echo " --no-compile Dont compile Python bytecode"
echo echo
echo " Given no options, configure will search your PATH for a suitable" echo " Given no options, configure will search your PATH for a suitable"
echo " Python interpreter and will use '/opt/Zope-$ZOPE_VERS' as a prefix." echo " Python interpreter and will use '/opt/Zope-$ZOPE_VERS' as a prefix."
......
...@@ -41,9 +41,9 @@ def main(): ...@@ -41,9 +41,9 @@ def main():
INSTALL_FLAGS = '' INSTALL_FLAGS = ''
DISTUTILS_OPTS = '' DISTUTILS_OPTS = ''
try: try:
longopts = ["help", "ignore-largefile", "ignore-zlib", "prefix=", longopts = ['help', 'ignore-largefile', 'ignore-zlib', 'prefix=',
"build-base=", "optimize", "quiet"] 'build-base=', 'optimize', 'no-compile', 'quiet']
opts, args = getopt.getopt(sys.argv[1:], "h", longopts) opts, args = getopt.getopt(sys.argv[1:], 'h', longopts)
except getopt.GetoptError, v: except getopt.GetoptError, v:
print v print v
usage() usage()
...@@ -54,12 +54,14 @@ def main(): ...@@ -54,12 +54,14 @@ def main():
sys.exit() sys.exit()
if o == '--prefix': if o == '--prefix':
PREFIX=os.path.abspath(os.path.expanduser(a)) PREFIX=os.path.abspath(os.path.expanduser(a))
if o == "--ignore-largefile": if o == '--ignore-largefile':
REQUIRE_LF_ENABLED=0 REQUIRE_LF_ENABLED=0
if o == "--ignore-zlib": if o == '--ignore-zlib':
REQUIRE_ZLIB=0 REQUIRE_ZLIB=0
if o == "--optimize": if o == '--optimize':
INSTALL_FLAGS = '--optimize=1 --no-compile' INSTALL_FLAGS = '--optimize=1 --no-compile'
if o == '--no-compile':
INSTALL_FLAGS = '--no-compile'
if o == '--build-base': if o == '--build-base':
BUILD_BASE = a BUILD_BASE = a
if o == '--quiet': if o == '--quiet':
...@@ -70,9 +72,9 @@ def main(): ...@@ -70,9 +72,9 @@ def main():
test_largefile() test_largefile()
if REQUIRE_ZLIB: if REQUIRE_ZLIB:
test_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: if INSTALL_FLAGS:
out(" - Distutils install flags will be '%s'" % INSTALL_FLAGS) out(' - Distutils install flags will be "%s"' % INSTALL_FLAGS)
idata = { idata = {
'<<PYTHON>>':PYTHON, '<<PYTHON>>':PYTHON,
'<<PREFIX>>':PREFIX, '<<PREFIX>>':PREFIX,
...@@ -88,10 +90,10 @@ def main(): ...@@ -88,10 +90,10 @@ def main():
MAKEFILE = MAKEFILE.replace(k, v) MAKEFILE = MAKEFILE.replace(k, v)
f = open(os.path.join(os.getcwd(), 'makefile'), 'w') f = open(os.path.join(os.getcwd(), 'makefile'), 'w')
f.write(MAKEFILE) f.write(MAKEFILE)
out(" - Makefile written.") out(' - Makefile written.')
out("") out('')
out(" Next, run %s." % MAKE_COMMAND) out(' Next, run %s.' % MAKE_COMMAND)
out("") out('')
def usage(): def usage():
usage = (""" usage = ("""
...@@ -116,6 +118,8 @@ Options: ...@@ -116,6 +118,8 @@ Options:
--optimize compile Python files as .pyo files --optimize compile Python files as .pyo files
instead of as .pyc files instead of as .pyc files
--no-compile don't compile Python files
Directories: Directories:
--build-base=DIR use DIR to store temporary build files --build-base=DIR use DIR to store temporary build files
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment