You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/02/10 16:06:00 UTC

[jira] [Commented] (ARROW-2049) ARROW-2049: [Python] Use python -m cython to run Cython, instead of CYTHON_EXECUTABLE

    [ https://issues.apache.org/jira/browse/ARROW-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16359475#comment-16359475 ] 

ASF GitHub Bot commented on ARROW-2049:
---------------------------------------

wesm closed pull request #1583: ARROW-2049: [Python] Use python -m cython to run Cython, instead of CYTHON_EXECUTABLE
URL: https://github.com/apache/arrow/pull/1583
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/cpp/cmake_modules/FindCython.cmake b/cpp/cmake_modules/FindCython.cmake
deleted file mode 100644
index 9df3b5d59..000000000
--- a/cpp/cmake_modules/FindCython.cmake
+++ /dev/null
@@ -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 )
diff --git a/cpp/cmake_modules/UseCython.cmake b/cpp/cmake_modules/UseCython.cmake
index 7920940e6..a1cfac6e9 100644
--- a/cpp/cmake_modules/UseCython.cmake
+++ b/cpp/cmake_modules/UseCython.cmake
@@ -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}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> ARROW-2049: [Python] Use python -m cython to run Cython, instead of CYTHON_EXECUTABLE
> -------------------------------------------------------------------------------------
>
>                 Key: ARROW-2049
>                 URL: https://issues.apache.org/jira/browse/ARROW-2049
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 0.8.0
>            Reporter: Moriyoshi Koizumi
>            Assignee: Phillip Cloud
>            Priority: Trivial
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> setup.py doesn't even try to detect the right cython executable specially when it is used in virtualenv. Instead it always tries to use the one found in the search path.
>  
> I am going to create the PR on GitHub accordingly.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)