forked from pool/python-natsort
Accepting request 606003 from devel:languages:python:misc
naturally sorting in python OBS-URL: https://build.opensuse.org/request/show/606003 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-natsort?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
3
natsort-5.3.0.tar.gz
Normal file
3
natsort-5.3.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:28ae482b4547bea5a40e8a3a089e8d1ca95ff9878d97e4f416d49714f38dab8f
|
||||
size 141113
|
86
python-natsort.changes
Normal file
86
python-natsort.changes
Normal file
@@ -0,0 +1,86 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 21 16:37:13 UTC 2018 - arun@gmx.de
|
||||
|
||||
- update to version 5.3.0:
|
||||
* Fix bug in assessing fastnumbers version at import-time.
|
||||
* Add ability to consider unicode-decimal numbers as numbers.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 1 23:59:16 UTC 2018 - arun@gmx.de
|
||||
|
||||
- specfile:
|
||||
* update copyright year
|
||||
|
||||
- update to version 5.2.0:
|
||||
* Add ns.NUMAFTER to cause numbers to be placed after non-numbers.
|
||||
* Add natcmp function (Python 2 only).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 18 16:44:49 UTC 2017 - toddrme2178@gmail.com
|
||||
|
||||
- Implement single-spec version
|
||||
- Update to version 5.1.0
|
||||
* See changelog at https://github.com/SethMMorton/natsort/blob/5.1.0/docs/source/changelog.rst
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 3 17:30:17 UTC 2015 - toddrme2178@gmail.com
|
||||
|
||||
- Update to 3.5.2
|
||||
- Enhancement that will convert a 'pathlib.Path' object to a 'str' if
|
||||
'ns.PATH' is enabled.
|
||||
- Update to 3.5.1
|
||||
- Fixed bug that caused list/tuples to fail when using 'ns.LOWECASEFIRST'
|
||||
or 'ns.IGNORECASE'.
|
||||
- Refactored modules so that only the public API was in natsort.py and
|
||||
ns_enum.py.
|
||||
- Refactored all import statements to be absolute, not relative.
|
||||
- Update to 3.5.0
|
||||
- Added the 'alg' argument to the 'natsort' functions. This argument
|
||||
accepts an enum that is used to indicate the options the user wishes
|
||||
to use. The 'number_type', 'signed', 'exp', 'as_path', and 'py3_safe'
|
||||
options are being depreciated and will become (undocumented)
|
||||
keyword-only options in natsort version 4.0.0.
|
||||
- The user can now modify how 'natsort' handles the case of non-numeric
|
||||
characters.
|
||||
- The user can now instruct 'natsort' to use locale-aware sorting, which
|
||||
allows 'natsort' to perform true "human sorting".
|
||||
- The `humansorted` convenience function has been included to make this
|
||||
easier.
|
||||
- Updated shell script with locale functionality.
|
||||
- Update to 3.4.1
|
||||
- 'natsort' will now use the 'fastnumbers' module if it is installed. This
|
||||
gives up to an extra 30% boost in speed over the previous performance
|
||||
enhancements.
|
||||
- Made documentation point to more 'natsort' resources, and also added a
|
||||
new example in the examples section.
|
||||
- Update to 3.4.0
|
||||
- Fixed a bug that caused user's options to the 'natsort_key' to not be
|
||||
passed on to recursive calls of 'natsort_key'.
|
||||
- Added a 'natsort_keygen' function that will generate a wrapped version
|
||||
of 'natsort_key' that is easier to call. 'natsort_key' is now set to
|
||||
depreciate at natsort version 4.0.0.
|
||||
- Added an 'as_path' option to 'natsorted' & co. that will try to treat
|
||||
input strings as filepaths. This will help yield correct results for
|
||||
OS-generated inputs like
|
||||
``['/p/q/o.x', '/p/q (1)/o.x', '/p/q (10)/o.x', '/p/q/o (1).x']``.
|
||||
- Massive performance enhancements for string input (1.8x-2.0x), at the expense
|
||||
of reduction in speed for numeric input (~2.0x).
|
||||
- This is a good compromise because the most common input will be strings,
|
||||
not numbers, and sorting numbers still only takes 0.6x the time of sorting
|
||||
strings. If you are sorting only numbers, you would use 'sorted' anyway.
|
||||
- Added the 'order_by_index' function to help in using the output of
|
||||
'index_natsorted' and 'index_versorted'.
|
||||
- Added the 'reverse' option to 'natsorted' & co. to make it's API more
|
||||
similar to the builtin 'sorted'.
|
||||
- Added more unit tests.
|
||||
- Added auxillary test code that helps in profiling and stress-testing.
|
||||
- Reworked the documentation, moving most of it to PyPI's hosting platform.
|
||||
- Added support for coveralls.io.
|
||||
- Entire codebase is now PyFlakes and PEP8 compliant.
|
||||
- Implement update-alternatives for upcoming python 3 version.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 12 20:46:36 UTC 2014 - boris@steki.net
|
||||
|
||||
- initial packaging of 3.3.0 version
|
||||
|
82
python-natsort.spec
Normal file
82
python-natsort.spec
Normal file
@@ -0,0 +1,82 @@
|
||||
#
|
||||
# spec file for package python-natsort
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_without test
|
||||
Name: python-natsort
|
||||
Version: 5.3.0
|
||||
Release: 0
|
||||
Summary: Natural sorting in Python
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/SethMMorton/natsort
|
||||
Source: https://files.pythonhosted.org/packages/source/n/natsort/natsort-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: help2man
|
||||
BuildRequires: python-rpm-macros
|
||||
Recommends: python-PyICU
|
||||
Recommends: python-fastnumbers
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module hypothesis}
|
||||
BuildRequires: %{python_module pytest-cov}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: python-mock
|
||||
BuildRequires: python-pathlib
|
||||
%endif
|
||||
%ifpython2
|
||||
Requires: python-pathlib
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Natsort provides a function natsorted that helps sort lists
|
||||
"naturally" ("naturally" is rather ill-defined, but in general it means
|
||||
sorting based on meaning and not computer code point).
|
||||
|
||||
%prep
|
||||
%setup -q -n natsort-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
export PYTHONPATH=%{buildroot}%{python3_sitelib}
|
||||
help2man -o natsort.1 -N %{buildroot}%{_bindir}/natsort
|
||||
install -Dm0644 natsort.1 %{buildroot}%{_mandir}/man1/natsort.1
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||
pytest-%{$python_bin_suffix}
|
||||
}
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%python3_only %{_mandir}/man1/natsort.1%{ext_man}
|
||||
%python3_only %{_bindir}/natsort
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user