@@ -41,7 +41,6 @@ function generate_imports(src_name)
4141 using Libdl, Artifacts, JLLWrappers. Preferences, Base. BinaryPlatforms
4242 using Artifacts: load_artifacts_toml, unpack_platform
4343 using Base. BinaryPlatforms: triplet, select_platform
44- import Pkg
4544 if ! @isdefined (augment_platform!)
4645 augment_platform! (platform) = platform
4746 end
@@ -81,7 +80,6 @@ This method generates the toplevel definitions common to all JLL packages, such
8180`is_available()`, the `PATH` and `LIBPATH` symbols, etc....
8281"""
8382function generate_toplevel_definitions (src_name, __source__)
84- pkg_dir = dirname (String (__source__. file))
8583 return quote
8684 """
8785 is_available()
@@ -172,7 +170,9 @@ function generate_wrapper_load(src_name, pkg_uuid, __source__)
172170 end
173171
174172 if VERSION >= v " 1.6"
175- function ensure_artifact_installed (platform= host_platform)
173+ function install_current_artifact (platform= host_platform)
174+ # Avoid loading Pkg by default, to keep the latency down if we can
175+ local Pkg = Base. require (Base. PkgId (UUID ((0x44cfe95a_1eb2_52ea , 0xb672_e2afdf69b78f )), " Pkg" ))
176176 Pkg. Artifacts. ensure_artifact_installed ($ (src_name), joinpath ($ (pkg_dir), " .." , " Artifacts.toml" ); platform= platform, pkg_uuid= $ (pkg_uuid))
177177 end
178178 end
0 commit comments