Skip to content

Commit d79dae1

Browse files
Merge pull request #1773 from IntelPython/drop-use-of-soversion-for-DPCTLSyclInterface
Drop use of soversion for dpctl sycl interface
2 parents 2d964d9 + 1364ec4 commit d79dae1

File tree

3 files changed

+18
-42
lines changed

3 files changed

+18
-42
lines changed

conda-recipe/build.sh

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,6 @@ CMAKE_ARGS="${CMAKE_ARGS} -DDPCTL_LEVEL_ZERO_INCLUDE_DIR=${PREFIX}/include/level
2727
# -wnx flags mean: --wheel --no-isolation --skip-dependency-check
2828
${PYTHON} -m build -w -n -x
2929

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-
5030
${PYTHON} -m wheel tags --remove --build "$GIT_DESCRIBE_NUMBER" \
5131
--platform-tag "manylinux_${GLIBC_MAJOR}_${GLIBC_MINOR}_x86_64" \
5232
dist/dpctl*.whl
@@ -59,15 +39,6 @@ ${PYTHON} -m pip install dist/dpctl*.whl \
5939
--prefix "${PREFIX}" \
6040
-vv
6141

62-
export libdir=$(find $PREFIX -name 'libDPCTLSyclInterface*' -exec dirname \{\} \;)
63-
64-
# Recover symbolic links
65-
# libDPCTLSyclInterface.so.0 -> libDPCTLSyclInterface.so.0.17
66-
# libDPCTLSyclInterface.so -> libDPCTLSyclInterface.so.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}
70-
7142
# Copy wheel package
7243
if [[ -d "${WHEELS_OUTPUT_FOLDER}" ]]; then
7344
cp dist/dpctl*.whl "${WHEELS_OUTPUT_FOLDER[@]}"

dpctl/tests/test_service.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,11 @@ def test_syclinterface(should_skip_syclinterface):
163163
if should_skip_syclinterface:
164164
pass
165165
else:
166-
assert len(paths) > 1 and any(
167-
[os.path.islink(fn) for fn in paths]
168-
), "All library instances are hard links"
166+
len_p = len(paths)
167+
n_symlinks = sum([int(os.path.islink(fn)) for fn in paths])
168+
assert len_p == 1 + n_symlinks, (
169+
"Multiple library instances are hard links",
170+
)
169171
elif sys.platform in ["win32", "cygwin"]:
170172
exts = []
171173
for fn in paths:

libsyclinterface/CMakeLists.txt

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,19 @@ if(DPCTL_ENABLE_GLOG)
284284
endif()
285285

286286

287-
include(GetProjectVersion)
288-
# the get_version function is defined in the GetProjectVersion module and
289-
# defines: VERSION, SEMVER, MAJOR, MINOR, PATCH. These variables are populated
290-
# by parsing the output of git describe.
291-
get_version()
292-
set_target_properties(DPCTLSyclInterface
293-
PROPERTIES
294-
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}
295-
SOVERSION ${VERSION_MAJOR}
296-
)
287+
set(buld_so_version 0)
288+
if (build_so_version)
289+
include(GetProjectVersion)
290+
# the get_version function is defined in the GetProjectVersion module and
291+
# defines: VERSION, SEMVER, MAJOR, MINOR, PATCH. These variables are populated
292+
# by parsing the output of git describe.
293+
get_version()
294+
set_target_properties(DPCTLSyclInterface
295+
PROPERTIES
296+
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}
297+
SOVERSION ${VERSION_MAJOR}
298+
)
299+
endif()
297300

298301
if(DPCTL_ENABLE_L0_PROGRAM_CREATION)
299302
target_include_directories(DPCTLSyclInterface

0 commit comments

Comments
 (0)