-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathmopidy-somafm.rb
More file actions
31 lines (25 loc) · 1.1 KB
/
mopidy-somafm.rb
File metadata and controls
31 lines (25 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class MopidySomafm < Formula
desc "Mopidy extension for playing music from SomaFM"
homepage "https://github.com/AlexandrePTJ/mopidy-somafm"
url "https://files.pythonhosted.org/packages/0e/6a/4cc6c5d1c813ec98343f24be7df3318acf118d2920ceeea6b6d31da1f1f0/Mopidy-SomaFM-2.0.2.tar.gz"
sha256 "0c2d1e9b192859f8c61e28760bc9c8341141c9fe76d577fedcab38251c4d3cb3"
head "https://github.com/AlexandrePTJ/mopidy-somafm.git"
revision 2
depends_on "python@3.12"
depends_on "mopidy/mopidy/mopidy"
# Dependencies assumed bundled by mopidy:
# - pykka
# - requests
def install
python3 = Formula["python@3.12"].opt_bin/"python3.12"
system python3, *Language::Python.setup_install_args(libexec, python=python3)
xy = Language::Python.major_minor_version python3
site_packages = "lib/python#{xy}/site-packages"
pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n"
(prefix/site_packages/"homebrew-mopidy-somafm.pth").write pth_contents
end
test do
python3 = Formula["python@3.12"].opt_bin/"python3.12"
system python3, "-c", "import mopidy_somafm"
end
end