sjperkins commented on code in PR #33805: URL: https://github.com/apache/arrow/pull/33805#discussion_r1082466748
########## ci/docker/python-wheel-manylinux-x-y.dockerfile: ########## @@ -0,0 +1,95 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +ARG base +FROM ${base} + +ARG arch +ARG arch_short +ARG manylinux + +ENV MANYLINUX_VERSION=${manylinux} + +# Install basic dependencies +RUN yum install -y git flex curl autoconf zip perl-IPC-Cmd wget + +ENV HOST_PYTHON_VERSION=3.8 +RUN HOST_PYTHON_ROOT=$(find /opt/python -name cp${HOST_PYTHON_VERSION/./}-*) && \ + echo "export PATH=$HOST_PYTHON_ROOT/bin:\$PATH" >> /python.sh Review Comment: CENTOS 7 includes python 2.7.5 as a system package ```bash $ docker run -it --rm quay.io/pypa/manylinux2014_x86_64 -- python --version Python 2.7.5 ``` whereas AlmaLinux 8 includes a number of Python distros in the `/opt` directory ```bash $ docker run -it --rm quay.io/pypa/manylinux_2_28_x86_64 -- python --version /usr/local/bin/manylinux-entrypoint: line 8: exec: python: not found $ docker run -it --rm quay.io/pypa/manylinux_2_28_x86_64 -- /opt/python/cp38-cp38/bin/python --version Python 3.8.15 $ docker run -it --rm quay.io/pypa/manylinux_2_28_x86_64 -- /opt/python/cp310-cp310/bin/python -- version Python 3.10.8 ``` Unfortunately, exporting the path of one these distributions into `/etc/profile.d/python.sh` doesn't work in docker (probably due to Docker calling `sh -c` instead of `bash -c` on RUN commands). I've elected to export the path into a small shell script and source it on the required RUN calls. This is the only major difference from the manylinux2014 script. -- 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]
