diff options
Diffstat (limited to 'repo/python-exceptiongroup')
-rw-r--r-- | repo/python-exceptiongroup/python-exceptiongroup.xibuild | 26 | ||||
-rw-r--r-- | repo/python-exceptiongroup/use-flit-core.patch | 38 |
2 files changed, 64 insertions, 0 deletions
diff --git a/repo/python-exceptiongroup/python-exceptiongroup.xibuild b/repo/python-exceptiongroup/python-exceptiongroup.xibuild new file mode 100644 index 0000000..fa101ca --- /dev/null +++ b/repo/python-exceptiongroup/python-exceptiongroup.xibuild @@ -0,0 +1,26 @@ +#!/bin/sh + +MAKEDEPS="python python-build python-flit-core python-installer python-wheel" +DEPS="python-pytest" + +PKG_VER=1.0.0rc8 +SOURCE=https://github.com/agronholm/exceptiongroup/archive/refs/tags/$PKG_VER.tar.gz +MAKEDEPS="python" +DESC="Backport of PEP 654 (exception groups)" +ADDITIONAL=" +use-flit-core.patch +" + +prepare () { + apply_patches + sed -i "s/%VERSION%/$PKG_VER/" src/exceptiongroup/__init__.py +} + +build() { + python3 -m build --no-isolation --wheel +} + +package () { + python3 -m installer -d "$PKG_DEST" \ + dist/exceptiongroup-$PKG_VER-py3-none-any.whl +} diff --git a/repo/python-exceptiongroup/use-flit-core.patch b/repo/python-exceptiongroup/use-flit-core.patch new file mode 100644 index 0000000..ede931d --- /dev/null +++ b/repo/python-exceptiongroup/use-flit-core.patch @@ -0,0 +1,38 @@ +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 |