diff options
author | Todd Gamblin <gamblin2@llnl.gov> | 2021-07-08 15:12:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 22:12:30 +0000 |
commit | 24c01d57cfb99946eff3af7ec62b71ae6ec72ed8 (patch) | |
tree | a9cbe1b7ef49d14c55fada060476b22fa57ef95e /lib/spack/spack/build_environment.py | |
parent | 620836a80960396487b5eeba41c2a57c0b4674d2 (diff) | |
download | spack-24c01d57cfb99946eff3af7ec62b71ae6ec72ed8.tar.gz spack-24c01d57cfb99946eff3af7ec62b71ae6ec72ed8.tar.bz2 spack-24c01d57cfb99946eff3af7ec62b71ae6ec72ed8.tar.xz spack-24c01d57cfb99946eff3af7ec62b71ae6ec72ed8.zip |
imports: sort imports everywhere in Spack (#24695)
* fix remaining flake8 errors
* imports: sort imports everywhere in Spack
We enabled import order checking in #23947, but fixing things manually drives
people crazy. This used `spack style --fix --all` from #24071 to automatically
sort everything in Spack so PR submitters won't have to deal with it.
This should go in after #24071, as it assumes we're using `isort`, not
`flake8-import-order` to order things. `isort` seems to be more flexible and
allows `llnl` mports to be in their own group before `spack` ones, so this
seems like a good switch.
Diffstat (limited to 'lib/spack/spack/build_environment.py')
-rw-r--r-- | lib/spack/spack/build_environment.py | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index a79a678825..c9be0bc1d8 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -33,44 +33,52 @@ Skimming this module is a nice way to get acquainted with the types of calls you can make from within the install() function. """ import inspect -import re import multiprocessing import os +import re import shutil import sys import traceback import types + from six import StringIO import llnl.util.tty as tty -from llnl.util.tty.color import cescape, colorize -from llnl.util.filesystem import mkdirp, install, install_tree +from llnl.util.filesystem import install, install_tree, mkdirp from llnl.util.lang import dedupe +from llnl.util.tty.color import cescape, colorize from llnl.util.tty.log import MultiProcessFd +import spack.architecture as arch import spack.build_systems.cmake import spack.build_systems.meson import spack.config +import spack.install_test import spack.main -import spack.paths import spack.package +import spack.paths import spack.repo import spack.schema.environment import spack.store -import spack.install_test import spack.subprocess_context -import spack.architecture as arch import spack.util.path -from spack.util.string import plural +from spack.error import NoHeadersError, NoLibrariesError +from spack.util.cpus import cpus_available from spack.util.environment import ( - env_flag, filter_system_paths, get_path, is_system_path, - EnvironmentModifications, validate, preserve_environment) -from spack.util.environment import system_dirs -from spack.error import NoLibrariesError, NoHeadersError + EnvironmentModifications, + env_flag, + filter_system_paths, + get_path, + is_system_path, + preserve_environment, + system_dirs, + validate, +) from spack.util.executable import Executable -from spack.util.module_cmd import load_module, path_from_modules, module -from spack.util.log_parse import parse_log_events, make_log_context -from spack.util.cpus import cpus_available +from spack.util.log_parse import make_log_context, parse_log_events +from spack.util.module_cmd import load_module, module, path_from_modules +from spack.util.string import plural + # # This can be set by the user to globally disable parallel builds. # |