summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b4d86e48496fdf63b2882d4c78855f1c22253645 (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: A Frederick Christensen <aur@nosocomia.com>
# Contributor: Carsten Feuls <archlinux@carstenfeuls.de>
pkgname=python-caldav
_name=${pkgname#python-}
pkgver=1.3.9
pkgrel=2
pkgdesc="A CalDAV (RFC4791) client library for Python"
arch=('any')
url="https://github.com/python-caldav/caldav"
license=('Apache-2.0 AND GPL-3.0-or-later')
depends=(
  'python-icalendar'
  'python-lxml'
  'python-recurring-ical-events'
  'python-requests'
  'python-six'
  'python-tzlocal'
  'python-vobject'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)
#checkdepends=(
#  'python-pytest-cov'
#  'radicale'
#  'xandikos'
#)
source=("${_name}-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('b733fb9e038e1addf725ad3bb8ec8725d6f4f401cc7203ef01936faa618f5409')

prepare() {
  cd "${_name}-$pkgver"

  # Remove shebangs
  find caldav -name "*.py" | xargs sed -i '1 {/^#!/d}'
}

build() {
  cd "${_name}-$pkgver"
  python -m build --wheel --no-isolation
}

#check() {
#  cd "${_name}-$pkgver"
#  python -m venv --clear --system-site-packages .testenv
#  .testenv/bin/python -m installer dist/*.whl
#  .testenv/bin/python -m pytest
#}

package() {
  cd "${_name}-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl
}