diff options
author | Harmen Stoppels <me@harmenstoppels.nl> | 2024-11-20 16:15:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 16:15:28 +0100 |
commit | aa2c18e4df926611226b2d128610c2e8bb639c9e (patch) | |
tree | c4114719e7ec3b986d669d3f0acc98adeb64a095 /var | |
parent | 0ff3e863151a2c74ac202eefc0b4d3f65b39a85e (diff) | |
download | spack-aa2c18e4df926611226b2d128610c2e8bb639c9e.tar.gz spack-aa2c18e4df926611226b2d128610c2e8bb639c9e.tar.bz2 spack-aa2c18e4df926611226b2d128610c2e8bb639c9e.tar.xz spack-aa2c18e4df926611226b2d128610c2e8bb639c9e.zip |
spack style: import-check -> import, fix bugs, exclude spack.pkg (#47690)
Diffstat (limited to 'var')
6 files changed, 11 insertions, 6 deletions
diff --git a/var/spack/repos/builtin.mock/packages/find-externals1/package.py b/var/spack/repos/builtin.mock/packages/find-externals1/package.py index b8adbac19c..d6ddb320f9 100644 --- a/var/spack/repos/builtin.mock/packages/find-externals1/package.py +++ b/var/spack/repos/builtin.mock/packages/find-externals1/package.py @@ -5,7 +5,6 @@ import os import re -import spack.package_base from spack.package import * @@ -26,7 +25,7 @@ class FindExternals1(AutotoolsPackage): exes = [x for x in exe_to_path.keys() if "find-externals1-exe" in x] if not exes: return - exe = spack.util.executable.Executable(exe_to_path[exes[0]]) + exe = Executable(exe_to_path[exes[0]]) output = exe("--version", output=str) if output: match = re.search(r"find-externals1.*version\s+(\S+)", output) diff --git a/var/spack/repos/builtin.mock/packages/py-test-callback/package.py b/var/spack/repos/builtin.mock/packages/py-test-callback/package.py index 4abad2f679..74744e0f16 100644 --- a/var/spack/repos/builtin.mock/packages/py-test-callback/package.py +++ b/var/spack/repos/builtin.mock/packages/py-test-callback/package.py @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import spack.builder import spack.pkg.builtin.mock.python as mp from spack.build_systems._checks import BuilderWithDefaults, execute_install_time_tests from spack.package import * @@ -40,7 +41,7 @@ class MyBuilder(BuilderWithDefaults): def install(self, pkg, spec, prefix): pkg.install(spec, prefix) - spack.phase_callbacks.run_after("install")(execute_install_time_tests) + run_after("install")(execute_install_time_tests) def test_callback(self): self.pkg.test_callback() diff --git a/var/spack/repos/builtin/packages/chapel/package.py b/var/spack/repos/builtin/packages/chapel/package.py index 21f19a0c00..3e8693c787 100644 --- a/var/spack/repos/builtin/packages/chapel/package.py +++ b/var/spack/repos/builtin/packages/chapel/package.py @@ -6,6 +6,9 @@ import os import subprocess +import llnl.util.lang + +import spack.platforms import spack.platforms.cray from spack.package import * from spack.util.environment import is_system_path, set_env diff --git a/var/spack/repos/builtin/packages/cray-fftw/package.py b/var/spack/repos/builtin/packages/cray-fftw/package.py index 13526ecc61..4035ad3973 100644 --- a/var/spack/repos/builtin/packages/cray-fftw/package.py +++ b/var/spack/repos/builtin/packages/cray-fftw/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import llnl.util.lang + from spack.package import * diff --git a/var/spack/repos/builtin/packages/pythia6/package.py b/var/spack/repos/builtin/packages/pythia6/package.py index f28bf5c970..a027a19c57 100644 --- a/var/spack/repos/builtin/packages/pythia6/package.py +++ b/var/spack/repos/builtin/packages/pythia6/package.py @@ -138,9 +138,7 @@ class Pythia6(CMakePackage): # Use our provided CMakeLists.txt. The Makefile provided with # the source is GCC (gfortran) specific, and would have required # additional patching for the +root variant. - llnl.util.filesystem.copy( - os.path.join(os.path.dirname(__file__), "CMakeLists.txt"), self.stage.source_path - ) + copy(os.path.join(os.path.dirname(__file__), "CMakeLists.txt"), self.stage.source_path) # Apply the variant value at the relevant place in the source. filter_file( r"^(\s+PARAMETER\s*\(\s*NMXHEP\s*=\s*)\d+", diff --git a/var/spack/repos/builtin/packages/upcxx/package.py b/var/spack/repos/builtin/packages/upcxx/package.py index 141060a9d5..6fdcaf6a46 100644 --- a/var/spack/repos/builtin/packages/upcxx/package.py +++ b/var/spack/repos/builtin/packages/upcxx/package.py @@ -6,6 +6,8 @@ import os import re +import llnl.util.lang + import spack.platforms from spack.package import * |