62 lines
2.6 KiB
Bash
62 lines
2.6 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=hypothesis
|
|
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=6.96.1
|
|
pkgrel=1
|
|
pkgdesc="Advanced Quickcheck style testing library for Python (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
|
msys2_references=(
|
|
'archlinux: python-hypothesis'
|
|
'pypi: hypothesis'
|
|
)
|
|
msys2_changelog_url='https://hypothesis.readthedocs.io/en/latest/changes.html'
|
|
msys2_documentation_url='https://hypothesis.readthedocs.io/'
|
|
msys2_issue_tracker_url='https://github.com/HypothesisWorks/hypothesis/issues/'
|
|
msys2_repository_url='https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python/'
|
|
url='https://hypothesis.works/'
|
|
license=('spdx:MPL-2.0')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python-attrs"
|
|
"${MINGW_PACKAGE_PREFIX}-python-sortedcontainers"
|
|
"${MINGW_PACKAGE_PREFIX}-python-exceptiongroup")
|
|
if [[ ${CARCH} != i686 ]]; then
|
|
optdepends=("${MINGW_PACKAGE_PREFIX}-python-pytz: for datetime and django module"
|
|
"${MINGW_PACKAGE_PREFIX}-python-faker: for fakefactory and django module"
|
|
"${MINGW_PACKAGE_PREFIX}-python-django: for django module"
|
|
"${MINGW_PACKAGE_PREFIX}-python-numpy: for numpy module"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest: for pytest module")
|
|
fi
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-wheel")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest")
|
|
options=('!strip')
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
|
|
sha256sums=('955a57e56be4607c81c17ca53e594af54aadeed91e07b88bb7f84e8208ea7739')
|
|
|
|
build() {
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
|
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
${MINGW_PREFIX}/bin/python -m pytest || warning "Tests failed"
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
|
|
--destdir="${pkgdir}" dist/*.whl
|
|
|
|
install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE.txt"
|
|
}
|