pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc



Module Name:    pkgsrc
Committed By:   jdolecek
Date:           Wed Nov 30 14:13:48 UTC 2016

Modified Files:
        pkgsrc/textproc: Makefile
Added Files:
        pkgsrc/textproc/py-natsort: DESCR Makefile PLIST distinfo

Log Message:
Add py-natsort 5.0.1 - Natural sorting for Python

based on wip version


To generate a diff of this commit:
cvs rdiff -u -r1.898 -r1.899 pkgsrc/textproc/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/py-natsort/DESCR \
    pkgsrc/textproc/py-natsort/Makefile pkgsrc/textproc/py-natsort/PLIST \
    pkgsrc/textproc/py-natsort/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/Makefile
diff -u pkgsrc/textproc/Makefile:1.898 pkgsrc/textproc/Makefile:1.899
--- pkgsrc/textproc/Makefile:1.898      Wed Nov 23 09:26:31 2016
+++ pkgsrc/textproc/Makefile    Wed Nov 30 14:13:48 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.898 2016/11/23 09:26:31 wiz Exp $
+# $NetBSD: Makefile,v 1.899 2016/11/30 14:13:48 jdolecek Exp $
 #
 
 COMMENT=       Text processing utilities (does not include desktop publishing)
@@ -743,6 +743,7 @@ SUBDIR+=    py-mecab
 SUBDIR+=       py-mkdocs
 SUBDIR+=       py-mkdocs-bootstrap
 SUBDIR+=       py-mkdocs-bootswatch
+SUBDIR+=       py-natsort
 SUBDIR+=       py-numpydoc
 SUBDIR+=       py-openpyxl
 SUBDIR+=       py-pdf-parser

Added files:

Index: pkgsrc/textproc/py-natsort/DESCR
diff -u /dev/null pkgsrc/textproc/py-natsort/DESCR:1.1
--- /dev/null   Wed Nov 30 14:13:48 2016
+++ pkgsrc/textproc/py-natsort/DESCR    Wed Nov 30 14:13:48 2016
@@ -0,0 +1,25 @@
+When you try to sort a list of strings that contain numbers, the
+normal python sort algorithm sorts lexicographically, so you might
+not get the results that you expect:
+
+>>> a = ['a2', 'a9', 'a1', 'a4', 'a10']
+>>> sorted(a)
+['a1', 'a10', 'a2', 'a4', 'a9']
+
+Notice that it has the order (‘1’, ‘10’, ‘2’) - this is because the
+list is being sorted in lexicographical order, which sorts numbers
+like you would letters (i.e. ‘b’, ‘ba’, ‘c’).
+
+natsort provides a function natsorted that helps sort lists
+“naturally”, either as real numbers (i.e. signed/unsigned floats
+or ints), or as versions. Using natsorted is simple:
+
+>>> from natsort import natsorted
+>>> a = ['a2', 'a9', 'a1', 'a4', 'a10']
+>>> natsorted(a)
+['a1', 'a2', 'a4', 'a9', 'a10']
+
+natsorted identifies numbers anywhere in a string and sorts them
+naturally. Here are some other things you can do with natsort (please
+see the examples for a quick start guide, or the api for more
+details).
Index: pkgsrc/textproc/py-natsort/Makefile
diff -u /dev/null pkgsrc/textproc/py-natsort/Makefile:1.1
--- /dev/null   Wed Nov 30 14:13:48 2016
+++ pkgsrc/textproc/py-natsort/Makefile Wed Nov 30 14:13:48 2016
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2016/11/30 14:13:48 jdolecek Exp $
+
+DISTNAME=          natsort-5.0.1
+PKGNAME=           ${PYPKGPREFIX}-${DISTNAME}
+CATEGORIES=        textproc python
+MASTER_SITES=  ${MASTER_SITE_PYPI:=n/natsort/}
+
+MAINTAINER=    kamelderouiche%yahoo.com@localhost
+HOMEPAGE=      https://github.com/SethMMorton/natsort
+COMMENT=       Natural sorting for python
+LICENSE=       mit
+
+WRKSRC=                ${WRKDIR}/natsort-5.0.1
+
+USE_LANGUAGES= # none
+
+.include "../../lang/python/egg.mk"
+.include "../../mk/bsd.pkg.mk"
\ No newline at end of file
Index: pkgsrc/textproc/py-natsort/PLIST
diff -u /dev/null pkgsrc/textproc/py-natsort/PLIST:1.1
--- /dev/null   Wed Nov 30 14:13:48 2016
+++ pkgsrc/textproc/py-natsort/PLIST    Wed Nov 30 14:13:48 2016
@@ -0,0 +1,46 @@
+@comment $NetBSD: PLIST,v 1.1 2016/11/30 14:13:48 jdolecek Exp $
+bin/natsort
+${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/entry_points.txt
+${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/natsort/__init__.py
+${PYSITELIB}/natsort/__init__.pyc
+${PYSITELIB}/natsort/__init__.pyo
+${PYSITELIB}/natsort/__main__.py
+${PYSITELIB}/natsort/__main__.pyc
+${PYSITELIB}/natsort/__main__.pyo
+${PYSITELIB}/natsort/_version.py
+${PYSITELIB}/natsort/_version.pyc
+${PYSITELIB}/natsort/_version.pyo
+${PYSITELIB}/natsort/compat/__init__.py
+${PYSITELIB}/natsort/compat/__init__.pyc
+${PYSITELIB}/natsort/compat/__init__.pyo
+${PYSITELIB}/natsort/compat/fake_fastnumbers.py
+${PYSITELIB}/natsort/compat/fake_fastnumbers.pyc
+${PYSITELIB}/natsort/compat/fake_fastnumbers.pyo
+${PYSITELIB}/natsort/compat/fastnumbers.py
+${PYSITELIB}/natsort/compat/fastnumbers.pyc
+${PYSITELIB}/natsort/compat/fastnumbers.pyo
+${PYSITELIB}/natsort/compat/locale.py
+${PYSITELIB}/natsort/compat/locale.pyc
+${PYSITELIB}/natsort/compat/locale.pyo
+${PYSITELIB}/natsort/compat/pathlib.py
+${PYSITELIB}/natsort/compat/pathlib.pyc
+${PYSITELIB}/natsort/compat/pathlib.pyo
+${PYSITELIB}/natsort/compat/py23.py
+${PYSITELIB}/natsort/compat/py23.pyc
+${PYSITELIB}/natsort/compat/py23.pyo
+${PYSITELIB}/natsort/natsort.py
+${PYSITELIB}/natsort/natsort.pyc
+${PYSITELIB}/natsort/natsort.pyo
+${PYSITELIB}/natsort/ns_enum.py
+${PYSITELIB}/natsort/ns_enum.pyc
+${PYSITELIB}/natsort/ns_enum.pyo
+${PYSITELIB}/natsort/unicode_numbers.py
+${PYSITELIB}/natsort/unicode_numbers.pyc
+${PYSITELIB}/natsort/unicode_numbers.pyo
+${PYSITELIB}/natsort/utils.py
+${PYSITELIB}/natsort/utils.pyc
+${PYSITELIB}/natsort/utils.pyo
Index: pkgsrc/textproc/py-natsort/distinfo
diff -u /dev/null pkgsrc/textproc/py-natsort/distinfo:1.1
--- /dev/null   Wed Nov 30 14:13:48 2016
+++ pkgsrc/textproc/py-natsort/distinfo Wed Nov 30 14:13:48 2016
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2016/11/30 14:13:48 jdolecek Exp $
+
+SHA1 (natsort-5.0.1.tar.gz) = 25e8fb806c7667d564d8881d257fc7222803d6ad
+RMD160 (natsort-5.0.1.tar.gz) = 53c8a553c00fad5bb47591fc79a886d98a6eff46
+SHA512 (natsort-5.0.1.tar.gz) = a183558b8a4be6300400b2efed901fb515efce4bb340b3bdda723f6a628aa05ad2f9e1f2c696afa3970e0c82aca47ea597985a1c6c971517ee3bf759f25241bd
+Size (natsort-5.0.1.tar.gz) = 68053 bytes



Home | Main Index | Thread Index | Old Index