Skip to content

Commit

Permalink
[SCons] Remove unused code and other minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Sep 28, 2024
1 parent 18b6a67 commit bbb600e
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions site_scons/buildutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ def compiler_flag_list(
cc_flags = []
for flag in flags:
if flag in cc_flags:
continue
continue
if not any(re.match(exclude, flag) for exclude in excludes):
cc_flags.append(flag)

Expand Down Expand Up @@ -1212,9 +1212,8 @@ def listify(value: "Union[str, Iterable]") -> "List[str]":
"""
if isinstance(value, str):
return value.split()
else:
# Already a sequence. Return as a list
return list(value)
# Already a sequence. Return as a list
return list(value)


def remove_file(name: "TPathLike") -> None:
Expand All @@ -1233,19 +1232,6 @@ def remove_directory(name: "TPathLike") -> None:
shutil.rmtree(path_name)


def ipdb():
"""
Break execution and drop into an IPython debug shell at the point
where this function is called.
"""
from IPython.core.debugger import Pdb
from IPython.core import getipython

ip = getipython.get_ipython()
def_colors = ip.colors
Pdb(def_colors).set_trace(sys._getframe().f_back)


def get_spawn(env: "SCEnvironment"):
"""
A replacement for env['SPAWN'] on Windows that can deal with very long
Expand Down Expand Up @@ -1306,6 +1292,7 @@ def get_command_output(cmd: str, *args: str, ignore_errors=False):
)
return data.stdout.strip()


_python_info = None
def setup_python_env(env):
"""Set up an environment for compiling Python extension modules"""
Expand Down Expand Up @@ -1393,6 +1380,7 @@ def setup_python_env(env):

return env


def get_pip_install_location(
python_cmd: str,
user: bool = False,
Expand Down

0 comments on commit bbb600e

Please sign in to comment.