[Zope-Checkins] SVN: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/ Pain, pain, and more pain.

Tim Peters tim.one at comcast.net
Thu Jan 12 18:38:14 EST 2006

Log message for revision 41291:
  Pain, pain, and more pain.
  The build-the-installer process now completes, and running
  the installer creates something that may or may not be a
  working Zope.  It starts fine as a Windows Service, and at
  least "looks like a Zope" ;-)
  Nothing in the build-the-Windows-installer process here
  uses anything in the root of the inst/ directory anymore.
  Instead the WinBuilders zope.mk builds Zope all by itself,
  using the Python created by python.mk.  Everything these
  used to use in the root of the inst/ directory was so out
  of whack with current reality that there was no point even
  trying to reverse-engineer what it thought it was doing.
  Note that comments in the code highlight what look like
  bugs in distutils, and in the Windows xcopy command (that
  last one took hours to track down -- sheesh).

  U   Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/etc/zope.iss.in
  U   Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/common.mk
  U   Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk
  U   Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk

Modified: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/etc/zope.iss.in
--- Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/etc/zope.iss.in	2006-01-12 19:36:15 UTC (rev 41290)
+++ Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/etc/zope.iss.in	2006-01-12 23:38:13 UTC (rev 41291)
@@ -31,13 +31,13 @@
 Source: "<<MAKEFILEDIR>>\etc\README.html"; DestDir: "{app}"; Flags: ignoreversion
 Source:"bin\*.*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs
 Source:"doc\*.*"; DestDir: "{app}\doc"; Flags: ignoreversion recursesubdirs
-Source:"import\*.*"; DestDir: "{app}\import"; Flags: ignoreversion recursesubdirs
 Source:"lib\*.*"; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs
 Source:"skel\*.*"; DestDir: "{app}\skel"; Flags: ignoreversion recursesubdirs
+Source:"zopeskel\*.*"; DestDir: "{app}\zopeskel"; Flags: ignoreversion recursesubdirs
 ; these are required to be put into the bin directory for proper function of NT services
 Source:"bin\Lib\site-packages\win32\PythonService.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
-Source:"bin\Lib\site-packages\pywin32_system32\PyWinTypes23.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
-Source:"bin\Lib\site-packages\pywin32_system32\PythonCOM23.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
+Source:"bin\Lib\site-packages\pywin32_system32\PyWinTypes24.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
+Source:"bin\Lib\site-packages\pywin32_system32\PythonCOM24.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
 ; This is a helper module for manging registry entries at uninstall time
 Source: "<<MAKEFILEDIR>>\bin\fixreg.py"; DestDir: "{app}\bin"; Flags: ignoreversion

Modified: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/common.mk
--- Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/common.mk	2006-01-12 19:36:15 UTC (rev 41290)
+++ Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/common.mk	2006-01-12 23:38:13 UTC (rev 41291)
@@ -17,7 +17,17 @@
 RMRF=rm -rf
-XCOPY=xcopy /i /s /e /y
+# xcopy args:
+# /i = if dest doesn't exist and source has more than one file, assume
+#      dest shoud be a directory
+# /y = don't prompt about overwriting dest if it exists -- just do it
+# /s = recurse, copying non-empty subdirectories too
+# CAUTION:  don't use /e unless you have to!  /e copies empty subdirectories
+# too, but has another truly bizarre behavior:  if you use xcopy to copy
+# a single file, and use /e, it creates empty subdirectories in the target's
+# directory with the same names as the subdirectories in the source's
+# directory.  This is worse than useless.
+XCOPY=xcopy /i /s /y
 CPR=cp -r

Modified: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk
--- Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk	2006-01-12 19:36:15 UTC (rev 41290)
+++ Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/python.mk	2006-01-12 23:38:13 UTC (rev 41291)
@@ -112,8 +112,7 @@
 	$(XCOPY) "$(WIN_MAKEFILEDIR)\bin\msvcr71.dll" "$(WIN_BUILD_DIR)\bin"
-						"$(WIN_BUILD_DIR)\bin\libs"
+	$(XCOPY) "$(WIN_PYINSTALLEDDIR)\libs" "$(WIN_BUILD_DIR)\bin\libs"

Modified: Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk
--- Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk	2006-01-12 19:36:15 UTC (rev 41290)
+++ Zope/branches/tim-2.9-windows-installer/inst/WinBuilders/mk/zope.mk	2006-01-12 23:38:13 UTC (rev 41291)
@@ -6,8 +6,8 @@
-MAKEZOPE="$(MAKEFILEDIR)/bin/makezope.bat" "$(WIN_BUILD_DIR)"
 # run the Zope tests
+# XXX This is out of date and can't work.
 	$(CD) "$(BASE_DIR)/src/Zope"
 	"$(PYPCBUILDDIR)/python.exe" utilities/testrunner.py -a
@@ -16,15 +16,15 @@
-install_zope: src/$(ZOPEDIRNAME)/inst/configure.py \
-	$(BUILD_DIR)/lib/python/version.txt \
+install_zope: src/$(ZOPEDIRNAME)/install.py \
 	install_python \
+	$(BUILD_DIR)/lib/python/Zope2/version.txt \
 ESCAPED=$(shell sh $(MAKEFILEDIR)/bin/escape.sh '$(WIN_MAKEFILEDIR)')
-$(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe: $(BUILD_DIR)/lib/python/version.txt
+$(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe: $(BUILD_DIR)/lib/python/Zope2/version.txt
 	$(SED) $(SEDSCRIPT) < "$(MAKEFILEDIR)/etc/zope.iss.in" | unix2dos > "$(BUILD_DIR)/zope.iss"
 	# Remove CVS directories and compiled Python files from the build tree.
@@ -44,19 +44,31 @@
 	# Build the Inno installer.
 	$(CD) "$(BUILD_DIR)";"$(ISS_COMPILER)" /cc "$(WIN_BUILD_DIR)\zope.iss"
-	$(CD) "$(BUILD_DIR)"; \
-	bin/python.exe \
-            "$(WIN_SRC_DIR)\$(ZOPEDIRNAME)\inst\configure.py" \
-            --prefix="$(WIN_BUILD_DIR)" --no-compile
-	$(TOUCH) "$(BUILD_DIR)/lib/python/Zope2/Startup/run.py"
+# This builds Zope, then installs it into the build directory, then
+# creates lib/python/Zope2/version.txt in the build directory.
+# Yuck:  for whatever reason, distutils refuses to allow an absolute
+# path for the --home option, so this hardcodes "build" as the name of
+# the build directory, and assumes "build" is a sibling of SRC_DIR.
+# Yuck:  the --no-compile option here has no effect:  the install step
+# creates oodles of unwanted .pyc files.  They're removed by the
+# $(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe target, though, before
+# building the installer.
+# Yuck:  no matter what I pass to --install-headers, it throws away the
+# last path component.  We actually want to copy the Zope/ZODB headers
+# into bin/Include.  The "nonsense" at the end gets throws away, and that
+# smells like a bug.  When it gets fixed, I suppose this will copy the
+# headers to bin/Include/nonsense/.
+$(BUILD_DIR)/lib/python/Zope2/version.txt: $(BUILD_DIR)/bin/python.exe
+	cd "$(SRC_DIR)/$(ZOPEDIRNAME)" && \
+		"$<" install.py install --no-compile --home=../../build \
+			--install-headers=../../build/bin/Include/nonsense
+	@echo Zope $(ZOPEVERSION) > $@
+	$(TOUCH) $@
-$(BUILD_DIR)/lib/python/version.txt: $(BUILD_DIR)/lib/python/Zope2/Startup/run.py
-	@echo Zope $(ZOPEVERSION) > "$(BUILD_DIR)/lib/python/version.txt"
-	$(TOUCH) "$(BUILD_DIR)/lib/python/version.txt"
+# This merely unpacks the Zope tarball.
 	$(MKDIR) "$(SRC_DIR)"
-	$(CD) "$(SRC_DIR)" && $(TAR) xvzf ../tmp/$(ZOPEDIRNAME).tgz \
-           && $(TOUCH) $(ZOPEDIRNAME)/inst/configure.py
+	$(CD) "$(SRC_DIR)" && $(TAR) xvzf ../tmp/$(ZOPEDIRNAME).tgz

More information about the Zope-Checkins mailing list