diff --git a/mingw-w64-python-ndg-httpsclient/PKGBUILD b/mingw-w64-python-ndg-httpsclient/PKGBUILD index 830d81b356..8d511ec9e6 100644 --- a/mingw-w64-python-ndg-httpsclient/PKGBUILD +++ b/mingw-w64-python-ndg-httpsclient/PKGBUILD @@ -3,7 +3,7 @@ _realname=ndg-httpsclient pkgbase=mingw-w64-python-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") -pkgver=0.4.2 +pkgver=0.4.4 pkgrel=1 pkgdesc="Provides enhanced HTTPS support for httplib and urllib2 using PyOpenSSL (mingw-w64)" url='https://pypi.python.org/pypi/ndg-httpsclient' @@ -15,9 +15,9 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools" "${MINGW_PACKAGE_PREFIX}-python3-pyasn1" "${MINGW_PACKAGE_PREFIX}-python2-pyopenssl" "${MINGW_PACKAGE_PREFIX}-python3-pyopenssl") -_dtoken="a2/a7/ad1c1c48e35dc7545dab1a9c5513f49d5fa3b5015627200d2be27576c2a0" +_dtoken="6c/dd/4d4f1ad1158830b364beee70cb59f651018f36de24da80e52e47f80bc19f" source=(https://pypi.python.org/packages/${_dtoken}/ndg_httpsclient-${pkgver}.tar.gz) -sha256sums=('580987ef194334c50389e0d7de885fccf15605c13c6eecaabd8d6c43768eb8ac') +sha256sums=('fba4d4798dcac2965874f24afb6631b4326baa4bd02505744d34f690c354856a') prepare() { cd ${srcdir} @@ -42,6 +42,11 @@ package_python3-ndg-httpsclient() { ${MINGW_PREFIX}/bin/python3 setup.py build MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1 + # fix python command in files + local PREFIX_WIN=$(cygpath -am ${MINGW_PREFIX}) + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do + sed -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f} + done } package_python2-ndg-httpsclient() { @@ -59,20 +64,29 @@ package_python2-ndg-httpsclient() { then mv "${pkgdir}${MINGW_PREFIX}"/bin/ndg_httpclient{,2}.exe.manifest fi + # fix python command in files + local PREFIX_WIN=$(cygpath -am ${MINGW_PREFIX}) + for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do + sed -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f} + done } package_mingw-w64-i686-python2-ndg-httpsclient() { + install=${_realname}2-${CARCH}.install package_python2-ndg-httpsclient } package_mingw-w64-i686-python3-ndg-httpsclient() { + install=${_realname}3-${CARCH}.install package_python3-ndg-httpsclient } package_mingw-w64-x86_64-python2-ndg-httpsclient() { + install=${_realname}2-${CARCH}.install package_python2-ndg-httpsclient } package_mingw-w64-x86_64-python3-ndg-httpsclient() { + install=${_realname}3-${CARCH}.install package_python3-ndg-httpsclient } diff --git a/mingw-w64-python-ndg-httpsclient/ndg-httpsclient2-i686.install b/mingw-w64-python-ndg-httpsclient/ndg-httpsclient2-i686.install new file mode 100644 index 0000000000..546fb070e7 --- /dev/null +++ b/mingw-w64-python-ndg-httpsclient/ndg-httpsclient2-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in ndg_httpclient2; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-ndg-httpsclient/ndg-httpsclient2-x86_64.install b/mingw-w64-python-ndg-httpsclient/ndg-httpsclient2-x86_64.install new file mode 100644 index 0000000000..04405acab8 --- /dev/null +++ b/mingw-w64-python-ndg-httpsclient/ndg-httpsclient2-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in ndg_httpclient2; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-ndg-httpsclient/ndg-httpsclient3-i686.install b/mingw-w64-python-ndg-httpsclient/ndg-httpsclient3-i686.install new file mode 100644 index 0000000000..dd1f41dde7 --- /dev/null +++ b/mingw-w64-python-ndg-httpsclient/ndg-httpsclient3-i686.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw32 + local _prefix=$(pwd -W) + cd - + local _it + for _it in ndg_httpclient; do + sed -e "s|/mingw32|${_prefix}|g" \ + -i mingw32/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +} diff --git a/mingw-w64-python-ndg-httpsclient/ndg-httpsclient3-x86_64.install b/mingw-w64-python-ndg-httpsclient/ndg-httpsclient3-x86_64.install new file mode 100644 index 0000000000..0bfee7eff9 --- /dev/null +++ b/mingw-w64-python-ndg-httpsclient/ndg-httpsclient3-x86_64.install @@ -0,0 +1,14 @@ +post_install() { + cd mingw64 + local _prefix=$(pwd -W) + cd - + local _it + for _it in ndg_httpclient; do + sed -e "s|/mingw64|${_prefix}|g" \ + -i mingw64/bin/${_it}-script.py + done +} + +post_upgrade() { + post_install +}