summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorHans-Nikolai Viessmann2018-08-14 11:09:29 +0100
committerHans-Nikolai Viessmann2018-08-14 11:09:29 +0100
commiteab6730fdb8329bfe54b3ef695d1ba54c1d29dff (patch)
tree827da029d5d9c8d40a1cce72626a76651dc40987 /PKGBUILD
downloadaur-eab6730fdb8329bfe54b3ef695d1ba54c1d29dff.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD29
1 files changed, 29 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7d7c265aadfb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Hans-Nikolai Viessmann <hans AT viess.mn>
+pkgname=python-dateutils
+_pkgname=dateutils
+pkgver=0.6.6
+pkgrel=1
+pkgdesc="Utilities for working with datetime objects."
+arch=('any')
+url="https://github.com/plytophogy/python-dateutils"
+license=('BSD')
+depends=('python-dateutil' 'python-argparse' 'python-pytz')
+source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
+sha256sums=('c94a8e77d743abac79ed91f99f5ef594a972a527e05145cbb7aba59beced8a71')
+
+prepare() {
+ cd "${_pkgname}-${pkgver}"
+ # for some reason the PyPi version is missing some fixes found in the repo to make it python3 compatible.
+ sed -e 's/print dt.strftime(args.format)/print(dt.strftime(args.format))/' -i "${_pkgname}/dateadd.py"
+ sed -e 's/print __import__(args.unit)(end_dt, start_dt, \*\*kwargs)/print(__import__(args.unit)(end_dt, start_dt, \*\*kwargs))/' -i "${_pkgname}/datediff.py"
+}
+
+build() {
+ cd "${_pkgname}-${pkgver}"
+ /usr/bin/python setup.py build
+}
+
+package() {
+ cd "${_pkgname}-${pkgver}"
+ /usr/bin/python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+}