summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/fftx/package.py
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2022-07-30 15:19:18 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2022-07-31 13:29:20 -0700
commitf52f6e99dbf1131886a80112b8c79dfc414afb7c (patch)
tree05cb7d64b2395922f2f24683da49f472075be12c /var/spack/repos/builtin/packages/fftx/package.py
parent549ba1ed32372c67fc57271cde3797d58b7dec6e (diff)
downloadspack-f52f6e99dbf1131886a80112b8c79dfc414afb7c.tar.gz
spack-f52f6e99dbf1131886a80112b8c79dfc414afb7c.tar.bz2
spack-f52f6e99dbf1131886a80112b8c79dfc414afb7c.tar.xz
spack-f52f6e99dbf1131886a80112b8c79dfc414afb7c.zip
black: reformat entire repository with black
Diffstat (limited to 'var/spack/repos/builtin/packages/fftx/package.py')
-rw-r--r--var/spack/repos/builtin/packages/fftx/package.py77
1 files changed, 39 insertions, 38 deletions
diff --git a/var/spack/repos/builtin/packages/fftx/package.py b/var/spack/repos/builtin/packages/fftx/package.py
index fc2ce2d2bb..e66477f695 100644
--- a/var/spack/repos/builtin/packages/fftx/package.py
+++ b/var/spack/repos/builtin/packages/fftx/package.py
@@ -12,55 +12,56 @@ class Fftx(CMakePackage, CudaPackage, ROCmPackage):
operations composed of linear operations combined with DFT transforms."""
homepage = "https://spiral.net"
- url = "https://github.com/spiral-software/fftx/archive/refs/tags/1.0.3.tar.gz"
- git = "https://github.com/spiral-software/fftx.git"
+ url = "https://github.com/spiral-software/fftx/archive/refs/tags/1.0.3.tar.gz"
+ git = "https://github.com/spiral-software/fftx.git"
- maintainers = ['spiralgen']
+ maintainers = ["spiralgen"]
- version('develop', branch='develop')
- version('main', branch='main')
- version('1.0.3', sha256='b5ff275facce4a2fbabd0aecc65dd55b744794f2e07cd8cfa91363001c664896')
+ version("develop", branch="develop")
+ version("main", branch="main")
+ version("1.0.3", sha256="b5ff275facce4a2fbabd0aecc65dd55b744794f2e07cd8cfa91363001c664896")
- variant('build_type', default='Release',
- values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'),
- description='The build type to build')
+ variant(
+ "build_type",
+ default="Release",
+ values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"),
+ description="The build type to build",
+ )
- depends_on('spiral-software')
- depends_on('spiral-package-fftx')
- depends_on('spiral-package-simt')
+ depends_on("spiral-software")
+ depends_on("spiral-package-fftx")
+ depends_on("spiral-package-simt")
# depends_on('spiral-package-mpi')
- conflicts('+rocm', when='+cuda', msg='FFTX only supports one GPU backend at a time')
+ conflicts("+rocm", when="+cuda", msg="FFTX only supports one GPU backend at a time")
- @run_before('cmake')
+ @run_before("cmake")
def create_lib_source_code(self):
# What config should be built -- driven by spec
spec = self.spec
- backend = 'CPU'
- if '+cuda' in spec:
- backend = 'CUDA'
- if '+rocm' in spec:
- backend = 'HIP'
- self.build_config = '-D_codegen=%s' % backend
+ backend = "CPU"
+ if "+cuda" in spec:
+ backend = "CUDA"
+ if "+rocm" in spec:
+ backend = "HIP"
+ self.build_config = "-D_codegen=%s" % backend
# From directory examples/library run the build-lib-code.sh script
- with working_dir(join_path(self.stage.source_path, 'src', 'library')):
- bash = which('bash')
- bash('./build-lib-code.sh', backend)
+ with working_dir(join_path(self.stage.source_path, "src", "library")):
+ bash = which("bash")
+ bash("./build-lib-code.sh", backend)
def cmake_args(self):
spec = self.spec
- args = [
- '-DSPIRAL_HOME:STRING={0}'.format(spec['spiral-software'].prefix)
- ]
- args.append('-DCMAKE_INSTALL_PREFIX:PATH={0}'.format(self.stage.source_path))
+ args = ["-DSPIRAL_HOME:STRING={0}".format(spec["spiral-software"].prefix)]
+ args.append("-DCMAKE_INSTALL_PREFIX:PATH={0}".format(self.stage.source_path))
args.append(self.build_config)
- print('Args = ' + str(args))
+ print("Args = " + str(args))
return args
@property
def build_targets(self):
- return ['-j1', 'install']
+ return ["-j1", "install"]
def install(self, spec, prefix):
mkdirp(prefix.bin)
@@ -70,22 +71,22 @@ class Fftx(CMakePackage, CudaPackage, ROCmPackage):
mkdirp(prefix.lib)
with working_dir(self.stage.source_path):
- files = ('License.txt', 'README.md', 'ReleaseNotes.md')
+ files = ("License.txt", "README.md", "ReleaseNotes.md")
for fil in files:
install(fil, prefix)
with working_dir(self.stage.source_path):
- install_tree('bin', prefix.bin)
- install_tree('CMakeIncludes', prefix.CMakeIncludes)
- install_tree('examples', prefix.examples)
- install_tree('include', prefix.include)
- install_tree('lib', prefix.lib)
+ install_tree("bin", prefix.bin)
+ install_tree("CMakeIncludes", prefix.CMakeIncludes)
+ install_tree("examples", prefix.examples)
+ install_tree("include", prefix.include)
+ install_tree("lib", prefix.lib)
def setup_dependent_build_environment(self, env, dependent_spec):
- env.set('FFTX_HOME', self.prefix)
+ env.set("FFTX_HOME", self.prefix)
def setup_dependent_run_environment(self, env, dependent_spec):
- env.set('FFTX_HOME', self.prefix)
+ env.set("FFTX_HOME", self.prefix)
def setup_run_environment(self, env):
- env.set('FFTX_HOME', self.prefix)
+ env.set("FFTX_HOME", self.prefix)