You've already forked MINGW-packages
mirror of
https://github.com/encounter/MINGW-packages.git
synced 2026-03-30 11:29:58 -07:00
79 lines
2.7 KiB
Bash
79 lines
2.7 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
|
|
_realname=ndg-httpsclient
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
pkgver=0.4.2
|
|
pkgrel=1
|
|
pkgdesc="Provides enhanced HTTPS support for httplib and urllib2 using PyOpenSSL (mingw-w64)"
|
|
url='https://pypi.python.org/pypi/ndg-httpsclient'
|
|
license=('BSD')
|
|
arch=('any')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python2-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-pyasn1"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-pyasn1"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-pyopenssl"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-pyopenssl")
|
|
_dtoken="a2/a7/ad1c1c48e35dc7545dab1a9c5513f49d5fa3b5015627200d2be27576c2a0"
|
|
source=(https://pypi.python.org/packages/${_dtoken}/ndg_httpsclient-${pkgver}.tar.gz)
|
|
sha256sums=('580987ef194334c50389e0d7de885fccf15605c13c6eecaabd8d6c43768eb8ac')
|
|
|
|
prepare() {
|
|
cd ${srcdir}
|
|
cp -r ndg_httpsclient-${pkgver} python2-build-${CARCH}
|
|
cp -r ndg_httpsclient-${pkgver} python3-build-${CARCH}
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}"
|
|
for pver in {2,3}; do
|
|
msg "Python ${pver} build for ${CARCH}"
|
|
cd "${srcdir}/python${pver}-build-${CARCH}"
|
|
${MINGW_PREFIX}/bin/python${pver} setup.py build
|
|
done
|
|
}
|
|
|
|
package_python3-ndg-httpsclient() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python3-pyopenssl"
|
|
"${MINGW_PACKAGE_PREFIX}-python3-pyasn1")
|
|
|
|
cd ${srcdir}/python3-build-${CARCH}
|
|
${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
|
|
}
|
|
|
|
package_python2-ndg-httpsclient() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python2-pyopenssl"
|
|
"${MINGW_PACKAGE_PREFIX}-python2-pyasn1")
|
|
|
|
cd ${srcdir}/python2-build-${CARCH}
|
|
${MINGW_PREFIX}/bin/python2 setup.py build
|
|
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
|
${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1
|
|
|
|
mv "${pkgdir}${MINGW_PREFIX}"/bin/ndg_httpclient{,2}.exe
|
|
mv "${pkgdir}${MINGW_PREFIX}"/bin/ndg_httpclient{,2}-script.py
|
|
if [ -e ${pkgdir}${MINGW_PREFIX}/bin/ndg_httpclient.exe.manifest ]
|
|
then
|
|
mv "${pkgdir}${MINGW_PREFIX}"/bin/ndg_httpclient{,2}.exe.manifest
|
|
fi
|
|
}
|
|
|
|
package_mingw-w64-i686-python2-ndg-httpsclient() {
|
|
package_python2-ndg-httpsclient
|
|
}
|
|
|
|
package_mingw-w64-i686-python3-ndg-httpsclient() {
|
|
package_python3-ndg-httpsclient
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python2-ndg-httpsclient() {
|
|
package_python2-ndg-httpsclient
|
|
}
|
|
|
|
package_mingw-w64-x86_64-python3-ndg-httpsclient() {
|
|
package_python3-ndg-httpsclient
|
|
}
|