From bc13f8aae37f59539ebb3d973f932e929966e6531031bc9de4a73ca58edca1ab Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 10 May 2018 02:46:16 +0000 Subject: [PATCH] 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 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + natsort-5.3.0.tar.gz | 3 ++ python-natsort.changes | 86 ++++++++++++++++++++++++++++++++++++++++++ python-natsort.spec | 82 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 195 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 natsort-5.3.0.tar.gz create mode 100644 python-natsort.changes create mode 100644 python-natsort.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/natsort-5.3.0.tar.gz b/natsort-5.3.0.tar.gz new file mode 100644 index 0000000..801f94c --- /dev/null +++ b/natsort-5.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28ae482b4547bea5a40e8a3a089e8d1ca95ff9878d97e4f416d49714f38dab8f +size 141113 diff --git a/python-natsort.changes b/python-natsort.changes new file mode 100644 index 0000000..08da601 --- /dev/null +++ b/python-natsort.changes @@ -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 + diff --git a/python-natsort.spec b/python-natsort.spec new file mode 100644 index 0000000..2d88f43 --- /dev/null +++ b/python-natsort.spec @@ -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