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
This commit is contained in:
Tony Kelman 2016-07-30 22:24:38 -04:00
parent 20df4967a4
commit 5583d9f315
5 changed files with 7 additions and 6 deletions

View File

@ -4,7 +4,8 @@ os:
- linux - linux
- osx - osx
julia: julia:
# - release - 0.4
- 0.5
- nightly - nightly
# matrix: # matrix:
# allow_failures: # allow_failures:

View File

@ -41,7 +41,7 @@ function _initialize_backend(::GadflyBackend; kw...)
@eval begin @eval begin
import Gadfly, Compose import Gadfly, Compose
export Gadfly, Compose export Gadfly, Compose
include(joinpath(Pkg.dir("Plots"), "src", "backends", "gadfly_shapes.jl")) include(joinpath(dirname(@__FILE__), "gadfly_shapes.jl"))
end end
end end

View File

@ -14,7 +14,7 @@ function _initialize_backend(::ImmerseBackend; kw...)
@eval begin @eval begin
import Immerse, Gadfly, Compose, Gtk import Immerse, Gadfly, Compose, Gtk
export 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
end end

View File

@ -537,7 +537,7 @@ end
# ---------------------------------------------------------------- # ----------------------------------------------------------------
function html_head(plt::Plot{PlotlyBackend}) function html_head(plt::Plot{PlotlyBackend})
"<script src=\"$(Pkg.dir("Plots","deps","plotly-latest.min.js"))\"></script>" "<script src=\"$(joinpath(dirname(@__FILE__),"..","..","deps","plotly-latest.min.js"))\"></script>"
end end
function html_body(plt::Plot{PlotlyBackend}, style = nothing) function html_body(plt::Plot{PlotlyBackend}, style = nothing)

View File

@ -4,7 +4,7 @@ import SnoopCompile
# This only needs to be run once (to generate "/tmp/plots_compiles.csv") # This only needs to be run once (to generate "/tmp/plots_compiles.csv")
# SnoopCompile.@snoop "/tmp/plots_compiles.csv" begin # SnoopCompile.@snoop "/tmp/plots_compiles.csv" begin
# include(Pkg.dir("Plots", "test","runtests.jl")) # include(joinpath(dirname(@__FILE__), "runtests.jl"))
# end # end
# ---------------------------------------------------------- # ----------------------------------------------------------
@ -32,5 +32,5 @@ blacklist = ["MIME"]
pc, discards = SnoopCompile.parcel(data[end:-1:1,2], subst=subst, blacklist=blacklist) pc, discards = SnoopCompile.parcel(data[end:-1:1,2], subst=subst, blacklist=blacklist)
SnoopCompile.write("/tmp/precompile", pc) SnoopCompile.write("/tmp/precompile", pc)
pdir = Pkg.dir("Plots") pdir = joinpath(dirname(@__FILE__), "..")
run(`cp /tmp/precompile/precompile_Plots.jl $pdir/src/precompile.jl`) run(`cp /tmp/precompile/precompile_Plots.jl $pdir/src/precompile.jl`)