Drop build dependency on python2-typing

This commit is contained in:
Miro Hrončok 2020-02-03 13:45:18 +01:00
parent b1e0004c4a
commit 4ca04bca89
2 changed files with 14 additions and 2 deletions

View File

@ -25,7 +25,7 @@ manipulation of DNS zones, messages, names, and records. \
Name: python-%{py_package_name}
Version: 1.16.0
Release: 7%{?dist}
Release: 8%{?dist}
Summary: %{summary}
License: MIT
@ -33,6 +33,10 @@ URL: http://www.dnspython.org
Source0: http://www.dnspython.org/kits/%{version}/%{pypi_name}-%{version}.tar.gz
# A no-op typing module for import compatibility
# This avoids the build dependency on python2-typing
Source1: typing.py
BuildArch: noarch
Patch0: unicode_label_escapify.patch
Patch1: collections_abc.patch
@ -40,7 +44,6 @@ Patch1: collections_abc.patch
%if %{with python2}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-typing
BuildRequires: python2-pycryptodomex
%endif
@ -141,7 +144,9 @@ find examples -type f | xargs chmod a-x
%check
%if %{with python2}
cp %{SOURCE1} .
%{__python2} setup.py test
rm typing.py{,?}
%endif
%if %{with python3}
@ -179,6 +184,9 @@ find examples -type f | xargs chmod a-x
%changelog
* Mon Feb 03 2020 Miro Hrončok <mhroncok@redhat.com> - 1.16.0-8
- Drop build dependency on python2-typing
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

4
typing.py Normal file
View File

@ -0,0 +1,4 @@
Set = Dict = None
def cast(type, obj):
return obj