Date: Friday, November 18, 2022 @ 11:32:26
  Author: dvzrv
Revision: 1349539

upgpkg: ansible-core 2.14.0-2: Rebuild to ease resolvelib upper boundary.

Remove resolvelib version constraint (currently required for 0.9.0):
https://github.com/ansible/ansible/pull/79399/
Switch to PEP517.
Sort dependencies alphabetically.
Add python-pip and python-setuptools to optdepends.
Simplify installation of additional files in package() using install.
Update maintainer info.

Modified:
  ansible-core/trunk/PKGBUILD

----------+
 PKGBUILD |   51 ++++++++++++++++++++++++++++++---------------------
 1 file changed, 30 insertions(+), 21 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-11-18 10:48:53 UTC (rev 1349538)
+++ PKGBUILD    2022-11-18 11:32:26 UTC (rev 1349539)
@@ -1,3 +1,4 @@
+# Maintainer: David Runge <[email protected]>
 # Maintainer: Sven-Hendrik Haase <[email protected]>
 # Contributor: BartÅ‚omiej Piotrowski <[email protected]>
 # Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
@@ -7,42 +8,50 @@
 
 pkgname=ansible-core
 pkgver=2.14.0
-pkgrel=1
+pkgrel=2
 pkgdesc='Radically simple IT automation platform'
 arch=('any')
 url='https://pypi.org/project/ansible-core'
 license=('GPL3')
-depends=('python' 'python-yaml' 'python-paramiko' 'python-jinja' 
'python-resolvelib' 'python-packaging')
-optdepends=('sshpass: for ssh connections with password'
-            'python-passlib: crypt values for vars_prompt'
-            'python-netaddr: for the ipaddr filter'
-            'python-systemd: log to journal'
-            'python-pywinrm: connect to Windows machines'
-            'python-dnspython: for dig lookup'
-            'python-jmespath: json_query support')
-makedepends=('python-setuptools' 'python-straight.plugin' 'python-docutils')
+depends=('python' 'python-jinja' 'python-packaging' 'python-paramiko' 
'python-pyyaml' 'python-resolvelib' 'python-typing-extensions')
+optdepends=(
+  'python-dnspython: for dig lookup'
+  'python-jmespath: json_query support'
+  'python-netaddr: for the ipaddr filter'
+  'python-passlib: crypt values for vars_prompt'
+  'python-pip: for module to manage Python libarary dependencies'
+  'python-pywinrm: connect to Windows machines'
+  'python-setuptools: for module to manage Python libarary dependencies'
+  'python-systemd: log to journal'
+  'sshpass: for ssh connections with password'
+)
+makedepends=('python-build' 'python-docutils' 'python-installer' 
'python-setuptools' 'python-straight.plugin' 'python-wheel')
 provides=('python-ansible' 'ansible-base')
 replaces=('ansible-base')
 backup=('etc/ansible/ansible.cfg')
 
source=("https://pypi.python.org/packages/source/a/ansible-core/ansible-core-${pkgver}.tar.gz";)
 
sha512sums=('09e5b45608f7e1f341100dd89a6277a71a5ff0a45244cd6862a10d0f35a993c3cf649a5f9936ac726f7e903269f98a975804418516e602b8dd983bfca23c66cb')
+b2sums=('7b68d72c292d8f3e8fb2d0d66fce0eca1de1b74ec1dc3ecaa2c4b37177d693567272260b3e98c9d81f7ff5e5cc4972dfa1f24c9f5e0119bb1da528388081d5fb')
 
+prepare() {
+  cd $pkgname-$pkgver
+  # remove the resolvelib upper boundary (at least for < 0.9.0): 
https://github.com/ansible/ansible/pull/79399
+  sed -e 's/resolvelib.*/resolvelib/' -i requirements.txt
+}
+
 build() {
-  cd ansible-core-${pkgver}
-  python setup.py build
+  cd $pkgname-$pkgver
+  python -m build --wheel --no-isolation
 
   make docs
 }
 
 package() {
-  cd ansible-core-${pkgver}
-  python setup.py install -O1 --root="${pkgdir}"
-  install -Dm644 COPYING "${pkgdir}"/usr/share/doc/${pkgname}/COPYING
+  cd $pkgname-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
 
-  install -d "${pkgdir}"/usr/share/ansible/doc
-  cp -dpr --no-preserve=ownership ./examples "${pkgdir}"/usr/share/ansible/doc/
-  install -Dm644 examples/ansible.cfg "${pkgdir}"/etc/ansible/ansible.cfg
-
-  install -d "${pkgdir}"/usr/share/man/man1
-  cp -dpr --no-preserve=ownership docs/man/man1/*.1 
"${pkgdir}"/usr/share/man/man1
+  install -Dm644 COPYING -t "${pkgdir}"/usr/share/doc/${pkgname}/
+  install -Dm644 examples/ansible.cfg -t "${pkgdir}"/etc/ansible/
+  install -Dm644 examples/{ansible.cfg,hosts} -t 
"${pkgdir}"/usr/share/ansible/doc/examples/
+  install -Dm644 docs/man/man1/*.1 -t "${pkgdir}"/usr/share/man/man1/
 }

Reply via email to