summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4f3a588cde412b9d8c6d9b7cbe6e40cc2b6341d8 (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
# Maintainer: Kristóf Marussy <kristof@marussy.com>
# Contributor: Byeonghoon Yoo <bh322yoo@gmail.com>

_pkgname=cleo
pkgname=python-cleo-git
pkgver=1.0.0a1.r1.ga772384
pkgrel=2
pkgdesc="Cleo allows you to create beautiful and testable command-line interfaces."
arch=('any')
provides=("python-cleo")
conflicts=('python-cleo')
url="https://github.com/sdispater/${_pkgname}"
license=('MIT')
depends=('python-pylev>=1.3' 'python-pylev<2.0' 'python-crashtest>=0.3.0' 'python-crashtest<0.4.0' 'python>=3.6' 'python<4.0')
makedepends=('git' 'python-dephell')
source=("${_pkgname}::git+${url}")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${_pkgname}"
    git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
    cd "${srcdir}"/${_pkgname}

    # poetry-generated setup.py are fatally broken, see:
    # https://github.com/sdispater/poetry/issues/866
    dephell deps convert --from pyproject.toml --to setup.py
}

build(){
  cd "${srcdir}"/${_pkgname}
  python setup.py build
}

package() {
  cd "${srcdir}"/${_pkgname}
  python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}