addpkg: python-oyaml 1.0-3

This commit is contained in:
George Rawlinson 2021-11-29 06:00:53 +00:00
parent 839c012f8a
commit fa7472bcd4
Signed by: grawlinson
GPG key ID: E0959FEA8B550539

40
python-oyaml/PKGBUILD Normal file
View file

@ -0,0 +1,40 @@
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Morteza NourelahiAlamdari <m@0t1.me>
# Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz>
pkgname=python-oyaml
_pkgname="${pkgname#python-}"
pkgver=1.0
pkgrel=3
pkgdesc="A drop-in replacement for PyYAML which preserves dict ordering"
arch=('any')
url="https://github.com/wimglenn/oyaml"
license=('MIT')
depends=('python' 'python-yaml')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('19bd3dda42b4bb8be2d3ed50b4bd5327eb667f1ab701fe5d7aa07da31aee2b05c09eb31f96087c9f773fd38243edc858f50ddbd79878208f6c9921c4783b1f45')
b2sums=('50d8a4199d59b2b0fc129927fefa7444bb1fa25e40f112a74df84035fcf54615bc838d23dff897f2dccff3016a434b82f8c910c53ffc9707c44083336a457e88')
build() {
cd "$_pkgname-$pkgver"
python setup.py build
}
check() {
cd "$_pkgname-$pkgver"
pytest
}
package() {
cd "$_pkgname-$pkgver"
python setup.py install --root="$pkgdir" --optimize=1
# documentation
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.rst
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}