Skip to content

Commit f7be8f6

Browse files
committed
Fix OpenSSL in Msys2 environment
Outdated and/or missing SSL libraries break pip: - msys2/MINGW-packages#4582 - Error message: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available - Most helpful command for troubleshooting - show missing shared libraries: ldd /usr/lib/python*/lib*/_ssl* Installing libopenssl fixes pip, however it breaks curl (silent failure on `curl --version` with exit code 127). Most likely the binary in repos needs to be rebuilt against newer OpenSSL - let's hope maintainers do that soon. In the mean time as a workaround we resort to installing a static curl build from developer's web site.
1 parent 7dbdb19 commit f7be8f6

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/test.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,41 @@ jobs:
5757
PIP_CACHE_DIR: cache/pip
5858
defaults:
5959
run:
60-
shell: C:\msys64\usr\bin\bash.exe {0}
60+
shell: C:\msys64\usr\bin\bash.exe -xeuo pipefail {0}
6161
steps:
6262
- uses: actions/checkout@v1
6363
- uses: actions/cache@v1
6464
with:
6565
path: cache
6666
key: cache-v1-${{ runner.os }}-msys2-${{ hashFiles('tests/requirements.txt') }}
67+
68+
- name: Install static build of curl
69+
run: |-
70+
pacman --noconfirm -Sy unzip
71+
mkdir -p /tmp/curl /usr/local/bin
72+
cd /tmp/curl
73+
curl -sSL "https://curl.se/windows/dl-7.87.0/curl-7.87.0-win64-mingw.zip" -o /tmp/curl.zip
74+
unzip /tmp/curl.zip
75+
mv curl*/bin/curl.exe curl*/bin/*.crt /usr/local/bin/
76+
which curl
77+
curl --version
78+
env:
79+
PATH: '/usr/local/bin:/usr/bin:/bin'
80+
81+
- name: Upgrade Msys2 environment
82+
run: |-
83+
exec pacman --noconfirm -Syu
84+
env:
85+
PATH: '/usr/local/bin:/usr/bin:/bin'
86+
87+
- name: Install dependencies
88+
run: |-
89+
exec pacman --noconfirm -Sy make python3 libopenssl curl libcurl
90+
env:
91+
PATH: '/usr/local/bin:/usr/bin:/bin'
92+
6793
- name: make test
6894
run: |-
69-
pacman --noconfirm -Sy make python3
7095
make test
7196
env:
7297
PATH: '/usr/local/bin:/usr/bin:/bin'

0 commit comments

Comments
 (0)