Wed Nov 30 14:38:58 2016 UTC ()
Clean up pkglint. Add some test dependencies, 4 more are not packaged
yet.


(wiz)
diff -r1.1 -r1.2 pkgsrc/textproc/py-natsort/DESCR
diff -r1.1 -r1.2 pkgsrc/textproc/py-natsort/Makefile

cvs diff -r1.1 -r1.2 pkgsrc/textproc/py-natsort/DESCR (expand / switch to unified diff)

--- pkgsrc/textproc/py-natsort/DESCR 2016/11/30 14:13:48 1.1
+++ pkgsrc/textproc/py-natsort/DESCR 2016/11/30 14:38:58 1.2
@@ -1,25 +1,23 @@ @@ -1,25 +1,23 @@
1When you try to sort a list of strings that contain numbers, the 1When you try to sort a list of strings that contain numbers, the
2normal python sort algorithm sorts lexicographically, so you might 2normal python sort algorithm sorts lexicographically, so you might
3not get the results that you expect: 3not get the results that you expect:
4 4
5>>> a = ['a2', 'a9', 'a1', 'a4', 'a10'] 5>>> a = ['a2', 'a9', 'a1', 'a4', 'a10']
6>>> sorted(a) 6>>> sorted(a)
7['a1', 'a10', 'a2', 'a4', 'a9'] 7['a1', 'a10', 'a2', 'a4', 'a9']
8 8
9Notice that it has the order (â˜1â, â˜10â, â˜2â) - this is because the 9Notice that it has the order ('1', '10', '2') - this is because the
10list is being sorted in lexicographical order, which sorts numbers 10list is being sorted in lexicographical order, which sorts numbers
11like you would letters (i.e. â˜bâ, â˜baâ, â˜câ). 11like you would letters (i.e. 'b', 'ba', 'c').
12 12
13natsort provides a function natsorted that helps sort lists 13natsort provides a function natsorted that helps sort lists
14âœnaturallyâ, either as real numbers (i.e. signed/unsigned floats 14"naturally", either as real numbers (i.e. signed/unsigned floats
15or ints), or as versions. Using natsorted is simple: 15or ints), or as versions. Using natsorted is simple:
16 16
17>>> from natsort import natsorted 17>>> from natsort import natsorted
18>>> a = ['a2', 'a9', 'a1', 'a4', 'a10'] 18>>> a = ['a2', 'a9', 'a1', 'a4', 'a10']
19>>> natsorted(a) 19>>> natsorted(a)
20['a1', 'a2', 'a4', 'a9', 'a10'] 20['a1', 'a2', 'a4', 'a9', 'a10']
21 21
22natsorted identifies numbers anywhere in a string and sorts them 22natsorted identifies numbers anywhere in a string and sorts them
23naturally. Here are some other things you can do with natsort (please 23naturally.
24see the examples for a quick start guide, or the api for more 
25details). 

cvs diff -r1.1 -r1.2 pkgsrc/textproc/py-natsort/Makefile (expand / switch to unified diff)

--- pkgsrc/textproc/py-natsort/Makefile 2016/11/30 14:13:48 1.1
+++ pkgsrc/textproc/py-natsort/Makefile 2016/11/30 14:38:58 1.2
@@ -1,18 +1,28 @@ @@ -1,18 +1,28 @@
1# $NetBSD: Makefile,v 1.1 2016/11/30 14:13:48 jdolecek Exp $ 1# $NetBSD: Makefile,v 1.2 2016/11/30 14:38:58 wiz Exp $
2 2
3DISTNAME= natsort-5.0.1 3DISTNAME= natsort-5.0.1
4PKGNAME= ${PYPKGPREFIX}-${DISTNAME} 4PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
5CATEGORIES= textproc python 5CATEGORIES= textproc python
6MASTER_SITES= ${MASTER_SITE_PYPI:=n/natsort/} 6MASTER_SITES= ${MASTER_SITE_PYPI:=n/natsort/}
7 7
8MAINTAINER= kamelderouiche@yahoo.com 8MAINTAINER= kamelderouiche@yahoo.com
9HOMEPAGE= https://github.com/SethMMorton/natsort 9HOMEPAGE= https://github.com/SethMMorton/natsort
10COMMENT= Natural sorting for python 10COMMENT= Natural sorting for python
11LICENSE= mit 11LICENSE= mit
12 12
13WRKSRC= ${WRKDIR}/natsort-5.0.1 
14 
15USE_LANGUAGES= # none 13USE_LANGUAGES= # none
16 14
 15# TEST_DEPENDS
 16BUILD_DEPENDS+= ${PYPKGPREFIX}-hypothesis-[0-9]*:../../devel/py-hypothesis
 17BUILD_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
 18BUILD_DEPENDS+= ${PYPKGPREFIX}-test-cov-[0-9]*:../../devel/py-test-cov
 19BUILD_DEPENDS+= ${PYPKGPREFIX}-flakes-[0-9]*:../../devel/py-flakes
 20BUILD_DEPENDS+= ${PYPKGPREFIX}-pep8-[0-9]*:../../devel/py-pep8
 21# these are currently unpackaged
 22#BUILD_DEPENDS+= ${PYPKGPREFIX}-test-cache-[0-9]*:../../devel/py-test-cache
 23#BUILD_DEPENDS+= ${PYPKGPREFIX}-test-flakes-[0-9]*:../../devel/py-test-flakes
 24#BUILD_DEPENDS+= ${PYPKGPREFIX}-test-pep8-[0-9]*:../../devel/py-test-pep8
 25#BUILD_DEPENDS+= ${PYPKGPREFIX}-execnet-[0-9]*:../../devel/py-execnet
 26
17.include "../../lang/python/egg.mk" 27.include "../../lang/python/egg.mk"
18.include "../../mk/bsd.pkg.mk" 28.include "../../mk/bsd.pkg.mk"