description="Python bindings for YAML, using fast libYAML library"
url="http://pyyaml.org/wiki/PyYAML"

contributors="Rems"
packager="tnut <tnut@nutyx.org>"

makedepends=(python python2 yaml cython)

name=python-yaml
version=3.13
release=3

source=(http://pyyaml.org/download/pyyaml/PyYAML-${version}.tar.gz)

build() {

cp -a PyYAML-$version{,-py3}
cp -a PyYAML-$version{,-py2}
cd "PyYAML-$version-py3"
echo -e "Building python3"
python3 setup.py --with-libyaml build
cd ..
cd "PyYAML-$version-py2"
echo -e "Building python3"
python2 setup.py --with-libyaml build
}

package() {
cd "PyYAML-$version-py3"
python3 setup.py  --with-libyaml install --prefix=/usr --root="${PKG}" -O1 --skip-build
cd ..
cd "PyYAML-$version-py2"
python2 setup.py --with-libyaml install --prefix=/usr --root="${PKG}" -O1 --skip-build
}
