%global pyname certbot-dns-route53 # On fedora use python3 for certbot %if 0%{?fedora} %bcond_without python3 %else %bcond_with python3 %endif Name: python-%{pyname} Version: 0.18.1 Release: 1%{?dist} Summary: The route53 DNS plugin for certbot License: ASL 2.0 URL: https://pypi.python.org/pypi/certbot-dns-route53 Source0: https://files.pythonhosted.org/packages/source/c/%{pyname}/%{pyname}-%{version}.tar.gz %if 0%{?rhel} Patch0: allow-old-setuptools.patch %endif BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-boto3 BuildRequires: python2-mock BuildRequires: python2-setuptools >= 1.0 %if %{with python3} BuildRequires: python3-devel BuildRequires: python3-boto3 BuildRequires: python3-mock BuildRequires: python3-setuptools >= 1.0 %endif #For running tests BuildRequires: python2-certbot = %{version} %if %{with python3} BuildRequires: python3-certbot = %{version} %endif %description Plugin for certbot that allows for automatic configuration of apache %package -n python2-%{pyname} # Provide the name users expect as a certbot plugin Provides: %{pyname} = %{version}-%{release} # Although a plugin for the certbot command it's technically # an extension to the certbot python libraries Requires: python2-certbot = %{version} Requires: python2-boto3 Requires: python2-mock %if 0%{?fedora} #Recommend the CLI as that will be the interface most use Recommends: certbot = %{version} %else Requires: certbot = %{version} %endif Summary: The route53 plugin for certbot %{?python_provide:%python_provide python2-%{pyname}} %description -n python2-%{pyname} Plugin for certbot that allows for dns validation for Route53 %if %{with python3} %package -n python3-%{pyname} # Provide the name users expect as a certbot plugin Provides: %{pyname} = %{version}-%{release} # Although a plugin for the certbot command it's technically # an extension to the certbot python libraries Requires: python3-certbot = %{version} Requires: python3-boto3 Requires: python3-mock %if 0%{?fedora} #Recommend the CLI as that will be the interface most use Recommends: certbot = %{version} %else Requires: certbot = %{version} %endif Summary: The route53 plugin for certbot %{?python_provide:%python_provide python3-%{pyname}} %description -n python3-%{pyname} Plugin for certbot that allows for dns validation for Route53 %endif %prep %setup -n %{pyname}-%{version} %if 0%{?rhel} %patch0 -p1 %endif %build %{py2_build} %if %{with python3} %py3_build %endif %check %{__python2} setup.py test %if %{with python3} %{__python3} setup.py test %endif %install %{py2_install} %if %{with python3} %py3_install %endif %files -n python2-%{pyname} %license LICENSE %doc README.md %{python2_sitelib}/certbot_dns_route53 %{python2_sitelib}/certbot_dns_route53-%{version}*.egg-info %if %{with python3} %files -n python3-%{pyname} %license LICENSE %doc README.md %{python3_sitelib}/certbot_dns_route53 %{python3_sitelib}/certbot_dns_route53-%{version}*.egg-info %endif %changelog * Mon Sep 18 2017 Nick Bebout - 0.18.1-1 - Initial packaging of the plugin