blob: 279766eca7b81fbce7ff2c58d689b96e29cd33e9 [file] [log] [blame] [edit]
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
_realname=faker
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=8.9.0
pkgrel=1
pkgdesc="Faker generates fake data for you (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url="https://faker.readthedocs.io/en/master/"
license=('MIT')
depends=("${MINGW_PACKAGE_PREFIX}-python-dateutil"
"${MINGW_PACKAGE_PREFIX}-python-text-unidecode")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-ukpostcodeparser"
"${MINGW_PACKAGE_PREFIX}-python-mock"
"${MINGW_PACKAGE_PREFIX}-python-email-validator")
options=('staticlibs' 'strip' '!debug')
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/joke2k/faker/archive/v${pkgver}.tar.gz")
sha512sums=('8b08d7dc092ffa890ce392f511a970c64ff6731e2ae5d77406af0e2b87cb023844d5d08f25a2526cd1de3c80c1e67a1496a3743dd109ffd4ec96eed6d9f69583')
prepare() {
cd "${srcdir}"
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
}
check() {
msg "Python test for ${CARCH}"
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/python setup.py test || warning "Tests failed"
}
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}" --optimize=1 --skip-build
install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE.txt"
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*-script.py; do
sed -e '1 { s/^#!.*$// }' -i ${_f}
done
}