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

bpytop: migrate to [email protected] #151086

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Changes from 1 commit
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
17 changes: 13 additions & 4 deletions Formula/b/bpytop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,26 @@ class Bpytop < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "fdb97df09c1d785d498ff04c87f219d0b5cfebc5cde09cb0039f879198746cc7"
end

depends_on "python@3.11"
depends_on "python@3.12"

on_macos do
depends_on "osx-cpu-temp"
end

resource "psutil" do
url "https://files.pythonhosted.org/packages/de/eb/1c01a34c86ee3b058c556e407ce5b07cb7d186ebe47b3e69d6f152ca5cc5/psutil-5.9.3.tar.gz"
sha256 "7ccfcdfea4fc4b0a02ca2c31de7fcd186beb9cff8207800e14ab66f79c773af6"
url "https://files.pythonhosted.org/packages/2d/01/beb7331fc6c8d1c49dd051e3611379bfe379e915c808e1301506027fce9d/psutil-5.9.6.tar.gz"
sha256 "e4b92ddcd7dd4cdd3f900180ea1e104932c7bce234fb88976e2a3b296441225a"
end

# Tolerate SMC error from osx-cpu-temp
# https://github.com/aristocratos/bpytop/pull/405
patch do
url "https://github.com/aristocratos/bpytop/commit/5634526721b1bc98dc7a7003801cdf99686419ed.patch?full_index=1"
sha256 "0158252936cfd1adcbe5e664f641a0c2bb6093270bedf4282cf5c7ff49a7d238"
end

def install
venv = virtualenv_create(libexec, "python3.11")
venv = virtualenv_create(libexec, "python3.12")
venv.pip_install resources
system "make", "install", "PREFIX=#{prefix}"
pkgshare.install "themes"
Expand All @@ -46,11 +53,13 @@ def install
test do
config = (testpath/".config/bpytop")
mkdir config/"themes"
# Disable cpu_freq on arm due to missing support: https://github.com/giampaolo/psutil/issues/1892
(config/"bpytop.conf").write <<~EOS
#? Config file for bpytop v. #{version}

update_ms=2000
log_level=DEBUG
show_cpu_freq=#{!Hardware::CPU.arm?}
EOS

require "pty"
Expand Down
Loading