summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Webster2019-06-21 10:33:26 -0700
committerDonald Webster2019-06-21 10:34:21 -0700
commit5ecbda54bcab0850d54fec32bb9ca5958e005c9a (patch)
tree66bfc1f678ad2a8449658ce738098a99d4d2fb74
parent88dafa0cd1a0c61c1e5dd71ecd74a0dba92f28a2 (diff)
downloadaur-5ecbda54bcab0850d54fec32bb9ca5958e005c9a.tar.gz
Make into split package to add python2-schedule, but leave off python2-schedule for now.
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD36
2 files changed, 28 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 543f0441e9c..6effe55f909 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,6 +6,7 @@ pkgbase = python-schedule
arch = any
license = MIT
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
diff --git a/PKGBUILD b/PKGBUILD
index ed39d9850ab..082f7616225 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,36 @@
-# Maintainer: Dylan Whichard <dylan@whichard.com>
-_name=schedule
-pkgname=python-schedule
+# Maintainer: Donald Webster <fryfrog@gmail.com
+# Contributor: Dylan Whichard <dylan@whichard.com>
+
+pkgname=('python-schedule')
pkgver=0.6.0
pkgrel=1
pkgdesc='Python job scheduling for humans.'
arch=('any')
-url="https://github.com/dbader/$_name"
+url="https://github.com/dbader/schedule"
license=('MIT')
depends=('python>=2.3')
-makedepends=('python-setuptools')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+makedepends=('python-setuptools' 'python2-setuptools')
+source=("https://files.pythonhosted.org/packages/source/s/schedule/schedule-${pkgver}.tar.gz")
sha256sums=('f9fb5181283de4db6e701d476dd01b6a3dd81c38462a54991ddbb9d26db857c9')
-package() {
- cd "$srcdir/$_name-$pkgver"
- python setup.py install --root="$pkgdir" --optimize=1 || return 1
+prepare() {
+ cp -a schedule-${pkgver}{,-py2}
+}
+
+build() {
+ cd "$srcdir"/schedule-${pkgver}
+ python setup.py build
+
+ cd "$srcdir"/schedule-${pkgver}-py2
+ python2 setup.py build
+}
+
+package_python-schedule() {
+ 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
}