Gianluca,
Interesting. My failed Fedora 12 (32-bit) did not have any issues with
PYTHON_INCLUDE_DIR but rather the CMake - Boost library issue that Greg
describes.
-Kirk
On Wed, Jan 20, 2010 at 2:48 AM, Gianluca Sforna <[email protected]> wrote:
> On Wed, Jan 20, 2010 at 6:03 AM, Greg Landrum <[email protected]>
> wrote:
> > Please note that the new release supports cmake-based builds and is,
> > consequently, much easier to build than before. Notes on how to do
> > builds on linux/mac are here:
> > http://code.google.com/p/rdkit/wiki/BuildingWithCmake
> > Windows instructions will be here (I'm still working on these):
> > http://code.google.com/p/rdkit/wiki/BuildingOnWindows_2009Q4
>
> I tried a build in my Fedora 12 x86_64, but a simple "mkdir build; cd
> build; cmake ..; make" failed because PYTHON_INCLUDE_DIR was not
> correctly set.
> Is there a reason why we are doing that "hackery" to find python libs?
>
> BTW, the following patch fixed my build:
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 2f5be8f..f42198b 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -24,39 +24,10 @@ set(RDKit_PythonDir "${CMAKE_SOURCE_DIR}/rdkit")
> # defines macros: rdkit_python_extension, rdkit_test
> include(RDKitUtils)
>
> -#-------
> -# pull in python:
> -# start with a bit of hackery to allow the user to provide their own
> -# path to python:
> -if(PYTHON_LIBRARIES)
> - set(oPYTHON_LIBRARIES ${PYTHON_LIBRARIES})
> -endif(PYTHON_LIBRARIES)
> -if(PYTHON_INCLUDE_DIR)
> - set(oPYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIR})
> -endif(PYTHON_INCLUDE_DIR)
> -find_package(PythonLibs)
> -if(oPYTHON_LIBRARIES)
> - set(PYTHON_LIBRARIES ${oPYTHON_LIBRARIES})
> -endif(oPYTHON_LIBRARIES)
> -if(oPYTHON_INCLUDE_DIR)
> - set(PYTHON_INCLUDE_DIR ${oPYTHON_INCLUDE_DIR})
> -endif(oPYTHON_INCLUDE_DIR)
> -
> -
> -
> -if(NOT PYTHON_LIBRARIES AND NOT PYTHON_INCLUDE_DIR)
> - set(PYTHON_FOUND "NO")
> -else(NOT PYTHON_LIBRARIES AND NOT PYTHON_INCLUDE_DIR)
> - set(PYTHON_FOUND "YES")
> -endif(NOT PYTHON_LIBRARIES AND NOT PYTHON_INCLUDE_DIR)
> -endif(oPYTHON_LIBRARIES)
> -if(oPYTHON_INCLUDE_DIR)
> - set(PYTHON_INCLUDE_DIR ${oPYTHON_INCLUDE_DIR})
> -endif(oPYTHON_INCLUDE_DIR)
> -
> -
> -if(NOT PYTHON_LIBRARIES AND NOT PYTHON_INCLUDE_DIR)
> - set(PYTHON_FOUND "NO")
> -else(NOT PYTHON_LIBRARIES AND NOT PYTHON_INCLUDE_DIR)
> - set(PYTHON_FOUND "YES")
> -endif(NOT PYTHON_LIBRARIES AND NOT PYTHON_INCLUDE_DIR)
> -if(PYTHON_FOUND)
> - MESSAGE(STATUS "Found Python libraries in ${PYTHON_INCLUDE_DIR} as
> ${PYTHON_LIBRARIES}")
> -else(PYTHON_FOUND)
> - MESSAGE(FATAL_ERROR "Python libraries not found")
> -endif(PYTHON_FOUND)
> -
> -
> -include_directories(${PYTHON_INCLUDE_DIR})
> +find_package(PythonLibs REQUIRED)
> +include_directories(${PYTHON_INCLUDE_PATH})
> link_directories(${PYTHON_LIBRARIES})
> +
> find_package(NumPy REQUIRED)
> include_directories(${PYTHON_NUMPY_INCLUDE_PATH})
>
> Cheers
>
> G.
>
>
> --
> Gianluca Sforna
>
> http://morefedora.blogspot.com
> http://www.linkedin.com/in/gianlucasforna
>
>
> ------------------------------------------------------------------------------
> 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
>
------------------------------------------------------------------------------
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