Skip to content

Commit 48cc368

Browse files
jcfrthewtex
authored andcommitted
*-build-*-wheels.sh: Improve syntax
1 parent 3074965 commit 48cc368

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

scripts/internal/manylinux-build-module-wheels.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ script_dir=$(cd $(dirname $0) || exit 1; pwd)
44
source "${script_dir}/manylinux-build-common.sh"
55

66
# -----------------------------------------------------------------------
7-
# ARCH, PYBINARIES variables are set in common script
7+
# ARCH, PYBINARIES, PYTHON_LIBRARY variables are set in common script
88
# -----------------------------------------------------------------------
99

1010
# Compile wheels re-using standalone project and archive cache
@@ -27,13 +27,13 @@ for PYBIN in "${PYBINARIES[@]}"; do
2727
fi
2828
itk_build_dir=/work/ITK-$(basename $(dirname ${PYBIN}))-manylinux1_${ARCH}
2929
ln -fs /ITKPythonPackage/ITK-$(basename $(dirname ${PYBIN}))-manylinux1_${ARCH} $itk_build_dir
30-
if [[ ! -d $itk_build_dir ]]; then
30+
if [[ ! -d ${itk_build_dir} ]]; then
3131
echo 'ITK build tree not available!' 1>&2
3232
exit 1
3333
fi
3434
itk_source_dir=/work/standalone-${ARCH}-build/ITK-source
3535
ln -fs /ITKPythonPackage/standalone-${ARCH}-build/ /work/standalone-${ARCH}-build
36-
if [[ ! -d $itk_source_dir ]]; then
36+
if [[ ! -d ${itk_source_dir} ]]; then
3737
echo 'ITK source tree not available!' 1>&2
3838
exit 1
3939
fi
@@ -54,6 +54,6 @@ done
5454
# Since there are no external shared libraries to bundle into the wheels
5555
# this step will fixup the wheel switching from 'linux' to 'manylinux1' tag
5656
for whl in dist/*linux_$(uname -p).whl; do
57-
auditwheel repair $whl -w /work/dist/
58-
rm $whl
57+
auditwheel repair ${whl} -w /work/dist/
58+
rm ${whl}
5959
done

scripts/internal/manylinux-build-wheels.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ done
123123
# Since there are no external shared libraries to bundle into the wheels
124124
# this step will fixup the wheel switching from 'linux' to 'manylinux1' tag
125125
for whl in dist/*linux_$(uname -p).whl; do
126-
auditwheel repair $whl -w /work/dist/
127-
rm $whl
126+
auditwheel repair ${whl} -w /work/dist/
127+
rm ${whl}
128128
done
129129

130130
# Install packages and test

scripts/macpython-build-module-wheels.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ script_dir=$(cd $(dirname $0) || exit 1; pwd)
1212
source "${script_dir}/macpython-build-common.sh"
1313

1414
# -----------------------------------------------------------------------
15-
# SCRIPT_DIR, VENVS variables are set in common script
15+
# SCRIPT_DIR, VENVS, PYTHON_LIBRARY variables are set in common script
1616
# -----------------------------------------------------------------------
1717

1818
VENV="${VENVS[0]}"
1919
PYTHON_EXECUTABLE=${VENV}/bin/python
20-
$PYTHON_EXECUTABLE -m pip install --no-cache cmake
20+
${PYTHON_EXECUTABLE} -m pip install --no-cache cmake
2121
# CMAKE_EXECUTABLE=${VENV}/bin/cmake
22-
$PYTHON_EXECUTABLE -m pip install --no-cache ninja
22+
${PYTHON_EXECUTABLE} -m pip install --no-cache ninja
2323
NINJA_EXECUTABLE=${VENV}/bin/ninja
24-
$PYTHON_EXECUTABLE -m pip install --no-cache delocate
24+
${PYTHON_EXECUTABLE} -m pip install --no-cache delocate
2525
DELOCATE_LISTDEPS=${VENV}/bin/delocate-listdeps
2626
DELOCATE_WHEEL=${VENV}/bin/delocate-wheel
2727

@@ -37,12 +37,12 @@ for VENV in "${VENVS[@]}"; do
3737
echo "PYTHON_LIBRARY:${PYTHON_LIBRARY}"
3838

3939
if [[ -e $PWD/requirements-dev.txt ]]; then
40-
$PYTHON_EXECUTABLE -m pip install -r $PWD/requirements-dev.txt
40+
${PYTHON_EXECUTABLE} -m pip install -r $PWD/requirements-dev.txt
4141
fi
42-
$PYTHON_EXECUTABLE -m pip install --no-cache ninja
42+
${PYTHON_EXECUTABLE} -m pip install --no-cache ninja
4343
NINJA_EXECUTABLE=${VENV}/bin/ninja
4444
itk_build_path="${SCRIPT_DIR}/../ITK-${py_mm}-macosx_x86_64"
45-
$PYTHON_EXECUTABLE setup.py bdist_wheel --build-type MinSizeRel --plat-name macosx-10.6-x86_64 -G Ninja -- \
45+
${PYTHON_EXECUTABLE} setup.py bdist_wheel --build-type MinSizeRel --plat-name macosx-10.6-x86_64 -G Ninja -- \
4646
-DCMAKE_MAKE_PROGRAM:FILEPATH=${NINJA_EXECUTABLE} \
4747
-DITK_DIR:PATH=${itk_build_path} \
4848
-DITK_USE_SYSTEM_SWIG:BOOL=ON \
@@ -55,8 +55,8 @@ for VENV in "${VENVS[@]}"; do
5555
-DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR} \
5656
-DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY} \
5757
|| exit 1
58-
$PYTHON_EXECUTABLE setup.py clean
58+
${PYTHON_EXECUTABLE} setup.py clean
5959
done
6060

61-
$DELOCATE_LISTDEPS $PWD/dist/*.whl # lists library dependencies
62-
$DELOCATE_WHEEL $PWD/dist/*.whl # copies library dependencies into wheel
61+
${DELOCATE_LISTDEPS} $PWD/dist/*.whl # lists library dependencies
62+
${DELOCATE_WHEEL} $PWD/dist/*.whl # copies library dependencies into wheel

0 commit comments

Comments
 (0)