|
20 | 20 |
|
21 | 21 | CC: clang
|
22 | 22 |
|
23 |
| - VERSIONER_PERL_VERSION: '5.30' |
24 |
| - VERSIONER_PYTHON_VERSION: '2.7' |
| 23 | + VERSIONER_PERL_VERSION: '5.30' # macOS default Perl installation uses this to determine which one to use |
| 24 | + PYTHON3_VERSION: '3.11' # Make sure to keep src/MacVim/vimrc synced with the Python version here for the Python DLL detection logic. |
| 25 | + |
25 | 26 | vi_cv_path_python: /usr/local/bin/python
|
26 | 27 | vi_cv_path_python3: /usr/local/bin/python3
|
27 | 28 | vi_cv_path_plain_lua: /usr/local/bin/lua
|
28 | 29 | vi_cv_path_ruby: /usr/local/opt/ruby/bin/ruby
|
29 |
| - vi_cv_dll_name_perl: /System/Library/Perl/5.30/darwin-thread-multi-2level/CORE/libperl.dylib |
| 30 | + vi_cv_dll_name_perl: /System/Library/Perl/%s/darwin-thread-multi-2level/CORE/libperl.dylib |
30 | 31 | vi_cv_dll_name_python: /usr/local/Frameworks/Python.framework/Versions/2.7/Python
|
31 |
| - vi_cv_dll_name_python3: /usr/local/Frameworks/Python.framework/Versions/3.10/Python # Make sure to keep src/MacVim/vimrc synced with the Python version here for the Python DLL detection logic. |
32 |
| - vi_cv_dll_name_python3_arm64: /opt/homebrew/Frameworks/Python.framework/Versions/3.10/Python |
| 32 | + vi_cv_dll_name_python3: /usr/local/Frameworks/Python.framework/Versions/%s/Python |
| 33 | + vi_cv_dll_name_python3_arm64: /opt/homebrew/Frameworks/Python.framework/Versions/%s/Python |
33 | 34 | vi_cv_dll_name_ruby: /usr/local/opt/ruby/lib/libruby.dylib
|
34 | 35 | vi_cv_dll_name_ruby_arm64: /opt/homebrew/opt/ruby/lib/libruby.dylib
|
35 | 36 | vi_cv_dll_name_lua_arm64: /opt/homebrew/lib/liblua.dylib
|
@@ -138,6 +139,23 @@ jobs:
|
138 | 139 | brew unlink perl
|
139 | 140 | fi
|
140 | 141 |
|
| 142 | + # With Perl and Python, we need to manually specify the version number for various reasons |
| 143 | + # (e.g. library paths include the version number). Because of that, check that the version |
| 144 | + # matches the expectation and fail if they don't, so we can go and fix it. Only do for |
| 145 | + # Python because a wrong Perl version would just fail the build later. |
| 146 | + if [[ "$(python3 --version)" != *"Python $PYTHON3_VERSION"* ]]; then |
| 147 | + printf "\n" |
| 148 | + echo "Wrong Python 3 version: $(python3 --version). Expected $PYTHON3_VERSION." |
| 149 | + printf "\n" |
| 150 | + echo "This likely happened because Homebrew was updated to point to a newer version of" |
| 151 | + echo "Python 3. Update PYTHON3_VERSION to fix this." |
| 152 | + exit -1 |
| 153 | + fi |
| 154 | +
|
| 155 | + echo "vi_cv_dll_name_perl=$(printf $vi_cv_dll_name_perl $VERSIONER_PERL_VERSION)" >> $GITHUB_ENV |
| 156 | + echo "vi_cv_dll_name_python3=$(printf $vi_cv_dll_name_python3 $PYTHON3_VERSION)" >> $GITHUB_ENV |
| 157 | + echo "vi_cv_dll_name_python3_arm64=$(printf $vi_cv_dll_name_python3_arm64 $PYTHON3_VERSION)" >> $GITHUB_ENV |
| 158 | +
|
141 | 159 | # All set up steps are done. Build and test MacVim below.
|
142 | 160 |
|
143 | 161 | - name: Configure
|
|
0 commit comments