Skip to content

Commit

Permalink
Merge pull request #9 from visr/deps
Browse files Browse the repository at this point in the history
Use Conda as binary provider
  • Loading branch information
visr committed Nov 24, 2015
2 parents f0fa574 + 49f201c commit 5af355d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/deps/deps.jl
*.jl.cov
*.jl.*.cov
*.jl.mem
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ julia:
notifications:
email: false
# uncomment the following lines to override the default test script
#script:
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
# - julia -e 'Pkg.clone(pwd()); Pkg.build("GDAL"); Pkg.test("GDAL"; coverage=true)'
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone(pwd()); Pkg.build("GDAL"); Pkg.build("GDAL"); Pkg.test("GDAL"; coverage=true)'
4 changes: 3 additions & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
julia 0.3
julia 0.4
BinDeps
Conda
12 changes: 12 additions & 0 deletions deps/build.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using BinDeps
using Conda

@BinDeps.setup

libgdal = library_dependency("libgdal", aliases=["gdal", "gdal111"])

# install older gdal on windows
@windows_only provides(Conda.Manager, "libgdal==1.11.2", libgdal)
@unix_only provides(Conda.Manager, "libgdal", libgdal)

@BinDeps.install Dict(:libgdal => :libgdal)
17 changes: 14 additions & 3 deletions src/GDAL.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
module GDAL

# this can go when all ccalls are done in the C submodule
const depfile = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl")
if isfile(depfile)
include(depfile)
else
error("libgdal not properly installed. Please run Pkg.build(\"GDAL\")")
end

module C
const libgdal = "libgdal"
const depfile = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl")
if isfile(depfile)
include(depfile)
else
error("libgdal not properly installed. Please run Pkg.build(\"GDAL\")")
end

include("C/misc.jl")
include("C/common.jl")
Expand All @@ -16,8 +29,6 @@ module C
include("C/ogr_srs_api.jl")
end

const libgdal = "libgdal"

include("C/misc.jl")
include("C/common.jl")
include("gdal_h.jl")
Expand Down

0 comments on commit 5af355d

Please sign in to comment.