[Zope-dev] win32 BTree seg - fix maybe
Miller, John M.
jmiller1@uop.com
Thu, 15 Jul 1999 12:24:15 -0500
I have had lots of luck using mingw32. The instructions at
http://starship.python.net/crew/kernr/mingw32/Notes.html are lucid and easy
to follow. I hacked compmgw.py a little so it does a little better job at
building Extension modules in the right place for Zope. I also did a very
small hack on do.py to detect when the OS was win32 and to use 'python
compmgw.py' then 'make' to build the extension modules. This way I can
pretty much just do a 'python wo_pcgi.py' at the top of my Zope distribution
and all builds (the extensions are all compiled to .pyd files) quite nicely
(assuming I have all the mingw paths set up correctly).
I'm going to have to spend some time studying your stuff before I can figure
out how all this would map to your ZMake files. Doesn't look like much (if
anything) needs to be done at all though. The only difference between mingw
and cygwin is the command line options used to build .pyd's. Just copy
cygwin.zmake and, change linker options, and add a rule for (.+)\.pyd:?
Just thinking aloud at this point, feel free to ignore with prejudice!
Cheers,
John
P.S. Here are the actual changes I made (one or both probably reversed
considering my general lack of coding discipline):
*** /tmp/compmgw.py Fri Jun 11 16:48:22 1999
--- /mingw/compmgw.py Tue Jul 13 08:13:11 1999
***************
*** 408,414 ****
self.OBJECT_RULES = ''
for file in self.cfiles:
! objfile = string.split(file, '.')[0] + '.o'
self.OBJECTS.append(objfile)
replacements = {'OBJ': objfile,
'SRC': file,
--- 408,415 ----
self.OBJECT_RULES = ''
for file in self.cfiles:
! # Ensure that path information from file remains intact
(important when compiling Zope).
! f, ext = os.path.splitext(file)
! objfile = f + '.o'
self.OBJECTS.append(objfile)
replacements = {'OBJ': objfile,
'SRC': file,
*** do.py Wed Jul 07 14:01:58 1999
--- do.py.orig Wed Mar 10 13:10:32 1999
***************
*** 109,123 ****
print 'Compiling extensions in %s' % string.join(args,'/')
for a in args: os.chdir(a)
-
- if sys.platform=='win32':
- # Try to do the compmgw.py+make combination to build .pyd's using
mingw
- do("python \mingw\compmgw.py")
- do("make")
- else:
# Copy over and use the prototype extensions makefile from python
dist:
! do("cp %s ." % wheres_Makefile_pre_in())
! do('make -f Makefile.pre.in boot PYTHON=%s' % sys.executable)
! do('make')
! do('make clean')
for a in args: os.chdir('..')
--- 109,117 ----
print 'Compiling extensions in %s' % string.join(args,'/')
for a in args: os.chdir(a)
# Copy over and use the prototype extensions makefile from python
dist:
! do("cp %s ." % wheres_Makefile_pre_in())
! do('make -f Makefile.pre.in boot PYTHON=%s' % sys.executable)
! do('make')
! do('make clean')
for a in args: os.chdir('..')
> -----Original Message-----
> From: Anthony Pfrunder [SMTP:s341625@student.uq.edu.au]
> Sent: Wednesday, July 14, 1999 5:19 PM
> To: Miller, John M.
> Cc: 'zope-dev@zope.org'
> Subject: Re: [Zope-dev] win32 BTree seg - fix maybe
>
> On Wed, 14 Jul 1999, Miller, John M. wrote:
>
> Yes, thats the only thing you need to fix to build Alpha 4 on Windows.
> Have you had any luck with mingw32? I'm interested in creating a
> universal makefile build system so that Zope (and other python stuff) can
> be built on many compilers without separate makefiles for each. Check out
> ZwinG2.zip on my site.
>
> Cheers,
>
> Anthony Pfrunder