Import F44

This commit is contained in:
eabdullin 2025-10-08 13:12:19 +03:00
parent bc439a6ddd
commit 4853fa141c
4 changed files with 72 additions and 157 deletions

1
.gitignore vendored
View File

@ -37,3 +37,4 @@
/productmd-1.36.tar.gz
/productmd-1.37.tar.gz
/productmd-1.38.tar.gz
/productmd-1.48.tar.gz

View File

@ -1,75 +0,0 @@
From b091abdc917c2eca544e5928b85b2bb9270912b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Thu, 31 Oct 2019 14:25:18 +0100
Subject: [PATCH] Make tests pass on Python 2.6
---
tests/test_extra_files.py | 43 ++++++++++++++++++++++++++++++---------
1 file changed, 33 insertions(+), 10 deletions(-)
diff --git a/tests/test_extra_files.py b/tests/test_extra_files.py
index 54115e9..7848fd9 100755
--- a/tests/test_extra_files.py
+++ b/tests/test_extra_files.py
@@ -63,28 +63,51 @@ def _test_identity(self, modules):
def test_bad_checksums(self):
metadata = ExtraFiles()
- with self.assertRaises(TypeError):
- metadata.add("Everything", "x86_64", "path/to/file", size=1, checksums="no")
+ self.assertRaises(
+ TypeError,
+ metadata.add,
+ "Everything",
+ "x86_64",
+ "path/to/file",
+ size=1,
+ checksums="no",
+ )
def test_bad_variant(self):
metadata = ExtraFiles()
- with self.assertRaises(ValueError):
- metadata.add("", "x86_64", "path/to/file", size=1, checksums={})
+ self.assertRaises(
+ ValueError, metadata.add, "", "x86_64", "path/to/file", size=1, checksums={}
+ )
def test_bad_arch(self):
metadata = ExtraFiles()
- with self.assertRaises(ValueError):
- metadata.add("Everything", "foobar", "path/to/file", size=1, checksums={})
+ self.assertRaises(
+ ValueError,
+ metadata.add,
+ "Everything",
+ "foobar",
+ "path/to/file",
+ size=1,
+ checksums={},
+ )
def test_bad_path(self):
metadata = ExtraFiles()
- with self.assertRaises(ValueError):
- metadata.add("Everything", "foobar", "", size=1, checksums={})
+ self.assertRaises(
+ ValueError, metadata.add, "Everything", "foobar", "", size=1, checksums={}
+ )
def test_absolute_path(self):
metadata = ExtraFiles()
- with self.assertRaises(ValueError):
- metadata.add("Everything", "foobar", "/path", size=1, checksums={})
+ self.assertRaises(
+ ValueError,
+ metadata.add,
+ "Everything",
+ "foobar",
+ "/path",
+ size=1,
+ checksums={},
+ )
def test_fedora_20(self):
metadata = ExtraFiles()

View File

@ -1,22 +1,15 @@
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_without python2
%else
%bcond_with python2
%endif
%bcond_without python3
%global srcname productmd
Name: python-%{srcname}
Version: 1.38
Release: 5%{?dist}
Name: python-productmd
Version: 1.48
Release: 4%{?dist}
Summary: Library providing parsers for metadata related to OS installation
License: LGPL-2.1-only
URL: https://github.com/release-engineering/productmd
Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
Source: %{pypi_source productmd}
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-pytest
%global _description \
Python library providing parsers for metadata related to composes\
@ -24,90 +17,86 @@ and installation media.
%description %_description
%if 0%{?with_python2}
%package -n python2-%{srcname}
Summary: %summary
Obsoletes: productmd <= %{version}-%{release}
Provides: productmd = %{version}-%{release}
BuildRequires: python2-devel
%if 0%{?rhel} && 0%{?rhel} <= 7
BuildRequires: python-setuptools
BuildRequires: python-six
Requires: python-six
%else
BuildRequires: python2-setuptools
BuildRequires: python2-six
Requires: python2-six
%endif
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname} %_description
%endif
%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-%{srcname}
%package -n python3-productmd
Summary: %{summary}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-six
Requires: python%{python3_pkgversion}-six
%description -n python%{python3_pkgversion}-%{srcname} %_description
%endif
%description -n python3-productmd %_description
%prep
%autosetup -n %{srcname}-%{version} -p1
%autosetup -n productmd-%{version} -p1
%generate_buildrequires
%pyproject_buildrequires
%build
%if 0%{?with_python2}
%py2_build
%endif
%if 0%{?with_python3}
%py3_build
%endif
%pyproject_wheel
%install
%if 0%{?with_python2}
%py2_install
%endif
%if 0%{?with_python3}
%py3_install
%endif
%pyproject_install
%pyproject_save_files productmd
%check
%if 0%{?with_python2}
%{__python2} ./setup.py test
%endif
%pytest
%if 0%{?with_python3}
%{__python3} ./setup.py test
%endif
%if 0%{?with_python2}
%files -n python2-%{srcname}
%files -n python3-productmd -f %{pyproject_files}
%license LICENSE
%doc AUTHORS
%{python2_sitelib}/productmd/
%{python2_sitelib}/productmd-%{version}-py?.?.egg-info
%endif
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE
%doc AUTHORS
%{python3_sitelib}/productmd/
%{python3_sitelib}/productmd-%{version}-py%{python3_version}.egg-info
%endif
%changelog
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.38-5
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 1.48-4
- Rebuilt for Python 3.14.0rc3 bytecode
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.38-4
- Bump release for June 2024 mass rebuild
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 1.48-3
- Rebuilt for Python 3.14.0rc2 bytecode
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.48-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jul 08 2025 Lubomír Sedlář <lsedlar@redhat.com> - 1.48-1
- Another fixup for dropping python-six
* Mon Jul 07 2025 Lubomír Sedlář <lsedlar@redhat.com> - 1.47-1
- Fixup for dropping python-six
* Fri Jul 04 2025 Lubomír Sedlář <lsedlar@redhat.com> - 1.46-1
- New upstream release 1.46
* Thu Jul 03 2025 Adam Williamson <awilliam@redhat.com> - 1.45-3
- Backport PR #188 to fix composes with WSL images
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 1.45-2
- Rebuilt for Python 3.14
* Mon Apr 14 2025 Lubomír Sedlář <lsedlar@redhat.com> - 1.45-1
- New upstream release 1.45
* Fri Apr 11 2025 Lubomír Sedlář <lsedlar@redhat.com> - 1.44-1
- New upstream release 1.44
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.43-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Mon Dec 09 2024 Lubomír Sedlář <lsedlar@redhat.com> - 1.43-1
- New upstream release 1.43
* Tue Nov 19 2024 Adam Williamson <awilliam@redhat.com> - 1.41-2
- Backport #180 to add types/formats to support new FEX backing images
* Mon Nov 04 2024 Lubomír Sedlář <lsedlar@redhat.com> - 1.41-1
- Update RPM_ARCHES to match dnf
* Thu Aug 29 2024 Lubomír Sedlář <lsedlar@redhat.com> - 1.40-1
- Remove iso image type again
* Wed Aug 28 2024 Lubomír Sedlář <lsedlar@redhat.com> - 1.39-1
- New upstream release
- Adds appx and iso as image types for kiwibuilds
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.38-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 1.38-4
- Rebuilt for Python 3.13
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.38-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (productmd-1.38.tar.gz) = 664f2869a29fb2a5f0d330f7932c0c26eb42db2361a95bddca07b189748b41ac5b1d88efda9b06b322a692c594f883a190a7a0fa18b518855b6dbbe0ee5bc963
d5ca248fa3cf5d2ce3f6b02cb0f4173b44c83e4908ec55b3404fa0c9e876cc9fcca4e887b3e6678dfe406836dfa50fc1d4d84bf59ea593c2374a85267fc827cd productmd-1.48.tar.gz