@@ -104,42 +104,65 @@ ARG TARGETARCH
104
104
USER 0
105
105
WORKDIR /tmp/build-wheels
106
106
107
+ # Set pyarrow version for s390x
108
+ RUN if [ "$TARGETARCH" = "s390x" ]; then \
109
+ echo 'export PYARROW_VERSION=17.0.0' >> /etc/profile.d/s390x.sh; \
110
+ fi
111
+
107
112
# Build pyarrow optimized for s390x
108
113
RUN --mount=type=cache,target=/root/.cache/pip \
109
114
--mount=type=cache,target=/root/.cache/dnf \
110
115
if [ "$TARGETARCH" = "s390x" ]; then \
111
- # Install build dependencies (shared for pyarrow and onnx)
112
- dnf install -y cmake make gcc-c++ pybind11-devel wget && \
116
+ # Install build dependencies
117
+ dnf install -y cmake make gcc-c++ pybind11-devel wget git \
118
+ openssl-devel zlib-devel bzip2-devel lz4-devel \
119
+ ninja-build && \
113
120
dnf clean all && \
114
- # Build and collect pyarrow wheel
115
- git clone --depth 1 https://github.com/apache/arrow.git && \
116
- cd arrow/cpp && \
117
- mkdir release && cd release && \
121
+ # Source the environment variables
122
+ source /etc/profile.d/s390x.sh && \
123
+ # Clone specific version of arrow
124
+ git clone -b apache-arrow-${PYARROW_VERSION} https://github.com/apache/arrow.git && \
125
+ cd arrow && \
126
+ # Set environment variables for build
127
+ export ARROW_HOME=/usr/local && \
128
+ export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH && \
129
+ export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \
130
+ # Build C++ library first
131
+ cd cpp && \
132
+ mkdir build && cd build && \
118
133
cmake -DCMAKE_BUILD_TYPE=Release \
119
- -DCMAKE_INSTALL_PREFIX=/usr/local \
134
+ -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
120
135
-DARROW_PYTHON=ON \
121
136
-DARROW_PARQUET=ON \
122
137
-DARROW_ORC=ON \
123
138
-DARROW_FILESYSTEM=ON \
124
139
-DARROW_JSON=ON \
125
140
-DARROW_CSV=ON \
126
141
-DARROW_DATASET=ON \
127
- -DARROW_DEPENDENCY_SOURCE=BUNDLED \
128
- -DARROW_WITH_LZ4=OFF \
129
- -DARROW_WITH_ZSTD=OFF \
142
+ -DARROW_WITH_LZ4=ON \
143
+ -DARROW_WITH_ZSTD=ON \
130
144
-DARROW_WITH_SNAPPY=OFF \
145
+ -DARROW_WITH_BZ2=ON \
146
+ -DARROW_WITH_ZLIB=ON \
131
147
-DARROW_BUILD_TESTS=OFF \
132
148
-DARROW_BUILD_BENCHMARKS=OFF \
149
+ -DARROW_USE_CCACHE=OFF \
150
+ -GNinja \
133
151
.. && \
134
- make -j$(nproc) VERBOSE=1 && \
135
- make install -j$(nproc) && \
152
+ ninja install && \
136
153
cd ../../python && \
154
+ # Install Python build requirements
137
155
pip install --no-cache-dir -r requirements-build.txt && \
156
+ # Build Python package
138
157
PYARROW_WITH_PARQUET=1 \
139
158
PYARROW_WITH_DATASET=1 \
140
159
PYARROW_WITH_FILESYSTEM=1 \
141
160
PYARROW_WITH_JSON=1 \
142
161
PYARROW_WITH_CSV=1 \
162
+ PYARROW_WITH_LZ4=1 \
163
+ PYARROW_WITH_ZSTD=1 \
164
+ PYARROW_WITH_BZ2=1 \
165
+ PYARROW_BUNDLE_ARROW_CPP=1 \
143
166
PYARROW_PARALLEL=$(nproc) \
144
167
python setup.py build_ext --build-type=release --bundle-arrow-cpp bdist_wheel && \
145
168
mkdir -p /tmp/wheels && \
0 commit comments