Commit 14d90283 authored by Michał Polański's avatar Michał Polański
Browse files

main/py3-exceptiongroup: new aport

Backport of PEP 654 (exception groups)
https://github.com/agronholm/exceptiongroup
parent 828da3ec
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-exceptiongroup
pkgver=1.0.0_rc8
_pkgver=${pkgver/_/}
pkgrel=0
pkgdesc="Backport of PEP 654 (exception groups)"
url="https://github.com/agronholm/exceptiongroup"
license="MIT"
arch="noarch"
depends="python3"
makedepends="py3-build py3-flit-core py3-installer py3-wheel"
checkdepends="py3-pytest"
source="https://github.com/agronholm/exceptiongroup/archive/$_pkgver/py3-exceptiongroup-$pkgver.tar.gz
use-flit-core.patch
"
builddir="$srcdir/exceptiongroup-$_pkgver"
prepare() {
default_prepare
sed -i "s/%VERSION%/$_pkgver/" src/exceptiongroup/__init__.py
}
build() {
python3 -m build --no-isolation --wheel
}
check() {
PYTHONPATH=src pytest
}
package() {
python3 -m installer -d "$pkgdir" \
dist/exceptiongroup-$_pkgver-py3-none-any.whl
}
sha512sums="
f7f1700403f345755a1e32c77eb43744b366b1f55446e1898dd960988d23396ad8334bef072ecc7ec5ac7075300f0f3e8e9a0d454d9dd80677ae55b4166fc6e4 py3-exceptiongroup-1.0.0_rc8.tar.gz
0b52b660790138e33d0641910197b2257f859ac0f24f5f99e717362f5266793a97703afad3dc51673bc021c31dae21342857c9d10d713a028be4870c12761869 use-flit-core.patch
"
Use flit_core directly instead of a thin wrapper
and get rid of setuptools_scm.
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[build-system]
-requires = ["flit_scm"]
-build-backend = "flit_scm:buildapi"
+requires = ["flit_core >=3.4,<4"]
+build-backend = "flit_core.buildapi"
[project]
name = "exceptiongroup"
@@ -36,11 +36,6 @@ exclude = [
".pre-commit-config.yaml"
]
-[tool.setuptools_scm]
-version_scheme = "post-release"
-local_scheme = "dirty-tag"
-write_to = "src/exceptiongroup/_version.py"
-
[tool.black]
target-version = ['py37']
--- a/src/exceptiongroup/__init__.py
+++ b/src/exceptiongroup/__init__.py
@@ -4,7 +4,8 @@ import os
import sys
from ._catch import catch
-from ._version import version as __version__ # noqa: F401
+
+__version__ = "%VERSION%"
if sys.version_info < (3, 11):
from ._exceptions import BaseExceptionGroup, ExceptionGroup
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment