BinDeps.jl
BinDeps.jl copied to clipboard
RFC: Customizable priorities for source building
This introduces two new environment variables: JULIA_BINDEPS_USE_SUDO and JULIA_BINDEPS_BUILD_SOURCE. The former can be used to avoid checking sudo -V and automatically enable or disable sudo. The latter allows the user to set their preference for how/when to build from source. See the additions to the README for a more thorough explanation.
JULIA_BINDEPS_BUILD_SOURCE provides a solution to #328, and JULIA_BINDEPS_USE_SUDO is essentially #325.
Bump @yuyichao, @tkelman, @staticfloat. Would be nice if someone could review this.
As a user who ran into #328 today, I'd like to second the request that the functionality implemented in this PR be added to BinDeps. As far as I can tell, when sudo and a package manager are available on a system but the user does not have permission to run
<package manager> install <dependency>
Pkg.build(<package>) throws an error and exits even if it might be possible to build <dependency> from source. The only workaround to install <dependency> seems to be to comment out the
provides(<package manager>,...
lines in relevant build.jl script and re-run Pkg.build to trigger building the dependency from source. This isn't a big deal for experienced users but causes difficulty for novice users trying to install Julia packages with binary dependencies and makes the package dirty.
I can't speak to whether or not this PR is the best way to address this issue but I wanted to add a little context about the usefulness of the functionality it provides. Thanks to all the BinDeps devs for their work on BinDeps and to @ararslan for the work on this PR!