diff options
author | Arun Mahapatra | 2017-12-29 06:05:27 +0530 |
---|---|---|
committer | Arun Mahapatra | 2017-12-29 06:05:27 +0530 |
commit | 578cd77df38217b74c0b7c6abe10a73aed0309f5 (patch) | |
tree | d90bff28ae9aad6845eacc4b0d5a4334ad25326a | |
download | aur-578cd77df38217b74c0b7c6abe10a73aed0309f5.tar.gz |
feat: initial commit for python-tabula.
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | .gitignore | 19 | ||||
-rw-r--r-- | PKGBUILD | 40 |
3 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1a04b56c541c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = python-tabula + pkgdesc = Simple wrapper for tabula, read tables from PDF into DataFrame + pkgver = 1.0.0 + pkgrel = 1 + url = https://github.com/chezou/tabula-py + arch = any + license = MIT + makedepends = python-setuptools + depends = java-runtime + depends = python + depends = python-pandas + depends = python-requests + depends = python-numpy + provides = python-tabula + source = python-tabula-1.0.0.tar.gz::https://github.com/chezou/tabula-py/archive/v1.0.0.tar.gz + sha512sums = 24db1a2df9c247a4fd1523849870e0880c0c1d28099799fedb8d3a520b08dd397282147d4de7ce353ce82d884271c61b4bcfe01dae95b9ed38b804ec3f6be063 + +pkgname = python-tabula + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..92d3543c2fed --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ + +# Created by https://www.gitignore.io/api/archlinuxpackages + +### ArchLinuxPackages ### +*.tar +*.tar.* +*.jar +*.exe +*.msi +*.zip +*.tgz +*.log +*.log.* +*.sig + +pkg/ +src/ + +# End of https://www.gitignore.io/api/archlinuxpackages diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8f5783d00459 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Arun Mahapatra <arun@codito.in> + +pkgname="python-tabula" +pkgdesc='Simple wrapper for tabula, read tables from PDF into DataFrame' +pkgver=1.0.0 +pkgrel=1 +url="https://github.com/chezou/tabula-py" +license=('MIT') +arch=('any') +provides=('python-tabula') +makedepends=('python-setuptools') +depends=('java-runtime' 'python' 'python-pandas' 'python-requests' 'python-numpy') +sourcename="tabula-py" +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") +sha512sums=('24db1a2df9c247a4fd1523849870e0880c0c1d28099799fedb8d3a520b08dd397282147d4de7ce353ce82d884271c61b4bcfe01dae95b9ed38b804ec3f6be063') + +prepare() { + cd "${srcdir}/${sourcename}-${pkgver}" +} + +replace() { + pattern=$1 + substitute=$2 + file=$3 + echo -n "Replacing '$pattern' by '$substitute' in $file..." + if grep -q $pattern $file && sed -i "s/$pattern/$substitute/" $file; then + echo "DONE" + else + echo "FAILED" + depname=$(echo $pattern | sed 's/[>=<].*$//') + echo Current line in $file: + grep $depname $file + exit 1 + fi +} + +package() { + cd "${srcdir}/${sourcename}-${pkgver}" + python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1 +} |