From bd83d3fd426f18db2539834bc434832ad1af94bc Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Dec 04 2019 09:45:54 +0000 Subject: get rid of Python 2 support in the spec file --- diff --git a/ansible-review.spec b/ansible-review.spec index 0138b88..274de13 100644 --- a/ansible-review.spec +++ b/ansible-review.spec @@ -1,11 +1,3 @@ - -%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 -# Ansible stopped shipping Python 2 modules in Fedora 29+ -%bcond_with python2 -%else -%bcond_without python2 -%endif - Name: ansible-review Version: 0.13.9 Release: 1%{?dist} @@ -20,29 +12,6 @@ Tool to review Ansible playbooks, roles, and inventory and suggest improvements. %description %_description -%if %{with python2} -%package -n python2-%{name} -Summary: %summary -BuildRequires: python2-devel -BuildRequires: python2-nose -Requires: python2-ansible-lint >= 3.4.19-2 -Requires: python2-yaml -Requires: python2-appdirs -Requires: python2-unidiff -Requires: python2-flake8 -# Runtime requirements also needed in the build to run tests: -BuildRequires: python2-ansible-lint >= 3.4.19-2 -BuildRequires: python2-yaml -BuildRequires: python2-appdirs -BuildRequires: python2-unidiff -BuildRequires: python2-flake8 -%{?python_provide:%python_provide python2-%{name}} -Provides: %{name} = %{version}-%{release} -Obsoletes: %{name} < 0.13.4-2 - -%description -n python2-%{name} %_description -%endif - %package -n python3-%{name} Summary: %summary @@ -61,12 +30,6 @@ BuildRequires: python3-appdirs BuildRequires: python3-unidiff BuildRequires: python3-flake8 %{?python_provide:%python_provide python3-%{name}} -%if ! %{with python2} -Provides: %{name} = %{version}-%{release} -Obsoletes: %{name} < 0.13.4-4 -# /usr/bin/ansible-review moved from python2 to python3 subpackage in 0.13.4-4 -Conflicts: python2-%{name} < 0.13.4-4 -%endif %description -n python3-%{name} %_description @@ -74,43 +37,20 @@ Conflicts: python2-%{name} < 0.13.4-4 %autosetup -p1 %build -%if %{with python2} -%py2_build -%endif %py3_build %install %py3_install -%if %{with python2} -# Rename Python 3 executable file -mv %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-3 -%py2_install -%else -# Symlink old Python 3 command for compatbility -ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-3 -%endif +# Symlink old Python 3 command for compatibility +ln -s %{name} %{buildroot}%{_bindir}/%{name}-3 %check -%if %{with python2} -nosetests-%{python2_version} -v test/ -%endif nosetests-%{python3_version} -v test/ -%if %{with python2} -%files -n python2-%{name} -%license LICENSE -%doc README.md -%{_bindir}/%{name} -%{python2_sitelib}/ansiblereview -%{python2_sitelib}/ansible_review*.egg-info -%endif - %files -n python3-%{name} %license LICENSE %doc README.md -%if ! %{with python2} %{_bindir}/%{name} -%endif %{_bindir}/%{name}-3 %{python3_sitelib}/ansiblereview %{python3_sitelib}/ansible_review*.egg-info @@ -119,6 +59,7 @@ nosetests-%{python3_version} -v test/ * Wed Dec 04 2019 Nils Philippsen - 0.13.9-1 - upstream bugfix release 0.13.9: https://github.com/willthames/ansible-review/blob/master/CHANGELOG.md#0139 +- get rid of Python 2 support in the spec file * Thu Oct 03 2019 Miro HronĨok - 0.13.7-7 - Rebuilt for Python 3.8.0rc1 (#1748018)