archrelease: copy trunk to extra-x86_64
[arch-packages.git] / python-csv23 / trunk / PKGBUILD
blob76e6ffa85416ca144f845655b939b7496b1d1467
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-csv23
4 pkgver=0.3.2
5 pkgrel=6
6 pkgdesc="Python 3 unicode CSV compatibility layer"
7 url="https://github.com/xflr6/csv23"
8 license=('MIT')
9 arch=('any')
10 depends=('python')
11 makedepends=('python-setuptools')
12 checkdepends=('python-pytest' 'python-mock' 'python-pytest-mock')
13 source=("$pkgname-$pkgver.tar.gz::https://github.com/xflr6/csv23/archive/v$pkgver.tar.gz"
14         $pkgname-python310.patch::https://github.com/xflr6/csv23/compare/v0.3.2..9dfb3389bd8d.patch)
15 sha512sums=('289386cce5de4ae5bc42fc56d1639bbd1483034e5422f63142c1d188de735b1f5f18f9f69e3cb96f4ac3e1d7d0b371b1c45e720982c4f4b539fcf0d2da893f6a'
16             '443422d055cf6a2a1ec5316fa33c13caaf9269902958ad2b43e6976f7591bb578597a6f3d6283e1ec760bb552698256d3eb9a3ca76c0c15591b20cca786d11e7')
18 prepare() {
19   cd csv23-$pkgver
20   patch -Np1 -i ../$pkgname-python310.patch || :
21   sed -i '/--cov/d' setup.cfg
24 build() {
25   cd csv23-$pkgver
26   python setup.py build
29 check() {
30   cd csv23-$pkgver
31   python -m pytest
34 package() {
35   cd csv23-$pkgver
36   python setup.py install --root="$pkgdir" --optimize=1
38   install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt