Unverified Commit 5edf5392 authored by prspkt's avatar prspkt

testing/py-colorama: drop python2

parent 012ea202
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-colorama
pkgname=py3-colorama
_pkgname=colorama
pkgver=0.4.1
pkgrel=0
pkgrel=1
pkgdesc="Simple cross-platform colored terminal text"
options="!check" # 2 Tests fail on drone-ci
url="https://pypi.python.org/pypi/colorama"
arch="noarch"
license="BSD-3-Clause"
makedepends="py-setuptools py3-setuptools"
checkdepends="py2-mock py3-mock"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-mock"
source="$pkgname-$pkgver.tar.gz::https://github.com/tartley/colorama/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
replaces=py-colorama # Backwards compatibility
provides=py-colorama=$pkgver-r$pkgrel # Backwards compatibility
build() {
python2 setup.py build
python3 setup.py build
}
check() {
python2 -m unittest discover -p *_test.py
python3 -m unittest discover -p *_test.py
}
package() {
mkdir -p "$pkgdir"
}
_py2() {
replaces="$pkgname"
_py python2
}
_py3() {
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="006069859ca05ec8a6808860ca73ab541b246e6e6443b1bc8426973beaa5268660b48994f21edb6492fe97c4b9d29949b874b861ec200b1756d40e8abda8dee0 py-colorama-0.4.1.tar.gz"
sha512sums="006069859ca05ec8a6808860ca73ab541b246e6e6443b1bc8426973beaa5268660b48994f21edb6492fe97c4b9d29949b874b861ec200b1756d40e8abda8dee0 py3-colorama-0.4.1.tar.gz"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment