From 50177d96b8b243f739d9a2adfe71734dc39f89b0 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 28 Feb 2016 09:24:20 -0800 Subject: [PATCH] Remove paths module --- site_scons/paths.py | 30 ------------------------------ site_scons/site_init.py | 3 --- 2 files changed, 33 deletions(-) delete mode 100644 site_scons/paths.py diff --git a/site_scons/paths.py b/site_scons/paths.py deleted file mode 100644 index c2b37b9..0000000 --- a/site_scons/paths.py +++ /dev/null @@ -1,30 +0,0 @@ -# paths.py -# Eryn Wells - -import os -import os.path - - -def is_executable(path): - return os.path.exists(path) and os.access(path, os.X_OK) - - -def which(program): - ''' - Look for `program` in system path and return the full path to that binary if - it is found. Otherwise, return `None`. - ''' - path, name = os.path.split(program) - if path: - if is_executable(program): - return program - else: - pathext = [''] + os.environ.get('PATHEXT', '').split(os.pathsep) - for path in os.environ.get('PATH', '').split(os.pathsep): - exe = os.path.join(path, program) - for ext in pathext: - candidate = exe + ext - if is_executable(candidate): - return candidate - return None - diff --git a/site_scons/site_init.py b/site_scons/site_init.py index 2d3788b..0c2f2ba 100644 --- a/site_scons/site_init.py +++ b/site_scons/site_init.py @@ -3,12 +3,9 @@ import logging import sys - import SCons.Environment import SCons.Errors -import paths - def setup_logging(level=logging.DEBUG): '''Configure global logging for the SCons system.'''