summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 658e8166e7979619fdc7c3d3e9aee47e06a121c2 (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
# Maintainer: Donald Webster <fryfrog@gmail.com
# Contributor: Dylan Whichard <dylan@whichard.com>

pkgname=('python-schedule' 'python2-schedule')
_name=${pkgname#python-}
pkgver=0.6.0
pkgrel=1
pkgdesc='Python job scheduling for humans.'
arch=('any')
url="https://github.com/dbader/schedule"
license=('MIT')
makedepends=('python-setuptools'
             'python2-setuptools')
checkdepends=('python-pytest'
              'python-mock'
              'python2-pytest'
              'python2-mock')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
sha512sums=('0a2704055c7f2b3bbf08582a7f099b5118b0e97e39cda0a299b66620ab17cedb63c44e7bda7d3480649c8b4d609f3e051f8111e7370c39210c305444c287ae93')

prepare() {
  cp -a schedule-${pkgver}{,-py2}
}

check() {
  cd "$srcdir"/schedule-${pkgver}
  python setup.py test

  cd "$srcdir"/schedule-${pkgver}-py2
  python2 setup.py test
}

package_python-schedule() {
  depends=('python')
  cd "${srcdir}/schedule-${pkgver}"
  python setup.py install --root="${pkgdir}" --optimize=1
}

package_python2-schedule() {
  depends=('python2')
  cd "${srcdir}/schedule-${pkgver}-py2"
  python2 setup.py install --root="${pkgdir}" --optimize=1
}