Compare commits
No commits in common. "rawhide" and "epel9" have entirely different histories.
4 changed files with 25 additions and 130 deletions
|
|
@ -1,38 +0,0 @@
|
||||||
#!/usr/bin/python3
|
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
if len(sys.argv) != 2:
|
|
||||||
sys.stderr.write('usage: %s <buildroot-sitelib>\n' % sys.argv[0])
|
|
||||||
|
|
||||||
buildroot_sitelib_dir = sys.argv[1]
|
|
||||||
sys.path.insert(0, buildroot_sitelib_dir)
|
|
||||||
|
|
||||||
from tldextract.cache import get_cache_dir, DiskCache
|
|
||||||
|
|
||||||
if 'TLDEXTRACT_CACHE' not in os.environ:
|
|
||||||
raise ValueError('must set "TLDEXTRACT_CACHE" environment variable')
|
|
||||||
|
|
||||||
local_cache = Path('/usr/share/publicsuffix/public_suffix_list.dat')
|
|
||||||
if not local_cache.exists():
|
|
||||||
raise FileNotFoundError(local_cache)
|
|
||||||
|
|
||||||
url_local_cache = f'file://{local_cache}'
|
|
||||||
subprocess.run(['/usr/bin/tldextract', '--update', f'--suffix_list_url={url_local_cache}'], check=True)
|
|
||||||
|
|
||||||
cache = DiskCache(cache_dir=get_cache_dir())
|
|
||||||
namespace = 'publicsuffix.org-tlds'
|
|
||||||
cache_with_local_data = cache._key_to_cachefile_path(namespace, {'urls': (url_local_cache,), 'fallback_to_snapshot': True})
|
|
||||||
func = lambda **kwargs: json.loads(Path(cache_with_local_data).read_text())
|
|
||||||
|
|
||||||
kwargs = {
|
|
||||||
'cache': cache,
|
|
||||||
'urls': ('https://publicsuffix.org/list/public_suffix_list.dat', 'https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat'),
|
|
||||||
'fallback_to_snapshot': True,
|
|
||||||
}
|
|
||||||
cache.run_and_cache(func, namespace=namespace, kwargs=kwargs, hashed_argnames=('urls', 'fallback_to_snapshot'))
|
|
||||||
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
diff --git a/pyproject.toml b/pyproject.toml
|
|
||||||
index 4122ff9..936bbdc 100644
|
|
||||||
--- a/pyproject.toml
|
|
||||||
+++ b/pyproject.toml
|
|
||||||
@@ -126,8 +126,7 @@ extend-ignore = [ "E203", "E501" ]
|
|
||||||
envlist = [ "cover", "lint" , "mypy" ]
|
|
||||||
|
|
||||||
[tool.tox.env_run_base]
|
|
||||||
-runner = "uv-venv-lock-runner"
|
|
||||||
-with_dev = true
|
|
||||||
+with_dev = false
|
|
||||||
extras = [ "full" ]
|
|
||||||
setenv.PYTEST_ADDOPTS = "--numprocesses auto"
|
|
||||||
setenv.PYTHONHASHSEED = "0"
|
|
||||||
|
|
@ -1,14 +1,13 @@
|
||||||
|
|
||||||
%global forgeurl https://github.com/dns-lexicon/dns-lexicon
|
%global forgeurl https://github.com/AnalogJ/lexicon
|
||||||
%global forgeversion 3.21.1
|
Version: 3.17.0
|
||||||
Version: %{forgeversion}
|
|
||||||
%forgemeta
|
%forgemeta
|
||||||
|
|
||||||
%global pypi_name dns-lexicon
|
%global pypi_name dns-lexicon
|
||||||
|
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?rhel} >= 8
|
||||||
# EPEL is currently missing dependencies used by the extras metapackages
|
# EPEL is currently missing dependencies used by the extras metapackages
|
||||||
# EPEL is currently missing dependencies used by the tests
|
# EPEL is currently missing dependancies used by the tests
|
||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
%bcond_with extras
|
%bcond_with extras
|
||||||
%else
|
%else
|
||||||
|
|
@ -16,19 +15,14 @@ Version: %{forgeversion}
|
||||||
%bcond_without extras
|
%bcond_without extras
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# disable tests for now
|
|
||||||
%bcond_without tests
|
|
||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Release: 8%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way
|
Summary: Manipulate DNS records on various DNS providers in a standardized/agnostic way
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: %{forgeurl}
|
URL: %{forgeurl}
|
||||||
# pypi releases don't contain necessary data to run the tests
|
# pypi releases don't contain necessary data to run the tests
|
||||||
Source0: %{forgesource}
|
Source0: %{forgesource}
|
||||||
Source1: create-local-tld-cache.py
|
|
||||||
Patch: python-dns-lexicon-tox-config.patch
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
|
@ -42,9 +36,6 @@ BuildRequires: python3-devel
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
BuildRequires: python3-pytest-vcr
|
BuildRequires: python3-pytest-vcr
|
||||||
BuildRequires: python3-pytest-xdist
|
|
||||||
BuildRequires: publicsuffix-list
|
|
||||||
BuildRequires: python3-tldextract
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -143,10 +134,9 @@ dependencies necessary to use the Route 53 provider.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{pypi_name}-%{version} -p1
|
%autosetup -n lexicon-%{version} -p1
|
||||||
# Remove bundled egg-info
|
# Remove bundled egg-info
|
||||||
rm -rf %{pypi_name}.egg-info
|
rm -rf %{pypi_name}.egg-info
|
||||||
rm -f uv.lock
|
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%if %{with extras}
|
%if %{with extras}
|
||||||
|
|
@ -163,32 +153,30 @@ sed -i '1d' src/lexicon/_private/cli.py
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
export TLDEXTRACT_CACHE=%{_builddir}/tldextract-cache
|
# The following tests use tldextract which tries to fetch
|
||||||
|
# https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat
|
||||||
# tldextract tries to fetch "public_suffix_list.dat" from the internet on first
|
# on first invocation
|
||||||
# invocation.
|
|
||||||
# (see https://github.com/john-kurkowski/tldextract/tree/master#note-about-caching)
|
# (see https://github.com/john-kurkowski/tldextract/tree/master#note-about-caching)
|
||||||
# The "publicsuffix-list" package provides that data however we need to use
|
# - AutoProviderTests
|
||||||
# that to populate a local cache directory.Most of the work is done via:
|
# - NamecheapProviderTests
|
||||||
# $ tldextract --update --suffix_list_url "file:///usr/share/publicsuffix/public_suffix_list.dat"
|
# - NamecheapManagedProviderTests
|
||||||
#
|
# Disabling those until tldextract 3.3.0+ is available on Fedora.
|
||||||
# However tldextract uses the "file://" url as cache key while the tests use
|
# With tldextract 3.3.0+ we can use Fedora's public suffix list by running
|
||||||
# "https://publicsuffix.org/list/public_suffix_list.dat". I did not find a way
|
# tldextract --update --suffix_list_url "file:///usr/share/publicsuffix/public_suffix_list.dat"
|
||||||
# get tldextract to use the https url so a small Python script will handle that.
|
# prior to running the tests
|
||||||
/usr/bin/python3 %{SOURCE1} %{buildroot}%{python3_sitelib}
|
TEST_SELECTOR="not AutoProviderTests and not NamecheapProviderTests and not NamecheapManagedProviderTests and not Route53Provider and not AliyunProviderTests and not AuroraProviderTests and not Route53ProviderTests"
|
||||||
|
|
||||||
# lexicon providers which do not work in Fedora due to missing dependencies:
|
# lexicon providers which do not work in Fedora due to missing dependencies:
|
||||||
# - SoftLayerProviderTests
|
# - SoftLayerProviderTests
|
||||||
TEST_SELECTOR="not SoftLayerProviderTests"
|
TEST_SELECTOR+=" and not SoftLayerProviderTests"
|
||||||
|
|
||||||
%if %{without extras}
|
%if %{without extras}
|
||||||
TEST_SELECTOR+=" and not GransyProviderTests and not LocalzoneProviderTests and not OciProviderTests and not OciInstancePrincipalProviderTests and not Route53ProviderTests"
|
TEST_SELECTOR+=" and not DDNSProviderTests and not DuckdnsProviderTests and not GransyProviderTests and not LocalzoneProviderTests and not OciProviderTests and not OciInstancePrincipalProviderTests and not Route53ProviderTests"
|
||||||
%endif
|
%endif
|
||||||
|
# The %%tox macro lacks features so we need to use pytest directly:
|
||||||
# We do not use "--xfail-providers-with-missing-deps" because we want to detect
|
# Miro Hrončok, 2020-09-11:
|
||||||
# missing dependencies unless we already know that a certain provider will not
|
# > I am afraid the %%tox macro can only work with "static" deps declaration,
|
||||||
# work.
|
# > not with arbitrary installers invoked as commands, sorry about that.
|
||||||
%pytest -v -k "${TEST_SELECTOR}" -n auto --dist=loadfile tests/
|
%pytest -v -k "${TEST_SELECTOR}"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
@ -196,6 +184,7 @@ TEST_SELECTOR+=" and not GransyProviderTests and not LocalzoneProviderTests and
|
||||||
install -pm 0755 %{buildroot}/%{_bindir}/lexicon %{buildroot}/%{_bindir}/lexicon-%{python3_version}
|
install -pm 0755 %{buildroot}/%{_bindir}/lexicon %{buildroot}/%{_bindir}/lexicon-%{python3_version}
|
||||||
cd %{buildroot}/%{_bindir}
|
cd %{buildroot}/%{_bindir}
|
||||||
ln -s lexicon-%{python3_version} lexicon-3
|
ln -s lexicon-%{python3_version} lexicon-3
|
||||||
|
rm -rf %{buildroot}%{python3_sitelib}/lexicon/tests
|
||||||
|
|
||||||
|
|
||||||
%files -n python3-%{pypi_name}
|
%files -n python3-%{pypi_name}
|
||||||
|
|
@ -227,48 +216,6 @@ ln -s lexicon-%{python3_version} lexicon-3
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.21.1-8
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jun 04 2026 Python Maint <python-maint@redhat.com> - 3.21.1-7
|
|
||||||
- Rebuilt for Python 3.15
|
|
||||||
|
|
||||||
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.21.1-6
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 3.21.1-5
|
|
||||||
- Rebuilt for Python 3.14.0rc3 bytecode
|
|
||||||
|
|
||||||
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 3.21.1-4
|
|
||||||
- Rebuilt for Python 3.14.0rc2 bytecode
|
|
||||||
|
|
||||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.21.1-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jun 06 2025 Python Maint <python-maint@redhat.com> - 3.21.1-2
|
|
||||||
- Rebuilt for Python 3.14
|
|
||||||
|
|
||||||
* Mon Apr 28 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 3.21.1-1
|
|
||||||
- update to 3.21.1
|
|
||||||
|
|
||||||
* Sat Apr 19 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 3.21.0-1
|
|
||||||
- update to 3.21.0
|
|
||||||
|
|
||||||
* Thu Jan 23 2025 Felix Schwarz <fschwarz@fedoraproject.org> - 3.20.1-1
|
|
||||||
- update to 3.20.1
|
|
||||||
|
|
||||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.18.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Nov 23 2024 Ben Maconi <turboben@fedoraproject.org> - 3.18.0-1
|
|
||||||
- Updated to 3.18.0
|
|
||||||
|
|
||||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.17.0-6
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jun 27 2024 Python Maint <python-maint@redhat.com> - 3.17.0-5
|
|
||||||
- Rebuilt for Python 3.13
|
|
||||||
|
|
||||||
* Thu Feb 29 2024 Jonathan Wright <jonathan@almalinux.org> - 3.17.0-4
|
* Thu Feb 29 2024 Jonathan Wright <jonathan@almalinux.org> - 3.17.0-4
|
||||||
- Update spec for building on epel9
|
- Update spec for building on epel9
|
||||||
|
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (dns-lexicon-3.21.1.tar.gz) = 0f53001edf2425afe7b7c4315e974ee47c956b659964998b942943788711c57634eea2d7974e21005be7f0edf16800e6577c49c8789e34f2133c4f5be8ac7ac1
|
SHA512 (lexicon-3.17.0.tar.gz) = 1bc182f5881d6acfac72b84331ba50da1219178d274c92e532ed11e73aa79696681d28a002cd1e23f48590953f48e50b62c2ef2db020a07ecf88547717508c0c
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue