@@ -26,9 +26,31 @@ CMAKE_ARGS="${CMAKE_ARGS} -DDPCTL_LEVEL_ZERO_INCLUDE_DIR=${PREFIX}/include/level
2626
2727# -wnx flags mean: --wheel --no-isolation --skip-dependency-check
2828${PYTHON} -m build -w -n -x
29+
30+ pushd dist
31+ ${PYTHON} -m wheel unpack -d dpctl_wheel dpctl* .whl
32+ export lib_name=libDPCTLSyclInterface
33+ export so_full_path=$( find dpctl_wheel -regextype posix-extended -regex " ^.*${lib_name} \.so" )
34+ export sox_full_path=$( find dpctl_wheel -regextype posix-extended -regex " ^.*${lib_name} \.so\.[0-9]*$" )
35+ export soxxx_full_path=$( find dpctl_wheel -regextype posix-extended -regex " ^.*${lib_name} \.so\.[0-9]*\.[0-9]*$" )
36+
37+ rm -rf ${so_full_path} ${soxxx_full_path}
38+
39+ export so_name=$( basename ${so_full_path} )
40+ export sox_name=$( basename ${sox_full_path} )
41+ export soxxx_name=$( basename ${soxxx_full_path} )
42+ export wheel_path=$( dirname $( dirname ${so_full_path} ) )
43+
44+ # deal with hard copies
45+ ${PYTHON} -m wheel pack ${wheel_path}
46+
47+ rm -rf dpctl_wheel
48+ popd
49+
2950${PYTHON} -m wheel tags --remove --build " $GIT_DESCRIBE_NUMBER " \
3051 --platform-tag " manylinux_${GLIBC_MAJOR} _${GLIBC_MINOR} _x86_64" \
3152 dist/dpctl* .whl
53+
3254${PYTHON} -m pip install dist/dpctl* .whl \
3355 --no-build-isolation \
3456 --no-deps \
@@ -37,11 +59,14 @@ ${PYTHON} -m pip install dist/dpctl*.whl \
3759 --prefix " ${PREFIX} " \
3860 -vv
3961
62+ export libdir=$( find $PREFIX -name ' libDPCTLSyclInterface*' -exec dirname \{\} \; )
63+
4064# Recover symbolic links
4165# libDPCTLSyclInterface.so.0 -> libDPCTLSyclInterface.so.0.17
4266# libDPCTLSyclInterface.so -> libDPCTLSyclInterface.so.0
43- find $PREFIX | grep libDPCTLSyclInterface | sort -r | \
44- awk ' {if ($0=="") ln=""; else if (ln=="") ln = $0; else system("rm " $0 ";\tln -s " ln " " $0); ln = $0 }'
67+ mv ${libdir} /${sox_name} ${libdir} /${soxxx_name}
68+ ln -s ${libdir} /${soxxx_name} ${libdir} /${sox_name}
69+ ln -s ${libdir} /${sox_name} ${libdir} /${so_name}
4570
4671# Copy wheel package
4772if [[ -v WHEELS_OUTPUT_FOLDER ]]; then
0 commit comments