File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 - name : Install Python 3.13
3333 run : |
3434 brew install python@3.13
35+ brew link --overwrite python@3.13
3536 python3 --version
3637 brew --prefix python@3.13
38+ ls -la $(brew --prefix python@3.13)/bin
3739
3840 - name : Style check
3941 run : |
Original file line number Diff line number Diff line change @@ -31,13 +31,27 @@ def install
3131 ENV . prepend_path "PATH" , libexec /"bin"
3232
3333 python3 = Formula [ "python@3.13" ]
34+ ohai "Checking for Python 3.13..."
35+ ohai "opt_bin: #{ python3 . opt_bin } "
36+
3437 python_bin = if ( python3 . opt_bin /"python3" ) . exist?
3538 python3 . opt_bin /"python3"
39+ elsif ( python3 . opt_bin /"python3.13" ) . exist?
40+ python3 . opt_bin /"python3.13"
3641 else
3742 prefix = `brew --prefix python@3.13 2>/dev/null` . strip
38- Pathname . new ( "#{ prefix } /bin/python3" ) unless prefix . empty?
43+ ohai "brew --prefix: #{ prefix } "
44+ if !prefix . empty?
45+ if File . exist? ( "#{ prefix } /bin/python3" )
46+ Pathname . new ( "#{ prefix } /bin/python3" )
47+ elsif File . exist? ( "#{ prefix } /bin/python3.13" )
48+ Pathname . new ( "#{ prefix } /bin/python3.13" )
49+ end
50+ end
3951 end
4052
53+ ohai "Selected python_bin: #{ python_bin } " if python_bin
54+
4155 unless python_bin &.exist?
4256 odie "Python 3.13 not found. Please ensure python@3.13 is installed: brew install python@3.13"
4357 end
You can’t perform that action at this time.
0 commit comments