diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-04-11 15:07:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-11 15:07:15 +0200 |
commit | f110d0848a550ef4932132094d2cc626552b452b (patch) | |
tree | bf8645549f276dac2533bf3f638b11040344b1fd /var | |
parent | b033dbbbd05cd0f8564cc9607f2d1921eb8d12b4 (diff) | |
download | spack-f110d0848a550ef4932132094d2cc626552b452b.tar.gz spack-f110d0848a550ef4932132094d2cc626552b452b.tar.bz2 spack-f110d0848a550ef4932132094d2cc626552b452b.tar.xz spack-f110d0848a550ef4932132094d2cc626552b452b.zip |
nasm: remove custom phases (#29986)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/nasm/package.py | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/var/spack/repos/builtin/packages/nasm/package.py b/var/spack/repos/builtin/packages/nasm/package.py index be39246736..ad180ff105 100644 --- a/var/spack/repos/builtin/packages/nasm/package.py +++ b/var/spack/repos/builtin/packages/nasm/package.py @@ -2,11 +2,8 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) - from spack import * -is_windows = str(spack.platforms.host()) == 'windows' - class Nasm(Package): """NASM (Netwide Assembler) is an 80x86 assembler designed for @@ -31,8 +28,6 @@ class Nasm(Package): conflicts('%intel@:14', when='@2.14:', msg="Intel 14 has immature C11 support") - phases = ['configure', 'build', 'install'] - def patch(self): # Remove flags not recognized by the NVIDIA compiler if self.spec.satisfies('%nvhpc@:20.11'): @@ -41,22 +36,14 @@ class Nasm(Package): filter_file(r'CFLAGS="\$pa_add_flags__old_flags -Werror=.*"', 'CFLAGS="$pa_add_flags__old_flags"', 'configure') - def configure(self, spec, prefix): + def install(self, spec, prefix): with working_dir(self.stage.source_path, create=True): - if not is_windows: - configure(*['--prefix={0}'.format(self.prefix)]) + configure(*['--prefix={0}'.format(self.prefix)]) + make('V=1') + make('install') + @when('platform=windows') def build(self, spec, prefix): - with working_dir(self.stage.source_path): - if is_windows: - touch('asm\\warnings.time') - nmake('/f', 'Mkfiles\\msvc.mak') - else: - make(*['V=1']) - - def install(self, spec, prefix): - with working_dir(self.stage.source_path): - if is_windows: - pass - else: - make(*['install']) + with working_dir(self.stage.source_path, create=True): + touch('asm\\warnings.time') + nmake('/f', 'Mkfiles\\msvc.mak') |