diff --git a/.travis.yml b/.travis.yml index e959142..7e27e50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ os: osx osx_image: xcode7.3 julia: - 0.6 + - 0.7 - nightly notifications: email: false diff --git a/deps/build.jl b/deps/build.jl index d3a8365..3cf6639 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -1,2 +1,4 @@ -using Homebrew -Homebrew.update() +@static if VERSION < v"0.7-" ? is_apple() : Sys.isapple() + using Homebrew + Homebrew.update() +end diff --git a/src/Homebrew.jl b/src/Homebrew.jl index f6209f1..7d073de 100644 --- a/src/Homebrew.jl +++ b/src/Homebrew.jl @@ -34,11 +34,23 @@ need is downloaded/installed, then calls `update_env()` to set the environment properly so that packages being installed can find their binaries. """ function __init__() - # Let's see if Homebrew is installed. If not, let's do that first! - (isdir(brew_prefix) && isdir(tappath)) || install_brew() - - # Update environment variables such as PATH, DL_LOAD_PATH, etc... - update_env() + if VERSION < v"0.7-" ? is_apple() : Sys.isapple() + # Let's see if Homebrew is installed. If not, let's do that first! + (isdir(brew_prefix) && isdir(tappath)) || install_brew() + + # Update environment variables such as PATH, DL_LOAD_PATH, etc... + update_env() + else + # change this to an error in future + warning(""" +Homebrew.jl can only be used on Apple macOS. Suggested usage is + + @static if Sys.isapple() + using Homebrew + # Homebrew specific code goes here + end +""") + end end