!13 Discard invalid package info when it is deprecated
From: @wang--ge Reviewed-by: @cherry530 Signed-off-by: @cherry530
This commit is contained in:
commit
1f9465022d
@ -0,0 +1,26 @@
|
|||||||
|
From 0ec69cf350d7e5b3509d3c98860169145f72b25b Mon Sep 17 00:00:00 2001
|
||||||
|
From: wang__ge <wang__ge@126.com>
|
||||||
|
Date: Sun, 7 Apr 2024 15:42:22 +0800
|
||||||
|
Subject: [PATCH] discard invalid package info when it is deprecated
|
||||||
|
|
||||||
|
---
|
||||||
|
pytest_virtualenv.py | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pytest_virtualenv.py b/pytest_virtualenv.py
|
||||||
|
index dbaf45b..fd7a0f8 100644
|
||||||
|
--- a/pytest_virtualenv.py
|
||||||
|
+++ b/pytest_virtualenv.py
|
||||||
|
@@ -226,6 +226,7 @@ class VirtualEnv(Workspace):
|
||||||
|
"for i in working_set: print(i.project_name + ' ' + i.version + ' ' + i.location)"
|
||||||
|
lines = self.run([self.python, "-c", code], capture=True).split('\n')
|
||||||
|
for line in [i.strip() for i in lines if i.strip()]:
|
||||||
|
- name, version, location = line.split()
|
||||||
|
- res[name] = PackageEntry(name, version, location)
|
||||||
|
+ if (not 'DeprecationWarning:' in line.split()):
|
||||||
|
+ name, version, location = line.split()
|
||||||
|
+ res[name] = PackageEntry(name, version, location)
|
||||||
|
return res
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
@ -1,13 +1,15 @@
|
|||||||
%global _empty_manifest_terminate_build 0
|
%global _empty_manifest_terminate_build 0
|
||||||
|
%global debug_package %{nil}
|
||||||
%bcond_without tests
|
%bcond_without tests
|
||||||
|
|
||||||
Name: python-pytest-virtualenv
|
Name: python-pytest-virtualenv
|
||||||
Version: 1.7.0
|
Version: 1.7.0
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: Virtualenv fixture for py.test
|
Summary: Virtualenv fixture for py.test
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/manahl/pytest-plugins
|
URL: https://github.com/manahl/pytest-plugins
|
||||||
Source0: https://files.pythonhosted.org/packages/96/73/f3d34462e1d2de89bab407ba3dac5212e9e6996f5b4bc3c6930c68f51b62/pytest-virtualenv-1.7.0.tar.gz
|
Source0: https://files.pythonhosted.org/packages/96/73/f3d34462e1d2de89bab407ba3dac5212e9e6996f5b4bc3c6930c68f51b62/pytest-virtualenv-1.7.0.tar.gz
|
||||||
|
Patch0: 0001-discard-invalid-package-info-when-it-is-deprecated.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -46,7 +48,7 @@ Create a Python virtual environment in your test that cleans up on teardown.
|
|||||||
The fixture has utility methods to install packages and list what's installed.
|
The fixture has utility methods to install packages and list what's installed.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n pytest-virtualenv-%{version}
|
%autosetup -n pytest-virtualenv-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
@ -92,6 +94,9 @@ mv %{buildroot}/doclist.lst .
|
|||||||
%doc README.md CHANGES.md
|
%doc README.md CHANGES.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Apr 07 2024 Ge Wang <wang__ge@126.com> - 1.7.0-3
|
||||||
|
- discard invalid package info when it is deprecated
|
||||||
|
|
||||||
* Mon Jul 31 2023 xu_ping <707078654@qq.com> - 1.7.0-2
|
* Mon Jul 31 2023 xu_ping <707078654@qq.com> - 1.7.0-2
|
||||||
- remove buildrequires python3-contextlib2
|
- remove buildrequires python3-contextlib2
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user