Remove paths module
This commit is contained in:
parent
146b177ca9
commit
50177d96b8
2 changed files with 0 additions and 33 deletions
|
@ -1,30 +0,0 @@
|
|||
# paths.py
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
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
|
||||
|
|
@ -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.'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue