-
Notifications
You must be signed in to change notification settings - Fork 222
/
Copy pathfind_wheel_assets.sh
33 lines (28 loc) · 1.3 KB
/
find_wheel_assets.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
#!/bin/bash
# ============================================================================ #
# Copyright (c) 2022 - 2025 NVIDIA Corporation & Affiliates. #
# All rights reserved. #
# #
# This source code and the accompanying materials are made available under #
# the terms of the Apache License 2.0 which accompanies this distribution. #
# ============================================================================ #
# This script finds CUDA-Q simulator assets and constructs the CMake
# string argument in the form "<simulator's .so>;<simulator's .yml>;...",
# suitable for wheel build.
#
# Usage:
# bash scripts/find_wheel_assets.sh "$assets"
#
# The assets variable should be set to the path of the directory
# that contains the asset files.
# Note: it's okay if "$assets" directory does not exist. It will return an empty string.
if [ ! -d $1 ] ; then
exit 0
fi
for config_file in `find $1/*.yml -maxdepth 0 -type f`; do
RESULT_CONFIG="${RESULT_CONFIG:+$RESULT_CONFIG;}${config_file}";
done
for lib_file in `find $1/libnvqir-*.so -maxdepth 0 -type f`; do
RESULT_CONFIG="${RESULT_CONFIG:+$RESULT_CONFIG;}${lib_file}";
done
echo $RESULT_CONFIG