From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C9896138AE9 for ; Thu, 28 Dec 2017 13:43:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B5578E0E56; Thu, 28 Dec 2017 13:43:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 903E9E0E56 for ; Thu, 28 Dec 2017 13:43:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0B36D33BF05 for ; Thu, 28 Dec 2017 13:43:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 99D60AFB2 for ; Thu, 28 Dec 2017 13:43:50 +0000 (UTC) From: "Michael Palimaka" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Palimaka" Message-ID: <1514468614.625e074aaefea951864d94a2150278af0677b5e0.kensington@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: Documentation/maintainers/ X-VCS-Repository: proj/kde X-VCS-Files: Documentation/maintainers/cmake-dep-check.py Documentation/maintainers/cmake_dep_check.py X-VCS-Directories: Documentation/maintainers/ X-VCS-Committer: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: 625e074aaefea951864d94a2150278af0677b5e0 X-VCS-Branch: master Date: Thu, 28 Dec 2017 13:43:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: df0dfbea-0d77-41ad-b8c5-fa7832d836a0 X-Archives-Hash: f023542e67e6cd3e7c66901fd8376b94 commit: 625e074aaefea951864d94a2150278af0677b5e0 Author: Michael Palimaka gentoo org> AuthorDate: Thu Dec 28 13:25:14 2017 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Thu Dec 28 13:43:34 2017 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=625e074a Documentation: be more pythonic .../maintainers/{cmake-dep-check.py => cmake_dep_check.py} | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/maintainers/cmake-dep-check.py b/Documentation/maintainers/cmake_dep_check.py similarity index 99% rename from Documentation/maintainers/cmake-dep-check.py rename to Documentation/maintainers/cmake_dep_check.py index 09ba701756..074c06e8be 100755 --- a/Documentation/maintainers/cmake-dep-check.py +++ b/Documentation/maintainers/cmake_dep_check.py @@ -324,8 +324,8 @@ def getMapping(package): return 'ERROR: could not find a mapping for ' + package -def main(): - cmakeFiles = findCmakeFiles('.') +def getDeps(path): + cmakeFiles = findCmakeFiles(path) mappings = {} for file in cmakeFiles: @@ -338,6 +338,11 @@ def main(): mappings[file].append(getMapping(package[0] + component)) else: mappings[file].append(getMapping(package[0])) + + return mappings + +def main(): + mappings = getDeps('.') for key, value in mappings.items(): if len(value) >= 1: for package in sorted(set(value)):