[arch-commits] Commit in (4 files)
Daniel M. Capella
polyzen at archlinux.org
Sun Nov 22 01:26:56 UTC 2020
Date: Sunday, November 22, 2020 @ 01:26:56
Author: polyzen
Revision: 758743
Add python-pdftotext
Added:
python-pdftotext/
python-pdftotext/repos/
python-pdftotext/trunk/
python-pdftotext/trunk/PKGBUILD
----------+
PKGBUILD | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
Added: python-pdftotext/trunk/PKGBUILD
===================================================================
--- python-pdftotext/trunk/PKGBUILD (rev 0)
+++ python-pdftotext/trunk/PKGBUILD 2020-11-22 01:26:56 UTC (rev 758743)
@@ -0,0 +1,35 @@
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+# Contributor: Shane Stone <shanewstone at gmail>
+
+_name=pdftotext
+pkgname=python-pdftotext
+pkgver=2.1.5
+pkgrel=1
+pkgdesc='Simple PDF text extraction'
+arch=('x86_64')
+url=https://github.com/jalan/pdftotext
+license=('MIT')
+depends=('poppler' 'python')
+makedepends=('python-setuptools')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
+sha256sums=('98aeb8b07a4127e1a30223bd933ef080bbd29aa88f801717ca6c5618380b8aa6')
+b2sums=('35f5eeee4d278d15fb79a1efcd0576ab3a6188e2d440e4606c57335666877fed3fa3364beee9891e39b9dcd9fc7bd299e944a5342bd1267326a0b43a91e27376')
+
+build() {
+ cd $_name-$pkgver
+ python setup.py build
+}
+
+check() {
+ cd $_name-$pkgver
+ mkdir -p temp
+ local sitepackages=$(python -c "import site; print(site.getsitepackages()[0])")
+ python setup.py install --skip-build --root=temp
+ PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$sitepackages" python -m unittest discover tests
+}
+
+package() {
+ cd $_name-$pkgver
+ python setup.py install --skip-build --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
More information about the arch-commits
mailing list