From 011bfe2fca4ec2b7ace60af0de4c677d6947569a Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Mon, 16 Dec 2019 13:47:29 +0300 Subject: [PATCH] python-hypothesis: Drop python2 package --- mingw-w64-python-hypothesis/PKGBUILD | 110 +++++++-------------------- 1 file changed, 26 insertions(+), 84 deletions(-) diff --git a/mingw-w64-python-hypothesis/PKGBUILD b/mingw-w64-python-hypothesis/PKGBUILD index 0b55ad6fb5..ceb8db521b 100644 --- a/mingw-w64-python-hypothesis/PKGBUILD +++ b/mingw-w64-python-hypothesis/PKGBUILD @@ -2,46 +2,35 @@ _realname=hypothesis pkgbase=mingw-w64-python-${_realname} -pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") +pkgname=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}") pkgver=4.43.7 pkgrel=1 pkgdesc="Advanced Quickcheck style testing library for Python (mingw-w64)" arch=('any') url='https://hypothesis.readthedocs.org' license=('MIT') -makedepends=("${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-python3-attrs" - "${MINGW_PACKAGE_PREFIX}-python2-attrs" - "${MINGW_PACKAGE_PREFIX}-python3-coverage" - "${MINGW_PACKAGE_PREFIX}-python2-coverage" - "${MINGW_PACKAGE_PREFIX}-python2-enum34" - "${MINGW_PACKAGE_PREFIX}-python3-setuptools" - "${MINGW_PACKAGE_PREFIX}-python2-setuptools") +depends=("${MINGW_PACKAGE_PREFIX}-python3" + "${MINGW_PACKAGE_PREFIX}-python3-attrs" + "${MINGW_PACKAGE_PREFIX}-python3-coverage") +optdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytz: for datetime and django module" + "${MINGW_PACKAGE_PREFIX}-python3-faker: for fakefactory and django module" + "${MINGW_PACKAGE_PREFIX}-python3-django: for django module" + "${MINGW_PACKAGE_PREFIX}-python3-numpy: for numpy module" + "${MINGW_PACKAGE_PREFIX}-python3-pytest: for pytest module") +makedepends=("${MINGW_PACKAGE_PREFIX}-python3-setuptools") #checkdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytest-runner" -# "${MINGW_PACKAGE_PREFIX}-python2-pytest-runner" # "${MINGW_PACKAGE_PREFIX}-python3-flake8" -# "${MINGW_PACKAGE_PREFIX}-python2-flake8" # "${MINGW_PACKAGE_PREFIX}-python3-pytz" -# "${MINGW_PACKAGE_PREFIX}-python2-pytz" # "${MINGW_PACKAGE_PREFIX}-python3-numpy" -# "${MINGW_PACKAGE_PREFIX}-python2-numpy" # "${MINGW_PACKAGE_PREFIX}-python3-faker" -# "${MINGW_PACKAGE_PREFIX}-python2-faker" # "${MINGW_PACKAGE_PREFIX}-python3-flaky" -# "${MINGW_PACKAGE_PREFIX}-python2-flaky" # "${MINGW_PACKAGE_PREFIX}-python3-pytest-benchmark" -# "${MINGW_PACKAGE_PREFIX}-python2-pytest-benchmark" # "${MINGW_PACKAGE_PREFIX}-python3-django" -# "${MINGW_PACKAGE_PREFIX}-python2-django" # "${MINGW_PACKAGE_PREFIX}-python3-pytest-xdist" -# "${MINGW_PACKAGE_PREFIX}-python2-pytest-xdist" # "${MINGW_PACKAGE_PREFIX}-python3-mock" -# "${MINGW_PACKAGE_PREFIX}-python2-mock" -# "${MINGW_PACKAGE_PREFIX}-python3-pandas" -# "${MINGW_PACKAGE_PREFIX}-python2-pandas") +# "${MINGW_PACKAGE_PREFIX}-python3-pandas") options=('staticlibs' 'strip' '!debug') -source=("${_realname}-$pkgver.tar.gz"::"https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-python-$pkgver.tar.gz") +source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-python-${pkgver}.tar.gz") sha512sums=('bf074f74b1bf0d79405cb529c4e639794117a28b5e21cd6c86125dee232bb1dfa831ffda15779f46c795c0a31e896d96f0f9f197c40de89e742caca57041f8c2') # Helper macros to help make tasks easier # @@ -67,10 +56,10 @@ prepare() { cd "${srcdir}" sed -i "/FutureWarning/a \ filterwarnings('ignore', category=DeprecationWarning, module='pandas.core')" \ ${_realname}-${_realname}-python-$pkgver/hypothesis-python/tests/common/setup.py - for builddir in python{2,3}-build-${CARCH}; do - rm -rf ${builddir} | true - cp -r "${_realname}-${_realname}-python-${pkgver}" "${builddir}" - done + + rm -rf python3-build-${CARCH} | true + cp -r "${_realname}-${_realname}-python-${pkgver}" "python3-build-${CARCH}" + # Set version for setuptools_scm export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver export LC_CTYPE=en_US.UTF-8 @@ -81,71 +70,24 @@ prepare() { # but sometimes, you want to do a check before install which would # also trigger the build. build() { - for pver in {2,3}; do - msg "Python ${pver} build for ${CARCH}" - cd "${srcdir}/python${pver}-build-${CARCH}/hypothesis-python" - ${MINGW_PREFIX}/bin/python${pver} setup.py build - done + msg "Python 3 build for ${CARCH}" + cd "${srcdir}/python3-build-${CARCH}/hypothesis-python" + ${MINGW_PREFIX}/bin/python3 setup.py build } # Comment out until we can get this to work. #check() { -# for pver in {2,3}; do -# msg "Python ${pver} test for ${CARCH}" -# cd "${srcdir}/python${pver}-build-${CARCH}/hypothesis-python" -# mv tests/django ../ -# ${MINGW_PREFIX}/bin/python${pver} setup.py pytest --addopts -n16 -# mv ../django tests/ -# PYTHONPATH="$PWD/build/lib:$PYTHONPATH" ${MINGW_PREFIX}/bin/python${pver} -m tests.django.manage test tests.django || warning "Tests failed" -# -# done +# msg "Python 3 test for ${CARCH}" +# cd "${srcdir}/python3-build-${CARCH}/hypothesis-python" +# mv tests/django ../ +# ${MINGW_PREFIX}/bin/python3 setup.py pytest --addopts -n16 +# mv ../django tests/ +# PYTHONPATH="$PWD/build/lib:$PYTHONPATH" ${MINGW_PREFIX}/bin/python3 -m tests.django.manage test tests.django || warning "Tests failed" #} -package_python3-hypothesis() { - depends=("${MINGW_PACKAGE_PREFIX}-python3" - "${MINGW_PACKAGE_PREFIX}-python3-attrs" - "${MINGW_PACKAGE_PREFIX}-python3-coverage") - optdepends=("${MINGW_PACKAGE_PREFIX}-python3-pytz: for datetime and django module" - "${MINGW_PACKAGE_PREFIX}-python3-faker: for fakefactory and django module" - "${MINGW_PACKAGE_PREFIX}-python3-django: for django module" - "${MINGW_PACKAGE_PREFIX}-python3-numpy: for numpy module" - "${MINGW_PACKAGE_PREFIX}-python3-pytest: for pytest module") - +package() { cd "${srcdir}/python3-build-${CARCH}/hypothesis-python" MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ ${MINGW_PREFIX}/bin/python3 setup.py install --prefix=${MINGW_PREFIX} \ --root="${pkgdir}" --optimize=1 --skip-build } - -package_python2-hypothesis() { - depends=("${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python2-attrs" - "${MINGW_PACKAGE_PREFIX}-python2-coverage" - "${MINGW_PACKAGE_PREFIX}-python2-enum34") - optdepends=("${MINGW_PACKAGE_PREFIX}-python2-pytz: for datetime and django module" - "${MINGW_PACKAGE_PREFIX}-python2-faker: for fakefactory and django module" - "${MINGW_PACKAGE_PREFIX}-python2-django: for django module" - "${MINGW_PACKAGE_PREFIX}-python2-numpy: for numpy module" - "${MINGW_PACKAGE_PREFIX}-python2-pytest: for pytest module") - - cd "${srcdir}/python2-build-${CARCH}/hypothesis-python" - MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ - ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} \ - --root="${pkgdir}" --optimize=1 --skip-build -} - -package_mingw-w64-i686-python2-hypothesis() { - package_python2-hypothesis -} - -package_mingw-w64-i686-python3-hypothesis() { - package_python3-hypothesis -} - -package_mingw-w64-x86_64-python2-hypothesis() { - package_python2-hypothesis -} - -package_mingw-w64-x86_64-python3-hypothesis() { - package_python3-hypothesis -}