[MERGE] Fix how cog.py is invoked on Windows

Mark Hammond skippy.hammond at gmail.com
Wed Jul 9 08:15:36 BST 2008


Hi all,
  Attached is a patch to how cog.py is executed by the build process.
Specifically, Makefile currently specifies the following command be
executed:

	cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog

But this fails to work for me when not using a cygwin or similar shell.
Further, adding .py to PATHEXT and ensuring the Python Scripts directory is
on the path doesn't help.

My solution was to introduce a new script - tools\win32\run_script.py - that
script will attempt to locate the real script you want to run and execute
it.  As a result, the new command for cog.py looks like:

	python tools/win32/run_script.py cog.py -d -o tools/win32/bzr.iss
tools/win32/bzr.iss.cog

This has the benefit of having no requirements other than a 'python.exe' be
on your PATH (which is already assumed elsewhere) - no need for the scripts
directory to be on the path, nor for other funky environment variables or
settings be used.

Cheers,

Mark


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: run_cog.patch.txt
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080709/a192e7e4/attachment.txt 


More information about the bazaar mailing list