[paraview] 02/02: For backward compatibility, set PYTHON_INCLUDE_PATH
Christophe Trophime
trophime-guest at alioth.debian.org
Wed Oct 30 10:17:00 UTC 2013
This is an automated email from the git hooks/post-receive script.
trophime-guest pushed a commit to branch use_external_vtk
in repository paraview.
commit 228fec70daf68499f1d57b5ea4b299611fe1bed0
Author: Christophe Trophime <christrophime at googlemail.com>
Date: Tue Oct 29 16:42:56 2013 +0100
For backward compatibility, set PYTHON_INCLUDE_PATH
---
debian/patches/wrapping_python.patch | 124 +++++++++++++++++-----------------
debian/rules | 5 +-
2 files changed, 65 insertions(+), 64 deletions(-)
diff --git a/debian/patches/wrapping_python.patch b/debian/patches/wrapping_python.patch
index ec8ddd9..e6dd703 100644
--- a/debian/patches/wrapping_python.patch
+++ b/debian/patches/wrapping_python.patch
@@ -1,12 +1,12 @@
-Index: paraview-4.0.1/Wrapping/Python/CMakeLists.txt
+Index: paraview/Wrapping/Python/CMakeLists.txt
===================================================================
---- paraview-4.0.1.orig/Wrapping/Python/CMakeLists.txt 2013-10-04 19:18:47.000000000 +0200
-+++ paraview-4.0.1/Wrapping/Python/CMakeLists.txt 2013-10-24 09:02:32.000000000 +0200
+--- paraview.orig/Wrapping/Python/CMakeLists.txt 2013-10-29 20:10:12.000000000 +0100
++++ paraview/Wrapping/Python/CMakeLists.txt 2013-10-29 20:10:53.000000000 +0100
@@ -38,6 +38,7 @@
set(PV_PYTHON_MODULE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/paraview")
set(PV_PYTHON_MODULE_BINARY_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/site-packages/paraview")
-+if ( NOT PARAVIEW_USING_EXTERNAL_VTK)
++###if ( NOT PARAVIEW_USING_EXTERNAL_VTK)
# Handle out-of-source builds correctly.
#
# 1. Create a list of Python files to be installed/copied.
@@ -16,15 +16,15 @@ Index: paraview-4.0.1/Wrapping/Python/CMakeLists.txt
USE_SOURCE_PERMISSIONS)
-
+
-+endif()
++###endif()
# Byte compile the Python files.
CONFIGURE_FILE(${PV_PYTHON_MODULE_SOURCE_DIR}/compile_all_pv.py.in
-Index: paraview-4.0.1/CMakeLists.txt b/CMakeLists.txt
+Index: paraview/CMakeLists.txt
===================================================================
---- paraview-4.0.1.orig/CMakeLists.txt
-+++ paraview-4.0.1/CMakeLists.txt
-@@ -550,6 +550,7 @@ add_subdirectory(Wrapping/Python)
+--- paraview.orig/CMakeLists.txt 2013-10-29 20:10:12.000000000 +0100
++++ paraview/CMakeLists.txt 2013-10-29 20:10:12.000000000 +0100
+@@ -546,6 +546,7 @@
# Process modules that need to be add at the end, after all other modules have
# been processed.
if (PARAVIEW_ENABLE_PYTHON)
@@ -32,10 +32,10 @@ Index: paraview-4.0.1/CMakeLists.txt b/CMakeLists.txt
add_subdirectory(Utilities/PythonInitializer)
endif()
-Index: paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake b/VTK/CMake/FindPythonLibs.cmake
+Index: paraview/VTK/CMake/FindPythonLibs.cmake
===================================================================
---- paraview-4.0.1.orig/VTK/CMake/FindPythonLibs.cmake
-+++ paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake
+--- paraview.orig/VTK/CMake/FindPythonLibs.cmake 2013-10-29 20:10:12.000000000 +0100
++++ paraview/VTK/CMake/FindPythonLibs.cmake 2013-10-29 20:10:12.000000000 +0100
@@ -7,14 +7,17 @@
# PYTHON_LIBRARIES - path to the python library
# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
@@ -108,16 +108,16 @@ Index: paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake b/VTK/CMake/FindPythonLibs.
- 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+ ${_PYTHON_FIND_OTHER_VERSIONS}
+ )
-+
-+unset(_PYTHON_FIND_OTHER_VERSIONS)
-+unset(_PYTHON1_VERSIONS)
-+unset(_PYTHON2_VERSIONS)
-+unset(_PYTHON3_VERSIONS)
-FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
- STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
- IF(WIN32)
- FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
++unset(_PYTHON_FIND_OTHER_VERSIONS)
++unset(_PYTHON1_VERSIONS)
++unset(_PYTHON2_VERSIONS)
++unset(_PYTHON3_VERSIONS)
++
+foreach(_CURRENT_VERSION ${_Python_VERSIONS})
+ string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
+ if(WIN32)
@@ -127,14 +127,15 @@ Index: paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake b/VTK/CMake/FindPythonLibs.
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs )
- ENDIF(WIN32)
+-
+- FIND_LIBRARY(PYTHON_LIBRARY
+- NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
+ )
+ endif()
-
-- FIND_LIBRARY(PYTHON_LIBRARY
-- NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
++
+ find_library(PYTHON_LIBRARY
+ NAMES
+ python${_CURRENT_VERSION_NO_DOTS}
@@ -154,7 +155,7 @@ Index: paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake b/VTK/CMake/FindPythonLibs.
NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
# Avoid finding the .dll in the PATH. We want the .lib.
NO_SYSTEM_ENVIRONMENT_PATH
-@@ -67,68 +116,182 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
+@@ -67,68 +116,182 @@
# For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
# PYTHON_INCLUDE_DIR is not set.
@@ -187,7 +188,7 @@ Index: paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake b/VTK/CMake/FindPythonLibs.
${PYTHON_FRAMEWORK_INCLUDES}
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
-+ PATH_SUFFIXES
+ PATH_SUFFIXES
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
@@ -195,16 +196,19 @@ Index: paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake b/VTK/CMake/FindPythonLibs.
+ python${_CURRENT_VERSION}mu
+ python${_CURRENT_VERSION}m
+ python${_CURRENT_VERSION}u
-+ python${_CURRENT_VERSION}
-+ )
-+
+ python${_CURRENT_VERSION}
+ )
+
+- # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
+- SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
+- "Path to where Python.h is found (deprecated)")
+ find_path(PYTHON_INCLUDE_DIR2
+ NAMES pyconfig.h
+ PATHS
+ ${PYTHON_FRAMEWORK_INCLUDES}
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
- PATH_SUFFIXES
++ PATH_SUFFIXES
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
@@ -212,15 +216,13 @@ Index: paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake b/VTK/CMake/FindPythonLibs.
+ python${_CURRENT_VERSION}mu
+ python${_CURRENT_VERSION}m
+ python${_CURRENT_VERSION}u
- python${_CURRENT_VERSION}
- )
-
-- # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
-- SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
-- "Path to where Python.h is found (deprecated)")
++ python${_CURRENT_VERSION}
++ )
++
+ # For backward compatibility, set PYTHON_INCLUDE_PATH.
+ set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")
-+
+
+-ENDFOREACH(_CURRENT_VERSION)
+ if(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
+ file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str
+ REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
@@ -228,8 +230,7 @@ Index: paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake b/VTK/CMake/FindPythonLibs.
+ PYTHONLIBS_VERSION_STRING "${python_version_str}")
+ unset(python_version_str)
+ endif()
-
--ENDFOREACH(_CURRENT_VERSION)
++
+ if(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
+ break()
+ endif()
@@ -377,10 +378,10 @@ Index: paraview-4.0.1/VTK/CMake/FindPythonLibs.cmake b/VTK/CMake/FindPythonLibs.
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
+endfunction()
-Index: paraview-4.0.1/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake b/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake
+Index: paraview/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake
===================================================================
---- paraview-4.0.1.orig/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake
-+++ paraview-4.0.1/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake
+--- paraview.orig/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake 2013-10-29 20:10:12.000000000 +0100
++++ paraview/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake 2013-10-29 20:10:12.000000000 +0100
@@ -7,14 +7,17 @@
# PYTHON_LIBRARIES - path to the python library
# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
@@ -453,16 +454,16 @@ Index: paraview-4.0.1/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake b/pv-src-tmp/VTK
- 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+ ${_PYTHON_FIND_OTHER_VERSIONS}
+ )
-+
-+unset(_PYTHON_FIND_OTHER_VERSIONS)
-+unset(_PYTHON1_VERSIONS)
-+unset(_PYTHON2_VERSIONS)
-+unset(_PYTHON3_VERSIONS)
-FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
- STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
- IF(WIN32)
- FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
++unset(_PYTHON_FIND_OTHER_VERSIONS)
++unset(_PYTHON1_VERSIONS)
++unset(_PYTHON2_VERSIONS)
++unset(_PYTHON3_VERSIONS)
++
+foreach(_CURRENT_VERSION ${_Python_VERSIONS})
+ string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
+ if(WIN32)
@@ -472,14 +473,15 @@ Index: paraview-4.0.1/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake b/pv-src-tmp/VTK
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs )
- ENDIF(WIN32)
+-
+- FIND_LIBRARY(PYTHON_LIBRARY
+- NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
+ )
+ endif()
-
-- FIND_LIBRARY(PYTHON_LIBRARY
-- NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
++
+ find_library(PYTHON_LIBRARY
+ NAMES
+ python${_CURRENT_VERSION_NO_DOTS}
@@ -499,7 +501,7 @@ Index: paraview-4.0.1/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake b/pv-src-tmp/VTK
NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
# Avoid finding the .dll in the PATH. We want the .lib.
NO_SYSTEM_ENVIRONMENT_PATH
-@@ -67,68 +116,182 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
+@@ -67,68 +116,182 @@
# For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
# PYTHON_INCLUDE_DIR is not set.
@@ -532,7 +534,7 @@ Index: paraview-4.0.1/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake b/pv-src-tmp/VTK
${PYTHON_FRAMEWORK_INCLUDES}
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
-+ PATH_SUFFIXES
+ PATH_SUFFIXES
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
@@ -540,16 +542,19 @@ Index: paraview-4.0.1/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake b/pv-src-tmp/VTK
+ python${_CURRENT_VERSION}mu
+ python${_CURRENT_VERSION}m
+ python${_CURRENT_VERSION}u
-+ python${_CURRENT_VERSION}
-+ )
-+
+ python${_CURRENT_VERSION}
+ )
+
+- # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
+- SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
+- "Path to where Python.h is found (deprecated)")
+ find_path(PYTHON_INCLUDE_DIR2
+ NAMES pyconfig.h
+ PATHS
+ ${PYTHON_FRAMEWORK_INCLUDES}
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
+ [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
- PATH_SUFFIXES
++ PATH_SUFFIXES
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
+ ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
@@ -557,15 +562,13 @@ Index: paraview-4.0.1/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake b/pv-src-tmp/VTK
+ python${_CURRENT_VERSION}mu
+ python${_CURRENT_VERSION}m
+ python${_CURRENT_VERSION}u
- python${_CURRENT_VERSION}
- )
-
-- # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
-- SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
-- "Path to where Python.h is found (deprecated)")
++ python${_CURRENT_VERSION}
++ )
++
+ # For backward compatibility, set PYTHON_INCLUDE_PATH.
+ set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")
-+
+
+-ENDFOREACH(_CURRENT_VERSION)
+ if(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
+ file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str
+ REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
@@ -573,8 +576,7 @@ Index: paraview-4.0.1/pv-src-tmp/VTK/CMake/FindPythonLibs.cmake b/pv-src-tmp/VTK
+ PYTHONLIBS_VERSION_STRING "${python_version_str}")
+ unset(python_version_str)
+ endif()
-
--ENDFOREACH(_CURRENT_VERSION)
++
+ if(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
+ break()
+ endif()
diff --git a/debian/rules b/debian/rules
index bd18997..1b14f6e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -62,9 +62,8 @@ extra_flags += -Wno-dev \
-DVTK_Group_StandAlone:BOOL=ON \
-DVTK_Group_Views:BOOL=ON \
-DVTK_CUSTOM_LIBRARY_SUFFIX="" \
- -DEigen_DIR=/usr/include/eigen3
-
-# -DPYTHON_INCLUDE_PATH=/usr/include/python2.7
+ -DEigen_DIR=/usr/include/eigen3 \
+ -DPYTHON_INCLUDE_PATH=/usr/include/python2.7
# PARAVIEW_USE_PISTON=OFF since it requires cuda
# PARAVIEW_BUILD_CATALYST_ADAPTORS:BOOL=OFF FTBS when ON - pb with USE_EXTERNAL_VTK
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/paraview.git
More information about the debian-science-commits
mailing list