Skip to content

Commit c41d1c1

Browse files
vchuravymaleadt
authored andcommitted
only upgrade JLLWrappers version if needed
1 parent 1a0c97d commit c41d1c1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/AutoBuild.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ function register_jll(name, build_version, dependencies, julia_compat;
531531
gh_auth=Wizard.github_auth(;allow_anonymous=false),
532532
gh_username=gh_get_json(DEFAULT_API, "/user"; auth=gh_auth)["login"],
533533
lazy_artifacts::Bool=false,
534+
augment_platform_block="",
534535
kwargs...)
535536
# Calculate tree hash of wrapper code
536537
wrapper_tree_hash = bytes2hex(Pkg.GitTools.tree_hash(code_dir))
@@ -541,7 +542,8 @@ function register_jll(name, build_version, dependencies, julia_compat;
541542
cache = RegistryTools.RegistryCache(joinpath(Pkg.depots1(), "registries_binarybuilder"))
542543
registry_url = "https://$(gh_username):$(gh_auth.token)@github.com/JuliaRegistries/General"
543544
cache.registries[registry_url] = Base.UUID("23338594-aafe-5451-b93e-139f81909106")
544-
project = Pkg.Types.Project(build_project_dict(name, build_version, dependencies, julia_compat; lazy_artifacts=lazy_artifacts))
545+
JLLWrappers = isempty(augment_platform_block) ? "1.2.0" : "1.4.0"
546+
project = Pkg.Types.Project(build_project_dict(name, build_version, dependencies, julia_compat; JLLWrappers, lazy_artifacts=lazy_artifacts))
545547
errors = setdiff(RegistryTools.registrator_errors, [:version_less_than_all_existing])
546548
reg_branch = RegistryTools.register(
547549
"https://github.com/$(deploy_repo).git",
@@ -1473,7 +1475,8 @@ function build_jll_package(src_name::String,
14731475

14741476
# Add a Project.toml. Note: here we list _all_ runtime dependencies, including those
14751477
# that may be required only for some platforms.
1476-
project = build_project_dict(src_name, build_version, dependencies, julia_compat; lazy_artifacts=lazy_artifacts)
1478+
JLLWrappers = isempty(augment_platform_block) ? "1.2.0" : "1.4.0"
1479+
project = build_project_dict(src_name, build_version, dependencies, julia_compat; lazy_artifacts=lazy_artifacts, JLLWrappers)
14771480
open(joinpath(code_dir, "Project.toml"), "w") do io
14781481
Pkg.TOML.print(io, project)
14791482
end
@@ -1546,7 +1549,7 @@ function find_uuid(ctx, pkg)
15461549
""")
15471550
end
15481551

1549-
function build_project_dict(name, version, dependencies::Array{Dependency}, julia_compat::String=DEFAULT_JULIA_VERSION_SPEC; lazy_artifacts::Bool=false, kwargs...)
1552+
function build_project_dict(name, version, dependencies::Array{Dependency}, julia_compat::String=DEFAULT_JULIA_VERSION_SPEC; lazy_artifacts::Bool=false, JLLWrappers="1.2.0", kwargs...)
15501553
Pkg.Types.semver_spec(julia_compat) # verify julia_compat is valid
15511554
project = Dict(
15521555
"name" => "$(name)_jll",
@@ -1555,7 +1558,7 @@ function build_project_dict(name, version, dependencies::Array{Dependency}, juli
15551558
"deps" => Dict{String,Any}(),
15561559
# We require at least Julia 1.3+, for Pkg.Artifacts support, but we only claim
15571560
# Julia 1.0+ by default so that empty JLLs can be installed on older versions.
1558-
"compat" => Dict{String,Any}("JLLWrappers" => "1.4.0",
1561+
"compat" => Dict{String,Any}("JLLWrappers" => JLLWrappers,
15591562
"julia" => "$(julia_compat)")
15601563
)
15611564

0 commit comments

Comments
 (0)