From 413fef542b3d425975bd6eb4474439c9dace0ef2 Mon Sep 17 00:00:00 2001 From: Eli Young Date: Dec 11 2018 02:48:15 +0000 Subject: Remove Python 2 package in Fedora 30+ (#1654016) --- diff --git a/python-certbot-dns-linode.spec b/python-certbot-dns-linode.spec index 400077a..8dc212a 100644 --- a/python-certbot-dns-linode.spec +++ b/python-certbot-dns-linode.spec @@ -9,6 +9,12 @@ %bcond_without docs %endif +%if 0%{?fedora} && 0%{?fedora} >= 30 +%bcond_with python2 +%else +%bcond_without python2 +%endif + Name: python-%{pypi_name} Version: 0.29.1 Release: 1%{?dist} @@ -19,12 +25,14 @@ URL: https://github.com/certbot/certbot Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch +%if %{with python2} BuildRequires: python2-acme >= 0.21.1 BuildRequires: python2-certbot >= 0.21.1 BuildRequires: python2-devel BuildRequires: python2-dns-lexicon >= 2.2.1 BuildRequires: python2-setuptools BuildRequires: python2-zope-interface +%endif %if %{with python3} BuildRequires: python3-acme >= 0.21.1 @@ -35,13 +43,14 @@ BuildRequires: python3-setuptools %endif %if %{with docs} -BuildRequires: python2-sphinx -BuildRequires: python2-sphinx_rtd_theme +BuildRequires: python3-sphinx +BuildRequires: python3-sphinx_rtd_theme %endif %description Linode DNS Authenticator plugin for Certbot +%if %{with python2} %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} @@ -57,6 +66,7 @@ Requires: python2-zope-interface Linode DNS Authenticator plugin for Certbot This is the Python 2 version of the package. +%endif %if %{with python3} %package -n python3-%{pypi_name} @@ -74,7 +84,6 @@ Requires: python3-zope-interface Linode DNS Authenticator plugin for Certbot This is the Python 3 version of the package. - %endif %if %{with docs} @@ -82,7 +91,6 @@ This is the Python 3 version of the package. Summary: Documentation for python-certbot-dns-linode %description -n python-%{pypi_name}-doc Documentation for python-certbot-dns-linode - %endif %prep @@ -91,36 +99,44 @@ Documentation for python-certbot-dns-linode rm -rf %{pypi_name}.egg-info %build +%if %{with python2} %py2_build +%endif %if %{with python3} %py3_build %endif %if %{with docs} -sphinx-build docs html +sphinx-build-3 docs html rm -rf html/.{doctrees,buildinfo} %endif %install +%if %{with python2} %py2_install +%endif %if %{with python3} %py3_install %endif %check +%if %{with python2} %{__python2} setup.py test +%endif %if %{with python3} %{__python3} setup.py test %endif +%if %{with python2} %files -n python2-%{pypi_name} %license LICENSE.txt %doc README.rst %{python2_sitelib}/certbot_dns_linode %{python2_sitelib}/certbot_dns_linode-%{version}-py?.?.egg-info +%endif %if %{with python3} %files -n python3-%{pypi_name} @@ -140,6 +156,7 @@ rm -rf html/.{doctrees,buildinfo} %changelog * Tue Dec 11 2018 Eli Young - 0.29.1-1 - Update to 0.29.1 +- Remove Python 2 package in Fedora 30+ (#1654016) * Wed Nov 14 2018 Eli Young - 0.28.0-1 - Update to 0.28.0