diff options
author | Marius Brehler <marbre@linux.sungazer.de> | 2017-07-25 09:32:21 +0200 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2017-07-26 00:34:26 +0200 |
commit | 21ed8befb71cb458f7a1e15738042d69dda8cddc (patch) | |
tree | 2aad66203f5778d27056948d741db839638044c0 /dev-python/scandir/scandir-1.5.ebuild | |
parent | mail-filter/maildrop: Unbreak testsuite patch, closes bug #617992 by Ooblick. (diff) | |
download | gentoo-21ed8befb71cb458f7a1e15738042d69dda8cddc.tar.gz gentoo-21ed8befb71cb458f7a1e15738042d69dda8cddc.tar.bz2 gentoo-21ed8befb71cb458f7a1e15738042d69dda8cddc.zip |
dev-python/scandir: new package.
A better directory iterator and faster os.walk().
scandir() is a directory iteration function like os.listdir(), except that
instead of returning a list of bare filenames, it yields DirEntry objects that
include file type and stat information along with the name. Using scandir()
increases the speed of os.walk() by 2-20 times (depending on the platform and
file system) by avoiding unnecessary calls to os.stat() in most cases.
Required by dev-python/pathlib2[python2_7,python3_4].
Gentoo-Bug: https://bugs.gentoo.org/626120
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/5207
Diffstat (limited to 'dev-python/scandir/scandir-1.5.ebuild')
-rw-r--r-- | dev-python/scandir/scandir-1.5.ebuild | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/dev-python/scandir/scandir-1.5.ebuild b/dev-python/scandir/scandir-1.5.ebuild new file mode 100644 index 000000000000..9c409ca6ffb4 --- /dev/null +++ b/dev-python/scandir/scandir-1.5.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4} pypy ) + +inherit distutils-r1 + +DESCRIPTION="A better directory iterator and faster os.walk()" +HOMEPAGE="https://github.com/benhoyt/scandir" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" + +python_test() { + ${EPYTHON} test/run_tests.py -v || die "tests failed under ${EPYTHON}" +} |