aboutsummaryrefslogblamecommitdiffstats
path: root/python-arg/PKGBUILD
blob: 51b848297d16a24b41e183297c065417e08ed84d (plain) (tree)
1
2
3
4
5
6
7
8


                                                                
            
        

                                             
                                              



                                                             
                                                                             





         
                         




                             


                                                                   
                         



                                                             


                                                                   
                         

                                                             
# Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@kth.se>
pkgbase=python-arg
pkgname=(python-arg python2-arg)
pkgver=1.0.1
pkgrel=3
pkgdesc="A simple argument parser for Python"
arch=('any')
url="https://codeberg.org/maandree/python-arg"
license=('custom:ISC')
depends=()
makedepends=(python python2)
source=($pkgbase-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz)
sha256sums=(4a48e68ccd1d3b48618204feb9c36744137934d515cc8f5bb98441552a72a00f)

build() {
    true
}

check() {
    cd "$srcdir/$pkgbase"
    make check PYTHON_MAJOR=3
    make check PYTHON_MAJOR=2
}

package_python-arg() {
    pkgdesc="A simple argument parser for Python (Python 3 module)"
    depends=(python)

    cd "$srcdir/$pkgbase"
    make DESTDIR="$pkgdir" PREFIX=/usr PYTHON_MAJOR=3 install
}

package_python2-arg() {
    pkgdesc="A simple argument parser for Python (Python 2 module)"
    depends=(python2)

    cd "$srcdir/$pkgbase"
    make DESTDIR="$pkgdir" PREFIX=/usr PYTHON_MAJOR=2 install
}