Mike Lin | 4 Jun 06:15 2004
Picon

Building on win32 without cygwin

Hi, I'm trying to build Synopsis on win32 without Cygwin. Im using a 
variety of win32 tools to do this, like mingw, pthread-win32 etc. My 
problem is that in the setup.py it calls the configure scripts like this:
C:\development\msys\1.0\bin\sh.exe -c 
"../../../../../../Synopsis/Parsers/Cxx/co
nfigure --with-python=`cygpath -a C:\\DEVELO~1\\Python23`/python.exe"

Which doesnt work because i dont have cygpath. Im not familiar enough 
with distutils to fix this. I have succeded in compile the Cxx parser on 
its own, but it would be nice to have the rest working. Any help would 
be awesome!

Thanks,
Mike
Stefan Seefeld | 4 Jun 07:14 2004
Picon

Re: Building on win32 without cygwin

Mike Lin wrote:
> Hi, I'm trying to build Synopsis on win32 without Cygwin. Im using a 
> variety of win32 tools to do this, like mingw, pthread-win32 etc. My 
> problem is that in the setup.py it calls the configure scripts like this:
> C:\development\msys\1.0\bin\sh.exe -c 
> "../../../../../../Synopsis/Parsers/Cxx/co
> nfigure --with-python=`cygpath -a C:\\DEVELO~1\\Python23`/python.exe"
> 
> Which doesnt work because i dont have cygpath.

The idea was to require cygwin as the development environment, and
then either build *for* cygwin (i.e. using cygwin as runtime environment,
too), or native, i.e. use 'gcc -mno-cygwin' (or however the flag is called)
to build something that can be run without any support libs from cygwin.

I'm very open to enhancements to the build process, though right now I
don't have access to a windows machine to help to develop it. (that will
probably change in the coming weeks).

Some people even suggested to switch away from make/autotools to something
else such as scons.

> Im not familiar enough 
> with distutils to fix this. I have succeded in compile the Cxx parser on 
> its own, but it would be nice to have the rest working. Any help would 
> be awesome!

How did you compile the Cxx parser ? In particular, how did you link with the
python library ? Is the Cxx parser usable as a synopsis module ?

(Continue reading)

Mike Lin | 5 Jun 03:34 2004
Picon

Building on win32 without Cygwin

Hi, I'm trying to build Synopsis on win32 without Cygwin. Im using a 
variety of win32 tools to do this, like mingw, pthread-win32 etc. My 
problem is that in the setup.py it calls the configure scripts like this:
C:\development\msys\1.0\bin\sh.exe -c 
"../../../../../../Synopsis/Parsers/Cxx/co
nfigure --with-python=`cygpath -a C:\\DEVELO~1\\Python23`/python.exe"

Which doesnt work because i dont have cygpath. Im not familiar enough 
with distutils to fix this. I have succeded in compile the Cxx parser on 
its own, but it would be nice to have the rest working. Any help would 
be awesome!

Thanks,
Mike
lists | 5 Jun 20:16 2004
Picon

Re: [Synopsis-devel] Building on win32 without Cygwin


>I'm very open to enhancements to the build process, though right now I
>don't have access to a windows machine to help to develop it. (that >will probably change in the coming weeks).
>
>Some people even suggested to switch away from make/autotools to >something else such as scons.

I've tried scons. It seems pretty cool, but I'm not sure how well it
replaces configure in terms of finding all the tools to use.

>How did you compile the Cxx parser ? In particular, how did you link >with the python library ? 

I put the python23.dll in my mingw/lib directory, then added -lpython23
to LIBS in the makefile for the Cxx parser. you're supposed turn the
python23.dll into libpython23.a like this
(http://sebsauvage.net/python/mingw.html) but for some reason this
worked for me.

>Is the Cxx parser usable as a synopsis module ?

Yes! in Cxx/emul.py, there is a path containing ~ that my system didnt
like, but after removing that it worked fine, using 

synopsis.py -p Cxx -f HTML -o Paths path.h

To be honest, I want to use your Cxx parser to make a test collector in
python (http://www.c2.com/cgi/wiki?TestCollector). How do I call the
parser directly from a python script? using Cxx.Parser.process, I'm not
sure what to pass into as the parameter 'ast', or how to get the AST
object out.

(Continue reading)

Stefan Seefeld | 8 Jun 04:34 2004

Re: Re: [Synopsis-devel] Building on win32 without Cygwin

lists <at> mikelin.ca wrote:

> I've tried scons. It seems pretty cool, but I'm not sure how well it
> replaces configure in terms of finding all the tools to use.

I don't think it does that at all. That's one reason I didn't go down
this route further.

> I put the python23.dll in my mingw/lib directory, then added -lpython23
> to LIBS in the makefile for the Cxx parser. you're supposed turn the
> python23.dll into libpython23.a like this
> (http://sebsauvage.net/python/mingw.html) but for some reason this
> worked for me.

Interesting. I'll have to try it out (I'll be working with windows
starting next week or so, so I can look into windows native support
for synopsis).
I'v come across a post on comp.lang.python where someone mailed about
an RFE concerning libpythonxy.a being included in windows python packages
for the above reason.

> To be honest, I want to use your Cxx parser to make a test collector in
> python (http://www.c2.com/cgi/wiki?TestCollector). How do I call the
> parser directly from a python script? using Cxx.Parser.process, I'm not
> sure what to pass into as the parameter 'ast', or how to get the AST
> object out.

indeed, and I don't think it would be of much use for you the way it is right now.
I'm not preserving the whole AST, but just the declarations. Is that really
enough for you to generate a unit test automatically ?
(Continue reading)


Gmane