15
0

Accepting request 1159080 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1159080
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pip-licenses?expand=0&rev=15
This commit is contained in:
2024-03-19 16:31:06 +00:00
committed by Git OBS Bridge
3 changed files with 38 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
From 4c1906f3575b7893b1bd6ae6e77332c67991f1f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?=
<jaime.marquinez.ferrandiz@fastmail.net>
Date: Sat, 16 Mar 2024 22:06:29 +0100
Subject: [PATCH] Fix test_different_python under pyhon 3.12
setuptools is no longer preinstalled by the venv module.
---
test_piplicenses.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test_piplicenses.py b/test_piplicenses.py
index 41d09cf..5a704b1 100644
--- a/test_piplicenses.py
+++ b/test_piplicenses.py
@@ -867,7 +867,10 @@ def test_different_python() -> None:
package_names = sorted(set(p["name"] for p in pkgs))
print(package_names)
- assert package_names == ["pip", "setuptools"]
+ expected_packages = ["pip"]
+ if sys.version_info < (3, 12, 0):
+ expected_packages.append("setuptools")
+ assert package_names == expected_packages
def test_fail_on(monkeypatch) -> None:
--
2.44.0

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Mar 16 21:15:36 UTC 2024 - Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fastmail.net>
- Add 0001-Fix-test_different_python-under-pyhon-3.12.patch
-------------------------------------------------------------------
Tue Jan 23 06:46:01 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>

View File

@@ -24,6 +24,8 @@ Summary: Python packages license list
License: MIT
URL: https://github.com/raimon49/pip-licenses
Source: https://files.pythonhosted.org/packages/source/p/pip-licenses/pip-licenses-%{version}.tar.gz
# FIX-UPSTREAM https://github.com/raimon49/pip-licenses/pull/184
Patch1: 0001-Fix-test_different_python-under-pyhon-3.12.patch
BuildRequires: %{python_module importlib_metadata}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
@@ -32,7 +34,7 @@ BuildRequires: python-rpm-macros
Requires: python-PrettyTable
Requires: python-pip
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module build}