import python-idna-2.5-6.module+el8+2540+b19c9b35

This commit is contained in:
CentOS Sources 2019-05-07 08:29:49 -04:00 committed by Andrew Lukoshko
commit abb14d37b4
3 changed files with 109 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/idna-2.5.tar.gz

1
.python-idna.metadata Normal file
View File

@ -0,0 +1 @@
499531b72bf0440ded6ce7f079a1f979270ae2d0 SOURCES/idna-2.5.tar.gz

107
SPECS/python-idna.spec Normal file
View File

@ -0,0 +1,107 @@
%bcond_without python3
%global srcname idna
Name: python-%{srcname}
Version: 2.5
Release: 6%{?dist}
Summary: Internationalized Domain Names in Applications (IDNA)
License: BSD and Python and Unicode
URL: https://github.com/kjd/idna
Source0: https://pypi.io/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%if %{with python3}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%endif # with python3
%description
A library to support the Internationalised Domain Names in Applications (IDNA)
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>. This
version of the protocol is often referred to as "IDNA2008" and can produce
different results from the earlier standard from 2003.
The library is also intended to act as a suitable drop-in replacement for the
"encodings.idna" module that comes with the Python standard library but
currently only supports the older 2003 specification.
%package -n python2-%{srcname}
Summary: Internationalized Domain Names in Applications (IDNA)
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname}
A library to support the Internationalised Domain Names in Applications (IDNA)
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>. This
version of the protocol is often referred to as "IDNA2008" and can produce
different results from the earlier standard from 2003.
The library is also intended to act as a suitable drop-in replacement for the
"encodings.idna" module that comes with the Python standard library but
currently only supports the older 2003 specification.
%if %{with python3}
%package -n python%{python3_pkgversion}-%{srcname}
Summary: Internationalized Domain Names in Applications (IDNA)
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%description -n python%{python3_pkgversion}-%{srcname}
A library to support the Internationalised Domain Names in Applications (IDNA)
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>. This
version of the protocol is often referred to as "IDNA2008" and can produce
different results from the earlier standard from 2003.
The library is also intended to act as a suitable drop-in replacement for the
"encodings.idna" module that comes with the Python standard library but
currently only supports the older 2003 specification.
%endif # with python3
%prep
%setup -q -n %{srcname}-%{version}
# Remove bundled egg-info
rm -rf %{srcname}.egg-info
%build
%py2_build
%if %{with python3}
%py3_build
%endif # with python3
%install
%if %{with python3}
%py3_install
%endif # with python3
%py2_install
%check
%{__python2} setup.py test
%if %{with python3}
%{__python3} setup.py test
%endif # with python3
%files -n python2-%{srcname}
%license LICENSE.rst
%doc README.rst HISTORY.rst
%{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
%if %{with python3}
%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE.rst
%doc README.rst HISTORY.rst
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
%endif # with python3
%changelog
* Tue Jul 31 2018 Lumír Balhar <lbalhar@redhat.com> - 2.5-6
- Switch python3 coditions to bcond
* Mon Jul 16 2018 Lumír Balhar <lbalhar@redhat.com> - 2.5-5
- First version for python27 module