Files
MINGW-packages/mingw-w64-python-requests/PKGBUILD
T

42 lines
1.6 KiB
Bash

# Contributor: Alethea Rose <alethea@alethearose.com>
_realname=requests
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=2.22.0
pkgrel=3
pkgdesc="Requests is the only Non-GMO HTTP library for Python, safe for human consumption (mingw-w64)"
arch=('any')
license=('Apache')
url="https://2.python-requests.org"
depends=("${MINGW_PACKAGE_PREFIX}-python3-urllib3"
"${MINGW_PACKAGE_PREFIX}-python3-chardet"
"${MINGW_PACKAGE_PREFIX}-python3-idna")
makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest-httpbin"
"${MINGW_PACKAGE_PREFIX}-python3-pytest-mock"
"${MINGW_PACKAGE_PREFIX}-python3-pysocks")
optdepends=("${MINGW_PACKAGE_PREFIX}-python3-pysocks: SOCKS proxy support")
source=("${_realname}-${pkgver}.tar.gz::https://github.com/kennethreitz/requests/archive/v${pkgver}.tar.gz")
sha256sums=('dcacea1b6a7bfd2cbb6c6a05743606b428f2739f37825e41fbf79af3cc2fd240')
prepare() {
cd "${srcdir}"
rm -rf python3-build-${CARCH} | true
cp -r "${_realname}-${pkgver}" "python3-build-${CARCH}"
}
build() {
msg "Python 3 build for ${CARCH}"
cd "${srcdir}/python3-build-${CARCH}"
${MINGW_PREFIX}/bin/python3 setup.py build
}
package() {
cd "${srcdir}/python3-build-${CARCH}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python3-${_realname}/LICENSE"
}