From: <ai...@us...> - 2013-10-23 19:27:09
|
Revision: 12622 http://sourceforge.net/p/plplot/code/12622 Author: airwin Date: 2013-10-23 19:27:05 +0000 (Wed, 23 Oct 2013) Log Message: ----------- NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH We have dropped support for the Numeric Python module and are now exclusively using the numpy Python modules instead. Therefore, have changed the CMake variable name used in our build system that holds the location of the numpy headers from the confusing misnomer, NUMERIC_INCLUDE_PATH, to NUMPY_INCLUDE_PATH. I have also taken this opportunity to simplify our numpy-related build system logic, e.g., by dropping CMake variables that were not being used anywhere. This change only impacts PLplot users who in the past have used the cmake option -DNUMERIC_INCLUDE_PATH to set the CMake variable NUMERIC_INCLUDE_PATH to the location of the numpy header directory. Note we discourage that method since without that user intervention, the build system uses python and numpy to find the location which should normally be foolproof and not subject to the inconsistencies or errors possible with setting the variable. But if some users still insist on setting the variable, that variable's name should now be NUMPY_INCLUDE_PATH. Modified Paths: -------------- trunk/README.release trunk/bindings/gnome2/python/CMakeLists.txt trunk/bindings/python/CMakeLists.txt trunk/cmake/modules/python.cmake trunk/cmake/modules/summary.cmake trunk/config.h.in trunk/plplot_test/CMakeLists.txt trunk/plplot_test/test_python.sh.in Modified: trunk/README.release =================================================================== --- trunk/README.release 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/README.release 2013-10-23 19:27:05 UTC (rev 12622) @@ -23,6 +23,8 @@ 3. Changes relative to PLplot 5.9.10 (the previous development release) +3.1 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH + 4. OFFICIAL NOTICES FOR USERS SINCE 5.8.0 (the previous stable release) 5. Changes relative to PLplot 5.8.0 (the previous stable release) @@ -99,6 +101,7 @@ all non-windows systems 5.65 Update f95 examples to take larger advantage of Fortran 95 capabilities 5.66 Substantial additions to the doxygen documentation +5.67 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH 1. OFFICIAL NOTICES FOR USERS SINCE 5.9.10 (the previous development release) @@ -110,8 +113,22 @@ 3. Changes relative to PLplot 5.9.10 (the previous development release) -None at this time. +3.1 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH +We have long since dropped support for the Numeric Python module and +are now exclusively using the numpy Python modules instead. +Therefore, we have changed the CMake variable name used in our build +system that holds the location of the numpy headers from the confusing +misnomer, NUMERIC_INCLUDE_PATH, to NUMPY_INCLUDE_PATH. This change +only impacts PLplot users who in the past have used the cmake option +-DNUMERIC_INCLUDE_PATH to set the CMake variable NUMERIC_INCLUDE_PATH +to the location of the numpy header directory. Note we discourage +that method since without that user intervention, the build system +uses python and numpy to find the location which should normally be +foolproof and not subject to the inconsistencies or errors possible +with setting the variable. But if some users still insist on setting +the variable, that variable's name should now be NUMPY_INCLUDE_PATH. + 4. OFFICIAL NOTICES FOR USERS SINCE 5.8.0 (the previous stable release) (5.9.10) The minimum version of CMake has been bumped to 5.8.9. This @@ -1443,3 +1460,20 @@ documentation of every single argument of the public API for PLplot. A substantial increase in such documentation has been implemented in this release cycle. + +5.67 NUMERIC_INCLUDE_PATH ==> NUMPY_INCLUDE_PATH + +We have long since dropped support for the Numeric Python module and +are now exclusively using the numpy Python modules instead. +Therefore, we have changed the CMake variable name used in our build +system that holds the location of the numpy headers from the confusing +misnomer, NUMERIC_INCLUDE_PATH, to NUMPY_INCLUDE_PATH. This change +only impacts PLplot users who in the past have used the cmake option +-DNUMERIC_INCLUDE_PATH to set the CMake variable NUMERIC_INCLUDE_PATH +to the location of the numpy header directory. Note we discourage +that method since without that user intervention, the build system +uses python and numpy to find the location which should normally be +foolproof and not subject to the inconsistencies or errors possible +with setting the variable. But if some users still insist on setting +the variable, that variable's name should now be NUMPY_INCLUDE_PATH. + Modified: trunk/bindings/gnome2/python/CMakeLists.txt =================================================================== --- trunk/bindings/gnome2/python/CMakeLists.txt 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/bindings/gnome2/python/CMakeLists.txt 2013-10-23 19:27:05 UTC (rev 12622) @@ -115,7 +115,7 @@ ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/include ${PYTHON_INCLUDE_PATH} - ${NUMERIC_INCLUDE_PATH} + ${NUMPY_INCLUDE_PATH} ) ### Build and install the gcw module Modified: trunk/bindings/python/CMakeLists.txt =================================================================== --- trunk/bindings/python/CMakeLists.txt 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/bindings/python/CMakeLists.txt 2013-10-23 19:27:05 UTC (rev 12622) @@ -33,7 +33,7 @@ ${CMAKE_CURRENT_BINARY_DIR} ${TCL_INCLUDE_PATH} ${PYTHON_INCLUDE_PATH} - ${NUMERIC_INCLUDE_PATH} + ${NUMPY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/bindings/swig-support ) else(ENABLE_tk) @@ -44,7 +44,7 @@ ${CMAKE_BINARY_DIR}/include ${CMAKE_CURRENT_BINARY_DIR} ${PYTHON_INCLUDE_PATH} - ${NUMERIC_INCLUDE_PATH} + ${NUMPY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/bindings/swig-support ) endif(ENABLE_tk) Modified: trunk/cmake/modules/python.cmake =================================================================== --- trunk/cmake/modules/python.cmake 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/cmake/modules/python.cmake 2013-10-23 19:27:05 UTC (rev 12622) @@ -60,55 +60,46 @@ endif(NOT PYTHON_LIBRARIES OR NOT PYTHON_INCLUDE_PATH) endif(ENABLE_python) -option(HAVE_NUMPY "Have the numpy package" ON) - if(ENABLE_python) - # NUMERIC_INCLUDE_PATH = path to arrayobject.h for numpy. - #message(STATUS "DEBUG: NUMERIC_INCLUDE_PATH = ${NUMERIC_INCLUDE_PATH}") - if(NOT NUMERIC_INCLUDE_PATH) - if(HAVE_NUMPY) - # First check for new version of numpy - execute_process( - COMMAND - ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()" - OUTPUT_VARIABLE NUMPY_INCLUDE_PATH - RESULT_VARIABLE NUMPY_ERR - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if(NUMPY_ERR) - set(HAVE_NUMPY OFF CACHE BOOL "Have the numpy package" FORCE) - endif(NUMPY_ERR) - endif(HAVE_NUMPY) - - if(HAVE_NUMPY) + # NUMPY_INCLUDE_PATH = path to arrayobject.h for numpy. + #message(STATUS "DEBUG: NUMPY_INCLUDE_PATH = ${NUMPY_INCLUDE_PATH}") + if(NOT NUMPY_INCLUDE_PATH) + # Check for numpy installation. + execute_process( + COMMAND + ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()" + OUTPUT_VARIABLE NUMPY_INCLUDE_PATH_PARENT + RESULT_VARIABLE NUMPY_ERR + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(NUMPY_ERR) + set(NUMPY_INCLUDE_PATH) + else(NUMPY_ERR) # We use the full path name (including numpy on the end), but # Double-check that all is well with that choice. find_path( - NUMERIC_INCLUDE_PATH + NUMPY_INCLUDE_PATH arrayobject.h - ${NUMPY_INCLUDE_PATH}/numpy + ${NUMPY_INCLUDE_PATH_PARENT}/numpy ) - if(NUMERIC_INCLUDE_PATH) - set(PYTHON_NUMERIC_NAME numpy CACHE INTERNAL "") - endif(NUMERIC_INCLUDE_PATH) - endif(HAVE_NUMPY) + endif(NUMPY_ERR) - endif(NOT NUMERIC_INCLUDE_PATH) + endif(NOT NUMPY_INCLUDE_PATH) - if(NOT NUMERIC_INCLUDE_PATH) + if(NOT NUMPY_INCLUDE_PATH) message(STATUS "WARNING: " "NumPy header not found. Disabling Python bindings") set(ENABLE_python OFF CACHE BOOL "Enable Python bindings" FORCE) - endif(NOT NUMERIC_INCLUDE_PATH) + endif(NOT NUMPY_INCLUDE_PATH) endif(ENABLE_python) -if(ENABLE_python AND HAVE_NUMPY) +if(ENABLE_python) # This numpy installation bug found by Geoff. option(EXCLUDE_PYTHON_LIBRARIES "Linux temporary workaround for numpy installation bug for non-system Python install prefix" OFF) if(EXCLUDE_PYTHON_LIBRARIES) set(PYTHON_LIBRARIES) endif(EXCLUDE_PYTHON_LIBRARIES) -endif(ENABLE_python AND HAVE_NUMPY) +endif(ENABLE_python) if(ENABLE_python) # if CMAKE_INSTALL_EXEC_PREFIX is an empty string, must replace Modified: trunk/cmake/modules/summary.cmake =================================================================== --- trunk/cmake/modules/summary.cmake 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/cmake/modules/summary.cmake 2013-10-23 19:27:05 UTC (rev 12622) @@ -89,7 +89,7 @@ PYTHON_EXECUTABLE: ${PYTHON_EXECUTABLE} PYTHON_INCLUDE_PATH: ${PYTHON_INCLUDE_PATH} PYTHON_LIBRARIES: ${PYTHON_LIBRARIES} -NUMERIC_INCLUDE_PATH: ${NUMERIC_INCLUDE_PATH}") +NUMPY_INCLUDE_PATH: ${NUMPY_INCLUDE_PATH}") endif(ENABLE_python) set( Modified: trunk/config.h.in =================================================================== --- trunk/config.h.in 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/config.h.in 2013-10-23 19:27:05 UTC (rev 12622) @@ -112,9 +112,6 @@ // Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. #cmakedefine HAVE_NDIR_H 1 -// Define if python numpy is available -#cmakedefine HAVE_NUMPY - // Define if libpango is available #cmakedefine HAVE_PANGO Modified: trunk/plplot_test/CMakeLists.txt =================================================================== --- trunk/plplot_test/CMakeLists.txt 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/plplot_test/CMakeLists.txt 2013-10-23 19:27:05 UTC (rev 12622) @@ -170,12 +170,6 @@ endif(ENABLE_octave) if(ENABLE_python) - if(HAVE_NUMPY) - # The following examples only work with numpy - set(NUMPY_EXAMPLES "21") - else(HAVE_NUMPY) - set(NUMPY_EXAMPLES) - endif(HAVE_NUMPY) configure_file( test_python.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_python.sh Modified: trunk/plplot_test/test_python.sh.in =================================================================== --- trunk/plplot_test/test_python.sh.in 2013-10-23 08:46:57 UTC (rev 12621) +++ trunk/plplot_test/test_python.sh.in 2013-10-23 19:27:05 UTC (rev 12622) @@ -30,7 +30,7 @@ # For 24 you need special fonts installed to get good result. lang="p" for index in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 \ - 20 22 23 24 25 26 27 28 29 30 31 33 @NUMPY_EXAMPLES@ ; do + 20 21 22 23 24 25 26 27 28 29 30 31 33 ; do if [ "$verbose_test" ] ; then echo "x${index}" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |