Skip to content

Apache DataFusion SQL Query Engine

ARROW-7518: [Python] Use PYARROW_WITH_HDFS when building wheels, conda packages

Krisztián Szűcsb7911eb94fd8
diff --git a/dev/tasks/conda-recipes/arrow-cpp/bld.bat b/dev/tasks/conda-recipes/arrow-cpp/bld.bat
index fd87e0c97c..0588961b58 100644
--- a/dev/tasks/conda-recipes/arrow-cpp/bld.bat
+++ b/dev/tasks/conda-recipes/arrow-cpp/bld.bat
@@ -22,6 +22,7 @@ cmake -G "Ninja" ^
-DARROW_MIMALLOC:BOOL=ON ^
-DARROW_DATASET:BOOL=ON ^
-DARROW_FLIGHT:BOOL=ON ^
+ -DARROW_HDFS:BOOL=ON ^
-DARROW_PARQUET:BOOL=ON ^
-DARROW_GANDIVA:BOOL=ON ^
-DARROW_ORC:BOOL=ON ^
diff --git a/dev/tasks/conda-recipes/arrow-cpp/build.sh b/dev/tasks/conda-recipes/arrow-cpp/build.sh
index 70f4894f61..251187f6e4 100644
--- a/dev/tasks/conda-recipes/arrow-cpp/build.sh
+++ b/dev/tasks/conda-recipes/arrow-cpp/build.sh
@@ -40,6 +40,7 @@ cmake \
-DARROW_PYTHON=ON \
-DARROW_PARQUET=ON \
-DARROW_GANDIVA=ON \
+ -DARROW_HDFS=ON \
-DARROW_ORC=ON \
-DARROW_S3=ON \
-DCMAKE_AR=${AR} \
diff --git a/dev/tasks/conda-recipes/pyarrow/bld.bat b/dev/tasks/conda-recipes/pyarrow/bld.bat
index f06eb217b7..dbea1939eb 100644
--- a/dev/tasks/conda-recipes/pyarrow/bld.bat
+++ b/dev/tasks/conda-recipes/pyarrow/bld.bat
@@ -16,6 +16,7 @@ SET ARROW_HOME=%LIBRARY_PREFIX%
SET SETUPTOOLS_SCM_PRETEND_VERSION=%PKG_VERSION%
SET PYARROW_BUILD_TYPE=release
SET PYARROW_WITH_S3=1
+SET PYARROW_WITH_HDFS=1
SET PYARROW_WITH_DATASET=1
SET PYARROW_WITH_FLIGHT=1
SET PYARROW_WITH_GANDIVA=1
diff --git a/dev/tasks/conda-recipes/pyarrow/build.sh b/dev/tasks/conda-recipes/pyarrow/build.sh
index 1242f4b33f..a095dc21ba 100644
--- a/dev/tasks/conda-recipes/pyarrow/build.sh
+++ b/dev/tasks/conda-recipes/pyarrow/build.sh
@@ -11,6 +11,7 @@ export PYARROW_BUILD_TYPE=release
export PYARROW_WITH_DATASET=1
export PYARROW_WITH_FLIGHT=1
export PYARROW_WITH_GANDIVA=1
+export PYARROW_WITH_HDFS=1
export PYARROW_WITH_ORC=1
export PYARROW_WITH_PARQUET=1
export PYARROW_WITH_PLASMA=1
diff --git a/dev/tasks/conda-recipes/pyarrow/meta.yaml b/dev/tasks/conda-recipes/pyarrow/meta.yaml
index 6ea3d64d69..abc172032f 100644
--- a/dev/tasks/conda-recipes/pyarrow/meta.yaml
+++ b/dev/tasks/conda-recipes/pyarrow/meta.yaml
@@ -44,13 +44,15 @@ requirements:
test:
imports:
- pyarrow
- - pyarrow.fs
- pyarrow.dataset # [not py==27]
- pyarrow.flight # [not py==27]
- pyarrow.gandiva # [not py==27]
- pyarrow.orc # [unix]
- pyarrow.parquet
- pyarrow.plasma # [unix]
+ - pyarrow.fs
+ - pyarrow._s3fs
+ - pyarrow._hdfs
requires:
- pytest
diff --git a/dev/tasks/python-wheels/azure.linux.yml b/dev/tasks/python-wheels/azure.linux.yml
index 23ebfd5916..87510b8f30 100644
--- a/dev/tasks/python-wheels/azure.linux.yml
+++ b/dev/tasks/python-wheels/azure.linux.yml
@@ -44,7 +44,7 @@ jobs:
# TODO(kou): Uncomment this when we resolve "ADD never use cache" problem.
# docker-compose build $BUILD_IMAGE
docker-compose run \
- -e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }} \
+ -e SETUPTOOLS_SCM_PRETEND_VERSION="{{ arrow.no_rc_version }}" \
-e PYTHON_VERSION="{{ python_version }}" \
-e UNICODE_WIDTH="{{ unicode_width }}" \
$BUILD_IMAGE
diff --git a/dev/tasks/python-wheels/manylinux-test.sh b/dev/tasks/python-wheels/manylinux-test.sh
index 66568019ba..414279115f 100755
--- a/dev/tasks/python-wheels/manylinux-test.sh
+++ b/dev/tasks/python-wheels/manylinux-test.sh
@@ -41,6 +41,8 @@ import sys
import pyarrow
import pyarrow.parquet
import pyarrow.plasma
+import pyarrow.fs
+import pyarrow._hdfs
if sys.version_info.major > 2:
import pyarrow.dataset
diff --git a/dev/tasks/python-wheels/osx-build.sh b/dev/tasks/python-wheels/osx-build.sh
index c896ef522d..ffaf076ddc 100755
--- a/dev/tasks/python-wheels/osx-build.sh
+++ b/dev/tasks/python-wheels/osx-build.sh
@@ -124,6 +124,7 @@ function build_wheel {
-DARROW_BUILD_TESTS=OFF \
-DARROW_DATASET=ON \
-DARROW_DEPENDENCY_SOURCE=BUNDLED \
+ -DARROW_HDFS=ON \
-DARROW_FLIGHT=ON \
-DARROW_GANDIVA=${BUILD_ARROW_GANDIVA} \
-DARROW_JEMALLOC=ON \
@@ -166,6 +167,7 @@ function build_wheel {
export PYARROW_WITH_DATASET=1
export PYARROW_WITH_FLIGHT=1
+ export PYARROW_WITH_HDFS=1
export PYARROW_WITH_PLASMA=1
export PYARROW_WITH_PARQUET=1
export PYARROW_WITH_ORC=0
@@ -220,6 +222,8 @@ import sys
import pyarrow
import pyarrow.parquet
import pyarrow.plasma
+import pyarrow.fs
+import pyarrow._hdfs
if sys.version_info.major > 2:
import pyarrow.dataset