backports/py3-utils: new aport

This commit is contained in:
Antoine Martin 2024-01-18 22:18:21 -05:00
parent 2117869911
commit 3a1419cdf2
Signed by: forge
GPG key ID: D62A472A4AA7D541
4 changed files with 93 additions and 0 deletions

View file

@ -0,0 +1,46 @@
# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=py3-utils
_pkgname=python-utils
pkgver=3.8.1
pkgrel=0
pkgdesc="Convenient utilities not included with the standard Python install"
url="https://github.com/WoLpH/python-utils"
arch="noarch"
license="BSD-3-Clause"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-pytest-asyncio py3-loguru"
subpackages="$pkgname-pyc"
source="
https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
fix-setuptools-deprecation.patch
pytest.patch
typing-ext.patch
"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
ccba9651cc99a8f4e3f13e7ff66a43a40d2e85bc735b6246524269495ff321225a0dcad9abd03ca9cb61b4b1b35a27009fac3fe87e3f748ffc5c87a956acd335 python-utils-3.8.1.tar.gz
c001453b958b8231806ef6a04fcd21e1d252eeec36d4e6cbfce35f0662bae76c3f7484e0e8ff06d68a3e9cc7d19c9cdbf792c13e0101c580bb5e8de9d837fde7 fix-setuptools-deprecation.patch
99cc91ad155f8140aedc9420659c0e560a4d816ac1f85468ddb3a9fdc87526d591da916441d63b601146a86fb2c26f61c9dfbe37e31b86ee605f732e24e7b465 pytest.patch
d68943e3301eaafe2a9ea27f382a2eba1ce98149d8cbbe91aa9222cf76a8f7bebba3d9dbfced54bd88c90688a6e18373f011fbb83cd36cbf2ecd3e36b034aa22 typing-ext.patch
"

View file

@ -0,0 +1,11 @@
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,7 +2,7 @@
test = pytest
[metadata]
-description-file = README.rst
+description_file = README.rst
[nosetests]
verbosity = 3

View file

@ -0,0 +1,14 @@
diff --git a/pytest.ini b/pytest.ini
index a8e632a..e28ed7d 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -5,9 +5,6 @@ python_files =
addopts =
--doctest-modules
- --cov python_utils
- --cov-report term-missing
-; --mypy
doctest_optionflags =
ALLOW_UNICODE

View file

@ -0,0 +1,22 @@
diff --git a/python_utils/types.py b/python_utils/types.py
index 01c319a..79ef950 100644
--- a/python_utils/types.py
+++ b/python_utils/types.py
@@ -1,7 +1,6 @@
# pyright: reportWildcardImportFromLibrary=false
import datetime
import decimal
-from typing_extensions import * # type: ignore # noqa: F403
from typing import * # type: ignore # pragma: no cover # noqa: F403
from types import * # type: ignore # pragma: no cover # noqa: F403
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,6 @@
),
package_data={'python_utils': ['py.typed']},
long_description=long_description,
- install_requires=['typing_extensions>3.10.0.2'],
tests_require=['pytest'],
extras_require={
'loguru': [