Skip to content

Commit bab3887

Browse files
committed
make sed work on BSD (macos) and linux both
1 parent 4578868 commit bab3887

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

travis-ci/build_wheel.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@ if [ "${INTERFACE64}" != "1" ]; then
3636
# rewrite the name of the project to scipy_openblas32
3737
# this is a hack, but apparently there is no other way to change the name
3838
# of a pyproject.toml project
39-
sed -e "s/openblas64/openblas32/" -i pyproject.toml
39+
#
40+
# use the BSD variant of sed -i and remove the backup
41+
sed -e "s/openblas64/openblas32/" -i.bak pyproject.toml
42+
rm *.bak
4043
mv local/scipy_openblas64 local/scipy_openblas32
41-
sed -e "s/openblas_get_config64_/openblas_get_config/" -i local/scipy_openblas32/__init__.py
42-
sed -e "s/openblas64/openblas32/" -i local/scipy_openblas32/__main__.py
44+
sed -e "s/openblas_get_config64_/openblas_get_config/" -i.bak local/scipy_openblas32/__init__.py
45+
sed -e "s/openblas64/openblas32/" -i.bak local/scipy_openblas32/__main__.py
46+
rm local/scipy_openblas32/*.bak
4347
fi
4448

4549
python3.7 -m pip wheel -w dist -vv .

0 commit comments

Comments
 (0)