python-requests/set_urllib3_version.sh

13 lines
325 B
Bash
Raw Normal View History

#!/bin/bash
wd=$PWD
tmpdir=`mktemp -d`
cd $tmpdir
tar xzf $wd/requests-*.tar.gz
cd requests-*
version=`python3 -c 'from requests.packages.urllib3 import __version__; print(__version__, end="")'`
cd ../..
rm -rf $tmpdir
cd $wd
sed -i 's/%define urllib3_version .*$/%define urllib3_version '"$version"'/' python-requests.spec