pitrou commented on code in PR #37822:
URL: https://github.com/apache/arrow/pull/37822#discussion_r1344265320
##########
python/CMakeLists.txt:
##########
@@ -68,6 +68,25 @@ if(POLICY CMP0095)
cmake_policy(SET CMP0095 NEW)
endif()
+# this option is used to auto-set defaults for pyarrow build
+option(DUMP_ARROW_ARGUMENTS "Dump the arrow arguments then quit" OFF)
+
+if($ENV{PYODIDE})
+ # these variables are needed for building pyarrow on Emscripten
+ # if they aren't set, cmake cross compiling fails for python
+ # modules (at least under pyodide it does)
+ set(Python3_INCLUDE_DIR $ENV{PYTHONINCLUDE})
+ set(Python3_LIBRARY $ENV{CPYTHONLIB})
+ set(Python3_NumPy_INCLUDE_DIR $ENV{NUMPY_LIB}/core/include)
+ set(Python3_EXECUTABLE)
+ set(ENV{_PYTHON_SYSCONFIGDATA_NAME} $ENV{SYSCONFIG_NAME})
+
+ # remove any c++ standard settings from cflags and let cmake set it.
+ # n.b. this is here because pyodide sets -stdc++=14, which breaks pyarrow
builds
+ string(REGEX REPLACE "-std=c\\+\\+[0-9]+" "" CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS})
Review Comment:
@kou Could you take a look at the CMake changes here?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]