[SciPy-user] Weave problem

Barry Drake bldrake at adaptcs.com
Sat Oct 25 13:14:43 EDT 2003


> fibonacci.py build_ext --compiler=mingw32

This worked well and is what I will use for my own
code.

I just ran all of the test code in the /weave/tests
subdirectory by forcing the compiler usage in calls to
compile() and inline().  Most tests passed.  The scxx
and wx tests didn't pass since I couldn't find a way
to nonintrusively force the compiler to mingw32.

Thank you for your help.
Barry

--- "Travis N. Vaught" <travis at enthought.com> wrote:
> 
> 
> > -----Original Message-----
> > From: scipy-user-bounces at scipy.net
> [mailto:scipy-user-bounces at scipy.net]
> > On Behalf Of Barry Drake
> > Sent: Friday, October 24, 2003 10:11 PM
> > To: SciPy Users List
> > Subject: RE: [SciPy-user] Weave problem
> > 
> > > There is also --compiler=mingw32 setting that
> works
> > > on a distutils
> > > setup.py with the build_ext switch if you happen
> to
> > > be building an
> > > extension module with the ext_tools.
> > 
> > Travis,
> > Since weave is providing the front end for
> distutils,
> > do you know where in the weave code I could insert
> > this option? Or is it always the case that in
> using
> > weave the comple() method is always called at some
> > point?  In the latter case, you've already
> provided
> > the solution.
> > 
> > Barry
> 
> I think both are the case.  You could have run
> fibonacci.py with:
> 
>
C:\Python23\Lib\site-packages\weave\examples>c:\python23\python
> fibonacci.py build_ext --compiler=mingw32
> 
> Without having the compiler specified in the module
> (I think).
> 
> The --compiler switch is only available through with
> build_ext.
> 
> Regards
> 
> Travis
> 
> > 
> > --- "Travis N. Vaught" <travis at enthought.com>
> wrote:
> > > > -----Original Message-----
> > > > From: scipy-user-bounces at scipy.net
> > > [mailto:scipy-user-bounces at scipy.net]
> > > > On Behalf Of Barry Drake
> > > > Sent: Friday, October 24, 2003 7:28 PM
> > > > To: SciPy Users
> > > > Subject: [SciPy-user] Weave problem
> > > >
> > > > When I try to run the fibonacci.py that came
> > > installed
> > >
> > > <snip>
> > >
> > > >     compiler =
> > > new_compiler(compiler=compiler_name)
> > > >   File ".\distutils\ccompiler.py", line 1173,
> in
> > > > new_compiler
> > > >   File ".\distutils\msvccompiler.py", line
> 212, in
> > > > __init__
> > > > distutils.errors.DistutilsPlatformError:
> Python
> > > was
> > > > built with version 6 of Visual Studio, and
> > > extensions
> > > > need to be built with the same version of the
> > > > compiler, but it isn't installed.
> > > >
> > > > Does this mean I have to go out and buy MCVC
> 6.0
> > > and
> > > > uninstall MSVC 7.1 or rebuild Python 2.3 from
> the
> > > > ground up using my MSVC 7.1?  Is there some
> reason
> > > > that Python 2.3 was not built with mingw32,
> which
> > > is
> > > > supplied with the Enthought Python 2.3 dist.?
> > >
> > > [TNV]
> > >
> > > You can change line 65 to:
> > >
> > >     mod.compile(compiler='mingw32')
> > >
> > > and it works for me (I don't have the msvc
> compiler
> > > either)
> > >
> > > There is also --compiler=mingw32 setting that
> works
> > > on a distutils
> > > setup.py with the build_ext switch if you happen
> to
> > > be building an
> > > extension module with the ext_tools.
> > >
> > >
> > > > It
> > > > seems to me that the latter would make the use
> of
> > > > weave and other tools seamless regardless of
> which
> > > > MS*^(*&(* is installed.  Does anyone know of a
> > > less
> > > > painless way to get around the above problem?
> > > Please
> > > > tell me I'm missing something real simple; so
> far
> > > all
> > > > of my searching and digging has yieled
> nothing.
> > > >
> > >
> > > Apologies for the 'broken' example
> (broken=<requires
> > > ms product>)...the
> > > docs and examples are lagging a bit.
> > >
> > >
> > > Regards,
> > >
> > > Travis
> > >
> > >
> > > _______________________________________________
> > > SciPy-user mailing list
> > > SciPy-user at scipy.net
> > > http://www.scipy.net/mailman/listinfo/scipy-user
> > 
> > _______________________________________________
> > SciPy-user mailing list
> > SciPy-user at scipy.net
> > http://www.scipy.net/mailman/listinfo/scipy-user
> 
> 
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user



More information about the SciPy-User mailing list