7adbe36
%global pypi_name certbot-dns-sakuracloud
7adbe36
7adbe36
%if 0%{?rhel} && 0%{?rhel} <= 7
7adbe36
%bcond_with python3
7adbe36
# EL7 has problems building the documentation due to #1492884
7adbe36
%bcond_with docs
7adbe36
%else
7adbe36
%bcond_without python3
7adbe36
%bcond_without docs
7adbe36
%endif
7adbe36
b52c79b
%if 0%{?fedora} && 0%{?fedora} >= 30
b52c79b
%bcond_with python2
b52c79b
%else
b52c79b
%bcond_without python2
b52c79b
%endif
b52c79b
7adbe36
Name:           python-%{pypi_name}
caf5b14
Version:        0.31.0
caf5b14
Release:        1%{?dist}
7adbe36
Summary:        Sakura Cloud DNS Authenticator plugin for Certbot
7adbe36
7adbe36
License:        ASL 2.0
7adbe36
URL:            https://github.com/certbot/certbot
7adbe36
Source0:        https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
7adbe36
BuildArch:      noarch
7adbe36
b52c79b
%if %{with python2}
caf5b14
BuildRequires:  python2-acme >= 0.31.0
caf5b14
BuildRequires:  python2-certbot >= 0.31.0
7adbe36
BuildRequires:  python2-devel
7adbe36
BuildRequires:  python2-dns-lexicon >= 2.1.23
7adbe36
BuildRequires:  python2-setuptools
7adbe36
BuildRequires:  python2-zope-interface
b52c79b
%endif
7adbe36
7adbe36
%if %{with python3}
caf5b14
BuildRequires:  python3-acme >= 0.31.0
caf5b14
BuildRequires:  python3-certbot >= 0.31.0
7adbe36
BuildRequires:  python3-devel
7adbe36
BuildRequires:  python3-dns-lexicon >= 2.1.23
7adbe36
BuildRequires:  python3-setuptools
7adbe36
%endif
7adbe36
7adbe36
%if %{with docs}
b52c79b
BuildRequires:  python3-sphinx
b52c79b
BuildRequires:  python3-sphinx_rtd_theme
7adbe36
%endif
7adbe36
7adbe36
%description
7adbe36
Sakura Cloud DNS Authenticator plugin for Certbot
7adbe36
b52c79b
%if %{with python2}
7adbe36
%package -n     python2-%{pypi_name}
7adbe36
Summary:        %{summary}
7adbe36
%{?python_provide:%python_provide python2-%{pypi_name}}
7adbe36
caf5b14
Requires:       python2-acme >= 0.31.0
caf5b14
Requires:       python2-certbot >= 0.31.0
7adbe36
Requires:       python2-dns-lexicon >= 2.1.23
7adbe36
Requires:       python2-mock
7adbe36
Requires:       python2-setuptools
7adbe36
Requires:       python2-zope-interface
7adbe36
ca132b9
# Provide the name users expect as a certbot plugin
ca132b9
%if 0%{?rhel} && 0%{?rhel} <= 7
ca132b9
Provides:      %{pypi_name} = %{version}-%{release}
ca132b9
%endif
ca132b9
7adbe36
%description -n python2-%{pypi_name}
7adbe36
Sakura Cloud DNS Authenticator plugin for Certbot
7adbe36
7adbe36
This is the Python 2 version of the package.
b52c79b
%endif
7adbe36
7adbe36
%if %{with python3}
7adbe36
%package -n     python3-%{pypi_name}
7adbe36
Summary:        %{summary}
7adbe36
%{?python_provide:%python_provide python3-%{pypi_name}}
7adbe36
caf5b14
Requires:       python3-acme >= 0.31.0
caf5b14
Requires:       python3-certbot >= 0.31.0
7adbe36
Requires:       python3-dns-lexicon >= 2.1.23
7adbe36
Requires:       python3-mock
7adbe36
Requires:       python3-setuptools
7adbe36
Requires:       python3-zope-interface
7adbe36
ca132b9
# Provide the name users expect as a certbot plugin
ca132b9
%if 0%{?fedora}
ca132b9
Provides:      %{pypi_name} = %{version}-%{release}
ca132b9
%endif
ca132b9
7adbe36
%description -n python3-%{pypi_name}
7adbe36
Sakura Cloud DNS Authenticator plugin for Certbot
7adbe36
7adbe36
This is the Python 3 version of the package.
7adbe36
%endif
7adbe36
7adbe36
%if %{with docs}
7adbe36
%package -n python-%{pypi_name}-doc
7adbe36
Summary:        Documentation for python-certbot-dns-sakuracloud
7adbe36
%description -n python-%{pypi_name}-doc
7adbe36
Documentation for python-certbot-dns-sakuracloud
7adbe36
%endif
7adbe36
7adbe36
%prep
7adbe36
%autosetup -n %{pypi_name}-%{version}
7adbe36
# Remove bundled egg-info
7adbe36
rm -rf %{pypi_name}.egg-info
7adbe36
7adbe36
%build
b52c79b
%if %{with python2}
7adbe36
%py2_build
b52c79b
%endif
7adbe36
7adbe36
%if %{with python3}
7adbe36
%py3_build
7adbe36
%endif
7adbe36
7adbe36
%if %{with docs}
b52c79b
sphinx-build-3 docs html
7adbe36
rm -rf html/.{doctrees,buildinfo}
7adbe36
%endif
7adbe36
7adbe36
%install
b52c79b
%if %{with python2}
7adbe36
%py2_install
b52c79b
%endif
7adbe36
7adbe36
%if %{with python3}
7adbe36
%py3_install
7adbe36
%endif
7adbe36
7adbe36
%check
b52c79b
%if %{with python2}
7adbe36
%{__python2} setup.py test
b52c79b
%endif
7adbe36
7adbe36
%if %{with python3}
7adbe36
%{__python3} setup.py test
7adbe36
%endif
7adbe36
b52c79b
%if %{with python2}
7adbe36
%files -n python2-%{pypi_name}
7adbe36
%license LICENSE.txt
7adbe36
%doc README.rst
7adbe36
%{python2_sitelib}/certbot_dns_sakuracloud
7adbe36
%{python2_sitelib}/certbot_dns_sakuracloud-%{version}-py?.?.egg-info
b52c79b
%endif
7adbe36
7adbe36
%if %{with python3}
7adbe36
%files -n python3-%{pypi_name}
7adbe36
%license LICENSE.txt
7adbe36
%doc README.rst
7adbe36
%{python3_sitelib}/certbot_dns_sakuracloud
7adbe36
%{python3_sitelib}/certbot_dns_sakuracloud-%{version}-py?.?.egg-info
7adbe36
%endif
7adbe36
7adbe36
%if %{with docs}
7adbe36
%files doc
7adbe36
%license LICENSE.txt
7adbe36
%doc README.rst
7adbe36
%doc html
7adbe36
%endif
7adbe36
7adbe36
%changelog
caf5b14
* Fri Feb 08 2019 Eli Young <elyscape@gmail.com> - 0.31.0-1
caf5b14
- Update to 0.31.0 (#1673774)
caf5b14
a3a974b
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.2-2
a3a974b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
a3a974b
d7526e6
* Mon Jan 28 2019 Eli Young <elyscape@gmail.com> - 0.30.2-1
d7526e6
- Update to 0.30.2 (#1669328)
d7526e6
600e112
* Tue Dec 11 2018 Eli Young <elyscape@gmail.com> - 0.29.1-1
600e112
- Update to 0.29.1
b52c79b
- Remove Python 2 package in Fedora 30+ (#1654016)
600e112
5f65384
* Wed Nov 14 2018 Eli Young <elyscape@gmail.com> - 0.28.0-1
5f65384
- Update to 0.28.0
5f65384
1aea54d
* Mon Sep 10 2018 Eli Young <elyscape@gmail.com> - 0.27.1-1
1aea54d
- Update to 0.27.1 (#1627584)
1aea54d
5b40ab8
* Thu Jul 19 2018 Eli Young <elyscape@gmail.com> - 0.26.1-1
5b40ab8
- Update to 0.26.1
5b40ab8
7adbe36
* Tue Jul 17 2018 Eli Young <elyscape@gmail.com> - 0.26.0-1
7adbe36
- Initial import (#1602111)