python-ndg-httpsclient - 4.4.4 - Update to late3st version. Make sure you can run the .exe in the package by specifying the absolute path and doing a fixup at install. (#3396)

This commit is contained in:
J. Peter Mugaas
2018-02-16 05:04:07 -05:00
committed by Алексей
parent b887e7eb5f
commit 80b1e2397e
5 changed files with 73 additions and 3 deletions

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}