-
Notifications
You must be signed in to change notification settings - Fork 68
/
test_pip.sh
executable file
·43 lines (38 loc) · 1.18 KB
/
test_pip.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# This script is to prepare for testing the correctness of pypi installation
# Copy related dependencies for patching
rm -rf dbglib
mkdir dbglib
cp -r ./3rd_party/ffmpeg_bin/linux/build/lib/. dbglib
cp /usr/lib/x86_64-linux-gnu/libboost_python37.so.1.67.0 dbglib
cp /usr/lib/x86_64-linux-gnu/libboost_numpy37.so.1.67.0 dbglib
cp /usr/lib/x86_64-linux-gnu/libboost_system.so.1.67.0 dbglib
cp /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.67.0 dbglib
cp /usr/lib/x86_64-linux-gnu/libgflags.so.2.2 dbglib
cp /usr/lib/x86_64-linux-gnu/libglog.so.0 dbglib
cp /usr/lib/x86_64-linux-gnu/libunwind.so.8 dbglib
# Patch rpath for dependencies
cd dbglib
for libfile in *.so*
do
if [ -f "$libfile" ]; then
patchelf --set-rpath '$ORIGIN' "$libfile"
echo "Patch $libfile"
fi
done
cd ..
# PYPI package
cp -r dbglib/. output/bmf/lib
cp -r output/bmf/lib bmf
cp -r output/bmf/bin bmf
cp -r output/bmf/include bmf
cp bmf/c_modules/meta/BUILTIN_CONFIG.json bmf
cp output/bmf/lib/libcopy_module.so bmf/test/c_module
/usr/bin/python3.7 setup.py bdist_wheel
# Install package for testing
cd dist
for whlfile in *.whl
do
/usr/bin/python3.7 -m pip install "$whlfile"
done
cd ..