Skip to content

Commit dddc219

Browse files
authored
[AutoBuild] Filter out non-build deps before calling setup_dependencies (#1209)
1 parent 06621c4 commit dddc219

5 files changed

Lines changed: 32 additions & 30 deletions

File tree

Manifest.toml

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "BinaryBuilder"
22
uuid = "12aac903-9f7c-5d81-afc2-d9565ea332ae"
33
authors = ["Elliot Saba <staticfloat@gmail.com>"]
4-
version = "0.5.4"
4+
version = "0.5.5"
55

66
[deps]
77
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
@@ -33,7 +33,7 @@ ghr_jll = "07c12ed4-43bc-5495-8a2a-d5838ef8d533"
3333

3434
[compat]
3535
ArgParse = "1.1"
36-
BinaryBuilderBase = "1.10"
36+
BinaryBuilderBase = "1.12"
3737
GitHub = "5.1"
3838
HTTP = "0.8, 0.9"
3939
JLD2 = "0.1.6, 0.2, 0.3, 0.4"

docs/src/building.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ dependencies = [
330330

331331
* [`Dependency`](@ref) specify a JLL package that is necessary to build and load
332332
the current builder. Binaries for the target platform will be installed;
333+
* [`RuntimeDependency`](@ref): a JLL package that is necessary only at runtime. Its
334+
artifact will not be installed in the prefix during the build.
333335
* [`BuildDependency`](@ref) is a JLL package necessary only to build the current
334336
package, but not to load it. This dependency will install binaries for the
335337
target platforms and will not be added to the list of the dependencies of the
@@ -338,11 +340,11 @@ dependencies = [
338340
install binaries for the host system. This kind of dependency is usually
339341
added to provide some binary utilities to run during the build process.
340342

341-
The argument of `Dependency`, `BuildDependency`, and `HostBuildDependency` can
342-
also be a `Pkg.PackageSpec`, with which you can specify more details about the
343-
dependency, like a version number, or also a non-registered package. Note that
344-
in Yggdrasil only JLL packages in the [General
345-
registry](https://github.com/JuliaRegistries/General) can be accepted.
343+
The argument of `Dependency`, `RuntimeDependency`, `BuildDependency`, and
344+
`HostBuildDependency` can also be a `Pkg.PackageSpec`, with which you can
345+
specify more details about the dependency, like a version number, or also a
346+
non-registered package. Note that in Yggdrasil only JLL packages in the
347+
[General registry](https://github.com/JuliaRegistries/General) can be accepted.
346348

347349
The dependencies for the target system (`Dependency` and `BuildDependency`) will
348350
be installed under `${prefix}` within the build environment, while the
@@ -358,7 +360,7 @@ Examples of builders that depend on other binaries include:
358360
depends on `Xorg_libxcb_jll`, and `Xorg_xtrans_jll` at build- and run-time,
359361
and on `Xorg_xorgproto_jll` and `Xorg_util_macros_jll` only at build-time.
360362

361-
### Platform-dependent dependencies
363+
### Platform-specific dependencies
362364

363365
By default, all dependencies are used for all platforms, but there are some
364366
cases where a package requires some dependencies only on some platforms. You

src/AutoBuild.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ function autobuild(dir::AbstractString,
785785
verbose=verbose,
786786
)
787787
setup_deps(f, prefix, dependencies, platform, verbose) =
788-
setup_dependencies(prefix, Pkg.Types.PackageSpec[getpkg(d) for d in filter_platforms(dependencies, platform) if f(d)], platform; verbose)
788+
setup_dependencies(prefix, Pkg.Types.PackageSpec[getpkg(d) for d in filter_platforms(dependencies, platform) if f(d) && is_build_dependency(d)], platform; verbose)
789789
host_artifact_paths = setup_deps(is_host_dependency, prefix, dependencies, default_host_platform, verbose)
790790
target_artifact_paths = setup_deps(is_target_dependency, prefix, dependencies, concrete_platform, verbose)
791791

src/BinaryBuilder.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export AnyPlatform
2222
export Product, LibraryProduct, FileProduct, ExecutableProduct, FrameworkProduct, satisfied,
2323
locate, write_deps_file, variable_name
2424
# BinaryBuilderBase/src/Dependency.jl
25-
export Dependency, BuildDependency, HostBuildDependency
25+
export Dependency, RuntimeDependency, BuildDependency, HostBuildDependency
2626
# BinaryBuilderBase/src/Sources.jl
2727
export ArchiveSource, FileSource, GitSource, DirectorySource
2828
# Auditor.jl

0 commit comments

Comments
 (0)