List Info

Thread: Re: ctypes-python-bindings on Mac OS X autogen problems




Re: ctypes-python-bindings on Mac OS X autogen problems
user name
2007-11-06 11:34:27
On Nov 5, 2007 2:15 PM, Barry Scott <barrybarrys-emacs.org> wrote:
> On Nov 5, 2007, at 18:48, David James wrote:
>
> > On Nov 4, 2007 2:11 AM, Barry Scott <barrybarrys-emacs.org> wrote:
> >> I'm trying to get ctypes-python-bindings
working on Mac OS X 10.4.10.
> >> I build my own svn and use make install to add
it to the system.
> > ...
> >> Python.app/Contents/MacOS/Python: can't open
file '/Users/barry/wc/
> >>
svn/svn-ctypes-python-bindings/ctypesgen/wrap.py': [Errno 2]
No such
> >> file or directory
> >
> > Hi Barry,
> >
> > Did you download ctypesgen? It looks like
autogen.py can't find
> > ctypesgen. Here's a snippet from the install
instructions (in README):
> >
>
> No I did not - I had assumed that it was part of
ctypes.

Ah, okay. I've updated autogen.py with a check so that it
throws a
helpful error message in this situation so that other users
who make
this assumption won't get bitten.

> >> Next, checkout the latest version of ctypesgen
from
> >> http://code.googl
e.com/p/ctypesgen/ to a "ctypesgen"
subdirectory
> >> under
> >> the ctypes python bindings.
> >>
> >> For example:
> >>   $ svn co http://ctyp
esgen.googlecode.com/svn/trunk ctypesgen
> >
>
> example.py runs but there where errors reported from
autogen.py
>
> gcc -E
-I/Users/barry/BuildTemp/Darwin_emotion/subversion-1.4.5/apr
/
> include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK
-no-cpp-precomp -I/
> usr/local/svn-1.4.5/include/subversion-1 -U __GNUC__
-dD  "-Dinline="
> "-D__inline__=" "-D__extension__="
"-D_Bool=uint8_t" "-
> D__const=const" "-D__asm__(x)="
/tmp/tmpRHDOYD.h
> In file included from /tmp/tmpRHDOYD.h:2:
>
/usr/local/svn-1.4.5/include/subversion-1/svn_base64.h:25:21
: error:
> apr_md5.h: No such file or directory
> In file included from
/usr/local/svn-1.4.5/include/subversion-1/
> svn_cmdline.h:34,
>                   from /tmp/tmpRHDOYD.h:4:
>
/usr/local/svn-1.4.5/include/subversion-1/svn_utf.h:27:23:
error:
> apr_xlate.h: No such file or directory
> Parsing /tmp/tmpRHDOYD.h
> /usr/include/stdlib.h:181 Syntax error at '__asm'
> /usr/include/stdio.h:258 Syntax error at '__asm'
> /usr/include/stdio.h:264 Syntax error at '__asm'
> /usr/include/stdio.h:277 Syntax error at '__asm'
> /usr/include/stdio.h:284 Syntax error at '__asm'
> /usr/include/stdio.h:287 Syntax error at '__asm'
> /usr/include/stdio.h:288 Syntax error at '__asm'
> /usr/include/stdio.h:292 Syntax error at '__asm'
> /usr/include/stdio.h:293 Syntax error at '__asm'
> /usr/include/stdio.h:294 Syntax error at '__asm'
> /usr/include/stdio.h:296 Syntax error at '__asm'
> /usr/include/stdio.h:297 Syntax error at '__asm'
> /usr/include/stdio.h:342 Syntax error at '__asm'
> /usr/include/stdio.h:344 Syntax error at '__asm'
> /usr/include/stdio.h:345 Syntax error at '__asm'
> /usr/include/stdio.h:346 Syntax error at '__asm'
> /usr/include/stdio.h:347 Syntax error at '__asm'
> /usr/include/stdio.h:374 Syntax error at '__asm'
> <string>:1: Warning: 'with' will become a
reserved keyword in Python 2.6
> <string>:1: Warning: 'with' will become a
reserved keyword in Python 2.6
> Wrapped to svn_all.py
> Generated csvn/core/functions.py OK
>
>
> apr_md5 and apr_xlate are found bu using apu-config
--includes.
> You need an option for me to tell aufogen.py where to
find apu-config
>
> On the Mac it seems that you need to deal with __asm
not __asm__.
>
> It also seems that you need a policy on what you do
when you try to
> define a variable
> that is a python keyword. If you have such a policy it
needs to have
> "with" added to the
> keyword lists.

I believe I've fixed all of the above but I'd like you to
test to make
sure. To update to the latest version, please update both
'ctypes-python-bindings' AND 'ctypesgen'. To do this, type
'svn up' in
both the ctypesgen directory and the ctypes-python-bindings
directory.

For example:
   svn up && ( cd ctypesgen && svn up )

Try out the new version and let me know whether it fixes
your issues.
If it works, please also run the test suite (in
test/run_all.py) to
see whether the test suite passes. I've updated README with
instructions on running the test suite.

Thanks for your help!

Cheers,

David

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesubversion.tigris.org
For additional commands, e-mail: dev-helpsubversion.tigris.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )