%global pypi_name dns-lexicon %if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with python3 %else %bcond_without python3 %endif Name: python-%{pypi_name} Version: 2.7.0 Release: 2%{?dist} Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way License: MIT URL: https://github.com/AnalogJ/lexicon Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch Patch0: remove-shebang.patch BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-cryptography BuildRequires: python2-future BuildRequires: python2-tldextract %if %{with python3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-cryptography BuildRequires: python3-future BuildRequires: python3-tldextract %endif %description 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. %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} Requires: python2-cryptography Requires: python2-future Requires: python2-requests Requires: python2-setuptools Requires: python2-tldextract %description -n python2-%{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. This is the Python 2 version of the package. %if %{with python3} %package -n python3-%{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-tldextract %description -n python3-%{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. This is the Python 3 version of the package. %endif %prep %autosetup -p1 -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %if %{with python3} %py3_build %endif %install %py2_install install -pm 0755 %{buildroot}/%{_bindir}/lexicon %{buildroot}/%{_bindir}/lexicon-%{python2_version} ln -s %{_bindir}/lexicon-%{python2_version} %{buildroot}/%{_bindir}/lexicon-2 %if %{with python3} %py3_install install -pm 0755 %{buildroot}/%{_bindir}/lexicon %{buildroot}/%{_bindir}/lexicon-%{python3_version} ln -s %{_bindir}/lexicon-%{python3_version} %{buildroot}/%{_bindir}/lexicon-3 %endif %files -n python2-%{pypi_name} %license LICENSE %doc README.md %if ! %{with python3} %{_bindir}/lexicon %endif %{_bindir}/lexicon-2 %{_bindir}/lexicon-%{python2_version} %{python2_sitelib}/lexicon %{python2_sitelib}/dns_lexicon-%{version}-py?.?.egg-info %if %{with python3} %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{_bindir}/lexicon %{_bindir}/lexicon-3 %{_bindir}/lexicon-%{python3_version} %{python3_sitelib}/lexicon %{python3_sitelib}/dns_lexicon-%{version}-py?.?.egg-info %endif %changelog * Mon Aug 27 2018 Eli Young - 2.7.0-2 - Add dependency on python-cryptography (#1622418) * Mon Jul 23 2018 Nick Bebout - 2.7.0-1 - Update to 2.7.0 * Sat Jul 14 2018 Fedora Release Engineering - 2.4.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jul 10 2018 Eli Young - 2.4.5-1 - Update to 2.4.5 (#1599479) * Mon Jul 02 2018 Miro Hrončok - 2.4.4-3 - Rebuilt for Python 3.7 * Tue Jun 26 2018 Eli Young - 2.4.4-2 - Remove unnecessary shebang * Tue Jun 26 2018 Eli Young - 2.4.4-1 - Update to 2.4.4 (#1594777) * Tue Jun 19 2018 Eli Young - 2.4.3-1 - Update to 2.4.3 (#1592158) * Tue Jun 19 2018 Miro Hrončok - 2.4.0-2 - Rebuilt for Python 3.7 * Mon Jun 11 2018 Eli Young - 2.4.0-1 - Update to 2.4.0 (#1589596) * Tue May 29 2018 Eli Young - 2.3.0-1 - Update to 2.3.0 (#1582799) * Mon May 07 2018 Eli Young - 2.2.3-1 - Update to 2.2.3 (#1575598) * Thu May 03 2018 Eli Young - 2.2.2-1 - Update to 2.2.2 (#1574265) * Sat Mar 24 2018 Eli Young - 2.2.1-1 - Update to 2.2.1 - Use Python 3 by default when available * Mon Feb 19 2018 Nick Bebout - 2.1.19-1 - Initial package.