Skip to content

Commit

Permalink
Upate
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Feb 29, 2024
1 parent cdd3517 commit 756838d
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/Xpress.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,30 @@ const depsjl_path = joinpath(@__DIR__, "..", "deps", "deps.jl")

if isfile(depsjl_path)
include(depsjl_path)
elseif Sys.isapple() || Sys.islinux()
# Let's use the artifact instead.
const libxprs = joinpath(
xpressdlpath,
(Sys.iswindows() ? "" : "lib") * "xprs.$(Libdl.dlext)",
)
elseif Sys.isapple() # Use the artifact instead.
const xpressdlpath = joinpath(
LazyArtifacts.artifact"xpresspy",
"lib/python3.10/site-packages/xpress/lib",
)
const libxprs = joinpath(xpressdlpath, "xprs.dylib")
elseif Sys.islinux() # Use the artifact instead.
const xpressdlpath = joinpath(
LazyArtifacts.artifact"xpresspy",
"lib/python3.10/site-packages/xpress/lib",
)
# Annoyingly, Xpress has the version after extension
const libxprs = joinpath(xpressdlpath, "xprs.so.42")
elseif !haskey(ENV, "XPRESS_JL_NO_DEPS_ERROR")
error("XPRESS cannot be loaded. Please run Pkg.build(\"Xpress\").")
else
const xpressdlpath = ""
const libxprs = (Sys.iswindows() ? "" : "lib") * "xprs.$(Libdl.dlext)"
end

const libxprs = joinpath(
xpressdlpath,
(Sys.iswindows() ? "" : "lib") * "xprs.$(Libdl.dlext)",
)

import Base.show, Base.copy

module Lib
Expand Down

0 comments on commit 756838d

Please sign in to comment.