summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 601326baff57978aa3307c7ae4f615e3b6bb04ec (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
# Maintainer: Danilo J. S. Bellini <danilo dot bellini at gmail dot com>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrzej Giniewicz <gginiu@gmail.com>
pkgname=python2-configparser
_name=${pkgname#python2-}
pkgver=4.0.2
pkgrel=3
pkgdesc='Backports of the configparser module'
arch=('any')
_pypi='https://pypi.python.org'
url="$_pypi/pypi/$_name"
depends=('python2-backports')
makedepends=('python2-setuptools-scm')
license=('MIT')
source=("$_pypi/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('c7d282687a5308319bf3d2e7706e575c635b0a470342641c93bea0ea3b5331df')

prepare() {
  cd "$srcdir/$_name-$pkgver"
  find -name "*.py*" -exec sed -i '1s/python\s*$/python2/' '{}' \;
}

build() {
  cd "$srcdir/$_name-$pkgver"
  python2 setup.py build
}

package() {
  cd "$srcdir/$_name-$pkgver"
  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
  find "$pkgdir" -path '*/backports/__init__.py*' -delete
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}