On Thu, Jan 21, 2010 at 11:26 PM, Gianluca Sforna <[email protected]> wrote:
> On Thu, Jan 21, 2010 at 8:57 PM, Greg Landrum <[email protected]> wrote:
> I see. So let's see if I managed to do a meaningful test :)
> I've just:
> 1. downloaded python 2.4.6 (Fedora 12 has 2.6)
> 2. ./configure --enable-shared --prefix=/home/giallu/python/
> 3. compiled and installed
>
> Then I reconfigured RDKit like this:
>
>> I'm aware of the -D flags (though in cmake 2.8 PYTHON_INCLUDE_PATH is
>> deprecated in favor of PYTHON_INCLUDE_DIR) and this is what I mention
>> in the wiki.
>
> ah, I just double checked the wiki and I spotted a difference with my
> build; I think
> cmake -D PYTHON_LIBRARIES=/usr/lib/python2.5/config/libpython2.5.a
> should be instead:
> cmake -D PYTHON_LIBRARY=/usr/lib/python2.5/config/libpython2.5.a
>
>> The reason for the long ugly bit in the CMakeLists.txt is
>> because it seems that the FindPythonLibs functionality ignores those
>> -D flags and just finds the default libraries for your system. So I
>> came up with the hackery to work around this problem. There's probably
>> a better way to solve the problem, but I wasn't able to find one.
>
> I see. So let's see if I managed to do a meaningful test :)
> I've just:
> 1. downloaded python 2.4.6 (Fedora 12 has 2.6)
> 2. ./configure --enable-shared --prefix=/home/giallu/python/
> 3. compiled and installed
>
> Then I reconfigured RDKit like this:
> cmake .. -DPYTHON_LIBRARY=/home/giallu/python/lib/libpython2.4.so
> -DPYTHON_INCLUDE_PATH=/home/giallu/python/include/python2.4/
>
> and AFAICT the builds happens as expected against 2.4.6
>
>>
>> I'm not currently at the machine where this problem arose, but I will
>> send an example tomorrow morning to show what I mean.
>
> While you are at that,  please double check the PYTHON_LIBRARY vs
> PYTHON_LIBRARIES I mentioned above.

hmm, according to the cmake docs it's PYTHON_LIBRARIES. This is true in v2.8:
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#module:FindPythonLibs
and v2.6:
http://www.cmake.org/cmake/help/cmake2.6docs.html#module:FindPythonLibs

But providing PYTHON_LIBRARIES on the command line definitely does
*not* work, as you caught. The command line argument should be
PYTHON_LIBRARY.

This confusion/documentation error is what drove the inclusion of the
"hackery" mess in the CMakeLists.txt file. If I use PYTHON_LIBRARY
instead I can get rid of the mess. I've updated the wiki and checked
in a new version of CMakeLists.txt.

> Thanks for your patience :)

You've got that backwards: I should be thanking you... :-)

-greg

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to