homebrew-cask/Casks/anaconda.rb

45 lines
1.3 KiB
Ruby

cask "anaconda" do
version "2021.11"
sha256 "6a9217d1a08c599f860045d56ef64fc6c3e3112b55cc97f3d07c573d7bbcdb58"
url "https://repo.anaconda.com/archive/Anaconda3-#{version}-MacOSX-x86_64.sh"
name "Continuum Analytics Anaconda"
desc "Distribution of the Python and R programming languages for scientific computing"
homepage "https://www.anaconda.com/"
livecheck do
url "https://repo.anaconda.com/archive/"
regex(/Anaconda3-(\d+(?:\.\d+)+)-MacOSX-x86_64\.sh/i)
end
auto_updates true
container type: :naked
installer script: {
executable: "Anaconda3-#{version}-MacOSX-x86_64.sh",
args: ["-b", "-p", "#{HOMEBREW_PREFIX}/anaconda3"],
sudo: true,
}
postflight do
set_ownership "#{HOMEBREW_PREFIX}/anaconda3"
end
uninstall delete: [
"#{HOMEBREW_PREFIX}/anaconda3",
"/Applications/Anaconda-Navigator.app",
]
zap trash: [
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.continuum.io.sfl*",
"~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.continuum.python.sfl*",
"~/.anaconda",
"~/.conda",
"~/.condarc",
]
caveats do
files_in_usr_local
end
end