Skip to content

Commit

Permalink
Merge c14709f into 73e1958
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Jul 3, 2019
2 parents 73e1958 + c14709f commit 596b6f1
Show file tree
Hide file tree
Showing 6 changed files with 187 additions and 46 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.h5
deps/usr
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ julia:
matrix:
allow_failures:
- julia: nightly
addons:
apt:
packages:
- hdf5-tools
homebrew:
packages:
- hdf5
after_success:
- julia -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder()); Codecov.submit(Codecov.process_folder())'
notifications:
Expand Down
142 changes: 142 additions & 0 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# This file is machine-generated - editing it directly is not advised

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[BinDeps]]
deps = ["Compat", "Libdl", "SHA", "URIParser"]
git-tree-sha1 = "12093ca6cdd0ee547c39b1870e0c9c3f154d9ca9"
uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
version = "0.8.10"

[[BinaryProvider]]
deps = ["Libdl", "Logging", "SHA"]
git-tree-sha1 = "8153fd64131cd00a79544bb23788877741f627bb"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.5"

[[Blosc]]
deps = ["BinaryProvider", "CMakeWrapper", "Compat", "Libdl"]
git-tree-sha1 = "71fb23581e1f0b0ae7be8ccf0ebfb3600e23ca41"
uuid = "a74b3585-a348-5f62-a45c-50e91977d574"
version = "0.5.1"

[[CMake]]
deps = ["BinDeps"]
git-tree-sha1 = "c67a8689dc5444adc5eb2be7d837100340ecba11"
uuid = "631607c0-34d2-5d66-819e-eb0f9aa2061a"
version = "1.1.2"

[[CMakeWrapper]]
deps = ["BinDeps", "CMake", "Libdl", "Parameters", "Test"]
git-tree-sha1 = "16d4acb3d37dc05b714977ffefa8890843dc8985"
uuid = "d5fb7624-851a-54ee-a528-d3f3bac0b4a0"
version = "0.2.3"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "84aa74986c5b9b898b0d1acaf3258741ee64754f"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "2.1.0"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[OrderedCollections]]
deps = ["Random", "Serialization", "Test"]
git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.1.0"

[[Parameters]]
deps = ["Markdown", "OrderedCollections", "REPL", "Test"]
git-tree-sha1 = "70bdbfb2bceabb15345c0b54be4544813b3444e4"
uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a"
version = "0.10.3"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[URIParser]]
deps = ["Test", "Unicode"]
git-tree-sha1 = "6ddf8244220dfda2f17539fa8c9de20d6c575b69"
uuid = "30578b45-9adc-5946-b283-645ec420af67"
version = "0.4.0"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
14 changes: 6 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@ uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
version = "0.11.1"

[deps]
BinDeps = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
Blosc = "a74b3585-a348-5f62-a45c-50e91977d574"
Homebrew = "d9be37ee-ecc9-5288-90f1-b9ca67657a75"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
WinRPM = "c17dfb99-b4f7-5aad-8812-456da1ad7187"

[compat]
julia = "0.7, 1"

[extras]
CRC32c = "8bf52ea8-c179-5cab-976a-9e18b702a9bc"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
CRC32c = "8bf52ea8-c179-5cab-976a-9e18b702a9bc"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "Distributed", "LinearAlgebra", "Pkg", "CRC32c"]

[compat]
julia = "0.7, 1"
63 changes: 32 additions & 31 deletions deps/build.jl
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
using BinDeps
using Libdl
using BinaryProvider # requires BinaryProvider 0.3.0 or later

@BinDeps.setup
# https://support.hdfgroup.org/HDF5/ lists "Current Releases"
# make sure we have one of those
const MINVERSION = v"1.8.0"
function h5_get_libversion(lib, handle)
sym = Libdl.dlsym_e(handle, "H5get_libversion")
majnum, minnum, relnum = Ref{Cuint}(), Ref{Cuint}(), Ref{Cuint}()
status = ccall(sym, Cint, (Ptr{Cuint}, Ptr{Cuint}, Ptr{Cuint}), majnum, minnum, relnum)
status < 0 && error("Error getting HDF5 library version")
VersionNumber(majnum[], minnum[], relnum[])
end
compatible_version(lib, handle) = h5_get_libversion(lib, handle) >= MINVERSION
# Parse some basic command-line arguments
const verbose = "--verbose" in ARGS
const prefix = Prefix(get([a for a in ARGS if a != "--verbose"], 1, joinpath(@__DIR__, "usr")))
products = [
LibraryProduct(prefix, ["libhdf5"], :libhdf5),
]

hdf5 = library_dependency("libhdf5",
aliases = ["libhdf5_openmpi", "libhdf5_mpich", "libhdf5", "libhdf5_serial", "libhdf5_serial.so.10" ],
validate=compatible_version)
# Download binaries from hosted location
bin_prefix = "https://github.com/JuliaPackaging/Yggdrasil/releases/download/HDF5-v1.10.5+1"

provides(AptGet, "hdf5-tools", hdf5, os=:Linux)
provides(Pacman, "hdf5", hdf5, os=:Linux)
provides(Yum, "hdf5", hdf5, os=:Linux)
provides(BSDPkg, "hdf5", hdf5, os=:FreeBSD)
# Listing of files generated by BinaryBuilder:
download_info = Dict(
Linux(:i686, libc=:glibc) => ("$bin_prefix/HDF5.v1.10.5.i686-linux-gnu.tar.gz", "7fcb6949436a793796f4e548ef5f6a29b01a54c0929c9680b3d2bbb89a3d69b1"),
Windows(:i686) => ("$bin_prefix/HDF5.v1.10.5.i686-w64-mingw32.tar.gz", "cb88263a578cbfc4b5d5aba1a4fe1b8883e32a20858c4b1b291159c2574ffbb3"),
MacOS(:x86_64) => ("$bin_prefix/HDF5.v1.10.5.x86_64-apple-darwin14.tar.gz", "c5f491933d353c8002be6cd5750f0ce74c6f6b9fd93a499dec9040f53366ea1c"),
Linux(:x86_64, libc=:glibc) => ("$bin_prefix/HDF5.v1.10.5.x86_64-linux-gnu.tar.gz", "481378199cd8a5d67fda5b175874b5c3119cc29c6e6fecd10f7ec824e57893a6"),
Windows(:x86_64) => ("$bin_prefix/HDF5.v1.10.5.x86_64-w64-mingw32.tar.gz", "e21b425551395a80e83ecc41026e440611cc498b545976db0e9e2c709d7dd3ac"),
)

if Sys.iswindows()
using WinRPM
provides(WinRPM.RPM, "hdf5", hdf5, os=:Windows)
# Install unsatisfied or updated dependencies:
unsatisfied = any(!satisfied(p; verbose=verbose) for p in products)
dl_info = choose_download(download_info, platform_key_abi())
if dl_info === nothing && unsatisfied
# If we don't have a compatible .tar.gz to download, complain.
# Alternatively, you could attempt to install from a separate provider,
# build from source or something even more ambitious here.
error("Your platform (\"$(Sys.MACHINE)\", parsed as \"$(triplet(platform_key_abi()))\") is not supported by this package!")
end

if Sys.isapple()
using Homebrew
provides(Homebrew.HB, "hdf5", hdf5, os=:Darwin)
# If we have a download, and we are unsatisfied (or the version we're
# trying to install is not itself installed) then load it up!
if unsatisfied || !isinstalled(dl_info...; prefix=prefix)
# Download and install binaries
install(dl_info...; prefix=prefix, force=true, verbose=verbose)
end

provides(Sources, URI("https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/hdf5-1.10.0-patch1.tar.gz"), hdf5)
provides(BuildProcess, Autotools(libtarget=joinpath("src", "libhdf5.la")), hdf5)

@BinDeps.install Dict(:libhdf5 => :libhdf5)
# Write out a deps.jl file that will contain mappings for our products
write_deps_file(joinpath(@__DIR__, "deps.jl"), products, verbose=verbose)
6 changes: 6 additions & 0 deletions src/HDF5.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2542,8 +2542,14 @@ const ASCII_ATTRIBUTE_PROPERTIES = Ref{HDF5Properties}()
const DEFAULT_PROPERTIES = HDF5Properties(H5P_DEFAULT, false, H5P_DEFAULT)

function __init__()
# If we're running on 1.10.X, disable file locking as that can cause problems with mmap'ing
if libversion >= v"1.10.0" && !haskey(ENV, "HDF5_USE_FILE_LOCKING")
ENV["HDF5_USE_FILE_LOCKING"] = "FALSE"
end

init_libhdf5()
register_blosc()

# Turn off automatic error printing
# h5e_set_auto(H5E_DEFAULT, C_NULL, C_NULL)

Expand Down

0 comments on commit 596b6f1

Please sign in to comment.