Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions cpp/cmake_modules/FindPython3Alt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,26 @@ if(${CMAKE_VERSION} VERSION_LESS "3.15.0")
find_package_handle_standard_args(Python3Alt
REQUIRED_VARS
PYTHON_EXECUTABLE
PYTHON_LIBRARIES
PYTHON_INCLUDE_DIRS
NUMPY_INCLUDE_DIRS)
return()
endif()

if(Python3Alt_FIND_REQUIRED)
find_package(Python3 COMPONENTS Interpreter Development NumPy REQUIRED)
if(${CMAKE_VERSION} VERSION_LESS "3.18.0" OR ARROW_BUILD_TESTS)
# When building arrow-python-test, we need libpython to be present, so ask for
# the full "Development" component. Also ask for it on CMake < 3.18,
# where "Development.Module" is not available.
if(Python3Alt_FIND_REQUIRED)
find_package(Python3 COMPONENTS Interpreter Development NumPy REQUIRED)
else()
find_package(Python3 COMPONENTS Interpreter Development NumPy)
endif()
else()
find_package(Python3 COMPONENTS Interpreter Development NumPy)
if(Python3Alt_FIND_REQUIRED)
find_package(Python3 COMPONENTS Interpreter Development.Module NumPy REQUIRED)
else()
find_package(Python3 COMPONENTS Interpreter Development.Module NumPy)
endif()
endif()

if(NOT Python3_FOUND)
Expand Down Expand Up @@ -85,6 +95,5 @@ endfunction()
find_package_handle_standard_args(Python3Alt
REQUIRED_VARS
PYTHON_EXECUTABLE
PYTHON_LIBRARIES
PYTHON_INCLUDE_DIRS
NUMPY_INCLUDE_DIRS)
8 changes: 0 additions & 8 deletions python/manylinux1/build_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ PIP="${CPYTHON_PATH}/bin/pip"
# Put our Python first to avoid picking up an antiquated Python from CMake
PATH="${CPYTHON_PATH}/bin:${PATH}"

# XXX The Docker image doesn't include Python libs, this confuses CMake
# (https://github.com/pypa/manylinux/issues/484)
py_libname=$(${PYTHON_INTERPRETER} -c "import sysconfig; print(sysconfig.get_config_var('LDLIBRARY'))")
touch ${CPYTHON_PATH}/lib/${py_libname}

echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
$PIP install -r requirements-wheel-build.txt

Expand All @@ -87,9 +82,6 @@ export BUILD_ARROW_DATASET=ON
export BUILD_ARROW_FLIGHT=ON
export BUILD_ARROW_GANDIVA=OFF

# ARROW-3052(wesm): ORC is being bundled until it can be added to the
# manylinux1 image

echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ==="
ARROW_BUILD_DIR=/tmp/build-PY${PYTHON_VERSION}
mkdir -p "${ARROW_BUILD_DIR}"
Expand Down
2 changes: 1 addition & 1 deletion python/manylinux1/scripts/install_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# specific language governing permissions and limitations
# under the License.

export CMAKE_VERSION=3.17.3
export CMAKE_VERSION=3.18.2.post1
/opt/python/cp37-cp37m/bin/pip install cmake==${CMAKE_VERSION} ninja
ln -s /opt/python/cp37-cp37m/bin/cmake /usr/bin/cmake
ln -s /opt/python/cp37-cp37m/bin/ninja /usr/bin/ninja
Expand Down
8 changes: 0 additions & 8 deletions python/manylinux201x/build_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ PATH="${PATH}:${CPYTHON_PATH}"
# Will be "manylinux2010" or "manylinux2014"
manylinux_kind=$(${PYTHON_INTERPRETER} -c "import os; print(os.environ['AUDITWHEEL_PLAT'].split('_')[0], end='')")

# XXX The Docker image doesn't include Python libs, this confuses CMake
# (https://github.com/pypa/manylinux/issues/484)
py_libname=$(${PYTHON_INTERPRETER} -c "import sysconfig; print(sysconfig.get_config_var('LDLIBRARY'))")
touch ${CPYTHON_PATH}/lib/${py_libname}

echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
$PIP install -r requirements-wheel-build.txt

Expand All @@ -89,9 +84,6 @@ export BUILD_ARROW_DATASET=ON
export BUILD_ARROW_FLIGHT=ON
export BUILD_ARROW_GANDIVA=OFF

# ARROW-3052(wesm): ORC is being bundled until it can be added to the
# manylinux1 image

echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ==="
ARROW_BUILD_DIR=/tmp/build-PY${PYTHON_VERSION}
mkdir -p "${ARROW_BUILD_DIR}"
Expand Down
3 changes: 2 additions & 1 deletion python/manylinux201x/scripts/install_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
# specific language governing permissions and limitations
# under the License.

/opt/python/cp37-cp37m/bin/pip install cmake ninja
export CMAKE_VERSION=3.18.2.post1
/opt/python/cp37-cp37m/bin/pip install cmake==${CMAKE_VERSION} ninja
ln -s /opt/python/cp37-cp37m/bin/cmake /usr/local/bin/cmake
ln -s /opt/python/cp37-cp37m/bin/ninja /usr/local/bin/ninja
strip /opt/_internal/cpython-3.*/lib/python3.7/site-packages/cmake/data/bin/*