%global pypi_name phonenumbers
%global desc A Python port of libphonenumber, Google's common Java, C++, and\
JavaScript library for parsing, formatting, and validating international phone\
numbers.\
Name: python-%{pypi_name}
Version: 8.8.10
Release: 2%{?dist}
Summary: A Python port of Google's libphonenumber
License: ASL 2.0
URL: https://github.com/daviddrysdale/%{name}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
%description
%{desc}
%package -n python2-%{pypi_name}
Summary: %{summary}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
%{desc}
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
%{desc}
%prep
%autosetup
# Snip the #! from the util.py module
sed -i -e '/^#!\//, 1d' python/%{pypi_name}/util.py
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%check
%{__python2} setup.py test
%{__python3} setup.py test
%files -n python2-%{pypi_name}
%license LICENSE
%doc README.md
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-*.egg-info
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.egg-info
%changelog
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.8.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jan 25 2018 Jeremy Cline <jeremy@jcline.org> - 8.8.10-1
- Update to latest upstream
* Mon Oct 02 2017 Jeremy Cline <jeremy@jcline.org> - 8.8.2-1
- Update to latest upstream
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Jul 10 2017 Jeremy Cline <jeremy@jcline.org> - 8.6.0-1
- Update to the latest upstream release (#1468569)
* Fri Jun 23 2017 Jeremy Cline <jeremy@jcline.org> - 8.5.2-1
- Update to latest upstream
* Wed Jun 21 2017 Jeremy Cline <jeremy@jcline.org> - 8.5.1-2
- Address review comments
* Fri May 19 2017 Jeremy Cline <jeremy@jcline.org> - 8.5.1-1
- Initial package