[arch-commits] Commit in python-aiosmtpd/trunk (PKGBUILD)

David Runge dvzrv at archlinux.org
Mon Nov 9 14:08:27 UTC 2020


    Date: Monday, November 9, 2020 @ 14:08:26
  Author: dvzrv
Revision: 746926

upgpkg: python-aiosmtpd 1.2.2-1: Upgrade to 1.2.2.

Switch to pypi sdist tarball, as they are now provided again.
Add upstreamed patch to setup.py to not incldue the examples in site-packages.

Modified:
  python-aiosmtpd/trunk/PKGBUILD

----------+
 PKGBUILD |   32 +++++++++++++-------------------
 1 file changed, 13 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-09 13:59:41 UTC (rev 746925)
+++ PKGBUILD	2020-11-09 14:08:26 UTC (rev 746926)
@@ -2,7 +2,7 @@
 
 _name=aiosmtpd
 pkgname=python-aiosmtpd
-pkgver=1.2.1
+pkgver=1.2.2
 pkgrel=1
 pkgdesc="An asyncio based SMTP server"
 arch=('any')
@@ -11,19 +11,19 @@
 depends=('python-atpublic')
 makedepends=('python-setuptools')
 checkdepends=('python-pytest')
-# 1.2.1 is not available on pypi
-# https://github.com/aio-libs/aiosmtpd/issues/168
-source=("$pkgname-$pkgver.tar.gz::https://github.com/aio-libs/${_name}/archive/${pkgver}.tar.gz"
-        "$pkgname-1.2.1-fix_test_certs.patch::https://github.com/aio-libs/aiosmtpd/commit/f414dcdc0312c4cf3f3d39deb3ea7d15e89a5334.patch")
-sha512sums=('be1e9f34846a354e570c67e04c0fd12e26531dccb79b9c90158b421d191e767f5e3502c6be0e9dad85f3123662e4446a424356fe9380a1ed31d81a37eae2a4a2'
-            '72fb10acd59b2866bd1d8a4dcb6775b0a5b13dc5be1d5286797022e6e5aa2ba7f268af4d26e8a48d3c943b3ecb9df23fac0aad9e0156e3c3f548d5109b3d2f50')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
+        "${pkgname}-1.2.2-exclude_examples.patch::https://github.com/aio-libs/aiosmtpd/pull/205/commits/2d3d6b4a6f70bdc83f613dc3665a612392b38244.patch")
+sha512sums=('7ffc279a73685601496dbfffef30a78cc254a76f8c8fccd0c7b7efe41da66672f0d8662f302eb928e90eb8977b859cb7e713415d0aa5e93f369ef23bdff405fc'
+            'a6a81bc2f61bf07fd3f048159ab18b50c4a7f7ebbf219b83db1970533e0a02879b6077e409ebf2afaa4038206a54e0775643ddbe75f500299862fc252e12bf8c')
+b2sums=('abf178c28a21c25e8a7c7ed920c154f037aaa21da5d2dfa0ee8cae7d239d00d5a979eedfb3865e3de7e54e7da94ea8a1e6b5194681a2137ac7d8f0f69d82e3a6'
+        '1902889225801dd3cec83dc255ec510b9b94301e8367c6496353a4042145904e7941dbb94a22e12f6300cf988c8576b8d8c96b27169f19e57cfa54ddf7ec039a')
 
 prepare() {
   mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
   cd "$pkgname-$pkgver"
-  # the certs required for testing have expired:
-  # https://github.com/aio-libs/aiosmtpd/issues/180
-  patch -Np1 -i "../$pkgname-1.2.1-fix_test_certs.patch"
+  # do not install examples to site-packages:
+  # https://github.com/aio-libs/aiosmtpd/issues/181
+  patch -Np1 -i "../${pkgname}-1.2.2-exclude_examples.patch"
 }
 
 build() {
@@ -39,15 +39,9 @@
 
 package() {
   cd "$pkgname-$pkgver"
-  local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
   python setup.py install --skip-build \
-    --optimize=1 \
-    --prefix=/usr \
-    --root="${pkgdir}"
-  # move examples to a non-generic location:
-  # https://github.com/aio-libs/aiosmtpd/issues/181
-  install -vDm 644 "${pkgdir}/usr/lib/python${python_version}/site-packages/examples/"{client,server}.py \
-    -t "${pkgdir}/usr/share/doc/${pkgname}/examples/"
-  rm -rvf "${pkgdir}/usr/lib/python${python_version}/site-packages/examples/"
+                          --optimize=1 \
+                          --root="${pkgdir}"
   install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -vDm 644 examples/*.py -t "${pkgdir}/usr/share/doc/${pkgname}/examples/"
 }



More information about the arch-commits mailing list