Skip to content

Commit 8336d97

Browse files
atalmanseemethere
andauthored
Dont run delocate on libtorch (#1051)
* Dont run delocate on libtorch * Update wheel/build_wheel.sh Co-authored-by: Eli Uriegas <[email protected]> Co-authored-by: Eli Uriegas <[email protected]>
1 parent 8585617 commit 8336d97

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

wheel/build_wheel.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ fi
5959
export PYTORCH_BUILD_VERSION=$build_version
6060
export PYTORCH_BUILD_NUMBER=$build_number
6161

62+
package_type="${PACKAGE_TYPE:-wheel}"
6263
# Fill in empty parameters with defaults
6364
if [[ -z "$TORCH_PACKAGE_NAME" ]]; then
6465
TORCH_PACKAGE_NAME='torch'
@@ -194,15 +195,17 @@ python setup.py bdist_wheel -d "$whl_tmp_dir"
194195

195196
echo "Finished setup.py bdist_wheel at $(date)"
196197

197-
echo "delocating wheel dependencies"
198-
retry pip install https://github.com/matthew-brett/delocate/archive/master.zip
199-
echo "found the following wheels:"
200-
find $whl_tmp_dir -name "*.whl"
201-
echo "running delocate"
202-
find $whl_tmp_dir -name "*.whl" | xargs -I {} delocate-wheel -v {}
203-
find $whl_tmp_dir -name "*.whl"
204-
find $whl_tmp_dir -name "*.whl" | xargs -I {} delocate-listdeps {}
205-
echo "Finished delocating wheels at $(date)"
198+
if [[ $package_type != 'libtorch' ]]; then
199+
echo "delocating wheel dependencies"
200+
retry pip install https://github.com/matthew-brett/delocate/archive/master.zip
201+
echo "found the following wheels:"
202+
find $whl_tmp_dir -name "*.whl"
203+
echo "running delocate"
204+
find $whl_tmp_dir -name "*.whl" | xargs -I {} delocate-wheel -v {}
205+
find $whl_tmp_dir -name "*.whl"
206+
find $whl_tmp_dir -name "*.whl" | xargs -I {} delocate-listdeps {}
207+
echo "Finished delocating wheels at $(date)"
208+
fi
206209

207210
echo "The wheel is in $(find $whl_tmp_dir -name '*.whl')"
208211

0 commit comments

Comments
 (0)