From 478f64032fff836061c3b4ccb48a24d2f29fd1d3 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Jan 17 2022 09:41:14 +0000 Subject: [PATCH 1/3] Switch the test runner in %check from deprecated nose to pytest Related to https://bugzilla.redhat.com/2041068 --- diff --git a/msoffcrypto-tool.spec b/msoffcrypto-tool.spec index 9351583..d8dfd47 100644 --- a/msoffcrypto-tool.spec +++ b/msoffcrypto-tool.spec @@ -3,7 +3,7 @@ Summary: Python tool for decrypting MS Office files with passwords or other keys Name: msoffcrypto-tool Version: 4.11.0 -Release: 4%{?dist} +Release: 5%{?dist} License: MIT URL: https://github.com/nolze/msoffcrypto-tool Source: https://github.com/nolze/msoffcrypto-tool/archive/v%{version}/%{name}-%{version}.tar.gz @@ -13,13 +13,12 @@ BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-cryptography >= 2.3 BuildRequires: python%{python3_pkgversion}-olefile >= 0.45 # Tests +BuildRequires: python%{python3_pkgversion}-pytest %if 0%{?fedora} BuildRequires: python%{python3_pkgversion}-coverage >= 4.5.1 -BuildRequires: python%{python3_pkgversion}-nose >= 1.3.7 %endif %if 0%{?rhel} >= 8 BuildRequires: python3.6dist(coverage) >= 4.5.1 -BuildRequires: python%{python3_pkgversion}-nose >= 1.3.7 %endif Requires: python%{python3_pkgversion}-%{modulename} @@ -50,7 +49,7 @@ intermediate key, or private key which generated its escrow key. %if 0%{?fedora} || 0%{?rhel} >= 8 %check -%{__python3} setup.py test +%pytest %endif %files @@ -63,6 +62,9 @@ intermediate key, or private key which generated its escrow key. %{python3_sitelib}/%{modulename}_tool-%{version}-py%{python3_version}.egg-info/ %changelog +* Mon Jan 17 2022 Miro Hrončok - 4.11.0-5 +- Switch the test runner in %%check from deprecated nose to pytest + * Thu Jul 22 2021 Fedora Release Engineering - 4.11.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 457f39687e89931cf9982ce0622af76406cc74ab Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Jan 17 2022 09:42:15 +0000 Subject: [PATCH 2/3] Drop undesired and unused build dependency on coverage --- diff --git a/msoffcrypto-tool.spec b/msoffcrypto-tool.spec index d8dfd47..b4ec21c 100644 --- a/msoffcrypto-tool.spec +++ b/msoffcrypto-tool.spec @@ -14,12 +14,7 @@ BuildRequires: python%{python3_pkgversion}-cryptography >= 2.3 BuildRequires: python%{python3_pkgversion}-olefile >= 0.45 # Tests BuildRequires: python%{python3_pkgversion}-pytest -%if 0%{?fedora} -BuildRequires: python%{python3_pkgversion}-coverage >= 4.5.1 -%endif -%if 0%{?rhel} >= 8 -BuildRequires: python3.6dist(coverage) >= 4.5.1 -%endif + Requires: python%{python3_pkgversion}-%{modulename} %description @@ -64,6 +59,7 @@ intermediate key, or private key which generated its escrow key. %changelog * Mon Jan 17 2022 Miro Hrončok - 4.11.0-5 - Switch the test runner in %%check from deprecated nose to pytest +- Drop undesired and unused build dependency on coverage * Thu Jul 22 2021 Fedora Release Engineering - 4.11.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 5cbe4ab2fcf13d90ef0b3ff6b6b1e7d04382918f Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Jan 17 2022 09:50:10 +0000 Subject: [PATCH 3/3] Fix Fedora/RHEL conditional around (%)pytest --- diff --git a/msoffcrypto-tool.spec b/msoffcrypto-tool.spec index b4ec21c..7e82df4 100644 --- a/msoffcrypto-tool.spec +++ b/msoffcrypto-tool.spec @@ -42,8 +42,10 @@ intermediate key, or private key which generated its escrow key. %install %py3_install -%if 0%{?fedora} || 0%{?rhel} >= 8 %check +%if 0%{?rhel} && 0%{?rhel} < 8 +pytest-3 +%else %pytest %endif