Merge remote-tracking branch 'upstream/develop' into pkg-numdiff
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Mpich(Package):
|
||||
"""MPICH is a high performance and widely portable implementation of
|
||||
the Message Passing Interface (MPI) standard."""
|
||||
@@ -46,14 +47,16 @@ class Mpich(Package):
|
||||
provides('mpi@:3.0', when='@3:')
|
||||
provides('mpi@:1.3', when='@1:')
|
||||
|
||||
def setup_dependent_environment(self, module, spec, dep_spec):
|
||||
"""For dependencies, make mpicc's use spack wrapper."""
|
||||
os.environ['MPICH_CC'] = os.environ['CC']
|
||||
os.environ['MPICH_CXX'] = os.environ['CXX']
|
||||
os.environ['MPICH_F77'] = os.environ['F77']
|
||||
os.environ['MPICH_F90'] = os.environ['FC']
|
||||
os.environ['MPICH_FC'] = os.environ['FC']
|
||||
def setup_dependent_environment(self, env, dependent_spec):
|
||||
env.set('MPICH_CC', spack_cc)
|
||||
env.set('MPICH_CXX', spack_cxx)
|
||||
env.set('MPICH_F77', spack_f77)
|
||||
env.set('MPICH_F90', spack_f90)
|
||||
env.set('MPICH_FC', spack_fc)
|
||||
|
||||
def setup_dependent_python_module(self, module, spec, dep_spec):
|
||||
"""For dependencies, make mpicc's use spack wrapper."""
|
||||
# FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers?
|
||||
module.mpicc = join_path(self.prefix.bin, 'mpicc')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
|
@@ -123,7 +123,7 @@ def set_network_type(self, spec, configure_args):
|
||||
count += 1
|
||||
if count > 1:
|
||||
raise RuntimeError('network variants are mutually exclusive (only one can be selected at a time)')
|
||||
|
||||
network_options = []
|
||||
# From here on I can suppose that only one variant has been selected
|
||||
if self.enabled(Mvapich2.PSM) in spec:
|
||||
network_options = ["--with-device=ch3:psm"]
|
||||
|
@@ -1,5 +1,4 @@
|
||||
from spack import *
|
||||
import sys
|
||||
|
||||
class NetlibScalapack(Package):
|
||||
"""ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines"""
|
||||
@@ -41,11 +40,10 @@ def install(self, spec, prefix):
|
||||
make()
|
||||
make("install")
|
||||
|
||||
def setup_dependent_environment(self, module, spec, dependent_spec):
|
||||
def setup_dependent_python_module(self, module, spec, dependent_spec):
|
||||
lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
|
||||
lib_suffix = lib_dsuffix if '+shared' in spec['scalapack'] else '.a'
|
||||
|
||||
spec['scalapack'].fc_link = '-L%s -lscalapack' % spec['scalapack'].prefix.lib
|
||||
spec['scalapack'].cc_link = spec['scalapack'].fc_link
|
||||
spec['scalapack'].libraries = [join_path(spec['scalapack'].prefix.lib,
|
||||
'libscalapack%s' % lib_suffix)]
|
||||
spec['scalapack'].libraries = [join_path(spec['scalapack'].prefix.lib, 'libscalapack%s' % lib_suffix)]
|
||||
|
@@ -41,12 +41,13 @@ class Openmpi(Package):
|
||||
def url_for_version(self, version):
|
||||
return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version)
|
||||
|
||||
def setup_dependent_environment(self, module, spec, dep_spec):
|
||||
"""For dependencies, make mpicc's use spack wrapper."""
|
||||
os.environ['OMPI_CC'] = 'cc'
|
||||
os.environ['OMPI_CXX'] = 'c++'
|
||||
os.environ['OMPI_FC'] = 'f90'
|
||||
os.environ['OMPI_F77'] = 'f77'
|
||||
|
||||
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
|
||||
spack_env.set('OMPI_CC', spack_cc)
|
||||
spack_env.set('OMPI_CXX', spack_cxx)
|
||||
spack_env.set('OMPI_FC', spack_fc)
|
||||
spack_env.set('OMPI_F77', spack_f77)
|
||||
|
||||
|
||||
def install(self, spec, prefix):
|
||||
config_args = ["--prefix=%s" % prefix,
|
||||
|
@@ -16,9 +16,9 @@ class Paraview(Package):
|
||||
|
||||
variant('osmesa', default=False, description='Enable OSMesa support')
|
||||
variant('qt', default=False, description='Enable Qt support')
|
||||
variant('opengl2', default=False, description='Enable OPengl2 backend')
|
||||
variant('opengl2', default=False, description='Enable OpenGL2 backend')
|
||||
|
||||
depends_on('python', when='+python')
|
||||
depends_on('python@2:2.7', when='+python')
|
||||
depends_on('py-numpy', when='+python')
|
||||
depends_on('py-matplotlib', when='+python')
|
||||
depends_on('tcl', when='+tcl')
|
||||
@@ -37,11 +37,11 @@ class Paraview(Package):
|
||||
#depends_on('protobuf') # version mismatches?
|
||||
#depends_on('sqlite') # external version not supported
|
||||
depends_on('zlib')
|
||||
|
||||
|
||||
def url_for_version(self, version):
|
||||
"""Handle ParaView version-based custom URLs."""
|
||||
return self._url_str % (version.up_to(2), version)
|
||||
|
||||
|
||||
|
||||
def install(self, spec, prefix):
|
||||
with working_dir('spack-build', create=True):
|
||||
|
@@ -1,11 +1,12 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyNose(Package):
|
||||
"""nose extends the test loading and running features of unittest,
|
||||
making it easier to write, find and run tests."""
|
||||
|
||||
homepage = "https://pypi.python.org/pypi/nose"
|
||||
url = "https://pypi.python.org/packages/source/n/nose/nose-1.3.4.tar.gz"
|
||||
url = "https://pypi.python.org/packages/source/n/nose/nose-1.3.4.tar.gz"
|
||||
|
||||
version('1.3.4', '6ed7169887580ddc9a8e16048d38274d')
|
||||
version('1.3.6', '0ca546d81ca8309080fc80cb389e7a16')
|
||||
|
@@ -1,11 +1,14 @@
|
||||
import functools
|
||||
import glob
|
||||
import inspect
|
||||
import os
|
||||
import re
|
||||
from contextlib import closing
|
||||
from llnl.util.lang import match_predicate
|
||||
from spack.util.environment import *
|
||||
|
||||
from spack import *
|
||||
import spack
|
||||
from llnl.util.lang import match_predicate
|
||||
from spack import *
|
||||
from spack.util.environment import *
|
||||
|
||||
|
||||
class Python(Package):
|
||||
@@ -90,12 +93,28 @@ def site_packages_dir(self):
|
||||
return os.path.join(self.python_lib_dir, 'site-packages')
|
||||
|
||||
|
||||
def setup_dependent_environment(self, module, spec, ext_spec):
|
||||
"""Called before python modules' install() methods.
|
||||
def setup_dependent_environment(self, spack_env, run_env, extension_spec):
|
||||
# TODO: do this only for actual extensions.
|
||||
|
||||
# Set PYTHONPATH to include site-packages dir for the
|
||||
# extension and any other python extensions it depends on.
|
||||
python_paths = []
|
||||
for d in extension_spec.traverse():
|
||||
if d.package.extends(self.spec):
|
||||
python_paths.append(os.path.join(d.prefix, self.site_packages_dir))
|
||||
|
||||
pythonpath = ':'.join(python_paths)
|
||||
spack_env.set('PYTHONPATH', pythonpath)
|
||||
run_env.set('PYTHONPATH', pythonpath)
|
||||
|
||||
|
||||
def modify_module(self, module, spec, ext_spec):
|
||||
"""
|
||||
Called before python modules' install() methods.
|
||||
|
||||
In most cases, extensions will only need to have one line::
|
||||
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||
"""
|
||||
# Python extension builds can have a global python executable function
|
||||
if self.version >= Version("3.0.0") and self.version < Version("4.0.0"):
|
||||
@@ -111,15 +130,6 @@ def setup_dependent_environment(self, module, spec, ext_spec):
|
||||
# Make the site packages directory if it does not exist already.
|
||||
mkdirp(module.site_packages_dir)
|
||||
|
||||
# Set PYTHONPATH to include site-packages dir for the
|
||||
# extension and any other python extensions it depends on.
|
||||
python_paths = []
|
||||
for d in ext_spec.traverse():
|
||||
if d.package.extends(self.spec):
|
||||
python_paths.append(os.path.join(d.prefix, self.site_packages_dir))
|
||||
os.environ['PYTHONPATH'] = ':'.join(python_paths)
|
||||
|
||||
|
||||
# ========================================================================
|
||||
# Handle specifics of activating and deactivating python modules.
|
||||
# ========================================================================
|
||||
|
@@ -56,9 +56,12 @@ class Qt(Package):
|
||||
depends_on("libxcb")
|
||||
|
||||
|
||||
def setup_dependent_environment(self, module, spec, dep_spec):
|
||||
"""Dependencies of Qt find it using the QTDIR environment variable."""
|
||||
os.environ['QTDIR'] = self.prefix
|
||||
def setup_environment(self, spack_env, env):
|
||||
env.set('QTDIR', self.prefix)
|
||||
|
||||
|
||||
def setup_dependent_environment(self, spack_env, run_env, dspec):
|
||||
spack_env.set('QTDIR', self.prefix)
|
||||
|
||||
|
||||
def patch(self):
|
||||
|
@@ -1,9 +1,8 @@
|
||||
from spack import *
|
||||
import spack
|
||||
import os
|
||||
|
||||
|
||||
class Ruby(Package):
|
||||
"""A dynamic, open source programming language with a focus on
|
||||
"""A dynamic, open source programming language with a focus on
|
||||
simplicity and productivity."""
|
||||
|
||||
homepage = "https://www.ruby-lang.org/"
|
||||
@@ -15,11 +14,23 @@ class Ruby(Package):
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix=%s" % prefix)
|
||||
|
||||
make()
|
||||
make("install")
|
||||
|
||||
def setup_dependent_environment(self, module, spec, ext_spec):
|
||||
def setup_dependent_environment(self, spack_env, run_env, extension_spec):
|
||||
# TODO: do this only for actual extensions.
|
||||
# Set GEM_PATH to include dependent gem directories
|
||||
ruby_paths = []
|
||||
for d in extension_spec.traverse():
|
||||
if d.package.extends(self.spec):
|
||||
ruby_paths.append(d.prefix)
|
||||
|
||||
spack_env.set_path('GEM_PATH', ruby_paths)
|
||||
|
||||
# The actual installation path for this gem
|
||||
spack_env.set('GEM_HOME', extension_spec.prefix)
|
||||
|
||||
def modify_module(self, module, spec, ext_spec):
|
||||
"""Called before ruby modules' install() methods. Sets GEM_HOME
|
||||
and GEM_PATH to values appropriate for the package being built.
|
||||
|
||||
@@ -30,12 +41,3 @@ def setup_dependent_environment(self, module, spec, ext_spec):
|
||||
# Ruby extension builds have global ruby and gem functions
|
||||
module.ruby = Executable(join_path(spec.prefix.bin, 'ruby'))
|
||||
module.gem = Executable(join_path(spec.prefix.bin, 'gem'))
|
||||
|
||||
# Set GEM_PATH to include dependent gem directories
|
||||
ruby_paths = []
|
||||
for d in ext_spec.traverse():
|
||||
if d.package.extends(self.spec):
|
||||
ruby_paths.append(d.prefix)
|
||||
os.environ['GEM_PATH'] = ':'.join(ruby_paths)
|
||||
# The actual installation path for this gem
|
||||
os.environ['GEM_HOME'] = ext_spec.prefix
|
||||
|
Reference in New Issue
Block a user