[arch-commits] Commit in python-aioitertools/trunk (PKGBUILD python310.patch)
Chih-Hsuan Yen
yan12125 at gemini.archlinux.org
Tue Feb 8 11:10:19 UTC 2022
Date: Tuesday, February 8, 2022 @ 11:10:18
Author: yan12125
Revision: 1129185
upgpkg: python-aioitertools 0.9.0-1; switch to PEP 517 build flow
Since version 0.9.0, upstream sdist no longer contains setup.py. I
don't want to jump into another world of hacks with dephell or
pyproject2setuppy, either.
Also adds comments for python-install -> python-installer migration
Also add a link to changelogs
Modified:
python-aioitertools/trunk/PKGBUILD
Deleted:
python-aioitertools/trunk/python310.patch
-----------------+
PKGBUILD | 29 +++++++++++------------------
python310.patch | 37 -------------------------------------
2 files changed, 11 insertions(+), 55 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-02-08 10:36:01 UTC (rev 1129184)
+++ PKGBUILD 2022-02-08 11:10:18 UTC (rev 1129185)
@@ -2,31 +2,21 @@
pkgname=python-aioitertools
_pkgname=aioitertools
-pkgver=0.8.0
-pkgrel=3
+# https://github.com/omnilib/aioitertools/blob/main/CHANGELOG.md
+pkgver=0.9.0
+pkgrel=1
pkgdesc='Implementation of itertools, builtins, and more for AsyncIO and mixed-type iterables'
arch=(any)
url='https://github.com/omnilib/aioitertools'
license=(MIT)
depends=(python)
-makedepends=(python-setuptools)
-source=("https://files.pythonhosted.org/packages/source/a/$_pkgname/$_pkgname-$pkgver.tar.gz"
- python310.patch)
-sha256sums=('8b02facfbc9b0f1867739949a223f3d3267ed8663691cc95abd94e2c1d8c2b46'
- 'c45fcea71f7c551b0452cb4cdc30359b1724d4af74e818ec1793dfd31f940918')
+makedepends=(python-flit-core python-build python-install)
+source=("https://files.pythonhosted.org/packages/source/a/$_pkgname/$_pkgname-$pkgver.tar.gz")
+sha256sums=('0fd203d53192193973cae71fa14f0d3689328388ad41ca4a4e03e433f98871ac')
-prepare() {
- cd $_pkgname-$pkgver
- patch -Np1 -i ../python310.patch
- # setup.py generated by flit uses setuptools-specific install_requires but
- # imports setup() from distutils.core
- # https://github.com/takluyver/flit/blob/2.3.0/flit/sdist.py#L16
- sed -i 's#distutils.core#setuptools#' setup.py
-}
-
build() {
cd $_pkgname-$pkgver
- python setup.py build
+ python -m build --wheel --no-isolation
}
check() {
@@ -36,6 +26,9 @@
package() {
cd $_pkgname-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ python -m install --optimize 0 1 --destdir="$pkgdir" dist/*.whl
+ # Replace python-install with python-installer when the latter comes with a new version
+ # https://github.com/pradyunsg/installer/issues/104
+ # python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
Deleted: python310.patch
===================================================================
--- python310.patch 2022-02-08 10:36:01 UTC (rev 1129184)
+++ python310.patch 2022-02-08 11:10:18 UTC (rev 1129185)
@@ -1,37 +0,0 @@
-diff -upr aioitertools-0.8.0.orig/aioitertools/asyncio.py aioitertools-0.8.0/aioitertools/asyncio.py
---- aioitertools-0.8.0.orig/aioitertools/asyncio.py 2021-08-05 05:22:56.166504100 +0300
-+++ aioitertools-0.8.0/aioitertools/asyncio.py 2021-12-02 13:35:33.052209921 +0200
-@@ -59,7 +59,6 @@ async def as_completed(
- Tuple[Set[Awaitable[T]], Set[Awaitable[T]]],
- await asyncio.wait(
- pending,
-- loop=loop,
- timeout=remaining,
- return_when=asyncio.FIRST_COMPLETED,
- ),
-@@ -124,7 +123,7 @@ async def gather(
- if pending:
- try:
- done, pending = await asyncio.wait(
-- pending, loop=loop, return_when=asyncio.FIRST_COMPLETED
-+ pending, return_when=asyncio.FIRST_COMPLETED
- )
- for x in done:
- if return_exceptions and x.exception():
-@@ -136,7 +135,7 @@ async def gather(
- for x in pending:
- x.cancel()
- # we insure that all tasks are cancelled before we raise
-- await asyncio.gather(*pending, loop=loop, return_exceptions=True)
-+ await asyncio.gather(*pending, return_exceptions=True)
- raise
-
- if not pending and next_arg == len(args):
-@@ -162,7 +161,6 @@ async def gather_iter(
- """
- return await gather(
- *[maybe_await(i) async for i in aiter(itr)],
-- loop=loop,
- return_exceptions=return_exceptions,
- limit=limit,
- )
More information about the arch-commits
mailing list