summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 844c9233786ccb4cac8bfda782b426d0dfad05c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>

pkgname=python-aiohttp-middlewares
_pypiname=aiohttp-middlewares
pkgver=2.2.0
pkgrel=2
pkgdesc="Collection of useful middlewares for aiohttp.web applications"
arch=('any')
url="https://github.com/playpauseandstop/aiohttp-middlewares"
license=('custom:BSD3')
depends=(
  'python'
  'python-aiohttp'
  'python-async-timeout'
  'python-yarl'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-poetry-core'
  'python-wheel'
)
checkdepends=(
  'python-pytest'
  'python-pytest-aiohttp'
  'python-pytest-asyncio'
)

source=(
  "$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz"
)
sha256sums=(
  '354e97552937cc881ffb36f7c0bb5a679d7a81d485bf0dba6367eb5294586f60'
)

prepare() {
  rm "$_pypiname-$pkgver/.python-version"
}


build() {
  cd "$_pypiname-$pkgver"

  GIT_DIR=$PWD python -m build --wheel --no-isolation
}

check() {
  cd "$_pypiname-$pkgver"

  PYTHONPATH=src/ python -m pytest --override-ini='addopts=""'
}

package() {
  cd "$_pypiname-$pkgver"

  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}