Index: doc/INSTALL.txt =================================================================== RCS file: /var/lib/cvs/flowcom/Zope/dist/doc/INSTALL.txt,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 INSTALL.txt --- doc/INSTALL.txt 18 Jun 2003 02:27:46 -0000 1.1.1.1 +++ doc/INSTALL.txt 20 Jun 2003 05:03:29 -0000 @@ -13,7 +13,7 @@ Recommendations - - You are recommended to build and install Zope as a non-root user. + - We recommend you build and install Zope as a non-root user. Building Zope @@ -23,8 +23,25 @@ ./configure --prefix=/where/to/install/zope make - If you do not specify a '--prefix' option, during a later step, Zope - will be installed into a default location. + or + + ./configure --home=/where/to/install/zope + make + + If you do not specify the '--home' or '--prefix' options, during a + later step, Zope will be installed into a default location. + + --prefix differs from --home by installing Python packages into + $PREFIX/lib/pythonX.Y/site-packages, where --home installs the + packages into $HOME/lib/python. These options map directly to + the respective options for the distutils install target. + + - '--prefix' is more suited for distributions and more highly + controlled environments. + + - '--home' will suit most environments that use multiple versions of + Python or Zope, or require a higher level of isolation from system + software. If the configure script cannot find a suitable Python interpreter for use with Zope, it will complain with an informative error Index: inst/Makefile.in =================================================================== RCS file: /var/lib/cvs/flowcom/Zope/dist/inst/Makefile.in,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 Makefile.in --- inst/Makefile.in 18 Jun 2003 02:27:46 -0000 1.1.1.1 +++ inst/Makefile.in 20 Jun 2003 05:25:33 -0000 @@ -35,26 +35,33 @@ .PHONY : clean install uninstall instance untestinst testinst build unbuild .PHONY : default +BUILD_STAMP=${BASE_DIR}/.build-stamp + # default: The default step (invoked when make is called without a target) default: build - @echo - @echo Zope built. Next, do \'make install\' \(or \'make instance\' - @echo to run a Zope instance directly from the build directory\). - @echo # build: Do whatever 'setup.py build' implies -build: +build: ${BUILD_STAMP} + +${BUILD_STAMP}: ${PYTHON} "${BASE_DIR}/setup.py" \ ${DISTUTILS_OPTS} build ${BUILD_FLAGS} + touch ${BUILD_STAMP} + @echo + @echo Zope built. Next, do \'make install\' \(or \'make instance\' + @echo to run a Zope instance directly from the build directory\). + @echo # unbuild: Remove the build directory (undo the make build step) unbuild: ${RMRF} ${BUILD_BASE} + ${RM} ${BUILD_STAMP} # install: Install a software home. -install: build +install: ${BUILD_STAMP} ${PYTHON} "${BASE_DIR}/setup.py" ${DISTUTILS_OPTS} install \ - --home="${PREFIX}" ${BUILD_FLAGS} ${INSTALL_FLAGS} + <>="${PREFIX}" ${BUILD_FLAGS} ${INSTALL_FLAGS} + touch ${INSTALL_STAMP} @echo @echo Zope binaries installed successfully. @echo Now run \'${PREFIX}/bin/mkzopeinstance\' Index: inst/configure.py =================================================================== RCS file: /var/lib/cvs/flowcom/Zope/dist/inst/configure.py,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 configure.py --- inst/configure.py 18 Jun 2003 02:27:47 -0000 1.1.1.1 +++ inst/configure.py 20 Jun 2003 04:41:22 -0000 @@ -20,28 +20,31 @@ QUIET=0 +PREFIX="/opt" +MAKEFILE_MOD="" +MAKE_COMMAND="make" + if sys.platform == 'win32': - PREFIX = 'c:\\Zope-' + versions.ZOPE_MAJOR_VERSION - IN_MAKEFILE = 'Makefile.win.in' + PREFIX="C:" + MAKEFILE_MOD=".win" MAKE_COMMAND='the Visual C++ batch file "VCVARS32.bat" and then "nmake build"' -else: - PREFIX = '/opt/Zope-' + versions.ZOPE_MAJOR_VERSION - IN_MAKEFILE = 'Makefile.in' - MAKE_COMMAND='make' + +PREFIX = os.path.join(PREFIX, 'Zope-%s' % versions.ZOPE_MAJOR_VERSION) def main(): # below assumes this script is in the BASE_DIR/inst directory global PREFIX + PREFIX_ARG="--home" BASE_DIR=os.path.abspath(os.path.dirname(os.path.dirname(sys.argv[0]))) BUILD_BASE=os.path.join(os.getcwd(), 'build-base') PYTHON=sys.executable - MAKEFILE=open(os.path.join(BASE_DIR, 'inst', IN_MAKEFILE)).read() + MAKEFILE=open(os.path.join(BASE_DIR, 'inst', "Makefile%s.in" % MAKEFILE_MOD)).read() REQUIRE_LF_ENABLED = 1 REQUIRE_ZLIB=1 INSTALL_FLAGS = '' DISTUTILS_OPTS = '' try: - longopts = ["help", "ignore-largefile", "ignore-zlib", "prefix=", + longopts = ["help", "ignore-largefile", "ignore-zlib", "prefix=", "home=", "build-base=", "optimize", "quiet"] opts, args = getopt.getopt(sys.argv[1:], "h", longopts) except getopt.GetoptError, v: @@ -52,7 +55,10 @@ if o in ('-h', '--help'): usage() sys.exit() - if o == '--prefix': + if o in ('--home', '--prefix'): + if not a: sys.exit(usage()) + if o=='--prefix': + PREFIX_ARG='--prefix' PREFIX=os.path.abspath(os.path.expanduser(a)) if o == "--ignore-largefile": REQUIRE_LF_ENABLED=0 @@ -76,6 +82,7 @@ idata = { '<>':PYTHON, '<>':PREFIX, + '<>':PREFIX_ARG, '<>':BASE_DIR, '<>':BUILD_BASE, '<>':INSTALL_FLAGS, @@ -94,7 +101,7 @@ out("") def usage(): - usage = (""" + usage = """ %(program)s configures and writes a Makefile for Zope. Defaults for options are specified in brackets. @@ -119,14 +126,21 @@ Directories: --build-base=DIR use DIR to store temporary build files - - --prefix=DIR install Zope files in DIR [%(TARGET_DIR)s] + + --home=DIR install Zope software in DIR [%(PREFIX)s] + Python packages go in DIR/lib/python + + --prefix=DIR install Zope files in DIR [%(PREFIX)s] + Python packages go in + DIR/lib/pythonX.Y/site-packages By default, 'make install' will install Zope software files in -'%(target_dir)s' You can specify an alternate location for these -files by using '--prefix', for example: '--prefix=$HOME/zope'. -""" % ({'program':sys.argv[0], 'TARGET_DIR':TARGET_DIR}) - ) +'%(PREFIX)s' You can specify an alternate location for these +files by using '--home' or '--prefix', for example: +'--home=$HOME/zope'. + +""" % ({'program': sys.argv[0], + 'PREFIX': PREFIX}) print usage def test_zlib():