summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f0f2f132663509de07a61ee7538c37a5daa0e91c (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
# 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.4.0
pkgrel=1
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-vobject'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-setuptools-scm'
  'python-wheel'
)
#checkdepends=(
#  'python-pytest'
#  'python-tzlocal'
#  'radicale'
#  'xandikos'
#)
source=("${_name}-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('3c97593530e8c93fb8496bc12fcc37046bdea2ab5e3edf6f9d0da54b955e58f8')

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

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

build() {
  cd "${_name}-$pkgver"
  export SETUPTOOLS_SCM_PRETEND_VERSION=$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
}