summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Richart <nicolas.richart@epfl.ch>2016-05-20 00:42:34 +0200
committerNicolas Richart <nicolas.richart@epfl.ch>2016-05-20 00:42:34 +0200
commita233ed2de78383cfa2688e33ab6ff1cf456a15f9 (patch)
tree0097348b1b0f28f88de4b7361890cbc53d9daf99
parenta51566ec6e4693cf32bab36e5a543ece426e37c7 (diff)
downloadspack-a233ed2de78383cfa2688e33ab6ff1cf456a15f9.tar.gz
spack-a233ed2de78383cfa2688e33ab6ff1cf456a15f9.tar.bz2
spack-a233ed2de78383cfa2688e33ab6ff1cf456a15f9.tar.xz
spack-a233ed2de78383cfa2688e33ab6ff1cf456a15f9.zip
changes scotch package to make he coverage test pass
-rw-r--r--var/spack/repos/builtin/packages/scotch/package.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py
index 5ce835189d..6b200d8fea 100644
--- a/var/spack/repos/builtin/packages/scotch/package.py
+++ b/var/spack/repos/builtin/packages/scotch/package.py
@@ -23,7 +23,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import os
-import re
from spack import *
@@ -60,11 +59,9 @@ class Scotch(Package):
def url_for_version(self, version):
return super(Scotch, self).url_for_version(version)
+ @when(":6.0.0")
def url_for_version(self, version):
- if version <= Version('6.0.0'):
- return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version)
- else:
- return super(Scotch, self).url_for_version(version)
+ return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version)
def patch(self):
self.configure()
@@ -168,15 +165,16 @@ class Scotch(Package):
# version prior to 6.0.0 there is no separated targets force
# ptesmumps, this library is built by the ptscotch target. This
# should explain the test for the can_make_parallel variable
- can_make_parallel = not (target == 'ptesmumps'
- or (self.spec.version < Version('6.0.0')
- and target == 'ptscotch'))
+ can_make_parallel = \
+ not (target == 'ptesmumps' or
+ (self.spec.version < Version('6.0.0') and
+ target == 'ptscotch'))
make(target, parallel=can_make_parallel)
# todo change this to take into account darwin systems
lib_ext = '.so' if '+shared' in self.spec else '.a'
- # It seams easier to remove metis wrappers from the folder that will be installed than
- # to tweak the Makefiles
+ # It seams easier to remove metis wrappers from the folder that will be
+ # installed than to tweak the Makefiles
if '+metis' not in self.spec:
with working_dir('lib'):
lib_ext = '.so' if '+shared' in self.spec else '.a'