b49aef
%global with_python3 1
b49aef
%global srcname idna
b49aef
b49aef
# Prepared for Python 2 removal
b49aef
%bcond_with python2
b49aef
b49aef
Name:           python-%{srcname}
b49aef
Version:        2.8
b49aef
Release:        6%{?dist}
b49aef
Summary:        Internationalized Domain Names in Applications (IDNA)
b49aef
b49aef
License:        BSD and Python and Unicode
b49aef
URL:            https://github.com/kjd/idna
b49aef
Source0:        https://pypi.io/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz
b49aef
BuildArch:      noarch
b49aef
# Exclude i686 arch. Due to a modularity issue it's being added to the
b49aef
# x86_64 compose of CRB, but we don't want to ship it at all.
b49aef
# See: https://projects.engineering.redhat.com/browse/RCM-72605
b49aef
ExcludeArch:    i686
b49aef
b49aef
%if %{with python2}
b49aef
BuildRequires:  python2-devel
b49aef
BuildRequires:  python2-setuptools
b49aef
%endif
b49aef
BuildRequires:  python%{python3_pkgversion}-devel
b49aef
BuildRequires:  python%{python3_pkgversion}-setuptools
b49aef
BuildRequires:  python%{python3_pkgversion}-rpm-macros
b49aef
b49aef
%description
b49aef
A library to support the Internationalised Domain Names in Applications (IDNA)
b49aef
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>.  This
b49aef
version of the protocol is often referred to as "IDNA2008" and can produce
b49aef
different results from the earlier standard from 2003.
b49aef
b49aef
The library is also intended to act as a suitable drop-in replacement for the
b49aef
"encodings.idna" module that comes with the Python standard library but
b49aef
currently only supports the older 2003 specification.
b49aef
b49aef
%if %{with python2}
b49aef
%package -n python2-%{srcname}
b49aef
Summary:        Internationalized Domain Names in Applications (IDNA)
b49aef
%{?python_provide:%python_provide python2-%{srcname}}
b49aef
b49aef
%description -n python2-%{srcname}
b49aef
A library to support the Internationalised Domain Names in Applications (IDNA)
b49aef
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>.  This
b49aef
version of the protocol is often referred to as "IDNA2008" and can produce
b49aef
different results from the earlier standard from 2003.
b49aef
b49aef
The library is also intended to act as a suitable drop-in replacement for the
b49aef
"encodings.idna" module that comes with the Python standard library but
b49aef
currently only supports the older 2003 specification.
b49aef
%endif
b49aef
b49aef
%package -n python%{python3_pkgversion}-%{srcname}
b49aef
Summary:        Internationalized Domain Names in Applications (IDNA)
b49aef
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
b49aef
b49aef
%description -n python%{python3_pkgversion}-%{srcname}
b49aef
A library to support the Internationalised Domain Names in Applications (IDNA)
b49aef
protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>.  This
b49aef
version of the protocol is often referred to as "IDNA2008" and can produce
b49aef
different results from the earlier standard from 2003.
b49aef
b49aef
The library is also intended to act as a suitable drop-in replacement for the
b49aef
"encodings.idna" module that comes with the Python standard library but
b49aef
currently only supports the older 2003 specification.
b49aef
b49aef
%prep
b49aef
%autosetup -p1 -n %{srcname}-%{version}
b49aef
# Remove bundled egg-info
b49aef
rm -rf %{srcname}.egg-info
b49aef
b49aef
%build
b49aef
%if %{with python2}
b49aef
%py2_build
b49aef
%endif
b49aef
%py3_build
b49aef
b49aef
%install
b49aef
%py3_install
b49aef
%if %{with python2}
b49aef
%py2_install
b49aef
%endif
b49aef
b49aef
%check
b49aef
%if %{with python2}
b49aef
%{__python2} setup.py test
b49aef
%endif
b49aef
%{__python3} setup.py test
b49aef
b49aef
b49aef
%if %{with python2}
b49aef
%files -n python2-%{srcname}
b49aef
%license LICENSE.rst
b49aef
%doc README.rst HISTORY.rst
b49aef
%{python2_sitelib}/%{srcname}
b49aef
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
b49aef
%endif
b49aef
b49aef
%files -n python%{python3_pkgversion}-%{srcname}
b49aef
%license LICENSE.rst
b49aef
%doc README.rst HISTORY.rst
b49aef
%{python3_sitelib}/%{srcname}
b49aef
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
b49aef
b49aef
%changelog
b49aef
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 2.8-6
b49aef
- Exclude unsupported i686 arch
b49aef
b49aef
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 2.8-5
b49aef
- Adjusted for Python 3.8 module in RHEL 8
b49aef
b49aef
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.8-4
b49aef
- Rebuilt for Python 3.8.0rc1 (#1748018)
b49aef
b49aef
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.8-3
b49aef
- Rebuilt for Python 3.8
b49aef
b49aef
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-2
b49aef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b49aef
b49aef
* Tue May 28 2019 Jeremy Cline <jcline@redhat.com> - 2.8-1
b49aef
- Update to v2.8
b49aef
- Drop python version conditionals
b49aef
b49aef
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-4
b49aef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
b49aef
b49aef
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-3
b49aef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
b49aef
b49aef
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7-2
b49aef
- Rebuilt for Python 3.7
b49aef
b49aef
* Tue Jun 12 2018 Jeremy Cline <jeremy@jcline.org> - 2.7-1
b49aef
- Update to v2.7 (rhbz 1589803)
b49aef
b49aef
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-4
b49aef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b49aef
b49aef
* Fri Jan 19 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.5-3
b49aef
- Update Python 2 dependency declarations to new packaging standards
b49aef
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
b49aef
b49aef
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-2
b49aef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b49aef
b49aef
* Tue Mar 07 2017 Jeremy Cline <jeremy@jcline.org> - 2.5-1
b49aef
- Update to version 2.5
b49aef
b49aef
* Wed Mar 01 2017 Jeremy Cline <jeremy@jcline.org> - 2.4-1
b49aef
- Update to version 2.4
b49aef
b49aef
* Tue Feb 28 2017 Paul Wouters <pwouters@redhat.com> - 2.3-1
b49aef
- Resolves bugzilla 1427499 Update to 2.3 for IDNAError bugfix and memory improvement
b49aef
b49aef
* Thu Feb 09 2017 Jeremy Cline <jeremy@jcline.org> - 2.2-1
b49aef
- Update to version 2.2 (#1406757)
b49aef
b49aef
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 2.1-3
b49aef
- Rebuild for Python 3.6
b49aef
b49aef
* Mon Nov 28 2016 Orion Poplawski <orion@cora.nwra.com> - 2.1-2
b49aef
- Ship python2-idna
b49aef
- Enable python3 for EPEL
b49aef
- Modernize spec
b49aef
b49aef
* Mon Oct 17 2016 tom.prince@ualberta.net - 2.1-1
b49aef
- Bump version.
b49aef
b49aef
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-4
b49aef
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
b49aef
b49aef
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-3
b49aef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b49aef
b49aef
* Wed Nov 04 2015 Robert Kuska <rkuska@redhat.com> - 2.0-2
b49aef
- Rebuilt for Python3.5 rebuild
b49aef
b49aef
* Thu Aug 13 2015 Paul Wouters <pwouters@redhat.com> - 2.0-1
b49aef
- Update to 2.0 which is required by python-cryptography
b49aef
b49aef
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
b49aef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b49aef
b49aef
* Wed Dec 31 2014 tom.prince@ualberta.net - 1.0-1
b49aef
- Bump version.
b49aef
b49aef
* Mon Oct 27 2014 tom.prince@ualberta.net - 0.8-3
b49aef
- Update licences.
b49aef
b49aef
* Sat Jul 12 2014 tom.prince@ualberta.net - 0.8-2
b49aef
- Be more specfic about .egg-info directories.
b49aef
- Use python2-devel
b49aef
b49aef
* Sat Jul 12 2014 tom.prince@ualberta.net - 0.8-1
b49aef
- Initial package.