summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJonathan Yantis2015-06-11 08:58:03 -0700
committerJonathan Yantis2015-06-11 08:58:03 -0700
commit1abe2c82d97c9225dc2c979f4104d5c775d0ec77 (patch)
tree8795ba7adc886c32613c338b31c3a301e381d070 /PKGBUILD
downloadaur-python2-nameparser.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..462f5700f71
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: jyantis <yantis@yantis.net>
+
+pkgname=python2-nameparser
+pkgver=v0.3.3
+pkgrel=1
+pkgdesc='A simple Python 2 module for parsing human names into their individual components'
+arch=('any')
+url='https://github.com/derek73/python-nameparser'
+license=('custom')
+depends=('python2')
+source=('https://pypi.python.org/packages/source/n/nameparser/nameparser-0.3.3.tar.gz')
+md5sums=('eee37936846c38781b00654e59f6e372')
+makedepends=('python2-setuptools')
+provides=('python2-nameparser')
+conflicts=('python2-nameparser')
+
+build() {
+ cd nameparser-0.3.3
+
+ # Patch any #!/usr/bin/python to #!/usr/bin/python2
+ for file in $(find . -name '*.py' -print); do
+ sed -r -i 's_^#!.*/usr/bin/python(\s|$)_#!/usr/bin/python2_' $file
+ sed -r -i 's_^#!.*/usr/bin/env(\s)*python(\s|$)_#!/usr/bin/env python2_' $file
+ done
+
+ python2 setup.py build
+}
+
+check() {
+ cd nameparser-0.3.3
+ python2 setup.py test --verbose
+}
+
+package() {
+ cd nameparser-0.3.3
+
+ python2 setup.py install --root="${pkgdir}" --optimize=1
+
+ # Install License
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # Install Documentation
+ install -D -m644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
+}
+
+# vim:set ts=2 sw=2 et: