1 |
commit: 21ed8befb71cb458f7a1e15738042d69dda8cddc |
2 |
Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de> |
3 |
AuthorDate: Tue Jul 25 07:32:21 2017 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 25 22:34:26 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21ed8bef |
7 |
|
8 |
dev-python/scandir: new package. |
9 |
|
10 |
A better directory iterator and faster os.walk(). |
11 |
|
12 |
scandir() is a directory iteration function like os.listdir(), except that |
13 |
instead of returning a list of bare filenames, it yields DirEntry objects that |
14 |
include file type and stat information along with the name. Using scandir() |
15 |
increases the speed of os.walk() by 2-20 times (depending on the platform and |
16 |
file system) by avoiding unnecessary calls to os.stat() in most cases. |
17 |
|
18 |
Required by dev-python/pathlib2[python2_7,python3_4]. |
19 |
|
20 |
Gentoo-Bug: https://bugs.gentoo.org/626120 |
21 |
|
22 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
23 |
Closes: https://github.com/gentoo/gentoo/pull/5207 |
24 |
|
25 |
dev-python/scandir/Manifest | 1 + |
26 |
dev-python/scandir/metadata.xml | 12 ++++++++++++ |
27 |
dev-python/scandir/scandir-1.5.ebuild | 23 +++++++++++++++++++++++ |
28 |
3 files changed, 36 insertions(+) |
29 |
|
30 |
diff --git a/dev-python/scandir/Manifest b/dev-python/scandir/Manifest |
31 |
new file mode 100644 |
32 |
index 00000000000..778897f4213 |
33 |
--- /dev/null |
34 |
+++ b/dev-python/scandir/Manifest |
35 |
@@ -0,0 +1 @@ |
36 |
+DIST scandir-1.5.tar.gz 29351 SHA256 c2612d1a487d80fb4701b4a91ca1b8f8a695b1ae820570815e85e8c8b23f1283 SHA512 e6535e92011cc2c5f888ddd083a9dc48921609fd59d9bf9a4bcd596c055dc0510d48f6d3571605bbade3bd0e232e8bae94b44b20ba935e7ffdeec268ba3d2ee4 WHIRLPOOL 87808f7c76be95956a609ff1246fcd74103129883bad7300fbd5db7f743e9fcc93031d2d95d58cd36eb4bb6f5bcceadd5b77a4d2c2f3ce1d902073b9e55c4140 |
37 |
|
38 |
diff --git a/dev-python/scandir/metadata.xml b/dev-python/scandir/metadata.xml |
39 |
new file mode 100644 |
40 |
index 00000000000..708fb92089a |
41 |
--- /dev/null |
42 |
+++ b/dev-python/scandir/metadata.xml |
43 |
@@ -0,0 +1,12 @@ |
44 |
+<?xml version='1.0' encoding='UTF-8'?> |
45 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
46 |
+<pkgmetadata> |
47 |
+ <maintainer type="project"> |
48 |
+ <email>python@g.o</email> |
49 |
+ <name>Python</name> |
50 |
+ </maintainer> |
51 |
+ <upstream> |
52 |
+ <remote-id type="pypi">scandir</remote-id> |
53 |
+ <remote-id type="github">benhoyt/scandir</remote-id> |
54 |
+ </upstream> |
55 |
+</pkgmetadata> |
56 |
|
57 |
diff --git a/dev-python/scandir/scandir-1.5.ebuild b/dev-python/scandir/scandir-1.5.ebuild |
58 |
new file mode 100644 |
59 |
index 00000000000..9c409ca6ffb |
60 |
--- /dev/null |
61 |
+++ b/dev-python/scandir/scandir-1.5.ebuild |
62 |
@@ -0,0 +1,23 @@ |
63 |
+# Copyright 1999-2017 Gentoo Foundation |
64 |
+# Distributed under the terms of the GNU General Public License v2 |
65 |
+ |
66 |
+EAPI=6 |
67 |
+ |
68 |
+PYTHON_COMPAT=( python{2_7,3_4} pypy ) |
69 |
+ |
70 |
+inherit distutils-r1 |
71 |
+ |
72 |
+DESCRIPTION="A better directory iterator and faster os.walk()" |
73 |
+HOMEPAGE="https://github.com/benhoyt/scandir" |
74 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
75 |
+ |
76 |
+LICENSE="BSD" |
77 |
+SLOT="0" |
78 |
+KEYWORDS="~amd64 ~x86" |
79 |
+IUSE="test" |
80 |
+ |
81 |
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" |
82 |
+ |
83 |
+python_test() { |
84 |
+ ${EPYTHON} test/run_tests.py -v || die "tests failed under ${EPYTHON}" |
85 |
+} |