Date: Thursday, April 6, 2023 @ 12:59:28
  Author: felixonmars
Revision: 1438733

archrelease: copy trunk to community-staging-any

Added:
  python-oyaml/repos/community-staging-any/
  python-oyaml/repos/community-staging-any/PKGBUILD
    (from rev 1438732, python-oyaml/trunk/PKGBUILD)

----------+
 PKGBUILD |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

Copied: python-oyaml/repos/community-staging-any/PKGBUILD (from rev 1438732, 
python-oyaml/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-06 12:59:28 UTC (rev 1438733)
@@ -0,0 +1,55 @@
+# Maintainer: George Rawlinson <[email protected]>
+# Contributor: Morteza NourelahiAlamdari <[email protected]>
+# Contributor: Caltlgin Stsodaat <[email protected]>
+
+pkgname=python-oyaml
+_pkgname="${pkgname#python-}"
+pkgver=1.0
+pkgrel=5
+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=('git' 'python-setuptools')
+checkdepends=('python-pytest')
+_commit='45bef7ee676e30a68a122fbac9801727e0064aab' # v1.0
+source=("$pkgname::git+$url.git#commit=$_commit")
+b2sums=('SKIP')
+
+pkgver() {
+  cd "$pkgname"
+
+  git describe --tags | sed 's/^v//'
+}
+
+prepare() {
+  cd "$pkgname"
+
+  # backport usage of yaml's safe_load function
+  git cherry-pick --no-commit 7381373cec378a464e1cf4ca8b03c6cb8493469b
+}
+
+build() {
+  cd "$pkgname"
+
+  python setup.py build
+}
+
+check() {
+  cd "$pkgname"
+
+  pytest 
+}
+
+package() {
+  cd "$pkgname"
+
+  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
+}

Reply via email to