aboutsummaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-01-11 22:59:49 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-01-11 22:59:49 +0200
commitc71f82432fab3f031f1805595daf03e08c1b4b87 (patch)
tree177b9bb11614ed6c9298c7ece8a45005a353a3d9 /build.py
parent36e2b0cd37df8d360c057222c5eb511751b67807 (diff)
downloadmeson-c71f82432fab3f031f1805595daf03e08c1b4b87.zip
meson-c71f82432fab3f031f1805595daf03e08c1b4b87.tar.gz
meson-c71f82432fab3f031f1805595daf03e08c1b4b87.tar.bz2
Extracted build data to its own class.
Diffstat (limited to 'build.py')
-rw-r--r--build.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/build.py b/build.py
new file mode 100644
index 0000000..61a51f4
--- /dev/null
+++ b/build.py
@@ -0,0 +1,37 @@
+#!/usr/bin/python3 -tt
+
+# Copyright 2012 Jussi Pakkanen
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class Build:
+ """A class that holds the status of one build including
+ all dependencies and so on.
+ """
+
+ def __init__(self, environment):
+ self.environment = environment
+ self.project = None
+ self.targets = {}
+ self.compilers = []
+ self.tests = []
+ self.static_linker = self.environment.detect_static_linker()
+
+ def get_project(self):
+ return self.project
+
+ def get_targets(self):
+ return self.targets
+
+ def get_tests(self):
+ return self.tests