summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/spack/modules.yaml2
-rw-r--r--lib/spack/docs/basic_usage.rst272
-rw-r--r--lib/spack/docs/configuration.rst23
-rw-r--r--lib/spack/docs/packaging_guide.rst140
-rw-r--r--lib/spack/spack/__init__.py3
-rw-r--r--lib/spack/spack/build_environment.py14
-rw-r--r--lib/spack/spack/cmd/create.py2
-rw-r--r--lib/spack/spack/cmd/diy.py2
-rw-r--r--lib/spack/spack/cmd/fetch.py2
-rw-r--r--lib/spack/spack/cmd/info.py14
-rw-r--r--lib/spack/spack/cmd/install.py5
-rw-r--r--lib/spack/spack/cmd/mirror.py2
-rw-r--r--lib/spack/spack/cmd/module.py4
-rw-r--r--lib/spack/spack/cmd/package-list.py14
-rw-r--r--lib/spack/spack/cmd/setup.py2
-rw-r--r--lib/spack/spack/cmd/test-install.py7
-rw-r--r--lib/spack/spack/concretize.py16
-rw-r--r--lib/spack/spack/database.py22
-rw-r--r--lib/spack/spack/directives.py39
-rw-r--r--lib/spack/spack/directory_layout.py4
-rw-r--r--lib/spack/spack/fetch_strategy.py9
-rw-r--r--lib/spack/spack/graph.py10
-rw-r--r--lib/spack/spack/modules.py2
-rw-r--r--lib/spack/spack/package.py38
-rw-r--r--lib/spack/spack/platforms/linux.py15
-rw-r--r--lib/spack/spack/spec.py352
-rw-r--r--lib/spack/spack/test/cmd/test_install.py33
-rw-r--r--lib/spack/spack/test/concretize.py24
-rw-r--r--lib/spack/spack/test/mock_packages_test.py26
-rw-r--r--lib/spack/spack/test/mock_repo.py4
-rw-r--r--lib/spack/spack/test/spec_dag.py88
-rw-r--r--lib/spack/spack/test/stage.py4
-rw-r--r--lib/spack/spack/test/versions.py39
-rw-r--r--lib/spack/spack/version.py27
-rwxr-xr-xshare/spack/qa/run-flake83
-rw-r--r--var/spack/repos/builtin.mock/packages/cmake-client/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/dtbuild1/package.py18
-rw-r--r--var/spack/repos/builtin.mock/packages/dtbuild2/package.py13
-rw-r--r--var/spack/repos/builtin.mock/packages/dtbuild3/package.py13
-rw-r--r--var/spack/repos/builtin.mock/packages/dtlink1/package.py15
-rw-r--r--var/spack/repos/builtin.mock/packages/dtlink2/package.py13
-rw-r--r--var/spack/repos/builtin.mock/packages/dtlink3/package.py16
-rw-r--r--var/spack/repos/builtin.mock/packages/dtlink4/package.py13
-rw-r--r--var/spack/repos/builtin.mock/packages/dtlink5/package.py13
-rw-r--r--var/spack/repos/builtin.mock/packages/dtrun1/package.py16
-rw-r--r--var/spack/repos/builtin.mock/packages/dtrun2/package.py13
-rw-r--r--var/spack/repos/builtin.mock/packages/dtrun3/package.py15
-rw-r--r--var/spack/repos/builtin.mock/packages/dttop/package.py17
-rw-r--r--var/spack/repos/builtin.mock/packages/dtuse/package.py15
-rw-r--r--var/spack/repos/builtin/packages/ImageMagick/package.py2
-rw-r--r--var/spack/repos/builtin/packages/Mitos/package.py1
-rw-r--r--var/spack/repos/builtin/packages/R/package.py26
-rw-r--r--var/spack/repos/builtin/packages/adept-utils/package.py1
-rw-r--r--var/spack/repos/builtin/packages/apex/package.py2
-rw-r--r--var/spack/repos/builtin/packages/arpack-ng/make_install.patch24
-rw-r--r--var/spack/repos/builtin/packages/arpack-ng/package.py68
-rw-r--r--var/spack/repos/builtin/packages/arpack-ng/parpack_cmake.patch18
-rw-r--r--var/spack/repos/builtin/packages/autoconf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/automaded/package.py1
-rw-r--r--var/spack/repos/builtin/packages/bear/package.py2
-rw-r--r--var/spack/repos/builtin/packages/bertini/package.py4
-rw-r--r--var/spack/repos/builtin/packages/binutils/package.py6
-rw-r--r--var/spack/repos/builtin/packages/bison/package.py2
-rw-r--r--var/spack/repos/builtin/packages/boxlib/package.py1
-rw-r--r--var/spack/repos/builtin/packages/bzip2/package.py49
-rw-r--r--var/spack/repos/builtin/packages/c-blosc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/caliper/package.py1
-rw-r--r--var/spack/repos/builtin/packages/callpath/package.py1
-rw-r--r--var/spack/repos/builtin/packages/cantera/package.py10
-rw-r--r--var/spack/repos/builtin/packages/cbtf-argonavis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cbtf-krell/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cbtf-lanl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cbtf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cereal/package.py3
-rw-r--r--var/spack/repos/builtin/packages/cgal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cleverleaf/package.py1
-rw-r--r--var/spack/repos/builtin/packages/cmake/package.py4
-rw-r--r--var/spack/repos/builtin/packages/cmocka/package.py2
-rw-r--r--var/spack/repos/builtin/packages/cram/package.py1
-rw-r--r--var/spack/repos/builtin/packages/czmq/package.py8
-rw-r--r--var/spack/repos/builtin/packages/dakota/package.py1
-rw-r--r--var/spack/repos/builtin/packages/damselfly/package.py2
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py202
-rw-r--r--var/spack/repos/builtin/packages/dia/package.py2
-rw-r--r--var/spack/repos/builtin/packages/docbook-xml/package.py14
-rw-r--r--var/spack/repos/builtin/packages/doxygen/package.py10
-rw-r--r--var/spack/repos/builtin/packages/dyninst/package.py1
-rw-r--r--var/spack/repos/builtin/packages/eigen/package.py2
-rw-r--r--var/spack/repos/builtin/packages/environment-modules/package.py2
-rw-r--r--var/spack/repos/builtin/packages/exodusii/package.py4
-rw-r--r--var/spack/repos/builtin/packages/expat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/flex/package.py2
-rw-r--r--var/spack/repos/builtin/packages/flux/package.py4
-rw-r--r--var/spack/repos/builtin/packages/foam-extend/package.py1
-rw-r--r--var/spack/repos/builtin/packages/gdal/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gdb/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gflags/package.py2
-rw-r--r--var/spack/repos/builtin/packages/git/package.py2
-rw-r--r--var/spack/repos/builtin/packages/glib/package.py4
-rw-r--r--var/spack/repos/builtin/packages/glm/package.py4
-rw-r--r--var/spack/repos/builtin/packages/global/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gmp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gmsh/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gnu-prolog/package.py41
-rw-r--r--var/spack/repos/builtin/packages/go/package.py2
-rw-r--r--var/spack/repos/builtin/packages/googletest/package.py2
-rw-r--r--var/spack/repos/builtin/packages/graphlib/package.py2
-rw-r--r--var/spack/repos/builtin/packages/graphviz/package.py2
-rw-r--r--var/spack/repos/builtin/packages/gromacs/package.py1
-rw-r--r--var/spack/repos/builtin/packages/hdf5-blosc/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hmmer/package.py76
-rw-r--r--var/spack/repos/builtin/packages/hoomd-blue/package.py6
-rw-r--r--var/spack/repos/builtin/packages/ibmisc/package.py8
-rw-r--r--var/spack/repos/builtin/packages/ipopt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/julia/package.py20
-rw-r--r--var/spack/repos/builtin/packages/launchmon/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libgd/package.py1
-rw-r--r--var/spack/repos/builtin/packages/libjpeg-turbo/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libjson-c/package.py3
-rw-r--r--var/spack/repos/builtin/packages/libtool/package.py2
-rw-r--r--var/spack/repos/builtin/packages/libuv/package.py6
-rw-r--r--var/spack/repos/builtin/packages/libxcb/package.py4
-rw-r--r--var/spack/repos/builtin/packages/libxml2/package.py6
-rw-r--r--var/spack/repos/builtin/packages/llvm-lld/package.py2
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lmod/package.py4
-rw-r--r--var/spack/repos/builtin/packages/lua/package.py6
-rw-r--r--var/spack/repos/builtin/packages/mbedtls/package.py2
-rw-r--r--var/spack/repos/builtin/packages/memaxes/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mesa/package.py4
-rw-r--r--var/spack/repos/builtin/packages/metis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mfem/package.py2
-rw-r--r--var/spack/repos/builtin/packages/mpibash/package.py2
-rw-r--r--var/spack/repos/builtin/packages/msgpack-c/package.py2
-rw-r--r--var/spack/repos/builtin/packages/muster/package.py1
-rw-r--r--var/spack/repos/builtin/packages/netcdf-cxx4/package.py2
-rw-r--r--var/spack/repos/builtin/packages/netcdf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/netlib-lapack/package.py2
-rw-r--r--var/spack/repos/builtin/packages/netlib-scalapack/package.py2
-rw-r--r--var/spack/repos/builtin/packages/numdiff/package.py2
-rw-r--r--var/spack/repos/builtin/packages/oce/package.py35
-rw-r--r--var/spack/repos/builtin/packages/octave/package.py6
-rw-r--r--var/spack/repos/builtin/packages/ompt-openmp/package.py2
-rw-r--r--var/spack/repos/builtin/packages/opencv/package.py3
-rw-r--r--var/spack/repos/builtin/packages/openjpeg/package.py2
-rw-r--r--var/spack/repos/builtin/packages/openspeedshop/package.py2
-rw-r--r--var/spack/repos/builtin/packages/p4est/package.py6
-rw-r--r--var/spack/repos/builtin/packages/paradiseo/package.py6
-rw-r--r--var/spack/repos/builtin/packages/parallel-netcdf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/paraview/package.py5
-rw-r--r--var/spack/repos/builtin/packages/parmetis/package.py2
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py30
-rw-r--r--var/spack/repos/builtin/packages/pidx/package.py1
-rw-r--r--var/spack/repos/builtin/packages/psi4/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-astroid/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-astropy/package.py18
-rw-r--r--var/spack/repos/builtin/packages/py-autopep8/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-basemap/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-biopython/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-blessings/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-bottleneck/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-cffi/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-coverage/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-csvkit/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-dask/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-dateutil/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-decorator/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-emcee/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-flake8/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-funcsigs/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-genshi/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-gnuplot/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-h5py/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-iminuit/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-ipython/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-jinja2/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-lockfile/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-logilab-common/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-mako/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-markupsafe/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-matplotlib/package.py25
-rw-r--r--var/spack/repos/builtin/packages/py-mistune/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mock/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-mpi4py/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-mysqldb1/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-nestle/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-netcdf/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-networkx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-nose/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-numexpr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-numpy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-openpyxl/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-pandas/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-pbr/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pep8/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-periodictable/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-phonopy/package.py8
-rw-r--r--var/spack/repos/builtin/packages/py-pillow/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-prettytable/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-protobuf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-py2neo/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pycparser/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pydatalog/package.py38
-rw-r--r--var/spack/repos/builtin/packages/py-pygments/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pylint/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-pyqt/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-pyside/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-pytables/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-python-daemon/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-restview/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-rpy2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-image/package.py12
-rw-r--r--var/spack/repos/builtin/packages/py-scikit-learn/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-scipy/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-shiboken/package.py5
-rw-r--r--var/spack/repos/builtin/packages/py-six/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-sncosmo/package.py14
-rw-r--r--var/spack/repos/builtin/packages/py-storm/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-tappy/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-tuiview/package.py4
-rw-r--r--var/spack/repos/builtin/packages/py-twisted/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-unittest2/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-unittest2py3k/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-urwid/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-virtualenv/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-wcsaxes/package.py6
-rw-r--r--var/spack/repos/builtin/packages/py-wheel/package.py2
-rw-r--r--var/spack/repos/builtin/packages/py-yapf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/python/package.py28
-rw-r--r--var/spack/repos/builtin/packages/qhull/package.py2
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py4
-rw-r--r--var/spack/repos/builtin/packages/r-assertthat/package.py43
-rw-r--r--var/spack/repos/builtin/packages/r-dplyr/package.py50
-rw-r--r--var/spack/repos/builtin/packages/r-ggvis/package.py51
-rw-r--r--var/spack/repos/builtin/packages/r-htmltools/package.py44
-rw-r--r--var/spack/repos/builtin/packages/r-httpuv/package.py49
-rw-r--r--var/spack/repos/builtin/packages/r-lazyeval/package.py43
-rw-r--r--var/spack/repos/builtin/packages/r-lubridate/package.py47
-rw-r--r--var/spack/repos/builtin/packages/r-shiny/package.py52
-rw-r--r--var/spack/repos/builtin/packages/r-tibble/package.py46
-rw-r--r--var/spack/repos/builtin/packages/r-tidyr/package.py49
-rw-r--r--var/spack/repos/builtin/packages/r-xtable/package.py41
-rw-r--r--var/spack/repos/builtin/packages/ravel/package.py3
-rw-r--r--var/spack/repos/builtin/packages/rose/package.py6
-rw-r--r--var/spack/repos/builtin/packages/scotch/package.py4
-rw-r--r--var/spack/repos/builtin/packages/serf/package.py2
-rw-r--r--var/spack/repos/builtin/packages/slepc/install_name_371.patch32
-rw-r--r--var/spack/repos/builtin/packages/slepc/package.py15
-rw-r--r--var/spack/repos/builtin/packages/spot/package.py2
-rw-r--r--var/spack/repos/builtin/packages/stat/package.py2
-rw-r--r--var/spack/repos/builtin/packages/suite-sparse/package.py41
-rw-r--r--var/spack/repos/builtin/packages/sundials/package.py1
-rw-r--r--var/spack/repos/builtin/packages/swiftsim/package.py8
-rw-r--r--var/spack/repos/builtin/packages/task/package.py1
-rw-r--r--var/spack/repos/builtin/packages/taskd/package.py1
-rw-r--r--var/spack/repos/builtin/packages/tetgen/package.py4
-rw-r--r--var/spack/repos/builtin/packages/the_platinum_searcher/package.py2
-rw-r--r--var/spack/repos/builtin/packages/the_silver_searcher/package.py2
-rw-r--r--var/spack/repos/builtin/packages/thrift/package.py10
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py2
-rw-r--r--var/spack/repos/builtin/packages/vim/package.py2
-rw-r--r--var/spack/repos/builtin/packages/vtk/package.py1
262 files changed, 2508 insertions, 860 deletions
diff --git a/etc/spack/modules.yaml b/etc/spack/modules.yaml
index 5f31cdd5c0..9ae54a2d09 100644
--- a/etc/spack/modules.yaml
+++ b/etc/spack/modules.yaml
@@ -13,6 +13,8 @@ modules:
- PATH
man:
- MANPATH
+ share/man:
+ - MANPATH
lib:
- LIBRARY_PATH
- LD_LIBRARY_PATH
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst
index d8d5a6a23a..90ba1164e6 100644
--- a/lib/spack/docs/basic_usage.rst
+++ b/lib/spack/docs/basic_usage.rst
@@ -114,13 +114,13 @@ that the packages is installed:
$ spack install mpileaks
==> Installing mpileaks
- ==> mpich is already installed in /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/mpich@3.0.4.
- ==> callpath is already installed in /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/callpath@1.0.2-5dce4318.
- ==> adept-utils is already installed in /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/adept-utils@1.0-5adef8da.
+ ==> mpich is already installed in /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/mpich@3.0.4.
+ ==> callpath is already installed in /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/callpath@1.0.2-5dce4318.
+ ==> adept-utils is already installed in /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/adept-utils@1.0-5adef8da.
==> Trying to fetch from https://github.com/hpc/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz
######################################################################## 100.0%
- ==> Staging archive: /home/gamblin2/spack/var/spack/stage/mpileaks@1.0%gcc@4.4.7 arch=chaos_5_x86_64_ib-59f6ad23/mpileaks-1.0.tar.gz
- ==> Created stage in /home/gamblin2/spack/var/spack/stage/mpileaks@1.0%gcc@4.4.7 arch=chaos_5_x86_64_ib-59f6ad23.
+ ==> Staging archive: /home/gamblin2/spack/var/spack/stage/mpileaks@1.0%gcc@4.4.7 arch=linux-debian7-x86_64-59f6ad23/mpileaks-1.0.tar.gz
+ ==> Created stage in /home/gamblin2/spack/var/spack/stage/mpileaks@1.0%gcc@4.4.7 arch=linux-debian7-x86_64-59f6ad23.
==> No patches needed for mpileaks.
==> Building mpileaks.
@@ -128,7 +128,7 @@ that the packages is installed:
==> Successfully installed mpileaks.
Fetch: 2.16s. Build: 9.82s. Total: 11.98s.
- [+] /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/mpileaks@1.0-59f6ad23
+ [+] /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/mpileaks@1.0-59f6ad23
The last line, with the ``[+]``, indicates where the package is
installed.
@@ -183,7 +183,7 @@ To uninstall a package and every package that depends on it, you may give the
spack uninstall --dependents mpich
-will display a list of all the packages that depends on `mpich` and, upon confirmation,
+will display a list of all the packages that depend on `mpich` and, upon confirmation,
will uninstall them in the right order.
A line like
@@ -230,7 +230,7 @@ Running ``spack find`` with no arguments lists installed packages:
$ spack find
==> 74 installed packages.
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
ImageMagick@6.8.9-10 libdwarf@20130729 py-dateutil@2.4.0
adept-utils@1.0 libdwarf@20130729 py-ipython@2.3.1
atk@2.14.0 libelf@0.8.12 py-matplotlib@1.4.2
@@ -256,7 +256,7 @@ Running ``spack find`` with no arguments lists installed packages:
lcms@2.6 pixman@0.32.6 xz@5.2.0
libdrm@2.4.33 py-dateutil@2.4.0 zlib@1.2.8
- -- chaos_5_x86_64_ib / gcc@4.9.2 --------------------------------
+ -- linux-debian7-x86_64 / gcc@4.9.2 --------------------------------
libelf@0.8.10 mpich@3.0.4
Packages are divided into groups according to their architecture and
@@ -279,7 +279,7 @@ in more detail using ``spack find -d``, and by asking only to show
$ spack find --deps libdwarf
==> 2 installed packages.
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
libdwarf@20130729-d9b90962
^libelf@0.8.12
libdwarf@20130729-b52fac98
@@ -295,7 +295,7 @@ want to know whether two packages' dependencies differ, you can use
$ spack find -l libdwarf
==> 2 installed packages.
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
libdwarf@20130729-d9b90962 libdwarf@20130729-b52fac98
Now the ``libwarf`` installs have hashes after their names. These are
@@ -309,14 +309,14 @@ use ``spack find -p``:
$ spack find -p
==> 74 installed packages.
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
- ImageMagick@6.8.9-10 /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/ImageMagick@6.8.9-10-4df950dd
- adept-utils@1.0 /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/adept-utils@1.0-5adef8da
- atk@2.14.0 /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/atk@2.14.0-3d09ac09
- boost@1.55.0 /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/boost@1.55.0
- bzip2@1.0.6 /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/bzip2@1.0.6
- cairo@1.14.0 /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/cairo@1.14.0-fcc2ab44
- callpath@1.0.2 /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/callpath@1.0.2-5dce4318
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
+ ImageMagick@6.8.9-10 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/ImageMagick@6.8.9-10-4df950dd
+ adept-utils@1.0 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/adept-utils@1.0-5adef8da
+ atk@2.14.0 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/atk@2.14.0-3d09ac09
+ boost@1.55.0 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/boost@1.55.0
+ bzip2@1.0.6 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/bzip2@1.0.6
+ cairo@1.14.0 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/cairo@1.14.0-fcc2ab44
+ callpath@1.0.2 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/callpath@1.0.2-5dce4318
...
And, finally, you can restrict your search to a particular package
@@ -325,10 +325,10 @@ by supplying its name:
.. code-block:: sh
$ spack find -p libelf
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
- libelf@0.8.11 /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/libelf@0.8.11
- libelf@0.8.12 /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/libelf@0.8.12
- libelf@0.8.13 /home/gamblin2/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/libelf@0.8.13
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
+ libelf@0.8.11 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/libelf@0.8.11
+ libelf@0.8.12 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/libelf@0.8.12
+ libelf@0.8.13 /home/gamblin2/spack/opt/linux-debian7-x86_64/gcc@4.4.7/libelf@0.8.13
``spack find`` actually does a lot more than this. You can use
*specs* to query for specific configurations and builds of each
@@ -338,7 +338,7 @@ package. If you want to find only libelf versions greater than version
.. code-block:: sh
$ spack find libelf@0.8.12:
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
libelf@0.8.12 libelf@0.8.13
Finding just the versions of libdwarf built with a particular version
@@ -348,7 +348,7 @@ of libelf would look like this:
$ spack find -l libdwarf ^libelf@0.8.12
==> 1 installed packages.
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
libdwarf@20130729-d9b90962
We can also search for packages that have a certain attribute. For example,
@@ -359,6 +359,7 @@ will find every installed package with a 'debug' compile-time option enabled.
The full spec syntax is discussed in detail in :ref:`sec-specs`.
+.. _compiler-config:
Compiler configuration
-----------------------------------
@@ -445,7 +446,7 @@ If you want to see specifics on a particular compiler, you can run
fc = /usr/local/bin/ifort-15.0.090
This shows which C, C++, and Fortran compilers were detected by Spack.
-Notice also that we didn't have to be too specific about the
+Notice also that we didn\'t have to be too specific about the
version. We just said ``intel@15``, and information about the only
matching Intel compiler was displayed.
@@ -460,19 +461,17 @@ editing your ``~/.spack/compilers.yaml`` file. You can do this by running
Each compiler configuration in the file looks like this::
...
- chaos_5_x86_64_ib:
- ...
- intel@15.0.0:
+ compilers:
+ - compiler:
+ modules = []
+ operating_system: OS
+ paths:
cc: /usr/local/bin/icc-15.0.024-beta
cxx: /usr/local/bin/icpc-15.0.024-beta
f77: /usr/local/bin/ifort-15.0.024-beta
fc: /usr/local/bin/ifort-15.0.024-beta
- ...
-The chaos_5_x86_64_ib string is an architecture string, and multiple
-compilers can be listed underneath an architecture. The architecture
-string may be replaced with the string 'all' to signify compilers that
-work on all architectures.
+ spec: intel@15.0.0:
For compilers, like ``clang``, that do not support Fortran, put
``None`` for ``f77`` and ``fc``::
@@ -488,10 +487,11 @@ list displayed by ``spack compilers``.
You can also add compiler flags to manually configured compilers. The
valid flags are ``cflags``, ``cxxflags``, ``fflags``, ``cppflags``,
-``ldflags``, and ``ldlibs``. For example,::
+``ldflags``, and ``ldlibs``. For example::
...
- chaos_5_x86_64_ib:
+ compilers:
+ - compiler:
...
intel@15.0.0:
cc: /usr/local/bin/icc-15.0.024-beta
@@ -518,10 +518,10 @@ Spack, that descriptor is called a *spec*. Spack uses specs to refer
to a particular build configuration (or configurations) of a package.
Specs are more than a package name and a version; you can use them to
specify the compiler, compiler version, architecture, compile options,
-and dependency options for a build. In this section, we'll go over
+and dependency options for a build. In this section, we\'ll go over
the full syntax of specs.
-Here is an example of a much longer spec than we've seen thus far::
+Here is an example of a much longer spec than we\'ve seen thus far::
mpileaks @1.2:1.4 %gcc@4.7.5 +debug -qt arch=bgq_os ^callpath @1.1 %gcc@4.7.2
@@ -546,8 +546,8 @@ More formally, a spec consists of the following pieces:
boolean variants
* ``name=<value>`` Optional compiler flag specifiers. Valid flag names are
``cflags``, ``cxxflags``, ``fflags``, ``cppflags``, ``ldflags``, and ``ldlibs``.
-* ``arch=<value>`` Optional architecture specifier (``arch=bgq_os``)
-* ``^`` Dependency specs (``^callpath@1.1``)
+* ``target=<value> os=<value>`` Optional architecture specifier
+(``target=haswell os=CNL10``) * ``^`` Dependency specs (``^callpath@1.1``)
There are two things to notice here. The first is that specs are
recursively defined. That is, each dependency after ``^`` is a spec
@@ -626,7 +626,7 @@ compilers, variants, and architectures just like any other spec.
Specifiers are associated with the nearest package name to their left.
For example, above, ``@1.1`` and ``%gcc@4.7.2`` associates with the
``callpath`` package, while ``@1.2:1.4``, ``%gcc@4.7.5``, ``+debug``,
-``-qt``, and ``arch=bgq_os`` all associate with the ``mpileaks`` package.
+``-qt``, and ``target=haswell os=CNL10`` all associate with the ``mpileaks`` package.
In the diagram above, ``mpileaks`` depends on ``mpich`` with an
unspecified version, but packages can depend on other packages with
@@ -758,14 +758,18 @@ in gnu autotools. If all flags are set, the order is
Architecture specifiers
~~~~~~~~~~~~~~~~~~~~~~~
-.. Note::
+The architecture can be specified by using the reserved
+words ``target`` and/or ``os`` (``target=x86-64 os=debian7``). You can also
+use the triplet form of platform, operating system and processor.
- Architecture specifiers are part of specs but are not yet
- functional. They will be in Spack version 1.0, due in Q3 2015.
+.. code-block:: sh
+
+ spack install libelf arch=cray_xc-CNL10-haswell
-The architecture specifier looks identical to a variant specifier for a
-non-boolean variant. The architecture can be specified only using the
-reserved name ``arch`` (``arch=bgq_os``).
+Users on non-Cray systems won't have to worry about specifying the architecture.
+Spack will autodetect what kind of operating system is on your machine as well
+as the processor. For more information on how the architecture can be
+used on Cray machines, check here :ref:`spack-cray`
.. _sec-virtual-dependencies:
@@ -985,7 +989,7 @@ of installed packages.
$ module avail
- ------- /home/gamblin2/spack/share/spack/modules/chaos_5_x86_64_ib --------
+ ------- /home/gamblin2/spack/share/spack/modules/linux-debian7-x86_64 --------
adept-utils@1.0%gcc@4.4.7-5adef8da libelf@0.8.13%gcc@4.4.7
automaded@1.0%gcc@4.4.7-d9691bb0 libelf@0.8.13%intel@15.0.0
boost@1.55.0%gcc@4.4.7 mpc@1.0.2%gcc@4.4.7-559607f5
@@ -1056,7 +1060,7 @@ Spack. For example, this will add the ``mpich`` package built with
$ spack use mpich %gcc@4.4.7
Prepending: mpich@3.0.4%gcc@4.4.7 (ok)
$ which mpicc
- ~/src/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/mpich@3.0.4/bin/mpicc
+ ~/src/spack/opt/linux-debian7-x86_64/gcc@4.4.7/mpich@3.0.4/bin/mpicc
Or, similarly with modules, you could type:
@@ -1089,8 +1093,8 @@ than one installed package matches it), then Spack will warn you:
$ spack load libelf
==> Error: Multiple matches for spec libelf. Choose one:
- libelf@0.8.13%gcc@4.4.7 arch=chaos_5_x86_64_ib
- libelf@0.8.13%intel@15.0.0 arch=chaos_5_x86_64_ib
+ libelf@0.8.13%gcc@4.4.7 arch=linux-debian7-x86_64
+ libelf@0.8.13%intel@15.0.0 arch=linux-debian7-x86_64
You can either type the ``spack load`` command again with a fully
qualified argument, or you can add just enough extra constraints to
@@ -1150,7 +1154,7 @@ Modules may be loaded recursively with the command:
More than one spec may be placed on the command line here.
-Module Comamnds for Shell Scripts
+Module Commands for Shell Scripts
``````````````````````````````````
Although Spack is flexbile, the ``module`` command is much faster.
@@ -1543,7 +1547,7 @@ an *extension*. Suppose you have Python installed like so:
$ spack find python
==> 1 installed packages.
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
python@2.7.8
.. _spack-extensions:
@@ -1556,7 +1560,7 @@ You can find extensions for your Python installation like this:
.. code-block:: sh
$ spack extensions python
- ==> python@2.7.8%gcc@4.4.7 arch=chaos_5_x86_64_ib-703c7a96
+ ==> python@2.7.8%gcc@4.4.7 arch=linux-debian7-x86_64-703c7a96
==> 36 extensions:
geos py-ipython py-pexpect py-pyside py-sip
py-basemap py-libxml2 py-pil py-pytz py-six
@@ -1568,7 +1572,7 @@ You can find extensions for your Python installation like this:
py-h5py py-numpy py-pyqt py-shiboken
==> 12 installed:
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
py-dateutil@2.4.0 py-nose@1.3.4 py-pyside@1.2.2
py-dateutil@2.4.0 py-numpy@1.9.1 py-pytz@2014.10
py-ipython@2.3.1 py-pygments@2.0.1 py-setuptools@11.3.1
@@ -1584,8 +1588,8 @@ prefixes, and you can see this with ``spack find -p``:
$ spack find -p py-numpy
==> 1 installed packages.
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
- py-numpy@1.9.1 /g/g21/gamblin2/src/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/py-numpy@1.9.1-66733244
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
+ py-numpy@1.9.1 /g/g21/gamblin2/src/spack/opt/linux-debian7-x86_64/gcc@4.4.7/py-numpy@1.9.1-66733244
However, even though this package is installed, you cannot use it
directly when you run ``python``:
@@ -1646,9 +1650,9 @@ installation:
.. code-block:: sh
$ spack activate py-numpy
- ==> Activated extension py-setuptools@11.3.1%gcc@4.4.7 arch=chaos_5_x86_64_ib-3c74eb69 for python@2.7.8%gcc@4.4.7.
- ==> Activated extension py-nose@1.3.4%gcc@4.4.7 arch=chaos_5_x86_64_ib-5f70f816 for python@2.7.8%gcc@4.4.7.
- ==> Activated extension py-numpy@1.9.1%gcc@4.4.7 arch=chaos_5_x86_64_ib-66733244 for python@2.7.8%gcc@4.4.7.
+ ==> Activated extension py-setuptools@11.3.1%gcc@4.4.7 arch=linux-debian7-x86_64-3c74eb69 for python@2.7.8%gcc@4.4.7.
+ ==> Activated extension py-nose@1.3.4%gcc@4.4.7 arch=linux-debian7-x86_64-5f70f816 for python@2.7.8%gcc@4.4.7.
+ ==> Activated extension py-numpy@1.9.1%gcc@4.4.7 arch=linux-debian7-x86_64-66733244 for python@2.7.8%gcc@4.4.7.
Several things have happened here. The user requested that
``py-numpy`` be activated in the ``python`` installation it was built
@@ -1663,7 +1667,7 @@ packages listed as activated:
.. code-block:: sh
$ spack extensions python
- ==> python@2.7.8%gcc@4.4.7 arch=chaos_5_x86_64_ib-703c7a96
+ ==> python@2.7.8%gcc@4.4.7 arch=linux-debian7-x86_64-703c7a96
==> 36 extensions:
geos py-ipython py-pexpect py-pyside py-sip
py-basemap py-libxml2 py-pil py-pytz py-six
@@ -1675,14 +1679,14 @@ packages listed as activated:
py-h5py py-numpy py-pyqt py-shiboken
==> 12 installed:
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
py-dateutil@2.4.0 py-nose@1.3.4 py-pyside@1.2.2
py-dateutil@2.4.0 py-numpy@1.9.1 py-pytz@2014.10
py-ipython@2.3.1 py-pygments@2.0.1 py-setuptools@11.3.1
py-matplotlib@1.4.2 py-pyparsing@2.0.3 py-six@1.9.0
==> 3 currently activated:
- -- chaos_5_x86_64_ib / gcc@4.4.7 --------------------------------
+ -- linux-debian7-x86_64 / gcc@4.4.7 --------------------------------
py-nose@1.3.4 py-numpy@1.9.1 py-setuptools@11.3.1
@@ -1711,7 +1715,7 @@ dependencies, you can use ``spack activate -f``:
.. code-block:: sh
$ spack activate -f py-numpy
- ==> Activated extension py-numpy@1.9.1%gcc@4.4.7 arch=chaos_5_x86_64_ib-66733244 for python@2.7.8%gcc@4.4.7.
+ ==> Activated extension py-numpy@1.9.1%gcc@4.4.7 arch=linux-debian7-x86_64-66733244 for python@2.7.8%gcc@4.4.7.
.. _spack-deactivate:
@@ -1743,7 +1747,7 @@ Spack currently needs to be run from a filesystem that supports
``flock`` locking semantics. Nearly all local filesystems and recent
versions of NFS support this, but parallel filesystems may be mounted
without ``flock`` support enabled. You can determine how your
-filesystems are mounted with ``mount -p``. The output for a Lustre
+ filesystems are mounted with ``mount -p``. The output for a Lustre
filesystem might look like this:
.. code-block:: sh
@@ -1764,7 +1768,7 @@ This issue typically manifests with the error below:
Traceback (most recent call last):
File "./spack", line 176, in <module>
main()
- File "./spack", line 154, in main
+ File "./spack", line 154,' in main
return_val = command(parser, args)
File "./spack/lib/spack/spack/cmd/find.py", line 170, in find
specs = set(spack.installed_db.query(**q_args))
@@ -1782,6 +1786,142 @@ This issue typically manifests with the error below:
A nicer error message is TBD in future versions of Spack.
+
+.. _spack-cray:
+
+Spack on Cray
+-----------------------------
+
+Spack differs slightly when used on a Cray system. The architecture spec
+can differentiate between the front-end and back-end processor and operating system.
+For example, on Edison at NERSC, the back-end target processor
+is \"Ivy Bridge\", so you can specify to use the back-end this way:
+
+.. code-block:: sh
+
+ spack install zlib target=ivybridge
+
+You can also use the operating system to build against the back-end:
+
+.. code-block:: sh
+
+ spack install zlib os=CNL10
+
+Notice that the name includes both the operating system name and the major
+version number concatenated together.
+
+Alternatively, if you want to build something for the front-end,
+you can specify the front-end target processor. The processor for a login node
+on Edison is \"Sandy bridge\" so we specify on the command line like so:
+
+.. code-block:: sh
+
+ spack install zlib target=sandybridge
+
+And the front-end operating system is:
+
+.. code-block:: sh
+
+ spack install zlib os=SuSE11
+
+
+
+Cray compiler detection
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Spack can detect compilers using two methods. For the front-end, we treat
+everything the same. The difference lies in back-end compiler detection.
+Back-end compiler detection is made via the Tcl module avail command.
+Once it detects the compiler it writes the appropriate PrgEnv and compiler
+module name to compilers.yaml and sets the paths to each compiler with Cray\'s
+compiler wrapper names (i.e. cc, CC, ftn). During build time, Spack will load
+the correct PrgEnv and compiler module and will call appropriate wrapper.
+
+The compilers.yaml config file will also differ. There is a
+modules section that is filled with the compiler\'s Programming Environment
+and module name. On other systems, this field is empty []::
+
+ ...
+ - compiler:
+ modules:
+ - PrgEnv-intel
+ - intel/15.0.109
+ ...
+
+As mentioned earlier, the compiler paths will look different on a Cray system.
+Since most compilers are invoked using cc, CC and ftn, the paths for each
+compiler are replaced with their respective Cray compiler wrapper names::
+
+ ...
+ paths:
+ cc: cc
+ cxx: CC
+ f77: ftn
+ fc: ftn
+ ...
+
+As opposed to an explicit path to the compiler executable. This allows Spack
+to call the Cray compiler wrappers during build time.
+
+For more on compiler configuration, check out :ref:`compiler-config`.
+
+Setting defaults and using Cray modules
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If you want to use default compilers for each PrgEnv and also be able
+to load cray external modules, you will need to set up a packages.yaml.
+
+Here\'s an example of an external configuration for cray modules:
+
+.. code-block:: yaml
+
+ packages:
+ mpi:
+ modules:
+ mpich@7.3.1%gcc@5.2.0 arch=cray_xc-haswell-CNL10: cray-mpich
+ mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-haswell-CNL10: cray-mpich
+
+This tells Spack that for whatever package that depends on mpi, load the
+cray-mpich module into the environment. You can then be able to use whatever
+environment variables, libraries, etc, that are brought into the environment
+via module load.
+
+You can set the default compiler that Spack can use for each compiler type.
+If you want to use the Cray defaults, then set them under *all:* in packages.yaml.
+In the compiler field, set the compiler specs in your order of preference.
+Whenever you build with that compiler type, Spack will concretize to that version.
+
+Here is an example of a full packages.yaml used at NERSC
+
+.. code-block:: yaml
+
+ packages:
+ mpi:
+ modules:
+ mpich@7.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-mpich
+ mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-SuSE11-ivybridge: cray-mpich
+ buildable: False
+ netcdf:
+ modules:
+ netcdf@4.3.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-netcdf
+ netcdf@4.3.3.1%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge: cray-netcdf
+ buildable: False
+ hdf5:
+ modules:
+ hdf5@1.8.14%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge: cray-hdf5
+ hdf5@1.8.14%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge: cray-hdf5
+ buildable: False
+ all:
+ compiler: [gcc@5.2.0, intel@16.0.0.109]
+
+Here we tell spack that whenever we want to build with gcc use version 5.2.0 or
+if we want to build with intel compilers, use version 16.0.0.109. We add a spec
+for each compiler type for each cray modules. This ensures that for each
+compiler on our system we can use that external module.
+
+
+For more on external packages check out the section :ref:`sec-external_packages`.
+
Getting Help
-----------------------
diff --git a/lib/spack/docs/configuration.rst b/lib/spack/docs/configuration.rst
index a6f876b2aa..f2ffa07264 100644
--- a/lib/spack/docs/configuration.rst
+++ b/lib/spack/docs/configuration.rst
@@ -53,6 +53,7 @@ in the first directory it finds to which it has write access. Add
more elements to the list to indicate where your own site's temporary
directory is.
+.. _sec-external_packages:
External Packages
----------------------------
@@ -70,20 +71,20 @@ directory. Here's an example of an external configuration:
packages:
openmpi:
paths:
- openmpi@1.4.3%gcc@4.4.7 arch=chaos_5_x86_64_ib: /opt/openmpi-1.4.3
- openmpi@1.4.3%gcc@4.4.7 arch=chaos_5_x86_64_ib+debug: /opt/openmpi-1.4.3-debug
- openmpi@1.6.5%intel@10.1 arch=chaos_5_x86_64_ib: /opt/openmpi-1.6.5-intel
+ openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7: /opt/openmpi-1.4.3
+ openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7+debug: /opt/openmpi-1.4.3-debug
+ openmpi@1.6.5%intel@10.1 arch=linux-x86_64-debian7: /opt/openmpi-1.6.5-intel
This example lists three installations of OpenMPI, one built with gcc,
one built with gcc and debug information, and another built with Intel.
If Spack is asked to build a package that uses one of these MPIs as a
dependency, it will use the the pre-installed OpenMPI in
-the given directory.
+the given directory. Packages.yaml can also be used to specify modules
Each ``packages.yaml`` begins with a ``packages:`` token, followed
-by a list of package names. To specify externals, add a ``paths``
+by a list of package names. To specify externals, add a ``paths`` or ``modules``
token under the package name, which lists externals in a
-``spec : /path`` format. Each spec should be as
+``spec: /path`` or ``spec: module-name`` format. Each spec should be as
well-defined as reasonably possible. If a
package lacks a spec component, such as missing a compiler or
package version, then Spack will guess the missing component based
@@ -108,9 +109,9 @@ be:
packages:
openmpi:
paths:
- openmpi@1.4.3%gcc@4.4.7 arch=chaos_5_x86_64_ib: /opt/openmpi-1.4.3
- openmpi@1.4.3%gcc@4.4.7 arch=chaos_5_x86_64_ib+debug: /opt/openmpi-1.4.3-debug
- openmpi@1.6.5%intel@10.1 arch=chaos_5_x86_64_ib: /opt/openmpi-1.6.5-intel
+ openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7: /opt/openmpi-1.4.3
+ openmpi@1.4.3%gcc@4.4.7 arch=linux-x86_64-debian7+debug: /opt/openmpi-1.4.3-debug
+ openmpi@1.6.5%intel@10.1 arch=linux-x86_64-debian7: /opt/openmpi-1.6.5-intel
buildable: False
The addition of the ``buildable`` flag tells Spack that it should never build
@@ -118,6 +119,9 @@ its own version of OpenMPI, and it will instead always rely on a pre-built
OpenMPI. Similar to ``paths``, ``buildable`` is specified as a property under
a package name.
+If an external module is specified as not buildable, then Spack will load the
+external module into the build environment which can be used for linking.
+
The ``buildable`` does not need to be paired with external packages.
It could also be used alone to forbid packages that may be
buggy or otherwise undesirable.
@@ -181,7 +185,6 @@ concretization rules. A provider lists a value that packages may
dependency.
-
Profiling
------------------
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index 6cea4da14f..a0d0feabbd 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -36,10 +36,11 @@ Creating & editing packages
``spack create``
~~~~~~~~~~~~~~~~~~~~~
-The ``spack create`` command generates a boilerplate package template
-from a URL. The URL should point to a tarball or other software
-archive. In most cases, ``spack create`` plus a few modifications is
-all you need to get a package working.
+The ``spack create`` command creates a directory with the package name and
+generates a ``package.py`` file with a boilerplate package template from a URL.
+The URL should point to a tarball or other software archive. In most cases,
+``spack create`` plus a few modifications is all you need to get a package
+working.
Here's an example:
@@ -47,12 +48,16 @@ Here's an example:
$ spack create http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz
-Spack examines the tarball URL and tries to figure out the name of the
-package to be created. It also tries to determine what version strings
-look like for this package. Using this information, it will try to
-find *additional* versions by spidering the package's webpage. If it
-finds multiple versions, Spack prompts you to tell it how many
-versions you want to download and checksum:
+Spack examines the tarball URL and tries to figure out the name of the package
+to be created. Once the name is determined a directory in the appropriate
+repository is created with that name. Spack prefers, but does not require, that
+names be lower case so the directory name will be lower case when ``spack
+create`` generates it. In cases where it is desired to have mixed case or upper
+case simply rename the directory. Spack also tries to determine what version
+strings look like for this package. Using this information, it will try to find
+*additional* versions by spidering the package's webpage. If it finds multiple
+versions, Spack prompts you to tell it how many versions you want to download
+and checksum:
.. code-block:: sh
@@ -297,9 +302,10 @@ directories or files (like patches) that it needs to build.
Package Names
~~~~~~~~~~~~~~~~~~
-Packages are named after the directory containing ``package.py``. So,
-``libelf``'s ``package.py`` lives in a directory called ``libelf``.
-The ``package.py`` file defines a class called ``Libelf``, which
+Packages are named after the directory containing ``package.py``. It is
+preferred, but not required, that the directory, and thus the package name, are
+lower case. So, ``libelf``'s ``package.py`` lives in a directory called
+``libelf``. The ``package.py`` file defines a class called ``Libelf``, which
extends Spack's ``Package`` class. for example, here is
``$SPACK_ROOT/var/spack/repos/builtin/packages/libelf/package.py``:
@@ -562,7 +568,7 @@ The package author is responsible for coming up with a sensible name
for each version to be fetched from a repository. For example, if
you're fetching from a tag like ``v1.0``, you might call that ``1.0``.
If you're fetching a nameless git commit or an older subversion
-revision, you might give the commit an intuitive name, like ``dev``
+revision, you might give the commit an intuitive name, like ``develop``
for a development version, or ``some-fancy-new-feature`` if you want
to be more specific.
@@ -572,6 +578,17 @@ branches move forward over time and you aren't guaranteed to get the
same thing every time you fetch a particular version. Life isn't
always simple, though, so this is not strictly enforced.
+When fetching from from the branch corresponding to the development version
+(often called ``master``,``trunk`` or ``dev``), it is recommended to
+call this version ``develop``. Spack has special treatment for this version so
+ that ``@develop`` will satisfy dependencies like
+``depends_on(abc, when="@x.y.z:")``. In other words, ``@develop`` is
+greater than any other version. The rationale is that certain features or
+options first appear in the development branch. Therefore if a package author
+wants to keep the package on the bleeding edge and provide support for new
+features, it is advised to use ``develop`` for such a version which will
+greatly simplify writing dependencies and version-related conditionals.
+
In some future release, Spack may support extrapolating repository
versions as it does for tarball URLs, but currently this is not
supported.
@@ -587,6 +604,7 @@ Git fetching is enabled with the following parameters to ``version``:
* ``tag``: name of a tag to fetch.
* ``branch``: name of a branch to fetch.
* ``commit``: SHA hash (or prefix) of a commit to fetch.
+ * ``submodules``: Also fetch submodules when checking out this repository.
Only one of ``tag``, ``branch``, or ``commit`` can be used at a time.
@@ -597,7 +615,7 @@ Default branch
class Example(Package):
...
- version('dev', git='https://github.com/example-project/example.git')
+ version('develop', git='https://github.com/example-project/example.git')
This is not recommended, as the contents of the default branch
change over time.
@@ -643,6 +661,17 @@ Commits
could just use the abbreviated commit hash. It's up to the package
author to decide what makes the most sense.
+Submodules
+
+ You can supply ``submodules=True`` to cause Spack to fetch submodules
+ along with the repository at fetch time.
+
+ .. code-block:: python
+
+ version('1.0.1', git='https://github.com/example-project/example.git',
+ tag='v1.0.1', submdoules=True)
+
+
Installing
^^^^^^^^^^^^^^
@@ -670,7 +699,7 @@ Default
.. code-block:: python
- version('hg-head', hg='https://jay.grs.rwth-aachen.de/hg/example')
+ version('develop', hg='https://jay.grs.rwth-aachen.de/hg/example')
Note that this is not recommended; try to fetch a particular
revision instead.
@@ -702,7 +731,7 @@ Fetching the head
.. code-block:: python
- version('svn-head', svn='https://outreach.scidac.gov/svn/libmonitor/trunk')
+ version('develop', svn='https://outreach.scidac.gov/svn/libmonitor/trunk')
This is not recommended, as the head will move forward over time.
@@ -712,7 +741,7 @@ Fetching a revision
.. code-block:: python
- version('svn-head', svn='https://outreach.scidac.gov/svn/libmonitor/trunk',
+ version('develop', svn='https://outreach.scidac.gov/svn/libmonitor/trunk',
revision=128)
Subversion branches are handled as part of the directory structure, so
@@ -1257,6 +1286,31 @@ command line to find installed packages or to install packages with
particular constraints, and package authors can use specs to describe
relationships between packages.
+Additionally, dependencies may be specified for specific use cases:
+
+.. code-block:: python
+
+ depends_on("cmake", type="build")
+ depends_on("libelf", type=("build", "link"))
+ depends_on("python", type="run")
+
+The dependency types are:
+
+ * **"build"**: made available during the project's build. The package will
+ be added to ``PATH``, the compiler include paths, and ``PYTHONPATH``.
+ Other projects which depend on this one will not have these modified
+ (building project X doesn't need project Y's build dependencies).
+ * **"link"**: the project is linked to by the project. The package will be
+ added to the current package's ``rpath``.
+ * **"run"**: the project is used by the project at runtime. The package will
+ be added to ``PATH`` and ``PYTHONPATH``.
+
+If not specified, ``type`` is assumed to be ``("build", "link")``. This is the
+common case for compiled language usage. Also available are the aliases
+``alldeps`` for all dependency types and ``nolink`` (``("build", "run")``) for
+use by dependencies which are not expressed via a linker (e.g., Python or Lua
+module loading).
+
.. _setup-dependent-environment:
``setup_dependent_environment()``
@@ -1660,21 +1714,21 @@ the user runs ``spack install`` and the time the ``install()`` method
is called. The concretized version of the spec above might look like
this::
- mpileaks@2.3%gcc@4.7.3 arch=linux-ppc64
- ^callpath@1.0%gcc@4.7.3+debug arch=linux-ppc64
- ^dyninst@8.1.2%gcc@4.7.3 arch=linux-ppc64
- ^libdwarf@20130729%gcc@4.7.3 arch=linux-ppc64
- ^libelf@0.8.11%gcc@4.7.3 arch=linux-ppc64
- ^mpich@3.0.4%gcc@4.7.3 arch=linux-ppc64
+ mpileaks@2.3%gcc@4.7.3 arch=linux-debian7-x86_64
+ ^callpath@1.0%gcc@4.7.3+debug arch=linux-debian7-x86_64
+ ^dyninst@8.1.2%gcc@4.7.3 arch=linux-debian7-x86_64
+ ^libdwarf@20130729%gcc@4.7.3 arch=linux-debian7-x86_64
+ ^libelf@0.8.11%gcc@4.7.3 arch=linux-debian7-x86_64
+ ^mpich@3.0.4%gcc@4.7.3 arch=linux-debian7-x86_64
.. graphviz::
digraph {
- "mpileaks@2.3\n%gcc@4.7.3\n arch=linux-ppc64" -> "mpich@3.0.4\n%gcc@4.7.3\n arch=linux-ppc64"
- "mpileaks@2.3\n%gcc@4.7.3\n arch=linux-ppc64" -> "callpath@1.0\n%gcc@4.7.3+debug\n arch=linux-ppc64" -> "mpich@3.0.4\n%gcc@4.7.3\n arch=linux-ppc64"
- "callpath@1.0\n%gcc@4.7.3+debug\n arch=linux-ppc64" -> "dyninst@8.1.2\n%gcc@4.7.3\n arch=linux-ppc64"
- "dyninst@8.1.2\n%gcc@4.7.3\n arch=linux-ppc64" -> "libdwarf@20130729\n%gcc@4.7.3\n arch=linux-ppc64" -> "libelf@0.8.11\n%gcc@4.7.3\n arch=linux-ppc64"
- "dyninst@8.1.2\n%gcc@4.7.3\n arch=linux-ppc64" -> "libelf@0.8.11\n%gcc@4.7.3\n arch=linux-ppc64"
+ "mpileaks@2.3\n%gcc@4.7.3\n arch=linux-debian7-x86_64" -> "mpich@3.0.4\n%gcc@4.7.3\n arch=linux-debian7-x86_64"
+ "mpileaks@2.3\n%gcc@4.7.3\n arch=linux-debian7-x86_64" -> "callpath@1.0\n%gcc@4.7.3+debug\n arch=linux-debian7-x86_64" -> "mpich@3.0.4\n%gcc@4.7.3\n arch=linux-debian7-x86_64"
+ "callpath@1.0\n%gcc@4.7.3+debug\n arch=linux-debian7-x86_64" -> "dyninst@8.1.2\n%gcc@4.7.3\n arch=linux-debian7-x86_64"
+ "dyninst@8.1.2\n%gcc@4.7.3\n arch=linux-debian7-x86_64" -> "libdwarf@20130729\n%gcc@4.7.3\n arch=linux-debian7-x86_64" -> "libelf@0.8.11\n%gcc@4.7.3\n arch=linux-debian7-x86_64"
+ "dyninst@8.1.2\n%gcc@4.7.3\n arch=linux-debian7-x86_64" -> "libelf@0.8.11\n%gcc@4.7.3\n arch=linux-debian7-x86_64"
}
Here, all versions, compilers, and platforms are filled in, and there
@@ -1703,9 +1757,9 @@ running ``spack spec``. For example:
^libdwarf
^libelf
- dyninst@8.0.1%gcc@4.7.3 arch=linux-ppc64
- ^libdwarf@20130729%gcc@4.7.3 arch=linux-ppc64
- ^libelf@0.8.13%gcc@4.7.3 arch=linux-ppc64
+ dyninst@8.0.1%gcc@4.7.3 arch=linux-debian7-x86_64
+ ^libdwarf@20130729%gcc@4.7.3 arch=linux-debian7-x86_64
+ ^libelf@0.8.13%gcc@4.7.3 arch=linux-debian7-x86_64
This is useful when you want to know exactly what Spack will do when
you ask for a particular spec.
@@ -2210,12 +2264,12 @@ example:
def install(self, prefix):
# Do default install
- @when('arch=chaos_5_x86_64_ib')
+ @when('arch=linux-debian7-x86_64')
def install(self, prefix):
# This will be executed instead of the default install if
# the package's sys_type() is chaos_5_x86_64_ib.
- @when('arch=bgqos_0")
+ @when('arch=linux-debian7-x86_64")
def install(self, prefix):
# This will be executed if the package's sys_type is bgqos_0
@@ -2343,7 +2397,7 @@ build system.
.. _sanity-checks:
-Sanity checking an intallation
+Sanity checking an installation
--------------------------------
By default, Spack assumes that a build has failed if nothing is
@@ -2706,15 +2760,15 @@ build process will start from scratch.
``spack purge``
~~~~~~~~~~~~~~~~~
-Cleans up all of Spack's temporary and cached files. This can be used to
-recover disk space if temporary files from interrupted or failed installs
-accumulate in the staging area.
+Cleans up all of Spack's temporary and cached files. This can be used to
+recover disk space if temporary files from interrupted or failed installs
+accumulate in the staging area.
When called with ``--stage`` or ``--all`` (or without arguments, in which case
-the default is ``--all``) this removes all staged files; this is equivalent to
+the default is ``--all``) this removes all staged files; this is equivalent to
running ``spack clean`` for every package you have fetched or staged.
-When called with ``--cache`` or ``--all`` this will clear all resources
+When called with ``--cache`` or ``--all`` this will clear all resources
:ref:`cached <caching>` during installs.
Keeping the stage directory on success
@@ -2863,11 +2917,11 @@ build it:
$ spack stage libelf
==> Trying to fetch from http://www.mr511.de/software/libelf-0.8.13.tar.gz
######################################################################## 100.0%
- ==> Staging archive: /Users/gamblin2/src/spack/var/spack/stage/libelf@0.8.13%gcc@4.8.3 arch=linux-ppc64/libelf-0.8.13.tar.gz
- ==> Created stage in /Users/gamblin2/src/spack/var/spack/stage/libelf@0.8.13%gcc@4.8.3 arch=linux-ppc64.
+ ==> Staging archive: /Users/gamblin2/src/spack/var/spack/stage/libelf@0.8.13%gcc@4.8.3 arch=linux-debian7-x86_64/libelf-0.8.13.tar.gz
+ ==> Created stage in /Users/gamblin2/src/spack/var/spack/stage/libelf@0.8.13%gcc@4.8.3 arch=linux-debian7-x86_64.
$ spack cd libelf
$ pwd
- /Users/gamblin2/src/spack/var/spack/stage/libelf@0.8.13%gcc@4.8.3 arch=linux-ppc64/libelf-0.8.13
+ /Users/gamblin2/src/spack/var/spack/stage/libelf@0.8.13%gcc@4.8.3 arch=linux-debian7-x86_64/libelf-0.8.13
``spack cd`` here changed he current working directory to the
directory containing the expanded ``libelf`` source code. There are a
diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py
index 20c9934704..d67585aac4 100644
--- a/lib/spack/spack/__init__.py
+++ b/lib/spack/spack/__init__.py
@@ -177,10 +177,11 @@ sys_type = None
# should live. This file is overloaded for spack core vs. for packages.
#
__all__ = ['Package', 'StagedPackage', 'CMakePackage', \
- 'Version', 'when', 'ver']
+ 'Version', 'when', 'ver', 'alldeps', 'nolink']
from spack.package import Package, ExtensionConflictError
from spack.package import StagedPackage, CMakePackage
from spack.version import Version, ver
+from spack.spec import DependencySpec, alldeps, nolink
from spack.multimethod import when
import llnl.util.filesystem
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index fe5186a7d7..93fb0690f7 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -254,7 +254,8 @@ def set_build_environment_variables(pkg, env, dirty=False):
env.set_path(SPACK_ENV_PATH, env_paths)
# Prefixes of all of the package's dependencies go in SPACK_DEPENDENCIES
- dep_prefixes = [d.prefix for d in pkg.spec.traverse(root=False)]
+ dep_prefixes = [d.prefix
+ for d in pkg.spec.traverse(root=False, deptype='build')]
env.set_path(SPACK_DEPENDENCIES, dep_prefixes)
# Add dependencies to CMAKE_PREFIX_PATH
env.set_path('CMAKE_PREFIX_PATH', dep_prefixes)
@@ -337,10 +338,6 @@ def set_module_variables_for_package(pkg, module):
# Don't use which for this; we want to find it in the current dir.
m.configure = Executable('./configure')
- # TODO: shouldn't really use "which" here. Consider adding notion
- # TODO: of build dependencies, as opposed to link dependencies.
- # TODO: Currently, everything is a link dependency, but tools like
- # TODO: this shouldn't be.
m.cmake = Executable('cmake')
m.ctest = Executable('ctest')
@@ -388,9 +385,10 @@ def set_module_variables_for_package(pkg, module):
def get_rpaths(pkg):
"""Get a list of all the rpaths for a package."""
rpaths = [pkg.prefix.lib, pkg.prefix.lib64]
- rpaths.extend(d.prefix.lib for d in pkg.spec.dependencies.values()
+ deps = pkg.spec.dependencies(deptype='link')
+ rpaths.extend(d.prefix.lib for d in deps
if os.path.isdir(d.prefix.lib))
- rpaths.extend(d.prefix.lib64 for d in pkg.spec.dependencies.values()
+ rpaths.extend(d.prefix.lib64 for d in deps
if os.path.isdir(d.prefix.lib64))
# Second module is our compiler mod name. We use that to get rpaths from
# module show output.
@@ -449,7 +447,7 @@ def setup_package(pkg, dirty=False):
load_external_modules(pkg)
# traverse in postorder so package can use vars from its dependencies
spec = pkg.spec
- for dspec in pkg.spec.traverse(order='post', root=False):
+ for dspec in pkg.spec.traverse(order='post', root=False, deptype='build'):
# If a user makes their own package repo, e.g.
# spack.repos.mystuff.libelf.Libelf, and they inherit from
# an existing class like spack.repos.original.libelf.Libelf,
diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py
index f5f234d7a7..18c748e483 100644
--- a/lib/spack/spack/cmd/create.py
+++ b/lib/spack/spack/cmd/create.py
@@ -325,7 +325,7 @@ def create(parser, args):
# Figure out a name and repo for the package.
name, version = guess_name_and_version(url, args)
spec = Spec(name)
- name = spec.name # factors out namespace, if any
+ name = spec.name.lower() # factors out namespace, if any
repo = find_repository(spec, args)
tty.msg("This looks like a URL for %s version %s" % (name, version))
diff --git a/lib/spack/spack/cmd/diy.py b/lib/spack/spack/cmd/diy.py
index 39faf59a17..643e6374b2 100644
--- a/lib/spack/spack/cmd/diy.py
+++ b/lib/spack/spack/cmd/diy.py
@@ -50,7 +50,7 @@ def setup_parser(subparser):
help="Do not display verbose build output while installing.")
subparser.add_argument(
'spec', nargs=argparse.REMAINDER,
- help="specs to use for install. Must contain package AND verison.")
+ help="specs to use for install. Must contain package AND version.")
def diy(self, args):
diff --git a/lib/spack/spack/cmd/fetch.py b/lib/spack/spack/cmd/fetch.py
index e40caaa234..1afc51d9fa 100644
--- a/lib/spack/spack/cmd/fetch.py
+++ b/lib/spack/spack/cmd/fetch.py
@@ -51,7 +51,7 @@ def fetch(parser, args):
for spec in specs:
if args.missing or args.dependencies:
to_fetch = set()
- for s in spec.traverse():
+ for s in spec.traverse(deptype_query=spack.alldeps):
package = spack.repo.get(s)
if args.missing and package.installed:
continue
diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py
index 64d0d20e24..5774034062 100644
--- a/lib/spack/spack/cmd/info.py
+++ b/lib/spack/spack/cmd/info.py
@@ -81,12 +81,14 @@ def print_text_info(pkg):
print " " + fmt % (name, default, desc)
- print
- print "Dependencies:"
- if pkg.dependencies:
- colify(pkg.dependencies, indent=4)
- else:
- print " None"
+ for deptype in ('build', 'link', 'run'):
+ print
+ print "%s Dependencies:" % deptype.capitalize()
+ deps = pkg.dependencies(deptype)
+ if deps:
+ colify(deps, indent=4)
+ else:
+ print " None"
print
print "Virtual packages: "
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py
index 3133e080d7..4c076322a9 100644
--- a/lib/spack/spack/cmd/install.py
+++ b/lib/spack/spack/cmd/install.py
@@ -58,6 +58,10 @@ def setup_parser(subparser):
help="Install a package *without* cleaning the environment.")
subparser.add_argument(
'packages', nargs=argparse.REMAINDER, help="specs of packages to install")
+ subparser.add_argument(
+ '--run-tests', action='store_true', dest='run_tests',
+ help="Run tests during installation of a package.")
+
def install(parser, args):
@@ -80,6 +84,7 @@ def install(parser, args):
keep_stage=args.keep_stage,
ignore_deps=args.ignore_deps,
make_jobs=args.jobs,
+ run_tests=args.run_tests,
verbose=args.verbose,
fake=args.fake,
dirty=args.dirty,
diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py
index d5f7abe212..0cf682fc4f 100644
--- a/lib/spack/spack/cmd/mirror.py
+++ b/lib/spack/spack/cmd/mirror.py
@@ -179,7 +179,7 @@ def mirror_create(args):
new_specs = set()
for spec in specs:
spec.concretize()
- for s in spec.traverse():
+ for s in spec.traverse(deptype_query=spack.alldeps):
new_specs.add(s)
specs = list(new_specs)
diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py
index 3cefb512c2..55826d133c 100644
--- a/lib/spack/spack/cmd/module.py
+++ b/lib/spack/spack/cmd/module.py
@@ -87,7 +87,7 @@ def module_find(mtype, flags, spec_array):
return
if flags.recurse_dependencies:
- for dep in spec.dependencies.values():
+ for dep in spec.dependencies():
_find_modules(dep, modules_list)
mod = module_types[mtype](spec)
@@ -108,7 +108,7 @@ def module_find(mtype, flags, spec_array):
tty.die("No installed packages match spec %s" % raw_spec)
if len(specs) > 1:
- tty.error("Multiple matches for spec %s. Choose one:" % spec)
+ tty.error("Multiple matches for spec %s. Choose one:" % raw_spec)
for s in specs:
sys.stderr.write(s.tree(color=True))
sys.exit(1)
diff --git a/lib/spack/spack/cmd/package-list.py b/lib/spack/spack/cmd/package-list.py
index 6c5c4ae8c6..bc64c77eab 100644
--- a/lib/spack/spack/cmd/package-list.py
+++ b/lib/spack/spack/cmd/package-list.py
@@ -80,11 +80,15 @@ def print_rst_package_list():
if pkg.versions:
print "Versions:"
print " " + ", ".join(str(v) for v in reversed(sorted(pkg.versions)))
- if pkg.dependencies:
- print "Dependencies"
- print " " + ", ".join("`%s`_" % d if d != "mpi" else d
- for d in pkg.dependencies)
- print
+
+ for deptype in ('build', 'link', 'run'):
+ deps = pkg.dependencies(deptype)
+ if deps:
+ print "%s Dependencies" % deptype.capitalize()
+ print " " + ", ".join("`%s`_" % d if d != "mpi" else d
+ for d in build_deps)
+ print
+
print "Description:"
print pkg.format_doc(indent=2)
print
diff --git a/lib/spack/spack/cmd/setup.py b/lib/spack/spack/cmd/setup.py
index 02e9bfd281..04f3d663df 100644
--- a/lib/spack/spack/cmd/setup.py
+++ b/lib/spack/spack/cmd/setup.py
@@ -44,7 +44,7 @@ def setup_parser(subparser):
help="Display verbose build output while installing.")
subparser.add_argument(
'spec', nargs=argparse.REMAINDER,
- help="specs to use for install. Must contain package AND verison.")
+ help="specs to use for install. Must contain package AND version.")
def setup(self, args):
diff --git a/lib/spack/spack/cmd/test-install.py b/lib/spack/spack/cmd/test-install.py
index 45592a7dda..14c06d136d 100644
--- a/lib/spack/spack/cmd/test-install.py
+++ b/lib/spack/spack/cmd/test-install.py
@@ -133,7 +133,12 @@ def fetch_log(path):
def failed_dependencies(spec):
- return set(item for item in spec.dependencies.itervalues() if not spack.repo.get(item).installed)
+ def get_deps(deptype):
+ return set(item for item in spec.dependencies(deptype)
+ if not spack.repo.get(item).installed)
+ link_deps = get_deps('link')
+ run_deps = get_deps('run')
+ return link_deps.union(run_deps)
def get_top_spec_or_die(args):
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index f792008c49..386df08b2e 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -103,7 +103,7 @@ class DefaultConcretizer(object):
usable.sort(cmp=cmp_externals)
return usable
-
+ # XXX(deptypes): Look here.
def choose_virtual_or_external(self, spec):
"""Given a list of candidate virtual and external packages, try to
find one that is most ABI compatible.
@@ -166,7 +166,11 @@ class DefaultConcretizer(object):
valid_versions.sort(key=prefer_key, reverse=True)
if valid_versions:
- spec.versions = ver([valid_versions[0]])
+ # Disregard @develop and take the next valid version
+ if ver(valid_versions[0]) == ver('develop') and len(valid_versions) > 1:
+ spec.versions = ver([valid_versions[1]])
+ else:
+ spec.versions = ver([valid_versions[0]])
else:
# We don't know of any SAFE versions that match the given
# spec. Grab the spec's versions and grab the highest
@@ -390,8 +394,10 @@ def find_spec(spec, condition):
"""Searches the dag from spec in an intelligent order and looks
for a spec that matches a condition"""
# First search parents, then search children
- dagiter = chain(spec.traverse(direction='parents', root=False),
- spec.traverse(direction='children', root=False))
+ deptype = ('build', 'link')
+ dagiter = chain(
+ spec.traverse(direction='parents', deptype=deptype, root=False),
+ spec.traverse(direction='children', deptype=deptype, root=False))
visited = set()
for relative in dagiter:
if condition(relative):
@@ -399,7 +405,7 @@ def find_spec(spec, condition):
visited.add(id(relative))
# Then search all other relatives in the DAG *except* spec
- for relative in spec.root.traverse():
+ for relative in spec.root.traverse(deptypes=spack.alldeps):
if relative is spec: continue
if id(relative) in visited: continue
if condition(relative):
diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py
index a4bbff3d5a..c95abd7423 100644
--- a/lib/spack/spack/database.py
+++ b/lib/spack/spack/database.py
@@ -215,9 +215,14 @@ class Database(object):
# Add dependencies from other records in the install DB to
# form a full spec.
if 'dependencies' in spec_dict[spec.name]:
- for dep_hash in spec_dict[spec.name]['dependencies'].values():
+ for dep in spec_dict[spec.name]['dependencies'].values():
+ if type(dep) == tuple:
+ dep_hash, deptypes = dep
+ else:
+ dep_hash = dep
+ deptypes = spack.alldeps
child = self._read_spec_from_yaml(dep_hash, installs, hash_key)
- spec._add_dependency(child)
+ spec._add_dependency(child, deptypes)
# Specs from the database need to be marked concrete because
# they represent actual installations.
@@ -334,7 +339,10 @@ class Database(object):
counts = {}
for key, rec in self._data.items():
counts.setdefault(key, 0)
- for dep in rec.spec.dependencies.values():
+ # XXX(deptype): This checks all dependencies, but build
+ # dependencies might be able to be dropped in the
+ # future.
+ for dep in rec.spec.dependencies():
dep_key = dep.dag_hash()
counts.setdefault(dep_key, 0)
counts[dep_key] += 1
@@ -406,7 +414,7 @@ class Database(object):
else:
self._data[key] = InstallRecord(spec, path, True,
explicit=explicit)
- for dep in spec.dependencies.values():
+ for dep in spec.dependencies(('link', 'run')):
self._increment_ref_count(dep, directory_layout)
def _increment_ref_count(self, spec, directory_layout=None):
@@ -421,7 +429,7 @@ class Database(object):
self._data[key] = InstallRecord(spec.copy(), path, installed)
- for dep in spec.dependencies.values():
+ for dep in spec.dependencies('link'):
self._increment_ref_count(dep)
self._data[key].ref_count += 1
@@ -466,7 +474,7 @@ class Database(object):
if rec.ref_count == 0 and not rec.installed:
del self._data[key]
- for dep in spec.dependencies.values():
+ for dep in spec.dependencies('link'):
self._decrement_ref_count(dep)
def _remove(self, spec):
@@ -480,7 +488,7 @@ class Database(object):
return rec.spec
del self._data[key]
- for dep in rec.spec.dependencies.values():
+ for dep in rec.spec.dependencies('link'):
self._decrement_ref_count(dep)
# Returns the concrete spec so we know it in the case where a
diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py
index ca8f21dc08..88d2aaf472 100644
--- a/lib/spack/spack/directives.py
+++ b/lib/spack/spack/directives.py
@@ -171,7 +171,7 @@ def version(pkg, ver, checksum=None, **kwargs):
pkg.versions[Version(ver)] = kwargs
-def _depends_on(pkg, spec, when=None):
+def _depends_on(pkg, spec, when=None, type=None):
# If when is False do nothing
if when is False:
return
@@ -180,10 +180,29 @@ def _depends_on(pkg, spec, when=None):
when = pkg.name
when_spec = parse_anonymous_spec(when, pkg.name)
+ if type is None:
+ # The default deptype is build and link because the common case is to
+ # build against a library which then turns into a runtime dependency
+ # due to the linker.
+ # XXX(deptype): Add 'run' to this? It's an uncommon dependency type,
+ # but is most backwards-compatible.
+ type = ('build', 'link')
+
+ if isinstance(type, str):
+ type = (type,)
+
+ for deptype in type:
+ if deptype not in spack.spec.alldeps:
+ raise UnknownDependencyTypeError('depends_on', pkg.name, deptype)
+
dep_spec = Spec(spec)
if pkg.name == dep_spec.name:
raise CircularReferenceError('depends_on', pkg.name)
+ pkg_deptypes = pkg._deptypes.setdefault(dep_spec.name, set())
+ for deptype in type:
+ pkg_deptypes.add(deptype)
+
conditions = pkg.dependencies.setdefault(dep_spec.name, {})
if when_spec in conditions:
conditions[when_spec].constrain(dep_spec, deps=False)
@@ -191,13 +210,13 @@ def _depends_on(pkg, spec, when=None):
conditions[when_spec] = dep_spec
-@directive('dependencies')
-def depends_on(pkg, spec, when=None):
+@directive(('dependencies', '_deptypes'))
+def depends_on(pkg, spec, when=None, type=None):
"""Creates a dict of deps with specs defining when they apply."""
- _depends_on(pkg, spec, when=when)
+ _depends_on(pkg, spec, when=when, type=type)
-@directive(('extendees', 'dependencies'))
+@directive(('extendees', 'dependencies', '_deptypes'))
def extends(pkg, spec, **kwargs):
"""Same as depends_on, but dependency is symlinked into parent prefix.
@@ -326,3 +345,13 @@ class CircularReferenceError(DirectiveError):
directive,
"Package '%s' cannot pass itself to %s" % (package, directive))
self.package = package
+
+
+class UnknownDependencyTypeError(DirectiveError):
+ """This is raised when a dependency is of an unknown type."""
+ def __init__(self, directive, package, deptype):
+ super(UnknownDependencyTypeError, self).__init__(
+ directive,
+ "Package '%s' cannot depend on a package via %s." %
+ (package, deptype))
+ self.package = package
diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py
index ee13e2dcbc..a5e76043ad 100644
--- a/lib/spack/spack/directory_layout.py
+++ b/lib/spack/spack/directory_layout.py
@@ -285,7 +285,7 @@ class YamlDirectoryLayout(DirectoryLayout):
return path
if spec.dag_hash() == installed_spec.dag_hash():
- raise SpecHashCollisionError(installed_hash, spec_hash)
+ raise SpecHashCollisionError(spec, installed_spec)
else:
raise InconsistentInstallDirectoryError(
'Spec file in %s does not match hash!' % spec_file_path)
@@ -431,7 +431,7 @@ class SpecHashCollisionError(DirectoryLayoutError):
def __init__(self, installed_spec, new_spec):
super(SpecHashCollisionError, self).__init__(
'Specs %s and %s have the same SHA-1 prefix!'
- % installed_spec, new_spec)
+ % (installed_spec, new_spec))
class RemoveFailedError(DirectoryLayoutError):
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index 38133ee0ca..bcb33bd0e6 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -366,8 +366,8 @@ class CacheURLFetchStrategy(URLFetchStrategy):
try:
self.check()
except ChecksumError:
- # Future fetchers will assume they don't need to download if the
- # file remains
+ # Future fetchers will assume they don't need to
+ # download if the file remains
os.remove(self.archive_file)
raise
@@ -517,6 +517,7 @@ class GitFetchStrategy(VCSFetchStrategy):
super(GitFetchStrategy, self).__init__(
'git', 'tag', 'branch', 'commit', **forwarded_args)
self._git = None
+ self.submodules = kwargs.get('submodules', False)
@property
def git_version(self):
@@ -595,6 +596,10 @@ class GitFetchStrategy(VCSFetchStrategy):
self.git('pull', '--tags', ignore_errors=1)
self.git('checkout', self.tag)
+ # Init submodules if the user asked for them.
+ if self.submodules:
+ self.git('submodule', 'update', '--init')
+
def archive(self, destination):
super(GitFetchStrategy, self).archive(destination, exclude='.git')
diff --git a/lib/spack/spack/graph.py b/lib/spack/spack/graph.py
index 22058d41d8..063e4647b6 100644
--- a/lib/spack/spack/graph.py
+++ b/lib/spack/spack/graph.py
@@ -80,12 +80,14 @@ def topological_sort(spec, **kwargs):
"""
reverse = kwargs.get('reverse', False)
+ # XXX(deptype): iterate over a certain kind of dependency. Maybe color
+ # edges based on the type of dependency?
if not reverse:
- parents = lambda s: s.dependents
- children = lambda s: s.dependencies
+ parents = lambda s: s.dependents()
+ children = lambda s: s.dependencies()
else:
- parents = lambda s: s.dependencies
- children = lambda s: s.dependents
+ parents = lambda s: s.dependencies()
+ children = lambda s: s.dependents()
# Work on a copy so this is nondestructive.
spec = spec.copy()
diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py
index ce46047fa3..a2e528d295 100644
--- a/lib/spack/spack/modules.py
+++ b/lib/spack/spack/modules.py
@@ -120,7 +120,7 @@ def dependencies(spec, request='all'):
return []
if request == 'direct':
- return [xx for _, xx in spec.dependencies.items()]
+ return spec.dependencies()
# FIXME : during module file creation nodes seem to be visited multiple
# FIXME : times even if cover='nodes' is given. This work around permits
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 84bd99df54..7f53b461b2 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -311,6 +311,8 @@ class Package(object):
parallel = True
"""# jobs to use for parallel make. If set, overrides default of ncpus."""
make_jobs = None
+ """By default do not run tests within package's install()"""
+ run_tests = False
"""Most packages are NOT extendable. Set to True if you want extensions."""
extendable = False
"""List of prefix-relative file paths (or a single path). If these do
@@ -575,7 +577,7 @@ class Package(object):
name = next(iter(self.extendees))
# If the extendee is in the spec's deps already, return that.
- for dep in self.spec.traverse():
+ for dep in self.spec.traverse(deptypes=('link', 'run')):
if name == dep.name:
return dep
@@ -640,12 +642,13 @@ class Package(object):
yield self
for name in sorted(self.dependencies.keys()):
- spec = self.dependencies[name]
+ dep_spec = self.get_dependency(name)
+ spec = dep_spec.spec
- # currently, we do not descend into virtual dependencies, as this
+ # Currently, we do not descend into virtual dependencies, as this
# makes doing a sensible traversal much harder. We just assume
# that ANY of the virtual deps will work, which might not be true
- # (due to conflicts or unsatisfiable specs). For now this is ok
+ # (due to conflicts or unsatisfiable specs). For now this is ok,
# but we might want to reinvestigate if we start using a lot of
# complicated virtual dependencies
# TODO: reinvestigate this.
@@ -683,7 +686,9 @@ class Package(object):
for spec in spack.installed_db.query():
if self.name == spec.name:
continue
- for dep in spec.traverse():
+ # XXX(deptype): Should build dependencies not count here?
+ #for dep in spec.traverse(deptype=('run')):
+ for dep in spec.traverse(deptype=spack.alldeps):
if self.spec == dep:
dependents.append(spec)
return dependents
@@ -881,6 +886,7 @@ class Package(object):
skip_patch=False,
verbose=False,
make_jobs=None,
+ run_tests=False,
fake=False,
explicit=False,
dirty=False,
@@ -902,9 +908,10 @@ class Package(object):
verbose -- Display verbose build output (by default, suppresses it)
dirty -- Don't clean the build environment before installing.
make_jobs -- Number of make jobs to use for install. Default is ncpus
+ run_tests -- Runn tests within the package's install()
"""
if not self.spec.concrete:
- raise ValueError("Can only install concrete packages.")
+ raise ValueError("Can only install concrete packages: %s." % self.spec.name)
# No installation needed if package is external
if self.spec.external:
@@ -932,7 +939,11 @@ class Package(object):
fake=fake,
skip_patch=skip_patch,
verbose=verbose,
- make_jobs=make_jobs)
+ make_jobs=make_jobs,
+ run_tests=run_tests)
+
+ # Set run_tests flag before starting build.
+ self.run_tests = run_tests
# Set parallelism before starting build.
self.make_jobs = make_jobs
@@ -1081,7 +1092,7 @@ class Package(object):
def do_install_dependencies(self, **kwargs):
# Pass along paths of dependencies here
- for dep in self.spec.dependencies.values():
+ for dep in self.spec.dependencies():
dep.package.do_install(**kwargs)
@property
@@ -1262,7 +1273,7 @@ class Package(object):
(self.name, self.extendee.name))
def do_activate(self, force=False):
- """Called on an etension to invoke the extendee's activate method.
+ """Called on an extension to invoke the extendee's activate method.
Commands should call this routine, and should not call
activate() directly.
@@ -1274,7 +1285,7 @@ class Package(object):
# Activate any package dependencies that are also extensions.
if not force:
- for spec in self.spec.traverse(root=False):
+ for spec in self.spec.traverse(root=False, deptype='run'):
if spec.package.extends(self.extendee_spec):
if not spec.package.activated:
spec.package.do_activate(force=force)
@@ -1320,7 +1331,7 @@ class Package(object):
for name, aspec in activated.items():
if aspec == self.spec:
continue
- for dep in aspec.traverse():
+ for dep in aspec.traverse(deptype='run'):
if self.spec == dep:
raise ActivationError(
"Cannot deactivate %s because %s is activated and depends on it." # NOQA: ignore=E501
@@ -1406,9 +1417,10 @@ class Package(object):
def rpath(self):
"""Get the rpath this package links with, as a list of paths."""
rpaths = [self.prefix.lib, self.prefix.lib64]
- rpaths.extend(d.prefix.lib for d in self.spec.traverse(root=False)
+ deps = self.spec.dependencies(deptype='link')
+ rpaths.extend(d.prefix.lib for d in deps
if os.path.isdir(d.prefix.lib))
- rpaths.extend(d.prefix.lib64 for d in self.spec.traverse(root=False)
+ rpaths.extend(d.prefix.lib64 for d in deps
if os.path.isdir(d.prefix.lib64))
return rpaths
diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py
index 4d8adac384..4d3f59c320 100644
--- a/lib/spack/spack/platforms/linux.py
+++ b/lib/spack/spack/platforms/linux.py
@@ -1,16 +1,23 @@
import subprocess
+import platform
from spack.architecture import Platform, Target
from spack.operating_systems.linux_distro import LinuxDistro
class Linux(Platform):
priority = 90
- front_end = 'x86_64'
- back_end = 'x86_64'
- default = 'x86_64'
def __init__(self):
super(Linux, self).__init__('linux')
- self.add_target(self.default, Target(self.default))
+ self.add_target('x86_64', Target('x86_64'))
+ self.add_target('ppc64le', Target('ppc64le'))
+
+ self.default = platform.machine()
+ self.front_end = platform.machine()
+ self.back_end = platform.machine()
+
+ if self.default not in self.targets:
+ self.add_target(self.default, Target(self.default))
+
linux_dist = LinuxDistro()
self.default_os = str(linux_dist)
self.front_os = self.default_os
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 77bc57147d..d3a5f66e57 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -155,6 +155,9 @@ _separators = '[%s]' % ''.join(color_formats.keys())
every time we call str()"""
_any_version = VersionList([':'])
+alldeps = ('build', 'link', 'run')
+nolink = ('build', 'run')
+
def index_specs(specs):
"""Take a list of specs and return a dict of lists. Dict is
@@ -292,6 +295,27 @@ class CompilerSpec(object):
@key_ordering
+class DependencySpec(object):
+ """
+ Dependencies have conditions in which they apply.
+
+ This stores both what is depended on and why it is a dependency.
+ """
+ def __init__(self, spec, deptypes):
+ self.spec = spec
+ self.deptypes = deptypes
+
+ def _cmp_key(self):
+ return self.spec
+
+ def copy(self):
+ return DependencySpec(self.spec.copy(), self.deptype)
+
+ def __str__(self):
+ return str(self.spec)
+
+
+@key_ordering
class VariantSpec(object):
"""Variants are named, build-time options for a package. Names depend
@@ -440,11 +464,11 @@ class DependencyMap(HashableMap):
The DependencyMap is keyed by name. """
@property
def concrete(self):
- return all(d.concrete for d in self.values())
+ return all(d.spec.concrete for d in self.values())
def __str__(self):
return ''.join(
- ["^" + str(self[name]) for name in sorted(self.keys())])
+ ["^" + str(self[name].spec) for name in sorted(self.keys())])
@key_ordering
@@ -472,13 +496,13 @@ class Spec(object):
# writes directly into this Spec object.
other = spec_list[0]
self.name = other.name
- self.dependents = other.dependents
self.versions = other.versions
self.architecture = other.architecture
self.compiler = other.compiler
self.compiler_flags = other.compiler_flags
self.compiler_flags.spec = self
- self.dependencies = other.dependencies
+ self._dependencies = other._dependencies
+ self._dependents = other._dependents
self.variants = other.variants
self.variants.spec = self
self.namespace = other.namespace
@@ -500,7 +524,49 @@ class Spec(object):
# Spec(a, b) will copy a but just add b as a dep.
for dep in dep_like:
spec = dep if isinstance(dep, Spec) else Spec(dep)
- self._add_dependency(spec)
+ # XXX(deptype): default deptypes
+ self._add_dependency(spec, ('build', 'link'))
+
+ def get_dependency(self, name):
+ dep = self._dependencies.get(name)
+ if dep is not None:
+ return dep
+ raise InvalidDependencyException(
+ self.name + " does not depend on " + comma_or(name))
+
+ def _deptype_norm(self, deptype):
+ if deptype is None:
+ return alldeps
+ # Force deptype to be a set object so that we can do set intersections.
+ if isinstance(deptype, str):
+ return (deptype,)
+ return deptype
+
+ def _find_deps(self, where, deptype):
+ deptype = self._deptype_norm(deptype)
+
+ return [dep.spec
+ for dep in where.values()
+ if deptype and any(d in deptype for d in dep.deptypes)]
+
+ def dependencies(self, deptype=None):
+ return self._find_deps(self._dependencies, deptype)
+
+ def dependents(self, deptype=None):
+ return self._find_deps(self._dependents, deptype)
+
+ def _find_deps_dict(self, where, deptype):
+ deptype = self._deptype_norm(deptype)
+
+ return [(dep.spec.name, dep)
+ for dep in where.values()
+ if deptype and any(d in deptype for d in dep.deptypes)]
+
+ def dependencies_dict(self, deptype=None):
+ return dict(self._find_deps_dict(self._dependencies, deptype))
+
+ def dependents_dict(self, deptype=None):
+ return dict(self._find_deps_dict(self._dependents, deptype))
#
# Private routines here are called by the parser when building a spec.
@@ -609,13 +675,13 @@ class Spec(object):
if self.architecture.platform:
self.architecture.target = self.architecture.platform.target(value)
- def _add_dependency(self, spec):
+ def _add_dependency(self, spec, deptypes):
"""Called by the parser to add another spec as a dependency."""
- if spec.name in self.dependencies:
+ if spec.name in self._dependencies:
raise DuplicateDependencyError(
"Cannot depend on '%s' twice" % spec)
- self.dependencies[spec.name] = spec
- spec.dependents[self.name] = self
+ self._dependencies[spec.name] = DependencySpec(spec, deptypes)
+ spec._dependents[self.name] = DependencySpec(self, deptypes)
#
# Public interface
@@ -632,15 +698,15 @@ class Spec(object):
installed). This will throw an assertion error if that is not
the case.
"""
- if not self.dependents:
+ if not self._dependents:
return self
# If the spec has multiple dependents, ensure that they all
# lead to the same place. Spack shouldn't deal with any DAGs
# with multiple roots, so something's wrong if we find one.
- depiter = iter(self.dependents.values())
- first_root = next(depiter).root
- assert(all(first_root is d.root for d in depiter))
+ depiter = iter(self._dependents.values())
+ first_root = next(depiter).spec.root
+ assert(all(first_root is d.spec.root for d in depiter))
return first_root
@property
@@ -687,10 +753,21 @@ class Spec(object):
and self.architecture.concrete
and self.compiler and self.compiler.concrete
and self.compiler_flags.concrete
- and self.dependencies.concrete)
+ and self._dependencies.concrete)
return self._concrete
- def traverse(self, visited=None, d=0, **kwargs):
+ def traverse(self, visited=None, deptype=None, **kwargs):
+ traversal = self.traverse_with_deptype(visited=visited,
+ deptype=deptype,
+ **kwargs)
+ if kwargs.get('depth', False):
+ return [(s[0], s[1].spec) for s in traversal]
+ else:
+ return [s.spec for s in traversal]
+
+ def traverse_with_deptype(self, visited=None, d=0, deptype=None,
+ deptype_query=None, _self_deptype=None,
+ **kwargs):
"""Generic traversal of the DAG represented by this spec.
This will yield each node in the spec. Options:
@@ -742,6 +819,12 @@ class Spec(object):
direction = kwargs.get('direction', 'children')
order = kwargs.get('order', 'pre')
+ if deptype is None:
+ deptype = alldeps
+
+ if deptype_query is None:
+ deptype_query = ('link', 'run')
+
# Make sure kwargs have legal values; raise ValueError if not.
def validate(name, val, allowed_values):
if val not in allowed_values:
@@ -759,30 +842,37 @@ class Spec(object):
if key in visited and cover == 'nodes':
return
- # Determine whether and what to yield for this node.
+ def return_val(res):
+ return (d, res) if depth else res
+
yield_me = yield_root or d > 0
- result = (d, self) if depth else self
# Preorder traversal yields before successors
if yield_me and order == 'pre':
- yield result
+ yield return_val(DependencySpec(self, _self_deptype))
+
+ deps = self.dependencies_dict(deptype)
# Edge traversal yields but skips children of visited nodes
if not (key in visited and cover == 'edges'):
# This code determines direction and yields the children/parents
- successors = self.dependencies
+ successors = deps
if direction == 'parents':
- successors = self.dependents
+ successors = self.dependents_dict()
visited.add(key)
for name in sorted(successors):
child = successors[name]
- for elt in child.traverse(visited, d + 1, **kwargs):
+ children = child.spec.traverse_with_deptype(
+ visited, d=d + 1, deptype=deptype_query,
+ deptype_query=deptype_query,
+ _self_deptype=child.deptypes, **kwargs)
+ for elt in children:
yield elt
# Postorder traversal yields after successors
if yield_me and order == 'post':
- yield result
+ yield return_val(DependencySpec(self, _self_deptype))
@property
def short_spec(self):
@@ -807,6 +897,7 @@ class Spec(object):
if self._hash:
return self._hash[:length]
else:
+ # XXX(deptype): ignore 'build' dependencies here
yaml_text = yaml.dump(
self.to_node_dict(), default_flow_style=True, width=sys.maxint)
sha = hashlib.sha1(yaml_text)
@@ -819,11 +910,13 @@ class Spec(object):
params = dict((name, v.value) for name, v in self.variants.items())
params.update(dict((name, value)
for name, value in self.compiler_flags.items()))
+ deps = self.dependencies_dict(deptype=('link', 'run'))
d = {
- 'parameters' : params,
- 'arch' : self.architecture,
- 'dependencies' : dict((d, self.dependencies[d].dag_hash())
- for d in sorted(self.dependencies))
+ 'parameters': params,
+ 'arch': self.architecture,
+ 'dependencies': dict((d, (deps[d].spec.dag_hash(),
+ deps[d].deptypes))
+ for d in sorted(deps.keys()))
}
# Older concrete specs do not have a namespace. Omit for
@@ -848,7 +941,7 @@ class Spec(object):
def to_yaml(self, stream=None):
node_list = []
- for s in self.traverse(order='pre'):
+ for s in self.traverse(order='pre', deptype=('link', 'run')):
node = s.to_node_dict()
node[s.name]['hash'] = s.dag_hash()
node_list.append(node)
@@ -889,6 +982,11 @@ class Spec(object):
raise SpackRecordError(
"Did not find a valid format for variants in YAML file")
+ # XXX(deptypes): why are dependencies not meant to be read here?
+ #for name, dep_info in node['dependencies'].items():
+ # (dag_hash, deptypes) = dep_info
+ # spec._dependencies[name] = DependencySpec(dag_hash, deptypes)
+
return spec
@staticmethod
@@ -919,8 +1017,10 @@ class Spec(object):
for node in yfile['spec']:
name = next(iter(node))
- for dep_name in node[name]['dependencies']:
- deps[name].dependencies[dep_name] = deps[dep_name]
+ for dep_name, (dep, deptypes) in \
+ node[name]['dependencies'].items():
+ deps[name]._dependencies[dep_name] = \
+ DependencySpec(deps[dep_name], deptypes)
return spec
def _concretize_helper(self, presets=None, visited=None):
@@ -940,8 +1040,9 @@ class Spec(object):
changed = False
# Concretize deps first -- this is a bottom-up process.
- for name in sorted(self.dependencies.keys()):
- changed |= self.dependencies[name]._concretize_helper(presets, visited)
+ for name in sorted(self._dependencies.keys()):
+ changed |= self._dependencies[
+ name].spec._concretize_helper(presets, visited)
if self.name in presets:
changed |= self.constrain(presets[self.name])
@@ -965,13 +1066,16 @@ class Spec(object):
def _replace_with(self, concrete):
"""Replace this virtual spec with a concrete spec."""
assert(self.virtual)
- for name, dependent in self.dependents.items():
+ for name, dep_spec in self._dependents.items():
+ dependent = dep_spec.spec
+ deptypes = dep_spec.deptypes
+
# remove self from all dependents.
- del dependent.dependencies[self.name]
+ del dependent._dependencies[self.name]
# add the replacement, unless it is already a dep of dependent.
- if concrete.name not in dependent.dependencies:
- dependent._add_dependency(concrete)
+ if concrete.name not in dependent._dependencies:
+ dependent._add_dependency(concrete, deptypes)
def _replace_node(self, replacement):
"""Replace this spec with another.
@@ -982,13 +1086,15 @@ class Spec(object):
to be normalized.
"""
- for name, dependent in self.dependents.items():
- del dependent.dependencies[self.name]
- dependent._add_dependency(replacement)
+ for name, dep_spec in self._dependents.items():
+ dependent = dep_spec.spec
+ deptypes = dep_spec.deptypes
+ del dependent._dependencies[self.name]
+ dependent._add_dependency(replacement, deptypes)
- for name, dep in self.dependencies.items():
- del dep.dependents[self.name]
- del self.dependencies[dep.name]
+ for name, dep_spec in self._dependencies.items():
+ del dep_spec.spec.dependents[self.name]
+ del self._dependencies[dep.name]
def _expand_virtual_packages(self):
"""Find virtual packages in this spec, replace them with providers,
@@ -1008,13 +1114,14 @@ class Spec(object):
a problem.
"""
# Make an index of stuff this spec already provides
+ # XXX(deptype): 'link' and 'run'?
self_index = ProviderIndex(self.traverse(), restrict=True)
changed = False
done = False
while not done:
done = True
-
+ # XXX(deptype): 'link' and 'run'?
for spec in list(self.traverse()):
replacement = None
if spec.virtual:
@@ -1054,10 +1161,10 @@ class Spec(object):
# If replacement is external then trim the dependencies
if replacement.external or replacement.external_module:
- if (spec.dependencies):
+ if (spec._dependencies):
changed = True
- spec.dependencies = DependencyMap()
- replacement.dependencies = DependencyMap()
+ spec._dependencies = DependencyMap()
+ replacement._dependencies = DependencyMap()
replacement.architecture = self.architecture
# TODO: could this and the stuff in _dup be cleaned up?
@@ -1068,7 +1175,7 @@ class Spec(object):
feq(replacement.versions, spec.versions) and
feq(replacement.compiler, spec.compiler) and
feq(replacement.architecture, spec.architecture) and
- feq(replacement.dependencies, spec.dependencies) and
+ feq(replacement._dependencies, spec._dependencies) and
feq(replacement.variants, spec.variants) and
feq(replacement.external, spec.external) and
feq(replacement.external_module, spec.external_module)):
@@ -1116,7 +1223,7 @@ class Spec(object):
changed = any(changes)
force = True
- for s in self.traverse():
+ for s in self.traverse(deptype_query=alldeps):
# After concretizing, assign namespaces to anything left.
# Note that this doesn't count as a "change". The repository
# configuration is constant throughout a spack run, and
@@ -1146,7 +1253,7 @@ class Spec(object):
Only for internal use -- client code should use "concretize"
unless there is a need to force a spec to be concrete.
"""
- for s in self.traverse():
+ for s in self.traverse(deptype_query=alldeps):
s._normal = True
s._concrete = True
@@ -1159,6 +1266,13 @@ class Spec(object):
return clone
def flat_dependencies(self, **kwargs):
+ flat_deps = DependencyMap()
+ flat_deps_deptypes = self.flat_dependencies_with_deptype(**kwargs)
+ for name, depspec in flat_deps_deptypes.items():
+ flat_deps[name] = depspec.spec
+ return flat_deps
+
+ def flat_dependencies_with_deptype(self, **kwargs):
"""Return a DependencyMap containing all of this spec's
dependencies with their constraints merged.
@@ -1169,23 +1283,31 @@ class Spec(object):
returns them.
"""
copy = kwargs.get('copy', True)
+ deptype_query = kwargs.get('deptype_query')
flat_deps = DependencyMap()
try:
- for spec in self.traverse(root=False):
+ deptree = self.traverse_with_deptype(root=False,
+ deptype_query=deptype_query)
+ for depspec in deptree:
+ spec = depspec.spec
+ deptypes = depspec.deptypes
+
if spec.name not in flat_deps:
if copy:
- flat_deps[spec.name] = spec.copy(deps=False)
+ dep_spec = DependencySpec(spec.copy(deps=False),
+ deptypes)
else:
- flat_deps[spec.name] = spec
+ dep_spec = DependencySpec(spec, deptypes)
+ flat_deps[spec.name] = dep_spec
else:
- flat_deps[spec.name].constrain(spec)
+ flat_deps[spec.name].spec.constrain(spec)
if not copy:
- for dep in flat_deps.values():
- dep.dependencies.clear()
- dep.dependents.clear()
- self.dependencies.clear()
+ for depspec in flat_deps.values():
+ depspec.spec._dependencies.clear()
+ depspec.spec._dependents.clear()
+ self._dependencies.clear()
return flat_deps
@@ -1200,17 +1322,11 @@ class Spec(object):
"""Return DependencyMap that points to all the dependencies in this
spec."""
dm = DependencyMap()
+ # XXX(deptype): use a deptype kwarg.
for spec in self.traverse():
dm[spec.name] = spec
return dm
- def flatten(self):
- """Pull all dependencies up to the root (this spec).
- Merge constraints for dependencies with the same name, and if they
- conflict, throw an exception. """
- for dep in self.flat_dependencies(copy=False):
- self._add_dependency(dep)
-
def _evaluate_dependency_conditions(self, name):
"""Evaluate all the conditions on a dependency with this name.
@@ -1267,7 +1383,8 @@ class Spec(object):
elif required:
raise UnsatisfiableProviderSpecError(required[0], vdep)
- def _merge_dependency(self, dep, visited, spec_deps, provider_index):
+ def _merge_dependency(self, dep, deptypes, visited, spec_deps,
+ provider_index):
"""Merge the dependency into this spec.
This is the core of normalize(). There are some basic steps:
@@ -1294,7 +1411,9 @@ class Spec(object):
dep = provider
else:
index = ProviderIndex([dep], restrict=True)
- for vspec in (v for v in spec_deps.values() if v.virtual):
+ for vspec in (v.spec
+ for v in spec_deps.values()
+ if v.spec.virtual):
if index.providers_for(vspec):
vspec._replace_with(dep)
del spec_deps[vspec.name]
@@ -1307,25 +1426,25 @@ class Spec(object):
# If the spec isn't already in the set of dependencies, clone
# it from the package description.
if dep.name not in spec_deps:
- spec_deps[dep.name] = dep.copy()
+ spec_deps[dep.name] = DependencySpec(dep.copy(), deptypes)
changed = True
# Constrain package information with spec info
try:
- changed |= spec_deps[dep.name].constrain(dep)
+ changed |= spec_deps[dep.name].spec.constrain(dep)
except UnsatisfiableSpecError, e:
e.message = "Invalid spec: '%s'. "
e.message += "Package %s requires %s %s, but spec asked for %s"
- e.message %= (spec_deps[dep.name], dep.name, e.constraint_type,
- e.required, e.provided)
+ e.message %= (spec_deps[dep.name].spec, dep.name,
+ e.constraint_type, e.required, e.provided)
raise e
# Add merged spec to my deps and recurse
dependency = spec_deps[dep.name]
- if dep.name not in self.dependencies:
- self._add_dependency(dependency)
+ if dep.name not in self._dependencies:
+ self._add_dependency(dependency.spec, dependency.deptypes)
- changed |= dependency._normalize_helper(
+ changed |= dependency.spec._normalize_helper(
visited, spec_deps, provider_index)
return changed
@@ -1351,10 +1470,11 @@ class Spec(object):
for dep_name in pkg.dependencies:
# Do we depend on dep_name? If so pkg_dep is not None.
pkg_dep = self._evaluate_dependency_conditions(dep_name)
+ deptypes = pkg._deptypes[dep_name]
# If pkg_dep is a dependency, merge it.
if pkg_dep:
changed |= self._merge_dependency(
- pkg_dep, visited, spec_deps, provider_index)
+ pkg_dep, deptypes, visited, spec_deps, provider_index)
any_change |= changed
return any_change
@@ -1385,11 +1505,13 @@ class Spec(object):
# Ensure first that all packages & compilers in the DAG exist.
self.validate_names()
# Get all the dependencies into one DependencyMap
- spec_deps = self.flat_dependencies(copy=False)
+ spec_deps = self.flat_dependencies_with_deptype(copy=False,
+ deptype_query=alldeps)
# Initialize index of virtual dependency providers if
# concretize didn't pass us one already
- provider_index = ProviderIndex(spec_deps.values(), restrict=True)
+ provider_index = ProviderIndex([s.spec for s in spec_deps.values()],
+ restrict=True)
# traverse the package DAG and fill out dependencies according
# to package files & their 'when' specs
@@ -1510,7 +1632,7 @@ class Spec(object):
"""Apply constraints of other spec's dependencies to this spec."""
other = self._autospec(other)
- if not self.dependencies or not other.dependencies:
+ if not self._dependencies or not other._dependencies:
return False
# TODO: might want more detail than this, e.g. specific deps
@@ -1526,13 +1648,17 @@ class Spec(object):
# Update with additional constraints from other spec
for name in other.dep_difference(self):
- self._add_dependency(other[name].copy())
+ dep_spec_copy = other.get_dependency(name)
+ dep_copy = dep_spec_copy.spec
+ deptypes = dep_spec_copy.deptypes
+ self._add_dependency(dep_copy.copy(), deptypes)
changed = True
return changed
def common_dependencies(self, other):
"""Return names of dependencies that self an other have in common."""
+ # XXX(deptype): handle deptypes via deptype kwarg.
common = set(
s.name for s in self.traverse(root=False))
common.intersection_update(
@@ -1657,13 +1783,14 @@ class Spec(object):
other = self._autospec(other)
if strict:
- if other.dependencies and not self.dependencies:
+ if other._dependencies and not self._dependencies:
return False
- if not all(dep in self.dependencies for dep in other.dependencies):
+ if not all(dep in self._dependencies
+ for dep in other._dependencies):
return False
- elif not self.dependencies or not other.dependencies:
+ elif not self._dependencies or not other._dependencies:
# if either spec doesn't restrict dependencies then both are
# compatible.
return True
@@ -1726,8 +1853,8 @@ class Spec(object):
self.architecture = other.architecture
self.compiler = other.compiler.copy() if other.compiler else None
if kwargs.get('cleardeps', True):
- self.dependents = DependencyMap()
- self.dependencies = DependencyMap()
+ self._dependents = DependencyMap()
+ self._dependencies = DependencyMap()
self.compiler_flags = other.compiler_flags.copy()
self.variants = other.variants.copy()
self.variants.spec = self
@@ -1739,15 +1866,30 @@ class Spec(object):
# If we copy dependencies, preserve DAG structure in the new spec
if kwargs.get('deps', True):
# This copies the deps from other using _dup(deps=False)
- new_nodes = other.flat_dependencies()
+ # XXX(deptype): We can keep different instances of specs here iff
+ # it is only a 'build' dependency (from its parent).
+ # All other instances must be shared (due to symbol
+ # and PATH contention). These should probably search
+ # for any existing installation which can satisfy the
+ # build and latch onto that because if 3 things need
+ # the same build dependency and it is *not*
+ # available, we only want to build it once.
+ new_nodes = other.flat_dependencies(deptype_query=alldeps)
new_nodes[self.name] = self
- # Hook everything up properly here by traversing.
- for spec in other.traverse(cover='nodes'):
- parent = new_nodes[spec.name]
- for child in spec.dependencies:
- if child not in parent.dependencies:
- parent._add_dependency(new_nodes[child])
+ stack = [other]
+ while stack:
+ cur_spec = stack.pop(0)
+ new_spec = new_nodes[cur_spec.name]
+
+ for depspec in cur_spec._dependencies.values():
+ stack.append(depspec.spec)
+
+ # XXX(deptype): add any new deptypes that may have appeared
+ # here.
+ if depspec.spec.name not in new_spec._dependencies:
+ new_spec._add_dependency(
+ new_nodes[depspec.spec.name], depspec.deptypes)
# Since we preserved structure, we can copy _normal safely.
self._normal = other._normal
@@ -1790,7 +1932,7 @@ class Spec(object):
raise KeyError("No spec with name %s in %s" % (name, self))
def __contains__(self, spec):
- """True if this spec satisfis the provided spec, or if any dependency
+ """True if this spec satisfies the provided spec, or if any dependency
does. If the spec has no name, then we parse this one first.
"""
spec = self._autospec(spec)
@@ -1814,13 +1956,13 @@ class Spec(object):
if self.ne_node(other):
return False
- if len(self.dependencies) != len(other.dependencies):
+ if len(self._dependencies) != len(other._dependencies):
return False
- ssorted = [self.dependencies[name]
- for name in sorted(self.dependencies)]
- osorted = [other.dependencies[name]
- for name in sorted(other.dependencies)]
+ ssorted = [self._dependencies[name].spec
+ for name in sorted(self._dependencies)]
+ osorted = [other._dependencies[name].spec
+ for name in sorted(other._dependencies)]
for s, o in zip(ssorted, osorted):
visited_s = id(s) in vs
@@ -1874,9 +2016,10 @@ class Spec(object):
1. A tuple describing this node in the DAG.
2. The hash of each of this node's dependencies' cmp_keys.
"""
+ dep_dict = self.dependencies_dict(deptype=('link', 'run'))
return self._cmp_node() + (
- tuple(hash(self.dependencies[name])
- for name in sorted(self.dependencies)),)
+ tuple(hash(dep_dict[name])
+ for name in sorted(dep_dict)),)
def colorized(self):
return colorize_spec(self)
@@ -2081,8 +2224,8 @@ class Spec(object):
self.architecture, other.architecture)
#Dependency is not configurable
- if self.dependencies != other.dependencies:
- return -1 if self.dependencies < other.dependencies else 1
+ if self._dependencies != other._dependencies:
+ return -1 if self._dependencies < other._dependencies else 1
#Equal specs
return 0
@@ -2196,10 +2339,13 @@ class SpecParser(spack.parse.Parser):
specs.append(self.spec(None))
self.previous = None
if self.accept(HASH):
- specs[-1]._add_dependency(self.spec_by_hash())
+ dep = self.spec_by_hash()
else:
self.expect(ID)
- specs[-1]._add_dependency(self.spec(self.token.value))
+ dep = self.spec(self.token.value)
+ # XXX(deptype): default deptypes
+ def_deptypes = ('build', 'link')
+ specs[-1]._add_dependency(dep, def_deptypes)
else:
# Attempt to construct an anonymous spec, but check that
@@ -2263,8 +2409,8 @@ class SpecParser(spack.parse.Parser):
spec.external = None
spec.external_module = None
spec.compiler_flags = FlagMap(spec)
- spec.dependents = DependencyMap()
- spec.dependencies = DependencyMap()
+ spec._dependents = DependencyMap()
+ spec._dependencies = DependencyMap()
spec.namespace = spec_namespace
spec._hash = None
diff --git a/lib/spack/spack/test/cmd/test_install.py b/lib/spack/spack/test/cmd/test_install.py
index d17e013ed2..a94d3c8bba 100644
--- a/lib/spack/spack/test/cmd/test_install.py
+++ b/lib/spack/spack/test/cmd/test_install.py
@@ -58,16 +58,39 @@ test_install = __import__("spack.cmd.test-install", fromlist=['test_install'])
class MockSpec(object):
def __init__(self, name, version, hashStr=None):
- self.dependencies = {}
+ self._dependencies = {}
self.name = name
self.version = version
self.hash = hashStr if hashStr else hash((name, version))
+ def _deptype_norm(self, deptype):
+ if deptype is None:
+ return spack.alldeps
+ # Force deptype to be a tuple so that we can do set intersections.
+ if isinstance(deptype, str):
+ return (deptype,)
+ return deptype
+
+ def _find_deps(self, where, deptype):
+ deptype = self._deptype_norm(deptype)
+
+ return [dep.spec
+ for dep in where.values()
+ if deptype and any(d in deptype for d in dep.deptypes)]
+
+ def dependencies(self, deptype=None):
+ return self._find_deps(self._dependencies, deptype)
+
+ def dependents(self, deptype=None):
+ return self._find_deps(self._dependents, deptype)
+
def traverse(self, order=None):
- for _, spec in self.dependencies.items():
- yield spec
+ for _, spec in self._dependencies.items():
+ yield spec.spec
yield self
- #allDeps = itertools.chain.from_iterable(i.traverse() for i in self.dependencies.itervalues())
+ #from_iterable = itertools.chain.from_iterable
+ #allDeps = from_iterable(i.traverse()
+ # for i in self.dependencies())
#return set(itertools.chain([self], allDeps))
def dag_hash(self):
@@ -104,7 +127,7 @@ def mock_fetch_log(path):
specX = MockSpec('X', "1.2.0")
specY = MockSpec('Y', "2.3.8")
-specX.dependencies['Y'] = specY
+specX._dependencies['Y'] = spack.DependencySpec(specY, spack.alldeps)
pkgX = MockPackage(specX, 'logX')
pkgY = MockPackage(specY, 'logY')
diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index ce02b08bc3..ae3ceecfc8 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -197,32 +197,36 @@ class ConcretizeTest(MockPackagesTest):
def test_virtual_is_fully_expanded_for_callpath(self):
# force dependence on fake "zmpi" by asking for MPI 10.0
spec = Spec('callpath ^mpi@10.0')
- self.assertTrue('mpi' in spec.dependencies)
+ self.assertTrue('mpi' in spec._dependencies)
self.assertFalse('fake' in spec)
spec.concretize()
- self.assertTrue('zmpi' in spec.dependencies)
- self.assertTrue(all(not 'mpi' in d.dependencies for d in spec.traverse()))
+ self.assertTrue('zmpi' in spec._dependencies)
+ self.assertTrue(all('mpi' not in d._dependencies
+ for d in spec.traverse()))
self.assertTrue('zmpi' in spec)
self.assertTrue('mpi' in spec)
- self.assertTrue('fake' in spec.dependencies['zmpi'])
+ self.assertTrue('fake' in spec._dependencies['zmpi'].spec)
def test_virtual_is_fully_expanded_for_mpileaks(self):
spec = Spec('mpileaks ^mpi@10.0')
- self.assertTrue('mpi' in spec.dependencies)
+ self.assertTrue('mpi' in spec._dependencies)
self.assertFalse('fake' in spec)
spec.concretize()
- self.assertTrue('zmpi' in spec.dependencies)
- self.assertTrue('callpath' in spec.dependencies)
- self.assertTrue('zmpi' in spec.dependencies['callpath'].dependencies)
- self.assertTrue('fake' in spec.dependencies['callpath'].dependencies['zmpi'].dependencies)
+ self.assertTrue('zmpi' in spec._dependencies)
+ self.assertTrue('callpath' in spec._dependencies)
+ self.assertTrue('zmpi' in spec._dependencies['callpath'].
+ spec._dependencies)
+ self.assertTrue('fake' in spec._dependencies['callpath'].
+ spec._dependencies['zmpi'].
+ spec._dependencies)
- self.assertTrue(all(not 'mpi' in d.dependencies for d in spec.traverse()))
+ self.assertTrue(all(not 'mpi' in d._dependencies for d in spec.traverse()))
self.assertTrue('zmpi' in spec)
self.assertTrue('mpi' in spec)
diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py
index e1acc32cb7..9d96622a6e 100644
--- a/lib/spack/spack/test/mock_packages_test.py
+++ b/lib/spack/spack/test/mock_packages_test.py
@@ -84,15 +84,6 @@ compilers:
modules: 'None'
- compiler:
spec: clang@3.3
- operating_system: redhat6
- paths:
- cc: /path/to/clang
- cxx: /path/to/clang++
- f77: None
- fc: None
- modules: 'None'
-- compiler:
- spec: clang@3.3
operating_system: yosemite
paths:
cc: /path/to/clang
@@ -124,15 +115,6 @@ compilers:
cxx: /path/to/g++
f77: /path/to/gfortran
fc: /path/to/gfortran
- operating_system: redhat6
- spec: gcc@4.5.0
- modules: 'None'
-- compiler:
- paths:
- cc: /path/to/gcc
- cxx: /path/to/g++
- f77: /path/to/gfortran
- fc: /path/to/gfortran
operating_system: yosemite
spec: gcc@4.5.0
modules: 'None'
@@ -209,8 +191,7 @@ class MockPackagesTest(unittest.TestCase):
# restore later.
self.saved_deps = {}
-
- def set_pkg_dep(self, pkg_name, spec):
+ def set_pkg_dep(self, pkg_name, spec, deptypes=spack.alldeps):
"""Alters dependence information for a package.
Adds a dependency on <spec> to pkg.
@@ -224,7 +205,9 @@ class MockPackagesTest(unittest.TestCase):
self.saved_deps[pkg_name] = (pkg, pkg.dependencies.copy())
# Change dep spec
- pkg.dependencies[spec.name] = { Spec(pkg_name) : spec }
+ # XXX(deptype): handle deptypes.
+ pkg.dependencies[spec.name] = {Spec(pkg_name): spec}
+ pkg._deptypes[spec.name] = set(deptypes)
def cleanmock(self):
@@ -234,6 +217,7 @@ class MockPackagesTest(unittest.TestCase):
shutil.rmtree(self.temp_config, ignore_errors=True)
spack.config.clear_config_caches()
+ # XXX(deptype): handle deptypes.
# Restore dependency changes that happened during the test
for pkg_name, (pkg, deps) in self.saved_deps.items():
pkg.dependencies.clear()
diff --git a/lib/spack/spack/test/mock_repo.py b/lib/spack/spack/test/mock_repo.py
index a8098b8eec..386af282e7 100644
--- a/lib/spack/spack/test/mock_repo.py
+++ b/lib/spack/spack/test/mock_repo.py
@@ -103,6 +103,8 @@ class MockGitRepo(MockVCSRepo):
def __init__(self):
super(MockGitRepo, self).__init__('mock-git-stage', 'mock-git-repo')
+ self.url = 'file://' + self.path
+
with working_dir(self.path):
git('init')
@@ -140,8 +142,6 @@ class MockGitRepo(MockVCSRepo):
self.r1 = self.rev_hash(self.branch)
self.r1_file = self.branch_file
- self.url = self.path
-
def rev_hash(self, rev):
return git('rev-parse', rev, output=str).strip()
diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py
index c56c70b1fe..972e79aa20 100644
--- a/lib/spack/spack/test/spec_dag.py
+++ b/lib/spack/spack/test/spec_dag.py
@@ -148,10 +148,12 @@ class SpecDagTest(MockPackagesTest):
# Normalize then add conflicting constraints to the DAG (this is an
# extremely unlikely scenario, but we test for it anyway)
mpileaks.normalize()
- mpileaks.dependencies['mpich'] = Spec('mpich@1.0')
- mpileaks.dependencies['callpath'].dependencies['mpich'] = Spec('mpich@2.0')
+ mpileaks._dependencies['mpich'].spec = Spec('mpich@1.0')
+ mpileaks._dependencies['callpath']. \
+ spec._dependencies['mpich'].spec = Spec('mpich@2.0')
- self.assertRaises(spack.spec.InconsistentSpecError, mpileaks.flatten)
+ self.assertRaises(spack.spec.InconsistentSpecError,
+ lambda: mpileaks.flat_dependencies(copy=False))
def test_normalize_twice(self):
@@ -197,15 +199,17 @@ class SpecDagTest(MockPackagesTest):
def check_links(self, spec_to_check):
for spec in spec_to_check.traverse():
- for dependent in spec.dependents.values():
+ for dependent in spec.dependents():
self.assertTrue(
- spec.name in dependent.dependencies,
- "%s not in dependencies of %s" % (spec.name, dependent.name))
+ spec.name in dependent.dependencies_dict(),
+ "%s not in dependencies of %s" %
+ (spec.name, dependent.name))
- for dependency in spec.dependencies.values():
+ for dependency in spec.dependencies():
self.assertTrue(
- spec.name in dependency.dependents,
- "%s not in dependents of %s" % (spec.name, dependency.name))
+ spec.name in dependency.dependents_dict(),
+ "%s not in dependents of %s" %
+ (spec.name, dependency.name))
def test_dependents_and_dependencies_are_correct(self):
@@ -442,3 +446,69 @@ class SpecDagTest(MockPackagesTest):
orig_ids = set(id(s) for s in orig.traverse())
copy_ids = set(id(s) for s in copy.traverse())
self.assertFalse(orig_ids.intersection(copy_ids))
+
+ """
+ Here is the graph with deptypes labeled (assume all packages have a 'dt'
+ prefix). Arrows are marked with the deptypes ('b' for 'build', 'l' for
+ 'link', 'r' for 'run').
+
+ use -bl-> top
+
+ top -b-> build1
+ top -bl-> link1
+ top -r-> run1
+
+ build1 -b-> build2
+ build1 -bl-> link2
+ build1 -r-> run2
+
+ link1 -bl-> link3
+
+ run1 -bl-> link5
+ run1 -r-> run3
+
+ link3 -b-> build2
+ link3 -bl-> link4
+
+ run3 -b-> build3
+ """
+ def test_deptype_traversal(self):
+ dag = Spec('dtuse')
+ dag.normalize()
+
+ names = ['dtuse', 'dttop', 'dtlink1', 'dtlink3', 'dtlink4',
+ 'dtrun1', 'dtlink5', 'dtrun3']
+
+ traversal = dag.traverse()
+ self.assertEqual([x.name for x in traversal], names)
+
+ def test_deptype_traversal_with_builddeps(self):
+ dag = Spec('dttop')
+ dag.normalize()
+
+ names = ['dttop', 'dtbuild1', 'dtlink2', 'dtrun2', 'dtlink1',
+ 'dtlink3', 'dtlink4', 'dtrun1', 'dtlink5', 'dtrun3']
+
+ traversal = dag.traverse()
+ self.assertEqual([x.name for x in traversal], names)
+
+ def test_deptype_traversal_full(self):
+ dag = Spec('dttop')
+ dag.normalize()
+
+ names = ['dttop', 'dtbuild1', 'dtbuild2', 'dtlink2', 'dtrun2',
+ 'dtlink1', 'dtlink3', 'dtlink4', 'dtrun1', 'dtlink5',
+ 'dtrun3', 'dtbuild3']
+
+ traversal = dag.traverse(deptype_query=spack.alldeps)
+ self.assertEqual([x.name for x in traversal], names)
+
+ def test_deptype_traversal_pythonpath(self):
+ dag = Spec('dttop')
+ dag.normalize()
+
+ names = ['dttop', 'dtbuild1', 'dtrun2', 'dtlink1', 'dtrun1',
+ 'dtrun3']
+
+ traversal = dag.traverse(deptype=spack.nolink, deptype_query='run')
+ self.assertEqual([x.name for x in traversal], names)
diff --git a/lib/spack/spack/test/stage.py b/lib/spack/spack/test/stage.py
index 6d8c3ac67c..d3e3bf1383 100644
--- a/lib/spack/spack/test/stage.py
+++ b/lib/spack/spack/test/stage.py
@@ -35,8 +35,8 @@ from llnl.util.filesystem import *
from spack.stage import Stage
from spack.util.executable import which
-test_files_dir = join_path(spack.stage_path, '.test')
-test_tmp_path = join_path(test_files_dir, 'tmp')
+test_files_dir = os.path.realpath(join_path(spack.stage_path, '.test'))
+test_tmp_path = os.path.realpath(join_path(test_files_dir, 'tmp'))
archive_dir = 'test-files'
archive_name = archive_dir + '.tar.gz'
diff --git a/lib/spack/spack/test/versions.py b/lib/spack/spack/test/versions.py
index 4624f901c8..41d72e7c34 100644
--- a/lib/spack/spack/test/versions.py
+++ b/lib/spack/spack/test/versions.py
@@ -92,6 +92,9 @@ class VersionsTest(unittest.TestCase):
self.assert_ver_eq('1.0', '1.0')
self.assert_ver_lt('1.0', '2.0')
self.assert_ver_gt('2.0', '1.0')
+ self.assert_ver_eq('develop', 'develop')
+ self.assert_ver_lt('1.0', 'develop')
+ self.assert_ver_gt('develop', '1.0')
def test_three_segments(self):
self.assert_ver_eq('2.0.1', '2.0.1')
@@ -389,3 +392,39 @@ class VersionsTest(unittest.TestCase):
self.assertEqual(v.dotted, '1.2.3')
self.assertEqual(v.dashed, '1-2-3')
self.assertEqual(v.underscored, '1_2_3')
+
+ def test_repr_and_str(self):
+
+ def check_repr_and_str(vrs):
+ a = Version(vrs)
+ self.assertEqual(repr(a), 'Version(\'' + vrs + '\')')
+ b = eval(repr(a))
+ self.assertEqual(a, b)
+ self.assertEqual(str(a), vrs)
+ self.assertEqual(str(a), str(b))
+
+ check_repr_and_str('1.2.3')
+ check_repr_and_str('R2016a')
+ check_repr_and_str('R2016a.2-3_4')
+
+ def test_get_item(self):
+ a = Version('0.1_2-3')
+ self.assertTrue(isinstance(a[1], int))
+ # Test slicing
+ b = a[0:2]
+ self.assertTrue(isinstance(b, Version))
+ self.assertEqual(b, Version('0.1'))
+ self.assertEqual(repr(b), 'Version(\'0.1\')')
+ self.assertEqual(str(b), '0.1')
+ b = a[0:3]
+ self.assertTrue(isinstance(b, Version))
+ self.assertEqual(b, Version('0.1_2'))
+ self.assertEqual(repr(b), 'Version(\'0.1_2\')')
+ self.assertEqual(str(b), '0.1_2')
+ b = a[1:]
+ self.assertTrue(isinstance(b, Version))
+ self.assertEqual(b, Version('1_2-3'))
+ self.assertEqual(repr(b), 'Version(\'1_2-3\')')
+ self.assertEqual(str(b), '1_2-3')
+ # Raise TypeError on tuples
+ self.assertRaises(TypeError, b.__getitem__, 1, 2)
diff --git a/lib/spack/spack/version.py b/lib/spack/spack/version.py
index 858d581472..6f6c83b3d8 100644
--- a/lib/spack/spack/version.py
+++ b/lib/spack/spack/version.py
@@ -44,6 +44,7 @@ be called on any of the types::
concrete
"""
import re
+import numbers
from bisect import bisect_left
from functools import wraps
@@ -194,10 +195,24 @@ class Version(object):
return iter(self.version)
def __getitem__(self, idx):
- return tuple(self.version[idx])
+ cls = type(self)
+ if isinstance(idx, numbers.Integral):
+ return self.version[idx]
+ elif isinstance(idx, slice):
+ # Currently len(self.separators) == len(self.version) - 1
+ extendend_separators = self.separators + ('',)
+ string_arg = []
+ for token, sep in zip(self.version, extendend_separators)[idx]:
+ string_arg.append(str(token))
+ string_arg.append(str(sep))
+ string_arg.pop() # We don't need the last separator
+ string_arg = ''.join(string_arg)
+ return cls(string_arg)
+ message = '{cls.__name__} indices must be integers'
+ raise TypeError(message.format(cls=cls))
def __repr__(self):
- return self.string
+ return 'Version(' + repr(self.string) + ')'
def __str__(self):
return self.string
@@ -221,6 +236,14 @@ class Version(object):
if self.version == other.version:
return False
+ # dev is __gt__ than anything but itself.
+ if other.string == 'develop':
+ return True
+
+ # If lhs is dev then it can't be < than anything
+ if self.string == 'develop':
+ return False
+
for a, b in zip(self.version, other.version):
if a == b:
continue
diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8
index 57534eb6e2..595df417ec 100755
--- a/share/spack/qa/run-flake8
+++ b/share/spack/qa/run-flake8
@@ -18,7 +18,7 @@ if [[ ! $flake8 ]]; then
fi
# Check if changed files are flake8 conformant [framework]
-changed=$(git diff --name-only develop... | grep '.py$')
+changed=$(git diff --name-only --find-renames develop... | grep '.py$')
# Add approved style exemptions to the changed packages.
for file in $changed; do
@@ -26,6 +26,7 @@ for file in $changed; do
cp "$file" "$file~"
# Exempt lines with urls and descriptions from overlong line errors.
+ perl -i -pe 's/^(\s*homepage\s*=.*)$/\1 # NOQA: ignore=E501/' $file
perl -i -pe 's/^(\s*url\s*=.*)$/\1 # NOQA: ignore=E501/' $file
perl -i -pe 's/^(\s*version\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
perl -i -pe 's/^(\s*variant\(.*\).*)$/\1 # NOQA: ignore=E501/' $file
diff --git a/var/spack/repos/builtin.mock/packages/cmake-client/package.py b/var/spack/repos/builtin.mock/packages/cmake-client/package.py
index 355689a2d2..c58430317a 100644
--- a/var/spack/repos/builtin.mock/packages/cmake-client/package.py
+++ b/var/spack/repos/builtin.mock/packages/cmake-client/package.py
@@ -38,7 +38,7 @@ class CmakeClient(Package):
version('1.0', '4cb3ff35b2472aae70f542116d616e63')
- depends_on('cmake')
+ depends_on('cmake', type='build')
def setup_environment(self, spack_env, run_env):
diff --git a/var/spack/repos/builtin.mock/packages/dtbuild1/package.py b/var/spack/repos/builtin.mock/packages/dtbuild1/package.py
new file mode 100644
index 0000000000..7429b2a8ef
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtbuild1/package.py
@@ -0,0 +1,18 @@
+from spack import *
+
+
+class Dtbuild1(Package):
+ """Package for use as a build tool for deptypes testing which has its own
+ deptree"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtbuild1-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ depends_on('dtbuild2', type='build')
+ depends_on('dtlink2')
+ depends_on('dtrun2', type='run')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dtbuild2/package.py b/var/spack/repos/builtin.mock/packages/dtbuild2/package.py
new file mode 100644
index 0000000000..cf3bb82a10
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtbuild2/package.py
@@ -0,0 +1,13 @@
+from spack import *
+
+
+class Dtbuild2(Package):
+ """Simple package which acts as a build dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtbuild2-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dtbuild3/package.py b/var/spack/repos/builtin.mock/packages/dtbuild3/package.py
new file mode 100644
index 0000000000..6ba7e69a41
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtbuild3/package.py
@@ -0,0 +1,13 @@
+from spack import *
+
+
+class Dtbuild3(Package):
+ """Simple package which acts as a build dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtbuild3-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dtlink1/package.py b/var/spack/repos/builtin.mock/packages/dtlink1/package.py
new file mode 100644
index 0000000000..2747dcf354
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtlink1/package.py
@@ -0,0 +1,15 @@
+from spack import *
+
+
+class Dtlink1(Package):
+ """Simple package which acts as a link dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtlink1-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ depends_on('dtlink3')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dtlink2/package.py b/var/spack/repos/builtin.mock/packages/dtlink2/package.py
new file mode 100644
index 0000000000..b80bad053f
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtlink2/package.py
@@ -0,0 +1,13 @@
+from spack import *
+
+
+class Dtlink2(Package):
+ """Simple package which acts as a link dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtlink2-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dtlink3/package.py b/var/spack/repos/builtin.mock/packages/dtlink3/package.py
new file mode 100644
index 0000000000..bee8b4b8f8
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtlink3/package.py
@@ -0,0 +1,16 @@
+from spack import *
+
+
+class Dtlink3(Package):
+ """Simple package which acts as a link dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtlink3-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ depends_on('dtbuild2', type='build')
+ depends_on('dtlink4')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dtlink4/package.py b/var/spack/repos/builtin.mock/packages/dtlink4/package.py
new file mode 100644
index 0000000000..3f05d5c0d6
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtlink4/package.py
@@ -0,0 +1,13 @@
+from spack import *
+
+
+class Dtlink4(Package):
+ """Simple package which acts as a link dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtlink4-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dtlink5/package.py b/var/spack/repos/builtin.mock/packages/dtlink5/package.py
new file mode 100644
index 0000000000..c8b1e97d37
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtlink5/package.py
@@ -0,0 +1,13 @@
+from spack import *
+
+
+class Dtlink5(Package):
+ """Simple package which acts as a link dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtlink5-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dtrun1/package.py b/var/spack/repos/builtin.mock/packages/dtrun1/package.py
new file mode 100644
index 0000000000..fb33b9b2f2
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtrun1/package.py
@@ -0,0 +1,16 @@
+from spack import *
+
+
+class Dtrun1(Package):
+ """Simple package which acts as a run dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtrun1-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ depends_on('dtlink5')
+ depends_on('dtrun3', type='run')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dtrun2/package.py b/var/spack/repos/builtin.mock/packages/dtrun2/package.py
new file mode 100644
index 0000000000..e5d4b5e0b4
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtrun2/package.py
@@ -0,0 +1,13 @@
+from spack import *
+
+
+class Dtrun2(Package):
+ """Simple package which acts as a run dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtrun2-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dtrun3/package.py b/var/spack/repos/builtin.mock/packages/dtrun3/package.py
new file mode 100644
index 0000000000..70dacf45ff
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtrun3/package.py
@@ -0,0 +1,15 @@
+from spack import *
+
+
+class Dtrun3(Package):
+ """Simple package which acts as a run dependency"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtrun3-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ depends_on('dtbuild3', type='build')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dttop/package.py b/var/spack/repos/builtin.mock/packages/dttop/package.py
new file mode 100644
index 0000000000..202a3b6883
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dttop/package.py
@@ -0,0 +1,17 @@
+from spack import *
+
+
+class Dttop(Package):
+ """Package with a complicated dependency tree"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dttop-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ depends_on('dtbuild1', type='build')
+ depends_on('dtlink1')
+ depends_on('dtrun1', type='run')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin.mock/packages/dtuse/package.py b/var/spack/repos/builtin.mock/packages/dtuse/package.py
new file mode 100644
index 0000000000..bd7391cee8
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dtuse/package.py
@@ -0,0 +1,15 @@
+from spack import *
+
+
+class Dtuse(Package):
+ """Simple package which uses dttop"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/dtuse-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ depends_on('dttop')
+
+ def install(self, spec, prefix):
+ pass
diff --git a/var/spack/repos/builtin/packages/ImageMagick/package.py b/var/spack/repos/builtin/packages/ImageMagick/package.py
index f8173169e1..b0ccba1009 100644
--- a/var/spack/repos/builtin/packages/ImageMagick/package.py
+++ b/var/spack/repos/builtin/packages/ImageMagick/package.py
@@ -51,7 +51,7 @@ class Imagemagick(Package):
url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download")
depends_on('jpeg')
- depends_on('libtool')
+ depends_on('libtool', type='build')
depends_on('libpng')
depends_on('freetype')
depends_on('fontconfig')
diff --git a/var/spack/repos/builtin/packages/Mitos/package.py b/var/spack/repos/builtin/packages/Mitos/package.py
index 83aca3dc6a..d577a1b285 100644
--- a/var/spack/repos/builtin/packages/Mitos/package.py
+++ b/var/spack/repos/builtin/packages/Mitos/package.py
@@ -41,6 +41,7 @@ class Mitos(Package):
depends_on('dyninst@8.2.1:')
depends_on('hwloc')
depends_on('mpi')
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
with working_dir('spack-build', create=True):
diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py
index 001dde5329..11c5909efa 100644
--- a/var/spack/repos/builtin/packages/R/package.py
+++ b/var/spack/repos/builtin/packages/R/package.py
@@ -40,6 +40,7 @@ class R(Package):
extendable = True
+ version('3.3.1', 'f50a659738b73036e2f5635adbd229c5')
version('3.3.0', '5a7506c8813432d1621c9725e86baf7a')
version('3.2.3', '1ba3dac113efab69e706902810cc2970')
version('3.2.2', '57cef5c2e210a5454da1979562a10e5b')
@@ -87,6 +88,29 @@ class R(Package):
make()
make('install')
+ self.filter_compilers(spec, prefix)
+
+ def filter_compilers(self, spec, prefix):
+ """Run after install to tell the configuration files and Makefiles
+ to use the compilers that Spack built the package with.
+
+ If this isn't done, they'll have CC and CXX set to Spack's generic
+ cc and c++. We want them to be bound to whatever compiler
+ they were built with."""
+
+ etcdir = join_path(prefix, 'rlib', 'R', 'etc')
+
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
+
+ filter_file(env['CC'], self.compiler.cc,
+ join_path(etcdir, 'Makeconf'), **kwargs)
+ filter_file(env['CXX'], self.compiler.cxx,
+ join_path(etcdir, 'Makeconf'), **kwargs)
+ filter_file(env['F77'], self.compiler.f77,
+ join_path(etcdir, 'Makeconf'), **kwargs)
+ filter_file(env['FC'], self.compiler.fc,
+ join_path(etcdir, 'Makeconf'), **kwargs)
+
# ========================================================================
# Set up environment to make install easy for R extensions.
# ========================================================================
@@ -99,7 +123,7 @@ class R(Package):
# Set R_LIBS to include the library dir for the
# extension and any other R extensions it depends on.
r_libs_path = []
- for d in extension_spec.traverse():
+ for d in extension_spec.traverse(deptype=nolink, deptype_query='run'):
if d.package.extends(self.spec):
r_libs_path.append(os.path.join(d.prefix, self.r_lib_dir))
diff --git a/var/spack/repos/builtin/packages/adept-utils/package.py b/var/spack/repos/builtin/packages/adept-utils/package.py
index 7b6c3702af..592681bb82 100644
--- a/var/spack/repos/builtin/packages/adept-utils/package.py
+++ b/var/spack/repos/builtin/packages/adept-utils/package.py
@@ -35,6 +35,7 @@ class AdeptUtils(Package):
depends_on("boost")
depends_on("mpi")
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
cmake(*std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/apex/package.py b/var/spack/repos/builtin/packages/apex/package.py
index 20cbd8e8c6..59fbe50c93 100644
--- a/var/spack/repos/builtin/packages/apex/package.py
+++ b/var/spack/repos/builtin/packages/apex/package.py
@@ -33,7 +33,7 @@ class Apex(Package):
depends_on("binutils+libiberty")
depends_on("boost@1.54:")
- depends_on("cmake@2.8.12:")
+ depends_on('cmake@2.8.12:', type='build')
depends_on("activeharmony@4.5:")
depends_on("ompt-openmp")
diff --git a/var/spack/repos/builtin/packages/arpack-ng/make_install.patch b/var/spack/repos/builtin/packages/arpack-ng/make_install.patch
new file mode 100644
index 0000000000..ad5cffcc19
--- /dev/null
+++ b/var/spack/repos/builtin/packages/arpack-ng/make_install.patch
@@ -0,0 +1,24 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 607d221..50426c3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -389,3 +389,19 @@ target_link_libraries(bug_1323 arpack ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
+ add_test(bug_1323 Tests/bug_1323)
+
+ add_dependencies(check dnsimp_test bug_1315_single bug_1315_double bug_1323)
++
++############################
++# install
++############################
++# 'make install' to the correct location
++install(TARGETS arpack
++ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
++ RUNTIME DESTINATION bin)
++
++if (MPI)
++ install(TARGETS parpack
++ ARCHIVE DESTINATION lib
++ LIBRARY DESTINATION lib
++ RUNTIME DESTINATION bin)
++endif ()
diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py
index fcd5171a7d..d5dc703c06 100644
--- a/var/spack/repos/builtin/packages/arpack-ng/package.py
+++ b/var/spack/repos/builtin/packages/arpack-ng/package.py
@@ -27,7 +27,8 @@ from spack import *
class ArpackNg(Package):
"""
- ARPACK-NG is a collection of Fortran77 subroutines designed to solve large scale eigenvalue problems.
+ ARPACK-NG is a collection of Fortran77 subroutines designed to solve large
+ scale eigenvalue problems.
Important Features:
@@ -38,43 +39,76 @@ class ArpackNg(Package):
Generalized Problems.
* Routines for Banded Matrices - Standard or Generalized Problems.
* Routines for The Singular Value Decomposition.
- * Example driver routines that may be used as templates to implement numerous
- Shift-Invert strategies for all problem types, data types and precision.
+ * Example driver routines that may be used as templates to implement
+ numerous Shift-Invert strategies for all problem types, data types and
+ precision.
- This project is a joint project between Debian, Octave and Scilab in order to
- provide a common and maintained version of arpack.
+ This project is a joint project between Debian, Octave and Scilab in order
+ to provide a common and maintained version of arpack.
- Indeed, no single release has been published by Rice university for the last
- few years and since many software (Octave, Scilab, R, Matlab...) forked it and
- implemented their own modifications, arpack-ng aims to tackle this by providing
- a common repository and maintained versions.
+ Indeed, no single release has been published by Rice university for the
+ last few years and since many software (Octave, Scilab, R, Matlab...)
+ forked it and implemented their own modifications, arpack-ng aims to tackle
+ this by providing a common repository and maintained versions.
arpack-ng is replacing arpack almost everywhere.
"""
homepage = 'https://github.com/opencollab/arpack-ng'
url = 'https://github.com/opencollab/arpack-ng/archive/3.3.0.tar.gz'
+ version('3.4.0', 'ae9ca13f2143a7ea280cb0e2fd4bfae4')
version('3.3.0', 'ed3648a23f0a868a43ef44c97a21bad5')
variant('shared', default=True, description='Enables the build of shared libraries')
variant('mpi', default=False, description='Activates MPI support')
- # The function pdlamch10 does not set the return variable. This is fixed upstream
+ # The function pdlamch10 does not set the return variable.
+ # This is fixed upstream
# see https://github.com/opencollab/arpack-ng/issues/34
- patch('pdlamch10.patch', when='@3.3:')
+ patch('pdlamch10.patch', when='@3.3.0')
+
+ patch('make_install.patch', when='@3.4.0')
+ patch('parpack_cmake.patch', when='@3.4.0')
depends_on('blas')
depends_on('lapack')
- depends_on('automake')
- depends_on('autoconf')
- depends_on('libtool@2.4.2:')
+ depends_on('automake', when='@3.3.0', type='build')
+ depends_on('autoconf', when='@3.3.0', type='build')
+ depends_on('libtool@2.4.2:', when='@3.3.0', type='build')
+ depends_on('cmake@2.8.6:', when='@3.4.0:', type='build')
depends_on('mpi', when='+mpi')
+ @when('@3.4.0:')
+ def install(self, spec, prefix):
+
+ options = ['-DEXAMPLES=ON']
+ options.extend(std_cmake_args)
+ options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix)
+
+ # TODO:
+ # Arpack calls directly find_package(BLAS REQUIRED) and
+ # find_package(LAPACK REQUIRED). Make sure correct Blas/Lapack are
+ # picked up.
+
+ if '+mpi' in spec:
+ options.append('-DMPI=ON')
+
+ # TODO: -DINTERFACE64=ON
+
+ if '+shared' in spec:
+ options.append('-DBUILD_SHARED_LIBS=ON')
+
+ cmake('.', *options)
+ make()
+ # TODO: make test does not work
+ # make('test')
+
+ make('install')
+
+ @when('@3.3.0')
def install(self, spec, prefix):
# Apparently autotools are not bootstrapped
- # TODO: switch to use the CMake build in the next version
- # rather than bootstrapping.
which('libtoolize')()
bootstrap = Executable('./bootstrap')
@@ -83,7 +117,7 @@ class ArpackNg(Package):
if '+mpi' in spec:
options.extend([
'--enable-mpi',
- 'F77=mpif77' #FIXME: avoid hardcoding MPI wrapper names
+ 'F77=%s' % spec['mpi'].mpif77
])
if '~shared' in spec:
diff --git a/var/spack/repos/builtin/packages/arpack-ng/parpack_cmake.patch b/var/spack/repos/builtin/packages/arpack-ng/parpack_cmake.patch
new file mode 100644
index 0000000000..9b11bea6ac
--- /dev/null
+++ b/var/spack/repos/builtin/packages/arpack-ng/parpack_cmake.patch
@@ -0,0 +1,18 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 607d221..345b7fc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -113,11 +113,12 @@ set_target_properties(arpack PROPERTIES OUTPUT_NAME arpack${LIBSUFFIX})
+
+ if (MPI)
+ # add_library(parpack SHARED
+- add_library(parpack
++ add_library(parpack
+ ${parpacksrc_STAT_SRCS}
+ ${parpackutil_STAT_SRCS})
+
+ target_link_libraries(parpack ${MPI_Fortran_LIBRARIES})
++ target_link_libraries(parpack arpack)
+ set_target_properties(parpack PROPERTIES OUTPUT_NAME parpack${LIBSUFFIX})
+ endif ()
+
diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py
index 770ceed48b..2de1c390db 100644
--- a/var/spack/repos/builtin/packages/autoconf/package.py
+++ b/var/spack/repos/builtin/packages/autoconf/package.py
@@ -35,7 +35,7 @@ class Autoconf(Package):
version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b')
version('2.62', '6c1f3b3734999035d77da5024aab4fbd')
- depends_on('m4')
+ depends_on('m4', type='build')
def _make_executable(self, name):
return Executable(join_path(self.prefix.bin, name))
diff --git a/var/spack/repos/builtin/packages/automaded/package.py b/var/spack/repos/builtin/packages/automaded/package.py
index fc65a04a06..2b4681778f 100644
--- a/var/spack/repos/builtin/packages/automaded/package.py
+++ b/var/spack/repos/builtin/packages/automaded/package.py
@@ -44,6 +44,7 @@ class Automaded(Package):
depends_on('mpi')
depends_on('boost')
depends_on('callpath')
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
cmake("-DSTATE_TRACKER_WITH_CALLPATH=ON", *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/bear/package.py b/var/spack/repos/builtin/packages/bear/package.py
index 730a684ec5..a137fded08 100644
--- a/var/spack/repos/builtin/packages/bear/package.py
+++ b/var/spack/repos/builtin/packages/bear/package.py
@@ -31,7 +31,7 @@ class Bear(Package):
version('2.0.4', 'fd8afb5e8e18f8737ba06f90bd77d011')
- depends_on("cmake")
+ depends_on('cmake', type='build')
depends_on("python")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/bertini/package.py b/var/spack/repos/builtin/packages/bertini/package.py
index 8d7da705e4..7dd17a062e 100644
--- a/var/spack/repos/builtin/packages/bertini/package.py
+++ b/var/spack/repos/builtin/packages/bertini/package.py
@@ -37,8 +37,8 @@ class Bertini(Package):
variant('mpi', default=True, description='Compile in parallel')
- depends_on('flex')
- depends_on('bison')
+ depends_on('flex', type='build')
+ depends_on('bison', type='build')
depends_on('gmp')
depends_on('mpfr')
depends_on('mpi', when='+mpi')
diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py
index 35d52128c3..e329e6fd7a 100644
--- a/var/spack/repos/builtin/packages/binutils/package.py
+++ b/var/spack/repos/builtin/packages/binutils/package.py
@@ -38,9 +38,9 @@ class Binutils(Package):
version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e')
version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764')
- depends_on('m4')
- depends_on('flex')
- depends_on('bison')
+ depends_on('m4', type='build')
+ depends_on('flex', type='build')
+ depends_on('bison', type='build')
# Add a patch that creates binutils libiberty_pic.a which is preferred by
# OpenSpeedShop and cbtf-krell
diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py
index c5bc051c80..c7a125df15 100644
--- a/var/spack/repos/builtin/packages/bison/package.py
+++ b/var/spack/repos/builtin/packages/bison/package.py
@@ -34,7 +34,7 @@ class Bison(Package):
version('3.0.4', 'a586e11cd4aff49c3ff6d3b6a4c9ccf8')
- depends_on("m4")
+ depends_on("m4", type='build')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/boxlib/package.py b/var/spack/repos/builtin/packages/boxlib/package.py
index ec7db6c08e..216ae1ec12 100644
--- a/var/spack/repos/builtin/packages/boxlib/package.py
+++ b/var/spack/repos/builtin/packages/boxlib/package.py
@@ -35,6 +35,7 @@ class Boxlib(Package):
version('master', git='https://ccse.lbl.gov/pub/Downloads/BoxLib.git')
depends_on('mpi')
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
args = std_cmake_args
diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py
index 3b6d1d830e..27303293d2 100644
--- a/var/spack/repos/builtin/packages/bzip2/package.py
+++ b/var/spack/repos/builtin/packages/bzip2/package.py
@@ -24,54 +24,59 @@
##############################################################################
from spack import *
+
class Bzip2(Package):
"""bzip2 is a freely available, patent free high-quality data
- compressor. It typically compresses files to within 10% to 15%
- of the best available techniques (the PPM family of statistical
- compressors), whilst being around twice as fast at compression
- and six times faster at decompression.
+ compressor. It typically compresses files to within 10% to 15%
+ of the best available techniques (the PPM family of statistical
+ compressors), whilst being around twice as fast at compression
+ and six times faster at decompression."""
- """
homepage = "http://www.bzip.org"
url = "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz"
version('1.0.6', '00b516f4704d4a7cb50a1d97e6e8e15b')
-
def patch(self):
- mf = FileFilter('Makefile-libbz2_so')
- mf.filter(r'^CC=gcc', 'CC=cc')
+ # bzip2 comes with two separate Makefiles for static and dynamic builds
+ # Tell both to use Spack's compiler wrapper instead of GCC
+ filter_file(r'^CC=gcc', 'CC=cc', 'Makefile')
+ filter_file(r'^CC=gcc', 'CC=cc', 'Makefile-libbz2_so')
- # Below stuff patches the link line to use RPATHs on Mac OS X.
+ # Patch the link line to use RPATHs on macOS
if 'darwin' in self.spec.architecture:
v = self.spec.version
- v1, v2, v3 = (v.up_to(i) for i in (1,2,3))
+ v1, v2, v3 = (v.up_to(i) for i in (1, 2, 3))
- mf.filter('$(CC) -shared -Wl,-soname -Wl,libbz2.so.{0} -o libbz2.so.{1} $(OBJS)'.format(v2, v3),
- '$(CC) -dynamiclib -Wl,-install_name -Wl,@rpath/libbz2.{0}.dylib -current_version {1} -compatibility_version {2} -o libbz2.{3}.dylib $(OBJS)'.format(v1, v2, v3, v3), string=True)
+ kwargs = {'ignore_absent': False, 'backup': False, 'string': True}
- mf.filter('$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.{0}'.format(v3),
- '$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.{0}.dylib'.format(v3), string=True)
+ mf = FileFilter('Makefile-libbz2_so')
+ mf.filter('$(CC) -shared -Wl,-soname -Wl,libbz2.so.{0} -o libbz2.so.{1} $(OBJS)'.format(v2, v3), # NOQA ignore=E501
+ '$(CC) -dynamiclib -Wl,-install_name -Wl,@rpath/libbz2.{0}.dylib -current_version {1} -compatibility_version {2} -o libbz2.{3}.dylib $(OBJS)'.format(v1, v2, v3, v3), **kwargs) # NOQA ignore=E501
+
+ mf.filter('$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.{0}'.format(v3), # NOQA ignore=E501
+ '$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.{0}.dylib'.format(v3), **kwargs) # NOQA ignore=E501
mf.filter('rm -f libbz2.so.{0}'.format(v2),
- 'rm -f libbz2.{0}.dylib'.format(v2), string=True)
+ 'rm -f libbz2.{0}.dylib'.format(v2), **kwargs)
mf.filter('ln -s libbz2.so.{0} libbz2.so.{1}'.format(v3, v2),
- 'ln -s libbz2.{0}.dylib libbz2.{1}.dylib'.format(v3, v2), string=True)
-
+ 'ln -s libbz2.{0}.dylib libbz2.{1}.dylib'.format(v3, v2), **kwargs) # NOQA ignore=E501
def install(self, spec, prefix):
+ # Build the dynamic library first
make('-f', 'Makefile-libbz2_so')
- make('clean')
- make("install", "PREFIX=%s" % prefix)
+ # Build the static library and everything else
+ make()
+ make('install', 'PREFIX={0}'.format(prefix))
install('bzip2-shared', join_path(prefix.bin, 'bzip2'))
- v1, v2, v3 = (self.spec.version.up_to(i) for i in (1,2,3))
+ v1, v2, v3 = (self.spec.version.up_to(i) for i in (1, 2, 3))
if 'darwin' in self.spec.architecture:
lib = 'libbz2.dylib'
- lib1, lib2, lib3 = ('libbz2.{0}.dylib'.format(v) for v in (v1, v2, v3))
+ lib1, lib2, lib3 = ('libbz2.{0}.dylib'.format(v) for v in (v1, v2, v3)) # NOQA ignore=E501
else:
lib = 'libbz2.so'
- lib1, lib2, lib3 = ('libbz2.so.{0}'.format(v) for v in (v1, v2, v3))
+ lib1, lib2, lib3 = ('libbz2.so.{0}'.format(v) for v in (v1, v2, v3)) # NOQA ignore=E501
install(lib3, join_path(prefix.lib, lib3))
with working_dir(prefix.lib):
diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py
index dee332be14..49f9861126 100644
--- a/var/spack/repos/builtin/packages/c-blosc/package.py
+++ b/var/spack/repos/builtin/packages/c-blosc/package.py
@@ -38,7 +38,7 @@ class CBlosc(Package):
version('1.8.1', 'd73d5be01359cf271e9386c90dcf5b05')
version('1.8.0', '5b92ecb287695ba20cc33d30bf221c4f')
- depends_on("cmake")
+ depends_on("cmake", type='build')
depends_on("snappy")
depends_on("zlib")
diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py
index a424c73859..4a0fc54acc 100644
--- a/var/spack/repos/builtin/packages/caliper/package.py
+++ b/var/spack/repos/builtin/packages/caliper/package.py
@@ -41,6 +41,7 @@ class Caliper(Package):
depends_on('libunwind')
depends_on('papi')
depends_on('mpi', when='+mpi')
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
with working_dir('build', create=True):
diff --git a/var/spack/repos/builtin/packages/callpath/package.py b/var/spack/repos/builtin/packages/callpath/package.py
index 2ad2dc60e4..2f171fb9ce 100644
--- a/var/spack/repos/builtin/packages/callpath/package.py
+++ b/var/spack/repos/builtin/packages/callpath/package.py
@@ -39,6 +39,7 @@ class Callpath(Package):
depends_on("dyninst")
depends_on("adept-utils")
depends_on("mpi")
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
# TODO: offer options for the walker used.
diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py
index e9e5da4486..8e4f23046b 100644
--- a/var/spack/repos/builtin/packages/cantera/package.py
+++ b/var/spack/repos/builtin/packages/cantera/package.py
@@ -42,7 +42,7 @@ class Cantera(Package):
variant('matlab', default=False, description='Build the Cantera Matlab toolbox')
# Required dependencies
- depends_on('scons')
+ depends_on('scons', type='build')
# Recommended dependencies
depends_on('blas', when='+lapack')
@@ -52,10 +52,10 @@ class Cantera(Package):
# Python module dependencies
extends('python', when='+python')
- depends_on('py-numpy', when='+python')
- depends_on('py-scipy', when='+python')
- depends_on('py-cython', when='+python')
- depends_on('py-3to2', when='+python')
+ depends_on('py-numpy', when='+python', type=nolink)
+ depends_on('py-scipy', when='+python', type=nolink)
+ depends_on('py-cython', when='+python', type=nolink)
+ depends_on('py-3to2', when='+python', type=nolink)
# TODO: these "when" specs don't actually work
# depends_on('py-unittest2', when='+python^python@2.6')
# depends_on('py-unittest2py3k', when='+python^python@3.1')
diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
index 7ce90ce0db..321d02b556 100644
--- a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py
@@ -53,7 +53,7 @@ class CbtfArgonavis(Package):
version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf-argonavis.git')
- depends_on("cmake@3.0.2")
+ depends_on("cmake@3.0.2", type='build')
depends_on("boost@1.50.0:")
depends_on("papi")
depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
diff --git a/var/spack/repos/builtin/packages/cbtf-krell/package.py b/var/spack/repos/builtin/packages/cbtf-krell/package.py
index 7506f78146..acb78a7395 100644
--- a/var/spack/repos/builtin/packages/cbtf-krell/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-krell/package.py
@@ -64,7 +64,7 @@ class CbtfKrell(Package):
variant('mpich', default=False, description="Build mpi experiment collector for mpich MPI when this variant is enabled.")
# Dependencies for cbtf-krell
- depends_on("cmake@3.0.2")
+ depends_on("cmake@3.0.2", type='build')
# For binutils service
depends_on("binutils@2.24+krellpatch")
diff --git a/var/spack/repos/builtin/packages/cbtf-lanl/package.py b/var/spack/repos/builtin/packages/cbtf-lanl/package.py
index fa7de3d4a3..5694535fcc 100644
--- a/var/spack/repos/builtin/packages/cbtf-lanl/package.py
+++ b/var/spack/repos/builtin/packages/cbtf-lanl/package.py
@@ -53,7 +53,7 @@ class CbtfLanl(Package):
version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-lanl/cbtf-lanl')
- depends_on("cmake@3.0.2")
+ depends_on("cmake@3.0.2", type='build')
# Dependencies for cbtf-krell
depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
depends_on("xerces-c@3.1.1:")
diff --git a/var/spack/repos/builtin/packages/cbtf/package.py b/var/spack/repos/builtin/packages/cbtf/package.py
index 2231cf1d45..017b897f3c 100644
--- a/var/spack/repos/builtin/packages/cbtf/package.py
+++ b/var/spack/repos/builtin/packages/cbtf/package.py
@@ -57,7 +57,7 @@ class Cbtf(Package):
variant('runtime', default=False, description="build only the runtime libraries and collectors.")
- depends_on("cmake@3.0.2")
+ depends_on("cmake@3.0.2", type='build')
depends_on("boost@1.50.0:")
depends_on("mrnet@5.0.1:+lwthreads+krellpatch")
depends_on("xerces-c@3.1.1:")
diff --git a/var/spack/repos/builtin/packages/cereal/package.py b/var/spack/repos/builtin/packages/cereal/package.py
index c53c667efb..41dc9a274b 100644
--- a/var/spack/repos/builtin/packages/cereal/package.py
+++ b/var/spack/repos/builtin/packages/cereal/package.py
@@ -31,6 +31,7 @@ class Cereal(Package):
homepage = "http://uscilab.github.io/cereal/"
url = "https://github.com/USCiLab/cereal/archive/v1.1.2.tar.gz"
+ version('1.2.0', 'e372c9814696481dbdb7d500e1410d2b')
version('1.1.2', '34d4ad174acbff005c36d4d10e48cbb9')
version('1.1.1', '0ceff308c38f37d5b5f6df3927451c27')
version('1.1.0', '9f2d5f72e935c54f4c6d23e954ce699f')
@@ -39,7 +40,7 @@ class Cereal(Package):
patch("Werror.patch")
- depends_on("cmake @2.6.2:")
+ depends_on('cmake@2.6.2:', type='build')
def install(self, spec, prefix):
# Don't use -Werror
diff --git a/var/spack/repos/builtin/packages/cgal/package.py b/var/spack/repos/builtin/packages/cgal/package.py
index ea1b20e34f..5c87978339 100644
--- a/var/spack/repos/builtin/packages/cgal/package.py
+++ b/var/spack/repos/builtin/packages/cgal/package.py
@@ -46,7 +46,7 @@ class Cgal(Package):
depends_on('mpfr')
depends_on('gmp')
depends_on('zlib')
- depends_on('cmake')
+ depends_on('cmake', type='build')
# FIXME : Qt5 dependency missing (needs Qt5 and OpenGL)
# FIXME : Optional third party libraries missing
diff --git a/var/spack/repos/builtin/packages/cleverleaf/package.py b/var/spack/repos/builtin/packages/cleverleaf/package.py
index 6b54d1bf26..c258e89514 100644
--- a/var/spack/repos/builtin/packages/cleverleaf/package.py
+++ b/var/spack/repos/builtin/packages/cleverleaf/package.py
@@ -40,6 +40,7 @@ class Cleverleaf(Package):
depends_on("SAMRAI@3.8.0:")
depends_on("hdf5+mpi")
depends_on("boost")
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
cmake(*std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py
index 7b2a125fe5..b39b086396 100644
--- a/var/spack/repos/builtin/packages/cmake/package.py
+++ b/var/spack/repos/builtin/packages/cmake/package.py
@@ -47,8 +47,8 @@ class Cmake(Package):
depends_on('ncurses', when='+ncurses')
depends_on('openssl', when='+openssl')
depends_on('qt', when='+qt')
- depends_on('python@2.7.11:', when='+doc')
- depends_on('py-sphinx', when='+doc')
+ depends_on('python@2.7.11:', when='+doc', type='build')
+ depends_on('py-sphinx', when='+doc', type='build')
def url_for_version(self, version):
"""Handle CMake's version-based custom URLs."""
diff --git a/var/spack/repos/builtin/packages/cmocka/package.py b/var/spack/repos/builtin/packages/cmocka/package.py
index 41f80d9761..aa2b3cc3bb 100644
--- a/var/spack/repos/builtin/packages/cmocka/package.py
+++ b/var/spack/repos/builtin/packages/cmocka/package.py
@@ -32,6 +32,8 @@ class Cmocka(Package):
version('1.0.1', 'ed861e501a21a92b2af63e466df2015e')
parallel = False
+ depends_on('cmake', type='build')
+
def install(self, spec, prefix):
with working_dir('spack-build', create=True):
cmake('..', *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/cram/package.py b/var/spack/repos/builtin/packages/cram/package.py
index 7e05587087..283bc5adea 100644
--- a/var/spack/repos/builtin/packages/cram/package.py
+++ b/var/spack/repos/builtin/packages/cram/package.py
@@ -33,6 +33,7 @@ class Cram(Package):
extends('python')
depends_on("mpi")
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
cmake(".", *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/czmq/package.py b/var/spack/repos/builtin/packages/czmq/package.py
index d69f3e5009..a251a94470 100644
--- a/var/spack/repos/builtin/packages/czmq/package.py
+++ b/var/spack/repos/builtin/packages/czmq/package.py
@@ -32,10 +32,10 @@ class Czmq(Package):
version('3.0.2', '23e9885f7ee3ce88d99d0425f52e9be1', url='https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz')
- depends_on('libtool')
- depends_on('automake')
- depends_on('autoconf')
- depends_on('pkg-config')
+ depends_on('libtool', type='build')
+ depends_on('automake', type='build')
+ depends_on('autoconf', type='build')
+ depends_on('pkg-config', type='build')
depends_on('zeromq')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/dakota/package.py b/var/spack/repos/builtin/packages/dakota/package.py
index 3a8ddf28ef..d0d22d9728 100644
--- a/var/spack/repos/builtin/packages/dakota/package.py
+++ b/var/spack/repos/builtin/packages/dakota/package.py
@@ -55,6 +55,7 @@ class Dakota(Package):
depends_on('python')
depends_on('boost')
+ depends_on('cmake', type='build')
def url_for_version(self, version):
return Dakota._url_str.format(version=version)
diff --git a/var/spack/repos/builtin/packages/damselfly/package.py b/var/spack/repos/builtin/packages/damselfly/package.py
index 42fab63f98..427997072c 100644
--- a/var/spack/repos/builtin/packages/damselfly/package.py
+++ b/var/spack/repos/builtin/packages/damselfly/package.py
@@ -31,6 +31,8 @@ class Damselfly(Package):
version('1.0', '05cf7e2d8ece4408c0f2abb7ab63fd74c0d62895', git='https://github.com/llnl/damselfly.git', tag='v1.0')
+ depends_on('cmake', type='build')
+
def install(self, spec, prefix):
with working_dir('spack-build', create=True):
cmake('-DCMAKE_BUILD_TYPE=release', '..', *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 068dbec10a..54604d351f 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -37,7 +37,7 @@ class Dealii(Package):
version('8.3.0', 'fc6cdcb16309ef4bea338a4f014de6fa')
version('8.2.1', '71c728dbec14f371297cd405776ccf08')
version('8.1.0', 'aa8fadc2ce5eb674f44f997461bf668d')
- version('dev', git='https://github.com/dealii/dealii.git')
+ version('develop', git='https://github.com/dealii/dealii.git')
variant('mpi', default=True, description='Compile with MPI')
variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)')
@@ -60,7 +60,7 @@ class Dealii(Package):
depends_on("boost@1.59.0:+thread+system+serialization+iostreams", when='~mpi') # NOQA: ignore=E501
depends_on("boost@1.59.0:+mpi+thread+system+serialization+iostreams", when='+mpi') # NOQA: ignore=E501
depends_on("bzip2")
- depends_on("cmake")
+ depends_on("cmake", type='build')
depends_on("lapack")
depends_on("muparser")
depends_on("suite-sparse")
@@ -73,20 +73,21 @@ class Dealii(Package):
depends_on("doxygen+graphviz", when='+doc')
depends_on("graphviz", when='+doc')
depends_on("gsl", when='@8.5.0:+gsl')
- depends_on("gsl", when='@dev+gsl')
depends_on("hdf5+mpi", when='+hdf5+mpi')
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')
depends_on("p4est", when='+p4est+mpi')
- depends_on("petsc@:3.6.4+mpi", when='+petsc+mpi') # FIXME: update after 3.7 is supported upstream. # NOQA: ignore=E501
- depends_on("slepc@:3.6.3", when='+slepc+petsc+mpi')
+ depends_on("petsc+mpi", when='@8.5.0:+petsc+mpi')
+ depends_on("slepc", when='@8.5.0:+slepc+petsc+mpi')
+ depends_on("petsc@:3.6.4+mpi", when='@:8.4.1+petsc+mpi')
+ depends_on("slepc@:3.6.3", when='@:8.4.1+slepc+petsc+mpi')
depends_on("trilinos", when='+trilinos+mpi')
# developer dependnecies
- depends_on("numdiff", when='@dev')
- depends_on("astyle@2.04", when='@dev')
+ depends_on("numdiff", when='@develop')
+ depends_on("astyle@2.04", when='@develop')
def install(self, spec, prefix):
options = []
@@ -119,6 +120,16 @@ class Dealii(Package):
'-DZLIB_DIR=%s' % spec['zlib'].prefix
])
+ # Set directory structure:
+ if spec.satisfies('@:8.2.1'):
+ options.extend(['-DDEAL_II_COMPONENT_COMPAT_FILES=OFF'])
+ else:
+ options.extend([
+ '-DDEAL_II_EXAMPLES_RELDIR=share/deal.II/examples',
+ '-DDEAL_II_DOCREADME_RELDIR=share/deal.II/',
+ '-DDEAL_II_DOCHTML_RELDIR=share/deal.II/doc'
+ ])
+
# MPI
if '+mpi' in spec:
options.extend([
@@ -193,115 +204,118 @@ class Dealii(Package):
])
cmake('.', *options)
-
make()
- make("test")
+ if self.run_tests:
+ make("test")
make("install")
# run some MPI examples with different solvers from PETSc and Trilinos
- env['DEAL_II_DIR'] = prefix
- print('=====================================')
- print('============ EXAMPLES ===============')
- print('=====================================')
- # take bare-bones step-3
- print('=====================================')
- print('============ Step-3 =================')
- print('=====================================')
- with working_dir('examples/step-3'):
- cmake('.')
- make('release')
- make('run', parallel=False)
-
- # An example which uses Metis + PETSc
- # FIXME: switch step-18 to MPI
- with working_dir('examples/step-18'):
+ if self.run_tests:
+ env['DEAL_II_DIR'] = prefix
print('=====================================')
- print('============= Step-18 ===============')
+ print('============ EXAMPLES ===============')
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'):
+ # take bare-bones step-3
print('=====================================')
- print('========== Step-40 PETSc ============')
+ print('============ Step-3 =================')
print('=====================================')
- # list the number of cycles to speed up
- filter_file(r'(const unsigned int n_cycles = 8;)',
- ('const unsigned int n_cycles = 2;'), 'step-40.cc')
- cmake('.')
- if '^petsc' in spec:
+ with working_dir('examples/step-3'):
+ cmake('.')
make('release')
make('run', parallel=False)
- print('=====================================')
- print('========= Step-40 Trilinos ==========')
- print('=====================================')
- # change Linear Algebra to Trilinos
- # The below filter_file should be different for versions
- # before and after 8.4.0
- if spec.satisfies('@8.4.0:') or spec.satisfies('@dev'):
- filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)',
- ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc')
- else:
- filter_file(r'(#define USE_PETSC_LA.*)',
- ('// #define USE_PETSC_LA'), 'step-40.cc')
- if '^trilinos+hypre' in spec:
- 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)
- # the rest of the tests on step 40 only works for
- # dealii version 8.4.0 and after
- if spec.satisfies('@8.4.0:') or spec.satisfies('@dev'):
+ # take step-40 which can use both PETSc and Trilinos
+ # FIXME: switch step-40 to MPI run
+ with working_dir('examples/step-40'):
print('=====================================')
- print('=== Step-40 Trilinos SuperluDist ====')
+ print('========== Step-40 PETSc ============')
print('=====================================')
- # change to direct solvers
- filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # NOQA: ignore=E501
- filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)',
- (''), 'step-40.cc')
- filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)', # NOQA: ignore=E501
- (''), 'step-40.cc')
- filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', # NOQA: ignore=E501
- (''), 'step-40.cc')
- filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # NOQA: ignore=E501
- filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
- if '^trilinos+superlu-dist' in spec:
+ # list the number of cycles to speed up
+ filter_file(r'(const unsigned int n_cycles = 8;)',
+ ('const unsigned int n_cycles = 2;'), 'step-40.cc')
+ cmake('.')
+ if '^petsc' in spec:
make('release')
- make('run', paralle=False)
+ make('run', parallel=False)
print('=====================================')
- print('====== Step-40 Trilinos MUMPS =======')
+ print('========= Step-40 Trilinos ==========')
print('=====================================')
- # switch to Mumps
- filter_file(r'(Amesos_Superludist)',
- ('Amesos_Mumps'), 'step-40.cc')
- if '^trilinos+mumps' in spec:
+ # change Linear Algebra to Trilinos
+ # The below filter_file should be different for versions
+ # before and after 8.4.0
+ if spec.satisfies('@8.4.0:'):
+ filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)',
+ ('#define FORCE_USE_OF_TRILINOS'),
+ 'step-40.cc')
+ else:
+ filter_file(r'(#define USE_PETSC_LA.*)',
+ ('// #define USE_PETSC_LA'), 'step-40.cc')
+ if '^trilinos+hypre' in spec:
make('release')
make('run', parallel=False)
- print('=====================================')
- print('============ Step-36 ================')
- print('=====================================')
- with working_dir('examples/step-36'):
- if 'slepc' in spec:
- cmake('.')
- make('release')
- make('run', parallel=False)
+ # the rest of the tests on step 40 only works for
+ # dealii version 8.4.0 and after
+ if spec.satisfies('@8.4.0:'):
+ print('=====================================')
+ print('=== Step-40 Trilinos SuperluDist ====')
+ print('=====================================')
+ # change to direct solvers
+ filter_file(r'(LA::SolverCG solver\(solver_control\);)', ('TrilinosWrappers::SolverDirect::AdditionalData data(false,"Amesos_Superludist"); TrilinosWrappers::SolverDirect solver(solver_control,data);'), 'step-40.cc') # NOQA: ignore=E501
+ filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)',
+ (''), 'step-40.cc')
+ filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)', # NOQA: ignore=E501
+ (''), 'step-40.cc')
+ filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', # NOQA: ignore=E501
+ (''), 'step-40.cc')
+ filter_file(r'(solver\.solve \(system_matrix, completely_distributed_solution, system_rhs,)', ('solver.solve (system_matrix, completely_distributed_solution, system_rhs);'), 'step-40.cc') # NOQA: ignore=E501
+ filter_file(r'(preconditioner\);)', (''), 'step-40.cc')
+ if '^trilinos+superlu-dist' in spec:
+ make('release')
+ make('run', paralle=False)
- print('=====================================')
- print('============ Step-54 ================')
- print('=====================================')
- with working_dir('examples/step-54'):
- if 'oce' in spec:
- cmake('.')
- make('release')
- make('run', parallel=False)
+ print('=====================================')
+ print('====== Step-40 Trilinos MUMPS =======')
+ print('=====================================')
+ # switch to Mumps
+ filter_file(r'(Amesos_Superludist)',
+ ('Amesos_Mumps'), 'step-40.cc')
+ if '^trilinos+mumps' in spec:
+ make('release')
+ make('run', parallel=False)
+
+ print('=====================================')
+ print('============ Step-36 ================')
+ print('=====================================')
+ with working_dir('examples/step-36'):
+ if 'slepc' in spec:
+ cmake('.')
+ make('release')
+ make('run', parallel=False)
+
+ print('=====================================')
+ print('============ Step-54 ================')
+ print('=====================================')
+ with working_dir('examples/step-54'):
+ if 'oce' in spec:
+ cmake('.')
+ make('release')
+ make('run', parallel=False)
def setup_environment(self, spack_env, env):
env.set('DEAL_II_DIR', self.prefix)
diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py
index 38742b7e7d..1685f0009f 100644
--- a/var/spack/repos/builtin/packages/dia/package.py
+++ b/var/spack/repos/builtin/packages/dia/package.py
@@ -31,7 +31,7 @@ class Dia(Package):
version('0.97.3', '0e744a0f6a6c4cb6a089e4d955392c3c')
- depends_on('intltool')
+ depends_on('intltool', type='build')
depends_on('gtkplus@2.6.0:')
depends_on('cairo')
#depends_on('libart') # optional dependency, not yet supported by spack.
diff --git a/var/spack/repos/builtin/packages/docbook-xml/package.py b/var/spack/repos/builtin/packages/docbook-xml/package.py
index 9c22174610..87137168f3 100644
--- a/var/spack/repos/builtin/packages/docbook-xml/package.py
+++ b/var/spack/repos/builtin/packages/docbook-xml/package.py
@@ -23,7 +23,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import os
-import glob
from spack import *
@@ -35,9 +34,10 @@ class DocbookXml(Package):
version('4.5', '03083e288e87a7e829e437358da7ef9e')
def install(self, spec, prefix):
- cp = which('cp')
-
- install_args = ['-a', '-t', prefix]
- install_args.extend(glob.glob('*'))
-
- cp(*install_args)
+ for item in os.listdir('.'):
+ src = os.path.abspath(item)
+ dst = os.path.join(prefix, item)
+ if os.path.isdir(item):
+ install_tree(src, dst, symlinks=True)
+ else:
+ install(src, dst)
diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py
index b2e9582b5a..267ba61756 100644
--- a/var/spack/repos/builtin/packages/doxygen/package.py
+++ b/var/spack/repos/builtin/packages/doxygen/package.py
@@ -24,6 +24,8 @@
##############################################################################
from spack import *
+import sys
+
class Doxygen(Package):
"""Doxygen is the de facto standard tool for generating documentation
@@ -41,12 +43,12 @@ class Doxygen(Package):
# graphviz appears to be a run-time optional dependency
variant('graphviz', default=True, description='Build with dot command support from Graphviz.') # NOQA: ignore=E501
- depends_on("cmake@2.8.12:")
- depends_on("flex")
- depends_on("bison")
+ depends_on("cmake@2.8.12:", type='build')
+ depends_on("flex", type='build')
+ depends_on("bison", type='build')
# optional dependencies
- depends_on("graphviz", when="+graphviz")
+ depends_on("graphviz", when="+graphviz", type='run')
def install(self, spec, prefix):
cmake('.', *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py
index 735936f087..efe4de4abf 100644
--- a/var/spack/repos/builtin/packages/dyninst/package.py
+++ b/var/spack/repos/builtin/packages/dyninst/package.py
@@ -43,6 +43,7 @@ class Dyninst(Package):
depends_on("libelf")
depends_on("libdwarf")
depends_on("boost@1.42:")
+ depends_on('cmake', type='build')
# new version uses cmake
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py
index 9ff4107619..97343f499b 100644
--- a/var/spack/repos/builtin/packages/eigen/package.py
+++ b/var/spack/repos/builtin/packages/eigen/package.py
@@ -47,7 +47,7 @@ class Eigen(Package):
variant('mpfr', default=True, description='Enables support for multi-precisions floating points via mpfr')
# TODO : dependency on googlehash, superlu, adolc missing
- depends_on('cmake')
+ depends_on('cmake', type='build')
depends_on('metis@5:', when='+metis')
depends_on('scotch', when='+scotch')
depends_on('fftw', when='+fftw')
diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py
index fe7a5ee4f6..5d5bb3be02 100644
--- a/var/spack/repos/builtin/packages/environment-modules/package.py
+++ b/var/spack/repos/builtin/packages/environment-modules/package.py
@@ -35,7 +35,7 @@ class EnvironmentModules(Package):
version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb')
# Dependencies:
- depends_on('tcl')
+ depends_on('tcl', type=alldeps)
def install(self, spec, prefix):
tcl_spec = spec['tcl']
diff --git a/var/spack/repos/builtin/packages/exodusii/package.py b/var/spack/repos/builtin/packages/exodusii/package.py
index 5e9227af46..eb6c23afeb 100644
--- a/var/spack/repos/builtin/packages/exodusii/package.py
+++ b/var/spack/repos/builtin/packages/exodusii/package.py
@@ -44,9 +44,7 @@ class Exodusii(Package):
version('2016-02-08', git='https://github.com/gsjaardema/seacas.git', commit='dcf3529')
- # TODO: Make this a build dependency once build dependencies are supported
- # (see: https://github.com/LLNL/spack/pull/378).
- depends_on('cmake@2.8.7:')
+ depends_on('cmake@2.8.7:', type='build')
depends_on('hdf5~shared~mpi')
depends_on('netcdf~mpi')
diff --git a/var/spack/repos/builtin/packages/expat/package.py b/var/spack/repos/builtin/packages/expat/package.py
index 51e827b2c5..2a9ac123f3 100644
--- a/var/spack/repos/builtin/packages/expat/package.py
+++ b/var/spack/repos/builtin/packages/expat/package.py
@@ -31,7 +31,7 @@ class Expat(Package):
version('2.1.0', 'dd7dab7a5fea97d2a6a43f511449b7cd')
- depends_on('cmake')
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py
index b778538606..800e4b9d96 100644
--- a/var/spack/repos/builtin/packages/flex/package.py
+++ b/var/spack/repos/builtin/packages/flex/package.py
@@ -34,7 +34,7 @@ class Flex(Package):
version('2.6.0', '5724bcffed4ebe39e9b55a9be80859ec')
version('2.5.39', 'e133e9ead8ec0a58d81166b461244fde')
- depends_on("bison")
+ depends_on("bison", type='build')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/flux/package.py b/var/spack/repos/builtin/packages/flux/package.py
index 2b972d63ae..dec339a6af 100644
--- a/var/spack/repos/builtin/packages/flux/package.py
+++ b/var/spack/repos/builtin/packages/flux/package.py
@@ -45,8 +45,8 @@ class Flux(Package):
depends_on("py-cffi")
# TODO: This provides a catalog, hacked with environment below for now
- depends_on("docbook-xml")
- depends_on("asciidoc")
+ depends_on("docbook-xml", type='build')
+ depends_on("asciidoc", type='build')
def install(self, spec, prefix):
# Bootstrap with autotools
diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py
index 4479fc9bee..0ff5765895 100644
--- a/var/spack/repos/builtin/packages/foam-extend/package.py
+++ b/var/spack/repos/builtin/packages/foam-extend/package.py
@@ -29,6 +29,7 @@ class FoamExtend(Package):
depends_on('python')
depends_on('flex@:2.5.99')
depends_on('zlib')
+ depends_on('cmake', type='build')
depends_on('scotch ~ metis', when='~ptscotch+scotch')
depends_on('scotch ~ metis + mpi', when='+ptscotch')
diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py
index caff06bdd6..9ed83bc3be 100644
--- a/var/spack/repos/builtin/packages/gdal/package.py
+++ b/var/spack/repos/builtin/packages/gdal/package.py
@@ -62,7 +62,7 @@ class Gdal(Package):
depends_on("libpng")
depends_on("zlib")
depends_on("proj")
- depends_on("py-numpy")
+ depends_on("py-numpy", type=nolink)
parallel = False
diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py
index 58d8a545db..78ad4b307d 100644
--- a/var/spack/repos/builtin/packages/gdb/package.py
+++ b/var/spack/repos/builtin/packages/gdb/package.py
@@ -41,7 +41,7 @@ class Gdb(Package):
version('7.9', '8f8ced422fe462a00e0135a643544f17')
version('7.8.2', '8b0ea8b3559d3d90b3ff4952f0aeafbc')
- depends_on('texinfo')
+ depends_on('texinfo', type='build')
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/gflags/package.py b/var/spack/repos/builtin/packages/gflags/package.py
index 9f3552d53d..47bbf369ef 100644
--- a/var/spack/repos/builtin/packages/gflags/package.py
+++ b/var/spack/repos/builtin/packages/gflags/package.py
@@ -37,6 +37,8 @@ class Gflags(Package):
version('2.1.2', 'ac432de923f9de1e9780b5254884599f')
+ depends_on('cmake', type='build')
+
def install(self, spec, prefix):
cmake("-DCMAKE_INSTALL_PREFIX=" + prefix,
"-DBUILD_SHARED_LIBS=ON")
diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py
index 03e7d3e031..4cbbaac342 100644
--- a/var/spack/repos/builtin/packages/git/package.py
+++ b/var/spack/repos/builtin/packages/git/package.py
@@ -49,7 +49,7 @@ class Git(Package):
depends_on("openssl")
- depends_on("autoconf")
+ depends_on("autoconf", type='build')
depends_on("curl")
depends_on("expat")
diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py
index 342a61a6a1..0a0a02f464 100644
--- a/var/spack/repos/builtin/packages/glib/package.py
+++ b/var/spack/repos/builtin/packages/glib/package.py
@@ -38,8 +38,8 @@ class Glib(Package):
depends_on("libffi")
depends_on("zlib")
- depends_on("pkg-config")
- depends_on('gettext', sys.platform == 'darwin')
+ depends_on("pkg-config", type='build')
+ depends_on('gettext', when=sys.platform == 'darwin')
# The following patch is needed for gcc-6.1
patch('g_date_strftime.patch')
diff --git a/var/spack/repos/builtin/packages/glm/package.py b/var/spack/repos/builtin/packages/glm/package.py
index 0c9212f17d..442c1cdf40 100644
--- a/var/spack/repos/builtin/packages/glm/package.py
+++ b/var/spack/repos/builtin/packages/glm/package.py
@@ -35,8 +35,8 @@ class Glm(Package):
url = "https://github.com/g-truc/glm/archive/0.9.7.1.tar.gz"
version('0.9.7.1', '61af6639cdf652d1cdd7117190afced8')
-
- depends_on ("cmake")
+
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
with working_dir('spack-build', create=True):
diff --git a/var/spack/repos/builtin/packages/global/package.py b/var/spack/repos/builtin/packages/global/package.py
index c144d6660b..f832834a28 100644
--- a/var/spack/repos/builtin/packages/global/package.py
+++ b/var/spack/repos/builtin/packages/global/package.py
@@ -34,7 +34,7 @@ class Global(Package):
version('6.5', 'dfec818b4f53d91721e247cf7b218078')
- depends_on('exuberant-ctags')
+ depends_on('exuberant-ctags', type=nolink)
depends_on('ncurses')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/gmp/package.py b/var/spack/repos/builtin/packages/gmp/package.py
index 3933788425..e2c2892f18 100644
--- a/var/spack/repos/builtin/packages/gmp/package.py
+++ b/var/spack/repos/builtin/packages/gmp/package.py
@@ -35,7 +35,7 @@ class Gmp(Package):
version('6.0.0a', 'b7ff2d88cae7f8085bd5006096eed470')
version('6.0.0' , '6ef5869ae735db9995619135bd856b84')
- depends_on("m4")
+ depends_on("m4", type='build')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py
index 0951b86d57..fe26cb3bf2 100644
--- a/var/spack/repos/builtin/packages/gmsh/package.py
+++ b/var/spack/repos/builtin/packages/gmsh/package.py
@@ -53,7 +53,7 @@ class Gmsh(Package):
depends_on('blas')
depends_on('lapack')
- depends_on('cmake@2.8:')
+ depends_on('cmake@2.8:', type='build')
depends_on('gmp')
depends_on('mpi', when='+mpi')
# Assumes OpenGL with GLU is already provided by the system:
diff --git a/var/spack/repos/builtin/packages/gnu-prolog/package.py b/var/spack/repos/builtin/packages/gnu-prolog/package.py
new file mode 100644
index 0000000000..f497ed3001
--- /dev/null
+++ b/var/spack/repos/builtin/packages/gnu-prolog/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 GnuProlog(Package):
+ """A free Prolog compiler with constraint solving over finite domains."""
+ homepage = "http://www.gprolog.org/"
+ url = "http://www.gprolog.org/gprolog-1.4.4.tar.gz"
+
+ version('1.4.4', '37009da471e5217ff637ad1c516448c8')
+
+ parallel = False
+
+ def install(self, spec, prefix):
+ with working_dir('src'):
+ configure('--with-install-dir=%s' % prefix,
+ '--without-links-dir')
+ make()
+ make('install')
diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py
index 13b83517d1..ff2c2f6781 100644
--- a/var/spack/repos/builtin/packages/go/package.py
+++ b/var/spack/repos/builtin/packages/go/package.py
@@ -24,7 +24,7 @@ class Go(Package):
# to-do, make non-c self-hosting compilers feasible without backflips
# should be a dep on external go compiler
- depends_on('go-bootstrap')
+ depends_on('go-bootstrap', type='build')
depends_on('git')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/googletest/package.py b/var/spack/repos/builtin/packages/googletest/package.py
index 9444253c8c..1dc74fbcf4 100644
--- a/var/spack/repos/builtin/packages/googletest/package.py
+++ b/var/spack/repos/builtin/packages/googletest/package.py
@@ -31,7 +31,7 @@ class Googletest(Package):
version('1.7.0', '5eaf03ed925a47b37c8e1d559eb19bc4')
- depends_on("cmake")
+ depends_on("cmake", type='build')
def install(self, spec, prefix):
which('cmake')('.', *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/graphlib/package.py b/var/spack/repos/builtin/packages/graphlib/package.py
index f70f32cc8a..087a322acc 100644
--- a/var/spack/repos/builtin/packages/graphlib/package.py
+++ b/var/spack/repos/builtin/packages/graphlib/package.py
@@ -31,6 +31,8 @@ class Graphlib(Package):
version('2.0.0', '43c6df84f1d38ba5a5dce0ae19371a70')
+ depends_on('cmake', type='build')
+
def install(self, spec, prefix):
cmake(".", *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py
index 2f99015ba2..e5898a6e59 100644
--- a/var/spack/repos/builtin/packages/graphviz/package.py
+++ b/var/spack/repos/builtin/packages/graphviz/package.py
@@ -44,7 +44,7 @@ class Graphviz(Package):
depends_on("swig")
depends_on("python")
depends_on("ghostscript")
- depends_on("pkg-config")
+ depends_on("pkg-config", type='build')
def install(self, spec, prefix):
options = ['--prefix=%s' % prefix]
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py
index 1a50a42488..55eacc8d38 100644
--- a/var/spack/repos/builtin/packages/gromacs/package.py
+++ b/var/spack/repos/builtin/packages/gromacs/package.py
@@ -50,6 +50,7 @@ class Gromacs(Package):
depends_on('mpi', when='+mpi')
depends_on('fftw')
+ depends_on('cmake', type='build')
# TODO : add GPU support
diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
index 50f380083c..28b65711b0 100644
--- a/var/spack/repos/builtin/packages/hdf5-blosc/package.py
+++ b/var/spack/repos/builtin/packages/hdf5-blosc/package.py
@@ -53,7 +53,7 @@ class Hdf5Blosc(Package):
depends_on("c-blosc")
depends_on("hdf5")
- depends_on("libtool")
+ depends_on("libtool", type='build')
parallel = False
diff --git a/var/spack/repos/builtin/packages/hmmer/package.py b/var/spack/repos/builtin/packages/hmmer/package.py
new file mode 100644
index 0000000000..6a236e9fc9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/hmmer/package.py
@@ -0,0 +1,76 @@
+##############################################################################
+# 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 Hmmer(Package):
+ """HMMER is used for searching sequence databases for sequence homologs,
+ and for making sequence alignments. It implements methods using
+ probabilistic models called profile hidden Markov models (profile HMMs).
+ """
+ homepage = 'http://www.hmmer.org'
+ url = 'http://eddylab.org/software/hmmer3/3.1b2/hmmer-3.1b2.tar.gz'
+
+ version('3.1b2', 'c8c141018bc0ccd7fc37b33f2b945d5f')
+ version('3.0', '4cf685f3bc524ba5b5cdaaa070a83588')
+ version('2.4i', 'dab234c87e026ac1de942450750acd20')
+ version('2.3.2', '5f073340c0cf761288f961a73821228a')
+ version('2.3.1', 'c724413e5761c630892506698a4716e2')
+
+ variant('mpi', default=True, description='Compile with MPI')
+ variant('gsl', default=False, description='Compile with GSL')
+
+ depends_on('mpi', when='+mpi')
+ depends_on('gsl', when='+gsl')
+
+ def url_for_version(self, version):
+ base_url = 'http://eddylab.org/software'
+
+ if version >= Version('3.0'):
+ return '{0}/hmmer3/{1}/hmmer-{1}.tar.gz'.format(base_url, version)
+ else:
+ return '{0}/hmmer/{1}/hmmer-{1}.tar.gz'.format(base_url, version)
+
+ def install(self, spec, prefix):
+ configure_args = [
+ '--prefix={0}'.format(prefix)
+ ]
+
+ if '+gsl' in self.spec:
+ configure_args.extend([
+ '--with-gsl',
+ 'LIBS=-lgsl -lgslcblas'
+ ])
+
+ if '+mpi' in self.spec:
+ configure_args.append('--enable-mpi')
+
+ configure(*configure_args)
+ make()
+
+ if self.run_tests:
+ make('check')
+
+ make('install')
diff --git a/var/spack/repos/builtin/packages/hoomd-blue/package.py b/var/spack/repos/builtin/packages/hoomd-blue/package.py
index 90d5107e3b..060cd0b713 100644
--- a/var/spack/repos/builtin/packages/hoomd-blue/package.py
+++ b/var/spack/repos/builtin/packages/hoomd-blue/package.py
@@ -45,12 +45,12 @@ class HoomdBlue(Package):
variant('doc', default=True, description='Generate documentation')
extends('python')
- depends_on('py-numpy')
+ depends_on('py-numpy', type=nolink)
depends_on('boost+python')
- depends_on('cmake')
+ depends_on('cmake', type='build')
depends_on('mpi', when='+mpi')
depends_on('cuda', when='+cuda')
- depends_on('doxygen', when='+doc')
+ depends_on('doxygen', when='+doc', type='build')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/ibmisc/package.py b/var/spack/repos/builtin/packages/ibmisc/package.py
index 8e6cf429a7..ed1e6c6cbf 100644
--- a/var/spack/repos/builtin/packages/ibmisc/package.py
+++ b/var/spack/repos/builtin/packages/ibmisc/package.py
@@ -26,13 +26,13 @@ class Ibmisc(CMakePackage):
depends_on('netcdf-cxx4', when='+netcdf')
depends_on('udunits2', when='+udunits2')
depends_on('googletest', when='+googletest')
- depends_on('py-cython', when='+python')
- depends_on('py-numpy', when='+python')
+ depends_on('py-cython', when='+python', type=nolink)
+ depends_on('py-numpy', when='+python', type=nolink)
depends_on('boost', when='+boost')
# Build dependencies
- depends_on('cmake')
- depends_on('doxygen')
+ depends_on('cmake', type='build')
+ depends_on('doxygen', type='build')
def configure_args(self):
spec = self.spec
diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py
index 47c5ca0c09..3bd21df89e 100644
--- a/var/spack/repos/builtin/packages/ipopt/package.py
+++ b/var/spack/repos/builtin/packages/ipopt/package.py
@@ -38,7 +38,7 @@ class Ipopt(Package):
depends_on("blas")
depends_on("lapack")
- depends_on("pkg-config")
+ depends_on("pkg-config", type='build')
depends_on("mumps+double~mpi")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py
index 99d138dcff..536ce69236 100644
--- a/var/spack/repos/builtin/packages/julia/package.py
+++ b/var/spack/repos/builtin/packages/julia/package.py
@@ -44,16 +44,16 @@ class Julia(Package):
patch('openblas.patch', when='@0.4:0.4.5')
# Build-time dependencies:
- # depends_on("awk")
- # depends_on("m4")
- # depends_on("pkg-config")
+ # depends_on("awk", type='build')
+ # depends_on("m4", type='build')
+ # depends_on("pkg-config", type='build')
# Combined build-time and run-time dependencies:
- depends_on("binutils")
- depends_on("cmake @2.8:")
- depends_on("git")
- depends_on("openssl")
- depends_on("python @2.7:2.999")
+ depends_on("binutils", type=nolink)
+ depends_on("cmake @2.8:", type=nolink)
+ depends_on("git", type=nolink)
+ depends_on("openssl", type=nolink)
+ depends_on("python @2.7:2.999", type=nolink)
# I think that Julia requires the dependencies above, but it
# builds fine (on my system) without these. We should enable them
@@ -93,8 +93,8 @@ class Julia(Package):
# USE_SYSTEM_LIBGIT2=0
# Run-time dependencies for Julia packages:
- depends_on("hdf5")
- depends_on("mpi")
+ depends_on("hdf5", type='run')
+ depends_on("mpi", type='run')
def install(self, spec, prefix):
# Explicitly setting CC, CXX, or FC breaks building libuv, one
diff --git a/var/spack/repos/builtin/packages/launchmon/package.py b/var/spack/repos/builtin/packages/launchmon/package.py
index f256810005..8aa6d72727 100644
--- a/var/spack/repos/builtin/packages/launchmon/package.py
+++ b/var/spack/repos/builtin/packages/launchmon/package.py
@@ -33,9 +33,9 @@ class Launchmon(Package):
version('1.0.2', '8d6ba77a0ec2eff2fde2c5cc8fa7ff7a')
- depends_on('autoconf')
- depends_on('automake')
- depends_on('libtool')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
def install(self, spec, prefix):
configure(
diff --git a/var/spack/repos/builtin/packages/libgd/package.py b/var/spack/repos/builtin/packages/libgd/package.py
index 5e4e420842..938f4f6f3b 100644
--- a/var/spack/repos/builtin/packages/libgd/package.py
+++ b/var/spack/repos/builtin/packages/libgd/package.py
@@ -40,6 +40,7 @@ class Libgd(Package):
version('2.1.1', 'e91a1a99903e460e7ba00a794e72cc1e')
depends_on('libpng')
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
index 8615b2ed83..d1239ba0d9 100644
--- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
+++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py
@@ -35,8 +35,8 @@ class LibjpegTurbo(Package):
version('1.3.1', '2c3a68129dac443a72815ff5bb374b05')
# Can use either of these.
- depends_on("yasm")
- depends_on("nasm")
+ depends_on("yasm", type='build')
+ depends_on("nasm", type='build')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/libjson-c/package.py b/var/spack/repos/builtin/packages/libjson-c/package.py
index 75f3e130ad..662ed3cb5a 100644
--- a/var/spack/repos/builtin/packages/libjson-c/package.py
+++ b/var/spack/repos/builtin/packages/libjson-c/package.py
@@ -24,6 +24,7 @@
##############################################################################
from spack import *
+
class LibjsonC(Package):
""" A JSON implementation in C """
homepage = "https://github.com/json-c/json-c/wiki"
@@ -34,5 +35,5 @@ class LibjsonC(Package):
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
- make()
+ make(parallel=False)
make("install")
diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py
index 0e410a5061..a0070d72d0 100644
--- a/var/spack/repos/builtin/packages/libtool/package.py
+++ b/var/spack/repos/builtin/packages/libtool/package.py
@@ -35,7 +35,7 @@ class Libtool(Package):
version('2.4.6', 'addf44b646ddb4e3919805aa88fa7c5e')
version('2.4.2', 'd2f3b7d4627e69e13514a40e72a24d50')
- depends_on('m4')
+ depends_on('m4', type='build')
def _make_executable(self, name):
return Executable(join_path(self.prefix.bin, name))
diff --git a/var/spack/repos/builtin/packages/libuv/package.py b/var/spack/repos/builtin/packages/libuv/package.py
index 63565c7aea..0d29270b38 100644
--- a/var/spack/repos/builtin/packages/libuv/package.py
+++ b/var/spack/repos/builtin/packages/libuv/package.py
@@ -31,9 +31,9 @@ class Libuv(Package):
version('1.9.0', '14737f9c76123a19a290dabb7d1cd04c')
- depends_on('automake')
- depends_on('autoconf')
- depends_on('libtool')
+ depends_on('automake', type='build')
+ depends_on('autoconf', type='build')
+ depends_on('libtool', type='build')
def install(self, spec, prefix):
bash = which("bash")
diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py
index 746d4567e2..586eb970d8 100644
--- a/var/spack/repos/builtin/packages/libxcb/package.py
+++ b/var/spack/repos/builtin/packages/libxcb/package.py
@@ -36,9 +36,9 @@ class Libxcb(Package):
version('1.11', '1698dd837d7e6e94d029dbe8b3a82deb')
version('1.11.1', '118623c15a96b08622603a71d8789bf3')
- depends_on("python")
+ depends_on("python", type='build')
depends_on("xcb-proto")
- depends_on("pkg-config")
+ depends_on("pkg-config", type='build')
depends_on("libpthread-stubs")
depends_on('libxau')
diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py
index baaa2fc83d..a6dabd2c05 100644
--- a/var/spack/repos/builtin/packages/libxml2/package.py
+++ b/var/spack/repos/builtin/packages/libxml2/package.py
@@ -23,7 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
+
class Libxml2(Package):
"""Libxml2 is the XML C parser and toolkit developed for the Gnome
@@ -42,8 +42,8 @@ class Libxml2(Package):
def install(self, spec, prefix):
if '+python' in spec:
- site_packages_dir = os.path.join(prefix, 'lib/python%s.%s/site-packages' %(spec['python'].version[:2]))
- python_args = ["--with-python=%s" % spec['python'].prefix, "--with-python-install-dir=%s" % site_packages_dir]
+ python_args = ["--with-python=%s" % spec['python'].prefix,
+ "--with-python-install-dir=%s" % site_packages_dir]
else:
python_args = ["--without-python"]
diff --git a/var/spack/repos/builtin/packages/llvm-lld/package.py b/var/spack/repos/builtin/packages/llvm-lld/package.py
index 073c2d1b9e..127fe1204d 100644
--- a/var/spack/repos/builtin/packages/llvm-lld/package.py
+++ b/var/spack/repos/builtin/packages/llvm-lld/package.py
@@ -34,6 +34,8 @@ class LlvmLld(Package):
version('3.4', '3b6a17e58c8416c869c14dd37682f78e')
+ depends_on('cmake', type='build')
+
def install(self, spec, prefix):
env['CXXFLAGS'] = self.compier.cxx11_flag
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 7a6ea7401c..e79c123a7e 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -51,7 +51,7 @@ class Llvm(Package):
variant('all_targets', default=True, description="Build all supported targets, default targets <current arch>,NVPTX,AMDGPU,CppBackend")
# Build dependency
- depends_on('cmake @2.8.12.2:')
+ depends_on('cmake@2.8.12.2:', type='build')
# Universal dependency
depends_on('python@2.7:2.8') # Seems not to support python 3.X.Y
diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py
index 7d75866d52..efa235f646 100644
--- a/var/spack/repos/builtin/packages/lmod/package.py
+++ b/var/spack/repos/builtin/packages/lmod/package.py
@@ -42,8 +42,8 @@ class Lmod(Package):
version('6.0.1', '91abf52fe5033bd419ffe2842ebe7af9')
depends_on('lua@5.2:')
- depends_on('lua-luaposix')
- depends_on('lua-luafilesystem')
+ depends_on('lua-luaposix', type=nolink)
+ depends_on('lua-luafilesystem', type=nolink)
parallel = False
diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py
index 761932361b..ca0a481a83 100644
--- a/var/spack/repos/builtin/packages/lua/package.py
+++ b/var/spack/repos/builtin/packages/lua/package.py
@@ -86,7 +86,7 @@ class Lua(Package):
def setup_dependent_environment(self, spack_env, run_env, extension_spec):
lua_paths = []
- for d in extension_spec.traverse():
+ for d in extension_spec.traverse(deptypes=nolink, deptype_query='run'):
if d.package.extends(self.spec):
lua_paths.append(os.path.join(d.prefix, self.lua_lib_dir))
lua_paths.append(os.path.join(d.prefix, self.lua_share_dir))
@@ -140,11 +140,11 @@ class Lua(Package):
@property
def lua_lib_dir(self):
- return os.path.join('lib', 'lua', '%d.%d' % self.version[:2])
+ return os.path.join('lib', 'lua', self.version.up_to(2))
@property
def lua_share_dir(self):
- return os.path.join('share', 'lua', '%d.%d' % self.version[:2])
+ return os.path.join('share', 'lua', self.version.up_to(2))
def setup_dependent_package(self, module, ext_spec):
"""
diff --git a/var/spack/repos/builtin/packages/mbedtls/package.py b/var/spack/repos/builtin/packages/mbedtls/package.py
index ae34d25691..13c0ce768f 100644
--- a/var/spack/repos/builtin/packages/mbedtls/package.py
+++ b/var/spack/repos/builtin/packages/mbedtls/package.py
@@ -37,7 +37,7 @@ class Mbedtls(Package):
version('2.1.3' , '7eb4cf1dfa68578a2c8dbd0b6fa752dd')
version('1.3.16', '4144d7320c691f721aeb9e67a1bc38e0')
- depends_on('cmake')
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
cmake('.', *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/memaxes/package.py b/var/spack/repos/builtin/packages/memaxes/package.py
index 135384e2f7..31672abaec 100644
--- a/var/spack/repos/builtin/packages/memaxes/package.py
+++ b/var/spack/repos/builtin/packages/memaxes/package.py
@@ -32,7 +32,7 @@ class Memaxes(Package):
version('0.5', '5874f3fda9fd2d313c0ff9684f915ab5',
url='https://github.com/llnl/MemAxes/archive/v0.5.tar.gz')
- depends_on("cmake@2.8.9:")
+ depends_on('cmake@2.8.9:', type='build')
depends_on("qt@5:")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py
index bd9c9eec4a..3bad17b5cb 100644
--- a/var/spack/repos/builtin/packages/mesa/package.py
+++ b/var/spack/repos/builtin/packages/mesa/package.py
@@ -44,8 +44,8 @@ class Mesa(Package):
# mesa 10.x
# depends_on("py-mako")
- # depends_on("flex")
- # depends_on("bison")
+ # depends_on("flex", type='build')
+ # depends_on("bison", type='build')
# depends_on("dri2proto")
# depends_on("libxcb")
# depends_on("libxshmfence")
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py
index c4f2afaff2..2180f2cce2 100644
--- a/var/spack/repos/builtin/packages/metis/package.py
+++ b/var/spack/repos/builtin/packages/metis/package.py
@@ -50,7 +50,7 @@ class Metis(Package):
variant('idx64', default=False, description='Use int64_t as default index type')
variant('real64', default=False, description='Use double precision floating point types')
- depends_on('cmake@2.8:', when='@5:') # build-time dependency
+ depends_on('cmake@2.8:', when='@5:', type='build')
patch('install_gklib_defs_rename.patch', when='@5:')
diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py
index 1b4456380b..e7a1d96388 100644
--- a/var/spack/repos/builtin/packages/mfem/package.py
+++ b/var/spack/repos/builtin/packages/mfem/package.py
@@ -62,7 +62,7 @@ class Mfem(Package):
depends_on('blas', when='+suite-sparse')
depends_on('lapack', when='+suite-sparse')
depends_on('metis@5:', when='+suite-sparse ^suite-sparse@4.5:')
- depends_on('cmake', when='^metis@5:')
+ depends_on('cmake', when='^metis@5:', type='build')
def check_variants(self, spec):
if '+mpi' in spec and ('+hypre' not in spec or '+metis' not in spec):
diff --git a/var/spack/repos/builtin/packages/mpibash/package.py b/var/spack/repos/builtin/packages/mpibash/package.py
index b328b98ecf..e659663d90 100644
--- a/var/spack/repos/builtin/packages/mpibash/package.py
+++ b/var/spack/repos/builtin/packages/mpibash/package.py
@@ -36,7 +36,7 @@ class Mpibash(Package):
patch('mpibash-4.3.patch', level=1, when='@4.3')
# above patch modifies configure.ac
- depends_on('autoconf')
+ depends_on('autoconf', type='build')
# uses MPI_Exscan which is in MPI-1.2 and later
depends_on('mpi@1.2:')
diff --git a/var/spack/repos/builtin/packages/msgpack-c/package.py b/var/spack/repos/builtin/packages/msgpack-c/package.py
index 925dceabed..d42ac255d0 100644
--- a/var/spack/repos/builtin/packages/msgpack-c/package.py
+++ b/var/spack/repos/builtin/packages/msgpack-c/package.py
@@ -31,6 +31,8 @@ class MsgpackC(Package):
version('1.4.1', 'e2fd3a7419b9bc49e5017fdbefab87e0')
+ depends_on('cmake', type='build')
+
def install(self, spec, prefix):
cmake('.', *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/muster/package.py b/var/spack/repos/builtin/packages/muster/package.py
index 993f147245..64b7324415 100644
--- a/var/spack/repos/builtin/packages/muster/package.py
+++ b/var/spack/repos/builtin/packages/muster/package.py
@@ -39,6 +39,7 @@ class Muster(Package):
depends_on("boost")
depends_on("mpi")
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
cmake(".", *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py
index f8af76429b..0fb181a7b2 100644
--- a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py
+++ b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py
@@ -34,7 +34,7 @@ class NetcdfCxx4(Package):
version('4.2.1', 'd019853802092cf686254aaba165fc81')
depends_on('netcdf')
- depends_on("autoconf")
+ depends_on("autoconf", type='build')
def install(self, spec, prefix):
# Rebuild to prevent problems of inconsistency in git repo
diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py
index c2256d5e9f..063d38e4f9 100644
--- a/var/spack/repos/builtin/packages/netcdf/package.py
+++ b/var/spack/repos/builtin/packages/netcdf/package.py
@@ -39,7 +39,7 @@ class Netcdf(Package):
variant('mpi', default=True, description='Enables MPI parallelism')
variant('hdf4', default=False, description='Enable HDF4 support')
- depends_on("m4")
+ depends_on("m4", type='build')
depends_on("hdf", when='+hdf4')
# Required for DAP support
diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py
index 47857eb713..70015baf1c 100644
--- a/var/spack/repos/builtin/packages/netlib-lapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py
@@ -52,7 +52,7 @@ class NetlibLapack(Package):
provides('blas', when='~external-blas')
provides('lapack')
- depends_on('cmake')
+ depends_on('cmake', type='build')
depends_on('blas', when='+external-blas')
diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
index f7fe26a42d..a8250a38de 100644
--- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
@@ -42,9 +42,9 @@ class NetlibScalapack(Package):
provides('scalapack')
- depends_on('cmake')
depends_on('mpi')
depends_on('lapack')
+ depends_on('cmake', when='@2.0.0:', type='build')
def install(self, spec, prefix):
options = [
diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py
index e15d60cb0b..97164165e0 100644
--- a/var/spack/repos/builtin/packages/numdiff/package.py
+++ b/var/spack/repos/builtin/packages/numdiff/package.py
@@ -35,7 +35,7 @@ class Numdiff(Package):
version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e')
- depends_on('gettext', sys.platform=='darwin')
+ depends_on('gettext', when=sys.platform=='darwin', type='build')
def install(self, spec, prefix):
options = ['--prefix=%s' % prefix]
diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py
index 0f0fcfb733..108c8f8a41 100644
--- a/var/spack/repos/builtin/packages/oce/package.py
+++ b/var/spack/repos/builtin/packages/oce/package.py
@@ -23,24 +23,26 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import platform, sys
+import platform
+
class Oce(Package):
- """
- Open CASCADE Community Edition:
- patches/improvements/experiments contributed by users over the official Open CASCADE library.
+ """Open CASCADE Community Edition:
+ patches/improvements/experiments contributed by users over the official
+ Open CASCADE library.
"""
homepage = "https://github.com/tpaviot/oce"
url = "https://github.com/tpaviot/oce/archive/OCE-0.17.tar.gz"
+ version('0.17.2', 'bf2226be4cd192606af677cf178088e5')
version('0.17.1', '36c67b87093c675698b483454258af91')
- version('0.17' , 'f1a89395c4b0d199bea3db62b85f818d')
+ version('0.17', 'f1a89395c4b0d199bea3db62b85f818d')
version('0.16.1', '4d591b240c9293e879f50d86a0cb2bb3')
- version('0.16' , '7a4b4df5a104d75a537e25e7dd387eca')
+ version('0.16', '7a4b4df5a104d75a537e25e7dd387eca')
variant('tbb', default=True, description='Build with Intel Threading Building Blocks')
- depends_on('cmake@2.8:')
+ depends_on('cmake@2.8:', type='build')
depends_on('tbb', when='+tbb')
# There is a bug in OCE which appears with Clang (version?) or GCC 6.0
@@ -49,8 +51,7 @@ class Oce(Package):
# http://tracker.dev.opencascade.org/view.php?id=26042
# https://github.com/tpaviot/oce/issues/605
# https://github.com/tpaviot/oce/commit/61cb965b9ffeca419005bc15e635e67589c421dd.patch
- patch('null.patch',when='@0.16:0.17.1')
-
+ patch('null.patch', when='@0.16:0.17.1')
def install(self, spec, prefix):
options = []
@@ -63,7 +64,8 @@ class Oce(Package):
'-DOCE_DISABLE_X11:BOOL=ON',
'-DOCE_DRAW:BOOL=OFF',
'-DOCE_MODEL:BOOL=ON',
- '-DOCE_MULTITHREAD_LIBRARY:STRING=%s' % ('TBB' if '+tbb' in spec else 'NONE'),
+ '-DOCE_MULTITHREAD_LIBRARY:STRING=%s' % (
+ 'TBB' if '+tbb' in spec else 'NONE'),
'-DOCE_OCAF:BOOL=ON',
'-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=OFF',
'-DOCE_VISUALISATION:BOOL=OFF',
@@ -77,15 +79,8 @@ class Oce(Package):
'-DOCE_OSX_USE_COCOA:BOOL=ON',
])
- cmake('.', *options)
+ options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix)
+ cmake('.', *options)
make("install/strip")
-
- # OCE tests build is brocken at least on Darwin.
- # Unit tests are linked against libTKernel.10.dylib isntead of /full/path/libTKernel.10.dylib
- # see https://github.com/tpaviot/oce/issues/612
- # make("test")
-
- # The shared libraries are not installed correctly on Darwin; correct this
- if (sys.platform == 'darwin'):
- fix_darwin_install_name(prefix.lib)
+ make("test")
diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py
index f97bfc7d12..aa521899e5 100644
--- a/var/spack/repos/builtin/packages/octave/package.py
+++ b/var/spack/repos/builtin/packages/octave/package.py
@@ -61,16 +61,16 @@ class Octave(Package):
variant('qrupdate', default=False)
variant('qscintilla', default=False)
variant('qt', default=False)
- variant('suiteparse', default=False)
+ variant('suitesparse', default=False)
variant('zlib', default=False)
# Required dependencies
depends_on('blas')
depends_on('lapack')
# Octave does not configure with sed from darwin:
- depends_on('sed', sys.platform == 'darwin')
+ depends_on('sed', when=sys.platform == 'darwin', type='build')
depends_on('pcre')
- depends_on('pkg-config')
+ depends_on('pkg-config', type='build')
# Strongly recommended dependencies
depends_on('readline', when='+readline')
diff --git a/var/spack/repos/builtin/packages/ompt-openmp/package.py b/var/spack/repos/builtin/packages/ompt-openmp/package.py
index e74dcf6c23..800c04ae0e 100644
--- a/var/spack/repos/builtin/packages/ompt-openmp/package.py
+++ b/var/spack/repos/builtin/packages/ompt-openmp/package.py
@@ -31,7 +31,7 @@ class OmptOpenmp(Package):
version('0.1', '2334e6a84b52da41b27afd9831ed5370')
- # depends_on("foo")
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
with working_dir("runtime/build", create=True):
diff --git a/var/spack/repos/builtin/packages/opencv/package.py b/var/spack/repos/builtin/packages/opencv/package.py
index 989c66316c..ff551d0b92 100644
--- a/var/spack/repos/builtin/packages/opencv/package.py
+++ b/var/spack/repos/builtin/packages/opencv/package.py
@@ -54,7 +54,8 @@ class Opencv(Package):
depends_on('python')
depends_on('py-numpy')
- depends_on('eigen', when='+eigen')
+ depends_on('eigen', when='+eigen', type='build')
+ depends_on('cmake', type='build')
# FIXME : GUI extensions missing
# FIXME : CUDA extensions still missing
diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py
index 1d00edb06d..1bc5b04f6f 100644
--- a/var/spack/repos/builtin/packages/openjpeg/package.py
+++ b/var/spack/repos/builtin/packages/openjpeg/package.py
@@ -43,7 +43,7 @@ class Openjpeg(Package):
version('1.5.2', '545f98923430369a6b046ef3632ef95c')
version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e')
- depends_on('cmake')
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
cmake('.', *std_cmake_args)
diff --git a/var/spack/repos/builtin/packages/openspeedshop/package.py b/var/spack/repos/builtin/packages/openspeedshop/package.py
index c501ea063c..4e2694a53c 100644
--- a/var/spack/repos/builtin/packages/openspeedshop/package.py
+++ b/var/spack/repos/builtin/packages/openspeedshop/package.py
@@ -80,7 +80,7 @@ class Openspeedshop(Package):
variant('mpich2', default=False, description="Build mpi experiment collector for mpich2 MPI when this variant is enabled.")
variant('mpich', default=False, description="Build mpi experiment collector for mpich MPI when this variant is enabled.")
- depends_on("cmake@3.0.2")
+ depends_on("cmake@3.0.2", type='build')
# Dependencies for openspeedshop that are common to all the variants of the OpenSpeedShop build
depends_on("bison")
depends_on("flex")
diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py
index d0db4f7f20..4bbf0c1311 100644
--- a/var/spack/repos/builtin/packages/p4est/package.py
+++ b/var/spack/repos/builtin/packages/p4est/package.py
@@ -34,9 +34,9 @@ class P4est(Package):
variant('tests', default=True, description='Run small tests')
# build dependencies
- depends_on('automake')
- depends_on('autoconf')
- depends_on('libtool@2.4.2:')
+ depends_on('automake', type='build')
+ depends_on('autoconf', type='build')
+ depends_on('libtool@2.4.2:', type='build')
# other dependencies
depends_on('lua') # Needed for the submodule sc
diff --git a/var/spack/repos/builtin/packages/paradiseo/package.py b/var/spack/repos/builtin/packages/paradiseo/package.py
index d6324b63e6..97d36d94a4 100644
--- a/var/spack/repos/builtin/packages/paradiseo/package.py
+++ b/var/spack/repos/builtin/packages/paradiseo/package.py
@@ -48,13 +48,13 @@ class Paradiseo(Package):
variant('gnuplot', default=False, description='Enable GnuPlot support')
# Required dependencies
- depends_on ("cmake")
+ depends_on ("cmake", type='build')
# Optional dependencies
depends_on ("mpi", when="+mpi")
- depends_on ("doxygen", when='+doc')
+ depends_on ("doxygen", when='+doc', type='build')
depends_on ("gnuplot", when='+gnuplot')
- depends_on ("eigen", when='+edo')
+ depends_on ("eigen", when='+edo', type='build')
depends_on ("boost~mpi", when='+edo~mpi')
depends_on ("boost+mpi", when='+edo+mpi')
diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py
index 59c44c8a4a..deee46df8f 100644
--- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py
+++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py
@@ -39,7 +39,7 @@ class ParallelNetcdf(Package):
variant('fortran', default=True, description='Build the Fortran Interface')
variant('fpic', default=True, description='Produce position-independent code (for use with shared libraries)')
- depends_on("m4")
+ depends_on("m4", type='build')
depends_on("mpi")
# See: https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py
index 711cbc98c9..75f5272006 100644
--- a/var/spack/repos/builtin/packages/paraview/package.py
+++ b/var/spack/repos/builtin/packages/paraview/package.py
@@ -43,12 +43,13 @@ class Paraview(Package):
variant('opengl2', default=False, description='Enable OpenGL2 backend')
depends_on('python@2:2.7', when='+python')
- depends_on('py-numpy', when='+python')
- depends_on('py-matplotlib', when='+python')
+ depends_on('py-numpy', when='+python', type='run')
+ depends_on('py-matplotlib', when='+python', type='run')
depends_on('tcl', when='+tcl')
depends_on('mpi', when='+mpi')
depends_on('qt@:4', when='+qt')
+ depends_on('cmake', type='build')
depends_on('bzip2')
depends_on('freetype')
#depends_on('hdf5+mpi', when='+mpi')
diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py
index 9b36f273e4..b2ceadc128 100644
--- a/var/spack/repos/builtin/packages/parmetis/package.py
+++ b/var/spack/repos/builtin/packages/parmetis/package.py
@@ -42,7 +42,7 @@ class Parmetis(Package):
variant('debug', default=False, description='Builds the library in debug mode')
variant('gdb', default=False, description='Enables gdb support')
- depends_on('cmake@2.8:') # build dependency
+ depends_on('cmake@2.8:', type='build') # build dependency
depends_on('mpi')
depends_on('metis@5:')
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 6a7bee9788..11f5c36c22 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -149,20 +149,22 @@ class Petsc(Package):
make("install")
# solve Poisson equation in 2D to make sure nothing is broken:
- with working_dir('src/ksp/ksp/examples/tutorials'):
- cc = os.environ['CC'] if '~mpi' in self.spec else self.spec['mpi'].mpicc # NOQA: ignore=E501
- os.system('%s ex50.c -I%s -L%s -lpetsc -o ex50' % (
- cc, prefix.include, prefix.lib))
- ex50 = Executable('./ex50')
- ex50('-da_grid_x', '4', '-da_grid_y', '4')
- if 'superlu-dist' in spec:
- ex50('-da_grid_x', '4', '-da_grid_y', '4', '-pc_type', 'lu', '-pc_factor_mat_solver_package', 'superlu_dist') # NOQA: ignore=E501
-
- if 'mumps' in spec:
- ex50('-da_grid_x', '4', '-da_grid_y', '4', '-pc_type', 'lu', '-pc_factor_mat_solver_package', 'mumps') # NOQA: ignore=E501
-
- if 'hypre' in spec:
- ex50('-da_grid_x', '4', '-da_grid_y', '4', '-pc_type', 'hypre', '-pc_hypre_type', 'boomeramg') # NOQA: ignore=E501
+ if ('mpi' in spec) and self.run_tests:
+ with working_dir('src/ksp/ksp/examples/tutorials'):
+ env['PETSC_DIR'] = self.prefix
+ cc = Executable(spec['mpi'].mpicc)
+ cc('ex50.c', '-I%s' % prefix.include, '-L%s' % prefix.lib,
+ '-lpetsc', '-lm', '-o', 'ex50')
+ run = Executable(join_path(spec['mpi'].prefix.bin, 'mpirun'))
+ run('ex50', '-da_grid_x', '4', '-da_grid_y', '4')
+ if 'superlu-dist' in spec:
+ run('ex50', '-da_grid_x', '4', '-da_grid_y', '4', '-pc_type', 'lu', '-pc_factor_mat_solver_package', 'superlu_dist') # NOQA: ignore=E501
+
+ if 'mumps' in spec:
+ run('ex50', '-da_grid_x', '4', '-da_grid_y', '4', '-pc_type', 'lu', '-pc_factor_mat_solver_package', 'mumps') # NOQA: ignore=E501
+
+ if 'hypre' in spec:
+ run('ex50', '-da_grid_x', '4', '-da_grid_y', '4', '-pc_type', 'hypre', '-pc_hypre_type', 'boomeramg') # NOQA: ignore=E501
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
# set up PETSC_DIR for everyone using PETSc package
diff --git a/var/spack/repos/builtin/packages/pidx/package.py b/var/spack/repos/builtin/packages/pidx/package.py
index d38dcd7b96..e7b18ce7a8 100644
--- a/var/spack/repos/builtin/packages/pidx/package.py
+++ b/var/spack/repos/builtin/packages/pidx/package.py
@@ -36,6 +36,7 @@ class Pidx(Package):
version('1.0', git='https://github.com/sci-visus/PIDX.git',
commit='6afa1cf71d1c41263296dc049c8fabaf73c296da')
+ depends_on('cmake', type='build')
depends_on("mpi")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py
index fc77ba7412..192dd86e0e 100644
--- a/var/spack/repos/builtin/packages/psi4/package.py
+++ b/var/spack/repos/builtin/packages/psi4/package.py
@@ -41,8 +41,8 @@ class Psi4(Package):
depends_on('lapack')
depends_on('boost+chrono+filesystem+python+regex+serialization+system+timer+thread')
depends_on('python')
- depends_on('cmake')
- depends_on('py-numpy')
+ depends_on('cmake', type='build')
+ depends_on('py-numpy', type=nolink)
# Optional dependencies
# TODO: add packages for these
diff --git a/var/spack/repos/builtin/packages/py-astroid/package.py b/var/spack/repos/builtin/packages/py-astroid/package.py
index 8ba6696b0c..e1ea71fb67 100644
--- a/var/spack/repos/builtin/packages/py-astroid/package.py
+++ b/var/spack/repos/builtin/packages/py-astroid/package.py
@@ -22,7 +22,7 @@
# 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 depends_on, extends, version
+from spack import depends_on, extends, version, nolink
from spack import Package
@@ -37,9 +37,9 @@ class PyAstroid(Package):
version('1.4.1', 'ed70bfed5e4b25be4292e7fe72da2c02')
extends('python')
- depends_on('py-logilab-common')
- depends_on('py-setuptools')
- depends_on('py-six')
+ depends_on('py-logilab-common', type=nolink)
+ depends_on('py-setuptools', type='build')
+ depends_on('py-six', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py
index a9962777dc..25dce87e49 100644
--- a/var/spack/repos/builtin/packages/py-astropy/package.py
+++ b/var/spack/repos/builtin/packages/py-astropy/package.py
@@ -38,18 +38,18 @@ class PyAstropy(Package):
# Required dependencies
extends('python')
- depends_on('py-numpy')
+ depends_on('py-numpy', type=nolink)
# Optional dependencies
- depends_on('py-h5py')
- depends_on('py-beautifulsoup4')
- depends_on('py-pyyaml')
- depends_on('py-scipy')
+ depends_on('py-h5py', type=nolink)
+ depends_on('py-beautifulsoup4', type=nolink)
+ depends_on('py-pyyaml', type=nolink)
+ depends_on('py-scipy', type=nolink)
depends_on('libxml2')
- depends_on('py-matplotlib')
- depends_on('py-pytz')
- depends_on('py-scikit-image')
- depends_on('py-pandas')
+ depends_on('py-matplotlib', type=nolink)
+ depends_on('py-pytz', type=nolink)
+ depends_on('py-scikit-image', type=nolink)
+ depends_on('py-pandas', type=nolink)
# System dependencies
depends_on('cfitsio')
diff --git a/var/spack/repos/builtin/packages/py-autopep8/package.py b/var/spack/repos/builtin/packages/py-autopep8/package.py
index f2fd3cd683..507664949b 100644
--- a/var/spack/repos/builtin/packages/py-autopep8/package.py
+++ b/var/spack/repos/builtin/packages/py-autopep8/package.py
@@ -8,8 +8,8 @@ class PyAutopep8(Package):
version('1.2.2', 'def3d023fc9dfd1b7113602e965ad8e1')
extends('python')
- depends_on('py-setuptools')
- depends_on('py-pep8')
+ depends_on('py-setuptools', type='build')
+ depends_on('py-pep8', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-basemap/package.py b/var/spack/repos/builtin/packages/py-basemap/package.py
index 13f604bacd..9c7f6454df 100644
--- a/var/spack/repos/builtin/packages/py-basemap/package.py
+++ b/var/spack/repos/builtin/packages/py-basemap/package.py
@@ -35,10 +35,10 @@ class PyBasemap(Package):
version('1.0.7', '48c0557ced9e2c6e440b28b3caff2de8')
extends('python')
- depends_on('py-setuptools')
- depends_on('py-numpy')
- depends_on('py-matplotlib+gui')
- depends_on('pil')
+ depends_on('py-setuptools', type='build')
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-matplotlib+gui', type=nolink)
+ depends_on('pil', type=nolink)
depends_on("geos")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/py-biopython/package.py b/var/spack/repos/builtin/packages/py-biopython/package.py
index 26f42e060b..bcc889756e 100644
--- a/var/spack/repos/builtin/packages/py-biopython/package.py
+++ b/var/spack/repos/builtin/packages/py-biopython/package.py
@@ -32,8 +32,8 @@ class PyBiopython(Package):
version('1.65', '143e7861ade85c0a8b5e2bbdd1da1f67')
extends('python')
- depends_on('py-mx')
- depends_on('py-numpy')
+ depends_on('py-mx', type=nolink)
+ depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-blessings/package.py b/var/spack/repos/builtin/packages/py-blessings/package.py
index 05a1f5bcbb..8d7a2343d1 100644
--- a/var/spack/repos/builtin/packages/py-blessings/package.py
+++ b/var/spack/repos/builtin/packages/py-blessings/package.py
@@ -31,7 +31,7 @@ class PyBlessings(Package):
version('1.6', '4f552a8ebcd4982693c92571beb99394')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
extends("python")
diff --git a/var/spack/repos/builtin/packages/py-bottleneck/package.py b/var/spack/repos/builtin/packages/py-bottleneck/package.py
index 1a186b219c..2483fab85f 100644
--- a/var/spack/repos/builtin/packages/py-bottleneck/package.py
+++ b/var/spack/repos/builtin/packages/py-bottleneck/package.py
@@ -32,7 +32,7 @@ class PyBottleneck(Package):
version('1.0.0', '380fa6f275bd24f27e7cf0e0d752f5d2')
extends('python')
- depends_on('py-numpy')
+ depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py
index 58d0a81990..e54d50fa50 100644
--- a/var/spack/repos/builtin/packages/py-cffi/package.py
+++ b/var/spack/repos/builtin/packages/py-cffi/package.py
@@ -33,8 +33,8 @@ class PyCffi(Package):
version('1.1.2', 'ca6e6c45b45caa87aee9adc7c796eaea')
extends('python')
- depends_on('py-setuptools')
- depends_on('py-pycparser')
+ depends_on('py-setuptools', type='build')
+ depends_on('py-pycparser', type=nolink)
depends_on('libffi')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/py-coverage/package.py b/var/spack/repos/builtin/packages/py-coverage/package.py
index 92a5bd0088..b7eaf58cd6 100644
--- a/var/spack/repos/builtin/packages/py-coverage/package.py
+++ b/var/spack/repos/builtin/packages/py-coverage/package.py
@@ -32,7 +32,7 @@ class PyCoverage(Package):
version('4.0a6', '1bb4058062646148965bef0796b61efc')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
extends('python')
diff --git a/var/spack/repos/builtin/packages/py-csvkit/package.py b/var/spack/repos/builtin/packages/py-csvkit/package.py
index 7fe2f953f7..2deaa2f74e 100644
--- a/var/spack/repos/builtin/packages/py-csvkit/package.py
+++ b/var/spack/repos/builtin/packages/py-csvkit/package.py
@@ -35,12 +35,12 @@ class PyCsvkit(Package):
extends('python')
- depends_on('py-dateutil')
- depends_on('py-dbf')
- depends_on('py-xlrd')
- depends_on('py-SQLAlchemy')
- depends_on('py-six')
- depends_on('py-openpyxl')
+ depends_on('py-dateutil', type=nolink)
+ depends_on('py-dbf', type=nolink)
+ depends_on('py-xlrd', type=nolink)
+ depends_on('py-SQLAlchemy', type=nolink)
+ depends_on('py-six', type=nolink)
+ depends_on('py-openpyxl', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py
index 831f86e81c..b7dbab3d97 100644
--- a/var/spack/repos/builtin/packages/py-dask/package.py
+++ b/var/spack/repos/builtin/packages/py-dask/package.py
@@ -33,7 +33,7 @@ class PyDask(Package):
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-dateutil/package.py b/var/spack/repos/builtin/packages/py-dateutil/package.py
index eb8eb09e75..dfd1e143d9 100644
--- a/var/spack/repos/builtin/packages/py-dateutil/package.py
+++ b/var/spack/repos/builtin/packages/py-dateutil/package.py
@@ -34,8 +34,8 @@ class PyDateutil(Package):
version('2.5.2', 'eafe168e8f404bf384514f5116eedbb6')
extends('python')
- depends_on('py-setuptools')
- depends_on('py-six')
+ depends_on('py-setuptools', type='build')
+ depends_on('py-six', type=nolink)
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
index 90a95cd0cb..bd78f262f4 100644
--- a/var/spack/repos/builtin/packages/py-decorator/package.py
+++ b/var/spack/repos/builtin/packages/py-decorator/package.py
@@ -33,7 +33,7 @@ class PyDecorator(Package):
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-emcee/package.py b/var/spack/repos/builtin/packages/py-emcee/package.py
index d57ef4bd76..397f737cb1 100644
--- a/var/spack/repos/builtin/packages/py-emcee/package.py
+++ b/var/spack/repos/builtin/packages/py-emcee/package.py
@@ -35,7 +35,7 @@ class PyEmcee(Package):
version('2.1.0', 'c6b6fad05c824d40671d4a4fc58dfff7')
extends('python')
- depends_on('py-numpy')
+ depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-flake8/package.py b/var/spack/repos/builtin/packages/py-flake8/package.py
index b261467d84..2fabe03d66 100644
--- a/var/spack/repos/builtin/packages/py-flake8/package.py
+++ b/var/spack/repos/builtin/packages/py-flake8/package.py
@@ -34,7 +34,7 @@ class PyFlake8(Package):
version('2.5.4', 'a4585b3569b95c3f66acb8294a7f06ef')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-funcsigs/package.py b/var/spack/repos/builtin/packages/py-funcsigs/package.py
index 9d987b284e..11ba639b85 100644
--- a/var/spack/repos/builtin/packages/py-funcsigs/package.py
+++ b/var/spack/repos/builtin/packages/py-funcsigs/package.py
@@ -34,7 +34,7 @@ class PyFuncsigs(Package):
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-genshi/package.py b/var/spack/repos/builtin/packages/py-genshi/package.py
index cba479a88f..ea8d26c796 100644
--- a/var/spack/repos/builtin/packages/py-genshi/package.py
+++ b/var/spack/repos/builtin/packages/py-genshi/package.py
@@ -36,7 +36,7 @@ class PyGenshi(Package):
version('0.6', '604e8b23b4697655d36a69c2d8ef7187')
extends("python")
- depends_on("py-setuptools")
+ depends_on("py-setuptools", type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-gnuplot/package.py b/var/spack/repos/builtin/packages/py-gnuplot/package.py
index 3381c4a5ac..b08b03d1f1 100644
--- a/var/spack/repos/builtin/packages/py-gnuplot/package.py
+++ b/var/spack/repos/builtin/packages/py-gnuplot/package.py
@@ -32,7 +32,7 @@ class PyGnuplot(Package):
version('1.8', 'abd6f571e7aec68ae7db90a5217cd5b1')
extends('python')
- depends_on('py-numpy')
+ depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py
index 0180b658f5..c1950a91ac 100644
--- a/var/spack/repos/builtin/packages/py-h5py/package.py
+++ b/var/spack/repos/builtin/packages/py-h5py/package.py
@@ -41,17 +41,17 @@ class PyH5py(Package):
extends('python')
# Build dependencies
- depends_on('py-cython@0.19:')
- depends_on('pkg-config')
- depends_on('hdf5@1.8.4:+mpi', when='+mpi')
- depends_on('hdf5@1.8.4:~mpi', when='~mpi')
+ depends_on('py-cython@0.19:', type='build')
+ depends_on('pkg-config', type='build')
+ depends_on('hdf5@1.8.4:')
+ depends_on('hdf5+mpi', when='+mpi')
depends_on('mpi', when='+mpi')
# Build and runtime dependencies
- depends_on('py-numpy@1.6.1:')
+ depends_on('py-numpy@1.6.1:', type=nolink)
# Runtime dependencies
- depends_on('py-six')
+ depends_on('py-six', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'configure',
diff --git a/var/spack/repos/builtin/packages/py-iminuit/package.py b/var/spack/repos/builtin/packages/py-iminuit/package.py
index 47751a702d..d7446c06d4 100644
--- a/var/spack/repos/builtin/packages/py-iminuit/package.py
+++ b/var/spack/repos/builtin/packages/py-iminuit/package.py
@@ -35,12 +35,12 @@ class PyIminuit(Package):
# Required dependencies
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
# Optional dependencies
- depends_on('py-numpy')
- depends_on('py-matplotlib')
- depends_on('py-cython')
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-matplotlib', type=nolink)
+ depends_on('py-cython', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-ipython/package.py b/var/spack/repos/builtin/packages/py-ipython/package.py
index 7a94f90b38..b583609953 100644
--- a/var/spack/repos/builtin/packages/py-ipython/package.py
+++ b/var/spack/repos/builtin/packages/py-ipython/package.py
@@ -33,8 +33,8 @@ class PyIpython(Package):
version('3.1.0', 'a749d90c16068687b0ec45a27e72ef8f')
extends('python')
- depends_on('py-pygments')
- depends_on('py-setuptools')
+ depends_on('py-pygments', type=nolink)
+ depends_on('py-setuptools', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-jinja2/package.py b/var/spack/repos/builtin/packages/py-jinja2/package.py
index 48312d9baf..57f26e3b90 100644
--- a/var/spack/repos/builtin/packages/py-jinja2/package.py
+++ b/var/spack/repos/builtin/packages/py-jinja2/package.py
@@ -22,7 +22,7 @@
# 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 depends_on, extends, version
+from spack import depends_on, extends, version, nolink
from spack import Package
@@ -43,8 +43,8 @@ class PyJinja2(Package):
version('2.7', 'ec70433f325051dcedacbb2465028a35')
extends("python")
- depends_on("py-setuptools")
- depends_on("py-markupsafe")
+ depends_on("py-setuptools", type='build')
+ depends_on("py-markupsafe", type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-lockfile/package.py b/var/spack/repos/builtin/packages/py-lockfile/package.py
index 998b41abc6..38cc81b895 100644
--- a/var/spack/repos/builtin/packages/py-lockfile/package.py
+++ b/var/spack/repos/builtin/packages/py-lockfile/package.py
@@ -41,7 +41,7 @@ class PyLockfile(Package):
version('0.10.2', '1aa6175a6d57f082cd12e7ac6102ab15')
extends("python")
- depends_on("py-setuptools")
+ depends_on("py-setuptools", type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-logilab-common/package.py b/var/spack/repos/builtin/packages/py-logilab-common/package.py
index 8675c48e9a..6dab4a40e4 100644
--- a/var/spack/repos/builtin/packages/py-logilab-common/package.py
+++ b/var/spack/repos/builtin/packages/py-logilab-common/package.py
@@ -22,7 +22,7 @@
# 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 depends_on, extends, version
+from spack import depends_on, extends, version, nolink
from spack import Package
@@ -34,8 +34,8 @@ class PyLogilabCommon(Package):
version('1.2.0', 'f7b51351b7bfe052746fa04c03253c0b')
extends("python")
- depends_on("py-setuptools")
- depends_on("py-six")
+ depends_on("py-setuptools", type='build')
+ depends_on("py-six", type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-mako/package.py b/var/spack/repos/builtin/packages/py-mako/package.py
index a03ef4defb..56741ec11f 100644
--- a/var/spack/repos/builtin/packages/py-mako/package.py
+++ b/var/spack/repos/builtin/packages/py-mako/package.py
@@ -33,7 +33,7 @@ class PyMako(Package):
version('1.0.1', '9f0aafd177b039ef67b90ea350497a54')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
extends('python')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/py-markupsafe/package.py b/var/spack/repos/builtin/packages/py-markupsafe/package.py
index 58c9f70066..ee396de7be 100644
--- a/var/spack/repos/builtin/packages/py-markupsafe/package.py
+++ b/var/spack/repos/builtin/packages/py-markupsafe/package.py
@@ -44,7 +44,7 @@ class PyMarkupsafe(Package):
version('0.19', '64b05361adb92c11839fc470e308c593')
extends("python")
- depends_on("py-setuptools")
+ depends_on("py-setuptools", type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py
index 14f9716ae6..b5eb8a53c4 100644
--- a/var/spack/repos/builtin/packages/py-matplotlib/package.py
+++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py
@@ -38,19 +38,20 @@ class PyMatplotlib(Package):
extends('python', ignore=r'bin/nosetests.*$|bin/pbr$')
- depends_on('py-pyside', when='+gui')
- depends_on('py-ipython', when='+ipython')
- depends_on('py-pyparsing')
- depends_on('py-six')
- depends_on('py-dateutil')
- depends_on('py-pytz')
- depends_on('py-nose')
- depends_on('py-numpy')
- depends_on('py-mock')
- depends_on('py-pbr')
- depends_on('py-funcsigs')
+ depends_on('py-setuptools', type='build')
+ depends_on('py-pyside', when='+gui', type=nolink)
+ depends_on('py-ipython', when='+ipython', type=nolink)
+ depends_on('py-pyparsing', type=nolink)
+ depends_on('py-six', type=nolink)
+ depends_on('py-dateutil', type=nolink)
+ depends_on('py-pytz', type=nolink)
+ depends_on('py-nose', type=nolink)
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-mock', type=nolink)
+ depends_on('py-pbr', type=nolink)
+ depends_on('py-funcsigs', type=nolink)
- depends_on('pkg-config')
+ depends_on('pkg-config', type='build')
depends_on('freetype')
depends_on('qt', when='+gui')
depends_on('bzip2')
diff --git a/var/spack/repos/builtin/packages/py-mistune/package.py b/var/spack/repos/builtin/packages/py-mistune/package.py
index 9bcbb5a927..399c10005e 100644
--- a/var/spack/repos/builtin/packages/py-mistune/package.py
+++ b/var/spack/repos/builtin/packages/py-mistune/package.py
@@ -40,7 +40,7 @@ class PyMistune(Package):
version('0.5', '997736554f1f95eea78c66ae339b5722')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-mock/package.py b/var/spack/repos/builtin/packages/py-mock/package.py
index 0587131b88..f4c178de67 100644
--- a/var/spack/repos/builtin/packages/py-mock/package.py
+++ b/var/spack/repos/builtin/packages/py-mock/package.py
@@ -35,8 +35,8 @@ class PyMock(Package):
version('1.3.0', '73ee8a4afb3ff4da1b4afa287f39fdeb')
extends('python')
- depends_on('py-pbr')
- depends_on('py-setuptools@17.1:')
+ depends_on('py-pbr', type=nolink)
+ depends_on('py-setuptools@17.1:', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-mpi4py/package.py b/var/spack/repos/builtin/packages/py-mpi4py/package.py
index 2764b8b3c6..a749e16779 100644
--- a/var/spack/repos/builtin/packages/py-mpi4py/package.py
+++ b/var/spack/repos/builtin/packages/py-mpi4py/package.py
@@ -33,7 +33,7 @@ class PyMpi4py(Package):
version('1.3.1', 'dbe9d22bdc8ed965c23a7ceb6f32fc3c')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
depends_on('mpi')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/py-mysqldb1/package.py b/var/spack/repos/builtin/packages/py-mysqldb1/package.py
index 9918ba3e64..46b44f34dd 100644
--- a/var/spack/repos/builtin/packages/py-mysqldb1/package.py
+++ b/var/spack/repos/builtin/packages/py-mysqldb1/package.py
@@ -32,7 +32,7 @@ class PyMysqldb1(Package):
version('1.2.5', '332c8f4955b6bc0c79ea15170bf7321b')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-nestle/package.py b/var/spack/repos/builtin/packages/py-nestle/package.py
index 16506e3eca..81f9fe4d09 100644
--- a/var/spack/repos/builtin/packages/py-nestle/package.py
+++ b/var/spack/repos/builtin/packages/py-nestle/package.py
@@ -35,10 +35,10 @@ class PyNestle(Package):
# Required dependencies
extends('python')
- depends_on('py-numpy')
+ depends_on('py-numpy', type=nolink)
# Optional dependencies
- depends_on('py-scipy')
+ depends_on('py-scipy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-netcdf/package.py b/var/spack/repos/builtin/packages/py-netcdf/package.py
index e3f857a0ce..9a354cb1c1 100644
--- a/var/spack/repos/builtin/packages/py-netcdf/package.py
+++ b/var/spack/repos/builtin/packages/py-netcdf/package.py
@@ -32,8 +32,8 @@ class PyNetcdf(Package):
version('1.2.3.1', '4fc4320d4f2a77b894ebf8da1c9895af')
extends('python')
- depends_on('py-numpy')
- depends_on('py-cython')
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-cython', type=nolink)
depends_on('netcdf')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/py-networkx/package.py b/var/spack/repos/builtin/packages/py-networkx/package.py
index 6bdb24e36e..d545717628 100644
--- a/var/spack/repos/builtin/packages/py-networkx/package.py
+++ b/var/spack/repos/builtin/packages/py-networkx/package.py
@@ -33,7 +33,7 @@ class PyNetworkx(Package):
extends('python')
- depends_on('py-decorator')
+ depends_on('py-decorator', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-nose/package.py b/var/spack/repos/builtin/packages/py-nose/package.py
index abb2d500a2..d15a1784d1 100644
--- a/var/spack/repos/builtin/packages/py-nose/package.py
+++ b/var/spack/repos/builtin/packages/py-nose/package.py
@@ -37,7 +37,7 @@ class PyNose(Package):
version('1.3.7', '4d3ad0ff07b61373d2cefc89c5d0b20b')
extends('python', ignore=r'bin/nosetests.*$')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-numexpr/package.py b/var/spack/repos/builtin/packages/py-numexpr/package.py
index d8bacd179f..fd8d7dc0c6 100644
--- a/var/spack/repos/builtin/packages/py-numexpr/package.py
+++ b/var/spack/repos/builtin/packages/py-numexpr/package.py
@@ -34,7 +34,7 @@ class PyNumexpr(Package):
version('2.5', '84f66cced45ba3e30dcf77a937763aaa')
extends('python')
- depends_on('py-numpy')
+ depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py
index e9672b7bb0..273f5bfd8d 100644
--- a/var/spack/repos/builtin/packages/py-numpy/package.py
+++ b/var/spack/repos/builtin/packages/py-numpy/package.py
@@ -43,7 +43,7 @@ class PyNumpy(Package):
variant('lapack', default=True)
extends('python')
- depends_on('py-nose')
+ depends_on('py-nose', type='build')
depends_on('blas', when='+blas')
depends_on('lapack', when='+lapack')
diff --git a/var/spack/repos/builtin/packages/py-openpyxl/package.py b/var/spack/repos/builtin/packages/py-openpyxl/package.py
index 30cb52348f..624da58ff3 100644
--- a/var/spack/repos/builtin/packages/py-openpyxl/package.py
+++ b/var/spack/repos/builtin/packages/py-openpyxl/package.py
@@ -34,8 +34,8 @@ class PyOpenpyxl(Package):
extends('python')
- depends_on('py-jdcal')
- depends_on('py-setuptools')
+ depends_on('py-jdcal', type=nolink)
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py
index 7f54fc5d76..8bd4227faf 100644
--- a/var/spack/repos/builtin/packages/py-pandas/package.py
+++ b/var/spack/repos/builtin/packages/py-pandas/package.py
@@ -35,12 +35,12 @@ class PyPandas(Package):
version('0.18.0', 'f143762cd7a59815e348adf4308d2cf6')
extends('python')
- depends_on('py-dateutil')
- depends_on('py-numpy')
- depends_on('py-setuptools')
- depends_on('py-pytz')
- depends_on('py-numexpr')
- depends_on('py-bottleneck')
+ depends_on('py-dateutil', type=nolink)
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-setuptools', type='build')
+ depends_on('py-pytz', type=nolink)
+ depends_on('py-numexpr', type=nolink)
+ depends_on('py-bottleneck', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pbr/package.py b/var/spack/repos/builtin/packages/py-pbr/package.py
index 336ea37144..8502b0b364 100644
--- a/var/spack/repos/builtin/packages/py-pbr/package.py
+++ b/var/spack/repos/builtin/packages/py-pbr/package.py
@@ -34,7 +34,7 @@ class PyPbr(Package):
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pep8/package.py b/var/spack/repos/builtin/packages/py-pep8/package.py
index 987783b392..ffcc2b318c 100644
--- a/var/spack/repos/builtin/packages/py-pep8/package.py
+++ b/var/spack/repos/builtin/packages/py-pep8/package.py
@@ -8,7 +8,7 @@ class PyPep8(Package):
version('1.7.0', '31070a3a6391928893cbf5fa523eb8d9')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-periodictable/package.py b/var/spack/repos/builtin/packages/py-periodictable/package.py
index 7d8a635979..608f4e16c1 100644
--- a/var/spack/repos/builtin/packages/py-periodictable/package.py
+++ b/var/spack/repos/builtin/packages/py-periodictable/package.py
@@ -33,8 +33,8 @@ class PyPeriodictable(Package):
version('1.4.1', '7246b63cc0b6b1be6e86b6616f9e866e')
- depends_on('py-numpy')
- depends_on('py-pyparsing')
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-pyparsing', type=nolink)
extends('python')
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/py-phonopy/package.py b/var/spack/repos/builtin/packages/py-phonopy/package.py
index 68774c90c2..a3a4b7a9f7 100644
--- a/var/spack/repos/builtin/packages/py-phonopy/package.py
+++ b/var/spack/repos/builtin/packages/py-phonopy/package.py
@@ -33,10 +33,10 @@ class PyPhonopy(Package):
version('1.10.0', '973ed1bcea46e21b9bf747aab9061ff6')
extends('python')
- depends_on('py-numpy')
- depends_on('py-scipy')
- depends_on('py-matplotlib')
- depends_on('py-pyyaml')
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-scipy', type=nolink)
+ depends_on('py-matplotlib', type=nolink)
+ depends_on('py-pyyaml', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--home=%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 25cf412b31..13a09f63cf 100644
--- a/var/spack/repos/builtin/packages/py-pillow/package.py
+++ b/var/spack/repos/builtin/packages/py-pillow/package.py
@@ -62,8 +62,8 @@ class PyPillow(Package):
# Required dependencies
extends('python')
- depends_on('binutils')
- depends_on('py-setuptools')
+ depends_on('binutils', type='build')
+ depends_on('py-setuptools', type='build')
# Recommended dependencies
depends_on('jpeg', when='+jpeg')
diff --git a/var/spack/repos/builtin/packages/py-prettytable/package.py b/var/spack/repos/builtin/packages/py-prettytable/package.py
index e3edc7b706..cf814733d4 100644
--- a/var/spack/repos/builtin/packages/py-prettytable/package.py
+++ b/var/spack/repos/builtin/packages/py-prettytable/package.py
@@ -38,7 +38,7 @@ class PyPrettytable(Package):
version('0.7.2', 'a6b80afeef286ce66733d54a0296b13b')
extends("python")
- depends_on("py-setuptools")
+ depends_on("py-setuptools", type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-protobuf/package.py b/var/spack/repos/builtin/packages/py-protobuf/package.py
index da3a65c22e..dd2b5651de 100644
--- a/var/spack/repos/builtin/packages/py-protobuf/package.py
+++ b/var/spack/repos/builtin/packages/py-protobuf/package.py
@@ -44,7 +44,7 @@ class PyProtobuf(Package):
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-py2neo/package.py b/var/spack/repos/builtin/packages/py-py2neo/package.py
index 9c6e219264..02f37d8b78 100644
--- a/var/spack/repos/builtin/packages/py-py2neo/package.py
+++ b/var/spack/repos/builtin/packages/py-py2neo/package.py
@@ -38,7 +38,7 @@ class PyPy2neo(Package):
version('2.0.5', '143b1f9c0aa22faf170c1b9f84c7343b')
version('2.0.4', 'b3f7efd3344dc3f66db4eda11e5899f7')
- depends_on("py-setuptools")
+ depends_on("py-setuptools", type='build')
extends("python")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/py-pycparser/package.py b/var/spack/repos/builtin/packages/py-pycparser/package.py
index c33769c526..9afba50077 100644
--- a/var/spack/repos/builtin/packages/py-pycparser/package.py
+++ b/var/spack/repos/builtin/packages/py-pycparser/package.py
@@ -33,7 +33,7 @@ class PyPycparser(Package):
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pydatalog/package.py b/var/spack/repos/builtin/packages/py-pydatalog/package.py
new file mode 100644
index 0000000000..da157d3679
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-pydatalog/package.py
@@ -0,0 +1,38 @@
+##############################################################################
+# 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 PyPydatalog(Package):
+ """pyDatalog adds logic programming to Python."""
+ homepage = 'https://pypi.python.org/pypi/pyDatalog/'
+ url = 'https://pypi.python.org/packages/09/0b/2670eb9c0027aacfb5b5024ca75e5fee2f1261180ab8797108ffc941158a/pyDatalog-0.17.1.zip'
+
+ version('0.17.1', '6b2682301200068d208d6f2d01723939')
+
+ extends('python')
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pygments/package.py b/var/spack/repos/builtin/packages/py-pygments/package.py
index fedf3d068d..0ca15dd10d 100644
--- a/var/spack/repos/builtin/packages/py-pygments/package.py
+++ b/var/spack/repos/builtin/packages/py-pygments/package.py
@@ -33,7 +33,7 @@ class PyPygments(Package):
version('2.0.2', '238587a1370d62405edabd0794b3ec4a')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pylint/package.py b/var/spack/repos/builtin/packages/py-pylint/package.py
index 66118e8228..7107b2987f 100644
--- a/var/spack/repos/builtin/packages/py-pylint/package.py
+++ b/var/spack/repos/builtin/packages/py-pylint/package.py
@@ -34,8 +34,8 @@ class PyPylint(Package):
version('1.4.3', '5924c1c7ca5ca23647812f5971d0ea44')
extends('python')
- depends_on('py-nose')
- depends_on('py-setuptools')
+ depends_on('py-nose', type='build')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-pyqt/package.py b/var/spack/repos/builtin/packages/py-pyqt/package.py
index b090e25682..05fb7aa22c 100644
--- a/var/spack/repos/builtin/packages/py-pyqt/package.py
+++ b/var/spack/repos/builtin/packages/py-pyqt/package.py
@@ -34,7 +34,7 @@ class PyPyqt(Package):
version('4.11.3', '997c3e443165a89a559e0d96b061bf70')
extends('python')
- depends_on('py-sip')
+ depends_on('py-sip', type=nolink)
# TODO: allow qt5 when conditional deps are supported.
# TODO: Fix version matching so that @4 works like @:4
diff --git a/var/spack/repos/builtin/packages/py-pyside/package.py b/var/spack/repos/builtin/packages/py-pyside/package.py
index affee6c55a..cd174ce658 100644
--- a/var/spack/repos/builtin/packages/py-pyside/package.py
+++ b/var/spack/repos/builtin/packages/py-pyside/package.py
@@ -32,11 +32,10 @@ class PyPyside(Package):
version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d')
- # TODO: make build dependency
- # depends_on("cmake")
+ depends_on('cmake', type='build')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
depends_on('qt@:4')
def patch(self):
diff --git a/var/spack/repos/builtin/packages/py-pytables/package.py b/var/spack/repos/builtin/packages/py-pytables/package.py
index 47592fb3d1..58ed067b21 100644
--- a/var/spack/repos/builtin/packages/py-pytables/package.py
+++ b/var/spack/repos/builtin/packages/py-pytables/package.py
@@ -34,9 +34,9 @@ class PyPytables(Package):
extends('python')
depends_on('hdf5')
- depends_on('py-numpy')
- depends_on('py-numexpr')
- depends_on('py-cython')
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-numexpr', type=nolink)
+ depends_on('py-cython', type=nolink)
def install(self, spec, prefix):
env["HDF5_DIR"] = spec['hdf5'].prefix
diff --git a/var/spack/repos/builtin/packages/py-python-daemon/package.py b/var/spack/repos/builtin/packages/py-python-daemon/package.py
index ae6393986d..c2c7c4de4f 100644
--- a/var/spack/repos/builtin/packages/py-python-daemon/package.py
+++ b/var/spack/repos/builtin/packages/py-python-daemon/package.py
@@ -42,8 +42,8 @@ class PyPythonDaemon(Package):
version('2.0.5', '73e7f49f525c51fa4a995aea4d80de41')
extends("python")
- depends_on("py-setuptools")
- depends_on("py-lockfile")
+ depends_on("py-setuptools", type='build')
+ depends_on("py-lockfile", type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-restview/package.py b/var/spack/repos/builtin/packages/py-restview/package.py
index 91b1db993e..047214c58e 100644
--- a/var/spack/repos/builtin/packages/py-restview/package.py
+++ b/var/spack/repos/builtin/packages/py-restview/package.py
@@ -34,8 +34,8 @@ class PyRestview(Package):
version('2.6.1', 'ac8b70e15b8f1732d1733d674813666b')
extends('python')
- depends_on('py-docutils')
- depends_on('py-pygments')
+ depends_on('py-docutils', type=nolink)
+ depends_on('py-pygments', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-rpy2/package.py b/var/spack/repos/builtin/packages/py-rpy2/package.py
index 03fd2b4a06..8f4771f0eb 100644
--- a/var/spack/repos/builtin/packages/py-rpy2/package.py
+++ b/var/spack/repos/builtin/packages/py-rpy2/package.py
@@ -33,7 +33,7 @@ class PyRpy2(Package):
version('2.5.6', 'a36e758b633ce6aec6a5f450bfee980f')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
depends_on('R')
diff --git a/var/spack/repos/builtin/packages/py-scikit-image/package.py b/var/spack/repos/builtin/packages/py-scikit-image/package.py
index 4c8fd0942a..26c286e4be 100644
--- a/var/spack/repos/builtin/packages/py-scikit-image/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py
@@ -36,12 +36,12 @@ class PyScikitImage(Package):
extends('python', ignore=r'bin/.*\.py$')
- depends_on('py-dask')
- depends_on('pil')
- depends_on('py-networkx')
- depends_on('py-six')
- depends_on('py-scipy')
- depends_on('py-matplotlib')
+ depends_on('py-dask', type=nolink)
+ depends_on('pil', type=nolink)
+ depends_on('py-networkx', type=nolink)
+ depends_on('py-six', type=nolink)
+ depends_on('py-scipy', type=nolink)
+ depends_on('py-matplotlib', type=nolink)
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 7bb5853b19..1a6112bcf3 100644
--- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py
+++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py
@@ -35,9 +35,9 @@ class PyScikitLearn(Package):
extends('python')
- depends_on('py-setuptools')
- depends_on('py-numpy')
- depends_on('py-scipy')
+ depends_on('py-setuptools', type='build')
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-scipy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py
index f7c372b345..ea3731cf1b 100644
--- a/var/spack/repos/builtin/packages/py-scipy/package.py
+++ b/var/spack/repos/builtin/packages/py-scipy/package.py
@@ -34,8 +34,8 @@ class PyScipy(Package):
version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a')
extends('python')
- depends_on('py-nose')
- depends_on('py-numpy+blas+lapack')
+ depends_on('py-nose', type='build')
+ depends_on('py-numpy+blas+lapack', type=nolink)
def install(self, spec, prefix):
if 'atlas' in spec:
diff --git a/var/spack/repos/builtin/packages/py-shiboken/package.py b/var/spack/repos/builtin/packages/py-shiboken/package.py
index a2240c68a4..27188e1417 100644
--- a/var/spack/repos/builtin/packages/py-shiboken/package.py
+++ b/var/spack/repos/builtin/packages/py-shiboken/package.py
@@ -32,11 +32,10 @@ class PyShiboken(Package):
version('1.2.2', '345cfebda221f525842e079a6141e555')
- # TODO: make build dependency
- # depends_on("cmake")
+ depends_on('cmake', type='build')
extends('python')
- depends_on("py-setuptools")
+ depends_on("py-setuptools", type='build')
depends_on("libxml2")
depends_on("qt@:4.8")
diff --git a/var/spack/repos/builtin/packages/py-six/package.py b/var/spack/repos/builtin/packages/py-six/package.py
index 3efb3d4317..eb4846d5af 100644
--- a/var/spack/repos/builtin/packages/py-six/package.py
+++ b/var/spack/repos/builtin/packages/py-six/package.py
@@ -33,7 +33,7 @@ class PySix(Package):
version('1.10.0', '34eed507548117b2ab523ab14b2f8b55')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-sncosmo/package.py b/var/spack/repos/builtin/packages/py-sncosmo/package.py
index 82ae2a2e69..feb3856e8b 100644
--- a/var/spack/repos/builtin/packages/py-sncosmo/package.py
+++ b/var/spack/repos/builtin/packages/py-sncosmo/package.py
@@ -37,15 +37,15 @@ class PySncosmo(Package):
# Required dependencies
# py-sncosmo binaries are duplicates of those from py-astropy
extends('python', ignore=r'bin/.*')
- depends_on('py-numpy')
- depends_on('py-scipy')
- depends_on('py-astropy')
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-scipy', type=nolink)
+ depends_on('py-astropy', type=nolink)
# Recommended dependencies
- depends_on('py-matplotlib')
- depends_on('py-iminuit')
- depends_on('py-emcee')
- depends_on('py-nestle')
+ depends_on('py-matplotlib', type=nolink)
+ depends_on('py-iminuit', type=nolink)
+ depends_on('py-emcee', type=nolink)
+ depends_on('py-nestle', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-storm/package.py b/var/spack/repos/builtin/packages/py-storm/package.py
index 53af720c50..0e972480f3 100644
--- a/var/spack/repos/builtin/packages/py-storm/package.py
+++ b/var/spack/repos/builtin/packages/py-storm/package.py
@@ -34,7 +34,7 @@ class PyStorm(Package):
version('0.20', '8628503141f0f06c0749d607ac09b9c7')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-tappy/package.py b/var/spack/repos/builtin/packages/py-tappy/package.py
index a1026a9b4b..b10244acdd 100644
--- a/var/spack/repos/builtin/packages/py-tappy/package.py
+++ b/var/spack/repos/builtin/packages/py-tappy/package.py
@@ -33,7 +33,7 @@ class PyTappy(Package):
version('1.6', 'c8bdb93ad66e05f939905172a301bedf')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-tuiview/package.py b/var/spack/repos/builtin/packages/py-tuiview/package.py
index 200a33a676..56056ebad1 100644
--- a/var/spack/repos/builtin/packages/py-tuiview/package.py
+++ b/var/spack/repos/builtin/packages/py-tuiview/package.py
@@ -35,8 +35,8 @@ class PyTuiview(Package):
version('1.1.7', '4b3b38a820cc239c8ab4a181ac5d4c30')
extends("python")
- depends_on("py-pyqt")
- depends_on("py-numpy")
+ depends_on("py-pyqt", type=nolink)
+ depends_on("py-numpy", type=nolink)
depends_on("gdal")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/py-twisted/package.py b/var/spack/repos/builtin/packages/py-twisted/package.py
index 27db4adff4..2ce83cd24c 100644
--- a/var/spack/repos/builtin/packages/py-twisted/package.py
+++ b/var/spack/repos/builtin/packages/py-twisted/package.py
@@ -32,7 +32,7 @@ class PyTwisted(Package):
version('15.4.0', '5337ffb6aeeff3790981a2cd56db9655')
version('15.3.0', 'b58e83da2f00b3352afad74d0c5c4599')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
extends('python')
diff --git a/var/spack/repos/builtin/packages/py-unittest2/package.py b/var/spack/repos/builtin/packages/py-unittest2/package.py
index f669a500ec..174ab0ca5f 100644
--- a/var/spack/repos/builtin/packages/py-unittest2/package.py
+++ b/var/spack/repos/builtin/packages/py-unittest2/package.py
@@ -35,7 +35,7 @@ class PyUnittest2(Package):
version('1.1.0', 'f72dae5d44f091df36b6b513305ea000')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-unittest2py3k/package.py b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py
index ca857395fb..95e6dcbff0 100644
--- a/var/spack/repos/builtin/packages/py-unittest2py3k/package.py
+++ b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py
@@ -36,7 +36,7 @@ class PyUnittest2py3k(Package):
version('0.5.1', '8824ff92044310d9365f90d892bf0f09')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-urwid/package.py b/var/spack/repos/builtin/packages/py-urwid/package.py
index 0accc72df8..48ba84e7bc 100644
--- a/var/spack/repos/builtin/packages/py-urwid/package.py
+++ b/var/spack/repos/builtin/packages/py-urwid/package.py
@@ -31,7 +31,7 @@ class PyUrwid(Package):
version('1.3.0', 'a989acd54f4ff1a554add464803a9175')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
extends("python")
diff --git a/var/spack/repos/builtin/packages/py-virtualenv/package.py b/var/spack/repos/builtin/packages/py-virtualenv/package.py
index d42cb96eb7..d6b33ae175 100644
--- a/var/spack/repos/builtin/packages/py-virtualenv/package.py
+++ b/var/spack/repos/builtin/packages/py-virtualenv/package.py
@@ -35,7 +35,7 @@ class PyVirtualenv(Package):
version('15.0.1', '28d76a0d9cbd5dc42046dd14e76a6ecc')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-wcsaxes/package.py b/var/spack/repos/builtin/packages/py-wcsaxes/package.py
index b0adbe3658..9588b879fa 100644
--- a/var/spack/repos/builtin/packages/py-wcsaxes/package.py
+++ b/var/spack/repos/builtin/packages/py-wcsaxes/package.py
@@ -35,9 +35,9 @@ class PyWcsaxes(Package):
version('0.8', 'de1c60fdae4c330bf5ddb9f1ab5ab920')
extends('python', ignore=r'bin/pbr')
- depends_on('py-numpy')
- depends_on('py-matplotlib')
- depends_on('py-astropy')
+ depends_on('py-numpy', type=nolink)
+ depends_on('py-matplotlib', type=nolink)
+ depends_on('py-astropy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
diff --git a/var/spack/repos/builtin/packages/py-wheel/package.py b/var/spack/repos/builtin/packages/py-wheel/package.py
index 68b6f3d679..9e383a9a19 100644
--- a/var/spack/repos/builtin/packages/py-wheel/package.py
+++ b/var/spack/repos/builtin/packages/py-wheel/package.py
@@ -33,7 +33,7 @@ class PyWheel(Package):
version('0.26.0', '4cfc6e7e3dc7377d0164914623922a10')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/py-yapf/package.py b/var/spack/repos/builtin/packages/py-yapf/package.py
index 60f740c98d..f7fe4037a1 100644
--- a/var/spack/repos/builtin/packages/py-yapf/package.py
+++ b/var/spack/repos/builtin/packages/py-yapf/package.py
@@ -33,7 +33,7 @@ class PyYapf(Package):
version('0.2.1', '348ccf86cf2057872e4451b204fb914c')
extends('python')
- depends_on('py-setuptools')
+ depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index 8033c52b91..516b5c6cfe 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -38,15 +38,30 @@ class Python(Package):
homepage = "http://www.python.org"
url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz"
+ version('3.5.2', '3fe8434643a78630c61c6464fe2e7e72')
version('3.5.1', 'be78e48cdfc1a7ad90efff146dce6cfe')
version('3.5.0', 'a56c0c0b45d75a0ec9c6dee933c41c36')
- version('2.7.11', '6b6076ec9e93f05dd63e47eb9c15728b', preferred=True)
+ version('3.4.3', '4281ff86778db65892c05151d5de738d')
+ version('3.3.6', 'cdb3cd08f96f074b3f3994ccb51063e9')
+ version('3.2.6', '23815d82ae706e9b781ca65865353d39')
+ version('3.1.5', '02196d3fc7bc76bdda68aa36b0dd16ab')
+ version('2.7.12', '88d61f82e3616a4be952828b3694109d', preferred=True)
+ version('2.7.11', '6b6076ec9e93f05dd63e47eb9c15728b')
version('2.7.10', 'd7547558fd673bd9d38e2108c6b42521')
version('2.7.9', '5eebcaa0030dc4061156d3429657fb83')
version('2.7.8', 'd4bca0159acb0b44a781292b5231936f')
extendable = True
+ variant('ucs4', default=False, description='Enable UCS4 (wide) unicode strings')
+ # From https://docs.python.org/2/c-api/unicode.html: Python's default
+ # builds use a 16-bit type for Py_UNICODE and store Unicode values
+ # internally as UCS2. It is also possible to build a UCS4 version of Python
+ # (most recent Linux distributions come with UCS4 builds of Python). These
+ # builds then use a 32-bit type for Py_UNICODE and store Unicode data
+ # internally as UCS4. Note that UCS2 and UCS4 Python builds are not binary
+ # compatible.
+
depends_on("openssl")
depends_on("bzip2")
depends_on("readline")
@@ -82,6 +97,15 @@ class Python(Package):
"LDFLAGS=-L{0}".format(ldflags)
]
+ if '+ucs4' in spec:
+ if spec.satisfies('@:2.7'):
+ config_args.append('--enable-unicode=ucs4')
+ elif spec.satisfies('@3.0:3.2'):
+ config_args.append('--with-wide-unicode')
+ elif spec.satisfies('@3.3:'):
+ # https://docs.python.org/3.3/whatsnew/3.3.html
+ raise ValueError('+ucs4 variant not compatible with Python 3.3 and beyond') # NOQA: ignore=E501
+
if spec.satisfies('@3:'):
config_args.append('--without-ensurepip')
@@ -141,7 +165,7 @@ class Python(Package):
extension and any other python extensions it depends on."""
python_paths = []
- for d in extension_spec.traverse():
+ for d in extension_spec.traverse(deptype=nolink, deptype_query='run'):
if d.package.extends(self.spec):
python_paths.append(join_path(d.prefix,
self.site_packages_dir))
diff --git a/var/spack/repos/builtin/packages/qhull/package.py b/var/spack/repos/builtin/packages/qhull/package.py
index 280c9cc12c..f7cbcc2736 100644
--- a/var/spack/repos/builtin/packages/qhull/package.py
+++ b/var/spack/repos/builtin/packages/qhull/package.py
@@ -45,7 +45,7 @@ class Qhull(Package):
# https://github.com/qhull/qhull/pull/5
patch('qhull-iterator.patch', when='@1.0')
- depends_on('cmake')
+ depends_on('cmake', type='build')
def install(self, spec, prefix):
with working_dir('spack-build', create=True):
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index 0c91a5ce87..f33e5c2d0e 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -60,8 +60,8 @@ class Qt(Package):
# Webkit
# depends_on("gperf")
- # depends_on("flex")
- # depends_on("bison")
+ # depends_on("flex", type='build')
+ # depends_on("bison", type='build')
# depends_on("ruby")
# depends_on("icu4c")
diff --git a/var/spack/repos/builtin/packages/r-assertthat/package.py b/var/spack/repos/builtin/packages/r-assertthat/package.py
new file mode 100644
index 0000000000..4070b6fe8d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-assertthat/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 RAssertthat(Package):
+ """assertthat is an extension to stopifnot() that makes it easy to declare
+ the pre and post conditions that you code should satisfy, while also
+ producing friendly error messages so that your users know what they've done
+ wrong."""
+
+ homepage = "https://cran.r-project.org/web/packages/assertthat/index.html"
+ url = "https://cran.r-project.org/src/contrib/assertthat_0.1.tar.gz"
+
+ version('0.1', '59f9d7f7c00077ea54d763b78eeb5798')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-dplyr/package.py b/var/spack/repos/builtin/packages/r-dplyr/package.py
new file mode 100644
index 0000000000..b065e0b817
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-dplyr/package.py
@@ -0,0 +1,50 @@
+##############################################################################
+# 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 RDplyr(Package):
+ """A fast, consistent tool for working with data frame like objects, both
+ in memory and out of memory."""
+
+ homepage = "https://github.com/hadley/dplyr"
+ url = "https://cran.r-project.org/src/contrib/dplyr_0.5.0.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/dplyr"
+
+ version('0.5.0', '1fcafcacca70806eea2e6d465cdb94ef')
+
+ extends('R')
+ depends_on('r-assertthat')
+ depends_on('r-R6')
+ depends_on('r-rcpp')
+ depends_on('r-tibble')
+ depends_on('r-magrittr')
+ depends_on('r-lazyeval')
+ depends_on('r-dbi')
+ depends_on('r-bh')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-ggvis/package.py b/var/spack/repos/builtin/packages/r-ggvis/package.py
new file mode 100644
index 0000000000..8fc1f397c8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-ggvis/package.py
@@ -0,0 +1,51 @@
+##############################################################################
+# 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 RGgvis(Package):
+ """An implementation of an interactive grammar of graphics, taking the best
+ parts of 'ggplot2', combining them with the reactive framework from 'shiny'
+ and web graphics from 'vega'."""
+
+ homepage = "http://ggvis.rstudio.com/"
+ url = "https://cran.r-project.org/src/contrib/ggvis_0.4.2.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/ggvis"
+
+ version('0.4.2', '039f45e5c7f1e0652779163d7d99f922')
+
+ extends('R')
+
+ depends_on('r-assertthat')
+ depends_on('r-jsonlite')
+ depends_on('r-shiny')
+ depends_on('r-magrittr')
+ depends_on('r-dplyr')
+ depends_on('r-lazyeval')
+ depends_on('r-htmltools')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-htmltools/package.py b/var/spack/repos/builtin/packages/r-htmltools/package.py
new file mode 100644
index 0000000000..0aea564372
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-htmltools/package.py
@@ -0,0 +1,44 @@
+##############################################################################
+# 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 RHtmltools(Package):
+ """Tools for HTML generation and output."""
+
+ homepage = "https://github.com/rstudio/htmltools"
+ url = "https://cran.r-project.org/src/contrib/htmltools_0.3.5.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/htmltools"
+
+ version('0.3.5', '5f001aff4a39e329f7342dcec5139724')
+
+ extends('R')
+
+ depends_on('r-digest')
+ depends_on('r-rcpp')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-httpuv/package.py b/var/spack/repos/builtin/packages/r-httpuv/package.py
new file mode 100644
index 0000000000..6ab12bcf9d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-httpuv/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# 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 RHttpuv(Package):
+ """Provides low-level socket and protocol support for handling HTTP and
+ WebSocket requests directly from within R. It is primarily intended as a
+ building block for other packages, rather than making it particularly easy
+ to create complete web applications using httpuv alone. httpuv is built on
+ top of the libuv and http-parser C libraries, both of which were developed
+ by Joyent, Inc. (See LICENSE file for libuv and http-parser license
+ information.)"""
+
+ homepage = "https://github.com/rstudio/httpuv"
+ url = "https://cran.r-project.org/src/contrib/httpuv_1.3.3.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/httpuv"
+
+ version('1.3.3', 'c78ae068cf59e949b9791be987bb4489')
+
+ extends('R')
+
+ depends_on('r-rcpp')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-lazyeval/package.py b/var/spack/repos/builtin/packages/r-lazyeval/package.py
new file mode 100644
index 0000000000..f80fb4d272
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-lazyeval/package.py
@@ -0,0 +1,43 @@
+##############################################################################
+# 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 RLazyeval(Package):
+ """An alternative approach to non-standard evaluation using formulas.
+ Provides a full implementation of LISP style 'quasiquotation', making it
+ easier to generate code with other code."""
+
+ homepage = "https://cran.r-project.org/web/packages/lazyeval/index.html"
+ url = "https://cran.r-project.org/src/contrib/lazyeval_0.2.0.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/lazyeval"
+
+ version('0.2.0', 'df1daac908dcf02ae7e12f4335b1b13b')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-lubridate/package.py b/var/spack/repos/builtin/packages/r-lubridate/package.py
new file mode 100644
index 0000000000..88576911f0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-lubridate/package.py
@@ -0,0 +1,47 @@
+##############################################################################
+# 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 RLubridate(Package):
+ """Functions to work with date-times and timespans: fast and user friendly
+ parsing of date-time data, extraction and updating of components of a
+ date-time (years, months, days, hours, minutes, and seconds), algebraic
+ manipulation on date-time and timespan objects. The 'lubridate' package has
+ a consistent and memorable syntax that makes working with dates easy and
+ fun."""
+
+ homepage = "https://cran.r-project.org/web/packages/lubridate/index.html"
+ url = "https://cran.r-project.org/src/contrib/lubridate_1.5.6.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/lubridate"
+
+ version('1.5.6', 'a5dc44817548ee219d26a10bae92e611')
+
+ extends('R')
+ depends_on('r-stringr')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-shiny/package.py b/var/spack/repos/builtin/packages/r-shiny/package.py
new file mode 100644
index 0000000000..a9a9532910
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-shiny/package.py
@@ -0,0 +1,52 @@
+##############################################################################
+# 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 RShiny(Package):
+ """Makes it incredibly easy to build interactive web applications with R.
+ Automatic "reactive" binding between inputs and outputs and extensive
+ pre-built widgets make it possible to build beautiful, responsive, and
+ powerful applications with minimal effort."""
+
+ homepage = "http://shiny.rstudio.com/"
+ url = "https://cran.r-project.org/src/contrib/shiny_0.13.2.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/shiny"
+
+ version('0.13.2', 'cb5bff7a28ad59ec2883cd0912ca9611')
+
+ extends('R')
+
+ depends_on('r-httpuv')
+ depends_on('r-mime')
+ depends_on('r-jsonlite')
+ depends_on('r-xtable')
+ depends_on('r-digest')
+ depends_on('r-htmltools')
+ depends_on('r-R6')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-tibble/package.py b/var/spack/repos/builtin/packages/r-tibble/package.py
new file mode 100644
index 0000000000..837c3df603
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-tibble/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 RTibble(Package):
+ """Provides a 'tbl_df' class that offers better checking and printing
+ capabilities than traditional data frames."""
+
+ homepage = "https://github.com/hadley/tibble"
+ url = "https://cran.r-project.org/src/contrib/tibble_1.1.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/tibble"
+
+ version('1.1', '2fe9f806109d0b7fadafb1ffafea4cb8')
+
+ extends('R')
+
+ depends_on('r-assertthat')
+ depends_on('r-lazyeval')
+ depends_on('r-rcpp')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-tidyr/package.py b/var/spack/repos/builtin/packages/r-tidyr/package.py
new file mode 100644
index 0000000000..2db7b174c2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-tidyr/package.py
@@ -0,0 +1,49 @@
+##############################################################################
+# 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 RTidyr(Package):
+ """An evolution of 'reshape2'. It's designed specifically for data tidying
+ (not general reshaping or aggregating) and works well with 'dplyr' data
+ pipelines."""
+
+ homepage = "https://github.com/hadley/tidyr"
+ url = "https://cran.r-project.org/src/contrib/tidyr_0.5.1.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/tidyr"
+
+ version('0.5.1', '3cadc869510c054ed93d374ab44120bd')
+
+ extends('R')
+ depends_on('r-tibble')
+ depends_on('r-dplyr')
+ depends_on('r-stringi')
+ depends_on('r-lazyeval')
+ depends_on('r-magrittr')
+ depends_on('r-rcpp')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/r-xtable/package.py b/var/spack/repos/builtin/packages/r-xtable/package.py
new file mode 100644
index 0000000000..46434b4842
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-xtable/package.py
@@ -0,0 +1,41 @@
+##############################################################################
+# 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 RXtable(Package):
+ """Coerce data to LaTeX and HTML tables."""
+
+ homepage = "http://xtable.r-forge.r-project.org/"
+ url = "https://cran.r-project.org/src/contrib/xtable_1.8-2.tar.gz"
+ list_url = "https://cran.r-project.org/src/contrib/Archive/xtable"
+
+ version('1.8-2', '239e4825cd046156a67efae3aac01d86')
+
+ extends('R')
+
+ def install(self, spec, prefix):
+ R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),
+ self.stage.source_path)
diff --git a/var/spack/repos/builtin/packages/ravel/package.py b/var/spack/repos/builtin/packages/ravel/package.py
index 763ec1b9a2..96692ac7c1 100644
--- a/var/spack/repos/builtin/packages/ravel/package.py
+++ b/var/spack/repos/builtin/packages/ravel/package.py
@@ -33,8 +33,7 @@ class Ravel(Package):
version('1.0.0', 'b25fece58331c2adfcce76c5036485c2')
- # TODO: make this a build dependency
- depends_on('cmake@2.8.9:')
+ depends_on('cmake@2.8.9:', type='build')
depends_on('muster@1.0.1:')
depends_on('otf')
diff --git a/var/spack/repos/builtin/packages/rose/package.py b/var/spack/repos/builtin/packages/rose/package.py
index b8a65e8574..bcd317eb8f 100644
--- a/var/spack/repos/builtin/packages/rose/package.py
+++ b/var/spack/repos/builtin/packages/rose/package.py
@@ -40,9 +40,9 @@ class Rose(Package):
patch('add_spack_compiler_recognition.patch')
- depends_on("autoconf@2.69")
- depends_on("automake@1.14")
- depends_on("libtool@2.4")
+ depends_on("autoconf@2.69", type='build')
+ depends_on("automake@1.14", type='build')
+ depends_on("libtool@2.4", type='build')
depends_on("boost@1.54.0")
depends_on("jdk@8u25-linux-x64")
diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py
index 2f6e42c439..c2bad20c2f 100644
--- a/var/spack/repos/builtin/packages/scotch/package.py
+++ b/var/spack/repos/builtin/packages/scotch/package.py
@@ -45,8 +45,8 @@ class Scotch(Package):
variant('shared', default=True, description='Build a shared version of the library')
variant('metis', default=True, description='Build metis and parmetis wrapper libraries')
- depends_on('flex')
- depends_on('bison')
+ depends_on('flex', type='build')
+ depends_on('bison', type='build')
depends_on('mpi', when='+mpi')
depends_on('zlib', when='+compression')
diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py
index ff6fd2da9b..ebca74a3ab 100644
--- a/var/spack/repos/builtin/packages/serf/package.py
+++ b/var/spack/repos/builtin/packages/serf/package.py
@@ -36,7 +36,7 @@ class Serf(Package):
depends_on('apr')
depends_on('apr-util')
- depends_on('scons')
+ depends_on('scons', type='build')
depends_on('expat')
depends_on('openssl')
depends_on('zlib')
diff --git a/var/spack/repos/builtin/packages/slepc/install_name_371.patch b/var/spack/repos/builtin/packages/slepc/install_name_371.patch
new file mode 100644
index 0000000000..d02ca88657
--- /dev/null
+++ b/var/spack/repos/builtin/packages/slepc/install_name_371.patch
@@ -0,0 +1,32 @@
+From 7489a3f3d569e2fbf5513ac9dcd769017d9f7eb7 Mon Sep 17 00:00:00 2001
+From: Lisandro Dalcin <dalcinl@gmail.com>
+Date: Thu, 2 Jun 2016 21:57:38 +0300
+Subject: [PATCH] OS X: Fix library path in invocation of install_name_tool
+
+---
+ config/install.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/config/install.py b/config/install.py
+index 09acd03..6ce98ae 100755
+--- a/config/install.py
++++ b/config/install.py
+@@ -25,6 +25,7 @@ class Installer:
+
+ def setupDirectories(self):
+ self.installDir = self.destDir
++ self.archDir = os.path.join(self.rootDir, self.arch)
+ self.rootIncludeDir = os.path.join(self.rootDir, 'include')
+ self.archIncludeDir = os.path.join(self.rootDir, self.arch, 'include')
+ self.rootConfDir = os.path.join(self.rootDir, 'lib','slepc','conf')
+@@ -220,7 +221,7 @@ for dir in dirs:
+ if os.path.splitext(dst)[1] == '.dylib' and os.path.isfile('/usr/bin/install_name_tool'):
+ (result, output) = commands.getstatusoutput('otool -D '+src)
+ oldname = output[output.find("\n")+1:]
+- installName = oldname.replace(self.destDir, self.installDir)
++ installName = oldname.replace(self.archDir, self.installDir)
+ (result, output) = commands.getstatusoutput('/usr/bin/install_name_tool -id ' + installName + ' ' + dst)
+ # preserve the original timestamps - so that the .a vs .so time order is preserved
+ shutil.copystat(src,dst)
+--
+2.7.4.1.g5468f9e
diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py
index d3739bf6a6..fd6c42d9fc 100644
--- a/var/spack/repos/builtin/packages/slepc/package.py
+++ b/var/spack/repos/builtin/packages/slepc/package.py
@@ -28,7 +28,7 @@ from spack import *
class Slepc(Package):
"""
- Scalable Library for Eigenvalue Computations.
+ Scalable Library for Eigenvalue Problem Computations.
"""
homepage = "http://www.grycap.upv.es/slepc"
@@ -45,9 +45,13 @@ class Slepc(Package):
depends_on('arpack-ng~mpi', when='+arpack^petsc~mpi')
depends_on('arpack-ng+mpi', when='+arpack^petsc+mpi')
+ patch('install_name_371.patch', when='@3.7.1')
+
def install(self, spec, prefix):
# set SLEPC_DIR for installation
- os.environ['SLEPC_DIR'] = self.stage.source_path
+ # Note that one should set the current (temporary) directory instead
+ # its symlink in spack/stage/ !
+ os.environ['SLEPC_DIR'] = os.getcwd()
options = []
@@ -67,9 +71,10 @@ class Slepc(Package):
configure('--prefix=%s' % prefix, *options)
make('MAKE_NP=%s' % make_jobs, parallel=False)
- # FIXME:
- # make('test')
- make('install')
+ if self.run_tests:
+ make('test', parallel=False)
+
+ make('install', parallel=False)
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
# set up SLEPC_DIR for everyone using SLEPc package
diff --git a/var/spack/repos/builtin/packages/spot/package.py b/var/spack/repos/builtin/packages/spot/package.py
index 59535dcc4c..21bb6f03a7 100644
--- a/var/spack/repos/builtin/packages/spot/package.py
+++ b/var/spack/repos/builtin/packages/spot/package.py
@@ -32,7 +32,7 @@ class Spot(Package):
version('1.99.3', 'd53adcb2d0fe7c69f45d4e595a58254e')
- #depends_on("gcc@4.8:")
+ #depends_on("gcc@4.8:", type='build')
depends_on("python@3.2:")
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin/packages/stat/package.py b/var/spack/repos/builtin/packages/stat/package.py
index 80d27e149f..a03713397b 100644
--- a/var/spack/repos/builtin/packages/stat/package.py
+++ b/var/spack/repos/builtin/packages/stat/package.py
@@ -39,7 +39,7 @@ class Stat(Package):
depends_on('libdwarf')
depends_on('dyninst')
depends_on('graphlib')
- depends_on('graphviz')
+ depends_on('graphviz', type=alldeps)
depends_on('launchmon')
depends_on('mrnet')
diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py
index dd0dfa3e23..2cc89b843f 100644
--- a/var/spack/repos/builtin/packages/suite-sparse/package.py
+++ b/var/spack/repos/builtin/packages/suite-sparse/package.py
@@ -33,6 +33,7 @@ class SuiteSparse(Package):
url = 'http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.5.1.tar.gz'
version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319')
+ version('4.5.3', '8ec57324585df3c6483ad7f556afccbd')
# FIXME: (see below)
# variant('tbb', default=True, description='Build with Intel TBB')
@@ -40,34 +41,35 @@ class SuiteSparse(Package):
depends_on('blas')
depends_on('lapack')
- depends_on('metis@5.1.0', when='@4.5.1')
+ 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.
+ # 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
- # It's basically a plain Makefile which include an header (SuiteSparse_config/SuiteSparse_config.mk)
- # with a lot of convoluted logic in it.
- # Any kind of customization will need to go through filtering of that file
+ # The build system of SuiteSparse is quite old-fashioned.
+ # It's basically a plain Makefile which include an header
+ # (SuiteSparse_config/SuiteSparse_config.mk)with a lot of convoluted
+ # logic in it. Any kind of customization will need to go through
+ # filtering of that file
make_args = ['INSTALL=%s' % prefix]
# inject Spack compiler wrappers
make_args.extend([
- 'AUTOCC=no',
- 'CC=cc',
- 'CXX=c++',
- 'F77=f77',
+ '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,
+ 'MY_METIS_LIB=-L%s -lmetis' % spec['metis'].prefix.lib,
+ 'MY_METIS_INC=%s' % spec['metis'].prefix.include,
])
# Intel TBB in SuiteSparseQR
@@ -78,10 +80,13 @@ class SuiteSparse(Package):
])
# BLAS arguments require path to libraries
- # FIXME : (blas / lapack always provide libblas and liblapack as aliases)
- make_args.extend([
- 'BLAS=-lblas',
- 'LAPACK=-llapack'
- ])
+ # FIXME: (blas/lapack always provide libblas and liblapack as aliases)
+ if '@4.5.1' in spec:
+ # adding -lstdc++ is clearly an ugly way to do this, but it follows
+ # with the TCOV path of SparseSuite 4.5.1's Suitesparse_config.mk
+ make_args.extend([
+ 'BLAS=-lblas -lstdc++',
+ 'LAPACK=-llapack'
+ ])
make('install', *make_args)
diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py
index c55198a850..e52b90eb8a 100644
--- a/var/spack/repos/builtin/packages/sundials/package.py
+++ b/var/spack/repos/builtin/packages/sundials/package.py
@@ -42,6 +42,7 @@ class Sundials(Package):
variant('openmp', default=False, description='Enable OpenMP support')
variant('pthread', default=True, description='Enable POSIX threads support')
+ depends_on('cmake', type='build')
depends_on('mpi', when='+mpi')
depends_on('blas', when='+lapack')
depends_on('lapack', when='+lapack')
diff --git a/var/spack/repos/builtin/packages/swiftsim/package.py b/var/spack/repos/builtin/packages/swiftsim/package.py
index f8bb91acd9..620d658a10 100644
--- a/var/spack/repos/builtin/packages/swiftsim/package.py
+++ b/var/spack/repos/builtin/packages/swiftsim/package.py
@@ -43,10 +43,10 @@ class Swiftsim(Package):
variant('mpi', default=True, description='Enable distributed memory parallelism')
# Build dependencies
- depends_on('autoconf')
- depends_on('automake')
- depends_on('libtool')
- depends_on('m4')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
+ depends_on('m4', type='build')
# link-time / run-time dependencies
depends_on('mpi', when='+mpi')
depends_on('metis')
diff --git a/var/spack/repos/builtin/packages/task/package.py b/var/spack/repos/builtin/packages/task/package.py
index dc52c4f9f6..8c3b412f48 100644
--- a/var/spack/repos/builtin/packages/task/package.py
+++ b/var/spack/repos/builtin/packages/task/package.py
@@ -31,6 +31,7 @@ class Task(Package):
version('2.4.4', '517450c4a23a5842df3e9905b38801b3')
+ depends_on('cmake', type='build')
depends_on("gnutls")
depends_on("libuuid")
# depends_on("gcc@4.8:")
diff --git a/var/spack/repos/builtin/packages/taskd/package.py b/var/spack/repos/builtin/packages/taskd/package.py
index 8a022b4fe9..1d7f9ed49e 100644
--- a/var/spack/repos/builtin/packages/taskd/package.py
+++ b/var/spack/repos/builtin/packages/taskd/package.py
@@ -32,6 +32,7 @@ class Taskd(Package):
version('1.1.0', 'ac855828c16f199bdbc45fbc227388d0')
+ depends_on('cmake', type='build')
depends_on("libuuid")
depends_on("gnutls")
diff --git a/var/spack/repos/builtin/packages/tetgen/package.py b/var/spack/repos/builtin/packages/tetgen/package.py
index c301a5b4e5..97aa68be65 100644
--- a/var/spack/repos/builtin/packages/tetgen/package.py
+++ b/var/spack/repos/builtin/packages/tetgen/package.py
@@ -38,9 +38,7 @@ class Tetgen(Package):
version('1.4.3', 'd6a4bcdde2ac804f7ec66c29dcb63c18')
version('1.5.0', '3b9fd9cdec121e52527b0308f7aad5c1', url='http://www.tetgen.org/1.5/src/tetgen1.5.0.tar.gz')
- # TODO: Make this a build dependency once build dependencies are supported
- # (see: https://github.com/LLNL/spack/pull/378).
- depends_on('cmake@2.8.7:', when='@1.5.0:')
+ depends_on('cmake@2.8.7:', when='@1.5.0:', type='build')
def install(self, spec, prefix):
make('tetgen', 'tetlib')
diff --git a/var/spack/repos/builtin/packages/the_platinum_searcher/package.py b/var/spack/repos/builtin/packages/the_platinum_searcher/package.py
index 9c9a66cdef..0d2c2918c4 100644
--- a/var/spack/repos/builtin/packages/the_platinum_searcher/package.py
+++ b/var/spack/repos/builtin/packages/the_platinum_searcher/package.py
@@ -12,7 +12,7 @@ class ThePlatinumSearcher(Package):
version('head', go=package)
- extends("go")
+ extends("go", deptypes='build')
def install(self, spec, prefix):
env = os.environ
diff --git a/var/spack/repos/builtin/packages/the_silver_searcher/package.py b/var/spack/repos/builtin/packages/the_silver_searcher/package.py
index e289b6d783..988619df30 100644
--- a/var/spack/repos/builtin/packages/the_silver_searcher/package.py
+++ b/var/spack/repos/builtin/packages/the_silver_searcher/package.py
@@ -33,7 +33,7 @@ class TheSilverSearcher(Package):
depends_on('pcre')
depends_on('xz')
- depends_on('pkg-config')
+ depends_on('pkg-config', type='build')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
diff --git a/var/spack/repos/builtin/packages/thrift/package.py b/var/spack/repos/builtin/packages/thrift/package.py
index 6d834c6321..025ee2b885 100644
--- a/var/spack/repos/builtin/packages/thrift/package.py
+++ b/var/spack/repos/builtin/packages/thrift/package.py
@@ -41,12 +41,12 @@ class Thrift(Package):
variant('python', default=True, description="Build support for python")
depends_on('jdk')
- depends_on('autoconf')
- depends_on('automake')
- depends_on('libtool')
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('libtool', type='build')
depends_on('boost@1.53:')
- depends_on('bison')
- depends_on('flex')
+ depends_on('bison', type='build')
+ depends_on('flex', type='build')
depends_on('openssl')
# Variant dependencies
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 3a53ac5c01..56499af8d9 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -68,6 +68,8 @@ class Trilinos(Package):
variant('debug', default=False, description='Builds a debug version of the libraries')
variant('boost', default=True, description='Compile with Boost')
+ depends_on('cmake', type='build')
+
# Everything should be compiled with -fpic
depends_on('blas')
depends_on('lapack')
diff --git a/var/spack/repos/builtin/packages/vim/package.py b/var/spack/repos/builtin/packages/vim/package.py
index f66c20894b..e0dfb64879 100644
--- a/var/spack/repos/builtin/packages/vim/package.py
+++ b/var/spack/repos/builtin/packages/vim/package.py
@@ -60,7 +60,7 @@ class Vim(Package):
depends_on('ruby', when='+ruby')
variant('cscope', default=False, description="build with cscope support")
- depends_on('cscope', when='+cscope')
+ depends_on('cscope', when='+cscope', type='run')
variant('gui', default=False, description="build with gui (gvim)")
# virtual dependency?
diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py
index d2296dbc26..5c196b5ea8 100644
--- a/var/spack/repos/builtin/packages/vtk/package.py
+++ b/var/spack/repos/builtin/packages/vtk/package.py
@@ -37,6 +37,7 @@ class Vtk(Package):
version('6.1.0', '25e4dfb3bad778722dcaec80cd5dab7d')
+ depends_on('cmake', type='build')
depends_on("qt")
# VTK7 defaults to OpenGL2 rendering backend