[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Proof of concept higher-level python bindings for SoC project

From: David James <james_at_cs.toronto.edu>
Date: 2007-05-02 22:55:40 CEST

On 5/2/07, Barry Scott <barry@barrys-emacs.org> wrote:
>
> On May 1, 2007, at 18:46, David James wrote:
>
> > On 5/1/07, David Glasser <glasser@mit.edu> wrote:
> >> On 5/1/07, David Glasser <glasser@mit.edu> wrote:
> >> > In autogen.py, the line
> >> >
> >> > os.system("cd %s && python %s/ctypesgen/wrap.py %s %s "
> >> > "%s -o svn_all.py" % (tempdir, os.getcwd(),
> >> > flags, ldflags, includes))
> >> >
> >> > doesn't work if your installation of Python 2.5 is not called
> >> python
> >> > (on MacPorts, for example, python is Python 2.4 by default); does
> >> > Python have a "current executable path" variable?
> >>
> >
> > Yup! You can find out the path to the python executable using the
> > "PYTHON" config var in distutils.sysconfig. I've patched autogen.py to
> > use this flag in r24870, following the example from
> > build/get-py-info.py in Subversion trunk.
> >
> distutils is not necessary; just use sys.executable

Good tip. It turns out that the distutils magic doesn't actually work
on Mac OS X, but sys.executable works great and is simple and
portable. (Dave suggested sys.executable as well.)

After fixing this issue, and several other issues, Dave has got the
ctypes bindings working on Mac OS X, so it looks like we're in good
shape!

Cheers,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 2 22:55:53 2007

This is an archived mail posted to the Subversion Dev mailing list.