return predicate
-def tempdir():
- """ Return the default temorary directory. """
-
- return os.getenv('TMPDIR', os.getenv('TEMP', os.getenv('TMP', '/tmp')))
-
-
def run_build(command, *args, **kwargs):
""" Run and report build command execution
import sys
import argparse
import logging
-from libscanbuild import reconfigure_logging, tempdir
+import tempfile
+from libscanbuild import reconfigure_logging
from libscanbuild.clang import get_checkers
__all__ = ['parse_args_for_intercept_build', 'parse_args_for_analyze_build',
'--output',
'-o',
metavar='<path>',
- default=tempdir(),
+ default=tempfile.gettempdir(),
help="""Specifies the output directory for analyzer reports.
Subdirectory will be created if default directory is targeted.""")
output.add_argument(
from libear import build_libear, TemporaryDirectory
from libscanbuild import command_entry_point, compiler_wrapper, \
wrapper_environment, run_command, run_build
-from libscanbuild import duplicate_check, tempdir
+from libscanbuild import duplicate_check
from libscanbuild.compilation import split_command
from libscanbuild.arguments import parse_args_for_intercept_build
from libscanbuild.shell import encode, decode
for entry in itertools.chain(previous, current)
if os.path.exists(entry['file']) and not duplicate(entry))
- with TemporaryDirectory(prefix='intercept-', dir=tempdir()) as tmp_dir:
+ with TemporaryDirectory(prefix='intercept-') as tmp_dir:
# run the build command
environment = setup_environment(args, tmp_dir)
exit_code = run_build(args.build, env=environment)