Skip to content

Commit 992a9bf

Browse files
committed
Fixed python interpreter path in brew
1 parent 37d0d7e commit 992a9bf

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Formula/ssh-studio.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,25 @@ def install
3535
system "meson", "compile", "-C", "build"
3636
system "meson", "install", "-C", "build"
3737

38+
python_version = Formula["[email protected]"].version.major_minor
39+
python_site_packages = lib/"python#{python_version}/site-packages"
40+
python_site_packages.mkpath
41+
42+
(python_site_packages/"ssh_studio").mkpath
43+
(python_site_packages/"ssh_studio/ui").mkpath
44+
45+
cp_r "src/ssh_config_parser.py", python_site_packages/"ssh_studio/"
46+
cp_r "src/main.py", python_site_packages/"ssh_studio/"
47+
cp_r "src/__init__.py", python_site_packages/"ssh_studio/"
48+
cp_r Dir["src/ui/*.py"], python_site_packages/"ssh_studio/ui/"
49+
cp_r "src/ui/__init__.py", python_site_packages/"ssh_studio/ui/"
50+
51+
(bin/"ssh-studio").write <<~SH
52+
#!/bin/bash
53+
exec "#{Formula["[email protected]"].opt_bin}/python3" -m ssh_studio.main "$@"
54+
SH
55+
chmod 0755, bin/"ssh-studio"
56+
3857
app_root = prefix/"Applications/SSH Studio.app/Contents"
3958
(app_root/"MacOS").mkpath
4059
(app_root/"Resources").mkpath

0 commit comments

Comments
 (0)