cask "pycharm" do arch arm: "-aarch64" version "2024.3,243.21565.199" sha256 arm: "254243b532bcbe60b36fba2900048ab5eb6e5edb0aeb45945a63fade3929ebc8", intel: "1678b71fcbdcd3a3125eb008cdf21281168744599de3093b29f8de3fb0bc6e49" url "https://download.jetbrains.com/python/pycharm-professional-#{version.csv.first}#{arch}.dmg" name "PyCharm" name "PyCharm Professional" desc "IDE for professional Python development" homepage "https://www.jetbrains.com/pycharm/" livecheck do url "https://data.services.jetbrains.com/products/releases?code=PCP&latest=true&type=release" strategy :json do |json| json["PCP"]&.map do |release| version = release["version"] build = release["build"] next if version.blank? || build.blank? "#{version},#{build}" end end end auto_updates true depends_on macos: ">= :high_sierra" app "PyCharm.app" binary "#{appdir}/PyCharm.app/Contents/MacOS/pycharm" zap trash: [ "~/Library/Application Support/JetBrains/PyCharm#{version.major_minor}", "~/Library/Application Support/PyCharm#{version.major_minor}", "~/Library/Caches/JetBrains/PyCharm#{version.major_minor}", "~/Library/Logs/JetBrains/PyCharm#{version.major_minor}", "~/Library/Preferences/com.jetbrains.pycharm.plist", "~/Library/Preferences/jetbrains.pycharm.*.plist", "~/Library/Preferences/PyCharm#{version.major_minor}", "~/Library/Saved Application State/com.jetbrains.pycharm.savedState", ] end