blob: fe0dc404be5fcf676be800c78f37e7c29a94ab21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Gabriel Magno <gabrielmagno1@gmail.com>
# Contributor: Michał Pałubicki <maln0ir@gmx.com>
_pyname=agate-excel
pkgname=python-$_pyname
pkgver=0.2.5
pkgrel=2
pkgdesc='Adds read support for Excel files (xls and xlsx) to agate'
arch=(any)
url="https://$_pyname.readthedocs.org"
license=(MIT)
_pydeps=('agate>=1.5.0'
olefile
openpyxl
six
sphinx_rtd_theme
xlrd)
depends=(python
"${_pydeps[@]/#/python-}")
makedepends=(python-setuptools
python-sphinx)
checkdepends=(python-pytest)
_archive="$_pyname-$pkgver"
source=("$_archive.tar.gz::https://github.com/wireservice/$_pyname/archive/$pkgver.tar.gz")
sha256sums=('aad17edcc99627106e990755cc54e6d8a77452f6f22b30768b35047fbb12c587')
build() {
cd "$_archive"
export PYTHONHASHSEED=0
python setup.py build
python setup.py build_sphinx
local _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
}
check() {
cd "$_archive"
pytest tests
}
package() {
cd "$_archive"
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
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
}
|