|
From: <and...@us...> - 2010-05-18 15:51:29
|
Revision: 11006
http://plplot.svn.sourceforge.net/plplot/?rev=11006&view=rev
Author: andrewross
Date: 2010-05-18 15:51:23 +0000 (Tue, 18 May 2010)
Log Message:
-----------
Disable python support if numpy is not found and issue warning. Support
for Numeric can (for now) be re-enabled by setting USE_NUMERIC. In due
course support for Numeric will be dropped.
Modified Paths:
--------------
trunk/cmake/modules/python.cmake
Modified: trunk/cmake/modules/python.cmake
===================================================================
--- trunk/cmake/modules/python.cmake 2010-05-18 12:56:14 UTC (rev 11005)
+++ trunk/cmake/modules/python.cmake 2010-05-18 15:51:23 UTC (rev 11006)
@@ -61,6 +61,7 @@
endif(ENABLE_python)
option(HAVE_NUMPY "Use numpy rather than deprecated Numeric" ON)
+option(USE_NUMERIC "Force use of deprecated Numeric" OFF)
if(ENABLE_python)
# NUMERIC_INCLUDE_PATH = path to arrayobject.h for either Numeric or numpy.
@@ -125,6 +126,15 @@
endif(EXCLUDE_PYTHON_LIBRARIES)
endif(ENABLE_python AND HAVE_NUMPY)
+if(ENABLE_python AND NOT HAVE_NUMPY)
+ message(STATUS "WARNING: The Numeric extensions for python are deprecated. "
+ "Support for Numeric will be dropped in a future plplot release. Please switch to numpy.")
+ if(NOT USE_NUMERIC)
+ message(STATUS "Disabling python. If you wish enable Numeric support set USE_NUMERIC.")
+ set(ENABLE_python OFF CACHE BOOL "Enable Python bindings" FORCE)
+ endif(NOT USE_NUMERIC)
+endif(ENABLE_python AND NOT HAVE_NUMPY)
+
if(ENABLE_python)
# N.B. This is a nice way to obtain all sorts of python information
# using distutils.
@@ -135,7 +145,3 @@
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif(ENABLE_python)
-
-if(ENABLE_python AND NOT HAVE_NUMPY)
- message(STATUS "WARNING: " "The Numeric extensions for python are deprecated. Support for Numeric will be dropped in a future plplot release. Please switch to numpy.")
-endif(ENABLE_python AND NOT HAVE_NUMPY)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|