This thread contains a patchset. You're looking at the original emails,
but you may wish to use the patch review UI.
Review patch
1
[PATCH sr.ht-pkgbuilds v4] python-stripe: Update, add check with stripe-mock
---
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
On 8/16/21 3:32 PM, Thorben Günther wrote:
> ---
> v4: Kill stripe-mock even when test suite fails
>
> python-stripe/PKGBUILD | 35 +++++++++++++++++++++++++++++++----
> 1 file changed, 31 insertions(+), 4 deletions(-)
Thanks!
To git.sr.ht:~sircmpwn/sr.ht-pkgbuilds
f2ae646..ee20f78 master -> master
> 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
> +}
Minor tweak to declare build() before check(), since that is the order
it will generally be read in too.
> package() {
> cd "$srcdir/$_name-$pkgver"
>
--
Eli Schwartz
Bug Wrangler and Trusted User