Skip to content

Commit

Permalink
ARROW-8013: [Python][Packaging] Fix building manylinux wheels
Browse files Browse the repository at this point in the history
Closes #6546 from pitrou/ARROW-8013-fix-manylinux and squashes the following commits:

954648b <Antoine Pitrou> ARROW-8013:  Fix building manylinux wheels

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Wes McKinney <wesm+git@apache.org>
  • Loading branch information
pitrou authored and wesm committed Mar 5, 2020
1 parent b785fdc commit 90385fe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions python/manylinux1/build_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ 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.txt

Expand Down
2 changes: 1 addition & 1 deletion python/manylinux201x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The Docker configuration is in `Dockerfile-x86_64_base_2010` and `Dockerfile-x86
and it calls into scripts stored under the `scripts` directory.

```bash
docker-compose build python-manylinux2010
docker-compose build centos-python-manylinux2010
```

For each dependency, a bash script in the `scripts/` directory downloads the
Expand Down
11 changes: 8 additions & 3 deletions python/manylinux201x/build_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ PYTHON_INTERPRETER="${CPYTHON_PATH}/bin/python"
PIP="${CPYTHON_PATH}/bin/pip"
PATH="${PATH}:${CPYTHON_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.txt

Expand Down Expand Up @@ -131,10 +136,10 @@ rm -rf repaired_wheels/
find -name "*.so" -delete

echo "=== (${PYTHON_VERSION}) Building wheel ==="
PATH="$PATH:${CPYTHON_PATH}/bin" $PYTHON_INTERPRETER setup.py build_ext --inplace
PATH="$PATH:${CPYTHON_PATH}/bin" $PYTHON_INTERPRETER setup.py bdist_wheel
PATH="${CPYTHON_PATH}/bin:$PATH" $PYTHON_INTERPRETER setup.py build_ext --inplace
PATH="${CPYTHON_PATH}/bin:$PATH" $PYTHON_INTERPRETER setup.py bdist_wheel
# Source distribution is used for debian pyarrow packages.
PATH="$PATH:${CPYTHON_PATH}/bin" $PYTHON_INTERPRETER setup.py sdist
PATH="${CPYTHON_PATH}/bin:$PATH" $PYTHON_INTERPRETER setup.py sdist

echo "=== (${PYTHON_VERSION}) Tag the wheel with manylinux201x ==="
mkdir -p repaired_wheels/
Expand Down

0 comments on commit 90385fe

Please sign in to comment.