summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@googlemail.com>2017-04-02 20:40:09 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2017-04-02 11:40:09 -0700
commitffef681377a2140040b4d65a991b9f75e56f9252 (patch)
tree32294c2c46ee9b91235fad133ecd109e8e8d8920 /var
parent0e785e0500e73e35a61097d0b14b6fdce10d1e86 (diff)
downloadspack-ffef681377a2140040b4d65a991b9f75e56f9252.tar.gz
spack-ffef681377a2140040b4d65a991b9f75e56f9252.tar.bz2
spack-ffef681377a2140040b4d65a991b9f75e56f9252.tar.xz
spack-ffef681377a2140040b4d65a991b9f75e56f9252.zip
new directive: conflicts() (#3125)
* Add conflicts(<spec>) directive * openblas: added conflicts for intel@16 refs #3119 * added brief docs and unit tests
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/conflict-parent/package.py46
-rw-r--r--var/spack/repos/builtin.mock/packages/conflict/package.py46
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py2
3 files changed, 94 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/conflict-parent/package.py b/var/spack/repos/builtin.mock/packages/conflict-parent/package.py
new file mode 100644
index 0000000000..37805537a2
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/conflict-parent/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class ConflictParent(Package):
+ homepage = 'https://github.com/tgamblin/callpath'
+ url = 'http://github.com/tgamblin/callpath-1.0.tar.gz'
+
+ version(0.8, 'foobarbaz')
+ version(0.9, 'foobarbaz')
+ version(1.0, 'foobarbaz')
+
+ depends_on('conflict')
+
+ conflicts('^conflict~foo', when='@0.9')
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" % prefix)
+ make()
+ make("install")
+
+ def setup_environment(self, senv, renv):
+ renv.set('FOOBAR', self.name)
diff --git a/var/spack/repos/builtin.mock/packages/conflict/package.py b/var/spack/repos/builtin.mock/packages/conflict/package.py
new file mode 100644
index 0000000000..a6ba4b5c58
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/conflict/package.py
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+from spack import *
+
+
+class Conflict(Package):
+ homepage = 'https://github.com/tgamblin/callpath'
+ url = 'http://github.com/tgamblin/callpath-1.0.tar.gz'
+
+ version(0.8, 'foobarbaz')
+ version(0.9, 'foobarbaz')
+ version(1.0, 'foobarbaz')
+
+ variant('foo', default=True, description='')
+
+ conflicts('%clang', when='+foo')
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" % prefix)
+ make()
+ make("install")
+
+ def setup_environment(self, senv, renv):
+ renv.set('FOOBAR', self.name)
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index bfa5a16b42..6e16174563 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -59,6 +59,8 @@ class Openblas(MakefilePackage):
parallel = False
+ conflicts('%intel@16', when='@0.2.15:0.2.19')
+
@run_before('edit')
def check_compilers(self):
# As of 06/2016 there is no mechanism to specify that packages which