Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/build.py
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-12-26 11:25:03 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-12-26 11:25:03 (GMT)
commitd23a83060ddad0b6da5504d8cb5d524891ad9631 (patch)
treebe881c67835922bc9d1c23276047b2f0241679c1 /devbot/build.py
parentbc6035454c6138d0974173900e50e33793b2e5d0 (diff)
pep8ize
Diffstat (limited to 'devbot/build.py')
-rw-r--r--devbot/build.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/devbot/build.py b/devbot/build.py
index 5ea9422..5c35999 100644
--- a/devbot/build.py
+++ b/devbot/build.py
@@ -16,6 +16,7 @@ from devbot import release
_builders = {}
_distributors = {}
+
def build_one(module_name):
environ.setup()
@@ -25,6 +26,7 @@ def build_one(module_name):
return False
+
def pull_one(module_name):
environ.setup()
@@ -34,6 +36,7 @@ def pull_one(module_name):
return False
+
def pull():
environ.setup()
@@ -43,6 +46,7 @@ def pull():
return True
+
def build(full=False):
if full or state.full_build_is_required():
state.clean_build_state()
@@ -64,6 +68,7 @@ def build(full=False):
return True
+
def distribute():
environ.setup()
@@ -74,6 +79,7 @@ def distribute():
return True
+
def clean():
_empty_dir(config.install_dir)
_empty_dir(config.get_build_dir())
@@ -83,13 +89,16 @@ def clean():
if module.get_git_module().clean():
print "Cleaned %s git repository." % module.name
+
def _ccache_reset():
subprocess.check_call(["ccache", "-z"], stdout=utils.devnull)
+
def _ccache_print_stats():
print "\n=== ccache statistics ===\n"
subprocess.check_call(["ccache", "-s"])
+
def _unlink_libtool_files():
def func(arg, dirname, fnames):
for fname in fnmatch.filter(fnames, "*.la"):
@@ -97,6 +106,7 @@ def _unlink_libtool_files():
os.path.walk(config.lib_dir, func, None)
+
def _pull_module(module):
print "\n=== Pulling %s ===\n" % module.name
@@ -107,9 +117,11 @@ def _pull_module(module):
return True
+
def _eval_option(option):
return eval(option, {"prefix": config.prefix_dir})
+
def _build_autotools(module, log):
# Workaround for aclocal 1.11 (fixed in 1.12)
aclocal_path = os.path.join(config.share_dir, "aclocal")
@@ -139,12 +151,14 @@ def _build_autotools(module, log):
_builders["autotools"] = _build_autotools
+
def _build_activity(module, log):
setup = os.path.join(module.get_source_dir(), "setup.py")
command.run([setup, "install", "--prefix", config.prefix_dir], log)
_builders["activity"] = _build_activity
+
def _distribute_autotools(module):
makefile = parse_makefile("Makefile")
filename = makefile["DIST_ARCHIVES"]
@@ -184,6 +198,7 @@ def _distribute_autotools(module):
_distributors["autotools"] = _distribute_autotools
+
def _build_module(module, log=None):
print "\n=== Building %s ===\n" % module.name
@@ -217,6 +232,7 @@ def _build_module(module, log=None):
return True
+
def _distribute_module(module, log=None):
print "\n=== Distribute %s ===\n" % module.name
@@ -240,6 +256,7 @@ def _distribute_module(module, log=None):
return True
+
def _empty_dir(dir_path):
print "Emptying %s directory" % dir_path
shutil.rmtree(dir_path, ignore_errors=True)