summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/cmake-client/package.py89
-rw-r--r--var/spack/repos/builtin.mock/packages/cmake/package.py69
-rw-r--r--var/spack/repos/builtin/packages/bash/package.py20
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py12
-rw-r--r--var/spack/repos/builtin/packages/dbus/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py21
-rw-r--r--var/spack/repos/builtin/packages/dia/package.py34
-rw-r--r--var/spack/repos/builtin/packages/dyninst/package.py2
-rw-r--r--var/spack/repos/builtin/packages/eigen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/environment-modules/package.py38
-rw-r--r--var/spack/repos/builtin/packages/git/package.py2
-rw-r--r--var/spack/repos/builtin/packages/global/package.py1
-rw-r--r--var/spack/repos/builtin/packages/hdf5/package.py17
-rw-r--r--var/spack/repos/builtin/packages/ipopt/package.py51
-rw-r--r--var/spack/repos/builtin/packages/libxcb/package.py3
-rw-r--r--var/spack/repos/builtin/packages/metis/package.py104
-rw-r--r--var/spack/repos/builtin/packages/modules/package.py25
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py12
-rw-r--r--var/spack/repos/builtin/packages/mumps/package.py9
-rw-r--r--var/spack/repos/builtin/packages/mvapich2/package.py7
-rw-r--r--var/spack/repos/builtin/packages/ncurses/package.py7
-rw-r--r--var/spack/repos/builtin/packages/netcdf-cxx/package.py6
-rw-r--r--var/spack/repos/builtin/packages/netlib-lapack/package.py13
-rw-r--r--var/spack/repos/builtin/packages/netlib-scalapack/package.py1
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py8
-rw-r--r--var/spack/repos/builtin/packages/parmetis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dask/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-decorator/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-mpmath/package.py13
-rw-r--r--var/spack/repos/builtin/packages/py-networkx/package.py15
-rw-r--r--var/spack/repos/builtin/packages/py-pillow/package.py63
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-image/package.py20
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-learn/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-sympy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py1
-rw-r--r--var/spack/repos/builtin/packages/readline/package.py4
-rw-r--r--var/spack/repos/builtin/packages/suite-sparse/package.py41
-rw-r--r--var/spack/repos/builtin/packages/superlu-dist/package.py2
-rw-r--r--var/spack/repos/builtin/packages/tcl/package.py9
-rw-r--r--var/spack/repos/builtin/packages/tk/package.py6
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py2
42 files changed, 691 insertions, 81 deletions
diff --git a/var/spack/repos/builtin.mock/packages/cmake-client/package.py b/var/spack/repos/builtin.mock/packages/cmake-client/package.py
new file mode 100644
index 0000000000..a5d3ef156a
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/cmake-client/package.py
@@ -0,0 +1,89 @@
+##############################################################################
+# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Written 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 General Public License (as published by
+# the Free Software Foundation) version 2.1 dated 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 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 *
+import os
+
+def check(condition, msg):
+ """Raise an install error if condition is False."""
+ if not condition:
+ raise InstallError(msg)
+
+
+class CmakeClient(Package):
+ """A dumy package that uses cmake."""
+ homepage = 'https://www.example.com'
+ url = 'https://www.example.com/cmake-client-1.0.tar.gz'
+
+ version('1.0', '4cb3ff35b2472aae70f542116d616e63')
+
+ depends_on('cmake')
+
+
+ def setup_environment(self, spack_env, run_env):
+ spack_cc # Ensure spack module-scope variable is avaiabl
+ check(from_cmake == "from_cmake",
+ "setup_environment couldn't read global set by cmake.")
+
+ check(self.spec['cmake'].link_arg == "test link arg",
+ "link arg on dependency spec not readable from setup_environment.")
+
+
+ def setup_dependent_environment(self, spack_env, run_env, dspec):
+ spack_cc # Ensure spack module-scope variable is avaiable
+ check(from_cmake == "from_cmake",
+ "setup_dependent_environment couldn't read global set by cmake.")
+
+ check(self.spec['cmake'].link_arg == "test link arg",
+ "link arg on dependency spec not readable from setup_dependent_environment.")
+
+
+ def setup_dependent_package(self, module, dspec):
+ spack_cc # Ensure spack module-scope variable is avaiable
+ check(from_cmake == "from_cmake",
+ "setup_dependent_package couldn't read global set by cmake.")
+
+ check(self.spec['cmake'].link_arg == "test link arg",
+ "link arg on dependency spec not readable from setup_dependent_package.")
+
+
+
+ def install(self, spec, prefix):
+ # check that cmake is in the global scope.
+ global cmake
+ check(cmake is not None, "No cmake was in environment!")
+
+ # check that which('cmake') returns the right one.
+ cmake = which('cmake')
+ check(cmake.exe[0].startswith(spec['cmake'].prefix.bin),
+ "Wrong cmake was in environment: %s" % cmake)
+
+ check(from_cmake == "from_cmake",
+ "Couldn't read global set by cmake.")
+
+ check(os.environ['from_cmake'] == 'from_cmake',
+ "Couldn't read env var set in envieonmnt by dependency")
+
+ mkdirp(prefix.bin)
+ touch(join_path(prefix.bin, 'dummy'))
diff --git a/var/spack/repos/builtin.mock/packages/cmake/package.py b/var/spack/repos/builtin.mock/packages/cmake/package.py
new file mode 100644
index 0000000000..deb44c2bf7
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/cmake/package.py
@@ -0,0 +1,69 @@
+##############################################################################
+# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Written 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 General Public License (as published by
+# the Free Software Foundation) version 2.1 dated 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 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 *
+import os
+
+def check(condition, msg):
+ """Raise an install error if condition is False."""
+ if not condition:
+ raise InstallError(msg)
+
+
+class Cmake(Package):
+ """A dumy package for the cmake build system."""
+ homepage = 'https://www.cmake.org'
+ url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz'
+
+ version('3.4.3', '4cb3ff35b2472aae70f542116d616e63',
+ url='https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz')
+
+
+ def setup_environment(self, spack_env, run_env):
+ spack_cc # Ensure spack module-scope variable is avaiable
+ spack_env.set('for_install', 'for_install')
+
+ def setup_dependent_environment(self, spack_env, run_env, dspec):
+ spack_cc # Ensure spack module-scope variable is avaiable
+ spack_env.set('from_cmake', 'from_cmake')
+
+
+ def setup_dependent_package(self, module, dspec):
+ spack_cc # Ensure spack module-scope variable is avaiable
+
+ self.spec.from_cmake = "from_cmake"
+ module.from_cmake = "from_cmake"
+
+ self.spec.link_arg = "test link arg"
+
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+
+ check(os.environ['for_install'] == 'for_install',
+ "Couldn't read env var set in compile envieonmnt")
+
+ cmake_exe = join_path(prefix.bin, 'cmake')
+ touch(cmake_exe)
+ set_executable(cmake_exe)
diff --git a/var/spack/repos/builtin/packages/bash/package.py b/var/spack/repos/builtin/packages/bash/package.py
new file mode 100644
index 0000000000..9c9fbeedcf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bash/package.py
@@ -0,0 +1,20 @@
+from spack import *
+
+class Bash(Package):
+ """The GNU Project's Bourne Again SHell."""
+
+ homepage = "https://www.gnu.org/software/bash/"
+ url = "ftp://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz"
+
+ version('4.3', '81348932d5da294953e15d4814c74dd1')
+
+ depends_on('readline')
+
+ def install(self, spec, prefix):
+ configure('--prefix=%s' % prefix,
+ '--with-curses',
+ '--with-installed-readline=%s' % spec['readline'].prefix)
+
+ make()
+ make("tests")
+ make("install")
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index f889da21f2..12bc9508c3 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -199,6 +199,18 @@ class Boost(Package):
install_tree(src, dst)
return
+ # Remove libraries that the release version does not support
+ if not spec.satisfies('@1.54.0:'):
+ withLibs.remove('log')
+ if not spec.satisfies('@1.53.0:'):
+ withLibs.remove('atomic')
+ if not spec.satisfies('@1.48.0:'):
+ withLibs.remove('locale')
+ if not spec.satisfies('@1.47.0:'):
+ withLibs.remove('chrono')
+ if not spec.satisfies('@1.43.0:'):
+ withLibs.remove('random')
+
# to make Boost find the user-config.jam
env['BOOST_BUILD_PATH'] = './'
diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py
index 422f5a19eb..74ce8ef502 100644
--- a/var/spack/repos/builtin/packages/dbus/package.py
+++ b/var/spack/repos/builtin/packages/dbus/package.py
@@ -20,6 +20,8 @@ class Dbus(Package):
version('1.8.4', '4717cb8ab5b80978fcadf2b4f2f72e1b')
version('1.8.2', 'd6f709bbec0a022a1847c7caec9d6068')
+ depends_on('expat')
+
def install(self, spec, prefix):
configure(
"--prefix=%s" % prefix,
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 0b76db3827..b251d50ca1 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -23,8 +23,10 @@ class Dealii(Package):
# required dependencies, light version
depends_on ("blas")
- depends_on ("boost", when='~mpi')
- depends_on ("boost+mpi", when='+mpi')
+ # Boost 1.58 is blacklisted, see https://github.com/dealii/dealii/issues/1591
+ # require at least 1.59
+ depends_on ("boost@1.59.0:", when='~mpi')
+ depends_on ("boost@1.59.0:+mpi", when='+mpi')
depends_on ("bzip2")
depends_on ("cmake")
depends_on ("lapack")
@@ -38,7 +40,7 @@ class Dealii(Package):
depends_on ("arpack-ng+mpi", when='+arpack+mpi')
depends_on ("doxygen", when='+doc')
depends_on ("hdf5+mpi~cxx", when='+hdf5+mpi') #FIXME NetCDF declares dependency with ~cxx, why?
- depends_on ("metis", when='+metis')
+ depends_on ("metis@5:", when='+metis')
depends_on ("netcdf+mpi", when="+netcdf+mpi")
depends_on ("netcdf-cxx", when='+netcdf+mpi')
depends_on ("oce", when='+oce')
@@ -174,6 +176,19 @@ class Dealii(Package):
make('release')
make('run',parallel=False)
+ # An example which uses Metis + PETSc
+ # FIXME: switch step-18 to MPI
+ with working_dir('examples/step-18'):
+ print('=====================================')
+ print('============= Step-18 ===============')
+ print('=====================================')
+ # list the number of cycles to speed up
+ filter_file(r'(end_time = 10;)', ('end_time = 3;'), 'step-18.cc')
+ if '^petsc' in spec and '^metis' in spec:
+ cmake('.')
+ make('release')
+ make('run',parallel=False)
+
# take step-40 which can use both PETSc and Trilinos
# FIXME: switch step-40 to MPI run
with working_dir('examples/step-40'):
diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py
new file mode 100644
index 0000000000..1cb5910e46
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dia/package.py
@@ -0,0 +1,34 @@
+from spack import *
+
+class Dia(Package):
+ """Dia is a program for drawing structured diagrams."""
+ homepage = 'https://wiki.gnome.org/Apps/Dia'
+ url = 'https://ftp.gnome.org/pub/gnome/sources/dia/0.97/dia-0.97.3.tar.xz'
+
+ version('0.97.3', '0e744a0f6a6c4cb6a089e4d955392c3c')
+
+ depends_on('gtkplus@2.6.0:')
+ depends_on('cairo')
+ #depends_on('libart') # optional dependency, not yet supported by spack.
+ depends_on('libpng')
+ depends_on('libxslt')
+ depends_on('python')
+ depends_on('swig')
+ # depends_on('py-gtk') # optional dependency, not yet supported by spack.
+
+ def url_for_version(self, version):
+ """Handle Dia's version-based custom URLs."""
+ return 'https://ftp.gnome.org/pub/gnome/source/dia/%s/dia-%s.tar.xz' % (version.up_to(2), version)
+
+ def install(self, spec, prefix):
+
+ # configure, build, install:
+ options = ['--prefix=%s' % prefix,
+ '--with-cairo',
+ '--with-xslt-prefix=%s' % spec['libxslt'].prefix,
+ '--with-python',
+ '--with-swig']
+
+ configure(*options)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py
index 0111dcbe08..b28e897a0f 100644
--- a/var/spack/repos/builtin/packages/dyninst/package.py
+++ b/var/spack/repos/builtin/packages/dyninst/package.py
@@ -31,6 +31,8 @@ class Dyninst(Package):
url = "http://www.dyninst.org/sites/default/files/downloads/dyninst/8.1.2/DyninstAPI-8.1.2.tgz"
list_url = "http://www.dyninst.org/downloads/dyninst-8.x"
+ version('9.1.0', '5c64b77521457199db44bec82e4988ac',
+ url="http://www.paradyn.org/release9.1.0/DyninstAPI-9.1.0.tgz")
version('8.2.1', 'abf60b7faabe7a2e4b54395757be39c7',
url="http://www.paradyn.org/release8.2/DyninstAPI-8.2.1.tgz")
version('8.1.2', 'bf03b33375afa66fe0efa46ce3f4b17a',
diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py
index 8d6e672f86..1501989812 100644
--- a/var/spack/repos/builtin/packages/eigen/package.py
+++ b/var/spack/repos/builtin/packages/eigen/package.py
@@ -45,7 +45,7 @@ class Eigen(Package):
# TODO : dependency on googlehash, superlu, adolc missing
- depends_on('metis', when='+metis')
+ depends_on('metis@5:', when='+metis')
depends_on('scotch', when='+scotch')
depends_on('fftw', when='+fftw')
depends_on('suite-sparse', when='+suitesparse')
diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py
new file mode 100644
index 0000000000..45181da41b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/environment-modules/package.py
@@ -0,0 +1,38 @@
+from spack import *
+
+
+class EnvironmentModules(Package):
+ """The Environment Modules package provides for the dynamic
+ modification of a user's environment via modulefiles."""
+
+ homepage = "https://sourceforge.net/p/modules/wiki/Home/"
+ url = "http://prdownloads.sourceforge.net/modules/modules-3.2.10.tar.gz"
+
+ version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb')
+
+ # Dependencies:
+ depends_on('tcl')
+
+ def install(self, spec, prefix):
+ tcl_spec = spec['tcl']
+
+ # See: https://sourceforge.net/p/modules/bugs/62/
+ CPPFLAGS = ['-DUSE_INTERP_ERRORLINE']
+ config_args = [
+ "--without-tclx",
+ "--with-tclx-ver=0.0",
+ "--prefix=%s" % prefix,
+ "--with-tcl=%s" % join_path(tcl_spec.prefix, 'lib'), # It looks for tclConfig.sh
+ "--with-tcl-ver=%d.%d" % (tcl_spec.version.version[0], tcl_spec.version.version[1]),
+ '--disable-debug',
+ '--disable-dependency-tracking',
+ '--disable-silent-rules',
+ '--disable-versioning',
+ '--datarootdir=%s' % prefix.share,
+ 'CPPFLAGS=%s' % ' '.join(CPPFLAGS)
+ ]
+
+
+ configure(*config_args)
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py
index 586b6ce3c3..388f84aefd 100644
--- a/var/spack/repos/builtin/packages/git/package.py
+++ b/var/spack/repos/builtin/packages/git/package.py
@@ -36,6 +36,8 @@ class Git(Package):
depends_on("curl", when="+curl")
depends_on("expat", when="+expat")
+ # Also depends_on gettext: apt-get install gettext (Ubuntu)
+
# Use system perl for now.
# depends_on("perl")
# depends_on("pcre")
diff --git a/var/spack/repos/builtin/packages/global/package.py b/var/spack/repos/builtin/packages/global/package.py
index e8f06516d9..aac1cede30 100644
--- a/var/spack/repos/builtin/packages/global/package.py
+++ b/var/spack/repos/builtin/packages/global/package.py
@@ -11,6 +11,7 @@ class Global(Package):
version('6.5', 'dfec818b4f53d91721e247cf7b218078')
depends_on('exuberant-ctags')
+ depends_on('ncurses')
def install(self, spec, prefix):
config_args = ['--prefix={0}'.format(prefix)]
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py
index 513a38ee8a..f26e225b83 100644
--- a/var/spack/repos/builtin/packages/hdf5/package.py
+++ b/var/spack/repos/builtin/packages/hdf5/package.py
@@ -37,6 +37,7 @@ class Hdf5(Package):
list_url = "http://www.hdfgroup.org/ftp/HDF5/releases"
list_depth = 3
+ version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199')
version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618')
version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24')
version('1.8.13', 'c03426e9e77d7766944654280b467289')
@@ -80,10 +81,16 @@ class Hdf5(Package):
# sanity check in configure, so this doesn't merit a variant.
extra_args.append("--enable-unsupported")
- if '+debug' in spec:
- extra_args.append('--enable-debug=all')
+ if spec.satisfies('@1.10:'):
+ if '+debug' in spec:
+ extra_args.append('--enable-build-mode=debug')
+ else:
+ extra_args.append('--enable-build-mode=production')
else:
- extra_args.append('--enable-production')
+ if '+debug' in spec:
+ extra_args.append('--enable-debug=all')
+ else:
+ extra_args.append('--enable-production')
if '+shared' in spec:
extra_args.append('--enable-shared')
@@ -139,5 +146,7 @@ class Hdf5(Package):
return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + ".tar.gz"
elif version < Version("1.7"):
return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + ".tar.gz"
- else:
+ elif version < Version("1.10"):
return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz"
+ else:
+ return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz"
diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py
new file mode 100644
index 0000000000..13c37bf79c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ipopt/package.py
@@ -0,0 +1,51 @@
+from spack import *
+
+class Ipopt(Package):
+ """Ipopt (Interior Point OPTimizer, pronounced eye-pea-Opt) is a
+ software package for large-scale nonlinear optimization."""
+ homepage = "https://projects.coin-or.org/Ipopt"
+ url = "http://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.4.tgz"
+
+ version('3.12.4', '12a8ecaff8dd90025ddea6c65b49cb03')
+ version('3.12.3', 'c560cbfa9cbf62acf8b485823c255a1b')
+ version('3.12.2', 'ec1e855257d7de09e122c446506fb00d')
+ version('3.12.1', 'ceaf895ce80c77778f2cab68ba9f17f3')
+ version('3.12.0', 'f7dfc3aa106a6711a85214de7595e827')
+
+ depends_on("blas")
+ depends_on("lapack")
+ depends_on("pkg-config")
+ depends_on("mumps+double~mpi")
+
+ def install(self, spec, prefix):
+ # Dependency directories
+ blas_dir = spec['blas'].prefix
+ lapack_dir = spec['lapack'].prefix
+ mumps_dir = spec['mumps'].prefix
+
+ # Add directory with fake MPI headers in sequential MUMPS
+ # install to header search path
+ mumps_flags = "-ldmumps -lmumps_common -lpord -lmpiseq"
+ mumps_libcmd = "-L%s " % mumps_dir.lib + mumps_flags
+
+ # By convention, spack links blas & lapack libs to libblas & liblapack
+ blas_lib = "-L%s" % blas_dir.lib + " -lblas"
+ lapack_lib = "-L%s" % lapack_dir.lib + " -llapack"
+
+ configure_args = [
+ "--prefix=%s" % prefix,
+ "--with-mumps-incdir=%s" % mumps_dir.include,
+ "--with-mumps-lib=%s" % mumps_libcmd,
+ "--enable-shared",
+ "--with-blas-incdir=%s" % blas_dir.include,
+ "--with-blas-lib=%s" % blas_lib,
+ "--with-lapack-incdir=%s" % lapack_dir.include,
+ "--with-lapack-lib=%s" % lapack_lib
+ ]
+
+ configure(*configure_args)
+
+ # IPOPT does not build correctly in parallel on OS X
+ make(parallel=False)
+ make("test", parallel=False)
+ make("install", parallel=False)
diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py
index 1dd5954c99..d7d94c4546 100644
--- a/var/spack/repos/builtin/packages/libxcb/package.py
+++ b/var/spack/repos/builtin/packages/libxcb/package.py
@@ -14,6 +14,9 @@ class Libxcb(Package):
depends_on("python")
depends_on("xcb-proto")
+ # depends_on('pthread') # Ubuntu: apt-get install libpthread-stubs0-dev
+ # depends_on('xau') # Ubuntu: apt-get install libxau-dev
+
def patch(self):
filter_file('typedef struct xcb_auth_info_t {', 'typedef struct {', 'src/xcb.h')
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py
index 9301135f9f..41e3ebb429 100644
--- a/var/spack/repos/builtin/packages/metis/package.py
+++ b/var/spack/repos/builtin/packages/metis/package.py
@@ -24,7 +24,7 @@
##############################################################################
from spack import *
-import glob,sys
+import glob, sys, os
class Metis(Package):
"""
@@ -36,7 +36,10 @@ class Metis(Package):
homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview'
url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz"
- version('5.1.0', '5465e67079419a69e0116de24fce58fe')
+ version('5.1.0', '5465e67079419a69e0116de24fce58fe',
+ url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz')
+ version('4.0.3', '5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55',
+ url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz')
variant('shared', default=True, description='Enables the build of shared libraries')
variant('debug', default=False, description='Builds the library in debug mode')
@@ -45,12 +48,85 @@ class Metis(Package):
variant('idx64', default=False, description='Use int64_t as default index type')
variant('double', default=False, description='Use double precision floating point types')
- depends_on('cmake @2.8:') # build-time dependency
-
+ depends_on('cmake @2.8:', when='@5:') # build-time dependency
depends_on('gdb', when='+gdb')
- patch('install_gklib_defs_rename.patch')
+ patch('install_gklib_defs_rename.patch', when='@5:')
+
+
+ @when('@4:4.0.3')
+ def install(self, spec, prefix):
+
+ if '+gdb' in spec:
+ raise InstallError('gdb support not implemented in METIS 4!')
+ if '+idx64' in spec:
+ raise InstallError('idx64 option not implemented in METIS 4!')
+ if '+double' in spec:
+ raise InstallError('double option not implemented for METIS 4!')
+
+ options = ['COPTIONS=-fPIC']
+ if '+debug' in spec:
+ options.append('OPTFLAGS=-g -O0')
+ make(*options)
+
+ mkdir(prefix.bin)
+ for x in ('pmetis', 'kmetis', 'oemetis', 'onmetis', 'partnmesh',
+ 'partdmesh', 'mesh2nodal', 'mesh2dual', 'graphchk'):
+ install(x, prefix.bin)
+
+ mkdir(prefix.lib)
+ install('libmetis.a', prefix.lib)
+
+ mkdir(prefix.include)
+ for h in glob.glob(join_path('Lib', '*.h')):
+ install(h, prefix.include)
+
+ mkdir(prefix.share)
+ for f in (join_path(*p)
+ for p in (('Programs', 'io.c'),
+ ('Test','mtest.c'),
+ ('Graphs','4elt.graph'),
+ ('Graphs', 'metis.mesh'),
+ ('Graphs', 'test.mgraph'))):
+ install(f, prefix.share)
+ if '+shared' in spec:
+ if sys.platform == 'darwin':
+ lib_dsuffix = 'dylib'
+ load_flag = '-Wl,-all_load'
+ no_load_flag = ''
+ else:
+ lib_dsuffix = 'so'
+ load_flag = '-Wl,-whole-archive'
+ no_load_flag = '-Wl,-no-whole-archive'
+
+ os.system(spack_cc + ' -fPIC -shared ' + load_flag +
+ ' libmetis.a ' + no_load_flag + ' -o libmetis.' +
+ lib_dsuffix)
+ install('libmetis.' + lib_dsuffix, prefix.lib)
+
+ # Set up and run tests on installation
+ symlink(join_path(prefix.share, 'io.c'), 'io.c')
+ symlink(join_path(prefix.share, 'mtest.c'), 'mtest.c')
+ os.system(spack_cc + ' -I%s' % prefix.include + ' -c io.c')
+ os.system(spack_cc + ' -I%s' % prefix.include +
+ ' -L%s' % prefix.lib + ' -lmetis mtest.c io.o -o mtest')
+ _4eltgraph = join_path(prefix.share, '4elt.graph')
+ test_mgraph = join_path(prefix.share, 'test.mgraph')
+ metis_mesh = join_path(prefix.share, 'metis.mesh')
+ kmetis = join_path(prefix.bin, 'kmetis')
+ os.system('./mtest ' + _4eltgraph)
+ os.system(kmetis + ' ' + _4eltgraph + ' 40')
+ os.system(join_path(prefix.bin, 'onmetis') + ' ' + _4eltgraph)
+ os.system(join_path(prefix.bin, 'pmetis') + ' ' + test_mgraph + ' 2')
+ os.system(kmetis + ' ' + test_mgraph + ' 2')
+ os.system(kmetis + ' ' + test_mgraph + ' 5')
+ os.system(join_path(prefix.bin, 'partnmesh') + metis_mesh + ' 10')
+ os.system(join_path(prefix.bin, 'partdmesh') + metis_mesh + ' 10')
+ os.system(join_path(prefix.bin, 'mesh2dual') + metis_mesh)
+
+
+ @when('@5:')
def install(self, spec, prefix):
options = []
@@ -79,10 +155,28 @@ class Metis(Package):
if '+double' in spec:
filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header)
+ # Make clang 7.3 happy.
+ # Prevents "ld: section __DATA/__thread_bss extends beyond end of file"
+ # See upstream LLVM issue https://llvm.org/bugs/show_bug.cgi?id=27059
+ # Adopted from https://github.com/Homebrew/homebrew-science/blob/master/metis.rb
+ if spec.satisfies('%clang@7.3.0'):
+ filter_file('#define MAX_JBUFS 128', '#define MAX_JBUFS 24', join_path(source_directory, 'GKlib', 'error.c'))
+
with working_dir(build_directory, create=True):
cmake(source_directory, *options)
make()
make("install")
+ # now run some tests:
+ for f in ["4elt", "copter2", "mdual"]:
+ graph = join_path(source_directory,'graphs','%s.graph' % f)
+ Executable(join_path(prefix.bin,'graphchk'))(graph)
+ Executable(join_path(prefix.bin,'gpmetis'))(graph,'2')
+ Executable(join_path(prefix.bin,'ndmetis'))(graph)
+
+ graph = join_path(source_directory,'graphs','test.mgraph')
+ Executable(join_path(prefix.bin,'gpmetis'))(graph,'2')
+ graph = join_path(source_directory,'graphs','metis.mesh')
+ Executable(join_path(prefix.bin,'mpmetis'))(graph,'2')
# install GKlib headers, which will be needed for ParMETIS
GKlib_dist = join_path(prefix.include,'GKlib')
diff --git a/var/spack/repos/builtin/packages/modules/package.py b/var/spack/repos/builtin/packages/modules/package.py
deleted file mode 100644
index b014ee460c..0000000000
--- a/var/spack/repos/builtin/packages/modules/package.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from spack import *
-
-class Modules(Package):
- """ The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles. """
-
- homepage = "http://modules.sf.net"
- url = "http://downloads.sourceforge.net/project/modules/Modules/modules-3.2.10/modules-3.2.10.tar.gz"
-
- version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb')
-
- depends_on("tcl")
-
- def install(self, spec, prefix):
-
- options = ['--prefix=%s' % prefix,
- '--disable-debug',
- '--disable-dependency-tracking',
- '--disable-silent-rules',
- '--disable-versioning',
- '--datarootdir=%s' % prefix.share,
- 'CPPFLAGS=-DUSE_INTERP_ERRORLINE']
-
- configure(*options)
- make()
- make("install")
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 2d7955e08d..b317ec6651 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -47,12 +47,12 @@ class Mpich(Package):
provides('mpi@:3.0', when='@3:')
provides('mpi@:1.3', when='@1:')
- 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_environment(self, spack_env, run_env, dependent_spec):
+ spack_env.set('MPICH_CC', spack_cc)
+ spack_env.set('MPICH_CXX', spack_cxx)
+ spack_env.set('MPICH_F77', spack_f77)
+ spack_env.set('MPICH_F90', spack_fc)
+ spack_env.set('MPICH_FC', spack_fc)
def setup_dependent_package(self, module, dep_spec):
"""For dependencies, make mpicc's use spack wrapper."""
diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py
index 26440ab7c8..58f790ec32 100644
--- a/var/spack/repos/builtin/packages/mumps/package.py
+++ b/var/spack/repos/builtin/packages/mumps/package.py
@@ -1,5 +1,5 @@
from spack import *
-import os, sys
+import os, sys, glob
class Mumps(Package):
"""MUMPS: a MUltifrontal Massively Parallel sparse direct Solver"""
@@ -23,7 +23,7 @@ class Mumps(Package):
depends_on('scotch + esmumps', when='~ptscotch+scotch')
depends_on('scotch + esmumps + mpi', when='+ptscotch')
- depends_on('metis', when='+metis')
+ depends_on('metis@5:', when='+metis')
depends_on('parmetis', when="+parmetis")
depends_on('blas')
depends_on('lapack')
@@ -164,10 +164,13 @@ class Mumps(Package):
install_tree('lib', prefix.lib)
install_tree('include', prefix.include)
- if '~mpi' in spec:
+
+ if '~mpi' in spec:
lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
lib_suffix = lib_dsuffix if '+shared' in spec else '.a'
install('libseq/libmpiseq%s' % lib_suffix, prefix.lib)
+ for f in glob.glob(join_path('libseq','*.h')):
+ install(f, prefix.include)
# FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI
# FIXME: use something like numdiff to compare blessed output with the current
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py
index e4e95f92af..3e60b517db 100644
--- a/var/spack/repos/builtin/packages/mvapich2/package.py
+++ b/var/spack/repos/builtin/packages/mvapich2/package.py
@@ -140,6 +140,13 @@ class Mvapich2(Package):
configure_args.extend(network_options)
+ def setup_dependent_environment(self, spack_env, run_env, extension_spec):
+ spack_env.set('MPICH_CC', spack_cc)
+ spack_env.set('MPICH_CXX', spack_cxx)
+ spack_env.set('MPICH_F77', spack_f77)
+ spack_env.set('MPICH_F90', spack_fc)
+ spack_env.set('MPICH_FC', spack_fc)
+
def install(self, spec, prefix):
# we'll set different configure flags depending on our environment
configure_args = [
diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py
index 8dc808caac..219fbce226 100644
--- a/var/spack/repos/builtin/packages/ncurses/package.py
+++ b/var/spack/repos/builtin/packages/ncurses/package.py
@@ -8,11 +8,10 @@ class Ncurses(Package):
"""
homepage = "http://invisible-island.net/ncurses/ncurses.html"
+ url = "http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz"
- version('5.9', '8cb9c412e5f2d96bc6f459aa8c6282a1',
- url='http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz')
- version('6.0', 'ee13d052e1ead260d7c28071f46eefb1',
- url='http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz')
+ version('6.0', 'ee13d052e1ead260d7c28071f46eefb1')
+ version('5.9', '8cb9c412e5f2d96bc6f459aa8c6282a1')
patch('patch_gcc_5.txt', when='%gcc@5.0:')
diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py
index 5334dfb853..8aa1d8b236 100644
--- a/var/spack/repos/builtin/packages/netcdf-cxx/package.py
+++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py
@@ -1,7 +1,11 @@
from spack import *
class NetcdfCxx(Package):
- """C++ compatibility bindings for NetCDF"""
+ """Deprecated C++ compatibility bindings for NetCDF.
+ These do NOT read or write NetCDF-4 files, and are no longer
+ maintained by Unidata. Developers should migrate to current
+ NetCDF C++ bindings, in Spack package netcdf-cxx4."""
+
homepage = "http://www.unidata.ucar.edu/software/netcdf"
url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx-4.2.tar.gz"
diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py
index 05436332ac..f70e634347 100644
--- a/var/spack/repos/builtin/packages/netlib-lapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py
@@ -34,15 +34,17 @@ class NetlibLapack(Package):
def patch(self):
# Fix cblas CMakeLists.txt -- has wrong case for subdirectory name.
- filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/',
- '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True)
-
+ if self.spec.satisfies('@3.6.0:'):
+ filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/',
+ '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True)
def install_one(self, spec, prefix, shared):
cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'),
- '-DCBLAS=ON', # always build CBLAS
'-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'),
'-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')]
+ if spec.satisfies('@3.6.0:'):
+ cmake_args.extend(['-DCBLAS=ON']) # always build CBLAS
+
if '+external-blas' in spec:
# TODO : the mechanism to specify the library should be more general,
# TODO : but this allows to have an hook to an external blas
@@ -80,6 +82,3 @@ class NetlibLapack(Package):
if '+shared' in self.spec:
self.spec.blas_shared_lib = join_path(libdir, 'libblas.%s' % dso_suffix)
self.spec.lapack_shared_lib = join_path(libdir, 'liblapack.%s' % dso_suffix)
-
-
-
diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
index d59f8e41fe..276876d197 100644
--- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
@@ -18,6 +18,7 @@ class NetlibScalapack(Package):
provides('scalapack')
+ depends_on('cmake')
depends_on('mpi')
depends_on('lapack')
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index 4ec829a85b..9f13d0690b 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -19,8 +19,11 @@ class Openblas(Package):
def install(self, spec, prefix):
- make_defs = ['CC=%s' % spack_cc,
- 'FC=%s' % spack_fc]
+ # Openblas is picky about compilers. Configure fails with
+ # FC=/abs/path/to/f77, whereas FC=f77 works fine.
+ # To circumvent this, provide basename only:
+ make_defs = ['CC=%s' % os.path.basename(spack_cc),
+ 'FC=%s' % os.path.basename(spack_f77)]
make_targets = ['libs', 'netlib']
@@ -67,4 +70,3 @@ class Openblas(Package):
if '+shared' in self.spec:
self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' % dso_suffix)
self.spec.lapack_shared_lib = self.spec.blas_shared_lib
-
diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py
index ff4370aa4b..b49f8dae00 100644
--- a/var/spack/repos/builtin/packages/parmetis/package.py
+++ b/var/spack/repos/builtin/packages/parmetis/package.py
@@ -44,7 +44,7 @@ class Parmetis(Package):
depends_on('mpi')
patch('enable_external_metis.patch')
- depends_on('metis')
+ depends_on('metis@5:')
# bug fixes from PETSc developers
# https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 5c1fc6cc92..1161dd7d67 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -40,7 +40,7 @@ class Petsc(Package):
# Other dependencies
depends_on('boost', when='+boost')
- depends_on('metis', when='+metis')
+ depends_on('metis@5:', when='+metis')
depends_on('hdf5+mpi', when='+hdf5+mpi')
depends_on('parmetis', when='+metis+mpi')
diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py
new file mode 100644
index 0000000000..cf0a16f21e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-dask/package.py
@@ -0,0 +1,15 @@
+from spack import *
+
+class PyDask(Package):
+ """Minimal task scheduling abstraction"""
+ homepage = "https://github.com/dask/dask/"
+ url = "https://pypi.python.org/packages/source/d/dask/dask-0.8.1.tar.gz"
+
+ version('0.8.1', '5dd8e3a3823b3bc62c9a6d192e2cb5b4')
+
+ extends('python')
+
+ depends_on('py-setuptools')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-decorator/package.py b/var/spack/repos/builtin/packages/py-decorator/package.py
new file mode 100644
index 0000000000..abbd9f43d1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-decorator/package.py
@@ -0,0 +1,15 @@
+from spack import *
+
+class PyDecorator(Package):
+ """The aim of the decorator module it to simplify the usage of decorators for the average programmer, and to popularize decorators by showing various non-trivial examples."""
+ homepage = "https://github.com/micheles/decorator"
+ url = "https://pypi.python.org/packages/source/d/decorator/decorator-4.0.9.tar.gz"
+
+ version('4.0.9', 'f12c5651ccd707e12a0abaa4f76cd69a')
+
+ extends('python')
+
+ depends_on('py-setuptools')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-mpmath/package.py b/var/spack/repos/builtin/packages/py-mpmath/package.py
new file mode 100644
index 0000000000..4d3261ae8f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-mpmath/package.py
@@ -0,0 +1,13 @@
+from spack import *
+
+class PyMpmath(Package):
+ """A Python library for arbitrary-precision floating-point arithmetic."""
+ homepage = "http://mpmath.org"
+ url = "https://pypi.python.org/packages/source/m/mpmath/mpmath-all-0.19.tar.gz"
+
+ version('0.19', 'd1b7e19dd6830d0d7b5e1bc93d46c02c')
+
+ extends('python')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-networkx/package.py b/var/spack/repos/builtin/packages/py-networkx/package.py
new file mode 100644
index 0000000000..893146ec3e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-networkx/package.py
@@ -0,0 +1,15 @@
+from spack import *
+
+class PyNetworkx(Package):
+ """NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks."""
+ homepage = "http://networkx.github.io/"
+ url = "https://pypi.python.org/packages/source/n/networkx/networkx-1.11.tar.gz"
+
+ version('1.11', '6ef584a879e9163013e9a762e1cf7cd1')
+
+ extends('python')
+
+ depends_on('py-decorator')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py
index adc8507bd5..66d9bb4382 100644
--- a/var/spack/repos/builtin/packages/py-pillow/package.py
+++ b/var/spack/repos/builtin/packages/py-pillow/package.py
@@ -1,4 +1,5 @@
from spack import *
+import os
class PyPillow(Package):
"""Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities."""
@@ -7,8 +8,68 @@ class PyPillow(Package):
url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.tar.gz"
version('3.0.0', 'fc8ac44e93da09678eac7e30c9b7377d')
+ provides('PIL')
+
+ # These defaults correspond to Pillow defaults
+ variant('jpeg', default=True, description='Provide JPEG functionality')
+ variant('zlib', default=True, description='Access to compressed PNGs')
+ variant('tiff', default=False, description='Access to TIFF files')
+ variant('freetype', default=False, description='Font related services')
+ variant('tk', default=False, description='Support for tkinter bitmap and photo images')
+ variant('lcms', default=False, description='Color management')
+
+ # Spack does not (yet) support these modes of building
+ # variant('webp', default=False, description='')
+ # variant('webpmux', default=False, description='')
+ # variant('jpeg2000', default=False, description='')
+
extends('python')
+ depends_on('binutils')
depends_on('py-setuptools')
+ depends_on('jpeg', when='+jpeg') # BUG: It will use the system libjpeg anyway
+ depends_on('zlib', when='+zlib')
+ depends_on('tiff', when='+tiff')
+ depends_on('freetype', when='+freetype')
+ depends_on('lcms', when='+lcms')
+ depends_on('tcl', when='+tk')
+ depends_on('tk', when='+tk')
+
def install(self, spec, prefix):
- python('setup.py', 'install', '--prefix=%s' % prefix)
+ libpath=[]
+
+ if '+jpeg' in spec:
+ libpath.append(join_path(spec['jpeg'].prefix, 'lib'))
+ if '+zlib' in spec:
+ libpath.append(join_path(spec['zlib'].prefix, 'lib'))
+ if '+tiff' in spec:
+ libpath.append(join_path(spec['tiff'].prefix, 'lib'))
+ if '+freetype' in spec:
+ libpath.append(join_path(spec['freetype'].prefix, 'lib'))
+ if '+lcms' in spec:
+ libpath.append(join_path(spec['lcms'].prefix, 'lib'))
+
+ # This has not been tested, and likely needs some other treatment.
+ #if '+tk' in spec:
+ # libpath.append(join_path(spec['tcl'].prefix, 'lib'))
+ # libpath.append(join_path(spec['tk'].prefix, 'lib'))
+
+ # -------- Building
+ cmd = ['build_ext',
+ '--%s-jpeg' % ('enable' if '+jpeg' in spec else 'disable'),
+ '--%s-zlib' % ('enable' if '+zlib' in spec else 'disable'),
+ '--%s-tiff' % ('enable' if '+tiff' in spec else 'disable'),
+ '--%s-freetype' % ('enable' if '+freetype' in spec else 'disable'),
+ '--%s-lcms' % ('enable' if '+lcms' in spec else 'disable'),
+ '-L'+':'.join(libpath) # NOTE: This does not make it find libjpeg
+ ]
+
+ #if '+tk' in spec:
+ # cmd.extend(['--enable-tcl', '--enable-tk'])
+ #else:
+ # cmd.extend(['--disable-tcl', '--disable-tk'])
+
+ # --------- Installation
+ cmd.extend(['install', '--prefix=%s' % prefix])
+
+ python('setup.py', *cmd)
diff --git a/var/spack/repos/builtin/packages/py-scikit-image/package.py b/var/spack/repos/builtin/packages/py-scikit-image/package.py
new file mode 100644
index 0000000000..22ce1f8374
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py
@@ -0,0 +1,20 @@
+from spack import *
+
+class PyScikitImage(Package):
+ """Image processing algorithms for SciPy, including IO, morphology, filtering, warping, color manipulation, object detection, etc."""
+ homepage = "http://scikit-image.org/"
+ url = "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-0.12.3.tar.gz"
+
+ version('0.12.3', '04ea833383e0b6ad5f65da21292c25e1')
+
+ extends('python', ignore=r'bin/.*\.py$|bin/f2py$')
+
+ depends_on('py-dask')
+ depends_on('py-pillow')
+ depends_on('py-networkx')
+ depends_on('py-six')
+ depends_on('py-scipy')
+ depends_on('py-matplotlib')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-scikit-learn/package.py b/var/spack/repos/builtin/packages/py-scikit-learn/package.py
index 5b078ce901..2d7985b98c 100644
--- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py
@@ -7,8 +7,13 @@ class PyScikitLearn(Package):
version('0.15.2', 'd9822ad0238e17b382a3c756ea94fe0d')
version('0.16.1', '363ddda501e3b6b61726aa40b8dbdb7e')
+ version('0.17.1', 'a2f8b877e6d99b1ed737144f5a478dfc')
extends('python')
+ depends_on('py-setuptools')
+ depends_on('py-numpy')
+ depends_on('py-scipy')
+
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-sympy/package.py b/var/spack/repos/builtin/packages/py-sympy/package.py
index c17e35b95f..bbce8c74e3 100644
--- a/var/spack/repos/builtin/packages/py-sympy/package.py
+++ b/var/spack/repos/builtin/packages/py-sympy/package.py
@@ -6,8 +6,10 @@ class PySympy(Package):
url = "https://pypi.python.org/packages/source/s/sympy/sympy-0.7.6.tar.gz"
version('0.7.6', '3d04753974306d8a13830008e17babca')
+ version('1.0', '43e797de799f00f9e8fd2307dba9fab1')
extends('python')
+ depends_on('py-mpmath', when='@1.0:')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index ab09469042..8cb88e6c85 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -4,7 +4,6 @@ import os
class Qt(Package):
"""Qt is a comprehensive cross-platform C++ application framework."""
homepage = 'http://qt.io'
- url = 'http://download.qt.io/archive/qt/5.5/5.5.1/single/qt-everywhere-opensource-src-5.5.1.tar.gz'
version('5.5.1', '59f0216819152b77536cf660b015d784')
version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5')
diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py
index 1b870e0e7f..0c429ea756 100644
--- a/var/spack/repos/builtin/packages/readline/package.py
+++ b/var/spack/repos/builtin/packages/readline/package.py
@@ -2,12 +2,12 @@ from spack import *
class Readline(Package):
"""The GNU Readline library provides a set of functions for use by
- applications that allow users to edit command li nes as they
+ applications that allow users to edit command lines as they
are typed in. Both Emacs and vi editing modes are
available. The Readline library includes additional functions
to maintain a list of previously-entered command lines, to
recall and perhaps reedit those lines, and perform csh-like
- history expansion on previous commands. """
+ history expansion on previous commands."""
homepage = "http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html"
url = "ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz"
diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py
index c2196dcec4..a4b3979a15 100644
--- a/var/spack/repos/builtin/packages/suite-sparse/package.py
+++ b/var/spack/repos/builtin/packages/suite-sparse/package.py
@@ -10,10 +10,18 @@ class SuiteSparse(Package):
version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319')
+ # FIXME: (see below)
+ # variant('tbb', default=True, description='Build with Intel TBB')
+
depends_on('blas')
depends_on('lapack')
depends_on('metis@5.1.0', when='@4.5.1')
+ # FIXME:
+ # in @4.5.1. TBB support in SPQR seems to be broken as TBB-related linkng flags
+ # does not seem to be used, which leads to linking errors on Linux.
+ # Try re-enabling in future versions.
+ # depends_on('tbb', when='+tbb')
def install(self, spec, prefix):
# The build system of SuiteSparse is quite old-fashioned
@@ -21,16 +29,35 @@ class SuiteSparse(Package):
# with a lot of convoluted logic in it.
# Any kind of customization will need to go through filtering of that file
- # FIXME : this actually uses the current workaround
- # FIXME : (blas / lapack always provide libblas and liblapack as aliases)
- make('install', 'INSTALL=%s' % prefix,
+ make_args = ['INSTALL=%s' % prefix]
- # inject Spack compiler wrappers
+ # inject Spack compiler wrappers
+ make_args.extend([
'AUTOCC=no',
'CC=cc',
'CXX=c++',
'F77=f77',
+ ])
+
+ # use Spack's metis in CHOLMOD/Partition module,
+ # otherwise internal Metis will be compiled
+ make_args.extend([
+ 'MY_METIS_LIB=-L%s -lmetis' % spec['metis'].prefix.lib,
+ 'MY_METIS_INC=%s' % spec['metis'].prefix.include,
+ ])
+
+ # Intel TBB in SuiteSparseQR
+ if '+tbb' in spec:
+ make_args.extend([
+ 'SPQR_CONFIG=-DHAVE_TBB',
+ 'TBB=-L%s -ltbb' % spec['tbb'].prefix.lib,
+ ])
+
+ # BLAS arguments require path to libraries
+ # FIXME : (blas / lapack always provide libblas and liblapack as aliases)
+ make_args.extend([
+ 'BLAS=-lblas',
+ 'LAPACK=-llapack'
+ ])
- # BLAS arguments require path to libraries
- 'BLAS=-lblas',
- 'LAPACK=-llapack')
+ make('install', *make_args)
diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py
index ddcb7f9225..5cf5e129b4 100644
--- a/var/spack/repos/builtin/packages/superlu-dist/package.py
+++ b/var/spack/repos/builtin/packages/superlu-dist/package.py
@@ -15,7 +15,7 @@ class SuperluDist(Package):
depends_on ('blas')
depends_on ('lapack')
depends_on ('parmetis')
- depends_on ('metis')
+ depends_on ('metis@5:')
def install(self, spec, prefix):
makefile_inc = []
diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py
index 529adf7788..db8bee88d0 100644
--- a/var/spack/repos/builtin/packages/tcl/package.py
+++ b/var/spack/repos/builtin/packages/tcl/package.py
@@ -10,8 +10,13 @@ class Tcl(Package):
extensible."""
homepage = "http://www.tcl.tk"
- version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f',
- url="http://prdownloads.sourceforge.net/tcl/tcl8.6.3-src.tar.gz")
+ def url_for_version(self, version):
+ return 'http://prdownloads.sourceforge.net/tcl/tcl%s-src.tar.gz' % version
+
+ version('8.6.5', '0e6426a4ca9401825fbc6ecf3d89a326')
+ version('8.6.4', 'd7cbb91f1ded1919370a30edd1534304')
+ version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f')
+ version('8.5.19', '0e6426a4ca9401825fbc6ecf3d89a326')
depends_on('zlib')
diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py
index 96736f6f95..839d217f34 100644
--- a/var/spack/repos/builtin/packages/tk/package.py
+++ b/var/spack/repos/builtin/packages/tk/package.py
@@ -8,9 +8,11 @@ class Tk(Package):
applications that run unchanged across Windows, Mac OS X, Linux
and more."""
homepage = "http://www.tcl.tk"
- url = "http://prdownloads.sourceforge.net/tcl/tk8.6.3-src.tar.gz"
- version('src', '85ca4dbf4dcc19777fd456f6ee5d0221')
+ def url_for_version(self, version):
+ return "http://prdownloads.sourceforge.net/tcl/tk%s-src.tar.gz" % version
+
+ version('8.6.3', '85ca4dbf4dcc19777fd456f6ee5d0221')
depends_on("tcl")
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 6223848c68..0f72055fa7 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -42,7 +42,7 @@ class Trilinos(Package):
depends_on('matio')
depends_on('glm')
depends_on('swig')
- depends_on('metis',when='+metis')
+ depends_on('metis@5:',when='+metis')
depends_on('suite-sparse',when='+suite-sparse')
# MPI related dependencies