Skip to content

Commit

Permalink
Hide Polymake.jl banner, when used in other module
Browse files Browse the repository at this point in the history
  • Loading branch information
lkastner committed Mar 25, 2024
1 parent ad3143a commit 2566814
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ repo = "https://github.com/oscar-system/Polymake.jl.git"
version = "0.11.15"

[deps]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
BinaryWrappers = "f01c122e-0ea1-4f85-ad8f-907073ad7a9f"
CxxWrap = "1f15a43c-97ca-5a2a-ae31-89f07a497df4"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
Expand Down Expand Up @@ -43,3 +44,4 @@ lib4ti2_jll = "^1.6.10"
libpolymake_julia_jll = "~0.11.1"
polymake_jll = "^400.1100.1"
polymake_oscarnumber_jll = "~0.2.7"
AbstractAlgebra = "~0.40.5"
3 changes: 2 additions & 1 deletion src/Polymake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Base: ==, <, <=, *, -, +, //, ^, div, rem, one, zero,
length, numerator, push!, resize!,
setdiff, setdiff!, setindex!, symdiff, symdiff!,
union, union!
import AbstractAlgebra: should_show_banner

import Pkg
import Downloads
Expand Down Expand Up @@ -240,7 +241,7 @@ function __init__()

withenv(adjustenv...) do
try
show_banner = isinteractive() && Base.JLOptions().banner != 0 &&
show_banner = should_show_banner() &&
!any(x->x.name in ["Oscar"], keys(Base.package_locks))

initialize_polymake_with_dir("$(polymake_extension_config);user=$(polymake_user_dir)", installtop, installarch, show_banner)
Expand Down

0 comments on commit 2566814

Please sign in to comment.