summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCaleb Maclennan2021-08-05 11:52:10 +0300
committerCaleb Maclennan2021-08-05 11:52:10 +0300
commit7d8ed37b500335c781d1885b254503b2b15b3f97 (patch)
tree0588ea8170c190f379b8cf822ac12b7c28284c85 /PKGBUILD
parenteecde50fb9bd2ce9c0b7ca433a81020c16b69c72 (diff)
downloadaur-7d8ed37b500335c781d1885b254503b2b15b3f97.tar.gz
upgpkg: python-agate-excel 0.2.4-3
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD54
1 files changed, 26 insertions, 28 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6e4d8bd10557..92fa96057bc1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,51 +1,49 @@
-# Maintainer: Gabriel Magno <gabrielmagno1@gmail.com>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
+# Contributor: Gabriel Magno <gabrielmagno1@gmail.com>
# Contributor: Michał Pałubicki <maln0ir@gmx.com>
-# The upstream test suite requires an outdated version of python-parsedatetime
-# no longer available on Arch. Since the test suite is mostly for upstream
-# regressions (not packaging), skipping it is in most users’ best interest.
-BUILDENV+=(!check)
-
-_pkgname=agate-excel
-pkgname=python-$_pkgname
+_pyname=agate-excel
+pkgname=python-$_pyname
pkgver=0.2.4
-pkgrel=2
+pkgrel=3
pkgdesc='Adds read support for Excel files (xls and xlsx) to agate'
arch=(any)
-url='https://agate-excel.readthedocs.org/'
+url="https://$_pyname.readthedocs.org/"
license=(MIT)
+_pydeps=('agate>=1.5.0'
+ olefile
+ openpyxl
+ six # Upstream Issue: https://github.com/wireservice/agate-excel/issues/46
+ sphinx_rtd_theme
+ xlrd)
depends=(python
- 'python-agate>=1.5.0'
- python-olefile
- 'python-openpyxl>=2.3.0'
- 'python-sphinx_rtd_theme>=0.1.6'
- 'python-xlrd>=0.9.4')
+ "${_pydeps[@]/#/python-}")
makedepends=(python-setuptools
- 'python-sphinx>=1.2.2')
-checkdepends=(python-nose
- 'python-parsedatetime<2.5'
- python-six)
-source=("$_pkgname-$pkgver.tar.gz::https://github.com/wireservice/agate-excel/archive/${pkgver}.tar.gz")
+ python-sphinx)
+checkdepends=(python-pytest)
+_archive="$_pyname-$pkgver"
+source=("$_archive.tar.gz::https://github.com/wireservice/$_pyname/archive/$pkgver.tar.gz")
sha256sums=('5316f158d4df81d5b6e06d4116c1fd47e76ee1f02a6cae116d65fdf6fae532c8')
build() {
- cd "$_pkgname-$pkgver"
+ cd "$_archive"
+ export PYTHONHASHSEED=0
python setup.py build
python setup.py build_sphinx
_rtd_theme_path="$(python -c 'import sphinx_rtd_theme; print(sphinx_rtd_theme.get_html_theme_path())')"
- rm -rvf "build/sphinx/html/_static"
- ln -svf "$_rtd_theme_path/sphinx_rtd_theme/static" "build/sphinx/html/_static"
+ rm -rvf build/sphinx/html/_static
+ ln -svf "$_rtd_theme_path/sphinx_rtd_theme/static" build/sphinx/html/_static
}
check() {
- cd "$_pkgname-$pkgver"
- python setup.py test
+ cd "$_archive"
+ pytest tests
}
package() {
- cd "$_pkgname-$pkgver"
+ cd "$_archive"
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
- mkdir -p "$pkgdir/usr/share/doc"
- cp -rv "build/sphinx/html" "$pkgdir/usr/share/doc/$pkgname"
+ install -dm0755 "$pkgdir/usr/share/doc/"
+ cp -rv build/sphinx/html "$pkgdir/usr/share/doc/$pkgname"
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING
}