diff --git a/mingw-w64-python-ndg-httpsclient/PKGBUILD b/mingw-w64-python-ndg-httpsclient/PKGBUILD index 65b81eb45f..81137c65e8 100644 --- a/mingw-w64-python-ndg-httpsclient/PKGBUILD +++ b/mingw-w64-python-ndg-httpsclient/PKGBUILD @@ -3,41 +3,32 @@ _pyname=ndg_httpsclient _realname=ndg-httpsclient pkgbase=mingw-w64-python-${_realname} -pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") pkgver=0.5.1 -pkgrel=3 +pkgrel=4 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") +depends=("${MINGW_PACKAGE_PREFIX}-python3-pyopenssl" + "${MINGW_PACKAGE_PREFIX}-python3-pyasn1") +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") +install=${_realname}3-${CARCH}.install source=("${_realname}-${pkgver}.tar.gz"::"https://files.pythonhosted.org/packages/source/n/${_realname}/${_pyname}-${pkgver}.tar.gz") sha256sums=('d72faed0376ab039736c2ba12e30695e2788c4aa569c9c3e3d72131de2592210') prepare() { cd ${srcdir} - cp -r ${_pyname}-${pkgver} python2-build-${CARCH} cp -r ${_pyname}-${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 + msg "Python 3 build for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}" + ${MINGW_PREFIX}/bin/python3 setup.py build } -package_python3-ndg-httpsclient() { - depends=("${MINGW_PACKAGE_PREFIX}-python3-pyopenssl" - "${MINGW_PACKAGE_PREFIX}-python3-pyasn1") - +package() { cd ${srcdir}/python3-build-${CARCH} ${MINGW_PREFIX}/bin/python3 setup.py build MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ @@ -48,45 +39,3 @@ package_python3-ndg-httpsclient() { sed -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f} done } - -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 - # 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 deleted file mode 100644 index 1a39808f80..0000000000 --- a/mingw-w64-python-ndg-httpsclient/ndg-httpsclient2-i686.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - cd mingw32 - local _prefix=$(pwd -W) - cd - - local _it - for _it in ndg_httpclient2; do - sed -e "s|/mingw32|${_prefix}|g" \ - -i ${_prefix}/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 deleted file mode 100644 index 61fa6c6161..0000000000 --- a/mingw-w64-python-ndg-httpsclient/ndg-httpsclient2-x86_64.install +++ /dev/null @@ -1,14 +0,0 @@ -post_install() { - cd mingw64 - local _prefix=$(pwd -W) - cd - - local _it - for _it in ndg_httpclient2; do - sed -e "s|/mingw64|${_prefix}|g" \ - -i ${_prefix}/bin/${_it}-script.py - done -} - -post_upgrade() { - post_install -}