From 1fdb9686a575f369dedf8954abf361afe212b2bf Mon Sep 17 00:00:00 2001 From: Marek Blaha Date: Wed, 16 Feb 2022 09:01:23 +0100 Subject: [PATCH] Update to 1.7.0 Update to upstream release 1.7.0. Drop Python 2 support in the spec. Run tests using tox. Resolves: #2054810 --- .gitignore | 1 + python-distro.spec | 87 +++++++++------------------------------------- sources | 2 +- 3 files changed, 18 insertions(+), 72 deletions(-) diff --git a/.gitignore b/.gitignore index 439e292..a1b8b49 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /distro-1.4.0.tar.gz /distro-1.5.0.tar.gz /distro-1.6.0.tar.gz +/distro-1.7.0.tar.gz diff --git a/python-distro.spec b/python-distro.spec index 4605792..912a5da 100644 --- a/python-distro.spec +++ b/python-distro.spec @@ -1,21 +1,15 @@ %global pypi_name distro -%if 0%{?rhel} && 0%{?rhel} <= 7 -%bcond_with python3 -%bcond_without python2 -%else -%bcond_without python3 -%bcond_with python2 -%endif Name: python-%{pypi_name} -Version: 1.6.0 -Release: 2%{?dist} +Version: 1.7.0 +Release: 1%{?dist} Summary: Linux Distribution - a Linux OS platform information API License: ASL 2.0 URL: https://github.com/python-distro/distro Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch +BuildRequires: python3-devel %global _description \ The distro (for: Linux Distribution) package provides information about the\ @@ -33,92 +27,43 @@ for more information. %description %{_description} -%if %{with python2} -%package -n python2-%{pypi_name} -Summary: %{summary} -%{?python_provide:%python_provide python2-%{pypi_name}} -BuildRequires: python2-devel -%if 0%{?rhel} && 0%{?rhel} <= 7 -BuildRequires: python-setuptools -BuildRequires: pytest -%else -BuildRequires: python2-setuptools -BuildRequires: python2-pytest -%endif -%if 0%{?fedora} -Suggests: /usr/bin/lsb_release -%endif - -%description -n python2-%{pypi_name} %{_description} - -Python 2 version. -%endif - -%if %{with python3} %package -n python3-%{pypi_name} Summary: %{summary} -%{?python_provide:%python_provide python3-%{pypi_name}} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pytest %if 0%{?fedora} Suggests: /usr/bin/lsb_release %endif %description -n python3-%{pypi_name} %{_description} -Python 3 version. -%endif - %prep %autosetup -n %{pypi_name}-%{version} -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info + +%generate_buildrequires +%pyproject_buildrequires -t %build -%if %{with python2} -%py2_build -%endif -%if %{with python3} -%py3_build -%endif +%pyproject_wheel %install -%if %{with python2} -%py2_install -%endif -%if %{with python3} -%py3_install -%endif +%pyproject_install -%if %{with python2} -%files -n python2-%{pypi_name} -%doc CHANGELOG.md CONTRIBUTORS.md README.md -%license LICENSE -%{python2_sitelib}/%{pypi_name}-*.egg-info/ -%{python2_sitelib}/%{pypi_name}.py* -%endif - -%if %{with python3} %files -n python3-%{pypi_name} %doc CHANGELOG.md CONTRIBUTORS.md README.md %license LICENSE -%{python3_sitelib}/%{pypi_name}-*.egg-info/ -%{python3_sitelib}/%{pypi_name}.py -%{python3_sitelib}/__pycache__/%{pypi_name}.* -%endif +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ %{_bindir}/distro %check -%if %{with python2} -%{__python2} -m pytest tests -v -%endif -%if %{with python3} -%{__python3} -m pytest tests -v -%endif +%tox %changelog +* Wed Feb 16 2022 Marek Blaha - 1.7.0-1 +- Update to 1.7.0 (#2054810) +- Drop Python 2 support in the spec +- Run tests using tox + * Fri Jan 21 2022 Fedora Release Engineering - 1.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index de33b6c..f387c82 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (distro-1.6.0.tar.gz) = 48cff21ea152ec57c4505a72ffb1af5a138199f10ea908e138d16f48732f602a5b4f8bec2ee76b629981a1625453adf1b6895f4573229002b3b3ff7b76efbede +SHA512 (distro-1.7.0.tar.gz) = 6d2e2640b5233f9503adec1290d61cfe58a75faba75b42c71c219c73cf32d7a071018543721894d2565219d3d41b616300469bac8d6d4c5a91db89120343d32e