Files
MINGW-packages/mingw-w64-python-requests/PKGBUILD
Christoph Reiter ad3a0c37e7 Python 3.10 rebuilds
2022-06-10 17:54:24 +02:00

47 lines
1.9 KiB
Bash

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