[Zope-CVS] CVS: Packages/WinBuilders/mk - spread.mk:1.2 spreadwrapper.mk:1.2 common.mk:1.4 python.mk:1.8 zeo.mk:1.5 zope.mk:1.6

Tim Peters tim.one at comcast.net
Thu Feb 5 00:08:56 EST 2004


Update of /cvs-repository/Packages/WinBuilders/mk
In directory cvs.zope.org:/tmp/cvs-serv29908/mk

Modified Files:
	common.mk python.mk zeo.mk zope.mk 
Added Files:
	spread.mk spreadwrapper.mk 
Log Message:
Merging tim-zrs-branch back to the head.  This mainly introduces a
different way to build Python, + some new targets needed for ZRS.

- The python and zeo targets work fine, and also the new spread and
  spreadwrapper targets.  They even work fine on Win98SE, provided you
  don't use the native xcopy or xcopy32 (see README.txt for details).

- I had two problems with the zope target on Win98SE:

  + The Cygwin bash shell provokes a segfault in kernel32.dll when trying
    to run the synthesized .bat file that runs nmake.  I ran that makefile
    by hand from a regular DOS box instead, then reran the Zope buildout.

  + The Zope installer built by Inno Setup complains when it tries to
    extract bin\Lib\site-packages\formatter.py, claiming that the file
    is corrupted.  I can't see how this can be anything other than an
    Inno Setup bug:  Inno compressed this file itself, so if it can't
    extract it from the installer it builds, whose fault is that?
    Clicking the Ignore button worked fine, and Inno went on to install
    a working Zope.  This instance of formatter.py comes from win32all,
    and is used by PythonWin to drive the Scintilla text widget.  Zope
    doesn't need this.  Maybe this bug is specific to Win98SE; maybe
    not; beware!

- All the external extension modules that come with Python 2.3.3
  are included now (this includes bsddb, zlib, bz2, OpenSSL, and
  pyexpat).  It's no longer necessary to download the source for these.
  The inputs to the Python build process are now just python.org's source
  tarball + python.org's matching Windows installer.  The executables
  (.pyd, .dll, .exe) are extracted, pre-built, from the latter.  In fact,
  you don't even need a compiler anymore to run the Python part of the
  buildout.

  Since the Python buildout extracts all .pyds from the Windows installer,
  we'll automatically get all external extension modules that may be
  added in later Pythons.

  A less tangible benefit is that the python.org executables are much
  better tested than we can afford to do (exactly the same compiled files
  ship with Python 2.3.3 on Windows).

- For the zope and zeo targets, the build tree is cleaned up before
  building the installer:  embedded CVS directories are purged, and
  most text files (.py, .txt, .bat) are converted to have Windows
  line ends.  Since buildout extracts source mostly from Unix tarballs,
  most text files the installer pumped out were unintelligible using
  normal Windows tools (due to the Unix line ends).

- Targets that need to run Python now use the Python buildout from the
  build tree.  We weren't using that for anything before, except as input
  to Inno Setup, so the tree we put into the installer wasn't getting
  tested before (not even used).

- Assorted minor improvements to the buildout process.  It's still
  very complicated, alas.


=== Packages/WinBuilders/mk/spread.mk 1.1 => 1.2 ===
--- /dev/null	Thu Feb  5 00:08:56 2004
+++ Packages/WinBuilders/mk/spread.mk	Thu Feb  5 00:08:55 2004
@@ -0,0 +1,60 @@
+# Justs repackages the Spread binaries.
+# Puts binaries into build/bin, and some docs into build/doc.
+
+# See README.txt for system requirements.
+
+# Download the binary distribution of Spread, from http://www.spread.org/.
+# Store it in tmp/.  NOTE:  May need to rename it to .tgz (depends on how
+# it's downloaded).  The name is of the form spread-bin-n.nn.n.tgz
+
+SPREAD_VERSION=3.17.1
+SPREAD_DIR=spread-bin-$(SPREAD_VERSION)
+SPREAD_ARCHIVE=$(SPREAD_DIR).tgz
+SPREAD_REQUIRED_FILES=tmp/$(SPREAD_ARCHIVE)
+
+REQUIRED_FILES=$(SPREAD_REQUIRED_FILES)
+
+# Unpack the tarball into src/.
+build_spread: $(SRC_DIR)/$(SPREAD_DIR)/win/spread.exe
+
+$(SRC_DIR)/$(SPREAD_DIR)/win/spread.exe : tmp/$(SPREAD_ARCHIVE)
+	$(MKDIR) "$(SRC_DIR)"
+	$(TAR) -C "$(SRC_DIR)" -xvzf tmp/$(SPREAD_ARCHIVE)
+	$(TOUCH) $@
+
+# A dumb trick so we don't unpack the tarball multiple times.
+$(SRC_DIR)/$(SPREAD_DIR)/license.txt \
+$(SRC_DIR)/$(SPREAD_DIR)/Readme.txt \
+$(SRC_DIR)/$(SPREAD_DIR)/sample.spread.conf \
+		: $(SRC_DIR)/$(SPREAD_DIR)/win/spread.exe
+	$(TOUCH) $@
+
+# Copy the Windows stuff from src/ into build/bin/ and build/doc
+install_spread: $(BUILD_DIR)/bin/spread.exe \
+		$(BUILD_DIR)/bin/sprecv.exe \
+		$(BUILD_DIR)/bin/spsend.exe \
+		$(BUILD_DIR)/bin/sptuser.exe \
+		$(BUILD_DIR)/bin/spflooder.exe \
+		$(BUILD_DIR)/doc/SPREAD_LICENSE.txt \
+		$(BUILD_DIR)/doc/SPREAD_README.txt \
+		$(BUILD_DIR)/doc/sample.spread.conf
+
+
+$(BUILD_DIR)/bin/spread.exe \
+$(BUILD_DIR)/bin/sprecv.exe \
+$(BUILD_DIR)/bin/spsend.exe \
+$(BUILD_DIR)/bin/sptuser.exe \
+$(BUILD_DIR)/bin/spflooder.exe : $(BUILD_DIR)/bin/% : \
+				 $(SRC_DIR)/$(SPREAD_DIR)/win/%
+	$(MKDIR) $(@D)
+	$(CP) $< $@
+	$(TOUCH) $@
+
+$(BUILD_DIR)/doc/SPREAD_LICENSE.txt: $(SRC_DIR)/$(SPREAD_DIR)/license.txt
+	$(COPY_AND_WINDOWIZE_LINEENDS)
+
+$(BUILD_DIR)/doc/SPREAD_README.txt: $(SRC_DIR)/$(SPREAD_DIR)/Readme.txt
+	$(COPY_AND_WINDOWIZE_LINEENDS)
+
+$(BUILD_DIR)/doc/sample.spread.conf: $(SRC_DIR)/$(SPREAD_DIR)/sample.spread.conf
+	$(COPY_AND_WINDOWIZE_LINEENDS)


=== Packages/WinBuilders/mk/spreadwrapper.mk 1.1 => 1.2 ===
--- /dev/null	Thu Feb  5 00:08:56 2004
+++ Packages/WinBuilders/mk/spreadwrapper.mk	Thu Feb  5 00:08:55 2004
@@ -0,0 +1,68 @@
+# Builds the Python Spread wrapper module.
+# Puts:
+#     spread.pyd into build/lib/python/
+#     testspread.py into build/lib/python/SpreadTest/
+#     various text files (Windowsized and renamed) into build/doc
+
+# Download the wrapper module tarball, from
+# http://www.python.org/other/spread/.
+# Store it in tmp/.  NOTE:  May need to rename it to .tgz (depends on how
+# it's downloaded).  The name is of the form SpreadModule-n.n.tgz
+
+# XXX There's no natural way to clean up SPREADWRAPPER_TMPDIR here.
+
+SPREADWRAPPER_VERSION=1.4
+SPREADWRAPPER_DIR=SpreadModule-$(SPREADWRAPPER_VERSION)
+SPREADWRAPPER_ARCHIVE=$(SPREADWRAPPER_DIR).tgz
+SPREADWRAPPER_REQUIRED_FILES=tmp/$(SPREADWRAPPER_ARCHIVE)
+
+REQUIRED_FILES=$(SPREADWRAPPER_REQUIRED_FILES)
+
+SPREADWRAPPER_TMPDIR=src/tmp/spreadwrapper-install
+
+# Unpack the tarball into src/.
+build_spreadwrapper: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/spreadmodule.c
+
+# Copy the Windows stuff into the build tree.
+install_spreadwrapper: $(BUILD_DIR)/lib/python/spread.pyd \
+		       $(BUILD_DIR)/lib/python/SpreadTest/testspread.py \
+		       $(BUILD_DIR)/doc/spreadwrapper_doc.txt \
+		       $(BUILD_DIR)/doc/SPREADWRAPPER_LICENSE.txt \
+		       $(BUILD_DIR)/doc/SPREADWRAPPER_README.txt
+
+
+$(SRC_DIR)/$(SPREADWRAPPER_DIR)/spreadmodule.c: tmp/$(SPREADWRAPPER_ARCHIVE)
+	$(MKDIR) "$(SRC_DIR)"
+	$(TAR) -C "$(SRC_DIR)" -xvzf $<
+	$(TOUCH) $@
+
+# A dumb trick so we don't unpack the tarball multiple times.
+$(SRC_DIR)/$(SPREADWRAPPER_DIR)/doc.txt \
+$(SRC_DIR)/$(SPREADWRAPPER_DIR)/LICENSE \
+$(SRC_DIR)/$(SPREADWRAPPER_DIR)/README \
+$(SRC_DIR)/$(SPREADWRAPPER_DIR)/testspread.py \
+		: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/spreadmodule.c
+	$(TOUCH) $@
+
+
+$(SPREADWRAPPER_TMPDIR)/Lib/site-packages/spread.pyd: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/spreadmodule.c
+	$(CD) $(SRC_DIR)/$(SPREADWRAPPER_DIR); \
+		$(BUILD_DIR)/bin/python.exe setup.py install \
+			--prefix=../../$(SPREADWRAPPER_TMPDIR)
+
+$(BUILD_DIR)/lib/python/spread.pyd: $(SPREADWRAPPER_TMPDIR)/Lib/site-packages/spread.pyd
+	$(MKDIR) $(@D)
+	$(CP) $< $@
+	$(TOUCH) $@
+
+$(BUILD_DIR)/doc/spreadwrapper_doc.txt: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/doc.txt
+	$(COPY_AND_WINDOWIZE_LINEENDS)
+
+$(BUILD_DIR)/doc/SPREADWRAPPER_LICENSE.txt: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/LICENSE
+	$(COPY_AND_WINDOWIZE_LINEENDS)
+
+$(BUILD_DIR)/doc/SPREADWRAPPER_README.txt: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/README
+	$(COPY_AND_WINDOWIZE_LINEENDS)
+
+$(BUILD_DIR)/lib/python/SpreadTest/testspread.py: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/testspread.py
+	$(COPY_AND_WINDOWIZE_LINEENDS)


=== Packages/WinBuilders/mk/common.mk 1.3 => 1.4 ===
--- Packages/WinBuilders/mk/common.mk:1.3	Wed Jan 28 11:13:53 2004
+++ Packages/WinBuilders/mk/common.mk	Thu Feb  5 00:08:55 2004
@@ -8,10 +8,16 @@
 WIN_TMP_DIR=$(shell cygpath -w $(TMP_DIR))
 WIN_MAKEFILEDIR=$(shell cygpath -w $(MAKEFILEDIR))
 
+# Root of the Windows drive you're working on.  The setting here is for
+# the C: drive and using a default out-of-the-box Cygwin.
+CYGROOT=/cygdrive/c
+
 RM=rm -f
 RMRF=rm -rf
 CD=cd
+
 XCOPY=xcopy /i /s /e /y
+
 CPR=cp -r
 CP=cp
 MKDIR=mkdir -p
@@ -22,7 +28,7 @@
 NMAKE=nmake
 CSCRIPT=cscript
 ECHO=echo
-ISS_DIR=/cygdrive/c/Progra~1/Inno Setup 4
+ISS_DIR=$(CYGROOT)/Progra~1/Inno Setup 4
 ISS_COMPILER=$(ISS_DIR)/Compil32.exe
 
 $(REQUIRED_FILES):
@@ -34,14 +40,6 @@
 
 PYLIBDIR=build/instance/lib/python
 
-CUSTOM_REPO_TAIL=korak.zope.com:/cvs-customer/TurboIntranet
-
-CUSTOM_CVS_REPOSITORY=:ext:${CUSTOM_REPO_TAIL}
-
-SHARED_REPO_TAIL=korak.zope.com:/cvs-customer/Shared
-
-SHARED_CUSTOMER_REPOSITORY=:ext:${SHARED_REPO_TAIL}
-
 ZOPE_CVS_REPOSITORY=:pserver:anonymous at cvs.zope.org:/cvs-repository
 
 CVS=/usr/bin/cvs -z7 -q
@@ -49,3 +47,18 @@
 
 CVSROOT=:ext:korak.zope.com:/cvs-turbointranet
 
+# Use COPY_AND_WINDOWIZE_LINEENDS like so:
+#
+#     destination_path: source_path
+#               $(COPY_AND_WINDOWIZE_LINEENDS)
+#
+# Any directories needed to hold destination_path are created.  The file
+# is copied from source_path to there, and unix2dos is run on it in its
+# new home.  The paths must give file names, not directories; this reflects
+# that renaming of files is often needed in these makefiles.
+define COPY_AND_WINDOWIZE_LINEENDS
+	$(MKDIR) $(@D)
+	$(CP) $< $@
+	unix2dos $@
+	$(TOUCH) $@
+endef
\ No newline at end of file


=== Packages/WinBuilders/mk/python.mk 1.7 => 1.8 ===
--- Packages/WinBuilders/mk/python.mk:1.7	Wed Jan 28 11:35:55 2004
+++ Packages/WinBuilders/mk/python.mk	Thu Feb  5 00:08:55 2004
@@ -1,209 +1,128 @@
-# Operation notes:
-
-# During the Python build, the bsddb and _tkinter modules
-# build failures are expected.  No other build failures should occur.
-
-# test_python tests for largefile support; this requires over 2GB of
-# free space on windws because windows has no notion of sparse files.
-
-# No test_python tests are expected to fail on windows, but some tests
-# will be skipped.  Here are the tests for Python 2.2.3 that are expected
-# to be skipped:
-
-#   test_bsddb
-#   test_cd
-#   test_cl
-#   test_commands
-#   test_crypt
-#   test_curses
-#   test_dbm
-#   test_dl
-#   test_email_codecs
-#   test_fcntl
-#   test_fork1
-#   test_gdbm
-#   test_gl
-#   test_grp
-#   test_imgfile
-#   test_linuxaudiodev
-#   test_mhlib
-#   test_nis
-#   test_optnpty
-#   test_poll
-#   test_pty
-#   test_pwd
-#   test_signal
-#   test_socket_ssl
-#   test_sunaudiodev
-#   test_timing
-
-# some deprecation warnings about :complex divmod(), // and % are deprecated"
-# are expected during the test run as well
-
-PYTHON_REQUIRED_FILES=tmp/$(ZLIBDIRNAME).tar.gz \
-               tmp/expat_win32bin_$(EXPATVERSION).exe \
-               tmp/$(W32ALLDIRNAME).exe \
-               tmp/$(PYDIRNAME).tgz \
-
-PYPROJECTS=pythoncore python pythonw parser _socket _sre \
-           _symtable _testcapi mmap select unicodedata w9xpopen winreg \
-           winsound datetime _bsddb pyexpat zlib \
+# The Python and win32all versions.  For Python, both the source tarball
+# and the Windows installer must be in tmp/.  For win32all, the Windows
+# installer must be in tmp/.  Nothing beyond those is required to
+# build Python, and you don't even need a compiler for this part.
+PYVERSION=2.3.3
+W32ALLVERSION=163
 
-PYPROJECTS_BUILDFLAGS=$(PYPROJECTS:%=$(PYPCBUILDDIR)/%.builtflag)
+# CAUTION:  Extracting files from Wise installers doesn't really do what
+# you expect.  While a Wise installer is a zip file, the zip file
+# structure is flat (Wise reconstructs the intended directory structure
+# from metadata stored in proprietary FILEnnnn.DAT files also in the
+# zip file).  Consequently, the package structure of Python packages is
+# lost, and if there's more than one file with the same name, you only
+# get "the last one" to be extracted (all files are extracted to the
+# same directory).
+#
+# For Python, this doesn't matter, because we're only sucking out the
+# precompiled .pyd and .exe files from the Python installer -- there
+# are no name clashes in that set, and it's a pretty safe bet there never
+# will be (else Python wouldn't be able to decide which to use!).  We
+# use the Python source tarball to get all the non-executable parts we
+# need.
+#
+# For win32all, I'm not sure what all the consequences are.  Zope has
+# gotten away with it so far.  Favoring it, Zope makes little use of
+# win32all.  Against it, there's (as of the time of this writing) little
+# field experience with Windows Zope after Python 2.1.  Python and
+# win32all have both gotten hairier since then, and win32all has
+# significant package structure with many instances of files with the
+# same name in different subtrees.  For now it's poke-and-hope.
 
-PYVERSION=2.3.3
 PYDIRNAME=Python-$(PYVERSION)
-PYSRCDIR=$(BASE_DIR)/src/$(PYDIRNAME)
-WIN_PYSRCDIR=$(shell cygpath -w $(PYSRCDIR))
-PYPCBUILDDIR=$(PYSRCDIR)/PCbuild
-WIN_PYPCBUILDDIR=$(shell cygpath -w $(PYPCBUILDDIR))
-SETPATH=import sys; \
-       sys.path=['$(WIN_PYSRCDIR)\\Lib\\test','$(WIN_PYPCBUILDDIR)','$(WIN_PYSRCDIR)\\Lib']
-PYTESTCMD=$(SETPATH); from test import regrtest; \
-          regrtest.main(use_resources=['largefile','network'])
-
-W32ALLVERSION=163
 W32ALLDIRNAME=win32all-$(W32ALLVERSION)
 
-EXPATVERSION=1_95_6
+# The Python tarball is extracted to PYSRCDIR.
+# The contents of the Python installer get extracted to PYEXTRACTDIR.
+# The    "      "  "  win32all   "      "     "       " W32EXTRACTDIR.
+PYSRCDIR=$(BASE_DIR)/src/$(PYDIRNAME)
+PYEXTRACTDIR=$(BASE_DIR)/src/$(PYDIRNAME)-extract
+W32EXTRACTDIR=$(BASE_DIR)/src/$(W32ALLDIRNAME)
 
-ZLIBVERSION=1.1.4
-ZLIBDIRNAME=zlib-$(ZLIBVERSION)
+WIN_PYSRCDIR=$(shell cygpath -w $(PYSRCDIR))
+WIN_PYEXTRACTDIR=$(shell cygpath -w $(PYEXTRACTDIR))
+WIN_W32EXTRACTDIR=$(shell cygpath -w $(W32EXTRACTDIR))
 
-VC=msdev
+PYTHON_REQUIRED_FILES=tmp/$(W32ALLDIRNAME).exe \
+                      tmp/$(PYDIRNAME).tgz \
+                      tmp/$(PYDIRNAME).exe
+
+# Arbitrary files from each of the installers and tarballs, to use as
+# targets to force them to get unpacked.
+ARB_PYSRCDIR=$(PYSRCDIR)/PCbuild/pcbuild.dsw
+ARB_PYEXTRACTDIR=$(PYEXTRACTDIR)/zlib.pyd
+ARB_W32EXTRACTDIR=$(W32EXTRACTDIR)/readme.txt
 
-.PHONY: $(PYPROJECTS)
+# Building Python just consists of extracting files.
+build_python: $(ARB_PYSRCDIR) $(ARB_PYEXTRACTDIR) $(ARB_W32EXTRACTDIR)
 
-# run the standard python test suite (including largefile and network tests)
-test_python:
-	"$(PYPCBUILDDIR)/python.exe" -c "$(PYTESTCMD)"
-
-# build python from source
-# also copy files around to allow the generated python to compile extensions
-# in-place
-build_python: $(PYPCBUILDDIR)/pcbuild.dsw \
-              $(PYPCBUILDDIR)/libexpat.dll \
-              patch_pyexpat \
-              src/expat/Source/expat.dsw \
-              src/$(ZLIBDIRNAME)/zlib.h \
-              src/$(W32ALLDIRNAME)/readme.txt \
-              $(PYPROJECTS_BUILDFLAGS) \
-              $(PYSRCDIR)/Include/pyconfig.h \
-              $(PYSRCDIR)/libs/python23.lib
-
-$(PYSRCDIR)/Include/pyconfig.h:
-	$(MKDIR) "$(PYSRCDIR)/Include"
-	$(CP) "$(PYSRCDIR)/PC/pyconfig.h" "$(PYSRCDIR)/Include"
-
-
-$(PYSRCDIR)/libs/python23.lib:
-	$(MKDIR) "$(PYSRCDIR)/libs"
-	$(CP) "$(PYPCBUILDDIR)/python23.lib" "$(PYSRCDIR)/libs"
-
-$(PYPROJECTS_BUILDFLAGS):
-	$(CD) $(PYPCBUILDDIR); \
-           MAKEFLAGS=; export MAKEFLAGS;\
-           $(VC) pcbuild.dsw /MAKE "$(@F:%.builtflag=%) - Win32 Release" /OUT \
-           $(@F:%.builtflag=%.buildlog)
-	$(TOUCH) "$@"
-
-patch_pyexpat: $(PYPCBUILDDIR)/pyexpat.org
-
-# patch pyexpat.dsp (Python VC++ project file) as it has an improper
-# declaration
-$(PYPCBUILDDIR)/pyexpat.org: EXPAT_SED="s@\\\\expat.lib@\\\\libexpat.lib at g"
-$(PYPCBUILDDIR)/pyexpat.org:
-	$(CP) "$(PYPCBUILDDIR)/pyexpat.dsp" "$(PYPCBUILDDIR)/pyexpat.org"
-	$(SED) $(EXPAT_SED)  < "$(PYPCBUILDDIR)/pyexpat.dsp" | unix2dos  > "$(PYPCBUILDDIR)/pyexpat.new"
-	$(CP) "$(PYPCBUILDDIR)/pyexpat.new" "$(PYPCBUILDDIR)/pyexpat.dsp"
-	$(TOUCH) "$(PYPCBUILDDIR)/pyexpat.org"
-
-$(PYPCBUILDDIR)/libexpat.dll: src/expat/Source/expat.dsw \
-                              $(PYPCBUILDDIR)/pcbuild.dsw
-	$(CP) "$(SRC_DIR)/expat/Libs/libexpat.dll" "$(PYPCBUILDDIR)"
-	$(TOUCH) "$(PYPCBUILDDIR)/libexpat.dll"
+# Installing Python consists of copying oodles of files into
+# $(BUILD_DIR).
+install_python: $(BUILD_DIR)/bin/python.exe
 
 clean_python:
-	$(RMRF) src/$(PYDIRNAME)
+	$(RMRF) $(PYSRCDIR)
+	$(RMRF) $(PYEXTRACTDIR)
 
 clean_libs:
-	$(RMRF) src/expat
-	$(RMRF) src/$(ZLIBDIRNAME)
-	$(RMRF) src/$(W32ALLDIRNAME)
+	$(RMRF) $(W32EXTRACTDIR)
 
-install_python: $(BUILD_DIR)/bin/python.exe
+$(ARB_PYSRCDIR): tmp/$(PYDIRNAME).tgz
+	$(MKDIR) "$(SRC_DIR)"
+	$(CD) "$(SRC_DIR)" && $(TAR) xvzf ../tmp/$(PYDIRNAME).tgz
+	$(TOUCH) "$(ARB_PYSRCDIR)"
+
+$(ARB_PYEXTRACTDIR): tmp/$(PYDIRNAME).exe
+	$(MKDIR) "$(PYEXTRACTDIR)"
+	"tmp/$(PYDIRNAME).exe" /S /X "$(WIN_PYEXTRACTDIR)"
+	$(TOUCH) "$(ARB_PYEXTRACTDIR)"
+
+$(ARB_W32EXTRACTDIR): tmp/$(W32ALLDIRNAME).exe
+	$(MKDIR) "$(W32EXTRACTDIR)"
+	"tmp/$(W32ALLDIRNAME).exe" /S /X "$(WIN_W32EXTRACTDIR)"
+	$(TOUCH) "$(ARB_W32EXTRACTDIR)"
 
 $(BUILD_DIR)/bin/python.exe:
 	$(MKDIR) "$(BUILD_DIR)"
 
 	$(MKDIR) "$(BUILD_DIR)/doc"
-	$(CP) "$(MAKEFILEDIR)/doc/ZC_PY_DIST_README.txt" \
-             "$(BUILD_DIR)/doc"
+	$(CP) "$(MAKEFILEDIR)/doc/ZC_PY_DIST_README.txt" "$(BUILD_DIR)/doc"
 	$(CP) "$(PYSRCDIR)/LICENSE" "$(BUILD_DIR)/doc/PYTHON_LICENSE.txt"
+	unix2dos "$(BUILD_DIR)/doc/PYTHON_LICENSE.txt"
 	$(CP) "$(SRC_DIR)/$(W32ALLDIRNAME)/License.txt" \
-            "$(BUILD_DIR)/doc/WIN32ALL_LICENSE.txt"
-	$(CP) "$(SRC_DIR)/expat/COPYING.txt" \
-            "$(BUILD_DIR)/doc/EXPAT_LICENSE.txt"
-	$(CP) "$(SRC_DIR)/$(ZLIBDIRNAME)/README" \
-            "$(BUILD_DIR)/doc/ZLIB_LICENSE.txt"
-
-	$(MKDIR) "$(BUILD_DIR)/bin"
-	$(CP) "$(PYPCBUILDDIR)/python.exe" "$(BUILD_DIR)/bin"
-	$(CP) "$(PYPCBUILDDIR)/pythonw.exe" "$(BUILD_DIR)/bin"
-	$(CP) "$(PYPCBUILDDIR)/w9xpopen.exe" "$(BUILD_DIR)/bin"
-	$(CP) "$(PYPCBUILDDIR)/python23.dll" "$(BUILD_DIR)/bin"
+	      "$(BUILD_DIR)/doc/WIN32ALL_LICENSE.txt"
 
 	$(MKDIR) "$(BUILD_DIR)/bin/DLLs"
-	$(XCOPY) "$(WIN_PYPCBUILDDIR)\*.pyd" "$(WIN_BUILD_DIR)\bin\DLLs"
-	$(CP) "$(PYPCBUILDDIR)/libexpat.dll" "$(BUILD_DIR)/bin/DLLs"
+	$(XCOPY) "$(WIN_PYEXTRACTDIR)\*.pyd" "$(WIN_BUILD_DIR)\bin\DLLs"
 
 	$(MKDIR) "$(BUILD_DIR)/bin/Lib"
 	$(XCOPY) "$(WIN_PYSRCDIR)\Lib\*.py" "$(WIN_BUILD_DIR)\bin\Lib"
 	$(MKDIR) "$(BUILD_DIR)/bin/Lib/site-packages"
 	$(CP) "$(PYSRCDIR)/Lib/site-packages/README" \
-             "$(BUILD_DIR)/bin/Lib/site-packages"
-	$(XCOPY) "$(WIN_SRC_DIR)\$(W32ALLDIRNAME)\*.pyd" \
-             "$(WIN_BUILD_DIR)\bin\Lib\site-packages"
-	$(XCOPY) "$(WIN_SRC_DIR)\$(W32ALLDIRNAME)\*.dll" \
-             "$(WIN_BUILD_DIR)\bin\Lib\site-packages"
-	$(XCOPY) "$(WIN_SRC_DIR)\$(W32ALLDIRNAME)\*.exe" \
-             "$(WIN_BUILD_DIR)\bin\Lib\site-packages"
-	$(XCOPY) "$(WIN_SRC_DIR)\$(W32ALLDIRNAME)\*.py" \
-             "$(WIN_BUILD_DIR)\bin\Lib\site-packages"
+	      "$(BUILD_DIR)/bin/Lib/site-packages"
+	$(XCOPY) "$(WIN_W32EXTRACTDIR)\*.pyd" \
+	         "$(WIN_BUILD_DIR)\bin\Lib\site-packages"
+	$(XCOPY) "$(WIN_W32EXTRACTDIR)\*.dll" \
+		 "$(WIN_BUILD_DIR)\bin\Lib\site-packages"
+	$(XCOPY) "$(WIN_W32EXTRACTDIR)\*.exe" \
+		 "$(WIN_BUILD_DIR)\bin\Lib\site-packages"
+	$(XCOPY) "$(WIN_W32EXTRACTDIR)\*.py" \
+		 "$(WIN_BUILD_DIR)\bin\Lib\site-packages"
+
 	$(CP) "$(MAKEFILEDIR)/etc/sitecustomize.py" \
-             "$(BUILD_DIR)/bin/Lib/site-packages"
+	      "$(BUILD_DIR)/bin/Lib/site-packages"
 
 	$(MKDIR) "$(BUILD_DIR)/bin/Include"
 	$(XCOPY) "$(WIN_PYSRCDIR)\Include\*.h" "$(WIN_BUILD_DIR)\bin\Include"
 	$(XCOPY) "$(WIN_PYSRCDIR)\PC\*.h" "$(WIN_BUILD_DIR)\bin\Include"
 
 	$(MKDIR) "$(BUILD_DIR)/bin/libs"
-	$(CP) "$(PYPCBUILDDIR)/python23.lib" "$(BUILD_DIR)/bin/libs"
-
-	$(CD) "$(BASE_DIR)"
+	$(CP) "$(PYEXTRACTDIR)/python23.lib" "$(BUILD_DIR)/bin/libs"
 
+	$(MKDIR) "$(BUILD_DIR)/bin"
+	$(CP) "$(PYEXTRACTDIR)/pythonw.exe" "$(BUILD_DIR)/bin"
+	$(CP) "$(PYEXTRACTDIR)/w9xpopen.exe" "$(BUILD_DIR)/bin"
+	$(CP) "$(PYEXTRACTDIR)/python23.dll" "$(BUILD_DIR)/bin"
+	$(CP) "$(PYEXTRACTDIR)/python.exe" "$(BUILD_DIR)/bin"
 	$(TOUCH) "$(BUILD_DIR)/bin/python.exe"
-
-src/expat/Source/expat.dsw: tmp/expat_win32bin_$(EXPATVERSION).exe
-	$(MKDIR) "$(SRC_DIR)"
-	tmp/expat_win32bin_$(EXPATVERSION).exe \
-               /SP /VERYSILENT /NOCANCEL /NORESTART \
-               /DIR="$(WIN_BASE_DIR)\src\expat" /NOICONS
-	$(TOUCH) "src/expat/Source/expat.dsw"
-
-$(PYPCBUILDDIR)/pcbuild.dsw: tmp/$(PYDIRNAME).tgz
-	$(MKDIR) "$(SRC_DIR)"
-	$(CD) "$(SRC_DIR)" && $(TAR) xvzf ../tmp/$(PYDIRNAME).tgz && \
-            $(TOUCH) "$(PYPCBUILDDIR)/pcbuild.dsw"
-
-src/$(ZLIBDIRNAME)/zlib.h: tmp/$(ZLIBDIRNAME).tar.gz
-	$(MKDIR) "$(SRC_DIR)"
-	$(CD) "$(SRC_DIR)"; $(TAR) xvzf ../tmp/$(ZLIBDIRNAME).tar.gz; \
-            $(TOUCH) "$(ZLIBDIRNAME)/zlib.h"
-
-src/$(W32ALLDIRNAME)/readme.txt: tmp/$(W32ALLDIRNAME).exe
-	$(MKDIR) "$(SRC_DIR)/$(W32ALLDIRNAME)"
-	"$(BASE_DIR)/tmp/$(W32ALLDIRNAME).exe" \
-            /S /X "$(WIN_SRC_DIR)\$(W32ALLDIRNAME)"
-	$(TOUCH) "src/$(W32ALLDIRNAME)/readme.txt"
 


=== Packages/WinBuilders/mk/zeo.mk 1.4 => 1.5 ===
--- Packages/WinBuilders/mk/zeo.mk:1.4	Fri Jan 30 01:18:12 2004
+++ Packages/WinBuilders/mk/zeo.mk	Thu Feb  5 00:08:55 2004
@@ -12,20 +12,31 @@
 
 install_zeo: src/$(ZODBDIRNAME)/setup.py install_python \
              $(BUILD_DIR)/lib/python/version.txt \
-             $(BUILD_DIR)/ZEO-$(ZODBDIRNAME)-win32.exe \
+             $(BUILD_DIR)/ZEO-$(ZODBDIRNAME)-win32.exe
 
 ESCAPED=$(shell sh $(MAKEFILEDIR)/bin/escape.sh '$(WIN_MAKEFILEDIR)')
 SEDSCRIPT="s@<<VERSION>>@$(ZODBVERSION)@g;s@<<MAKEFILEDIR>>@$(ESCAPED)@g"
 
 $(BUILD_DIR)/ZEO-$(ZODBDIRNAME)-win32.exe: $(BUILD_DIR)/lib/python/version.txt
 	$(SED) $(SEDSCRIPT) < "$(MAKEFILEDIR)/etc/zeo.iss.in" | unix2dos > "$(BUILD_DIR)/zeo.iss"
+
+	# Remove CVS directories from the build tree.
+	find $(BUILD_DIR) -name CVS -type d -exec $(RMRF) {} \; -prune
+
+	# Convert text files to Windows line ends.  unix2dos has the nice
+	# property that it leaves lines with \r\n alone, so it doesn't hurt
+	# to do this on files already converted to Windows convention.
+	find $(BUILD_DIR) -name "*.py" -o -name "*.txt" -o -name "*.bat" | \
+		xargs unix2dos
+
+	# Build the Inno installer.
 	$(CD) "$(BUILD_DIR)";"$(ISS_COMPILER)" /cc "$(WIN_BUILD_DIR)\zeo.iss"
 
 $(BUILD_DIR)/lib/python/ExtensionClass.pyd: WIN_TMPDIR=tmp\zeotmp
 $(BUILD_DIR)/lib/python/ExtensionClass.pyd: install_python
 	$(MKDIR) $(WIN_TMPDIR)
 	$(CD) $(SRC_DIR)/$(ZODBDIRNAME); \
-            $(PYPCBUILDDIR)/python.exe setup.py install \
+            $(BUILD_DIR)/bin/python.exe setup.py install \
             --prefix="$(WIN_BASE_DIR)\$(WIN_TMPDIR)" --no-compile
 	$(MKDIR) $(@D)
 	$(XCOPY) "$(WIN_TMPDIR)\Lib\site-packages\*.py" "$(shell cygpath -w $(@D))"


=== Packages/WinBuilders/mk/zope.mk 1.5 => 1.6 ===
--- Packages/WinBuilders/mk/zope.mk:1.5	Wed Jan 28 11:13:53 2004
+++ Packages/WinBuilders/mk/zope.mk	Thu Feb  5 00:08:55 2004
@@ -8,7 +8,7 @@
 
 MAKEZOPE="$(MAKEFILEDIR)/bin/makezope.bat" "$(WIN_BUILD_DIR)"
 # run the Zope tests
-test_zope: 
+test_zope:
 	$(CD) "$(BASE_DIR)/src/Zope"
 	"$(PYPCBUILDDIR)/python.exe" utilities/testrunner.py -a
 	$(CD) "$(BASE_DIR)"
@@ -24,11 +24,22 @@
 
 $(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe: $(BUILD_DIR)/lib/python/version.txt
 	$(SED) $(SEDSCRIPT) < "$(MAKEFILEDIR)/etc/zope.iss.in" | unix2dos > "$(BUILD_DIR)/zope.iss"
+
+	# Remove CVS directories from the build tree.
+	find $(BUILD_DIR) -name CVS -type d -exec $(RMRF) {} \; -prune
+
+	# Convert text files to Windows line ends.  unix2dos has the nice
+	# property that it leaves lines with \r\n alone, so it doesn't hurt
+	# to do this on files already converted to Windows convention.
+	find $(BUILD_DIR) -name "*.py" -o -name "*.txt" -o -name "*.bat" | \
+		xargs unix2dos
+
+	# Build the Inno installer.
 	$(CD) "$(BUILD_DIR)";"$(ISS_COMPILER)" /cc "$(WIN_BUILD_DIR)\zope.iss"
 
 $(BUILD_DIR)/lib/python/Zope/Startup/run.py:
 	$(CD) "$(BUILD_DIR)"; \
-	$(PYPCBUILDDIR)/python.exe \
+	bin/python.exe \
             "$(WIN_SRC_DIR)\$(ZOPEDIRNAME)\inst\configure.py" \
             --prefix="$(WIN_BUILD_DIR)" --no-compile
 	$(MAKEZOPE)




More information about the Zope-CVS mailing list