Skip to content

Commit

Permalink
relocatable: Avoid additional dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
tmmsartor committed Jul 26, 2024
1 parent 1c3cd5e commit 8b2e5f7
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
RelocatableFolders = "05181044-ff0b-4ac5-8273-598c1e38db00"
SolverCore = "ff4d7338-4cf1-434d-91df-b86cb86fb843"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SuiteSparse = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
Expand Down
1 change: 0 additions & 1 deletion lib/MadNLPMumps/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MUMPS_seq_jll = "d7ed1dd3-d0ae-5e8e-bfb4-87a502085b8d"
MadNLP = "2621e9c9-9eb4-46b1-8089-e8c72242dfb6"
OpenBLAS32_jll = "656ef2d0-ae68-5445-9ca0-591084a874a2"
RelocatableFolders = "05181044-ff0b-4ac5-8273-598c1e38db00"

[compat]
MUMPS_seq_jll = "~5.3, ~500.600"
Expand Down
4 changes: 1 addition & 3 deletions lib/MadNLPMumps/src/MadNLPMumps.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module MadNLPMumps

using MUMPS_seq_jll
import RelocatableFolders: @path
import MadNLP:
MadNLP, parsefile,
@kwdef, MadNLPLogger, @debug, @warn, @error,
Expand All @@ -20,8 +19,7 @@ function __init__()
end
end

const PROJECT_TOML = @path joinpath(dirname(pathof(MUMPS_seq_jll)),"..","Project.toml")
const version = parsefile(PROJECT_TOML)["version"]
version() = pkgversion(@__MODULE__)

setindex(tup,a,n) = (tup[1:n-1]...,a,tup[n+1:end]...)
tzeros(n) = tuple((0 for i=1:n)...)
Expand Down
5 changes: 1 addition & 4 deletions src/MadNLP.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module MadNLP

import Pkg.TOML: parsefile
import RelocatableFolders: @path
import Printf: @sprintf
import LinearAlgebra: BLAS, Adjoint, Symmetric, mul!, ldiv!, norm, dot, diagind, normInf, transpose!, issuccess
import LinearAlgebra: cholesky, qr, lu, cholesky!, axpy!
Expand All @@ -16,9 +15,7 @@ export MadNLPSolver, MadNLPOptions, UmfpackSolver, LDLSolver, CHOLMODSolver, Lap
import LDLFactorizations

# Version info
# version() = parsefile(joinpath(@__DIR__,"..","Project.toml"))["version"]
const PROJECT_TOML = @path joinpath(@__DIR__,"..","Project.toml")
version() = parsefile(PROJECT_TOML)["version"]
version() = pkgversion(@__MODULE__)
introduce() = "MadNLP version v$(version())"

include("enums.jl")
Expand Down

0 comments on commit 8b2e5f7

Please sign in to comment.