Skip to content
Merged

cog 0.9.5 #166169

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
33 changes: 18 additions & 15 deletions Formula/c/cog.rb
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
class Cog < Formula
desc "Containers for machine learning"
homepage "https://github.com/replicate/cog"
url "https://github.com/replicate/cog/archive/refs/tags/v0.9.4.tar.gz"
sha256 "5f455da636ec6dd6c81fd46fb721e261da1912ec42e2c547496c9cc8bae78773"
url "https://github.com/replicate/cog/archive/refs/tags/v0.9.5.tar.gz"
sha256 "e8ed3242f17cfffc6d80841aa46f6b1cf2a0170a3a3488be80cf2a123a56f714"
license "Apache-2.0"
head "https://github.com/replicate/cog.git", branch: "main"

bottle do
rebuild 1
sha256 cellar: :any_skip_relocation, arm64_sonoma: "8e4487f81bba0027b04ebabda2c9e32c3e81cc6a1c14b8f6a65a57462266d838"
sha256 cellar: :any_skip_relocation, arm64_ventura: "cd980304b84c5ad3d732e4b025a42a1446394128d83d406e779ab00d92b34d3d"
sha256 cellar: :any_skip_relocation, arm64_monterey: "2c60097dcb7d72346cf6e4e46a49be556655f3f2687200620bccd234d228477f"
sha256 cellar: :any_skip_relocation, sonoma: "de636cf99f2f4162f11683a4457f7047d5e2a907a6ed639aa39783cf2a2888b1"
sha256 cellar: :any_skip_relocation, ventura: "f526ce33260b4eb2d3686cc72e9ba35cfdd76bd1f9f034baeaeb31daa121eb04"
sha256 cellar: :any_skip_relocation, monterey: "8f7b05a97df14e5240ab5684058a44d043763f05f0734ed71bfba21fa7ca1195"
sha256 cellar: :any_skip_relocation, x86_64_linux: "19e01d6fdf14ddcd473c6eee30ffbc8f3464a6e444492e0bf3fb434baa7048cd"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "af923bdf3e61eb935531805f8b57fb18b0a54f6cfbc4fe49e2841275844596f8"
sha256 cellar: :any_skip_relocation, arm64_ventura: "a1d3661b7c94958241ac609798615a96af81241997db42db68687003553b4ea5"
sha256 cellar: :any_skip_relocation, arm64_monterey: "31f57813e5fccb45be9aa2fd10180e86abd87c5ce1cb1bbf417f09199fd806e0"
sha256 cellar: :any_skip_relocation, sonoma: "14b2612b58b65d70ad8ec2dbb8a88c5df0d08f607da69fa1956f22fb88e77a96"
sha256 cellar: :any_skip_relocation, ventura: "f5dc3667506b9e25eac81b3dafb927dedf528dcf12000be3829fc6f97202396f"
sha256 cellar: :any_skip_relocation, monterey: "207cd24010feebe42626b1ce1c9b7cef5d6917f3d6a832d41fbba0df6fa12e6d"
sha256 cellar: :any_skip_relocation, x86_64_linux: "c2ec63aeea525235209663458def7b77995d964f3d12cb839c12c86b2f38f523"
end

depends_on "go" => :build

uses_from_macos "python" => :build
depends_on "python@3.12" => :build

def install
ENV["SETUPTOOLS_SCM_PRETEND_VERSION"] = version.to_s
system "make", "COG_VERSION=#{version}", "PYTHON=python3"
bin.install "cog"
python3 = "python3.12"

# Prevent Makefile from running `pip install build` by manually creating wheel.
# Otherwise it can end up installing binary wheels.
system python3, "-m", "pip", "wheel", "--verbose", "--no-deps", "--no-binary=:all:", "."
(buildpath/"pkg/dockerfile/embed").install buildpath.glob("cog-*.whl").first => "cog.whl"

system "make", "install", "COG_VERSION=#{version}", "PYTHON=#{python3}", "PREFIX=#{prefix}"
generate_completions_from_executable(bin/"cog", "completion")
end

Expand Down