diff --git a/aggregate6-1.0.12-deprecated.patch b/aggregate6-1.0.12-deprecated.patch new file mode 100644 index 0000000..c78b546 --- /dev/null +++ b/aggregate6-1.0.12-deprecated.patch @@ -0,0 +1,40 @@ +From b9571547316cf3d5b2f440d68f9f3fc99040dc0d Mon Sep 17 00:00:00 2001 +From: Robert Scheck +Date: Sat, 8 Oct 2022 20:53:47 +0200 +Subject: [PATCH] Don't require Python nose and mock + +--- + setup.py | 2 +- + tests/test_regression.py | 6 +++++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index b880f27..c14a6a9 100644 +--- a/setup.py ++++ b/setup.py +@@ -70,7 +70,7 @@ + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6' + ], +- setup_requires=["nose", "coverage", "mock"], ++ tests_require=["mock;python_version<'3.3'", "coverage"], + install_requires=["py-radix==0.10.0"] + ( + ["future", "ipaddress"] if sys.version_info.major == 2 else [] + ), +diff --git a/tests/test_regression.py b/tests/test_regression.py +index 8a71c7b..5f5e738 100644 +--- a/tests/test_regression.py ++++ b/tests/test_regression.py +@@ -4,7 +4,11 @@ + from aggregate6.aggregate6 import parse_args + from aggregate6.aggregate6 import main as agg_main + +-from mock import patch ++try: ++ from unittest.mock import patch ++except ImportError: ++ from mock import patch ++ + import io + import sys + import unittest diff --git a/aggregate6.spec b/aggregate6.spec index 3e10642..77c3723 100644 --- a/aggregate6.spec +++ b/aggregate6.spec @@ -1,10 +1,12 @@ Summary: Tool to compress an unsorted list of IPv4 and IPv6 prefixes Name: aggregate6 -Version: 1.0.14 -Release: 7%{?dist} +Version: 1.0.12 +Release: 2%{?dist} License: BSD-2-Clause URL: https://github.com/job/aggregate6 Source0: https://github.com/job/aggregate6/archive/%{version}/%{name}-%{version}.tar.gz +# Don't require Python nose and mock +Patch0: https://github.com/job/aggregate6/commit/b9571547316cf3d5b2f440d68f9f3fc99040dc0d.patch#/aggregate6-1.0.12-deprecated.patch BuildRequires: python%{python3_pkgversion}-devel # Tests BuildRequires: python%{python3_pkgversion}-pytest @@ -23,6 +25,7 @@ Summary: Python module to compress an unsorted list of IPv4 and IPv6 pref BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-py-radix >= 0.10.0 %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} +%{?el7:Requires:python%{python3_pkgversion}-py-radix >= 0.10.0} %endif %description -n python%{python3_pkgversion}-%{name} @@ -54,6 +57,7 @@ filters. %else %py3_install %{?el8:%py3_shebang_fix $RPM_BUILD_ROOT%{_bindir}/%{name}} +%{?el7:pathfix.py -pni "%{__python3} %{py3_shbang_opts}" $RPM_BUILD_ROOT%{_bindir}/%{name}} %endif # Correct man page installation path @@ -65,7 +69,11 @@ sed -e '1{\|^#![[:space:]]*/|d}' -i $RPM_BUILD_ROOT%{python3_sitelib}/%{name}/%{ touch -c -r %{name}/%{name}.py $RPM_BUILD_ROOT%{python3_sitelib}/%{name}/%{name}.py %check +%if 0%{?rhel} && 0%{?rhel} < 8 +PYTHONPATH=$RPM_BUILD_ROOT%{python3_sitelib} pytest-3 +%else %pytest +%endif %files %doc README.md @@ -82,42 +90,6 @@ touch -c -r %{name}/%{name}.py $RPM_BUILD_ROOT%{python3_sitelib}/%{name}/%{name} %license LICENSE %changelog -* Fri Jan 16 2026 Fedora Release Engineering - 1.0.14-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Fri Sep 19 2025 Python Maint - 1.0.14-6 -- Rebuilt for Python 3.14.0rc3 bytecode - -* Fri Aug 15 2025 Python Maint - 1.0.14-5 -- Rebuilt for Python 3.14.0rc2 bytecode - -* Wed Jul 23 2025 Fedora Release Engineering - 1.0.14-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Mon Jun 02 2025 Python Maint - 1.0.14-3 -- Rebuilt for Python 3.14 - -* Thu Jan 16 2025 Fedora Release Engineering - 1.0.14-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Tue Dec 17 2024 Robert Scheck 1.0.14-1 -- Upgrade to 1.0.14 (#2332819) - -* Thu Nov 14 2024 Robert Scheck 1.0.13-1 -- Upgrade to 1.0.13 (#2325875) - -* Wed Jul 17 2024 Fedora Release Engineering - 1.0.12-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Mon Jun 17 2024 Python Maint - 1.0.12-5 -- Rebuilt for Python 3.13 - -* Mon Jan 22 2024 Fedora Release Engineering - 1.0.12-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 1.0.12-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - * Tue Aug 08 2023 Robert Scheck 1.0.12-2 - Changes to match the Fedora Packaging Guidelines diff --git a/sources b/sources index ad582df..4926e1c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (aggregate6-1.0.14.tar.gz) = 09c63b19068b63411b96b4c3f8982d4fc12f91dcab751bb52ab61606396f268183fb73fd2b5488e88b7fa1a07301bda6b73a44871c9967da2ddd3319f3fcaaac +SHA512 (aggregate6-1.0.12.tar.gz) = 621a767939c6952f509a64adac83781ef967f4b30e76069c4fed07d9258f7a924049a2ffb4649fdda5fa1f536ca27b1f34a878c359d5699bb0324e96ae3ddc44