From 9ae3703f76d1beb33be6ef800940276a2c3ebca4 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 26 Sep 2017 22:06:28 +0200 Subject: [PATCH] Revert some changes. --- builders/builder.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/builders/builder.py b/builders/builder.py index cbdbbf9..6aec400 100644 --- a/builders/builder.py +++ b/builders/builder.py @@ -43,7 +43,7 @@ def _which(program): Return absolute path to a command found on system PATH. """ def is_exe(fpath): - return os.path.isfile(fpath) #and (os.access(fpath, os.X_OK) or fpath.endswith('.py')) + return os.path.isfile(fpath) and os.access(fpath, os.X_OK) fpath, fname = os.path.split(program) if fpath and is_exe(os.path.abspath(program)): @@ -65,8 +65,8 @@ class Builder(object): self.setup_args() self.setup_system_paths() self.read_config() - self.setup_paths() self.setup_executables() + self.setup_paths() self.setup_extra() def _print(self, text, *args): @@ -189,7 +189,6 @@ class Builder(object): self._print_verbose('Executables:') for executable in self.config.options('executables'): path = self.config.get('executables', executable) - print(executable + " : " + path) if not path.strip(): path = None else: @@ -204,7 +203,6 @@ class Builder(object): self._print_verbose('Paths:') for name in self.config.options('paths'): path = os.path.abspath(self.config.get('paths', name)) - print(name + " : " + path) setattr(self, '{name}_path'.format(name=name), path) self._print_verbose(' {name:.<20} {path}'.format(name=name + ': ', path=path)) # Make any command line options override the config file