diff options
Diffstat (limited to 'var')
5 files changed, 90 insertions, 16 deletions
diff --git a/var/spack/repos/builtin.mock/packages/nosource-install/package.py b/var/spack/repos/builtin.mock/packages/nosource-install/package.py new file mode 100644 index 0000000000..7ea8661d6e --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/nosource-install/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +import os +from spack import * +from llnl.util.filesystem import touch + + +class NosourceInstall(BundlePackage): + """Simple bundle package with one dependency and metadata 'install'.""" + + homepage = "http://www.example.com" + + version('2.0') + version('1.0') + + depends_on('dependency-install') + + # The install phase must be specified. + phases = ['install'] + + # The install method must also be present. + def install(self, spec, prefix): + touch(os.path.join(self.prefix, 'install.txt')) + + @run_after('install') + def post_install(self): + touch(os.path.join(self.prefix, 'post-install.txt')) diff --git a/var/spack/repos/builtin.mock/packages/nosource/package.py b/var/spack/repos/builtin.mock/packages/nosource/package.py new file mode 100644 index 0000000000..82e82267b0 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/nosource/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * + + +class Nosource(BundlePackage): + """Simple bundle package with one dependency""" + + homepage = "http://www.example.com" + + version('1.0') + + depends_on('dependency-install') diff --git a/var/spack/repos/builtin.mock/packages/noversion-bundle/package.py b/var/spack/repos/builtin.mock/packages/noversion-bundle/package.py new file mode 100644 index 0000000000..de6400636d --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/noversion-bundle/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * + + +class NoversionBundle(BundlePackage): + """ + Simple bundle package with no version and one dependency, which + should be rejected for lack of a version. + """ + + homepage = "http://www.example.com" + + depends_on('dependency-install') diff --git a/var/spack/repos/builtin.mock/packages/noversion/package.py b/var/spack/repos/builtin.mock/packages/noversion/package.py new file mode 100644 index 0000000000..40889a6a11 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/noversion/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Noversion(Package): + """ + Simple package with no version, which should be rejected since a version + is required. + """ + + homepage = "http://www.example.com" + url = "http://www.example.com/a-1.0.tar.gz" + + def install(self, spec, prefix): + touch(join_path(prefix, 'an_installation_file')) diff --git a/var/spack/repos/builtin/packages/xsdk/package.py b/var/spack/repos/builtin/packages/xsdk/package.py index e6e3426f4d..8f1caa0a7c 100644 --- a/var/spack/repos/builtin/packages/xsdk/package.py +++ b/var/spack/repos/builtin/packages/xsdk/package.py @@ -4,25 +4,23 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import os from spack import * -class Xsdk(Package): +class Xsdk(BundlePackage): """Xsdk is a suite of Department of Energy (DOE) packages for numerical simulation. This is a Spack bundle package that installs the xSDK packages """ homepage = "http://xsdk.info" - url = 'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/xsdk.tar.gz' maintainers = ['balay', 'luszczek'] - version('develop', 'a52dc710c744afa0b71429b8ec9425bc') - version('0.4.0', 'a52dc710c744afa0b71429b8ec9425bc') - version('0.3.0', 'a52dc710c744afa0b71429b8ec9425bc') - version('xsdk-0.2.0', 'a52dc710c744afa0b71429b8ec9425bc') + version('develop') + version('0.4.0') + version('0.3.0') + version('xsdk-0.2.0') variant('debug', default=False, description='Compile in debug mode') variant('cuda', default=False, description='Enable CUDA dependent packages') @@ -123,12 +121,3 @@ class Xsdk(Package): # How do we propagate debug flag to all depends on packages ? # If I just do spack install xsdk+debug will that propogate it down? - - # Dummy install for now, will be removed when metapackage is available - def install(self, spec, prefix): - # Prevent the error message - # ==> Error: Install failed for xsdk. Nothing was installed! - # ==> Error: Installation process had nonzero exit code : 256 - with open(os.path.join(spec.prefix, 'bundle-package.txt'), 'w') as out: - out.write('This is a bundle\n') - out.close() |