summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 94bd4293ea966e9f336dd17d48659acda0560edc (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
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-pipreqs
pkgver=0.4.13
pkgrel=2
pkgdesc="Pip requirements.txt generator based on imports in project"
url="https://github.com/bndr/pipreqs"
license=('MIT')
arch=('any')
depends=('python-docopt' 'python-yarg')
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
source=("$pkgname-$pkgver.tar.gz::https://github.com/bndr/pipreqs/archive/v$pkgver.tar.gz")
sha512sums=('f5a1c384017d9194c353d4cee021e3d994ae2d1426ef24bff2daf4a79f576bf04b2d8dd4b81f76b8715c8398fe5a308c51e4cb13dd66870ff006247295199ae3')

build() {
  cd pipreqs-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd pipreqs-$pkgver
  python -m unittest -v
}

package() {
  cd pipreqs-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}