upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-oyaml / trunk / PKGBUILD
blob1a1970c7bb98d3b18997c1001a338a5773fc9e87
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Contributor: Morteza NourelahiAlamdari <m@0t1.me>
3 # Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz>
5 pkgname=python-oyaml
6 _pkgname="${pkgname#python-}"
7 pkgver=1.0
8 pkgrel=5
9 pkgdesc="A drop-in replacement for PyYAML which preserves dict ordering"
10 arch=('any')
11 url="https://github.com/wimglenn/oyaml"
12 license=('MIT')
13 depends=('python' 'python-yaml')
14 makedepends=('git' 'python-setuptools')
15 checkdepends=('python-pytest')
16 _commit='45bef7ee676e30a68a122fbac9801727e0064aab' # v1.0
17 source=("$pkgname::git+$url.git#commit=$_commit")
18 b2sums=('SKIP')
20 pkgver() {
21   cd "$pkgname"
23   git describe --tags | sed 's/^v//'
26 prepare() {
27   cd "$pkgname"
29   # backport usage of yaml's safe_load function
30   git cherry-pick --no-commit 7381373cec378a464e1cf4ca8b03c6cb8493469b
33 build() {
34   cd "$pkgname"
36   python setup.py build
39 check() {
40   cd "$pkgname"
42   pytest 
45 package() {
46   cd "$pkgname"
48   python setup.py install --root="$pkgdir" --optimize=1
50   # documentation
51   install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.rst
53   # license
54   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE