From 5583d9f315678ce31cd3e66a406d8080b724f294 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Sat, 30 Jul 2016 22:24:38 -0400 Subject: [PATCH] Use dirname(@__FILE__) instead of Pkg.dir This allows installing the package elsewhere. Add testing against 0.5 to Travis - this runs the most recent RC now, release once final tags are done --- .travis.yml | 3 ++- src/backends/gadfly.jl | 2 +- src/backends/immerse.jl | 2 +- src/backends/plotly.jl | 2 +- test/snoop.jl | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ca4c6fa..fdaf9c1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,8 @@ os: - linux - osx julia: - # - release + - 0.4 + - 0.5 - nightly # matrix: # allow_failures: diff --git a/src/backends/gadfly.jl b/src/backends/gadfly.jl index d5c48ee7..29710fa8 100644 --- a/src/backends/gadfly.jl +++ b/src/backends/gadfly.jl @@ -41,7 +41,7 @@ function _initialize_backend(::GadflyBackend; kw...) @eval begin import Gadfly, Compose export Gadfly, Compose - include(joinpath(Pkg.dir("Plots"), "src", "backends", "gadfly_shapes.jl")) + include(joinpath(dirname(@__FILE__), "gadfly_shapes.jl")) end end diff --git a/src/backends/immerse.jl b/src/backends/immerse.jl index 8a025ba9..2a00111e 100644 --- a/src/backends/immerse.jl +++ b/src/backends/immerse.jl @@ -14,7 +14,7 @@ function _initialize_backend(::ImmerseBackend; kw...) @eval begin import Immerse, Gadfly, Compose, Gtk export Immerse, Gadfly, Compose, Gtk - include(joinpath(Pkg.dir("Plots"), "src", "backends", "gadfly_shapes.jl")) + include(joinpath(dirname(@__FILE__), "gadfly_shapes.jl")) end end diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 5d11e288..347e972c 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -537,7 +537,7 @@ end # ---------------------------------------------------------------- function html_head(plt::Plot{PlotlyBackend}) - "" + "" end function html_body(plt::Plot{PlotlyBackend}, style = nothing) diff --git a/test/snoop.jl b/test/snoop.jl index 82a8f741..cf137d63 100644 --- a/test/snoop.jl +++ b/test/snoop.jl @@ -4,7 +4,7 @@ import SnoopCompile # This only needs to be run once (to generate "/tmp/plots_compiles.csv") # SnoopCompile.@snoop "/tmp/plots_compiles.csv" begin -# include(Pkg.dir("Plots", "test","runtests.jl")) +# include(joinpath(dirname(@__FILE__), "runtests.jl")) # end # ---------------------------------------------------------- @@ -32,5 +32,5 @@ blacklist = ["MIME"] pc, discards = SnoopCompile.parcel(data[end:-1:1,2], subst=subst, blacklist=blacklist) SnoopCompile.write("/tmp/precompile", pc) -pdir = Pkg.dir("Plots") +pdir = joinpath(dirname(@__FILE__), "..") run(`cp /tmp/precompile/precompile_Plots.jl $pdir/src/precompile.jl`)