1 |
commit: 625e074aaefea951864d94a2150278af0677b5e0 |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 28 13:25:14 2017 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 28 13:43:34 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=625e074a |
7 |
|
8 |
Documentation: be more pythonic |
9 |
|
10 |
.../maintainers/{cmake-dep-check.py => cmake_dep_check.py} | 9 +++++++-- |
11 |
1 file changed, 7 insertions(+), 2 deletions(-) |
12 |
|
13 |
diff --git a/Documentation/maintainers/cmake-dep-check.py b/Documentation/maintainers/cmake_dep_check.py |
14 |
similarity index 99% |
15 |
rename from Documentation/maintainers/cmake-dep-check.py |
16 |
rename to Documentation/maintainers/cmake_dep_check.py |
17 |
index 09ba701756..074c06e8be 100755 |
18 |
--- a/Documentation/maintainers/cmake-dep-check.py |
19 |
+++ b/Documentation/maintainers/cmake_dep_check.py |
20 |
@@ -324,8 +324,8 @@ def getMapping(package): |
21 |
return 'ERROR: could not find a mapping for ' + package |
22 |
|
23 |
|
24 |
-def main(): |
25 |
- cmakeFiles = findCmakeFiles('.') |
26 |
+def getDeps(path): |
27 |
+ cmakeFiles = findCmakeFiles(path) |
28 |
|
29 |
mappings = {} |
30 |
for file in cmakeFiles: |
31 |
@@ -338,6 +338,11 @@ def main(): |
32 |
mappings[file].append(getMapping(package[0] + component)) |
33 |
else: |
34 |
mappings[file].append(getMapping(package[0])) |
35 |
+ |
36 |
+ return mappings |
37 |
+ |
38 |
+def main(): |
39 |
+ mappings = getDeps('.') |
40 |
for key, value in mappings.items(): |
41 |
if len(value) >= 1: |
42 |
for package in sorted(set(value)): |