Skip to content

Commit b614095

Browse files
authored
Replace unzip_jll with p7zip_jll (#1826)
* Replace unzip_jll with p7zip_jll * Add compat and fix qa test
1 parent 25a8795 commit b614095

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Reactant_jll = "0192cb87-2b54-54ad-80e0-3be72ad8a3c0"
2626
ScopedValues = "7e506255-f358-4e82-b7e4-beb19740aa63"
2727
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
2828
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
29-
unzip_jll = "88f77b66-78eb-5ed0-bc16-ebba0796830d"
29+
p7zip_jll = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
3030

3131
[weakdeps]
3232
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
@@ -115,7 +115,7 @@ Statistics = "1.10"
115115
YaoBlocks = "0.13, 0.14"
116116
Zygote = "0.7"
117117
julia = "1.10"
118-
unzip_jll = "6"
118+
p7zip_jll = "17"
119119

120120
[extras]
121121
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/accelerators/Metal.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module Metal
33
using Reactant: Reactant
44
using Scratch: @get_scratch!
55
using Downloads: Downloads
6+
using p7zip_jll: p7zip
67

78
const metal_pjrt_plugin_dir = Ref{Union{Nothing,String}}(nothing)
89

@@ -47,7 +48,7 @@ function download_metal_pjrt_plugin_if_needed(path=nothing)
4748
end,
4849
zip_file_path,
4950
)
50-
run(`unzip -qq $(zip_file_path) -d $(tmp_dir)`)
51+
run(pipeline(`$(p7zip()) x -tzip -o$(tmp_dir) -- $(zip_file_path)`, devnull))
5152
mv(
5253
joinpath(tmp_dir, "jax_plugins", "metal_plugin", "pjrt_plugin_metal_14.dylib"),
5354
metal_pjrt_plugin_path,

src/accelerators/TPU.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using EnumX: @enumx
55
using Scratch: @get_scratch!
66
using HTTP: HTTP
77
using Downloads: Downloads
8-
using unzip_jll: unzip
8+
using p7zip_jll: p7zip
99

1010
const libtpu_dir = Ref{Union{Nothing,String}}(nothing)
1111
const RUNNING_IN_CLOUD_TPU_VM = Ref(false)
@@ -49,7 +49,7 @@ function download_libtpu_if_needed(path=nothing)
4949
"https://storage.googleapis.com/libtpu-nightly-releases/wheels/libtpu/libtpu-0.0.28.dev20251027+nightly-cp314-cp314t-manylinux_2_31_x86_64.whl",
5050
zip_file_path,
5151
)
52-
run(`$(unzip()) -qq $(zip_file_path) -d $(tmp_dir)`)
52+
run(pipeline(`$(p7zip()) x -tzip -o$(tmp_dir) -- $(zip_file_path)`, devnull))
5353
mv(joinpath(tmp_dir, "libtpu", "libtpu.so"), libtpu_path)
5454
rm(tmp_dir; recursive=true)
5555
rm(zip_file_path; recursive=true)

test/qa.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ end
9191
Reactant.Accelerators.TPU.TPUVersion,
9292
Reactant.PrecisionConfig,
9393
),
94-
ignore=(:unzip, :ShardyPropagationOptions),
94+
ignore=(:p7zip, :ShardyPropagationOptions),
9595
) === nothing
9696
end
9797
@testset "Qualified Accesses" begin

0 commit comments

Comments
 (0)