[Zope-Checkins] CVS: Zope - Makefile.in:1.1.2.1 configure:1.1.2.1 setup.py:1.3.4.1

Matt Behrens matt@zigg.com
Sun, 19 May 2002 21:37:34 -0400


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

Modified Files:
      Tag: zigg_unix-install-control-config-branch
	setup.py 
Added Files:
      Tag: zigg_unix-install-control-config-branch
	Makefile.in configure 
Log Message:
Kick off the Grand Unified Installer/Controller/Configurator branch.

This is only half done right now, and doesn't deliver everything I
have promised just yet, so don't expect magic.  However,

- setup.py will install ALL of Zope for you, i.e.

	python2.1 setup.py --home=/where/ever/you/want

- configure is mostly done,

- 'make build' and 'make install' work largely as expected.

The controller in particular probably doesn't work yet, but it's a
short leap from here to there.

(Note: I see fdrake committed setup.py-age on HEAD for ZCTextIndex,
but that module is not actually on the HEAD for Zope?  Am I missing
something?)



=== Added File Zope/Makefile.in ===
#! /usr/bin/env make -f
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
# 
##############################################################################

PREFIX=@PREFIX@
BINDIR=@BINDIR@
ETCDIR=@ETCDIR@
LIBDIR=@LIBDIR@
VARDIR=@VARDIR@

CONFIG_DIR=@CONFIG_DIR@
SOFTWARE_DIR=@SOFTWARE_DIR@
INSTANCE_DIR=@INSTANCE_DIR@
ZOPE=@ZOPE@
PYTHON=@PYTHON@
SOFTWARE_NAME=@SOFTWARE_NAME@
REGISTER_DEFAULT=@REGISTER_DEFAULT@

# Hook for faking package installs
DESTDIR=

build:
	${PYTHON} setup.py build

install:	build
	${PYTHON} setup.py install \
		--home=${DESTDIR}${SOFTWARE_DIR}/${SOFTWARE_NAME} \
		--install-platlib=${DESTDIR}${SOFTWARE_DIR}/${SOFTWARE_NAME} \
		--install-purelib=${DESTDIR}${SOFTWARE_DIR}/${SOFTWARE_NAME}
	install -d -m 755 ${DESTDIR}${BINDIR}
	install -C -m 755 ZopeControl/zope ${DESTDIR}${BINDIR}
	${PYTHON} inst/register_software.py ${CONFIG_DIR} ${SOFTWARE_NAME} \
		${SOFTWARE_DIR}/${SOFTWARE_NAME} ${REGISTER_DEFAULT}

clean:
	${PYTHON} setup.py clean
	rm -rf build lib/python/build

distclean:	clean
	rm -f @SUBST_FILES@



=== Added File Zope/configure ===
#! /bin/sh
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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
# 
##############################################################################

# Supported versions of Python for this version of Zope.
SUPPORTED_VERSION=2.1
SUPPORTED_PATCHLEVEL=2.1.3

# Search for these Python binaries by default.  Matches later in the list
# win over ones earlier in the list.
SEARCH_PYTHONS="python python$SUPPORTED_PATCHLEVEL python$SUPPORTED_VERSION"

# Default paths.
PREFIX=/usr/local
BINDIR=$PREFIX/bin
ETCDIR=$PREFIX/etc
LIBDIR=$PREFIX/lib
VARDIR=$PREFIX/var
CONFIG_DIR=$ETCDIR/zope
SOFTWARE_DIR=$LIBDIR/zope
INSTANCE_DIR=$VARDIR/zope

# Files to substitute into, and what variables to substitute.
SUBST_FILES="Makefile ZopeControl/zope"
SUBST_VARS="PREFIX BINDIR ETCDIR LIBDIR VARDIR CONFIG_DIR SOFTWARE_DIR INSTANCE_DIR ZOPE PYTHON SOFTWARE_NAME REGISTER_DEFAULT"

# Special hook for make distclean target.
if test $1 = --subst-files; then
    echo $SUBST_FILES
    exit 0
fi

echo Zope source distribution configuration utility
echo Copyright \(c\) 2002 Zope Corporation and Contributors. All Rights
echo Reserved.  This software is subject to the provisions of the Zope
echo Public License, Version 2.0 \(ZPL\).  See LICENSE.txt.
echo

# Look for and query an existing zope control utility first, as we may want
# to override what it says with command-line options.
echo Searching for existing zope control utility...
if which zope >/dev/null 2>&1; then
    ZOPE=`which zope`
    if test -x $ZOPE; then
	echo Found $ZOPE, which says your current configuration is:
	$ZOPE config
	eval `$ZOPE config`
    fi
else
    echo Could not find a zope control utility in your PATH.  Will install
    echo one as $BINDIR/zope.
    ZOPE=$BINDIR/zope
fi
echo

# Parse command-line arguments.
for opt
do
    # Parse option/argument pairs.
    case "$opt" in
	--*=*)
	    arg=`echo "$opt" | sed 's/[^=]*=//'`
	    ;;
	*)
	    arg=
	    ;;
    esac

    case "$opt" in
	--prefix=*)
	    PREFIX=$arg
	    BINDIR=$PREFIX/bin
	    ETCDIR=$PREFIX/etc
	    LIBDIR=$PREFIX/lib
	    VARDIR=$PREFIX/var
	    CONFIG_DIR=$ETCDIR/zope
	    SOFTWARE_DIR=$LIBDIR/zope
	    INSTANCE_DIR=$VARDIR/zope
	    ;;
	--bindir=*)
	    BINDIR=$arg
	    ;;
	--etcdir=*)
	    ETCDIR=$arg
	    CONFIG_DIR=$ETCDIR/zope
	    ;;
	--libdir=*)
	    LIBDIR=$arg
	    SOFTWARE_DIR=$LIBDIR/zope
	    ;;
	--vardir=*)
	    VARDIR=$arg
	    INSTANCE_DIR=$VARDIR/zope
	    ;;
	--with-config-dir=*)
	    CONFIG_DIR=$arg
	    ;;
	--with-software-dir=*)
	    SOFTWARE_DIR=$arg
	    ;;
	--with-instance-dir=*)
	    INSTANCE_DIR=$arg
	    ;;
	--with-python=*)
	    OVERRIDE_PYTHON=$arg
	    ;;
	--with-software-name=*)
	    OVERRIDE_SOFTWARE_NAME=$arg
	    ;;
	*)
	    echo Unrecognized option "$opt".
	    echo See doc/INSTALL.txt for usage information.
	    exit 1
	    ;;
    esac
done

# Search for an acceptable Python binary.
if test x$OVERRIDE_PYTHON == x; then
    echo Searching for Python binary \(version $SUPPORTED_VERSION, minimum patchlevel $SUPPORTED_PATCHLEVEL\)...
    for search_python in $SEARCH_PYTHONS; do
    	if which $search_python >/dev/null 2>&1; then
	    python=`which $search_python`
	    echo -n "$python is "
	    if $python inst/acceptable_version.py $SUPPORTED_VERSION $SUPPORTED_PATCHLEVEL; then
		PYTHON=$python
	    fi
	fi
    done
    if test x$PYTHON == x; then
	echo Could not find an acceptable Python binary.  You may wish to specify
	echo a path to one with the --with-python option.  See doc/INSTALL.txt
	echo for details.
	exit 1
    fi
else
    if which $OVERRIDE_PYTHON >/dev/null 2>&1; then
    	PYTHON=`which $OVERRIDE_PYTHON`
	echo -n "$PYTHON is "
    	if $PYTHON inst/acceptable_version.py $SUPPORTED_VERSION $SUPPORTED_PATCHLEVEL; then
	    echo This is an acceptable version of Python for this version of Zope.
	else
	    echo WARNING: This is not a supported version of Python.  Supported for
	    echo this version of Zope are version $SUPPORTED_VERSION, with minimum patchlevel $SUPPORTED_PATCHLEVEL.
	fi
    else
	echo Could not find $OVERRIDE_PYTHON.
	exit 1
    fi
fi
echo Using $PYTHON for this version of Zope.
echo

# Establish a software name.
if test x$OVERRIDE_SOFTWARE_NAME == x; then
    if test x$TMPDIR == x; then
	TMPDIR=/tmp
    fi
    $PYTHON inst/software_name.py > $TMPDIR/configure.$$
    read SOFTWARE_NAME REGISTER_DEFAULT < $TMPDIR/configure.$$
    rm -f $TMPDIR/configure.$$
else
    SOFTWARE_NAME=$OVERRIDE_SOFTWARE_NAME
    REGISTER_DEFAULT=0
fi
echo Installing this version of Zope with the software name $SOFTWARE_NAME.
if test $REGISTER_DEFAULT == 1; then
    echo This version of Zope will be registered as your system\'s default Zope 
    echo version.
fi
echo

# Display and run substitutions.
echo Using the following substitutions:
for v in $SUBST_VARS; do
    value=`eval echo \\\$$v`
    echo $v=$value
    sed_script="$sed_script -e s%@$v@%$value%"
done
echo

for f in $SUBST_FILES; do
    sed $sed_script < $f.in > $f
    echo Created $f.
done
echo

echo Zope has been configured successfully.  The next step is to run
echo make, switch to the superuser if necessary, and run make install.
echo
exit 0



=== Zope/setup.py 1.3 => 1.3.4.1 === (1092/1192 lines abridged)
 ##############################################################################
 #
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
@@ -11,10 +11,6 @@
 # FOR A PARTICULAR PURPOSE
 #
 ##############################################################################
-'''Distutils setup file for Zope
-
-Common usage: python setup.py build_ext --build-lib `pwd`/lib/python
-'''
 
 import os
 import sys
@@ -22,268 +18,921 @@
 from distutils.core import setup, run_setup
 from distutils.extension import Extension
 
+# Override install_data to install into module directories, and to support
+# globbing on data_files.
 
-SETUP_BERKELEY = 0
-SETUP_ZEO = 0
-SETUP_OLD_BTREE = 1
-SETUP_CACCESSCONTROL = 1
-SETUP_DCPYEXPAT = 1
-SETUP_SPLITTERS = 1
-
-
-# a few constants
-zope_corp = "Zope Corporation"
-zodb_email = "zodb-dev@zope.org"
-zodb_wiki = "http://www.zope.org/Wikis/ZODB/FrontPage"
-
-top_dir = os.path.abspath(os.getcwd())
-ec_root = os.path.join(top_dir, 'lib', 'Components', 'ExtensionClass')
-ec_src = os.path.join(ec_root, 'src')
-py_root = os.path.join(top_dir, 'lib', 'python')
-ec_include = [ec_src]
-
-# ExtensionClass
-os.chdir(ec_root)
-dist = run_setup('setup.py', script_args=sys.argv[1:], stop_after="run")
-os.chdir(py_root)
-
-# ZODB

[-=- -=- -=- 1092 lines omitted -=- -=- -=-]

+    cmdclass={'install_data': install_data}
+)
+
+# The rest of these modules live in the root of the source tree
+os.chdir(ZOPE_ROOT)
+
+# ZServer
+setup(
+    name='ZServer',
+    author=AUTHOR,
+
+    packages=['ZServer', 'ZServer.PubCore', 'ZServer.medusa',
+	      'ZServer.medusa.contrib', 'ZServer.medusa.demo',
+	      'ZServer.medusa.misc', 'ZServer.medusa.script_handler_demo',
+	      'ZServer.medusa.sendfile', 'ZServer.medusa.test',
+	      'ZServer.medusa.thread'],
+
+    data_files=[['ZServer', ['ZServer/*.txt']],
+		['ZServer/medusa', ['ZServer/medusa/*.txt',
+				    'ZServer/medusa/*.html']],
+		['ZServer/medusa/dist', ['ZServer/medusa/dist/*']],
+		['ZServer/medusa/docs', ['ZServer/medusa/docs/*']],
+		['ZServer/medusa/notes', ['ZServer/medusa/notes/*']],
+		['ZServer/medusa/script_handler_demo',
+		    ['ZServer/medusa/script_handler_demo/*.mpy']],
+		['ZServer/medusa/sendfile',
+		    ['ZServer/medusa/sendfile/README']],
+		['ZServer/medusa/test', ['ZServer/medusa/test/*.txt']]],
+    cmdclass={'install_data': install_data},
 
-setup(name = "Products.ZCTextIndex",
-      ext_modules = [stopper])
+# Does not work on all platforms... not like we ever compiled it before
+# anyway
+#
+#    ext_modules=[
+#	Extension(name='ZServer.medusa.sendfile.sendfilemodule',
+#		  sources=['ZServer/medusa/sendfile/sendfilemodule.c'])]
+
+)
+
+# ZopeControl
+setup(
+    name='ZopeControl',
+    author=AUTHOR,
 
-os.chdir(top_dir)
+    packages=['ZopeControl']
+)