Commit 99ae41eb authored by Chris McDonough's avatar Chris McDonough

Perform more indirect test for expat support which shouldn't give Mac OS X users gried.

parent 5e344e26
#!/bin/sh #!/bin/sh
# Zope configure script # Zope configure script
# $Id: configure,v 1.14 2003/07/08 19:27:16 chrism Exp $ # $Id: configure,v 1.15 2003/08/22 14:06:01 chrism Exp $
# $Revision: 1.14 $ # $Revision: 1.15 $
##################################################################### #####################################################################
# BEGIN EDITABLE PARAMETERS # # BEGIN EDITABLE PARAMETERS #
...@@ -51,6 +51,7 @@ usage() ...@@ -51,6 +51,7 @@ usage()
echo " --prefix specify an installation path for binary data" echo " --prefix specify an installation path for binary data"
echo " --build-base specify a temporary path for build files" echo " --build-base specify a temporary path for build files"
echo " --ignore-largefile ignore large file support warnings" echo " --ignore-largefile ignore large file support warnings"
echo " --ignore-expat ignore warnings about expat/pyexpat"
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 " --no-compile Dont compile Python bytecode"
......
...@@ -38,12 +38,12 @@ def main(): ...@@ -38,12 +38,12 @@ def main():
MAKEFILE=open(os.path.join(BASE_DIR, 'inst', IN_MAKEFILE)).read() MAKEFILE=open(os.path.join(BASE_DIR, 'inst', IN_MAKEFILE)).read()
REQUIRE_LF_ENABLED = 1 REQUIRE_LF_ENABLED = 1
REQUIRE_ZLIB = 1 REQUIRE_ZLIB = 1
REQUIRE_PYEXPAT = 1 REQUIRE_EXPAT = 1
INSTALL_FLAGS = '' INSTALL_FLAGS = ''
DISTUTILS_OPTS = '' DISTUTILS_OPTS = ''
try: try:
longopts = ['help', 'ignore-largefile', 'ignore-zlib', longopts = ['help', 'ignore-largefile', 'ignore-zlib',
'ignore-pyexpat', 'prefix=', 'ignore-expat', 'prefix=',
'build-base=', 'optimize', 'no-compile', '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:
...@@ -60,8 +60,8 @@ def main(): ...@@ -60,8 +60,8 @@ def main():
REQUIRE_LF_ENABLED=0 REQUIRE_LF_ENABLED=0
if o == '--ignore-zlib': if o == '--ignore-zlib':
REQUIRE_ZLIB=0 REQUIRE_ZLIB=0
if o == '--ignore-pyexpat': if o == '--ignore-expat':
REQUIRE_PYEXPAT=0 REQUIRE_EXPAT=0
if o == '--optimize': if o == '--optimize':
INSTALL_FLAGS = '--optimize=1 --no-compile' INSTALL_FLAGS = '--optimize=1 --no-compile'
if o == '--no-compile': if o == '--no-compile':
...@@ -76,8 +76,8 @@ def main(): ...@@ -76,8 +76,8 @@ def main():
test_largefile() test_largefile()
if REQUIRE_ZLIB: if REQUIRE_ZLIB:
test_zlib() test_zlib()
if REQUIRE_PYEXPAT: if REQUIRE_EXPAT:
test_pyexpat() test_expat()
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)
...@@ -121,8 +121,8 @@ Options: ...@@ -121,8 +121,8 @@ Options:
--ignore-largefile allow configuration to proceed without --ignore-largefile allow configuration to proceed without
Python large file support. Python large file support.
--ignore-pyexpat allow configuration to proceed if the pyexpat --ignore-expat allow configuration to proceed if the expat
module is not found. XML parsing module is not found.
--optimize compile Python files as .pyo files --optimize compile Python files as .pyo files
instead of as .pyc files instead of as .pyc files
...@@ -142,9 +142,9 @@ files by using '--prefix', for example: '--prefix=$HOME/zope'. ...@@ -142,9 +142,9 @@ files by using '--prefix', for example: '--prefix=$HOME/zope'.
) )
print usage print usage
def test_pyexpat(): def test_expat():
try: try:
import pyexpat import xml.parsers.expat
except ImportError: except ImportError:
print ( print (
""" """
...@@ -164,7 +164,7 @@ Clark's expat libraries and development packages (look for libexpat.so and ...@@ -164,7 +164,7 @@ Clark's expat libraries and development packages (look for libexpat.so and
expat.h). Typically, these come as part of your operating system's libexpat expat.h). Typically, these come as part of your operating system's libexpat
and libexpat-dev packages, respectively. and libexpat-dev packages, respectively.
Run the configure script with the --ignore-pyexpat option to prevent this Run the configure script with the --ignore-expat option to prevent this
warning with the understanding that some Zope features may not work properly warning with the understanding that some Zope features may not work properly
until you've installed the pyexpat module. until you've installed the pyexpat module.
""" """
......
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