summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ac51cc33972954d5c0d00d02c79f6347647a1379 (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: Achmad Fathoni<fathoni.id(at)gmail.com>
pkgname=python-colcon-cd
_name=${pkgname:7}
pkgver=0.2.1
pkgrel=1
pkgdesc="A shell function for colcon-core to change the current working directory."
arch=(any)
url="https://pypi.org/project/$_name"
license=('Apache')
depends=('python-colcon-core')
makedepends=('python-setuptools' 'flake8')
source=(
    https://github.com/colcon/colcon-cd/archive/refs/tags/${pkgver}.tar.gz
    https://github.com/myint/scspell/archive/refs/tags/v2.2.tar.gz)
sha256sums=('91f14108b6f9db780fc5a579b9c809e9a8c62b688e81f2267788fd0e12f178dc'
            '04c6a795a9e0ef4571678eb9fc503bcf39106a975691336af778f31a01027082')

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

check() {
    cd ${srcdir}/${_name}-${pkgver}/test
    export PYTHONPATH="${srcdir}/scspell-2.2"
    ls test*.py | xargs -I {} pytest {}
}

package() {
    cd ${srcdir}/${_name}-${pkgver}
    python -m installer --destdir="${pkgdir}" dist/*.whl
    install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
}