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

Re: [PATCH] Link Python bindings against platform-specific library directory v3 (was: Re: [PATCH] Explicitly link the python bindings against libpython (was: Re: Major upgrades to SWIG/Python bindings in r15848))

From: David James <james82_at_gmail.com>
Date: 2005-08-28 08:29:33 CEST

On 8/27/05, Justin Erenkrantz <justin@erenkrantz.com> wrote:
> On Sat, Aug 27, 2005 at 05:07:48PM -0400, David James wrote:
> > Great work, Justin! Your code works great on Linux and Cygwin. I also
> > tested on Solaris and Linux with separate platform-specific library
> > directories -- this caused a few problems. I've attached a patch to
> > fix this.
> >
> > I've checked the output of "get-py-info.py" on the following platforms:
> > - Shared libpython DSO / Python 2.2 (Redhat Linux 2.4)
> > - Shared libpython DLL / Python 2.4 (Cygwin)
> > - Custom-built Python 2.4 (Redhat Linux 2.4)
> > - Shared libpython DSO in separate platform-specific library
> > directories (Solaris / Python 2.2, Solaris / Python 2.3, Linux /
> > Python 2.3)
> >
> > The "Shared libpython DSO in separate platform-specific library
> > directories" test case only works with the following patch.
>
> This breaks on Ubuntu as it stores the DSO in $libdir/libpython2.4.so
> not in $libdir/python2.4/config/libpython2.4.so. (LIBP is set to
> $libdir/python2.4/config on Ubuntu.)
>
> Any thoughts? -- justin

Justin, does this patch work better?

[[[
Fix python library options when we have separate platform-specific
library directories, or when we are compiling on Mac OS X without a
framework.

Tested on:
- Shared libpython DSO / Python 2.2 (Redhat Linux 2.4)
- Shared libpython DLL / Python 2.4 (Cygwin)
- Custom-built Python 2.4 (Redhat Linux 2.4)
- Shared libpython DSO in separate platform-specific library
  directories (Solaris / Python 2.2, Solaris / Python 2.3, Linux /
  Python 2.3)
- Mac OS X without a framework (Mac OS X 10.2 / Python 2.2)

* build/get-py-info.py:
  (string): Remove include.
  (ldshared_process): Remove function.
  (remove_option): New function. Removes an option from a list of options.
  (add_option): New function. Adds an option to a list of options.
  (link_options): New function. Gets a list of the Python linker options.
        (lib_options): New function. Gets a list of the Python library options.
  (__main__): Use link_options and lib_options instead of ldshared_process.
]]

Cheers,

David

-- 
David James -- http://www.cs.toronto.edu/~james


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Sun Aug 28 08:31:00 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.