desktop/python-tqdm/PKGBUILD
2017-11-25 16:42:10 +01:00

41 lines
1.1 KiB
Bash

pkgbase=tqdm
pkgname=(python3-${pkgbase} python2-${pkgbase})
pkgver=4.19.4
pkgrel=1
pkgdesc="Simple Python Progress Meter"
arch=('any')
url="https://pypi.python.org/pypi/tqdm"
license=('MIT')
makedepends=('python3-setuptools' 'python2-setuptools' 'python2' 'python3')
options=('!emptydirs')
source=(https://github.com/tqdm/tqdm/archive/v$pkgver.tar.gz)
sha512sums=('56d1f2cd8f7a56964611f0399c6f8f6c64740428e38ebde6778397340b57787a3409de2755269c1a26db38cd85ddf3c90636a36d742eb2b51d8736e5ad6c5989')
prepare() {
cp -a "${srcdir}/${pkgbase}-${pkgver}"{,-py2}
}
build() {
cd "${srcdir}/${pkgbase}-${pkgver}"
python3 setup.py build
cd "${srcdir}/${pkgbase}-${pkgver}-py2"
python2 setup.py build
}
package_python3-tqdm() {
depends=('python3')
cd "${srcdir}/${pkgbase}-${pkgver}"
python3 setup.py install --root="${pkgdir}" --optimize=1
mv "$pkgdir"/usr/bin/tqdm{,-python3}
}
package_python2-tqdm() {
depends=('python2')
cd "${srcdir}/${pkgbase}-${pkgver}-py2"
python2 setup.py install --root="${pkgdir}" --optimize=1
mv "$pkgdir"/usr/bin/tqdm{,-python2}
ln -s tqdm-python2 "$pkgdir"/usr/bin/tqdm
}