Skip to content

Commit

Permalink
Temporarily patch py3-requests idna dependency
Browse files Browse the repository at this point in the history
psf/requests#5710

This will be fixed upstream eventually, but for now it prevents Salt
from working:

    pkg_resources.DistributionNotFound: The 'idna<3,>=2.5' distribution
    was not found and is required by requests

Signed-off-by: Joe Groocock <me@frebib.net>
  • Loading branch information
frebib committed Jan 4, 2021
1 parent 04e1189 commit d65b730
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Expand Up @@ -15,6 +15,8 @@ ADD patches/ /tmp/patches
RUN apk --no-cache add \
salt-master=${SALT_VERSION} \
&& \
# Munge requests idna dependency: https://github.com/psf/requests/issues/5710
sed -i 's/idna<3,/idna<=3,/g' /usr/lib/python3.8/site-packages/requests-2.25.1-py3.8.egg-info/requires.txt && \
cd "$(python3 -c 'import os, salt; print(os.path.dirname(salt.__path__[0]))')" && \
for file in /tmp/patches/*.patch; do \
patch -p1 < "$file"; \
Expand Down

0 comments on commit d65b730

Please sign in to comment.