Skip to content

Commit 129870a

Browse files
committed
add python path dynamically
1 parent 7058837 commit 129870a

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

‎tools/wheels/build-wheels.sh

+4-10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# Build wheels (on Linux or OSX) using cibuildwheel.
55
#
66

7+
PYTHON=$(which python3)
8+
79
this_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
810

911

@@ -54,17 +56,9 @@ $this_dir/install-librdkafka.sh $librdkafka_version dest
5456

5557
install_pkgs=cibuildwheel==$cibuildwheel_version
5658

57-
python -m pip install ${PIP_INSTALL_OPTS} $install_pkgs ||
59+
$PYTHON -m pip install ${PIP_INSTALL_OPTS} $install_pkgs ||
5860
pip3 install ${PIP_INSTALL_OPTS} $install_pkgs
5961

60-
export PATH="$HOME/.local/bin:$PATH"
61-
62-
which pip3
63-
which python3
64-
pip3 --version
65-
python3 --version
66-
python3 -m site
67-
6862
if [[ -z $TRAVIS ]]; then
6963
cibw_args="--platform $os"
7064
fi
@@ -73,7 +67,7 @@ if [[ $os == "macos" ]]; then
7367
python3 $this_dir/install-macos-python-required-by-cibuildwheel.py $cibuildwheel_version
7468
fi
7569

76-
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/$lib_dir python3 -m cibuildwheel --output-dir $wheeldir $cibw_args
70+
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/$lib_dir $PYTHON -m cibuildwheel --output-dir $wheeldir $cibw_args
7771

7872
ls $wheeldir
7973

0 commit comments

Comments
 (0)