15
0
Files
python-dns-lexicon/python-dns-lexicon.spec
Dirk Mueller f785b6897a - update to 3.17.0:
* New method to determine the actual zone name for a given
    FQDN. Historically it was an extraction
    of the second-level domain given well-known TLDs (eg.,
    `domain.net` for `www.domain.net`) using
    `tldextract`, and usage of `--delegated` option to enforce a
    specific zone name that is useful for
    third-level domains hosted on a specific zone (eg., sub-zone
    `sub.domain.net` delegated from zone
    `domain.net`).
  * It is now possible to use the `--resolve-zone-name` flag on
    Lexicon client to trigger an actual
    resolution of the zone name from a given FQDN using live DNS
    servers by leveraging `dnspython`
    utilities. Most of the time this makes `--delegated` useless,
    since Lexicon will be able to guess the correct zone name.
  * Add support to Python 3.12.
  * Support older versions of requests (<2.27.0) in `ovh`
    provider.
  * Drop support for Python 3.7
  * Protect `ovh` provider against invalid response bodies
  * that are returned sometimes by OVH APIs.
  * Fix filtering by record content in `godaddy` provider.
  * Add `pyotp` Python dependency in Lexicon to help implementing
    OTP (one-time password) on providers whose API supports this
    kind of authentication.
  * Add OTP support on `hover` provider, with a new flag named
    `--auth-totp-secret`.
  * Add type marker `py.typed` to inform types checkers about
    availability of type annotations in Lexicon codebase.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dns-lexicon?expand=0&rev=52
2023-11-14 12:19:00 +00:00

121 lines
4.1 KiB
RPMSpec

#
# spec file for package python-dns-lexicon
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-dns-lexicon
Version: 3.17.0
Release: 0
Summary: DNS record manipulation utility
License: MIT
URL: https://github.com/AnalogJ/lexicon
Source0: https://github.com/AnalogJ/lexicon/archive/v%{version}.tar.gz#/lexicon-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION Python build system requirements
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core >= 1}
# /SECTION
# SECTION poetry.dependencies
BuildRequires: %{python_module PyYAML >= 3}
BuildRequires: %{python_module beautifulsoup4 >= 4}
BuildRequires: %{python_module cryptography >= 3}
BuildRequires: %{python_module importlib-metadata >= 4.6}
BuildRequires: %{python_module pyotp}
BuildRequires: %{python_module requests >= 2}
BuildRequires: %{python_module tldextract >= 2}
# /SECTION
# SECTION extras
BuildRequires: %{python_module boto3 >= 1.28}
BuildRequires: %{python_module dnspython >= 2}
BuildRequires: %{python_module localzone >= 0.9.8}
BuildRequires: %{python_module softlayer => 5}
BuildRequires: %{python_module softlayer-zeep >= 3}
# see comment in section testing below
# BuildRequires: %%{python_module oci >= 2}
# /SECTION
# SECTION test dependencies
BuildRequires: %{python_module pytest >= 3.8.0}
BuildRequires: %{python_module vcrpy >= 1.13.0}
# OCI hijacks all connections during unit testing and lets them fail, we can't allow that on OBS
BuildConflicts: %{python_module oci}
# /SECTION
Requires: python-PyYAML >= 3
Requires: python-beautifulsoup4 >= 4
Requires: python-cryptography >= 2
Requires: python-importlib-metadata >= 4.6
Requires: python-pyotp
Requires: python-requests >= 2
Requires: python-tldextract >= 2
Requires(post): update-alternatives
Requires(postun):update-alternatives
Recommends: python-boto3 >= 1.28
Recommends: python-dnspython >= 2
Recommends: python-localzone >= 0.9.8
Recommends: python-oci >= 2
Recommends: python-softlayer >= 5
Recommends: python-softlayer-zeep >= 3
# Completely different pkg but same namespace
Conflicts: python-lexicon
BuildArch: noarch
%python_subpackages
%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.
Lexicon was designed to be used in automation, specifically letsencrypt.
%prep
%autosetup -p1 -n lexicon-%{version}
# rpmlint
find . -type f -name ".gitignore" -delete
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/lexicon
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# test_auto does not work inside OBS
ignoretests="--ignore lexicon/tests/providers/test_auto.py"
# no oci in test suite, see comment above
ignoretests="$ignoretests --ignore lexicon/tests/providers/test_oci.py"
# test_namecheap has invalid vcr casettes, attempts to update them failed
ignoretests="$ignoretests --ignore lexicon/tests/providers/test_namecheap.py"
ignoretests="$ignoretests --ignore tests/providers/integration_tests.py"
%post
%python_install_alternative lexicon
%postun
%python_uninstall_alternative lexicon
%files %{python_files}
%license LICENSE
%doc README.rst
%python_alternative %{_bindir}/lexicon
%{python_sitelib}/lexicon
%{python_sitelib}/dns_lexicon-%{version}*-info
%changelog