@@ -6,13 +6,8 @@ class PythonSetuptools < Formula
6
6
license "MIT"
7
7
8
8
bottle do
9
- sha256 cellar : :any_skip_relocation , arm64_sequoia : "6dc19deb18ad122f26f6201aa5191acfdc95da06bf1b02d1fbd530e7497d5102"
10
- sha256 cellar : :any_skip_relocation , arm64_sonoma : "6dc19deb18ad122f26f6201aa5191acfdc95da06bf1b02d1fbd530e7497d5102"
11
- sha256 cellar : :any_skip_relocation , arm64_ventura : "6dc19deb18ad122f26f6201aa5191acfdc95da06bf1b02d1fbd530e7497d5102"
12
- sha256 cellar : :any_skip_relocation , sequoia : "4a828685a6098a2045e6ea0de9ac03d335f9cde04ec3650c1d3cddb01de59a9b"
13
- sha256 cellar : :any_skip_relocation , sonoma : "4a828685a6098a2045e6ea0de9ac03d335f9cde04ec3650c1d3cddb01de59a9b"
14
- sha256 cellar : :any_skip_relocation , ventura : "4a828685a6098a2045e6ea0de9ac03d335f9cde04ec3650c1d3cddb01de59a9b"
15
- sha256 cellar : :any_skip_relocation , x86_64_linux : "354fb7eb8b83f3a4e8f2ccf215e429d08b0945acf108676cf371b3779a3d59f6"
9
+ rebuild 1
10
+ sha256 cellar : :any_skip_relocation , all : "2dc17c4502fb53a5b14bbd65e2c8d1d0fbd62f74f142f2046f146af7731c1335"
16
11
end
17
12
18
13
depends_on "[email protected] " => [ :build , :test ]
@@ -24,8 +19,22 @@ def pythons
24
19
end
25
20
26
21
def install
22
+ inreplace_paths = %w[
23
+ _distutils/unixccompiler.py
24
+ _vendor/platformdirs/unix.py
25
+ tests/test_easy_install.py
26
+ ]
27
+
27
28
pythons . each do |python |
28
29
system python , "-m" , "pip" , "install" , *std_pip_args , "."
30
+
31
+ # Ensure uniform bottles
32
+ setuptools_site_packages = prefix /Language ::Python . site_packages ( python ) /"setuptools"
33
+ inreplace setuptools_site_packages /"_vendor/platformdirs/macos.py" , "/opt/homebrew" , HOMEBREW_PREFIX
34
+
35
+ inreplace_files = inreplace_paths . map { |file | setuptools_site_packages /file }
36
+ inreplace_files += setuptools_site_packages . glob ( "_vendor/platformdirs-*dist-info/METADATA" )
37
+ inreplace inreplace_files , "/usr/local" , HOMEBREW_PREFIX
29
38
end
30
39
end
31
40
0 commit comments