discard invalid package info when it is deprecated
This commit is contained in:
parent
6c2b1f5c9d
commit
d86b8cefac
@ -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 debug_package %{nil}
|
||||
%bcond_without tests
|
||||
|
||||
Name: python-pytest-virtualenv
|
||||
Version: 1.7.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: Virtualenv fixture for py.test
|
||||
License: MIT
|
||||
URL: https://github.com/manahl/pytest-plugins
|
||||
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
|
||||
|
||||
%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.
|
||||
|
||||
%prep
|
||||
%autosetup -n pytest-virtualenv-%{version}
|
||||
%autosetup -n pytest-virtualenv-%{version} -p1
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
@ -92,6 +94,9 @@ mv %{buildroot}/doclist.lst .
|
||||
%doc README.md CHANGES.md
|
||||
|
||||
%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
|
||||
- remove buildrequires python3-contextlib2
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user