Files
MSYS2-packages/python-colorama/PKGBUILD
Christoph Reiter a58271b395 Make pkgbase of all packages match the name of the PKGBUILD directory
Similar to https://github.com/Alexpux/MINGW-packages/pull/2878
this adjusts the pkgbase names of all packages to match the directory
name the PKGBUILD is in.

The motivation for this is to provide links to PKGBUILD sources and
git history from the web interface.

The "dwz" directory is deleted as it just contains an older copy of the
elfutils PKGBUILD (elfutils isn't in the repo)
2018-01-28 08:43:40 +01:00

60 lines
1.5 KiB
Bash

# ArchLinux:
# Maintainer: Alexander Duscheleit <jinks@archlinux.us>
# MSYS2:
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
_pyname=colorama
pkgbase="python-${_pyname}"
pkgname=(python2-${_pyname} python3-${_pyname})
pkgver=0.3.9
pkgrel=1
pkgdesc="Python API for cross-platform colored terminal text."
arch=('any')
url="https://pypi.python.org/pypi/colorama"
license=('BSD')
makedepends=('python2' 'python3' 'git')
checkdepends=('python3-mock' 'python2-mock')
source=(https://pypi.python.org/packages/source/c/colorama/colorama-${pkgver}.tar.gz)
sha256sums=('48eb22f4f8461b1df5734a074b57042430fb06e1d61bd1e11b078c0fe6d7a1f1')
prepare() {
for pver in {3,2}; do
rm -rf python${pver} || true
cp -r ${_pyname}-${pkgver} python${pver}
done
}
build() {
for pver in {3,2}; do
cd "$srcdir/python${pver}"
/usr/bin/python${pver} setup.py build
done
}
check() {
for pver in {3,2}; do
msg "Python ${pver} test"
cd "${srcdir}/python${pver}"
/usr/bin/python${pver}.exe -m unittest discover -p *_test.py || warning "test failed"
done
}
package_python2-colorama() {
depends=('python2')
cd ${srcdir}/python2
/usr/bin/python2 setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
package_python3-colorama() {
depends=('python3')
cd ${srcdir}/python3
/usr/bin/python3 setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}
# vim:set ts=2 sw=2 et: