[python-win32] Re: PyWin32 extensions can now be built usingdistutils

Mark Hammond mhammond at skippinet.com.au
Tue Dec 2 07:35:36 EST 2003


Thanks Thomas,
  I think I have fixed all your issues (your patch for the .mc, and a
slighly different one for the .chm).  It looks like I had an outstanding
change related to exchange and exchdapi, which I have also incorporated, so
I would be interested to know how that goes.

Mark.

> -----Original Message-----
> From: python-win32-bounces at python.org
> [mailto:python-win32-bounces at python.org]On Behalf Of Thomas Heller
> Sent: Tuesday, 2 December 2003 8:44 PM
> To: python-win32 at python.org
> Subject: [python-win32] Re: PyWin32 extensions can now be built
> usingdistutils
>
>
> "Mark Hammond" <mhammond at skippinet.com.au> writes:
>
> > This is for anyone who builds PyWin32/win32all from CVS source code.
> >
> > Currently, the instructions for building these extensions
> require you to use
> > Visual Studio, and perform lots of magic fiddling to get everything
> > installed and working.  But thanks to Thomas Heller, we now have a
> > 'distutils' setup script that does all this magic for you.
> >
> > I'd like anyone who builds from sources (or anyone who
> would like to, but
> > failed in the past) to try this out for me.  Eventually, I
> will update the
> > build instructions accordingly to make this the 'official'
> way to build and
> > install these extensions from source.  You still need MSVC
> (but should *not*
> > need Visual Studio - only the command-line compiler is used)
> >
> > To test this, follow these instructions:
> > * Remove any win32all installations, and remove any previously built
> > win32all extensions.  This isn't strictly necessary, but
> will help me to
> > ensure that everything works.  It will also avoid one or 2
> duplicate files
> > (notably, the .exe files)
> > * Pull the latest source-code from CVS - see the project
> sourceforge page.
> > * In the root directory, execute 'setup_win32all.py', with
> no arguments.
> > This will print a couple of pages of usage information,
> including what
> > params you use to build and install.  The short course is
> "setup_win32all.py
> > install" will build and install all the extensions.
> >
> > Once installed, you will find all built .pyd/.dll/.exe
> files, and .py files,
> > installed into your "site-packages" directory, as a normal win32all
> > installation would do.  You can build for multiple versions
> of Python simply
> > by changing the 'python.exe' used to execute 'setup_win32all.py'.
> > Instructions are also provided for building (and
> installing) debug versions
> > of the extensions.
> >
> > If anyone does try this, please let me know how you go -
> successful or
> > otherwise.
>
> Well, I had to make a couple of changes to get this to work on a fresh
> CVS checkout (diffs are attached):
>
> - I had to comment out 'pywin32.chm', this is not (yet) built.
>
> - I commented out the exchange and exchdapi extensions because some
> files were not found by the compiler (but I don't care about these).
>
> - I had to comment out the shell extension, this failed with linker
> errors (Hm, seems I cannot reproduce this).
>
> Then building of permondata.dll failed, because the script tries to
> compile perfmondata.cpp first, and complais about a missing
> PyPerfMsgs.h
> file.  The latter would be created by processing
> PyPerfMsgs.mc with the
> messaage compiler.  Therefore I changed the WinExt.get_sourcefile()
> method to sort the source files depending on the filename extension -
> but this requires a change to the msvccompiler class also.
>
> After these changes, I could build an install everything, and even
> Pythonwin.exe works!
>
> 'setup.py bdist_wininst' doesn't really work, but that is for later.
>
> Thomas
>
>




More information about the Python-win32 mailing list