summarylogtreecommitdiffstats
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
downloadaur-eab6730fdb8329bfe54b3ef695d1ba54c1d29dff.tar.gz
initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD29
2 files changed, 44 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..628eb7d626ea
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = python-dateutils
+ pkgdesc = Utilities for working with datetime objects.
+ pkgver = 0.6.6
+ pkgrel = 1
+ url = https://github.com/plytophogy/python-dateutils
+ arch = any
+ license = BSD
+ depends = python-dateutil
+ depends = python-argparse
+ depends = python-pytz
+ source = https://files.pythonhosted.org/packages/source/d/dateutils/dateutils-0.6.6.tar.gz
+ sha256sums = c94a8e77d743abac79ed91f99f5ef594a972a527e05145cbb7aba59beced8a71
+
+pkgname = python-dateutils
+
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
+}