# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python2-zipp
pkgver=1.1.1
pkgrel=1
epoch=1
pkgdesc="Pathlib-compatible object wrapper for zip files"
url="https://github.com/jaraco/zipp"
license=('MIT')
arch=('any')
depends=('python2-contextlib2')
makedepends=('python2-setuptools-scm' 'python2-toml')
source=("$pkgname-$pkgver.tar.gz::https://github.com/jaraco/zipp/archive/v$pkgver.tar.gz")
sha512sums=('c82dc9c74ecc0530d051dd459ab0abbf95e26a1c9ddae4152cdcfe1b5fd7ef977990947433b2c1ecd98a6037a5b1ebc8a96d3a649a1397437802e65f2ae41222')

export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver

build() {
  cd zipp-$pkgver
  python2 setup.py build
}

package() {
  cd zipp-$pkgver
  python2 setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
