diff options
author | TioDuke | 2016-01-17 18:46:46 -0500 |
---|---|---|
committer | TioDuke | 2016-01-17 18:46:46 -0500 |
commit | cb2049d67fd48a312772817f8317cd2ed5c84602 (patch) | |
tree | 531a26d6048b0c29bcd9bcef0d0705fec0d92424 | |
download | aur-cb2049d67fd48a312772817f8317cd2ed5c84602.tar.gz |
create new package
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 34 | ||||
-rw-r--r-- | python3-compat.patch | 15 |
3 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..53550c7c74d4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +# Generated by mksrcinfo v8 +# Sun Jan 17 23:34:43 UTC 2016 +pkgbase = python-habitica + pkgdesc = Commandline interface to Habitica. + pkgver = 0.0.12 + pkgrel = 1 + url = https://github.com/philadams/habitica + arch = any + license = MIT + makedepends = git + makedepends = python-setuptools + depends = python + depends = python-docopt + depends = python-requests + source = git+https://github.com/philadams/habitica.git#branch=master + source = python3-compat.patch + md5sums = SKIP + md5sums = 9cff7cfe5d8ad78c92971ec73b56a509 + +pkgname = python-habitica + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ee7af967764f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,34 @@ +# Contributor: Sergio Tridente <tioduke at gmail dot com> + +_pkgname=habitica +pkgname=python-habitica +pkgver=0.0.12 +pkgrel=1 +pkgdesc="Commandline interface to Habitica." +arch=('any') +url="https://github.com/philadams/habitica" +license=('MIT') +depends=('python' 'python-docopt' 'python-requests') +makedepends=('git' 'python-setuptools') +source=('git+https://github.com/philadams/habitica.git#branch=master' + python3-compat.patch) +md5sums=('SKIP' + '9cff7cfe5d8ad78c92971ec73b56a509') + + +prepare() { + cd "$srcdir" + patch -p0 -i python3-compat.patch +} + +build() { + cd "$srcdir/${_pkgname}" + python setup.py build +} + +package() { + cd "$srcdir/${_pkgname}" + python setup.py install --skip-build --root="$pkgdir" --optimize=1 + install -Dm644 README.md "$pkgdir"/usr/share/doc/${_pkgname}/README.txt + install -Dm644 netrc.sample "$pkgdir"/usr/share/examples/${_pkgname}/netrc.sample +} diff --git a/python3-compat.patch b/python3-compat.patch new file mode 100644 index 000000000000..fd4bb45253e8 --- /dev/null +++ b/python3-compat.patch @@ -0,0 +1,15 @@ +--- habitica/habitica/core.py 2016-01-17 18:01:28.432752091 -0500 ++++ habitica/habitica/core.py 2016-01-17 18:08:45.399967234 -0500 +@@ -13,7 +13,11 @@ + + + from bisect import bisect +-import ConfigParser ++import sys ++if sys.version < '3': ++ import ConfigParser ++else: ++ import configparser as ConfigParser + import json + import logging + import netrc |