diff --git a/Formula/p/python-charset-normalizer.rb b/Formula/p/python-charset-normalizer.rb index e8a6a06f28b2a..d6f0e38e069d9 100644 --- a/Formula/p/python-charset-normalizer.rb +++ b/Formula/p/python-charset-normalizer.rb @@ -15,7 +15,8 @@ class PythonCharsetNormalizer < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "8c94c6c9984fe7b9e2c079e855886199ba04896fc608f43949bbeda964097949" end - depends_on "python-setuptools" => :build + deprecate! date: "2024-03-14", because: "does not meet homebrew/core's requirements for Python library formulae" + depends_on "python@3.11" => [:build, :test] depends_on "python@3.12" => [:build, :test] @@ -26,10 +27,19 @@ def pythons def install pythons.each do |python| python_exe = python.opt_libexec/"bin/python" - system python_exe, "-m", "pip", "install", *std_pip_args, "." + system python_exe, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." end end + def caveats + <<~EOS + Additional details on upcoming formula removal are available at: + * https://github.com/Homebrew/homebrew-core/issues/157500 + * https://docs.brew.sh/Python-for-Formula-Authors#libraries + * https://docs.brew.sh/Homebrew-and-Python#pep-668-python312-and-virtual-environments + EOS + end + test do pythons.each do |python| python_exe = python.opt_libexec/"bin/python" diff --git a/Formula/p/python-idna.rb b/Formula/p/python-idna.rb index d0f68b397462e..93920417235ea 100644 --- a/Formula/p/python-idna.rb +++ b/Formula/p/python-idna.rb @@ -15,7 +15,8 @@ class PythonIdna < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "8efe129e5a958477ceddfe5f1a6fa039924b4811a7315f2052b39d99eb27dc8e" end - depends_on "python-flit-core" => :build + deprecate! date: "2024-03-14", because: "does not meet homebrew/core's requirements for Python library formulae" + depends_on "python@3.11" => [:build, :test] depends_on "python@3.12" => [:build, :test] @@ -26,10 +27,19 @@ def pythons def install pythons.each do |python| python_exe = python.opt_libexec/"bin/python" - system python_exe, "-m", "pip", "install", *std_pip_args, "." + system python_exe, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." end end + def caveats + <<~EOS + Additional details on upcoming formula removal are available at: + * https://github.com/Homebrew/homebrew-core/issues/157500 + * https://docs.brew.sh/Python-for-Formula-Authors#libraries + * https://docs.brew.sh/Homebrew-and-Python#pep-668-python312-and-virtual-environments + EOS + end + test do pythons.each do |python| python_exe = python.opt_libexec/"bin/python" diff --git a/Formula/p/python-requests.rb b/Formula/p/python-requests.rb index b23a04bd79153..b5e773111be73 100644 --- a/Formula/p/python-requests.rb +++ b/Formula/p/python-requests.rb @@ -15,7 +15,8 @@ class PythonRequests < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "38eb54a3c08da5790c7da2dbbe36992772214a7bf2ce87a73b5f58930ec7b0a8" end - depends_on "python-setuptools" => :build + deprecate! date: "2024-03-14", because: "does not meet homebrew/core's requirements for Python library formulae" + depends_on "python@3.11" => [:build, :test] depends_on "python@3.12" => [:build, :test] depends_on "certifi" @@ -30,10 +31,19 @@ def pythons def install pythons.each do |python| python_exe = python.opt_libexec/"bin/python" - system python_exe, "-m", "pip", "install", *std_pip_args, "." + system python_exe, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." end end + def caveats + <<~EOS + Additional details on upcoming formula removal are available at: + * https://github.com/Homebrew/homebrew-core/issues/157500 + * https://docs.brew.sh/Python-for-Formula-Authors#libraries + * https://docs.brew.sh/Homebrew-and-Python#pep-668-python312-and-virtual-environments + EOS + end + test do pythons.each do |python| python_exe = python.opt_libexec/"bin/python" diff --git a/Formula/p/python-urllib3.rb b/Formula/p/python-urllib3.rb index e70ecd1851e38..62a2b9634fffd 100644 --- a/Formula/p/python-urllib3.rb +++ b/Formula/p/python-urllib3.rb @@ -15,7 +15,8 @@ class PythonUrllib3 < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "a93d805dc32d35932eeb16e26b24bf513e53815cea88aada3d5da426bf91fa07" end - depends_on "python-hatchling" => :build + deprecate! date: "2024-03-14", because: "does not meet homebrew/core's requirements for Python library formulae" + depends_on "python@3.11" => [:build, :test] depends_on "python@3.12" => [:build, :test] @@ -26,10 +27,19 @@ def pythons def install pythons.each do |python| python_exe = python.opt_libexec/"bin/python" - system python_exe, "-m", "pip", "install", *std_pip_args, "." + system python_exe, "-m", "pip", "install", *std_pip_args(build_isolation: true), "." end end + def caveats + <<~EOS + Additional details on upcoming formula removal are available at: + * https://github.com/Homebrew/homebrew-core/issues/157500 + * https://docs.brew.sh/Python-for-Formula-Authors#libraries + * https://docs.brew.sh/Homebrew-and-Python#pep-668-python312-and-virtual-environments + EOS + end + test do pythons.each do |python| python_exe = python.opt_libexec/"bin/python"