mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 17:15:39 +08:00
ARROW-2049: [Python] Try searching for the Cython executable according to sysconfig
This commit is contained in:
1 parent
ddae2407fe
commit
ca5dbbffb3
2 files changed
+1
-32
No files matched your search
@@ -1,30 +0,0 @@
|
||||
# Find the Cython compiler.
|
||||
#
|
||||
# This code sets the following variables:
|
||||
#
|
||||
# CYTHON_EXECUTABLE
|
||||
#
|
||||
# See also UseCython.cmake
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Kitware, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#=============================================================================
|
||||
|
||||
find_program( CYTHON_EXECUTABLE NAMES cython cython.bat )
|
||||
|
||||
include( FindPackageHandleStandardArgs )
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cython REQUIRED_VARS CYTHON_EXECUTABLE )
|
||||
|
||||
mark_as_advanced( CYTHON_EXECUTABLE )
|
||||
@@ -66,7 +66,6 @@ set( CYTHON_FLAGS "" CACHE STRING
|
||||
"Extra flags to the cython compiler." )
|
||||
mark_as_advanced( CYTHON_ANNOTATE CYTHON_NO_DOCSTRINGS CYTHON_FLAGS)
|
||||
|
||||
find_package( Cython REQUIRED )
|
||||
find_package( PythonLibsNew REQUIRED )
|
||||
|
||||
set( CYTHON_CXX_EXTENSION "cxx" )
|
||||
@@ -132,7 +131,7 @@ function( compile_pyx _name pyx_target_name generated_files pyx_file)
|
||||
|
||||
# Add the command to run the compiler.
|
||||
add_custom_target(${pyx_target_name}
|
||||
COMMAND ${CYTHON_EXECUTABLE} ${cxx_arg} ${include_directory_arg}
|
||||
COMMAND ${PYTHON_EXECUTABLE} -m cython ${cxx_arg} ${include_directory_arg}
|
||||
${annotate_arg} ${no_docstrings_arg} ${cython_debug_arg}
|
||||
${CYTHON_FLAGS}
|
||||
--output-file "${_name}.${extension}" ${pyx_location}
|
||||
|
||||
Reference in new issue
Block a user