diff --git a/Formula/protobuf.rb b/Formula/protobuf.rb index 5eef8237d8d..f090cb1d7b6 100644 --- a/Formula/protobuf.rb +++ b/Formula/protobuf.rb @@ -4,6 +4,7 @@ class Protobuf < Formula url "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.0/protobuf-all-3.17.0.tar.gz" sha256 "96da1cb0648c7c1b2e68ef7089149dce18ecf8d0582a171315b3991a59e629c6" license "BSD-3-Clause" + revision 1 livecheck do url :stable @@ -26,11 +27,7 @@ class Protobuf < Formula end depends_on "python@3.9" => [:build, :test] - - resource "six" do - url "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz" - sha256 "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926" - end + depends_on "six" def install # Don't build in debug mode. See: @@ -53,18 +50,10 @@ class Protobuf < Formula ENV.append_to_cflags "-I#{include}" ENV.append_to_cflags "-L#{lib}" - resource("six").stage do - system Formula["python@3.9"].opt_bin/"python3", *Language::Python.setup_install_args(libexec) - end chdir "python" do - system Formula["python@3.9"].opt_bin/"python3", *Language::Python.setup_install_args(libexec), + system Formula["python@3.9"].opt_bin/"python3", *Language::Python.setup_install_args(prefix), "--cpp_implementation" end - - version = Language::Python.major_minor_version Formula["python@3.9"].opt_bin/"python3" - site_packages = "lib/python#{version}/site-packages" - pth_contents = "import site; site.addsitedir('#{libexec/site_packages}')\n" - (prefix/site_packages/"homebrew-protobuf.pth").write pth_contents end test do diff --git a/pypi_formula_mappings.json b/pypi_formula_mappings.json index d285f1c894f..f9429ba66a0 100644 --- a/pypi_formula_mappings.json +++ b/pypi_formula_mappings.json @@ -88,6 +88,9 @@ "poetry": { "extra_packages": ["importlib-metadata", "typing-extensions"] }, + "protobuf": { + "exclude_packages": ["six"] + }, "regipy": { "exclude_packages": ["tabulate"] },