archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-xlsxwriter / trunk / PKGBUILD
blob0c08bddc44ad48c4b4aa8ba7dc14b8e24e045aff
1 # Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
2 # Contributor: George Rawlinson <grawlinson@archlinux.org>
4 pkgname=python-xlsxwriter
5 pkgver=3.1.0
6 pkgrel=1
7 pkgdesc='A Python module for creating Excel XLSX files'
8 arch=('any')
9 url='https://github.com/jmcnamara/XlsxWriter'
10 license=('BSD')
11 depends=('python')
12 makedepends=(
13   'git'
14   'python-build'
15   'python-installer'
16   'python-wheel'
17   'python-setuptools'
19 _commit='f6c4ff2335a6439b800c45750ab840e560585cce'
20 source=("$pkgname::git+$url#commit=$_commit")
21 b2sums=('SKIP')
23 pkgver() {
24   cd "$pkgname"
26   git describe --tags | sed 's/^RELEASE_//'
29 build() {
30   cd "$pkgname"
32   python -m build --wheel --no-isolation
35 check() {
36   cd "$pkgname"
38   python -m unittest discover
41 package() {
42   cd "$pkgname"
44   python -m installer --destdir="$pkgdir" dist/*.whl
46   # license
47   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt