From 5ecbe1075e8ac4438ce0ad507f67cf8937efdf3b Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Feb 26 2021 21:44:37 +0000 Subject: remove support for Python 2 subpackages as version 1.12 only supports Python 3.6+ --- diff --git a/python-certbot-apache.spec b/python-certbot-apache.spec index eb6d95b..c20bb9f 100644 --- a/python-certbot-apache.spec +++ b/python-certbot-apache.spec @@ -1,17 +1,5 @@ %global pypi_name certbot-apache -%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} >= 8) -%bcond_without python3 -%else -%bcond_with python3 -%endif - -%if (0%{?fedora} && 0%{?fedora} >= 30) || (0%{?rhel} && 0%{?rhel} >= 8) -%bcond_with python2 -%else -%bcond_without python2 -%endif - Name: python-%{pypi_name} Version: 1.12.0 Release: 1%{?dist} @@ -29,39 +17,14 @@ Source2: gpg-A2CFB51FA275A7286234E7B24D17C995CD9775F2.gpg BuildArch: noarch -%if %{with python2} -BuildRequires: python2-devel -%endif - -%if %{with python3} BuildRequires: python3-devel -%endif - -%if %{with python2} -#For running tests -BuildRequires: python2-acme >= 0.29.0 -BuildRequires: python2-certbot >= 1.6.0 -BuildRequires: python2-mock -BuildRequires: python2-zope-component -BuildRequires: python2-zope-interface -%if 0%{?rhel} && 0%{?rhel} <= 7 -# EL7 has unversioned names for these packages -BuildRequires: pytest -BuildRequires: python-augeas -%else -BuildRequires: python2-augeas -BuildRequires: python2-pytest -%endif -%endif -%if %{with python3} BuildRequires: python3-acme >= 0.29.0 BuildRequires: python3-certbot >= 1.6.0 BuildRequires: python3-augeas BuildRequires: python3-pytest BuildRequires: python3-zope-component BuildRequires: python3-zope-interface -%endif # Used to verify OpenPGP signature BuildRequires: gnupg2 @@ -69,39 +32,6 @@ BuildRequires: gnupg2 %description Plugin for certbot that allows for automatic configuration of apache -%if %{with python2} -%package -n python2-%{pypi_name} - -# Provide the name users expect as a certbot plugin -%if ( 0%{?rhel} && 0%{?rhel} <= 7 ) -Provides: %{pypi_name} = %{version}-%{release} -%endif - -# Although a plugin for the certbot command it's technically -# an extension to the certbot python libraries -Requires: python2-acme >= 0.29.0 -Requires: python2-certbot >= 1.6.0 -%if 0%{?rhel} && 0%{?rhel} <= 7 -# EL7 has unversioned names for these packages -Requires: python-augeas -%else -Requires: python2-augeas -%endif -Requires: mod_ssl -%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} >= 8) -#Recommend the CLI as that will be the interface most use -Recommends: certbot >= 0.39.0 -%else -Requires: certbot >= 0.39.0 -%endif -Summary: The apache plugin for certbot -%{?python_provide:%python_provide python2-%{pypi_name}} - -%description -n python2-%{pypi_name} -Plugin for certbot that allows for automatic configuration of apache -%endif - -%if %{with python3} %package -n python3-%{pypi_name} # Provide the name users expect as a certbot plugin @@ -126,7 +56,6 @@ Summary: The apache plugin for certbot %description -n python3-%{pypi_name} Plugin for certbot that allows for automatic configuration of apache -%endif %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' @@ -135,45 +64,20 @@ Plugin for certbot that allows for automatic configuration of apache rm -rf %{pypi_name}.egg-info %build -%if %{with python2} -%{py2_build} -%endif -%if %{with python3} %py3_build -%endif %check -%if %{with python2} -%{__python2} setup.py test -%endif -%if %{with python3} %{__python3} -m pytest -%endif %install -%if %{with python2} -%{py2_install} -%endif -%if %{with python3} %py3_install -%endif - -%if %{with python2} -%files -n python2-%{pypi_name} -%license LICENSE.txt -%doc README.rst -%{python2_sitelib}/certbot_apache -%{python2_sitelib}/certbot_apache-%{version}*.egg-info -%endif -%if %{with python3} %files -n python3-%{pypi_name} %license LICENSE.txt %doc README.rst %{python3_sitelib}/certbot_apache %{python3_sitelib}/certbot_apache-%{version}*.egg-info -%endif %changelog * Tue Feb 2 2021 Nick Bebout - 1.12.0-1