parent
6bb36982c5
commit
2459b2015d
5 changed files with 63 additions and 123 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
/dns-lexicon-*.tar.gz
|
||||
/lexicon-*.tar.gz
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
diff --git a/lexicon/cli.py b/lexicon/cli.py
|
||||
index dbef1ae..32a0f6f 100644
|
||||
index d2e2a41..3b6ba67 100644
|
||||
--- a/lexicon/cli.py
|
||||
+++ b/lexicon/cli.py
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/env python
|
||||
"""Module for Lexicon command-line interface"""
|
||||
from __future__ import absolute_import, print_function
|
||||
import json
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
diff --git a/setup.py b/setup.py
|
||||
index 7d68954..0c211c4 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -113,14 +113,14 @@ setup(
|
||||
# requirements files see:
|
||||
# https://packaging.python.org/en/latest/requirements.html
|
||||
install_requires=[
|
||||
- 'requests[security]',
|
||||
+ 'requests',
|
||||
'tldextract',
|
||||
'future',
|
||||
'cryptography',
|
||||
'pyyaml',
|
||||
],
|
||||
|
||||
- extras_require=extras_require,
|
||||
+ #extras_require=extras_require,
|
||||
|
||||
# To provide executable scripts, use entry points in preference to the
|
||||
# "scripts" keyword. Entry points provide cross-platform support and allow
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
%global forgeurl https://github.com/AnalogJ/lexicon
|
||||
Version: 3.3.17
|
||||
Version: 3.5.1
|
||||
%forgemeta
|
||||
|
||||
%global pypi_name dns-lexicon
|
||||
|
|
@ -17,7 +17,7 @@ Version: 3.3.17
|
|||
%endif
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Release: 5%{?dist}
|
||||
Release: 1%{?dist}
|
||||
Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way
|
||||
|
||||
License: MIT
|
||||
|
|
@ -27,30 +27,25 @@ Source0: %{forgesource}
|
|||
BuildArch: noarch
|
||||
|
||||
Patch0: 0000-remove-shebang.patch
|
||||
Patch1: 0001-fix-requirements.patch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-cryptography
|
||||
BuildRequires: python3-future
|
||||
BuildRequires: python3-pyOpenSSL
|
||||
BuildRequires: python3-tldextract
|
||||
BuildRequires: python3-pyyaml
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
BuildRequires: poetry >= 0.12
|
||||
BuildRequires: python3-pyparsing >= 2.0.2
|
||||
BuildRequires: python3-six
|
||||
|
||||
# required to run the test suite
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-pytest-vcr
|
||||
|
||||
# Extras requirements
|
||||
# {{{
|
||||
%if %{with extras}
|
||||
BuildRequires: python3-beautifulsoup4
|
||||
BuildRequires: python3-boto3
|
||||
BuildRequires: python3-dns >= 1.15.0
|
||||
BuildRequires: python3-xmltodict
|
||||
%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
|
||||
|
|
@ -72,6 +67,28 @@ Requires: python3-pyyaml
|
|||
# TODO: Remove this once resolved upstream (see upstream #222)
|
||||
Conflicts: python3-lexicon
|
||||
|
||||
# These "extras" were previously present in upstream lexicon but are not there
|
||||
# anymore.
|
||||
# {{{
|
||||
%if %{with extras}
|
||||
Obsoletes: python3-%{pypi_name}+easyname < 3.4
|
||||
Provides: python3dist(%{pypi_name}[easyname]) = %{version}
|
||||
Provides: python%{python3_version}dist(%{pypi_name}[easyname]) = %{version}
|
||||
|
||||
Obsoletes: python3-%{pypi_name}+gratisdns < 3.4
|
||||
Provides: python3dist(%{pypi_name}[gratisdns]) = %{version}
|
||||
Provides: python%{python3_version}dist(%{pypi_name}[gratisdns]) = %{version}
|
||||
|
||||
Obsoletes: python3-%{pypi_name}+henet < 3.4
|
||||
Provides: python3dist(%{pypi_name}[henet]) = %{version}
|
||||
Provides: python%{python3_version}dist(%{pypi_name}[henet]) = %{version}
|
||||
|
||||
Obsoletes: python3-%{pypi_name}+hetzner < 3.4
|
||||
Provides: python3dist(%{pypi_name}[hetzner]) = %{version}
|
||||
Provides: python%{python3_version}dist(%{pypi_name}[hetzner]) = %{version}
|
||||
%endif
|
||||
# }}}
|
||||
|
||||
%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
|
||||
|
|
@ -79,46 +96,6 @@ library.
|
|||
|
||||
This is the Python 3 version of the package.
|
||||
|
||||
# Extras meta-packages
|
||||
# {{{
|
||||
%if %{with extras}
|
||||
|
||||
%package -n python3-%{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
|
||||
|
||||
%description -n python3-%{pypi_name}+easyname
|
||||
This package installs no files. It requires python3-%{pypi_name} and all
|
||||
dependencies necessary to use the easyname provider.
|
||||
|
||||
|
||||
%package -n python3-%{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
|
||||
|
||||
%description -n python3-%{pypi_name}+gratisdns
|
||||
This package installs no files. It requires python3-%{pypi_name} and all
|
||||
dependencies necessary to use the gratisdns provider.
|
||||
|
||||
|
||||
%package -n python3-%{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
|
||||
|
||||
%description -n python3-%{pypi_name}+henet
|
||||
This package installs no files. It requires python3-%{pypi_name} and all
|
||||
dependencies necessary to use the Hurricane Electric provider.
|
||||
%endif
|
||||
|
||||
|
||||
%package -n python3-%{pypi_name}+plesk
|
||||
Summary: Meta-package for python3-%{pypi_name} and Plesk provider
|
||||
|
|
@ -143,39 +120,24 @@ Requires: python3-boto3
|
|||
This package installs no files. It requires python3-%{pypi_name} and all
|
||||
dependencies necessary to use the Route 53 provider.
|
||||
|
||||
%if ! 0%{?rhel7}
|
||||
# EL7 does not have the dependencies necessary for this meta-package
|
||||
# {{{
|
||||
|
||||
%package -n python3-%{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 >= 1.15.0
|
||||
|
||||
%description -n python3-%{pypi_name}+hetzner
|
||||
This package installs no files. It requires python3-%{pypi_name} and all
|
||||
dependencies necessary to use the Hetzner provider.
|
||||
# }}}
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%setup -n lexicon-%{version}
|
||||
%patch0 -p1
|
||||
%if 0%{?rhel7}
|
||||
%patch1 -p1
|
||||
%endif
|
||||
%autosetup -n lexicon-%{version} -p1
|
||||
# Remove bundled egg-info
|
||||
rm -rf %{pypi_name}.egg-info
|
||||
rm setup.py
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -r -t -e light -x route53,plesk
|
||||
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_wheel
|
||||
|
||||
%check
|
||||
# AutoProviderTests: unknown failure - exclude to get suite passing for now
|
||||
# GoDaddyProviderTests: unknown failure - just get the suite passing for now
|
||||
# TypeError: __init__() got an unexpected keyword argument 'allowed_methods'
|
||||
#
|
||||
# lexicon providers which do not work in Fedora due to missing dependencies:
|
||||
# - TransipProviderTests
|
||||
# - SoftLayerProviderTests
|
||||
|
|
@ -183,51 +145,49 @@ rm -rf %{pypi_name}.egg-info
|
|||
# - NamecheapManagedProviderTests
|
||||
# - GransyProviderTests
|
||||
# - LocalzoneProviderTests
|
||||
TEST_SELECTOR="not AutoProviderTests and not TransipProviderTests and not SoftLayerProviderTests and not NamecheapProviderTests and not NamecheapManagedProviderTests and not GransyProviderTests and not LocalzoneProviderTests"
|
||||
%if 0%{?fedora}
|
||||
TEST_SELECTOR="not AutoProviderTests and not GoDaddyProviderTests and not TransipProviderTests and not SoftLayerProviderTests and not NamecheapProviderTests and not NamecheapManagedProviderTests and not GransyProviderTests and not LocalzoneProviderTests"
|
||||
# EPEL 8 does not provide the python3-pytest-vcr package
|
||||
%if 0%{?fedora}
|
||||
# The %%tox macro lacks features so we need to use pytest directly:
|
||||
# Miro Hrončok, 2020-09-11:
|
||||
# > I am afraid the %%tox macro can only work with "static" deps declaration,
|
||||
# > not with arbitrary installers invoked as commands, sorry about that.
|
||||
py.test-3 -v -k "${TEST_SELECTOR}" lexicon
|
||||
%endif
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%pyproject_install
|
||||
install -pm 0755 %{buildroot}/%{_bindir}/lexicon %{buildroot}/%{_bindir}/lexicon-%{python3_version}
|
||||
ln -s %{_bindir}/lexicon-%{python3_version} %{buildroot}/%{_bindir}/lexicon-3
|
||||
cd %{buildroot}/%{_bindir}
|
||||
ln -s lexicon-%{python3_version} lexicon-3
|
||||
rm -rf %{buildroot}%{python3_sitelib}/lexicon/tests
|
||||
|
||||
|
||||
%files -n python3-%{pypi_name}
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%doc README.rst
|
||||
%{_bindir}/lexicon
|
||||
%{_bindir}/lexicon-3
|
||||
%{_bindir}/lexicon-%{python3_version}
|
||||
%{python3_sitelib}/lexicon
|
||||
%{python3_sitelib}/dns_lexicon-%{version}-py%{python3_version}.egg-info
|
||||
%{python3_sitelib}/dns_lexicon-%{version}.dist-info
|
||||
|
||||
# Extras meta-packages
|
||||
# {{{
|
||||
%if %{with extras}
|
||||
%files -n python3-%{pypi_name}+easyname
|
||||
%{?python_extras_subpkg:%ghost %{python3_sitelib}/dns_lexicon-%{version}-py%{python3_version}.egg-info}
|
||||
|
||||
%files -n python3-%{pypi_name}+gratisdns
|
||||
%{?python_extras_subpkg:%ghost %{python3_sitelib}/dns_lexicon-%{version}-py%{python3_version}.egg-info}
|
||||
|
||||
%files -n python3-%{pypi_name}+henet
|
||||
%{?python_extras_subpkg:%ghost %{python3_sitelib}/dns_lexicon-%{version}-py%{python3_version}.egg-info}
|
||||
|
||||
%files -n python3-%{pypi_name}+hetzner
|
||||
%{?python_extras_subpkg:%ghost %{python3_sitelib}/dns_lexicon-%{version}-py%{python3_version}.egg-info}
|
||||
|
||||
%files -n python3-%{pypi_name}+plesk
|
||||
%{?python_extras_subpkg:%ghost %{python3_sitelib}/dns_lexicon-%{version}-py%{python3_version}.egg-info}
|
||||
%{?python_extras_subpkg:%ghost %{python3_sitelib}/dns_lexicon-%{version}.dist-info}
|
||||
|
||||
%files -n python3-%{pypi_name}+route53
|
||||
%{?python_extras_subpkg:%ghost %{python3_sitelib}/dns_lexicon-%{version}-py%{python3_version}.egg-info}
|
||||
%{?python_extras_subpkg:%ghost %{python3_sitelib}/dns_lexicon-%{version}.dist-info}
|
||||
|
||||
%endif
|
||||
# }}}
|
||||
|
||||
%changelog
|
||||
* Mon Nov 16 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 3.5.1-1
|
||||
- update to 3.5.1
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.17-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (lexicon-3.3.17.tar.gz) = 170c9df5765c1471053b4ace1065f61265724149d6774033db898622b58f076e22dc9b84ed1809c7c0097c1351f3115c8c3821d0fa512e3772022f7af73af59e
|
||||
SHA512 (lexicon-3.5.1.tar.gz) = 1333d627811f25a8c8915cd5b4253771a917bb8e2824af35c6579dadf294248fa7bcb59863c4f53f8d95a0ae49d8de7d22e9042980978ea853d1a222523bbb4b
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue