diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-07-06 08:06:16 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-07-06 08:06:16 +0100 |
commit | 4187bba080530c5ca1c7dae9c233e88f3fc8f535 (patch) | |
tree | b6f535e053876097ced1b6bda14a4da890c730d4 /dev-python/makefun | |
parent | 2a8d2f71d1d9963368e0ef3d641d75979a689d12 (diff) |
gentoo auto-resync : 06:07:2024 - 08:06:15
Diffstat (limited to 'dev-python/makefun')
-rw-r--r-- | dev-python/makefun/Manifest | 3 | ||||
-rw-r--r-- | dev-python/makefun/files/makefun-1.15.3-test.patch | 80 | ||||
-rw-r--r-- | dev-python/makefun/makefun-1.15.3.ebuild | 34 |
3 files changed, 117 insertions, 0 deletions
diff --git a/dev-python/makefun/Manifest b/dev-python/makefun/Manifest index d672d10f949b..f605001203ab 100644 --- a/dev-python/makefun/Manifest +++ b/dev-python/makefun/Manifest @@ -1,4 +1,7 @@ AUX makefun-1.15.2-test.patch 2871 BLAKE2B b36b8e8e40ab126e6875625a6584ae3eb78237203d426b3d2e7650c30c96e213d46c24980936d56868686fbdde93526e28d5a8b3f41330a2e398c00228097d34 SHA512 0a41884ac53c0efbbcf668aebf8119c096bddea6fe1a2ce66efc5a020d2bb3e4ce5a1cf2e02d7e4d65adfae8c45252e395f7458f5eb331adc618aa0407050bdd +AUX makefun-1.15.3-test.patch 2142 BLAKE2B 70e7b70c0c78242d05af0929fdeec37f930663d07f6b7226267fee24cc66cb211cce3a6a1c6d590ed563971dc050ef1a82182a4ad7c1457173df6fb51c5bfc5a SHA512 01f58b4cbeb4788c590c7f8a2710ad9613adf91817106408dd975d83f89f95aa3a861a6b3709e3a3c09c37b5a81f8b92f09760fb2192da3dd2e5e331c4dc3d8a DIST makefun-1.15.2.tar.gz 74602 BLAKE2B 1992eebfdbff6062ed60e1f66891995a91b7155792ef7b6e701d1d3ee5939ab40d3ab976674e25a5b97030cd7de59db2c69f3c215681cef2f80f2b64523f822b SHA512 b6cb588ebf491176b06e97201846b2a5cee65f60e34b5dbcc4878d8a55e7f9fcf4b58126cb3a4ca47f5d2726422dff9ee685566c5d093dbd8fd75119ecc796b2 +DIST makefun-1.15.3.tar.gz 71799 BLAKE2B 3500be7bc5b0e86a6f75781bb8fb7156624e4c910f54dfd7498268f96cd3df84e1f4d4502f4705f9a278948043e571951137e420358e94e051ba81387b14d4ba SHA512 6d48d8e1bdd60ab440b31241a957ba60aa5ae6c77a7a4785dd0a3c6cf4cedd5389ff76d7a309d230bdf1db9be577ab85446741febb30dae0be87e9c3a2d003a0 EBUILD makefun-1.15.2.ebuild 774 BLAKE2B ac501bbadc947f37a39138bf0f27d8958e20d16346e530f944ec098ee767995daa5fd14b06590c919999bdfe7b1d7a8129dcecef5e43a8461ef6301e2b0fe014 SHA512 0749c2d29d4e5f023c9e6527a7d8fac38d5dcc0674e65470b91fad4bf5d497f854e695e9a950c8e69474740fde495e721eb9778ca6956a2e9343cd9fe5560dad +EBUILD makefun-1.15.3.ebuild 675 BLAKE2B 2971a71dcc1d8be9415178f0d7b3c1215a48c187cd9733d493162b7ae14c949d52611bb05ca9217cac1086863ea013f85eb63ae0cfc0c2cf08249b2a434e9c55 SHA512 8a80683b18551bd0d9cf94412446504625fcd1a8ff76b3b238dc5c785c388c10d122ac3cfbe9dfd3b01e53e3627e3b93de73bb42437aed9cdeb0d548ad8fb7b6 MISC metadata.xml 396 BLAKE2B 541c5e69fc3236d1aaf79505272c9bdf2a295524bb9bb04e782a4cd15c022e74651a9c4ebaa244672418e5fafaed97a48568538fcd527b135c279576f09350d2 SHA512 a500a2a8b23673ea11ffdd81cae9c96fc1368121cd6ce7955fb61bc59319cf87607b134f6b5d04aa6aa564eab9c2c1248c47d0ccc624cdd8ae58f5f12d96e279 diff --git a/dev-python/makefun/files/makefun-1.15.3-test.patch b/dev-python/makefun/files/makefun-1.15.3-test.patch new file mode 100644 index 000000000000..bed2b01c01d4 --- /dev/null +++ b/dev-python/makefun/files/makefun-1.15.3-test.patch @@ -0,0 +1,80 @@ +diff --git a/tests/test_partial_and_macros.py b/tests/test_partial_and_macros.py +index 6fd4503..3ce0a33 100644 +--- a/tests/test_partial_and_macros.py ++++ b/tests/test_partial_and_macros.py +@@ -1,5 +1,6 @@ + import functools + import pytest ++import re + import sys + + import makefun +@@ -11,6 +12,11 @@ except ImportError: + + PY2 = sys.version_info < (3, ) + ++# Python 3.13 dedents docstrings, earlier versions just strip initial ++# whitespace. Use a regexp to get a consistently dedented docstring ++# for comparison across Python versions. ++DOCSTRING_NORMALIZE_RE = re.compile(r"^ +", re.MULTILINE) ++ + + def test_doc(): + def foo(x, y): +@@ -41,15 +47,15 @@ def test_doc(): + + sig_actual_call = ref_sig_str.replace("*, ", "") + +- assert bar.__doc__ \ ++ assert DOCSTRING_NORMALIZE_RE.sub("", bar.__doc__) \ + == """<This function is equivalent to 'foo%s', see original 'foo' doc below.> + +- a `foo` function ++a `foo` function + +- :param x: +- :param y: +- :return: +- """ % sig_actual_call ++:param x: ++:param y: ++:return: ++""" % sig_actual_call + + + def test_partial(): +@@ -78,16 +84,16 @@ def test_partial(): + + sig_actual_call = "(x, y='hello', a)" # if PY2 else "(x, *, y='hello', a)" + +- assert foo.__doc__.replace("=KW_ONLY_ARG!", "") \ ++ assert DOCSTRING_NORMALIZE_RE.sub("", foo.__doc__.replace("=KW_ONLY_ARG!", "")) \ + == """<This function is equivalent to 'foo%s', see original 'foo' doc below.> + +- a `foo` function ++a `foo` function + +- :param x: +- :param y: +- :param a: +- :return: +- """ % sig_actual_call ++:param x: ++:param y: ++:param a: ++:return: ++""" % sig_actual_call + + + def test_issue_57(): +@@ -127,9 +133,7 @@ def test_create_with_partial(): + assert m() == -1 + assert m.i == 1 + # the doc remains untouched in create_function as opposed to wraps, this is normal +- assert m.__doc__ == """partial(func, *args, **keywords) - new function with partial application +- of the given arguments and keywords. +-""" ++ assert m.__doc__ == functools.partial.__doc__ + + + def test_args_order_and_kind(): diff --git a/dev-python/makefun/makefun-1.15.3.ebuild b/dev-python/makefun/makefun-1.15.3.ebuild new file mode 100644 index 000000000000..fcc125bd1795 --- /dev/null +++ b/dev-python/makefun/makefun-1.15.3.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..13} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Small library to dynamically create Python functions" +HOMEPAGE=" + https://pypi.org/project/makefun/ + https://github.com/smarie/python-makefun/ +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" + +BDEPEND=" + dev-python/setuptools-scm[${PYTHON_USEDEP}] +" + +distutils_enable_tests pytest + +src_prepare() { + local PATCHES=( + # https://github.com/smarie/python-makefun/pull/104 + "${FILESDIR}/${P}-test.patch" + ) + + distutils-r1_src_prepare +} |