diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-05-27 21:13:07 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-05-27 21:13:07 +0100 |
commit | 58363a659e5161822c630bb4e16459a3a838696c (patch) | |
tree | e5acafcf61378ef38d817a7989e659cdaffadf4c /dev-python/pytest-shutil | |
parent | 246c83e768dd1efb42047de864a1e92b73de8b5c (diff) |
gentoo auto-resync : 27:05:2023 - 21:13:06
Diffstat (limited to 'dev-python/pytest-shutil')
-rw-r--r-- | dev-python/pytest-shutil/Manifest | 2 | ||||
-rw-r--r-- | dev-python/pytest-shutil/files/pytest-shutil-1.7.0-py312.patch | 39 | ||||
-rw-r--r-- | dev-python/pytest-shutil/pytest-shutil-1.7.0-r4.ebuild | 54 |
3 files changed, 95 insertions, 0 deletions
diff --git a/dev-python/pytest-shutil/Manifest b/dev-python/pytest-shutil/Manifest index db0b283e3e03..f0909221e8cb 100644 --- a/dev-python/pytest-shutil/Manifest +++ b/dev-python/pytest-shutil/Manifest @@ -1,3 +1,5 @@ +AUX pytest-shutil-1.7.0-py312.patch 1272 BLAKE2B 34cd914888af8e2d6f2db70009732e929a0f9253c64a4dace4b394d528ad4a2b88960bec0dfc527f720c427f352ab0adae5152ebbdc08bddd4958d16a2f087bb SHA512 1ca03b5e6fa9383fc3fed8e0b0948664d41ee0069cf87d1cacfa4a55461af32f97d09015d5b36a926116993142088a47cee69774687ecfa6c2bbd640c3652931 DIST pytest-shutil-1.7.0.tar.gz 23497 BLAKE2B e13641491fb4bd448973b8004ac9ded2f9b7c412ea93af7f9206e5fc38ea7554073374116eeefc529d2ae35e8a25e678fef5a27089af89026077a72d11d6016d SHA512 3746c08b17834621a7142ed9d5915b5c348c13367f5b423b258d3471bcb9c9e983c61c25ca936f879b8b82f80512512b7f3ade5555c24a790c72b502e3f3d144 EBUILD pytest-shutil-1.7.0-r3.ebuild 1056 BLAKE2B 75489d095c6d0f9f438d8b7fa26a4e811bc75296dd763fca6b4d91f86d3d8f7472f5427dcbdb9bdee03d9d8be06092f88f9bb83a18f08dcc9a01551217f5f3d5 SHA512 97e1ce0bdb17883afb79f1399e85b42db1a6ae2364b338d3ad6fbafd1e8f687de52405a902de14b52b037cef623d772721fa3cc254eee38b963db07946d449b8 +EBUILD pytest-shutil-1.7.0-r4.ebuild 1362 BLAKE2B 2d9a6ddb21e0c4d8741d04627cb67a0e40f3f5016e32823bdf084b84fccd271f96bf55cfdbc4f6e26405f9e52af6ce73348597c6687ddfd1adafbf076579753d SHA512 20464f8959daffd10175679cb8de0cc6437001d86157225607eee18c62c94ff96a09e29737a375fe954beca243d1620e5d8da871fa30babe6ba599949fd627a5 MISC metadata.xml 733 BLAKE2B f5f17136e92ebe6188aa94910e3b58c33198bf65b9de5cd70de16ec5d9d205afb46e1c73508b56367ca972d55e69e4c746297106eb7ef5f3e9e9a7ff1a5f7f83 SHA512 af24c62c04e5f1dda2fe559436658172be8b280463e1fa1bc078eca03900e4949660b4ceade8d78fef387f16b3630762181824b3bce2a50c3ad76092dcffe9a5 diff --git a/dev-python/pytest-shutil/files/pytest-shutil-1.7.0-py312.patch b/dev-python/pytest-shutil/files/pytest-shutil-1.7.0-py312.patch new file mode 100644 index 000000000000..905550622fc1 --- /dev/null +++ b/dev-python/pytest-shutil/files/pytest-shutil-1.7.0-py312.patch @@ -0,0 +1,39 @@ +From bbb9e5c7cba84fb4665a521569d1cfcca08ee4e5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sat, 27 May 2023 18:05:44 +0200 +Subject: [PATCH] pytest-shutil: Replace deprecated imp module + +Replace the use of the deprecated `imp` module with `importlib.util', +as the former has been removed from Python 3.12. +--- + pytest-shutil/pytest_shutil/run.py | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/pytest-shutil/pytest_shutil/run.py b/pytest-shutil/pytest_shutil/run.py +index 7d46aea..08a6a34 100644 +--- a/pytest_shutil/run.py ++++ b/pytest_shutil/run.py +@@ -3,7 +3,7 @@ + """ + import sys + import os +-import imp ++import importlib.util + import logging + from functools import update_wrapper + import inspect +@@ -112,7 +112,10 @@ def run_module_as_main(module, argv=[]): + filename = os.path.splitext(filename)[0] + ".py" + + with patch("sys.argv", new=argv): +- imp.load_source('__main__', os.path.join(where, filename)) ++ spec = importlib.util.spec_from_file_location( ++ "__main__", os.path.join(where, filename)) ++ module = importlib.util.module_from_spec(spec) ++ spec.loader.exec_module(module) + + + def _evaluate_fn_source(src, *args, **kwargs): +-- +2.40.1 + diff --git a/dev-python/pytest-shutil/pytest-shutil-1.7.0-r4.ebuild b/dev-python/pytest-shutil/pytest-shutil-1.7.0-r4.ebuild new file mode 100644 index 000000000000..964dfd2574a9 --- /dev/null +++ b/dev-python/pytest-shutil/pytest-shutil-1.7.0-r4.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYPI_NO_NORMALIZE=1 +PYTHON_COMPAT=( python3_{10..12} pypy3 ) + +inherit distutils-r1 pypi + +DESCRIPTION="A goodie-bag of unix shell and environment tools for py.test" +HOMEPAGE=" + https://github.com/man-group/pytest-plugins/ + https://pypi.org/project/pytest-shutil/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" + +RDEPEND=" + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + dev-python/execnet[${PYTHON_USEDEP}] + dev-python/path[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/termcolor[${PYTHON_USEDEP}] +" +BDEPEND=" + ${RDEPEND} + dev-python/setuptools-git[${PYTHON_USEDEP}] +" + +distutils_enable_tests pytest + +PATCHES=( + # https://github.com/man-group/pytest-plugins/pull/219 + "${FILESDIR}"/${P}-py312.patch +) + +EPYTEST_DESELECT=( + # colors no longer happen automagically to non-tty, not important + # https://github.com/man-group/pytest-plugins/pull/217 + tests/unit/test_cmdline.py::test_pretty_formatter +) + +python_prepare_all() { + # remove unnecessary deps + # (contextlib2 is not used in py3) + sed -i -e '/path\.py/d' -e '/contextlib2/d' setup.py || die + + distutils-r1_python_prepare_all +} |