[arch-commits] Commit in python-oyaml/repos (community-any community-any/PKGBUILD)
George Rawlinson
grawlinson at gemini.archlinux.org
Sun Feb 20 06:34:20 UTC 2022
Date: Sunday, February 20, 2022 @ 06:34:20
Author: grawlinson
Revision: 1135216
archrelease: copy trunk to community-any
Added:
python-oyaml/repos/community-any/
python-oyaml/repos/community-any/PKGBUILD
(from rev 1135215, python-oyaml/trunk/PKGBUILD)
----------+
PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
Copied: python-oyaml/repos/community-any/PKGBUILD (from rev 1135215, python-oyaml/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2022-02-20 06:34:20 UTC (rev 1135216)
@@ -0,0 +1,55 @@
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+# Contributor: Morteza NourelahiAlamdari <m at 0t1.me>
+# Contributor: Caltlgin Stsodaat <contact at fossdaily.xyz>
+
+pkgname=python-oyaml
+_pkgname="${pkgname#python-}"
+pkgver=1.0
+pkgrel=4
+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
+}
More information about the arch-commits
mailing list