summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Webster2019-07-22 09:28:16 -0700
committerDonald Webster2019-07-22 09:28:16 -0700
commit4a4ebeb79d03d446ddd4e2489c21e8d3aa20773e (patch)
tree622711c8bcfd26f41adf5e3a72a6ba22f16636bc
parentbc866c6ff1dd6d162144ff0704a044ea933989c7 (diff)
downloadaur-4a4ebeb79d03d446ddd4e2489c21e8d3aa20773e.tar.gz
Add check() and fix depends.
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD26
2 files changed, 26 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 251be6dd516..f7f6b56c7e2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,13 +5,18 @@ pkgbase = python-schedule
url = https://github.com/dbader/schedule
arch = any
license = MIT
+ checkdepends = python-pytest
+ checkdepends = python-mock
+ checkdepends = python2-pytest
+ checkdepends = python2-mock
makedepends = python-setuptools
makedepends = python2-setuptools
- depends = python>=2.3
source = https://files.pythonhosted.org/packages/source/s/schedule/schedule-0.6.0.tar.gz
sha256sums = f9fb5181283de4db6e701d476dd01b6a3dd81c38462a54991ddbb9d26db857c9
pkgname = python-schedule
+ depends = python
pkgname = python2-schedule
+ depends = python2
diff --git a/PKGBUILD b/PKGBUILD
index 70b5db74c29..e9a97518c0e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,8 +9,12 @@ pkgdesc='Python job scheduling for humans.'
arch=('any')
url="https://github.com/dbader/schedule"
license=('MIT')
-depends=('python>=2.3')
-makedepends=('python-setuptools' 'python2-setuptools')
+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")
sha256sums=('f9fb5181283de4db6e701d476dd01b6a3dd81c38462a54991ddbb9d26db857c9')
@@ -26,12 +30,22 @@ build() {
python2 setup.py build
}
+check() {
+ cd "$srcdir"/schedule-${pkgver}
+ python setup.py test
+
+ cd "$srcdir"/schedule-${pkgver}-py2
+ python2 setup.py test
+}
+
package_python-schedule() {
- cd "${srcdir}/schedule-${pkgver}"
- python setup.py install --root="$pkgdir" --optimize=1
+ depends=('python')
+ cd "${srcdir}/schedule-${pkgver}"
+ python setup.py install --root="$pkgdir" --optimize=1
}
package_python2-schedule() {
- cd "${srcdir}/schedule-${pkgver}-py2"
- python2 setup.py install --root="$pkgdir" --optimize=1
+ depends=('python2')
+ cd "${srcdir}/schedule-${pkgver}-py2"
+ python2 setup.py install --root="$pkgdir" --optimize=1
}