summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge2023-06-26 21:30:15 +0200
committerDavid Runge2023-06-26 21:30:15 +0200
commit6f17be1d72a127bec6acfa3bf90699d74e2bfa04 (patch)
treeb29b029626a5e126d08896f1bd21ec3933d0f13c
parent846c25ab29152acbbc4475a820722b1bbd28f848 (diff)
downloadaur-6f17be1d72a127bec6acfa3bf90699d74e2bfa04.tar.gz
Drop from extra
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD66
2 files changed, 71 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8c244a8398da..85bd06bafa09 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,26 @@
-# Generated by mksrcinfo v8
-# Sat Nov 4 17:31:30 UTC 2017
pkgbase = python-wsgi-intercept
- pkgdesc = Installs a WSGI application in place of a real URI for testing.
- pkgver = 1.5.1
+ pkgdesc = Intercept socket connection to wsgi applications for testing
+ pkgver = 1.11.0
pkgrel = 1
- url = http://code.google.com/p/wsgi-intercept/
+ url = https://github.com/cdent/wsgi-intercept
arch = any
license = MIT
+ checkdepends = python-httplib2
+ checkdepends = python-pytest
+ checkdepends = python-requests
+ checkdepends = python-urllib3
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
+ makedepends = python-sphinx
+ makedepends = python-wheel
depends = python
- source = https://pypi.io/packages/source/w/wsgi_intercept/wsgi_intercept-1.5.1.tar.gz
- md5sums = 6ce3e56a93313ae88e7e0a98b35044ba
+ depends = python-six
+ optdepends = python-httplib2: for intercepting requests of python-httplib2
+ optdepends = python-requests: for intercepting requests of python-requests
+ optdepends = python-urllib3: for intercepting requests of python-urllib3
+ source = https://files.pythonhosted.org/packages/source/w/wsgi_intercept/wsgi_intercept-1.11.0.tar.gz
+ sha512sums = 8fd0ff0eadc5a19831f089d34bbf879b58c79e27c340128298a4385578bbfd5e86a14f0168a418f5c8e40062b14993a577b07be02d29e954486b7e2a04597ee8
+ b2sums = 3008837e8125c212920b0a5a6e6c0a65f279cf60a251bd853006b1e12774da80cbf737f1db5243a30cc9d510fedeb5e4127a81d3cb5210392cd5c561109a252b
pkgname = python-wsgi-intercept
-
diff --git a/PKGBUILD b/PKGBUILD
index c5f54730a6f6..17c55d5034d6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,61 @@
-# Maintainer: Hugo Osvaldo Barrera <hugo@barrera.io>
+# Maintainer: David Runge <dvzrv@archlinux.org>
+# Contributor: Hugo Osvaldo Barrera <hugo@barrera.io>
# Contributor: Neil Santos <nsantos16+aur@gmail.com>
+_name=wsgi_intercept
pkgname=python-wsgi-intercept
-_pkgname=wsgi_intercept
-pkgver=1.5.1
+pkgver=1.11.0
pkgrel=1
-pkgdesc='Installs a WSGI application in place of a real URI for testing.'
-arch=('any')
-url='http://code.google.com/p/wsgi-intercept/'
-license=('MIT')
-depends=('python')
-makedepends=('python-setuptools')
-source=("https://pypi.io/packages/source/w/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
+pkgdesc="Intercept socket connection to wsgi applications for testing"
+arch=(any)
+url="https://github.com/cdent/wsgi-intercept"
+license=(MIT)
+depends=(
+ python
+ python-six
+)
+makedepends=(
+ python-build
+ python-installer
+ python-setuptools
+ python-sphinx
+ python-wheel
+)
+checkdepends=(
+ python-httplib2
+ python-pytest
+ python-requests
+ python-urllib3
+)
+optdepends=(
+ 'python-httplib2: for intercepting requests of python-httplib2'
+ 'python-requests: for intercepting requests of python-requests'
+ 'python-urllib3: for intercepting requests of python-urllib3'
+)
+source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
+sha512sums=('8fd0ff0eadc5a19831f089d34bbf879b58c79e27c340128298a4385578bbfd5e86a14f0168a418f5c8e40062b14993a577b07be02d29e954486b7e2a04597ee8')
+b2sums=('3008837e8125c212920b0a5a6e6c0a65f279cf60a251bd853006b1e12774da80cbf737f1db5243a30cc9d510fedeb5e4127a81d3cb5210392cd5c561109a252b')
-md5sums=('6ce3e56a93313ae88e7e0a98b35044ba')
+build() {
+ cd $_name-$pkgver
+ python -m build --wheel --no-isolation
+ cd docs
+ make man
+}
+
+check() {
+ cd $_name-$pkgver
+ pytest -vv
+}
package() {
- cd "$srcdir/wsgi_intercept-$pkgver"
- python setup.py install --prefix=/usr --root="$pkgdir"
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+
+ cd $_name-$pkgver
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+ install -vDm 644 README -t "$pkgdir/usr/share/$pkgname/"
+ install -vDm 644 docs/_build/man/${_name}.1 -t "$pkgdir/usr/share/man/man1/"
+
+ rm -frv "$pkgdir/$site_packages/$_name/tests/"
}