Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Polymake.jl banner, when used in other module #480

Merged
merged 2 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading