-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Andrey Talman <[email protected]> Co-authored-by: Huy Do <[email protected]>
- Loading branch information
1 parent
97ca885
commit f932e07
Showing
6 changed files
with
112 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,57 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
source packaging/helpers.sh | ||
|
||
wheel_path=$(pwd)/$(find dist -type f -name "*.whl") | ||
echo "Wheel content:" | ||
unzip -l $wheel_path | ||
|
||
ffmpeg_versions=(4 5 6 7) | ||
unamestr=$(uname) | ||
if [[ "$unamestr" == 'Linux' ]]; then | ||
ext="so" | ||
elif [[ "$unamestr" == 'Darwin' ]]; then | ||
ext="dylib" | ||
else | ||
echo "Unknown operating system: $unamestr" | ||
exit 1 | ||
fi | ||
|
||
# TODO: Make ffmpeg4 work with nvcc. | ||
if [ "$ENABLE_CUDA" -eq 1 ]; then | ||
ffmpeg_versions=(5 6 7) | ||
if [[ "$ENABLE_CUDA" -eq 1 ]]; then | ||
ffmpeg_versions=(5 6 7) | ||
fi | ||
|
||
for ffmpeg_major_version in ${ffmepg_versions[@]}; do | ||
assert_in_wheel $wheel_path torchcodec/libtorchcodec${ffmpeg_major_version}.so | ||
for ffmpeg_major_version in ${ffmpeg_versions[@]}; do | ||
assert_in_wheel $wheel_path torchcodec/libtorchcodec${ffmpeg_major_version}.${ext} | ||
done | ||
assert_not_in_wheel $wheel_path libtorchcodec.so | ||
assert_not_in_wheel $wheel_path libtorchcodec.${ext} | ||
|
||
for ffmpeg_so in libavcodec.so libavfilter.so libavformat.so libavutil.so libavdevice.so ; do | ||
assert_not_in_wheel $wheel_path $ffmpeg_so | ||
for ffmpeg_ext in libavcodec.${ext} libavfilter.${ext} libavformat.${ext} libavutil.${ext} libavdevice.${ext} ; do | ||
assert_not_in_wheel $wheel_path $ffmpeg_ext | ||
done | ||
|
||
assert_not_in_wheel $wheel_path "^test" | ||
assert_not_in_wheel $wheel_path "^doc" | ||
assert_not_in_wheel $wheel_path "^benchmarks" | ||
assert_not_in_wheel $wheel_path "^packaging" | ||
|
||
# See invoked python script below for details about this check. | ||
extracted_wheel_dir=$(mktemp -d) | ||
unzip -q $wheel_path -d $extracted_wheel_dir | ||
symbols_matches=$(find $extracted_wheel_dir | grep ".so$" | xargs objdump --syms | grep GLIBCXX_3.4.) | ||
python packaging/check_glibcxx.py "$symbols_matches" | ||
if [[ "$unamestr" == 'Linux' ]]; then | ||
# See invoked python script below for details about this check. | ||
extracted_wheel_dir=$(mktemp -d) | ||
unzip -q $wheel_path -d $extracted_wheel_dir | ||
symbols_matches=$(find $extracted_wheel_dir | grep ".so$" | xargs objdump --syms | grep GLIBCXX_3.4.) | ||
python packaging/check_glibcxx.py "$symbols_matches" | ||
|
||
echo "ls dist" | ||
ls dist | ||
echo "ls dist" | ||
ls dist | ||
|
||
old="linux_x86_64" | ||
new="manylinux_2_17_x86_64.manylinux2014_x86_64" | ||
echo "Replacing ${old} with ${new} in wheel name" | ||
mv dist/*${old}*.whl $(echo dist/*${old}*.whl | sed "s/${old}/${new}/") | ||
old="linux_x86_64" | ||
new="manylinux_2_17_x86_64.manylinux2014_x86_64" | ||
echo "Replacing ${old} with ${new} in wheel name" | ||
mv dist/*${old}*.whl $(echo dist/*${old}*.whl | sed "s/${old}/${new}/") | ||
fi | ||
|
||
echo "ls dist" | ||
ls dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters