Skip to content

Commit

Permalink
Merge pull request #191316 from Homebrew/python-setuptools-all
Browse files Browse the repository at this point in the history
python-setuptools: build an `:all` bottle
  • Loading branch information
BrewTestBot committed Sep 20, 2024
2 parents 176c3fe + c79c12d commit 25f1eb6
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions Formula/p/python-setuptools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ class PythonSetuptools < Formula
license "MIT"

bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "6dc19deb18ad122f26f6201aa5191acfdc95da06bf1b02d1fbd530e7497d5102"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "6dc19deb18ad122f26f6201aa5191acfdc95da06bf1b02d1fbd530e7497d5102"
sha256 cellar: :any_skip_relocation, arm64_ventura: "6dc19deb18ad122f26f6201aa5191acfdc95da06bf1b02d1fbd530e7497d5102"
sha256 cellar: :any_skip_relocation, sequoia: "4a828685a6098a2045e6ea0de9ac03d335f9cde04ec3650c1d3cddb01de59a9b"
sha256 cellar: :any_skip_relocation, sonoma: "4a828685a6098a2045e6ea0de9ac03d335f9cde04ec3650c1d3cddb01de59a9b"
sha256 cellar: :any_skip_relocation, ventura: "4a828685a6098a2045e6ea0de9ac03d335f9cde04ec3650c1d3cddb01de59a9b"
sha256 cellar: :any_skip_relocation, x86_64_linux: "354fb7eb8b83f3a4e8f2ccf215e429d08b0945acf108676cf371b3779a3d59f6"
rebuild 1
sha256 cellar: :any_skip_relocation, all: "2dc17c4502fb53a5b14bbd65e2c8d1d0fbd62f74f142f2046f146af7731c1335"
end

depends_on "python@3.12" => [:build, :test]
Expand All @@ -24,8 +19,22 @@ def pythons
end

def install
inreplace_paths = %w[
_distutils/unixccompiler.py
_vendor/platformdirs/unix.py
tests/test_easy_install.py
]

pythons.each do |python|
system python, "-m", "pip", "install", *std_pip_args, "."

# Ensure uniform bottles
setuptools_site_packages = prefix/Language::Python.site_packages(python)/"setuptools"
inreplace setuptools_site_packages/"_vendor/platformdirs/macos.py", "/opt/homebrew", HOMEBREW_PREFIX

inreplace_files = inreplace_paths.map { |file| setuptools_site_packages/file }
inreplace_files += setuptools_site_packages.glob("_vendor/platformdirs-*dist-info/METADATA")
inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX
end
end

Expand Down

0 comments on commit 25f1eb6

Please sign in to comment.