[magics] 06/63: WIP: PythonInterp fix
Alastair McKinstry
mckinstry at moszumanska.debian.org
Fri Mar 24 10:41:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository magics.
commit d0368493f27d2ec2ae8a56d83f6b656ecb567e2d
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Tue May 19 20:32:17 2015 +0100
WIP: PythonInterp fix
---
debian/patches/python3.patch | 109 -------------------------------------------
1 file changed, 109 deletions(-)
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
index f1c7f3d..1b35c1a 100644
--- a/debian/patches/python3.patch
+++ b/debian/patches/python3.patch
@@ -977,7 +977,6 @@ Index: magics++-2.24.4/cmake/ecbuild_find_python3.cmake
+# debug_var( PYTHON3_LIBRARIES )
+# debug_var( PYTHON3_SITE_PACKAGES )
+
-+endmacro( ecbuild_find_python3 )
Index: magics++-2.24.4/cmake/ecbuild_system.cmake
===================================================================
--- magics++-2.24.4.orig/cmake/ecbuild_system.cmake
@@ -1003,111 +1002,3 @@ Index: magics++-2.24.4/python/Magics/CMakeLists.txt
set( PYTHON_DEST "${PYTHON_SITE}/Magics" )
file( RELATIVE_PATH relative_rpath "${CMAKE_INSTALL_PREFIX}/${PYTHON_DEST}" "${${PNAME}_FULL_INSTALL_LIB_DIR}" )
-Index: magics++-2.24.4/cmake/FindNumPy3.cmake
-===================================================================
---- /dev/null
-+++ magics++-2.24.4/cmake/FindNumPy3.cmake
-@@ -0,0 +1,104 @@
-+# - Find the NumPy3 libraries
-+# This module finds if NumPy3 is installed, and sets the following variables
-+# indicating where it is.
-+#
-+# TODO: Update to provide the libraries and paths for linking npymath lib.
-+#
-+# NUMPY3_FOUND - was NumPy3 found
-+# NUMPY3_VERSION - the version of NumPy3 found as a string
-+# NUMPY3_VERSION_MAJOR - the major version number of NumPy3
-+# NUMPY3_VERSION_MINOR - the minor version number of NumPy3
-+# NUMPY3_VERSION_PATCH - the patch version number of NumPy3
-+# NUMPY3_VERSION_DECIMAL - e.g. version 1.6.1 is 10601
-+# NUMPY3_INCLUDE_DIRS - path to the NumPy3 include files
-+
-+#============================================================================
-+# Copyright 2015 Alastair McKinstry <debian.org>
-+#
-+# MIT License
-+#
-+# Permission is hereby granted, free of charge, to any person obtaining
-+# a copy of this software and associated documentation files
-+# (the "Software"), to deal in the Software without restriction, including
-+# without limitation the rights to use, copy, modify, merge, publish,
-+# distribute, sublicense, and/or sell copies of the Software, and to permit
-+# persons to whom the Software is furnished to do so, subject to
-+# the following conditions:
-+#
-+# The above copyright notice and this permission notice shall be included
-+# in all copies or substantial portions of the Software.
-+#
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+# OTHER DEALINGS IN THE SOFTWARE.
-+#
-+#============================================================================
-+
-+# Finding NumPy3 involves calling the Python3 interpreter
-+if(NumPy3_FIND_REQUIRED)
-+ set(Python_ADDITIONAL_VERSIONS 3.4)
-+ find_package(PythonInterp REQUIRED)
-+else()
-+ set(Python_ADDITIONAL_VERSIONS 3.4)
-+ find_package(PythonInterp)
-+endif()
-+
-+if(NOT PYTHON3INTERP_FOUND)
-+ set(NUMPY3_FOUND FALSE)
-+ return()
-+endif()
-+
-+execute_process(COMMAND "${PYTHON3_EXECUTABLE}" "-c"
-+ "import numpy as n; print(n.__version__); print(n.get_include());"
-+ RESULT_VARIABLE _NUMPY3_SEARCH_SUCCESS
-+ OUTPUT_VARIABLE _NUMPY3_VALUES_OUTPUT
-+ ERROR_VARIABLE _NUMPY3_ERROR_VALUE
-+ OUTPUT_STRIP_TRAILING_WHITESPACE)
-+
-+if(NOT _NUMPY3_SEARCH_SUCCESS MATCHES 0)
-+ if(NumPy3_FIND_REQUIRED)
-+ message(FATAL_ERROR
-+ "NumPy3 import failure:\n${_NUMPY3_ERROR_VALUE}")
-+ endif()
-+ set(NUMPY3_FOUND FALSE)
-+ return()
-+endif()
-+
-+# Convert the process output into a list
-+string(REGEX REPLACE ";" "\\\\;" _NUMPY3_VALUES ${_NUMPY3_VALUES_OUTPUT})
-+string(REGEX REPLACE "\n" ";" _NUMPY3_VALUES ${_NUMPY3_VALUES})
-+# Just in case there is unexpected output from the Python3 command.
-+list(GET _NUMPY3_VALUES -2 NUMPY3_VERSION)
-+list(GET _NUMPY3_VALUES -1 NUMPY3_INCLUDE_DIRS)
-+
-+string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" _VER_CHECK "${NUMPY3_VERSION}")
-+if("${_VER_CHECK}" STREQUAL "")
-+ # The output from Python3 was unexpected. Raise an error always
-+ # here, because we found NumPy3, but it appears to be corrupted somehow.
-+ message(FATAL_ERROR
-+ "Requested version and include path from NumPy3, got instead:\n${_NUMPY3_VALUES_OUTPUT}\n")
-+ return()
-+endif()
-+
-+# Make sure all directory separators are '/'
-+string(REGEX REPLACE "\\\\" "/" NUMPY3_INCLUDE_DIRS ${NUMPY3_INCLUDE_DIRS})
-+
-+# Get the major and minor version numbers
-+string(REGEX REPLACE "\\." ";" _NUMPY3_VERSION_LIST ${NUMPY3_VERSION})
-+list(GET _NUMPY3_VERSION_LIST 0 NUMPY3_VERSION_MAJOR)
-+list(GET _NUMPY3_VERSION_LIST 1 NUMPY3_VERSION_MINOR)
-+list(GET _NUMPY3_VERSION_LIST 2 NUMPY3_VERSION_PATCH)
-+string(REGEX MATCH "[0-9]*" NUMPY3_VERSION_PATCH ${NUMPY3_VERSION_PATCH})
-+math(EXPR NUMPY3_VERSION_DECIMAL
-+ "(${NUMPY3_VERSION_MAJOR} * 10000) + (${NUMPY3_VERSION_MINOR} * 100) + ${NUMPY3_VERSION_PATCH}")
-+
-+find_package_message(NUMPY3
-+ "Found NumPy3: version \"${NUMPY3_VERSION}\" ${NUMPY3_INCLUDE_DIRS}"
-+ "${NUMPY3_INCLUDE_DIRS}${NUMPY3_VERSION}")
-+
-+set(NUMPY3_FOUND TRUE)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/magics.git
More information about the debian-science-commits
mailing list