You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/10 09:40:05 UTC

[GitHub] [arrow] raulcd commented on a diff in pull request #13311: ARROW-16340: [Python] Move all Python related code into PyArrow

raulcd commented on code in PR #13311:
URL: https://github.com/apache/arrow/pull/13311#discussion_r894347131


##########
python/pyarrow/src_arrow/CMakeLists.txt:
##########
@@ -19,8 +19,37 @@
 # arrow_python
 #
 
+cmake_minimum_required(VERSION 3.5)
+
+# RPATH settings on macOS do not affect install_name.
+# https://cmake.org/cmake/help/latest/policy/CMP0068.html
+if(POLICY CMP0068)
+  cmake_policy(SET CMP0068 NEW)
+endif()
+
+# Define
+# ARROW_SOURCE_DIR: location of arrow/cpp
+# CMAKE_MODULE_PATH: location of cmake_modules in python
+get_filename_component(PYARROW_SOURCE_DIR ${CMAKE_SOURCE_DIR} DIRECTORY)
+get_filename_component(PYTHON_SOURCE_DIR ${PYARROW_SOURCE_DIR} DIRECTORY)
+get_filename_component(ARROW_SOURCE_DIR ${PYTHON_SOURCE_DIR} DIRECTORY)
+set(ARROW_SOURCE_DIR "${ARROW_SOURCE_DIR}/cpp")
+set(CMAKE_MODULE_PATH "${PYTHON_SOURCE_DIR}/cmake_modules")
+
+# Need to set to ARRROW_VERSION before finding Arrow package!
+project(arrow_python VERSION 9.0.0)

Review Comment:
   Minor thing, I've seen this pattern used to set other versions on CMake which I think works better with our release scripts to update versions on Releases/release candidates/post release tasks. Examples:
   https://github.com/apache/arrow/blob/master/cpp/CMakeLists.txt#L50-L52
   https://github.com/apache/arrow/blob/master/matlab/CMakeLists.txt#L192-L195
   
   ```suggestion
   +set(ARROW_PYTHON_VERSION "9.0.0-SNAPSHOT")
   +string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" ARROW_PYTHON_BASE_VERSION "${ARROW_PYTHON_VERSION}")
    # Need to set to ARRROW_VERSION before finding Arrow package!
   +project(arrow_python VERSION "${ARROW_PYTHON_BASE_VERSION}")
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org