summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 831a2bad562737d7603781449b273e1668b718d3 (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
# Maintainer: Claudia Pellegrino <aur ät cpellegrino.de>

pkgname=python-inplace
_gitpkgname=inplace
pkgver=1.0.1
pkgrel=1
pkgdesc='In-place file processing in Python'
arch=('any')
url='https://github.com/jwodder/inplace'
license=('MIT')
depends=(
  'python'
)
makedepends=(
  'python-build'
  'python-hatchling'
  'python-installer'
)

source=(
  "${_gitpkgname}-${pkgver}.tar.gz::https://github.com/jwodder/inplace/archive/v${pkgver}.tar.gz"
)

sha512sums=('71c92f5b9b53996338bb79b2a3184a9299849504d9b6a4fc99849b8e5360c65dc918965c95a6a3127a5e6c36a4d2bf541700c954904ceced271e42b28c714c02')

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

package() {
  cd "${_gitpkgname}-${pkgver}"

  echo >&2 'Packaging the wheel'
  python -I -m installer --destdir="${pkgdir}" dist/*.whl

  echo >&2 'Packaging the documentation'
  install -D -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}" \
    'README.rst'

  echo >&2 'Packaging the license'
  install -D -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" \
    'LICENSE'
}