summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2718b58cd3d7ef3f1de80a2942f014fb758f06ef (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Blair Bonnett <blair.bonnett@gmail.com>
# Contributor: Anthony Wang <ta180m@pm.me>
# Contributor: Tommy Li <ttoo74@gmail.com>

pkgname=python-certipy
pkgver=0.2.2
pkgrel=1
pkgdesc="A simple python tool for creating certificate authorities and certificates on the fly"
arch=(any)
url="https://github.com/LLNL/certipy"
license=('BSD-3-Clause')

depends=(
  python
  python-cryptography
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-setuptools-scm
)
checkdepends=(
  python-flask
  python-pytest
  python-requests
)

_name=${pkgname#python-}
source=(
  "https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
)
sha256sums=(
  'fef1f3d8819ee29c4c67719171c988302823dfe0b6cfbb47d249f374809ba05e'
)

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

check() {
  cd "$_name-$pkgver"
  python -m pytest
}

package() {
  cd "$_name-$pkgver"
  python -m installer --destdir="$pkgdir" "dist/$_name-$pkgver-"*.whl
  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE

  # Don't include tests in final package.
  rm -r "$pkgdir/usr/lib/"python*"/site-packages/certipy/test"
}