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] #150975

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 6 additions & 2 deletions Formula/b/bpytop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
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"
Expand All @@ -32,8 +32,12 @@
sha256 "7ccfcdfea4fc4b0a02ca2c31de7fcd186beb9cff8207800e14ab66f79c773af6"
end

def python3
which("python3.12")
end

def install
venv = virtualenv_create(libexec, "python3.11")
venv = virtualenv_create(libexec, python3)
venv.pip_install resources
system "make", "install", "PREFIX=#{prefix}"
pkgshare.install "themes"
Expand All @@ -43,7 +47,7 @@
rewrite_shebang rw_info, bin/"bpytop"
end

test do

Check warning on line 50 in Formula/b/bpytop.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

`brew test --verbose bpytop` failed on macOS Sonoma (14) on Apple Silicon!

/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/bin/bundle clean ==> Testing bpytop Error: bpytop: failed An exception occurred within a child process: Minitest::Assertion: Expected /ERROR:/ to not match "14/10/23 (23:09:06) | INFO: New instance of bpytop version 1.0.68 started with pid 7275\n14/10/23 (23:09:06) | INFO: Loglevel set to DEBUG\n14/10/23 (23:09:06) | DEBUG: Using psutil version 5.9.3\n14/10/23 (23:09:06) | DEBUG: CMD: /opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\n14/10/23 (23:09:06) | ERROR: Exception while getting cpu frequency!\n14/10/23 (23:09:06) | ERROR: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))\nTraceback (most recent call last):\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\", line 3080, in _collect\n if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), \"current\"):\n ^^^^^^^^^^^^^^^^^\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/libexec/lib/python3.12/site-packages/psutil/__init__.py\", line 1864, in cpu_freq\n ret = _psplatform.cpu_freq()\n ^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/libexec/lib/python3.12/site-packages/psutil/_psosx.py\", line 179, in cpu_freq\n curr, min_, max_ = cext.cpu_freq()\n ^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))\n14/10/23 (23:09:06) | ERROR: could not convert string to float: 'Error: no SMC found\\n0.0'\nTraceback (most recent call last):\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\", line 3228, in _collect_temps\n temp = max(0, round(float(subprocess.check_output(\"osx-cpu-temp\", universal_newlines=True).strip()[:-2])))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nValueError: could not convert string to float: 'Error: no SMC found\\n0.0'\n14/10/23 (23:09:06) | DEBUG: Collect and draw completed in 0.092450 seconds\n". /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.20.0/lib/minitest/assertions.rb:183:in `assert' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.20.0/lib/minitest/assertions.rb:658:in `refute' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.20.0/lib/minitest/assertions.rb:739:in `refute_match' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/b/bpytop.rb:62:in `block in <class:Bpytop>' /opt/homebrew/Library/Homebrew/formula.rb:2496:in `block (3 levels) in run_test' /opt/homebrew/Library/Homebrew/extend/kernel.rb:499:in `with_env' /opt/homebrew/Library/Homebrew/formula.rb:2495:in `block (2 levels) in run_test' /opt/homebrew/Library/Homebrew/formula.rb:1052:in `with_logging' /opt/homebrew/Library/Homebrew/formula.rb:2494:in `block in run_test' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `block in run' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `chdir' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `run' /opt/homebrew/Library/Homebrew/formula.rb:2788:in `mktemp' /opt/homebrew/Library/Homebrew/formula.rb:2488:in `run_test' /opt/homebrew/Library/Homebrew/test.rb:44:in `block in <main>' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `block in catch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:108:in `timeout' /opt/homebrew/Library/Homebrew/test.rb:48:in `<main>'

Check failure on line 50 in Formula/b/bpytop.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

`brew test --verbose bpytop` failed on macOS Ventura (13) on Apple Silicon!

/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/bin/bundle clean ==> Testing bpytop Error: bpytop: failed An exception occurred within a child process: Minitest::Assertion: Expected /ERROR:/ to not match "14/10/23 (23:09:30) | INFO: New instance of bpytop version 1.0.68 started with pid 7145\n14/10/23 (23:09:30) | INFO: Loglevel set to DEBUG\n14/10/23 (23:09:30) | DEBUG: Using psutil version 5.9.3\n14/10/23 (23:09:30) | DEBUG: CMD: /opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\n14/10/23 (23:09:30) | ERROR: Exception while getting cpu frequency!\n14/10/23 (23:09:30) | ERROR: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))\nTraceback (most recent call last):\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\", line 3080, in _collect\n if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), \"current\"):\n ^^^^^^^^^^^^^^^^^\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/libexec/lib/python3.12/site-packages/psutil/__init__.py\", line 1864, in cpu_freq\n ret = _psplatform.cpu_freq()\n ^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/libexec/lib/python3.12/site-packages/psutil/_psosx.py\", line 179, in cpu_freq\n curr, min_, max_ = cext.cpu_freq()\n ^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))\n14/10/23 (23:09:30) | ERROR: could not convert string to float: 'Error: no SMC found\\n0.0'\nTraceback (most recent call last):\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\", line 3228, in _collect_temps\n temp = max(0, round(float(subprocess.check_output(\"osx-cpu-temp\", universal_newlines=True).strip()[:-2])))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nValueError: could not convert string to float: 'Error: no SMC found\\n0.0'\n14/10/23 (23:09:30) | DEBUG: Collect and draw completed in 0.195916 seconds\n". /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.20.0/lib/minitest/assertions.rb:183:in `assert' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.20.0/lib/minitest/assertions.rb:658:in `refute' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.20.0/lib/minitest/assertions.rb:739:in `refute_match' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/b/bpytop.rb:62:in `block in <class:Bpytop>' /opt/homebrew/Library/Homebrew/formula.rb:2496:in `block (3 levels) in run_test' /opt/homebrew/Library/Homebrew/extend/kernel.rb:499:in `with_env' /opt/homebrew/Library/Homebrew/formula.rb:2495:in `block (2 levels) in run_test' /opt/homebrew/Library/Homebrew/formula.rb:1052:in `with_logging' /opt/homebrew/Library/Homebrew/formula.rb:2494:in `block in run_test' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `block in run' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `chdir' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `run' /opt/homebrew/Library/Homebrew/formula.rb:2788:in `mktemp' /opt/homebrew/Library/Homebrew/formula.rb:2488:in `run_test' /opt/homebrew/Library/Homebrew/test.rb:44:in `block in <main>' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `block in catch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:108:in `timeout' /opt/homebrew/Library/Homebrew/test.rb:48:in `<main>'

Check failure on line 50 in Formula/b/bpytop.rb

View workflow job for this annotation

GitHub Actions / macOS 12-arm64

`brew test --verbose bpytop` failed on macOS Monterey (12) on Apple Silicon!

/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/bin/bundle clean ==> Testing bpytop Error: bpytop: failed An exception occurred within a child process: Minitest::Assertion: Expected /ERROR:/ to not match "14/10/23 (23:09:25) | INFO: New instance of bpytop version 1.0.68 started with pid 6952\n14/10/23 (23:09:25) | INFO: Loglevel set to DEBUG\n14/10/23 (23:09:25) | DEBUG: Using psutil version 5.9.3\n14/10/23 (23:09:25) | DEBUG: CMD: /opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\n14/10/23 (23:09:26) | ERROR: Exception while getting cpu frequency!\n14/10/23 (23:09:26) | ERROR: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))\nTraceback (most recent call last):\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\", line 3080, in _collect\n if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), \"current\"):\n ^^^^^^^^^^^^^^^^^\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/libexec/lib/python3.12/site-packages/psutil/__init__.py\", line 1864, in cpu_freq\n ret = _psplatform.cpu_freq()\n ^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/libexec/lib/python3.12/site-packages/psutil/_psosx.py\", line 179, in cpu_freq\n curr, min_, max_ = cext.cpu_freq()\n ^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))\n14/10/23 (23:09:26) | ERROR: could not convert string to float: 'Error: no SMC found\\n0.0'\nTraceback (most recent call last):\n File \"/opt/homebrew/Cellar/bpytop/1.0.68/bin/bpytop\", line 3228, in _collect_temps\n temp = max(0, round(float(subprocess.check_output(\"osx-cpu-temp\", universal_newlines=True).strip()[:-2])))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nValueError: could not convert string to float: 'Error: no SMC found\\n0.0'\n14/10/23 (23:09:26) | DEBUG: Collect and draw completed in 0.108146 seconds\n". /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.20.0/lib/minitest/assertions.rb:183:in `assert' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.20.0/lib/minitest/assertions.rb:658:in `refute' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/minitest-5.20.0/lib/minitest/assertions.rb:739:in `refute_match' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/b/bpytop.rb:62:in `block in <class:Bpytop>' /opt/homebrew/Library/Homebrew/formula.rb:2496:in `block (3 levels) in run_test' /opt/homebrew/Library/Homebrew/extend/kernel.rb:499:in `with_env' /opt/homebrew/Library/Homebrew/formula.rb:2495:in `block (2 levels) in run_test' /opt/homebrew/Library/Homebrew/formula.rb:1052:in `with_logging' /opt/homebrew/Library/Homebrew/formula.rb:2494:in `block in run_test' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `block in run' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `chdir' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `run' /opt/homebrew/Library/Homebrew/formula.rb:2788:in `mktemp' /opt/homebrew/Library/Homebrew/formula.rb:2488:in `run_test' /opt/homebrew/Library/Homebrew/test.rb:44:in `block in <main>' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `block in catch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:33:in `catch' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:108:in `timeout' /opt/homebrew/Library/Homebrew/test.rb:48:in `<main>'
config = (testpath/".config/bpytop")
mkdir config/"themes"
(config/"bpytop.conf").write <<~EOS
Expand Down
Loading