Merge lp:~kissiel/checkbox/fix-1394607 into lp:checkbox

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 3482
Merged at revision: 3485
Proposed branch: lp:~kissiel/checkbox/fix-1394607
Merge into: lp:checkbox
Diff against target: 37 lines (+20/-0)
1 file modified
checkbox-touch/build-me (+20/-0)
To merge this branch: bzr merge lp:~kissiel/checkbox/fix-1394607
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+244006@code.launchpad.net

Description of the change

This MR makes build-me check existance of certain paths related to
requirement libs. If any those directories and/or files are missing, it usually
means that get-libs wasn't run prior to build-me execution.

5c0090f checkbox-touch: exit build-me if get-libs wasn't run

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Just merge both already :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox-touch/build-me'
2--- checkbox-touch/build-me 2014-12-02 13:36:50 +0000
3+++ checkbox-touch/build-me 2014-12-08 15:36:30 +0000
4@@ -8,6 +8,24 @@
5 import sys
6
7
8+def check_libs_present():
9+ """
10+ Check if paths listed in NECESSARY_PATHS are present.
11+ This is a simple heuristic to check if get-libs prior to building
12+ click package.
13+ """
14+ NECESSARY_PATHS = [
15+ "lib/arm-linux-gnueabihf/io/thp/pyotherside/libpyothersideplugin.so",
16+ "lib/arm-linux-gnueabihf/libpython3.4m.so.1",
17+ "lib/py/lxml",
18+ "lib/py/plainbox",
19+ "lib/py/plainbox.egg-info",
20+ "lib/py/xlsxwriter"]
21+ for path in NECESSARY_PATHS:
22+ if not os.path.exists(path):
23+ raise EnvironmentError("{} not found!".format(path))
24+
25+
26 def get_revision_string(path='.'):
27
28 # Try getting revno from bazaar vcs
29@@ -54,6 +72,8 @@
30 "adb. Overrides ANDROID_SERIAL"))
31 args = parser.parse_args()
32
33+ check_libs_present()
34+
35 # generate setting.json
36 settings = {
37 "_comment": "file generated automatically with {0}"

Subscribers

People subscribed via source and target branches