Skip to content

Commit

Permalink
Merge pull request #480 from oscar-system/lk/banners
Browse files Browse the repository at this point in the history
Hide Polymake.jl banner, when used in other module
  • Loading branch information
benlorenz authored Apr 11, 2024
2 parents 0bd0469 + 7f4b75a commit cb373f0
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.8"
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 cb373f0

Please sign in to comment.