File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,7 @@ jobs:
225225
226226 - name : Remove build requirements' binaries
227227 run : |
228+ set -x
228229 graphFile='graph.json'
229230 hostPackagesFile='packages-host.json'
230231 buildPackagesFile='packages-build.json'
@@ -252,13 +253,13 @@ jobs:
252253
253254 # Some are both build and host requirements and must not be removed
254255 # => exclude them from the list
255- cat $buildPackagesFile $hostPackagesFile | jq -s '
256- .[0]["Local Cache"] as $build_packages
257- | (. [1]["Local Cache"] | keys) as $host_package_names
258- | $build_packages
259- | with_entries(select(.key as $k | $host_package_names | index($k) == null)) as $packages
260- | {"Local Cache": $packages}
261- ' > $ buildFilteredPackagesFile
256+ python3 -c '
257+ import json, sys
258+ build_dict = json.load(open(sys.argv [1])) ["Local Cache"] # => {"pkg1": {...}, "pkg2": {...}, ...}
259+ host_list = json.load(open(sys.argv[2]))["Local Cache"] # => ["pkg1", "pkg2", ...]
260+ filtered_dict = {k: v for k, v in build_dict.items() if k not in host_list}
261+ json.dump( {"Local Cache": filtered_dict}, open(sys.argv[3], "w"))
262+ ' "$buildPackagesFile" "$hostPackagesFile" "$ buildFilteredPackagesFile"
262263
263264 conan remove --list "$buildFilteredPackagesFile" --confirm
264265
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ sqlite3/*:build_executable=False
226226opusfile/*:http=False
227227zstd/*:build_programs=False
228228
229- # Prevents libcurl dependency (fails to build due to system zlib)
229+ # Prevents onnxruntime->date-> libcurl dependency
230230# NOTE: use_system_tz_db is specific to date/3.0.1
231231# Newer date recipes would need the tz_db=system option instead.
232232date/*:use_system_tz_db=True
You can’t perform that action at this time.
0 commit comments