Fwd: Windows daily builds + py2exe + Python 2.5

Marcos Chaves marcos.nospam at gmail.com
Thu Jan 4 12:00:37 CST 2007


Hi,

since demandimport was introduced, I can't compile (or compile AND
run) Mercurial on windows, and the steps below are not valid anymore.
I'd like to know if anything special is done when creating the
packages, since the steps on contrib/win32/win32-build.txt don't seem
to work to me.

Is there anybody else compiling/packing hg on windows? How do you do it?

Thanks again,

-Marcos

---------- Forwarded message ----------
From: Marcos Chaves <marcos.nospam at gmail.com>
Date: Nov 29, 2006 2:23 AM
Subject: Windows daily builds + py2exe + Python 2.5
To: mercurial-devel at selenic.com


Hi,

FWIW, here's my list of... hmm... "manual patches" to create my daily
build on windows, using Python 2.5. These are complements to the
instructions provided in the contrib/win32/ directory:

Before running py2exe:

* fix a bug in py2exe for Python 2.5 - linecache.getline() now has
three arguments. Fix
C:\Python25\Lib\site-packages\py2exe\boot_common.py with the following
patch:

--- boot_common.py-orig 2006-11-29 00:16:35.000000000 -0200
+++ boot_common.py      2006-11-29 00:14:49.000000000 -0200
@@ -90,7 +90,7 @@
  # someone elses removable or network drive so the getline() call
 # causes it to ask them to insert a disk in that drive.
  import linecache
-def fake_getline(filename, lineno):
+def fake_getline(filename, lineno, module_globals = None):
     return ''
  linecache.orig_getline = linecache.getline
  linecache.getline = fake_getline

The "= None" just makes this patch work with earlier versions of
Python too. I don't know who originally posted this on the web,
because it can be found everywhere.

* call py2exe without the "-b 1" option mentioned on
"win32-build.txt". I don't know what that means, but this option
prevents py2exe to find some of the modules imported by
mercurial.demandload.

* add build\bdist.win32\winexe\collect-2.5\email\iterators.py to
dist\library.zip. This should be a simple fix on setup.py, but I still
don't know how to do it - I noticed that this was missing today when
'hg import' crashed.

If I can come with nice patches to make this process easier, I'll send
them to the list.

Anyone with similar experiences?

-Marcos


More information about the Mercurial-devel mailing list