diff --git a/python-certbot-dns-dnsmadeeasy.spec b/python-certbot-dns-dnsmadeeasy.spec index 71c961a..25a2880 100644 --- a/python-certbot-dns-dnsmadeeasy.spec +++ b/python-certbot-dns-dnsmadeeasy.spec @@ -1,4 +1,3 @@ -# Created by pyp2rpm-3.2.2 %global pypi_name certbot-dns-dnsmadeeasy %if 0%{?rhel} && 0%{?rhel} <= 7 @@ -7,6 +6,12 @@ %bcond_without python3 %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} @@ -17,14 +22,16 @@ 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-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: python2-sphinx +BuildRequires: python3-sphinx BuildRequires: python3-certbot >= 0.21.1 BuildRequires: python3-devel BuildRequires: python3-dns-lexicon >= 2.2.1 @@ -35,6 +42,7 @@ BuildRequires: python3-zope-interface %description DNS Made Easy DNS Authenticator plugin for Certbot +%if %{with python2} %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} @@ -48,6 +56,7 @@ Requires: python2-zope-interface %description -n python2-%{pypi_name} DNS Made Easy DNS Authenticator plugin for Certbot +%endif %if %{with python3} %package -n python3-%{pypi_name} @@ -76,39 +85,44 @@ Documentation for certbot-dns-dnsmadeeasy rm -rf %{pypi_name}.egg-info %build +%if %{with python2} %py2_build +%endif %if %{with python3} %py3_build -# generate html docs -sphinx-build docs html +# generate html docs +sphinx-build-3 docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %endif %install -# Must do the subpackages' install first because the scripts in /usr/bin are -# overwritten with every setup.py install. +%if %{with python2} +%py2_install +%endif %if %{with python3} %py3_install %endif -%py2_install - %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_dnsmadeeasy %{python2_sitelib}/certbot_dns_dnsmadeeasy-%{version}-py?.?.egg-info +%endif %if %{with python3} %files -n python3-%{pypi_name} @@ -118,12 +132,13 @@ rm -rf html/.{doctrees,buildinfo} %{python3_sitelib}/certbot_dns_dnsmadeeasy-%{version}-py?.?.egg-info %files -n python-%{pypi_name}-doc -%doc html +%doc html %endif %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