6ded2ac
Name:           python-natsort
d8cd102
Version:        3.5.5
681fc0c
Release:        2%{?dist}
6ded2ac
Summary:        Python library that sorts lists using the "natural order" sort
6ded2ac
6ded2ac
License:        MIT
6ded2ac
URL:            https://github.com/SethMMorton/natsort
6ded2ac
Source0:        https://pypi.python.org/packages/source/n/natsort/natsort-%{version}.tar.gz
6ded2ac
6ded2ac
BuildArch:      noarch
6ded2ac
6ded2ac
BuildRequires:  python2-devel
6ded2ac
BuildRequires:  python-setuptools
6ded2ac
BuildRequires:  python3-devel
6ded2ac
BuildRequires:  python3-setuptools
2112f81
2112f81
# required for tests
6ded2ac
BuildRequires:  pytest
6ded2ac
BuildRequires:  python-pytest-cache
2112f81
BuildRequires:  python-pytest-cov
4959908
BuildRequires:  python-pytest-flakes
4959908
BuildRequires:  python-pytest-pep8
5ee8249
BuildRequires:  python-execnet
6ded2ac
BuildRequires:  python3-pytest
6ded2ac
BuildRequires:  python3-pytest-cache
2112f81
BuildRequires:  python3-pytest-cov
4959908
BuildRequires:  python3-pytest-flakes
4959908
BuildRequires:  python3-pytest-pep8
5ee8249
BuildRequires:  python3-execnet
6ded2ac
6ded2ac
%description
6ded2ac
python-natsort provides "natural sorting".
6ded2ac
6ded2ac
Under natural sorting, numeric sub-strings are compared numerically,
6ded2ac
and the other word characters are compared lexically.
6ded2ac
6ded2ac
Example:
6ded2ac
unsorted:           ['a2', 'a9', 'a1', 'a4', 'a10']
6ded2ac
lexicographic sort: ['a1', 'a10', 'a2', 'a4', 'a9']
6ded2ac
natural sort:       ['a1', 'a2', 'a4', 'a9', 'a10']
6ded2ac
6ded2ac
6ded2ac
%package -n python3-natsort
6ded2ac
Summary:	Python library that sorts lists using the "natural order" sort
6ded2ac
6ded2ac
6ded2ac
%description -n python3-natsort
6ded2ac
python-natsort provides "natural sorting".
6ded2ac
6ded2ac
Under natural sorting, numeric sub-strings are compared numerically,
6ded2ac
and the other word characters are compared lexically.
6ded2ac
6ded2ac
Example:
6ded2ac
unsorted:           ['a2', 'a9', 'a1', 'a4', 'a10']
6ded2ac
lexicographic sort: ['a1', 'a10', 'a2', 'a4', 'a9']
6ded2ac
natural sort:       ['a1', 'a2', 'a4', 'a9', 'a10']
6ded2ac
6ded2ac
6ded2ac
%prep
6ded2ac
%setup -q -n natsort-%{version}
6ded2ac
6ded2ac
rm -rf %{py3dir}
6ded2ac
cp -a . %{py3dir}
6ded2ac
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
6ded2ac
6ded2ac
6ded2ac
%build
6ded2ac
%{__python2} setup.py build
6ded2ac
pushd %{py3dir}
6ded2ac
%{__python3} setup.py build
6ded2ac
popd
6ded2ac
6ded2ac
6ded2ac
%install
6ded2ac
pushd %{py3dir}
6ded2ac
%{__python3} setup.py install --skip-build --root %{buildroot}
6ded2ac
popd
6ded2ac
rm %{buildroot}%{_bindir}/natsort
6ded2ac
6ded2ac
%{__python2} setup.py install --skip-build --root %{buildroot}
6ded2ac
6ded2ac
%check
6ded2ac
%{__python2} setup.py test
6ded2ac
pushd %{py3dir}
6ded2ac
%{__python3} setup.py test
6ded2ac
popd
6ded2ac
6ded2ac
6ded2ac
%files
6ded2ac
%{_bindir}/natsort
6ded2ac
%doc LICENSE
6ded2ac
%doc README.rst
6ded2ac
%{python_sitelib}/natsort
6ded2ac
%{python_sitelib}/natsort-%{version}-py*.egg-info
6ded2ac
6ded2ac
%files -n python3-natsort
6ded2ac
%doc LICENSE
6ded2ac
%doc README.rst
6ded2ac
%{python3_sitelib}/natsort
6ded2ac
%{python3_sitelib}/natsort-%{version}-py*.egg-info
6ded2ac
6ded2ac
6ded2ac
%changelog
681fc0c
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.5-2
681fc0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
681fc0c
d8cd102
* Mon Apr  6 2015 José Matos <jamatos@fedoraproject.org> - 3.5.5-1
d8cd102
- update to 3.5.5 (3.5.2+ required by nikola)
5ee8249
- add new dependencies to deal with tests (python?-execnet)
d8cd102
6ded2ac
* Fri Sep 26 2014 José Matos <jamatos@fedoraproject.org> - 3.5.1-1
6ded2ac
- update to 3.5.1
6ded2ac
- add check (tests) section
6ded2ac
6ded2ac
* Fri May 30 2014 José Matos <jamatos@fedoraproject.org> - 3.2.0-2
6ded2ac
- change references to __python to __python2
6ded2ac
- fix typo in the list of files of the python3 subpackage that
6ded2ac
  referenced the version 2 directory
6ded2ac
6ded2ac
* Thu May 22 2014 José Matos <jamatos@fedoraproject.org> - 3.2.0-1
6ded2ac
- initial package