Skip to content

Commit 4e9158d

Browse files
authored
apacheGH-15025: [CI][C++][Homebrew] Ensure removing Python related commands (apache#15026)
If they exist and Homebrew's Python formula is updated, the update is failed: https://github.com/apache/arrow/actions/runs/3729475663/jobs/6325425516 ==> Pouring python@ 3.10--3.10.9.monterey.bottle.tar.gz Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/2to3 Target /usr/local/bin/2to3 already exists. You may want to remove it: rm '/usr/local/bin/2to3' To force the link and overwrite all conflicting files: brew link --overwrite python@ 3.10 To list all files that would be deleted: brew link --overwrite --dry-run python@ 3.10 Possible conflicting files are: /usr/local/bin/2to3 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/2to3 /usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/idle3 /usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/pydoc3 /usr/local/bin/python3 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 /usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3-config * Closes: apache#15025 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent b841a46 commit 4e9158d

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

.github/workflows/cpp.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ jobs:
158158
submodules: recursive
159159
- name: Install Dependencies
160160
run: |
161+
rm -f /usr/local/bin/2to3 || :
162+
rm -f /usr/local/bin/idle3 || :
163+
rm -f /usr/local/bin/pydoc3 || :
164+
rm -f /usr/local/bin/python3 || :
165+
rm -f /usr/local/bin/python3-config || :
161166
brew update --preinstall
162167
brew bundle --file=cpp/Brewfile
163168
- name: Install MinIO

.github/workflows/python.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ jobs:
162162
- name: Install Dependencies
163163
shell: bash
164164
run: |
165-
rm -f /usr/local/bin/2to3
165+
rm -f /usr/local/bin/2to3 || :
166+
rm -f /usr/local/bin/idle3 || :
167+
rm -f /usr/local/bin/pydoc3 || :
168+
rm -f /usr/local/bin/python3 || :
169+
rm -f /usr/local/bin/python3-config || :
166170
brew update --preinstall
167171
brew install --overwrite git
168172
brew bundle --file=cpp/Brewfile

.github/workflows/ruby.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,11 @@ jobs:
142142
- name: Install Homebrew Dependencies
143143
shell: bash
144144
run: |
145-
rm -f /usr/local/bin/2to3*
146-
rm -f /usr/local/bin/idle*
147-
rm -f /usr/local/bin/pydoc3*
148-
rm -f /usr/local/bin/python3*
145+
rm -f /usr/local/bin/2to3 || :
146+
rm -f /usr/local/bin/idle3 || :
147+
rm -f /usr/local/bin/pydoc3 || :
148+
rm -f /usr/local/bin/python3 || :
149+
rm -f /usr/local/bin/python3-config || :
149150
brew update --preinstall
150151
brew install --overwrite git
151152
brew bundle --file=cpp/Brewfile

0 commit comments

Comments
 (0)