%global srcname natsort
Name: python-%{srcname}
Version: 5.0.3
Release: 1%{?dist}
Summary: Python library that sorts lists using the "natural order" sort
License: MIT
URL: https://github.com/SethMMorton/%{srcname}
Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
%global _description \
Python module which provides "natural sorting".\
\
Under natural sorting, numeric sub-strings are compared numerically,\
and the other word characters are compared lexically.\
\
Example:\
unsorted: ['a2', 'a9', 'a1', 'a4', 'a10']\
lexicographic sort: ['a1', 'a10', 'a2', 'a4', 'a9']\
natural sort: ['a1', 'a2', 'a4', 'a9', 'a10']
%description %{_description}
%package -n python2-%{srcname}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{srcname}}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-pytest
BuildRequires: python-pytest-pep8
BuildRequires: python2-pytest-flakes
BuildRequires: python2-pytest-cov
BuildRequires: python2-pytest-cache
BuildRequires: python2-hypothesis
BuildRequires: python2-mock
BuildRequires: python-pathlib
%description -n python2-%{srcname} %{_description}
Python 2 version.
%package -n python3-%{srcname}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{srcname}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pytest
BuildRequires: python3-pytest-pep8
BuildRequires: python3-pytest-flakes
BuildRequires: python3-pytest-cov
BuildRequires: python3-pytest-cache
BuildRequires: python3-hypothesis
%description -n python3-%{srcname} %{_description}
%prep
%autosetup -n %{srcname}-%{version}
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%check
%{__python2} setup.py test
%{__python3} setup.py test
%files -n python2-%{srcname}
%license LICENSE
%doc README.rst
%{python2_sitelib}/%{srcname}-*.egg-info/
%{python2_sitelib}/%{srcname}/
%files -n python3-%{srcname}
%license LICENSE
%doc README.rst
%{_bindir}/%{srcname}
%{python3_sitelib}/%{srcname}-*.egg-info/
%{python3_sitelib}/%{srcname}/
%changelog
* Thu May 4 2017 José Matos <jamatos@fedoraproject.org> - 5.0.3-1
- update to 5.0.3
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 5.0.1-2
- Rebuild for Python 3.6
* Fri Aug 12 2016 Igor Gnatenko <ignatenko@redhat.com> - 5.0.1-1
- Update to 5.0.1
- Trivial fixes in spec
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.4-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Sat Feb 6 2016 José Matos <jamatos@fedoraproject.org> - 4.0.4-1
- update to 4.0.4
- add BR: python-pathlib, python-mock and python-hypothesis to run tests
- clean spec file to take advantage of the new available macros
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.5-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Apr 6 2015 José Matos <jamatos@fedoraproject.org> - 3.5.5-1
- update to 3.5.5 (3.5.2+ required by nikola)
- add new dependencies to deal with tests (python?-execnet)
* Fri Sep 26 2014 José Matos <jamatos@fedoraproject.org> - 3.5.1-1
- update to 3.5.1
- add check (tests) section
* Fri May 30 2014 José Matos <jamatos@fedoraproject.org> - 3.2.0-2
- change references to __python to __python2
- fix typo in the list of files of the python3 subpackage that
referenced the version 2 directory
* Thu May 22 2014 José Matos <jamatos@fedoraproject.org> - 3.2.0-1
- initial package