| |
@@ -1,7 +1,11 @@
|
| |
%global pypi_name dns-lexicon
|
| |
+ %global py3_prefix python%{python3_pkgversion}
|
| |
|
| |
- %if 0%{?rhel} && 0%{?rhel} <= 7
|
| |
+ %if 0%{?rhel} && 0%{?rhel} == 7
|
| |
%global rhel7 1
|
| |
+ %endif
|
| |
+
|
| |
+ %if 0%{?rhel} && 0%{?rhel} <= 6
|
| |
%bcond_with python3
|
| |
%else
|
| |
%bcond_without python3
|
| |
@@ -22,7 +26,7 @@
|
| |
|
| |
Name: python-%{pypi_name}
|
| |
Version: 3.3.4
|
| |
- Release: 2%{?dist}
|
| |
+ Release: 3%{?dist}
|
| |
Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way
|
| |
|
| |
License: MIT
|
| |
@@ -31,10 +35,7 @@
|
| |
BuildArch: noarch
|
| |
|
| |
Patch0: 0000-remove-shebang.patch
|
| |
-
|
| |
- %if 0%{?rhel7}
|
| |
Patch1: 0001-fix-requirements.patch
|
| |
- %endif
|
| |
|
| |
%if %{with python2}
|
| |
BuildRequires: python2-devel
|
| |
@@ -72,15 +73,15 @@
|
| |
%endif
|
| |
|
| |
%if %{with python3}
|
| |
- BuildRequires: python3-devel
|
| |
- BuildRequires: python3-setuptools
|
| |
- BuildRequires: python3-cryptography
|
| |
- BuildRequires: python3-future
|
| |
- BuildRequires: python3-pyOpenSSL
|
| |
- BuildRequires: python3-tldextract
|
| |
-
|
| |
- %if 0%{?fedora} && 0%{?fedora} <= 28
|
| |
- BuildRequires: python3-PyYAML
|
| |
+ BuildRequires: %{py3_prefix}-devel
|
| |
+ BuildRequires: %{py3_prefix}-setuptools
|
| |
+ BuildRequires: %{py3_prefix}-cryptography
|
| |
+ BuildRequires: %{py3_prefix}-future
|
| |
+ BuildRequires: %{py3_prefix}-pyOpenSSL
|
| |
+ BuildRequires: %{py3_prefix}-tldextract
|
| |
+
|
| |
+ %if 0%{?fedora} <= 28 || 0%{?rhel7}
|
| |
+ BuildRequires: %{py3_prefix}-PyYAML
|
| |
%else
|
| |
BuildRequires: python3-pyyaml
|
| |
%endif
|
| |
@@ -88,10 +89,10 @@
|
| |
# Extras requirements
|
| |
# {{{
|
| |
%if %{with extras}
|
| |
- BuildRequires: python3-beautifulsoup4
|
| |
- BuildRequires: python3-boto3
|
| |
- BuildRequires: python3-dns
|
| |
- BuildRequires: python3-xmltodict
|
| |
+ BuildRequires: %{py3_prefix}-beautifulsoup4
|
| |
+ BuildRequires: %{py3_prefix}-boto3
|
| |
+ BuildRequires: %{py3_prefix}-dns
|
| |
+ BuildRequires: %{py3_prefix}-xmltodict
|
| |
%endif
|
| |
# }}}
|
| |
|
| |
@@ -138,19 +139,19 @@
|
| |
%endif
|
| |
|
| |
%if %{with python3}
|
| |
- %package -n python3-%{pypi_name}
|
| |
+ %package -n %{py3_prefix}-%{pypi_name}
|
| |
Summary: %{summary}
|
| |
%{?python_provide:%python_provide python3-%{pypi_name}}
|
| |
|
| |
- Requires: python3-cryptography
|
| |
- Requires: python3-future
|
| |
- Requires: python3-requests
|
| |
- Requires: python3-setuptools
|
| |
- Requires: python3-pyOpenSSL
|
| |
- Requires: python3-tldextract
|
| |
+ Requires: %{py3_prefix}-cryptography
|
| |
+ Requires: %{py3_prefix}-future
|
| |
+ Requires: %{py3_prefix}-requests
|
| |
+ Requires: %{py3_prefix}-setuptools
|
| |
+ Requires: %{py3_prefix}-pyOpenSSL
|
| |
+ Requires: %{py3_prefix}-tldextract
|
| |
|
| |
- %if 0%{?fedora} && 0%{?fedora} <= 28
|
| |
- Requires: python3-PyYAML
|
| |
+ %if 0%{?fedora} <= 28 || 0%{?rhel7}
|
| |
+ Requires: %{py3_prefix}-PyYAML
|
| |
%else
|
| |
Requires: python3-pyyaml
|
| |
%endif
|
| |
@@ -159,7 +160,7 @@
|
| |
# TODO: Remove this once resolved upstream (see upstream #222)
|
| |
Conflicts: python3-lexicon
|
| |
|
| |
- %description -n python3-%{pypi_name}
|
| |
+ %description -n %{py3_prefix}-%{pypi_name}
|
| |
Lexicon provides a way to manipulate DNS records on multiple DNS providers in a
|
| |
standardized way. Lexicon has a CLI but it can also be used as a python
|
| |
library.
|
| |
@@ -191,14 +192,14 @@
|
| |
%endif
|
| |
|
| |
%if %{with python3}
|
| |
- %package -n python3-%{pypi_name}+easyname
|
| |
+ %package -n %{py3_prefix}-%{pypi_name}+easyname
|
| |
Summary: Meta-package for python3-%{pypi_name} and easyname provider
|
| |
%{?python_provide:%python_provide python3-%{pypi_name}+easyname}
|
| |
|
| |
- Requires: python3-%{pypi_name} = %{version}-%{release}
|
| |
- Requires: python3-beautifulsoup4
|
| |
+ Requires: %{py3_prefix}-%{pypi_name} = %{version}-%{release}
|
| |
+ Requires: %{py3_prefix}-beautifulsoup4
|
| |
|
| |
- %description -n python3-%{pypi_name}+easyname
|
| |
+ %description -n %{py3_prefix}-%{pypi_name}+easyname
|
| |
This package installs no files. It requires python3-%{pypi_name} and all
|
| |
dependencies necessary to use the easyname provider.
|
| |
%endif
|
| |
@@ -223,14 +224,14 @@
|
| |
%endif
|
| |
|
| |
%if %{with python3}
|
| |
- %package -n python3-%{pypi_name}+gratisdns
|
| |
+ %package -n %{py3_prefix}-%{pypi_name}+gratisdns
|
| |
Summary: Meta-package for python3-%{pypi_name} and gratisdns provider
|
| |
%{?python_provide:%python_provide python3-%{pypi_name}+gratisdns}
|
| |
|
| |
- Requires: python3-%{pypi_name} = %{version}-%{release}
|
| |
- Requires: python3-beautifulsoup4
|
| |
+ Requires: %{py3_prefix}-%{pypi_name} = %{version}-%{release}
|
| |
+ Requires: %{py3_prefix}-beautifulsoup4
|
| |
|
| |
- %description -n python3-%{pypi_name}+gratisdns
|
| |
+ %description -n %{py3_prefix}-%{pypi_name}+gratisdns
|
| |
This package installs no files. It requires python3-%{pypi_name} and all
|
| |
dependencies necessary to use the gratisdns provider.
|
| |
%endif
|
| |
@@ -255,14 +256,14 @@
|
| |
%endif
|
| |
|
| |
%if %{with python3}
|
| |
- %package -n python3-%{pypi_name}+henet
|
| |
+ %package -n %{py3_prefix}-%{pypi_name}+henet
|
| |
Summary: Meta-package for python3-%{pypi_name} and Hurricane Electric provider
|
| |
%{?python_provide:%python_provide python3-%{pypi_name}+henet}
|
| |
|
| |
- Requires: python3-%{pypi_name} = %{version}-%{release}
|
| |
- Requires: python3-beautifulsoup4
|
| |
+ Requires: %{py3_prefix}-%{pypi_name} = %{version}-%{release}
|
| |
+ Requires: %{py3_prefix}-beautifulsoup4
|
| |
|
| |
- %description -n python3-%{pypi_name}+henet
|
| |
+ %description -n %{py3_prefix}-%{pypi_name}+henet
|
| |
This package installs no files. It requires python3-%{pypi_name} and all
|
| |
dependencies necessary to use the Hurricane Electric provider.
|
| |
%endif
|
| |
@@ -287,14 +288,14 @@
|
| |
%endif
|
| |
|
| |
%if %{with python3}
|
| |
- %package -n python3-%{pypi_name}+plesk
|
| |
+ %package -n %{py3_prefix}-%{pypi_name}+plesk
|
| |
Summary: Meta-package for python3-%{pypi_name} and Plesk provider
|
| |
%{?python_provide:%python_provide python3-%{pypi_name}+plesk}
|
| |
|
| |
- Requires: python3-%{pypi_name} = %{version}-%{release}
|
| |
- Requires: python3-xmltodict
|
| |
+ Requires: %{py3_prefix}-%{pypi_name} = %{version}-%{release}
|
| |
+ Requires: %{py3_prefix}-xmltodict
|
| |
|
| |
- %description -n python3-%{pypi_name}+plesk
|
| |
+ %description -n %{py3_prefix}-%{pypi_name}+plesk
|
| |
This package installs no files. It requires python3-%{pypi_name} and all
|
| |
dependencies necessary to use the Plesk provider.
|
| |
%endif
|
| |
@@ -319,14 +320,14 @@
|
| |
%endif
|
| |
|
| |
%if %{with python3}
|
| |
- %package -n python3-%{pypi_name}+route53
|
| |
+ %package -n %{py3_prefix}-%{pypi_name}+route53
|
| |
Summary: Meta-package for python3-%{pypi_name} and Route 53 provider
|
| |
%{?python_provide:%python_provide python3-%{pypi_name}+route53}
|
| |
|
| |
- Requires: python3-%{pypi_name} = %{version}-%{release}
|
| |
- Requires: python3-boto3
|
| |
+ Requires: %{py3_prefix}-%{pypi_name} = %{version}-%{release}
|
| |
+ Requires: %{py3_prefix}-boto3
|
| |
|
| |
- %description -n python3-%{pypi_name}+route53
|
| |
+ %description -n %{py3_prefix}-%{pypi_name}+route53
|
| |
This package installs no files. It requires python3-%{pypi_name} and all
|
| |
dependencies necessary to use the Route 53 provider.
|
| |
%endif
|
| |
@@ -350,15 +351,15 @@
|
| |
%endif
|
| |
|
| |
%if %{with python3}
|
| |
- %package -n python3-%{pypi_name}+hetzner
|
| |
+ %package -n %{py3_prefix}-%{pypi_name}+hetzner
|
| |
Summary: Meta-package for python3-%{pypi_name} and Hetzner provider
|
| |
%{?python_provide:%python_provide python3-%{pypi_name}+hetzner}
|
| |
|
| |
- Requires: python3-%{pypi_name} = %{version}-%{release}
|
| |
- Requires: python3-beautifulsoup4
|
| |
- Requires: python3-dns
|
| |
+ Requires: %{py3_prefix}-%{pypi_name} = %{version}-%{release}
|
| |
+ Requires: %{py3_prefix}-beautifulsoup4
|
| |
+ Requires: %{py3_prefix}-dns
|
| |
|
| |
- %description -n python3-%{pypi_name}+hetzner
|
| |
+ %description -n %{py3_prefix}-%{pypi_name}+hetzner
|
| |
This package installs no files. It requires python3-%{pypi_name} and all
|
| |
dependencies necessary to use the Hetzner provider.
|
| |
%endif
|
| |
@@ -423,7 +424,7 @@
|
| |
%endif
|
| |
|
| |
%if %{with python3}
|
| |
- %files -n python3-%{pypi_name}
|
| |
+ %files -n %{py3_prefix}-%{pypi_name}
|
| |
%license LICENSE
|
| |
%doc README.md
|
| |
%{_bindir}/lexicon
|
| |
@@ -435,12 +436,14 @@
|
| |
# Extras meta-packages
|
| |
# {{{
|
| |
%if %{with extras}
|
| |
- %files -n python3-%{pypi_name}+easyname
|
| |
- %files -n python3-%{pypi_name}+gratisdns
|
| |
- %files -n python3-%{pypi_name}+henet
|
| |
- %files -n python3-%{pypi_name}+hetzner
|
| |
- %files -n python3-%{pypi_name}+plesk
|
| |
- %files -n python3-%{pypi_name}+route53
|
| |
+ %files -n %{py3_prefix}-%{pypi_name}+easyname
|
| |
+ %files -n %{py3_prefix}-%{pypi_name}+gratisdns
|
| |
+ %files -n %{py3_prefix}-%{pypi_name}+henet
|
| |
+ %if ! 0%{?rhel7}
|
| |
+ %files -n %{py3_prefix}-%{pypi_name}+hetzner
|
| |
+ %endif
|
| |
+ %files -n %{py3_prefix}-%{pypi_name}+plesk
|
| |
+ %files -n %{py3_prefix}-%{pypi_name}+route53
|
| |
%endif
|
| |
# }}}
|
| |
%endif
|
| |
This update will build both python2 and python3 version of this package. The python3 version will be required for updating certbot-dns plugins to python3.