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

Re: Python bindings build seems broken

From: David James <james82_at_gmail.com>
Date: Wed, 1 Oct 2008 21:47:35 -0700

On Wed, Oct 1, 2008 at 8:38 PM, C. Michael Pilato <cmpilato_at_red-bean.com> wrote:
> I don't have the Gnome or KWallet keyring stuff configured in my Subversion
> build, but that appears to not be preventing my Python SWIG bindings from
> trying to link against such. Shouldn't our headers files (which are what
> SWIG is parsing, IIUC) be conditionally defining those interfaces based on
> the presence of #defines like these (from svn_private_config.h):
> /* Is GNOME Keyring support enabled? */
> /* Is Mac OS KeyChain support enabled? */
> /* Is KWallet support enabled? */
> /* #undef SVN_HAVE_KWALLET */

Hi Mike,

This is a tricky issue. Since we ship the C files generated by SWIG in
the Subversion tarball, our generated files must be
platform-independent. Unfortunately, if we hide functions from SWIG,
our generated C files won't be platform-independent anymore.

I can see three ways to resolve this issue:
  1. Teach SWIG to add the necessary "#if" statements to the generated
C file, so that our generated C files continue to be platform
independent. This is the route that I took with the ctypes python
  2. Give up on shipping platform-independent C files, and instead
just add the necessary #if statements to the header files. In this
case, we will also need to update our build scripts so that we don't
include the generated C files in our tarball anymore.
  3. Bypass the whole issue by just teaching SWIG to ignore all of our
platform-specific functions.

If you do add #if statements to the header files, please make sure
that all platform-specific functions are defined when CTYPESGEN macro
is present. This is necessary so that ctypesgen can generate
definitions for the platform-specific functions in a
platform-independent manner. For example:
   #if defined(SVN_HAVE_GNOME_KEYRING) || defined(DOXYGEN) || defined(CTYPESGEN)

See also http://svn.haxx.se/dev/archive-2008-09/1120.shtml



To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-02 06:47:48 CEST

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