diff options
Diffstat (limited to 'dev-python/pytest-freezegun')
3 files changed, 98 insertions, 0 deletions
diff --git a/dev-python/pytest-freezegun/Manifest b/dev-python/pytest-freezegun/Manifest index 57a53be93a99..0786bd836896 100644 --- a/dev-python/pytest-freezegun/Manifest +++ b/dev-python/pytest-freezegun/Manifest @@ -1,3 +1,5 @@ +AUX pytest-freezegun-0.4.2-distutils-depr.patch 1655 BLAKE2B 3af611f832244acc2dc76ec8a69522275063dcdc4dc48b1d9235260e194be01730cc2b1b5a1507286594f2a27e2fffe489ced4a29624c54cb834a3fc6b1e8c7d SHA512 da1ef13c2eb724012a6b011f3bcbe6030200c1ca2a9bfa4cb0a0337e22641e16091d0e58b71367a232419f976f98e6269bd3a5a0a03f432dc8e3927c97b556d2 DIST pytest-freezegun-0.4.2.gh.tar.gz 7058 BLAKE2B 1c89979d85dbdedf87a26de57d1cfe120ed52831e8d69c42b6117ac49c9eb7376bab018a23ca10b582fc583ca61a03930a86878c141b0c5bf4d807552484fe70 SHA512 2bea7746e4e6a7f2a979cbc5c6d7a2576e0e2631a4e1d5abb7f27f76d6c32b0520a277474c092c5e05ce257f2ba19091918f67e28b7a2da1d5829037c6b70c55 +EBUILD pytest-freezegun-0.4.2-r1.ebuild 825 BLAKE2B b133706ffef4917ce08aeff0794f8fd89829241fe77819cb04dca84064d52c40584f96bbc8a0d3bfb5da0610353801ad665cc82a68d9b0938fa1f0a2679ff51a SHA512 01ccad291a3e7eb17a65f93f32b142324751b2f6ea87850b1b3cb41b168e996a969e3ca9191c4a03a620ff5da68c9f3c8a3a5b93edb7d05021e325d4417e36b1 EBUILD pytest-freezegun-0.4.2.ebuild 635 BLAKE2B 199816a86088fcd6f125ac3cb51fe73e9cc40d993a74efabcd2c60c1b2bd699c408b8904488ecc10f7e778275138d08cde894a001c261662e797a98a4aa082e9 SHA512 27f3e0ede6e0afd84a8096005d4856e236b054c5bbf532a58e18618287503652d9624f3d16842db097b887677809248e9b0c9466971feae67c5bf70bec1519a0 MISC metadata.xml 322 BLAKE2B 3e34df76fbf36fdf27dbdae10499c4925f51f9ef3945895ea54f4423f5efef036bcaf6e9516e74c4e0eecdb4e7a314f0a689804e1719ee28287b6c417bc7c1da SHA512 6b495faa2f661da0b83e25fd3bbfad4e3856247948b503a3f01d82d2cd3d9908c85699ab4e5d99dfe2ca48d55287e320f9c908ae4a2330f2f2c037aee258bfa9 diff --git a/dev-python/pytest-freezegun/files/pytest-freezegun-0.4.2-distutils-depr.patch b/dev-python/pytest-freezegun/files/pytest-freezegun-0.4.2-distutils-depr.patch new file mode 100644 index 000000000000..86b7e32a5c1f --- /dev/null +++ b/dev-python/pytest-freezegun/files/pytest-freezegun-0.4.2-distutils-depr.patch @@ -0,0 +1,61 @@ +From 1ae2e18b8d71c45defe8f695a3dddd5762a611b2 Mon Sep 17 00:00:00 2001 +From: Hugo van Kemenade <hugovk@users.noreply.github.com> +Date: Fri, 8 Apr 2022 13:30:42 +0300 +Subject: [PATCH] Require pytest 3.6 to drop dependency on deprecated distutils + +--- + pytest_freezegun.py | 6 +----- + setup.cfg | 2 +- + tox.ini | 2 +- + 3 files changed, 3 insertions(+), 7 deletions(-) + +diff --git a/pytest_freezegun.py b/pytest_freezegun.py +index a08133f..257c7ca 100644 +--- a/pytest_freezegun.py ++++ b/pytest_freezegun.py +@@ -2,7 +2,6 @@ + + import pytest + +-from distutils.version import LooseVersion + from freezegun import freeze_time + + +@@ -14,10 +13,7 @@ def get_closest_marker(node, name): + """ + Get our marker, regardless of pytest version + """ +- if LooseVersion(pytest.__version__) < LooseVersion('3.6.0'): +- return node.get_marker('freeze_time') +- else: +- return node.get_closest_marker('freeze_time') ++ return node.get_closest_marker('freeze_time') + + + @pytest.fixture(name=FIXTURE_NAME) +diff --git a/setup.cfg b/setup.cfg +index 069ddf7..da06223 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -31,7 +31,7 @@ py_modules = + pytest_freezegun + install_requires = + freezegun>0.3 +- pytest>=3.0.0 ++ pytest>=3.6 + + [options.entry_points] + pytest11 = +diff --git a/tox.ini b/tox.ini +index 3846fd9..07e916d 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -6,7 +6,7 @@ envlist = {py35,py36,py37,py38,pypy3}-{pt3,pt4,pt5},py38-ptNext-fgNext,flake8 + deps = + coverage + pip >= 19 +- pt3: pytest>=3,<4 ++ pt3: pytest>=3.6,<4 + pt4: pytest>=4,<5 + pt5: pytest>=5,<6 + ptNext: git+https://github.com/pytest-dev/pytest/ diff --git a/dev-python/pytest-freezegun/pytest-freezegun-0.4.2-r1.ebuild b/dev-python/pytest-freezegun/pytest-freezegun-0.4.2-r1.ebuild new file mode 100644 index 000000000000..01de23365fa4 --- /dev/null +++ b/dev-python/pytest-freezegun/pytest-freezegun-0.4.2-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( pypy3 python3_{8..10} ) + +inherit distutils-r1 + +DESCRIPTION="Easily freeze time in pytest test + fixtures" +HOMEPAGE=" + https://pypi.org/project/pytest-freezegun/ + https://github.com/ktosiek/pytest-freezegun/ +" +SRC_URI=" + https://github.com/ktosiek/pytest-freezegun/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos" + +RDEPEND=" + dev-python/freezegun[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] +" + +distutils_enable_tests pytest + +PATCHES=( + # https://github.com/ktosiek/pytest-freezegun/pull/38 + "${FILESDIR}"/${P}-distutils-depr.patch +) |