Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost-python] some general questions
From: Travis Gockel (travis_at_[hidden])
Date: 2012-12-14 00:26:37


On Thu, Dec 13, 2012 at 9:38 AM, Ovanes Markarian <om_boost_at_[hidden]>wrote:

> Travis,
>
> many thanks for your reply. I have some additional questions, which I have
> written after your answer.
>
>
> On Thu, Dec 13, 2012 at 7:37 AM, Travis Gockel <travis_at_[hidden]>wrote:
>
>> On Dec 12, 2012 11:06 AM, "Ovanes Markarian" <om_boost_at_[hidden]>
>> wrote:
>> >
>> > Hello *,
>> >
>> > we are now considering to use some Python/C++ bindings and here came
>> Boost Python to my mind. I would like to ask what is the state of the
>> library? Is it still maintained? As far as I can see the library's doc is
>> dated back to 2003 (some of the doc's parts are from 2005) and the latest
>> python version to be known to work is Python 2.2.2.
>> >
>> > Is Python 2.7.2 going to work or supported at all?
>> >
>> > I also searched for some docs on how Boost Python bindings are going to
>> work with PyPy. Found some really old post describing the problems to
>> support Boost Python binding and some messages from the mailing list, which
>> describe, which functions must be implemented to support Boost Python in
>> PyPy.
>> >
>> > Any info would be great!
>>
> [...]
>
>> Yes, Boost.Python works great with Python 2.7!
>>
>> As far as compiling for the PyPy runtime...last time I checked, this was
>> not possible due to some unimplemented functions that Boost relies on (that
>> could have changed). Boost.Python is a system for communication between
>> CPython and C++, not a wrapper/interface generator like SWIG -- it
>> manipulates Python runtime objects quite directly.
>>
>> Hope that helps.
>>
> Ok, do you have any suggestions on how to connect Python App compiled with
> PyPy and Modules written in Boost.Python?
>
> Many thanks,
> Ovanes
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

PyPy purposefully wrote their API to be CPython compatible, so you should
be able to swap the PyPy headers instead of the CPython ones, build, link
and go. You typically have to set the include path explicitly for Python
anyway, so it's a matter of dropping -I/usr/include/pypy2.0 in place of
-I/usr/include/python2.7 (on my system at least, your headers could be
elsewhere).

-- 
Travis Gockel
Chief ë Combinator


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net