@@ -26,9 +26,31 @@ CMAKE_ARGS="${CMAKE_ARGS} -DDPCTL_LEVEL_ZERO_INCLUDE_DIR=${PREFIX}/include/level
26
26
27
27
# -wnx flags mean: --wheel --no-isolation --skip-dependency-check
28
28
${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
+
29
50
${PYTHON} -m wheel tags --remove --build " $GIT_DESCRIBE_NUMBER " \
30
51
--platform-tag " manylinux_${GLIBC_MAJOR} _${GLIBC_MINOR} _x86_64" \
31
52
dist/dpctl* .whl
53
+
32
54
${PYTHON} -m pip install dist/dpctl* .whl \
33
55
--no-build-isolation \
34
56
--no-deps \
@@ -37,11 +59,14 @@ ${PYTHON} -m pip install dist/dpctl*.whl \
37
59
--prefix " ${PREFIX} " \
38
60
-vv
39
61
62
+ export libdir=$( find $PREFIX -name ' libDPCTLSyclInterface*' -exec dirname \{\} \; )
63
+
40
64
# Recover symbolic links
41
65
# libDPCTLSyclInterface.so.0 -> libDPCTLSyclInterface.so.0.17
42
66
# 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}
45
70
46
71
# Copy wheel package
47
72
if [[ -v WHEELS_OUTPUT_FOLDER ]]; then
0 commit comments