diff options
Diffstat (limited to 'dev-python/PyMeeus')
-rw-r--r-- | dev-python/PyMeeus/Manifest | 3 | ||||
-rw-r--r-- | dev-python/PyMeeus/PyMeeus-0.5.12.ebuild | 6 | ||||
-rw-r--r-- | dev-python/PyMeeus/files/pytest-7.2.patch | 86 |
3 files changed, 93 insertions, 2 deletions
diff --git a/dev-python/PyMeeus/Manifest b/dev-python/PyMeeus/Manifest index 6a1035b..c1e600b 100644 --- a/dev-python/PyMeeus/Manifest +++ b/dev-python/PyMeeus/Manifest @@ -1,3 +1,4 @@ +AUX pytest-7.2.patch 2407 BLAKE2B 9b5952cf928ba0b7b9d7fb65f67f793c06103d1932cdff8fe70f6ca6baa4f547eb221230a7ab25e8aebdf6a71fb5d68f7e5bfeec22db31391680496d93acfe32 SHA512 a615d94c2a9f4e30c7320af1ded090352bbc215b01e5415b3f6ff61fece9347b8ff3174166d3833e756ab2621f0a30c4e185a50f20c5f08e9c0b6420c966eb3c DIST PyMeeus-0.5.12.tar.gz 5752712 BLAKE2B f7c80c79d72c071a57a19373ce818892f2e56e5339c4b8f2e2e2ff32e7363d8607046962f4289b7802a3219d03fafbd6ad233a271dba1f0d46ee29052d0125c1 SHA512 33f68f352cb6737aeec9782727c5ded921cf6f5561cfd7ecb237f7cf4b431e1010f7dff49d779ea368c8298a3012da84f6fa3afc7efc08579b798bb17558c423 -EBUILD PyMeeus-0.5.12.ebuild 556 BLAKE2B 21780f6e487e683491359302c8b2b1d78f49730ec89803fb9e6f5834d9c4c5d9a6646ea511a6d255adcb3003a757fc47e9b96673cae35fecb03d96543b3b8ad1 SHA512 cf60b2e7bb90bed5b2ec4a81e947851776f4cbd3e10dd27baad5bffe1bac07148cf2df9779141a589540f4a28c104d8c83ee87e516959a693de51abbc418c2de +EBUILD PyMeeus-0.5.12.ebuild 601 BLAKE2B d6ce5827033bb577906c3a440437bdff9142db4b96023d6cad0dcdf43f4d1ea1d90b5f4ea2edff7f366c9bdd82c2bdb7f65b6f44fb0dfb9eed25c095acfa49e4 SHA512 4b5a9463f3000e59fdd23879982fdefcf9093267c438c9c5356aca4cff005e9232fc6295cc9163915945dabd25c6e17022c5326c63ac5375ff180fc9238cd107 MISC metadata.xml 448 BLAKE2B 00d5e32d6b053c5f7a36775f41abdcc3aca7554ee61b6517998c6334784e3d98ec280c142157aaafd9730b412bdafbeee2381ba215b90bf9126a6690f6d66407 SHA512 9c48c40db82968e5aadbec79b619c54161c13e87401ccaab6bd9f32316be5a66397c6ea8b877754a119f2d14fe6d373cca45f1eb880d223c33f7c1a079734226 diff --git a/dev-python/PyMeeus/PyMeeus-0.5.12.ebuild b/dev-python/PyMeeus/PyMeeus-0.5.12.ebuild index 6cc1c78..31bc871 100644 --- a/dev-python/PyMeeus/PyMeeus-0.5.12.ebuild +++ b/dev-python/PyMeeus/PyMeeus-0.5.12.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..11} pypy3 ) +PYTHON_COMPAT=( python3_{10..12} pypy3 ) DISTUTILS_USE_PEP517=setuptools PYPI_NO_NORMALIZE=1 @@ -19,6 +19,10 @@ LICENSE="LGPL-3" SLOT="0" KEYWORDS="~amd64" +PATCHES=( + "${FILESDIR}/pytest-7.2.patch" +) + DOCS=( README.rst ) distutils_enable_tests pytest diff --git a/dev-python/PyMeeus/files/pytest-7.2.patch b/dev-python/PyMeeus/files/pytest-7.2.patch new file mode 100644 index 0000000..51534a8 --- /dev/null +++ b/dev-python/PyMeeus/files/pytest-7.2.patch @@ -0,0 +1,86 @@ +From f064abfda6b3cb48cb42a6827cd250413056f227 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anarcat@debian.org> +Date: Sat, 6 Apr 2024 22:22:52 -0400 +Subject: [PATCH] fix pytest 7.2 compatibility + +Pytest 7.2 deprecated plain top-level `setup()` and `teardown()` +functions in favor of their own decorators: + +https://docs.pytest.org/en/latest/changelog.html#pytest-7-2-0-2022-10-23 +https://docs.pytest.org/en/latest/deprecations.html#setup-teardown + +Now we need to use module-level setup/teardown, which is extremely +similar, just named differently: + +https://docs.pytest.org/en/latest/how-to/xunit_setup.html#module-level-setup-teardown + +We keep compatibility shims for older pytest releases. + +Closes: #24 +--- + tests/test_curvefitting.py | 10 +++++++--- + tests/test_interpolation.py | 9 +++++++-- + 2 files changed, 14 insertions(+), 5 deletions(-) + +diff --git a/tests/test_curvefitting.py b/tests/test_curvefitting.py +index 9398327..0d20cca 100644 +--- a/tests/test_curvefitting.py ++++ b/tests/test_curvefitting.py +@@ -31,9 +31,8 @@ + cf4 = CurveFitting() + + +-def setup(): ++def setup_module(): + """This function is used to set up the environment for the tests""" +- + # Set up a few CurveFitting objects + cf1.set([73.0, 38.0, 35.0, 42.0, 78.0, 68.0, 74.0, 42.0, 52.0, 54.0, 39.0, + 61.0, 42.0, 49.0, 50.0, 62.0, 44.0, 39.0, 43.0, 54.0, 44.0, 37.0], +@@ -58,10 +57,15 @@ def setup(): + -0.8372, -0.4377, -0.3640, -0.3508, -0.2126]) + + +-def teardown(): ++def teardown_module(): + pass + + ++# pre pytest 7.2 compatibility ++setup = setup_module ++teardown = teardown_module ++ ++ + # CurveFitting class + + def test_curvefitting_constructor(): +diff --git a/tests/test_interpolation.py b/tests/test_interpolation.py +index e853c37..08f7b6e 100644 +--- a/tests/test_interpolation.py ++++ b/tests/test_interpolation.py +@@ -32,7 +32,7 @@ + i_sine = Interpolation() + + +-def setup(): ++def setup_module(): + """This function is used to set up the environment for the tests""" + # Set up a interpolation object which uses Right Ascension + y0 = Angle(10, 18, 48.732, ra=True) +@@ -64,10 +64,15 @@ def setup(): + 0.5236885653, 0.5453707057]) + + +-def teardown(): ++def teardown_module(): + pass + + ++# pre pytest 7.2 ompatibility ++setup = setup_module ++teardown = teardown_module ++ ++ + # Interpolation class + + def test_interpolation_constructor(): |