|
|
447779 |
%if 0%{?fedora}
|
|
|
447779 |
%global with_python3 1
|
|
|
447779 |
%endif
|
|
|
447779 |
|
|
|
447779 |
%global srcname idna
|
|
|
447779 |
|
|
|
447779 |
Name: python-%{srcname}
|
|
|
a6a627 |
Version: 2.4
|
|
|
447779 |
Release: 1%{?dist}
|
|
|
447779 |
Summary: Internationalized Domain Names in Applications (IDNA)
|
|
|
447779 |
|
|
|
447779 |
License: BSD and Python and Unicode
|
|
|
447779 |
URL: https://github.com/kjd/idna
|
|
|
447779 |
Source0: https://pypi.python.org/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz
|
|
|
447779 |
BuildArch: noarch
|
|
|
447779 |
|
|
|
447779 |
BuildRequires: python2-devel
|
|
|
447779 |
BuildRequires: python-setuptools
|
|
|
447779 |
%if 0%{?with_python3}
|
|
|
447779 |
BuildRequires: python3-devel
|
|
|
447779 |
BuildRequires: python3-setuptools
|
|
|
447779 |
%endif # with_python3
|
|
|
447779 |
|
|
|
447779 |
%description
|
|
|
447779 |
A library to support the Internationalised Domain Names in Applications (IDNA)
|
|
|
447779 |
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>. This
|
|
|
447779 |
version of the protocol is often referred to as "IDNA2008" and can produce
|
|
|
447779 |
different results from the earlier standard from 2003.
|
|
|
447779 |
|
|
|
447779 |
The library is also intended to act as a suitable drop-in replacement for the
|
|
|
447779 |
"encodings.idna" module that comes with the Python standard library but
|
|
|
447779 |
currently only supports the older 2003 specification.
|
|
|
447779 |
|
|
|
447779 |
%if 0%{?with_python3}
|
|
|
447779 |
%package -n python3-%{srcname}
|
|
|
447779 |
Summary: Internationalized Domain Names in Applications (IDNA)
|
|
|
447779 |
|
|
|
447779 |
%description -n python3-%{srcname}
|
|
|
447779 |
A library to support the Internationalised Domain Names in Applications (IDNA)
|
|
|
447779 |
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>. This
|
|
|
447779 |
version of the protocol is often referred to as "IDNA2008" and can produce
|
|
|
447779 |
different results from the earlier standard from 2003.
|
|
|
447779 |
|
|
|
447779 |
The library is also intended to act as a suitable drop-in replacement for the
|
|
|
447779 |
"encodings.idna" module that comes with the Python standard library but
|
|
|
447779 |
currently only supports the older 2003 specification.
|
|
|
447779 |
%endif # with_python3
|
|
|
447779 |
|
|
|
447779 |
%prep
|
|
|
447779 |
%setup -q -n %{srcname}-%{version}
|
|
|
447779 |
# Remove bundled egg-info
|
|
|
447779 |
rm -rf %{srcname}.egg-info
|
|
|
447779 |
|
|
|
447779 |
%if 0%{?with_python3}
|
|
|
447779 |
rm -rf %{py3dir}
|
|
|
447779 |
cp -a . %{py3dir}
|
|
|
447779 |
%endif # with_python3
|
|
|
447779 |
|
|
|
447779 |
|
|
|
447779 |
|
|
|
447779 |
%build
|
|
|
447779 |
%{__python2} setup.py build
|
|
|
447779 |
|
|
|
447779 |
%if 0%{?with_python3}
|
|
|
447779 |
pushd %{py3dir}
|
|
|
447779 |
# Set LANG when building with python 3 due to
|
|
|
447779 |
# https://github.com/kjd/idna/pull/4
|
|
|
447779 |
LANG=en_US.UTF-8 %{__python3} setup.py build
|
|
|
447779 |
popd
|
|
|
447779 |
%endif # with_python3
|
|
|
447779 |
|
|
|
447779 |
%install
|
|
|
447779 |
%if 0%{?with_python3}
|
|
|
447779 |
pushd %{py3dir}
|
|
|
447779 |
# Set LANG when building with python 3 due to
|
|
|
447779 |
# https://github.com/kjd/idna/pull/4
|
|
|
447779 |
LANG=en_US.UTF-8 %{__python3} setup.py install --skip-build --root %{buildroot}
|
|
|
447779 |
popd
|
|
|
447779 |
%endif # with_python3
|
|
|
447779 |
|
|
|
447779 |
%{__python2} setup.py install --skip-build --root %{buildroot}
|
|
|
447779 |
|
|
|
447779 |
%check
|
|
|
447779 |
%{__python2} setup.py test
|
|
|
447779 |
|
|
|
447779 |
%if 0%{?with_python3}
|
|
|
447779 |
pushd %{py3dir}
|
|
|
447779 |
# Set LANG when building with python 3 due to
|
|
|
447779 |
# https://github.com/kjd/idna/pull/4
|
|
|
447779 |
LANG=en_US.UTF-8 %{__python3} setup.py test
|
|
|
447779 |
popd
|
|
|
447779 |
%endif # with_python3
|
|
|
447779 |
|
|
|
447779 |
|
|
|
447779 |
%files
|
|
|
447779 |
%doc README.rst HISTORY.rst LICENSE.rst
|
|
|
447779 |
%{python2_sitelib}/%{srcname}
|
|
|
447779 |
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
|
|
|
447779 |
|
|
|
447779 |
%if 0%{?with_python3}
|
|
|
447779 |
%files -n python3-%{srcname}
|
|
|
447779 |
%doc README.rst HISTORY.rst LICENSE.rst
|
|
|
447779 |
%{python3_sitelib}/%{srcname}
|
|
|
447779 |
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
|
|
|
447779 |
%endif # with_python3
|
|
|
447779 |
|
|
|
447779 |
%changelog
|
|
|
a6a627 |
* Wed Mar 01 2017 Paul Wouters <pwouters@redhat.com> - 2.4-1
|
|
|
a6a627 |
- Resolves: rhbz#1425154 (2.3 broke API and upstream released 2.4)
|
|
|
a6a627 |
|
|
|
a6a627 |
* Tue Feb 28 2017 Paul Wouters <pwouters@redhat.com> - 2.3-1
|
|
|
a6a627 |
- Resolves: rhbz#1425154 Rebase python-idna (more memfixes)
|
|
|
a6a627 |
|
|
|
a6a627 |
* Thu Feb 23 2017 Paul Wouters <pwouters@redhat.com> - 2.2-1
|
|
|
a6a627 |
- Resolves: rhbz#1425154 Rebase python-idna to >= 2.1 for freeipa performance issue
|
|
|
a6a627 |
|
|
|
447779 |
* Thu Apr 07 2016 Paul Wouters <pwouters@redhat.com> - 2.0-1
|
|
|
447779 |
- Resolves: rhbz#1297583 New package: python-idna
|