~sircmpwn/sr.ht-packages

sr.ht-pkgbuilds: python-stripe: Update, add check with stripe-mock v4 APPLIED

Thorben Günther: 1
 python-stripe: Update, add check with stripe-mock

 1 files changed, 31 insertions(+), 4 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/sr.ht-packages/patches/24434/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH sr.ht-pkgbuilds v4] python-stripe: Update, add check with stripe-mock Export this patch

---
v4: Kill stripe-mock even when test suite fails

 python-stripe/PKGBUILD | 35 +++++++++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 4 deletions(-)
diff --git a/python-stripe/PKGBUILD b/python-stripe/PKGBUILD
index 26708f8..9d0cf9b 100644
--- a/python-stripe/PKGBUILD
+++ b/python-stripe/PKGBUILD
@@ -1,16 +1,43 @@
# Maintainer: Dylan Whichard <dylan@whichard.com>
_name=stripe
pkgname=python-stripe
pkgver=2.55.1
pkgver=2.60.0
pkgrel=1
pkgdesc='Stripe python bindings'
arch=('any')
url="https://github.com/stripe/stripe-python"
license=('MIT')
depends=('python>=3.4')
depends=('python>=3.4' 'python-requests')
makedepends=('python-setuptools')
source=("https://pypi.python.org/packages/source/${_name:0:1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('6b70e2cf87cfbe0cb891b725b690495bc3d34ab0d82545a5989ecd3b5fa83e2a')
checkdepends=('go' 'python-pytest-mock')
source=(
    "https://pypi.python.org/packages/source/${_name:0:1}/$_name/$_name-$pkgver.tar.gz"
    "stripe-mock-0.110.0.tar.gz::https://github.com/stripe/stripe-mock/archive/refs/tags/v0.110.0.tar.gz"
)
sha256sums=('8966b7793014380f60c6f121ba333d6f333a55818edaf79c8d70464ce0a7a808'
            'dfa66b9802d97333bc9ad6638a2ede99f3519b87b0e9b1ac3a1d434468e74df2')

check() {
    cd "$srcdir/stripe-mock-0.110.0"
    go build
    ./stripe-mock&
    PID=$!
    sleep 5

    cd "$srcdir/$_name-$pkgver"
    local ret=0
    python -m pytest || ret=$?

    kill $PID

    # pretend that pytest, whatever its exit code, is the last thing to run
    return $ret
}

build() {
	cd "$srcdir/$_name-$pkgver"
    python setup.py build 
}

package() {
	cd "$srcdir/$_name-$pkgver"
-- 
2.32.0