File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,17 @@ 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
+ pushd dist
30
+ ${PYTHON} -m wheel unpack -d dpctl_wheel
31
+ export lib_name=libDPCTLSyclInterface
32
+ export so_name=$( find dpctl -regextype posix-extended -regex ' ^.*${lib_name}\.so' -exec basename \{\} \; )
33
+ export sox_name=$( find dpctl -regextype posix-extended -regex ' ^.*${lib_name}\.so\.[0-9]*$' -exec basename \{\} \; )
34
+ export soxxx_name=$( find dpctl -regextype posix-extended -regex ' ^.*${lib_name}\.so\.[0-9]*\.[0-9]*$' -exec basename \{\} \; )
35
+ rm -rf ${so_name} ${soxxx_name}
36
+ # deal with hard copies
37
+ ${PYTHON} -m wheel pack dpctl_wheel
38
+ rm -rf dpctl_wheel
39
+ popd ..
29
40
${PYTHON} -m wheel tags --remove --build " $GIT_DESCRIBE_NUMBER " \
30
41
--platform-tag " manylinux_${GLIBC_MAJOR} _${GLIBC_MINOR} _x86_64" \
31
42
dist/dpctl* .whl
@@ -37,11 +48,14 @@ ${PYTHON} -m pip install dist/dpctl*.whl \
37
48
--prefix " ${PREFIX} " \
38
49
-vv
39
50
51
+ export libdir=$( find $PREFIX | grep libDPCTLSyclInterface | dirname)
52
+
40
53
# Recover symbolic links
41
54
# libDPCTLSyclInterface.so.0 -> libDPCTLSyclInterface.so.0.17
42
55
# 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 }'
56
+ mv ${libdir} /${sox_name} ${libdir} /${soxxx_name}
57
+ ln -s ${libdir} /${soxxx_name} ${libdir} /${sox_name}
58
+ ln -s ${libdir} /${sox_name} ${libdir} /${so_name}
45
59
46
60
# Copy wheel package
47
61
if [[ -v WHEELS_OUTPUT_FOLDER ]]; then
You can’t perform that action at this time.
0 commit comments