Skip to content
Snippets Groups Projects
Verified Commit c95d9647 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Get rid of get_package_version()

This also changes the requirement of HDF5 to be ^0.16.15 because the
`get_package_version()` was used before to check if the package is older
to load a patch.
parent 1a4c6174
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ UnROOT = "3cd96dde-e98d-4713-81e9-a4a1b0235ce9"
[compat]
DocStringExtensions = "0.8, 0.9"
HDF5 = "^0.16, ^0.17"
HDF5 = "^0.16.15, ^0.17"
KM3NeTTestData = "^0.4.3"
StaticArrays = "1"
UnROOT = "^0.10.15"
......
......@@ -97,9 +97,4 @@ include("tools/reconstruction.jl")
include("physics.jl")
if get_package_version("HDF5") < v"0.16.15"
# backport of the fix in https://github.com/JuliaIO/HDF5.jl/pull/1069
HDF5.datatype(::Type{T}) where {T} = HDF5.Datatype(HDF5.hdf5_type_id(T), isstructtype(T))
end
end # module
......@@ -109,17 +109,3 @@ function tonumifpossible(v::AbstractString)
end
v
end
"""
Returns the version of a given package.
"""
function get_package_version(package_name::AbstractString)
dependencies = Pkg.dependencies()
for (uuid, pkg_info) dependencies
pkg_info.name == package_name && return pkg_info.version
end
error("Package '$package_name' not found in the dependencies of the current environment.")
end
......@@ -81,11 +81,6 @@ end
close(f)
end
@testset "get_package_version()" begin
v = KM3io.get_package_version("UnROOT")
@test v >= v"0.10.9"
@test_throws ErrorException KM3io.get_package_version("LetsAssumeThatThisPackageWillNeverBeInTheDependencies")
end
using KM3io
using KM3NeTTestData
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment