Commit e369c1fd authored by Leo's avatar Leo Committed by Kevin Daudt

main/py3-yaml: drop py2

Closes !169
parent a07b851a
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-yaml
pkgname=py3-yaml
_pkgname=PyYAML
pkgver=5.1.2
pkgrel=0
pkgdesc="Python bindings for YAML"
pkgrel=1
pkgdesc="Python3 bindings for YAML"
url="http://pyyaml.org"
arch="all"
license="MIT"
makedepends="python2-dev python3-dev yaml-dev cython2 cython3"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
makedepends="python3-dev yaml-dev cython3"
source="$_pkgname-$pkgver.tar.gz::https://github.com/yaml/pyyaml/archive/$pkgver.tar.gz"
builddir="$srcdir/pyyaml-$pkgver"
replaces="py-yaml" # Backwards compatibility
provides="py-yaml=$pkgver-r$pkgrel" # Backwards compatibility
prepare() {
cd "$builddir"
default_prepare
......@@ -22,36 +24,17 @@ prepare() {
build() {
cd "$builddir"
python2 setup.py --with-libyaml build
python3 setup.py --with-libyaml build
}
check() {
cd "$builddir"
python2 setup.py test
python3 setup.py test
}
package() {
mkdir -p "$pkgdir"
}
_py2() {
replaces="$pkgname"
_py python2
}
_py3() {
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $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="7bc3dceadcfd512ede67581625887d00822464f20d3b646904f4a73afce8cf3b9766829c6004b626c31757edf8e2eedc27e60d96bee13afa68d3296a8a7f33bb PyYAML-5.1.2.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