From c6cd8ae243c07fa80d54207c334883585eca0d97 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 1 Oct 2015 21:35:25 -0700 Subject: Use more recent version of libffi. 3.1 has a known bug that is fixed in current version --- var/spack/packages/libffi/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/packages/libffi/package.py b/var/spack/packages/libffi/package.py index 2c1c4eed4d..18acabb00c 100644 --- a/var/spack/packages/libffi/package.py +++ b/var/spack/packages/libffi/package.py @@ -6,9 +6,9 @@ class Libffi(Package): to call any function specified by a call interface description at run time.""" homepage = "https://sourceware.org/libffi/" - url = "ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz" - - version('3.1', 'f5898b29bbfd70502831a212d9249d10') + + version('3.2.1','83b89587607e3eb65c70d361f13bab43',url = "ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz") + #version('3.1', 'f5898b29bbfd70502831a212d9249d10',url = "ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz") # Has a bug $(lib64) instead of ${lib64} in libffi.pc def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 1501786fd9be0a01abe7f6bb917e416fb3256aa6 Mon Sep 17 00:00:00 2001 From: karenyyng Date: Sat, 3 Oct 2015 13:04:37 -0700 Subject: adding python_recipe_parser as a submodule under the folder utils --- .gitmodules | 3 +++ utils/python_recipe_parser | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 utils/python_recipe_parser diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..a097fcd8cf --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "utils/python_recipe_parser"] + path = utils/python_recipe_parser + url = https://github.com/karenyyng/spack_python_package_parser diff --git a/utils/python_recipe_parser b/utils/python_recipe_parser new file mode 160000 index 0000000000..3158074a2d --- /dev/null +++ b/utils/python_recipe_parser @@ -0,0 +1 @@ +Subproject commit 3158074a2d74f99aa72289dfcf093b1b0ba4474e -- cgit v1.2.3-70-g09d2 From 79808da760eabcb3e692c88e29ea3c7c558b131d Mon Sep 17 00:00:00 2001 From: karenyyng Date: Sat, 3 Oct 2015 18:47:36 -0700 Subject: added a bunch of packages and added submodule --- .gitignore | 1 + .gitmodules | 4 +- utils/python_recipe_parser | 1 - var/spack/packages/ImageMagick/package.py | 0 var/spack/packages/Mitos/package.py | 0 var/spack/packages/R/package.py | 0 var/spack/packages/SAMRAI/no-tool-build.patch | 0 var/spack/packages/SAMRAI/package.py | 0 var/spack/packages/adept-utils/package.py | 0 var/spack/packages/arpack/package.py | 0 var/spack/packages/asciidoc/package.py | 18 ------- var/spack/packages/atk/package.py | 0 var/spack/packages/atlas/package.py | 0 var/spack/packages/autoconf/package.py | 0 var/spack/packages/automaded/package.py | 0 var/spack/packages/automake/package.py | 0 var/spack/packages/bear/package.py | 0 var/spack/packages/bib2xhtml/package.py | 0 var/spack/packages/binutils/package.py | 0 var/spack/packages/bison/package.py | 0 var/spack/packages/boost/package.py | 4 -- var/spack/packages/bowtie2/bowtie2-2.5.patch | 16 ------ var/spack/packages/bowtie2/package.py | 24 --------- var/spack/packages/boxlib/package.py | 0 var/spack/packages/bzip2/package.py | 0 var/spack/packages/cairo/package.py | 0 var/spack/packages/callpath/package.py | 0 var/spack/packages/cblas/package.py | 0 var/spack/packages/cgm/package.py | 0 var/spack/packages/clang/package.py | 0 var/spack/packages/cloog/package.py | 0 var/spack/packages/cmake/package.py | 0 var/spack/packages/coreutils/package.py | 0 var/spack/packages/cppcheck/package.py | 0 var/spack/packages/cram/package.py | 0 var/spack/packages/cscope/package.py | 17 ------- var/spack/packages/cube/package.py | 0 var/spack/packages/czmq/package.py | 19 ------- var/spack/packages/dbus/package.py | 0 var/spack/packages/docbook-xml/package.py | 19 ------- var/spack/packages/doxygen/package.py | 25 --------- var/spack/packages/dri2proto/package.py | 0 var/spack/packages/dtcmp/package.py | 0 var/spack/packages/dyninst/package.py | 0 var/spack/packages/eigen/package.py | 17 +++++++ var/spack/packages/elfutils/package.py | 26 ---------- var/spack/packages/extrae/package.py | 0 var/spack/packages/exuberant-ctags/package.py | 0 var/spack/packages/fish/package.py | 18 ------- var/spack/packages/flex/package.py | 0 var/spack/packages/flux/package.py | 36 ------------- var/spack/packages/fontconfig/package.py | 0 var/spack/packages/freetype/package.py | 0 var/spack/packages/gasnet/package.py | 0 var/spack/packages/gcc/package.py | 0 var/spack/packages/gdk-pixbuf/package.py | 0 var/spack/packages/geos/package.py | 0 var/spack/packages/gflags/package.py | 21 -------- var/spack/packages/ghostscript/package.py | 17 ------- var/spack/packages/git/package.py | 0 var/spack/packages/glib/package.py | 0 var/spack/packages/global/package.py | 0 var/spack/packages/glog/package.py | 15 ------ var/spack/packages/gmp/package.py | 0 var/spack/packages/gnutls/package.py | 0 var/spack/packages/gperf/package.py | 0 var/spack/packages/gperftools/package.py | 0 var/spack/packages/graphlib/package.py | 0 var/spack/packages/graphviz/package.py | 19 ++++--- var/spack/packages/gtkplus/package.py | 0 var/spack/packages/harfbuzz/package.py | 0 var/spack/packages/hdf5/package.py | 0 var/spack/packages/hwloc/package.py | 0 var/spack/packages/hypre/package.py | 0 var/spack/packages/icu/package.py | 0 var/spack/packages/icu4c/package.py | 0 var/spack/packages/isl/package.py | 0 var/spack/packages/jdk/package.py | 0 var/spack/packages/jpeg/package.py | 0 var/spack/packages/lapack/package.py | 45 +++++++++++++++++ var/spack/packages/launchmon/package.py | 0 .../packages/launchmon/patch.lmon_install_dir | 0 var/spack/packages/lcms/package.py | 0 var/spack/packages/leveldb/package.py | 29 ----------- var/spack/packages/libNBC/package.py | 0 var/spack/packages/libarchive/package.py | 0 var/spack/packages/libcircle/package.py | 0 var/spack/packages/libdrm/package.py | 5 +- var/spack/packages/libdwarf/package.py | 0 var/spack/packages/libelf/package.py | 2 - var/spack/packages/libevent/package.py | 0 var/spack/packages/libffi/package.py | 6 +-- var/spack/packages/libgcrypt/package.py | 0 var/spack/packages/libgpg-error/package.py | 0 var/spack/packages/libjpeg-turbo/package.py | 0 var/spack/packages/libjson-c/package.py | 14 ----- var/spack/packages/libmng/package.py | 0 var/spack/packages/libmonitor/package.py | 0 var/spack/packages/libpciaccess/package.py | 17 +++---- var/spack/packages/libpng/package.py | 0 var/spack/packages/libsodium/package.py | 19 ------- var/spack/packages/libtiff/package.py | 0 var/spack/packages/libtool/package.py | 0 var/spack/packages/libunwind/package.py | 0 var/spack/packages/libuuid/package.py | 0 var/spack/packages/libxcb/package.py | 0 var/spack/packages/libxml2/package.py | 5 +- var/spack/packages/libxshmfence/package.py | 0 var/spack/packages/libxslt/package.py | 0 var/spack/packages/llvm-lld/package.py | 0 var/spack/packages/llvm/package.py | 0 var/spack/packages/lmdb/package.py | 39 -------------- var/spack/packages/lua/package.py | 26 ---------- var/spack/packages/lwgrp/package.py | 0 var/spack/packages/lwm2/package.py | 0 var/spack/packages/memaxes/package.py | 0 var/spack/packages/mesa/package.py | 5 +- var/spack/packages/metis/package.py | 0 var/spack/packages/mpc/package.py | 0 var/spack/packages/mpe2/mpe2.patch | 0 var/spack/packages/mpe2/package.py | 0 var/spack/packages/mpfr/package.py | 0 var/spack/packages/mpibash/mpibash-4.3.patch | 0 var/spack/packages/mpibash/package.py | 0 var/spack/packages/mpich/package.py | 1 + var/spack/packages/mpileaks/package.py | 0 var/spack/packages/mrnet/package.py | 0 var/spack/packages/munge/package.py | 20 -------- var/spack/packages/muster/package.py | 0 .../mvapich2/ad_lustre_rwcontig_open_source.patch | 0 var/spack/packages/mvapich2/package.py | 0 var/spack/packages/nasm/package.py | 0 var/spack/packages/ncurses/package.py | 8 --- var/spack/packages/netcdf/package.py | 0 var/spack/packages/netgauge/package.py | 0 var/spack/packages/netlib-blas/package.py | 6 --- var/spack/packages/netlib-lapack/package.py | 59 ---------------------- var/spack/packages/nettle/package.py | 0 var/spack/packages/ompss/package.py | 0 var/spack/packages/opari2/package.py | 0 .../openmpi/ad_lustre_rwcontig_open_source.patch | 0 var/spack/packages/openmpi/llnl-platforms.patch | 0 var/spack/packages/openmpi/package.py | 0 var/spack/packages/openssl/package.py | 0 var/spack/packages/otf/package.py | 0 var/spack/packages/otf2/package.py | 0 var/spack/packages/pango/package.py | 0 var/spack/packages/papi/package.py | 0 var/spack/packages/paraver/package.py | 0 var/spack/packages/parmetis/package.py | 0 var/spack/packages/parpack/package.py | 0 var/spack/packages/pcre/package.py | 0 var/spack/packages/petsc/package.py | 0 var/spack/packages/pidx/package.py | 21 -------- var/spack/packages/pixman/package.py | 0 var/spack/packages/pkg-config/package.py | 17 ------- var/spack/packages/pmgr_collective/package.py | 0 var/spack/packages/postgresql/package.py | 0 var/spack/packages/ppl/package.py | 0 var/spack/packages/protobuf/package.py | 16 ------ var/spack/packages/py-Cython/package.py | 12 +++++ var/spack/packages/py-Distutils2/package.py | 15 ++++++ var/spack/packages/py-astroML/package.py | 12 +++++ var/spack/packages/py-astropy/package.py | 12 +++++ var/spack/packages/py-autopep8/package.py | 12 +++++ var/spack/packages/py-basemap/package.py | 0 var/spack/packages/py-biopython/package.py | 0 var/spack/packages/py-certifi/package.py | 12 +++++ var/spack/packages/py-cffi/package.py | 0 var/spack/packages/py-cython/package.py | 0 var/spack/packages/py-dateutil/package.py | 0 var/spack/packages/py-decorator/package.py | 12 +++++ var/spack/packages/py-emcee/package.py | 12 +++++ var/spack/packages/py-epydoc/package.py | 0 var/spack/packages/py-fitsio/package.py | 13 +++++ var/spack/packages/py-genders/package.py | 0 var/spack/packages/py-gnuplot/package.py | 0 var/spack/packages/py-gnureadline/package.py | 12 +++++ var/spack/packages/py-h5py/package.py | 0 var/spack/packages/py-ipython/package.py | 21 ++++++-- var/spack/packages/py-ipython/package.py.backup | 27 ++++++++++ var/spack/packages/py-ipython_genutils/package.py | 12 +++++ var/spack/packages/py-joblib/package.py | 12 +++++ var/spack/packages/py-jsonschema/package.py | 16 ++++++ var/spack/packages/py-libxml2/package.py | 0 var/spack/packages/py-lockfile/package.py | 0 var/spack/packages/py-mako/package.py | 0 var/spack/packages/py-matplotlib/package.py | 1 - var/spack/packages/py-mock/package.py | 17 +++---- var/spack/packages/py-mpi4py/package.py | 0 var/spack/packages/py-mx/package.py | 0 var/spack/packages/py-nose/package.py | 0 var/spack/packages/py-numexpr/package.py | 12 +++++ var/spack/packages/py-numpy/package.py | 15 +----- var/spack/packages/py-pandas/package.py | 2 + var/spack/packages/py-pep8/package.py | 12 +++++ var/spack/packages/py-pexpect/package.py | 0 var/spack/packages/py-pickleshare/package.py | 12 +++++ var/spack/packages/py-pil/package.py | 0 var/spack/packages/py-pip/package.py | 12 +++++ var/spack/packages/py-pmw/package.py | 0 var/spack/packages/py-py/package.py | 12 +++++ var/spack/packages/py-py4j/package.py | 15 ++++++ var/spack/packages/py-pychecker/package.py | 0 var/spack/packages/py-pycparser/package.py | 0 var/spack/packages/py-pyelftools/package.py | 0 var/spack/packages/py-pygments/package.py | 0 var/spack/packages/py-pylint/package.py | 0 var/spack/packages/py-pypar/package.py | 0 var/spack/packages/py-pyparsing/package.py | 0 var/spack/packages/py-pyqt/package.py | 0 var/spack/packages/py-pyside/package.py | 5 +- var/spack/packages/py-pytest/package.py | 12 +++++ var/spack/packages/py-python-daemon/package.py | 0 var/spack/packages/py-python-dateutil/package.py | 12 +++++ var/spack/packages/py-pytz/package.py | 2 + var/spack/packages/py-pyzmq/package.py | 16 ++++++ var/spack/packages/py-rpy2/package.py | 0 var/spack/packages/py-scientificpython/package.py | 0 var/spack/packages/py-scikit-learn/package.py | 3 ++ var/spack/packages/py-scipy/package.py | 4 +- var/spack/packages/py-seaborn/package.py | 12 +++++ var/spack/packages/py-setuptools/package.py | 9 ++-- var/spack/packages/py-shiboken/package.py | 0 var/spack/packages/py-sip/package.py | 0 var/spack/packages/py-six/package.py | 2 + var/spack/packages/py-statsmodels/package.py | 12 +++++ var/spack/packages/py-sympy/package.py | 0 var/spack/packages/py-tables/package.py | 12 +++++ var/spack/packages/py-tornado/package.py | 17 +++++++ var/spack/packages/py-traitlets/package.py | 14 +++++ var/spack/packages/py-triangle-plot/package.py | 12 +++++ var/spack/packages/py-virtualenv/package.py | 0 var/spack/packages/py-yapf/package.py | 0 var/spack/packages/python/package.py | 0 var/spack/packages/qhull/package.py | 0 var/spack/packages/qt/package.py | 0 var/spack/packages/qthreads/package.py | 0 var/spack/packages/ravel/package.py | 0 var/spack/packages/readline/package.py | 0 .../rose/add_spack_compiler_recognition.patch | 0 var/spack/packages/rose/package.py | 0 var/spack/packages/ruby/package.py | 0 var/spack/packages/samtools/package.py | 18 ------- var/spack/packages/samtools/samtools1.2.patch | 20 -------- var/spack/packages/scalasca/package.py | 0 var/spack/packages/scorep/package.py | 15 +++--- var/spack/packages/scotch/package.py | 0 var/spack/packages/scr/package.py | 0 var/spack/packages/silo/package.py | 0 var/spack/packages/snappy/package.py | 15 ------ var/spack/packages/spindle/package.py | 0 var/spack/packages/sqlite/package.py | 0 var/spack/packages/stat/configure_mpicxx.patch | 0 var/spack/packages/stat/package.py | 11 +--- var/spack/packages/sundials/package.py | 0 var/spack/packages/swig/package.py | 0 var/spack/packages/task/package.py | 0 var/spack/packages/taskd/package.py | 0 var/spack/packages/tau/package.py | 0 var/spack/packages/tcl/package.py | 0 var/spack/packages/the_silver_searcher/package.py | 0 var/spack/packages/thrift/package.py | 0 var/spack/packages/tk/package.py | 0 var/spack/packages/tmux/package.py | 0 var/spack/packages/tmuxinator/package.py | 0 var/spack/packages/uncrustify/package.py | 0 var/spack/packages/util-linux/package.py | 0 var/spack/packages/vim/package.py | 23 ++------- var/spack/packages/vtk/package.py | 0 var/spack/packages/wget/package.py | 0 var/spack/packages/wx/package.py | 0 var/spack/packages/wxpropgrid/package.py | 0 var/spack/packages/xcb-proto/package.py | 0 var/spack/packages/xz/package.py | 0 var/spack/packages/yasm/package.py | 0 var/spack/packages/zeromq/package.py | 20 -------- var/spack/packages/zlib/package.py | 0 var/spack/packages/zsh/package.py | 0 279 files changed, 534 insertions(+), 731 deletions(-) delete mode 160000 utils/python_recipe_parser mode change 100644 => 100755 var/spack/packages/ImageMagick/package.py mode change 100644 => 100755 var/spack/packages/Mitos/package.py mode change 100644 => 100755 var/spack/packages/R/package.py mode change 100644 => 100755 var/spack/packages/SAMRAI/no-tool-build.patch mode change 100644 => 100755 var/spack/packages/SAMRAI/package.py mode change 100644 => 100755 var/spack/packages/adept-utils/package.py mode change 100644 => 100755 var/spack/packages/arpack/package.py delete mode 100644 var/spack/packages/asciidoc/package.py mode change 100644 => 100755 var/spack/packages/atk/package.py mode change 100644 => 100755 var/spack/packages/atlas/package.py mode change 100644 => 100755 var/spack/packages/autoconf/package.py mode change 100644 => 100755 var/spack/packages/automaded/package.py mode change 100644 => 100755 var/spack/packages/automake/package.py mode change 100644 => 100755 var/spack/packages/bear/package.py mode change 100644 => 100755 var/spack/packages/bib2xhtml/package.py mode change 100644 => 100755 var/spack/packages/binutils/package.py mode change 100644 => 100755 var/spack/packages/bison/package.py mode change 100644 => 100755 var/spack/packages/boost/package.py delete mode 100644 var/spack/packages/bowtie2/bowtie2-2.5.patch delete mode 100644 var/spack/packages/bowtie2/package.py mode change 100644 => 100755 var/spack/packages/boxlib/package.py mode change 100644 => 100755 var/spack/packages/bzip2/package.py mode change 100644 => 100755 var/spack/packages/cairo/package.py mode change 100644 => 100755 var/spack/packages/callpath/package.py mode change 100644 => 100755 var/spack/packages/cblas/package.py mode change 100644 => 100755 var/spack/packages/cgm/package.py mode change 100644 => 100755 var/spack/packages/clang/package.py mode change 100644 => 100755 var/spack/packages/cloog/package.py mode change 100644 => 100755 var/spack/packages/cmake/package.py mode change 100644 => 100755 var/spack/packages/coreutils/package.py mode change 100644 => 100755 var/spack/packages/cppcheck/package.py mode change 100644 => 100755 var/spack/packages/cram/package.py delete mode 100644 var/spack/packages/cscope/package.py mode change 100644 => 100755 var/spack/packages/cube/package.py delete mode 100644 var/spack/packages/czmq/package.py mode change 100644 => 100755 var/spack/packages/dbus/package.py delete mode 100644 var/spack/packages/docbook-xml/package.py delete mode 100644 var/spack/packages/doxygen/package.py mode change 100644 => 100755 var/spack/packages/dri2proto/package.py mode change 100644 => 100755 var/spack/packages/dtcmp/package.py mode change 100644 => 100755 var/spack/packages/dyninst/package.py create mode 100644 var/spack/packages/eigen/package.py delete mode 100644 var/spack/packages/elfutils/package.py mode change 100644 => 100755 var/spack/packages/extrae/package.py mode change 100644 => 100755 var/spack/packages/exuberant-ctags/package.py delete mode 100644 var/spack/packages/fish/package.py mode change 100644 => 100755 var/spack/packages/flex/package.py delete mode 100644 var/spack/packages/flux/package.py mode change 100644 => 100755 var/spack/packages/fontconfig/package.py mode change 100644 => 100755 var/spack/packages/freetype/package.py mode change 100644 => 100755 var/spack/packages/gasnet/package.py mode change 100644 => 100755 var/spack/packages/gcc/package.py mode change 100644 => 100755 var/spack/packages/gdk-pixbuf/package.py mode change 100644 => 100755 var/spack/packages/geos/package.py delete mode 100644 var/spack/packages/gflags/package.py delete mode 100644 var/spack/packages/ghostscript/package.py mode change 100644 => 100755 var/spack/packages/git/package.py mode change 100644 => 100755 var/spack/packages/glib/package.py mode change 100644 => 100755 var/spack/packages/global/package.py delete mode 100644 var/spack/packages/glog/package.py mode change 100644 => 100755 var/spack/packages/gmp/package.py mode change 100644 => 100755 var/spack/packages/gnutls/package.py mode change 100644 => 100755 var/spack/packages/gperf/package.py mode change 100644 => 100755 var/spack/packages/gperftools/package.py mode change 100644 => 100755 var/spack/packages/graphlib/package.py mode change 100644 => 100755 var/spack/packages/gtkplus/package.py mode change 100644 => 100755 var/spack/packages/harfbuzz/package.py mode change 100644 => 100755 var/spack/packages/hdf5/package.py mode change 100644 => 100755 var/spack/packages/hwloc/package.py mode change 100644 => 100755 var/spack/packages/hypre/package.py mode change 100644 => 100755 var/spack/packages/icu/package.py mode change 100644 => 100755 var/spack/packages/icu4c/package.py mode change 100644 => 100755 var/spack/packages/isl/package.py mode change 100644 => 100755 var/spack/packages/jdk/package.py mode change 100644 => 100755 var/spack/packages/jpeg/package.py create mode 100755 var/spack/packages/lapack/package.py mode change 100644 => 100755 var/spack/packages/launchmon/package.py mode change 100644 => 100755 var/spack/packages/launchmon/patch.lmon_install_dir mode change 100644 => 100755 var/spack/packages/lcms/package.py delete mode 100644 var/spack/packages/leveldb/package.py mode change 100644 => 100755 var/spack/packages/libNBC/package.py mode change 100644 => 100755 var/spack/packages/libarchive/package.py mode change 100644 => 100755 var/spack/packages/libcircle/package.py mode change 100644 => 100755 var/spack/packages/libdrm/package.py mode change 100644 => 100755 var/spack/packages/libdwarf/package.py mode change 100644 => 100755 var/spack/packages/libelf/package.py mode change 100644 => 100755 var/spack/packages/libevent/package.py mode change 100644 => 100755 var/spack/packages/libffi/package.py mode change 100644 => 100755 var/spack/packages/libgcrypt/package.py mode change 100644 => 100755 var/spack/packages/libgpg-error/package.py mode change 100644 => 100755 var/spack/packages/libjpeg-turbo/package.py delete mode 100644 var/spack/packages/libjson-c/package.py mode change 100644 => 100755 var/spack/packages/libmng/package.py mode change 100644 => 100755 var/spack/packages/libmonitor/package.py mode change 100644 => 100755 var/spack/packages/libpciaccess/package.py mode change 100644 => 100755 var/spack/packages/libpng/package.py delete mode 100644 var/spack/packages/libsodium/package.py mode change 100644 => 100755 var/spack/packages/libtiff/package.py mode change 100644 => 100755 var/spack/packages/libtool/package.py mode change 100644 => 100755 var/spack/packages/libunwind/package.py mode change 100644 => 100755 var/spack/packages/libuuid/package.py mode change 100644 => 100755 var/spack/packages/libxcb/package.py mode change 100644 => 100755 var/spack/packages/libxml2/package.py mode change 100644 => 100755 var/spack/packages/libxshmfence/package.py mode change 100644 => 100755 var/spack/packages/libxslt/package.py mode change 100644 => 100755 var/spack/packages/llvm-lld/package.py mode change 100644 => 100755 var/spack/packages/llvm/package.py delete mode 100644 var/spack/packages/lmdb/package.py delete mode 100644 var/spack/packages/lua/package.py mode change 100644 => 100755 var/spack/packages/lwgrp/package.py mode change 100644 => 100755 var/spack/packages/lwm2/package.py mode change 100644 => 100755 var/spack/packages/memaxes/package.py mode change 100644 => 100755 var/spack/packages/mesa/package.py mode change 100644 => 100755 var/spack/packages/metis/package.py mode change 100644 => 100755 var/spack/packages/mpc/package.py mode change 100644 => 100755 var/spack/packages/mpe2/mpe2.patch mode change 100644 => 100755 var/spack/packages/mpe2/package.py mode change 100644 => 100755 var/spack/packages/mpfr/package.py mode change 100644 => 100755 var/spack/packages/mpibash/mpibash-4.3.patch mode change 100644 => 100755 var/spack/packages/mpibash/package.py mode change 100644 => 100755 var/spack/packages/mpich/package.py mode change 100644 => 100755 var/spack/packages/mpileaks/package.py mode change 100644 => 100755 var/spack/packages/mrnet/package.py delete mode 100644 var/spack/packages/munge/package.py mode change 100644 => 100755 var/spack/packages/muster/package.py mode change 100644 => 100755 var/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch mode change 100644 => 100755 var/spack/packages/mvapich2/package.py mode change 100644 => 100755 var/spack/packages/nasm/package.py mode change 100644 => 100755 var/spack/packages/ncurses/package.py mode change 100644 => 100755 var/spack/packages/netcdf/package.py mode change 100644 => 100755 var/spack/packages/netgauge/package.py mode change 100644 => 100755 var/spack/packages/netlib-blas/package.py delete mode 100644 var/spack/packages/netlib-lapack/package.py mode change 100644 => 100755 var/spack/packages/nettle/package.py mode change 100644 => 100755 var/spack/packages/ompss/package.py mode change 100644 => 100755 var/spack/packages/opari2/package.py mode change 100644 => 100755 var/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch mode change 100644 => 100755 var/spack/packages/openmpi/llnl-platforms.patch mode change 100644 => 100755 var/spack/packages/openmpi/package.py mode change 100644 => 100755 var/spack/packages/openssl/package.py mode change 100644 => 100755 var/spack/packages/otf/package.py mode change 100644 => 100755 var/spack/packages/otf2/package.py mode change 100644 => 100755 var/spack/packages/pango/package.py mode change 100644 => 100755 var/spack/packages/papi/package.py mode change 100644 => 100755 var/spack/packages/paraver/package.py mode change 100644 => 100755 var/spack/packages/parmetis/package.py mode change 100644 => 100755 var/spack/packages/parpack/package.py mode change 100644 => 100755 var/spack/packages/pcre/package.py mode change 100644 => 100755 var/spack/packages/petsc/package.py delete mode 100644 var/spack/packages/pidx/package.py mode change 100644 => 100755 var/spack/packages/pixman/package.py delete mode 100644 var/spack/packages/pkg-config/package.py mode change 100644 => 100755 var/spack/packages/pmgr_collective/package.py mode change 100644 => 100755 var/spack/packages/postgresql/package.py mode change 100644 => 100755 var/spack/packages/ppl/package.py delete mode 100644 var/spack/packages/protobuf/package.py create mode 100644 var/spack/packages/py-Cython/package.py create mode 100644 var/spack/packages/py-Distutils2/package.py create mode 100644 var/spack/packages/py-astroML/package.py create mode 100644 var/spack/packages/py-astropy/package.py create mode 100644 var/spack/packages/py-autopep8/package.py mode change 100644 => 100755 var/spack/packages/py-basemap/package.py mode change 100644 => 100755 var/spack/packages/py-biopython/package.py create mode 100644 var/spack/packages/py-certifi/package.py mode change 100644 => 100755 var/spack/packages/py-cffi/package.py mode change 100644 => 100755 var/spack/packages/py-cython/package.py mode change 100644 => 100755 var/spack/packages/py-dateutil/package.py create mode 100644 var/spack/packages/py-decorator/package.py create mode 100644 var/spack/packages/py-emcee/package.py mode change 100644 => 100755 var/spack/packages/py-epydoc/package.py create mode 100644 var/spack/packages/py-fitsio/package.py mode change 100644 => 100755 var/spack/packages/py-genders/package.py mode change 100644 => 100755 var/spack/packages/py-gnuplot/package.py create mode 100644 var/spack/packages/py-gnureadline/package.py mode change 100644 => 100755 var/spack/packages/py-h5py/package.py mode change 100644 => 100755 var/spack/packages/py-ipython/package.py create mode 100755 var/spack/packages/py-ipython/package.py.backup create mode 100644 var/spack/packages/py-ipython_genutils/package.py create mode 100644 var/spack/packages/py-joblib/package.py create mode 100755 var/spack/packages/py-jsonschema/package.py mode change 100644 => 100755 var/spack/packages/py-libxml2/package.py mode change 100644 => 100755 var/spack/packages/py-lockfile/package.py mode change 100644 => 100755 var/spack/packages/py-mako/package.py mode change 100644 => 100755 var/spack/packages/py-matplotlib/package.py mode change 100644 => 100755 var/spack/packages/py-mpi4py/package.py mode change 100644 => 100755 var/spack/packages/py-mx/package.py mode change 100644 => 100755 var/spack/packages/py-nose/package.py create mode 100644 var/spack/packages/py-numexpr/package.py mode change 100644 => 100755 var/spack/packages/py-numpy/package.py mode change 100644 => 100755 var/spack/packages/py-pandas/package.py create mode 100644 var/spack/packages/py-pep8/package.py mode change 100644 => 100755 var/spack/packages/py-pexpect/package.py create mode 100644 var/spack/packages/py-pickleshare/package.py mode change 100644 => 100755 var/spack/packages/py-pil/package.py create mode 100644 var/spack/packages/py-pip/package.py mode change 100644 => 100755 var/spack/packages/py-pmw/package.py create mode 100644 var/spack/packages/py-py/package.py create mode 100755 var/spack/packages/py-py4j/package.py mode change 100644 => 100755 var/spack/packages/py-pychecker/package.py mode change 100644 => 100755 var/spack/packages/py-pycparser/package.py mode change 100644 => 100755 var/spack/packages/py-pyelftools/package.py mode change 100644 => 100755 var/spack/packages/py-pygments/package.py mode change 100644 => 100755 var/spack/packages/py-pylint/package.py mode change 100644 => 100755 var/spack/packages/py-pypar/package.py mode change 100644 => 100755 var/spack/packages/py-pyparsing/package.py mode change 100644 => 100755 var/spack/packages/py-pyqt/package.py mode change 100644 => 100755 var/spack/packages/py-pyside/package.py create mode 100644 var/spack/packages/py-pytest/package.py mode change 100644 => 100755 var/spack/packages/py-python-daemon/package.py create mode 100644 var/spack/packages/py-python-dateutil/package.py mode change 100644 => 100755 var/spack/packages/py-pytz/package.py create mode 100755 var/spack/packages/py-pyzmq/package.py mode change 100644 => 100755 var/spack/packages/py-rpy2/package.py mode change 100644 => 100755 var/spack/packages/py-scientificpython/package.py mode change 100644 => 100755 var/spack/packages/py-scikit-learn/package.py mode change 100644 => 100755 var/spack/packages/py-scipy/package.py create mode 100644 var/spack/packages/py-seaborn/package.py mode change 100644 => 100755 var/spack/packages/py-setuptools/package.py mode change 100644 => 100755 var/spack/packages/py-shiboken/package.py mode change 100644 => 100755 var/spack/packages/py-sip/package.py mode change 100644 => 100755 var/spack/packages/py-six/package.py create mode 100644 var/spack/packages/py-statsmodels/package.py mode change 100644 => 100755 var/spack/packages/py-sympy/package.py create mode 100644 var/spack/packages/py-tables/package.py create mode 100755 var/spack/packages/py-tornado/package.py create mode 100755 var/spack/packages/py-traitlets/package.py create mode 100644 var/spack/packages/py-triangle-plot/package.py mode change 100644 => 100755 var/spack/packages/py-virtualenv/package.py mode change 100644 => 100755 var/spack/packages/py-yapf/package.py mode change 100644 => 100755 var/spack/packages/python/package.py mode change 100644 => 100755 var/spack/packages/qhull/package.py mode change 100644 => 100755 var/spack/packages/qt/package.py mode change 100644 => 100755 var/spack/packages/qthreads/package.py mode change 100644 => 100755 var/spack/packages/ravel/package.py mode change 100644 => 100755 var/spack/packages/readline/package.py mode change 100644 => 100755 var/spack/packages/rose/add_spack_compiler_recognition.patch mode change 100644 => 100755 var/spack/packages/rose/package.py mode change 100644 => 100755 var/spack/packages/ruby/package.py delete mode 100644 var/spack/packages/samtools/package.py delete mode 100644 var/spack/packages/samtools/samtools1.2.patch mode change 100644 => 100755 var/spack/packages/scalasca/package.py mode change 100644 => 100755 var/spack/packages/scorep/package.py mode change 100644 => 100755 var/spack/packages/scotch/package.py mode change 100644 => 100755 var/spack/packages/scr/package.py mode change 100644 => 100755 var/spack/packages/silo/package.py delete mode 100644 var/spack/packages/snappy/package.py mode change 100644 => 100755 var/spack/packages/spindle/package.py mode change 100644 => 100755 var/spack/packages/sqlite/package.py mode change 100644 => 100755 var/spack/packages/stat/configure_mpicxx.patch mode change 100644 => 100755 var/spack/packages/stat/package.py mode change 100644 => 100755 var/spack/packages/sundials/package.py mode change 100644 => 100755 var/spack/packages/swig/package.py mode change 100644 => 100755 var/spack/packages/task/package.py mode change 100644 => 100755 var/spack/packages/taskd/package.py mode change 100644 => 100755 var/spack/packages/tau/package.py mode change 100644 => 100755 var/spack/packages/tcl/package.py mode change 100644 => 100755 var/spack/packages/the_silver_searcher/package.py mode change 100644 => 100755 var/spack/packages/thrift/package.py mode change 100644 => 100755 var/spack/packages/tk/package.py mode change 100644 => 100755 var/spack/packages/tmux/package.py mode change 100644 => 100755 var/spack/packages/tmuxinator/package.py mode change 100644 => 100755 var/spack/packages/uncrustify/package.py mode change 100644 => 100755 var/spack/packages/util-linux/package.py mode change 100644 => 100755 var/spack/packages/vim/package.py mode change 100644 => 100755 var/spack/packages/vtk/package.py mode change 100644 => 100755 var/spack/packages/wget/package.py mode change 100644 => 100755 var/spack/packages/wx/package.py mode change 100644 => 100755 var/spack/packages/wxpropgrid/package.py mode change 100644 => 100755 var/spack/packages/xcb-proto/package.py mode change 100644 => 100755 var/spack/packages/xz/package.py mode change 100644 => 100755 var/spack/packages/yasm/package.py delete mode 100644 var/spack/packages/zeromq/package.py mode change 100644 => 100755 var/spack/packages/zlib/package.py mode change 100644 => 100755 var/spack/packages/zsh/package.py diff --git a/.gitignore b/.gitignore index 1c6ca4c99e..8146921fd8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /etc/spackconfig /share/spack/dotkit /share/spack/modules +*.ropeproject diff --git a/.gitmodules b/.gitmodules index a097fcd8cf..1d770f415b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "utils/python_recipe_parser"] - path = utils/python_recipe_parser +[submodule "/lib/spack/spack/util/python_recipe_parser"] + path = /lib/spack/spack/util/python_recipe_parser url = https://github.com/karenyyng/spack_python_package_parser diff --git a/utils/python_recipe_parser b/utils/python_recipe_parser deleted file mode 160000 index 3158074a2d..0000000000 --- a/utils/python_recipe_parser +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3158074a2d74f99aa72289dfcf093b1b0ba4474e diff --git a/var/spack/packages/ImageMagick/package.py b/var/spack/packages/ImageMagick/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/Mitos/package.py b/var/spack/packages/Mitos/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/R/package.py b/var/spack/packages/R/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/SAMRAI/no-tool-build.patch b/var/spack/packages/SAMRAI/no-tool-build.patch old mode 100644 new mode 100755 diff --git a/var/spack/packages/SAMRAI/package.py b/var/spack/packages/SAMRAI/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/adept-utils/package.py b/var/spack/packages/adept-utils/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/arpack/package.py b/var/spack/packages/arpack/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/asciidoc/package.py b/var/spack/packages/asciidoc/package.py deleted file mode 100644 index 828f3b3f4f..0000000000 --- a/var/spack/packages/asciidoc/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Asciidoc(Package): - """ A presentable text document format for writing articles, UNIX man - pages and other small to medium sized documents.""" - homepage = "http://asciidoc.org" - url = "http://downloads.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz" - - version('8.6.9', 'c59018f105be8d022714b826b0be130a') - - depends_on('libxml2') - depends_on('libxslt') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/packages/atk/package.py b/var/spack/packages/atk/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/atlas/package.py b/var/spack/packages/atlas/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/autoconf/package.py b/var/spack/packages/autoconf/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/automaded/package.py b/var/spack/packages/automaded/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/automake/package.py b/var/spack/packages/automake/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/bear/package.py b/var/spack/packages/bear/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/bib2xhtml/package.py b/var/spack/packages/bib2xhtml/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/bison/package.py b/var/spack/packages/bison/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py old mode 100644 new mode 100755 index 35824d53a2..254d1afda1 --- a/var/spack/packages/boost/package.py +++ b/var/spack/packages/boost/package.py @@ -14,10 +14,6 @@ class Boost(Package): list_url = "http://sourceforge.net/projects/boost/files/boost/" list_depth = 2 - version('1.59.0', '6aa9a5c6a4ca1016edd0ed1178e3cb87') - version('1.58.0', 'b8839650e61e9c1c0a89f371dd475546') - version('1.57.0', '1be49befbdd9a5ce9def2983ba3e7b76') - version('1.56.0', 'a744cf167b05d72335f27c88115f211d') version('1.55.0', 'd6eef4b4cacb2183f2bf265a5a03a354') version('1.54.0', '15cb8c0803064faef0c4ddf5bc5ca279') version('1.53.0', 'a00d22605d5dbcfb4c9936a9b35bc4c2') diff --git a/var/spack/packages/bowtie2/bowtie2-2.5.patch b/var/spack/packages/bowtie2/bowtie2-2.5.patch deleted file mode 100644 index 290be39c73..0000000000 --- a/var/spack/packages/bowtie2/bowtie2-2.5.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- Makefile 2015-02-26 10:50:00.000000000 -0800 -+++ Makefile.new 2015-07-29 18:03:59.891357399 -0700 -@@ -22,10 +22,10 @@ - # - - INC = --GCC_PREFIX = $(shell dirname `which gcc`) -+GCC_PREFIX = - GCC_SUFFIX = --CC = $(GCC_PREFIX)/gcc$(GCC_SUFFIX) --CPP = $(GCC_PREFIX)/g++$(GCC_SUFFIX) -+CC = cc -+CPP = c++ - CXX = $(CPP) - HEADERS = $(wildcard *.h) - BOWTIE_MM = 1 diff --git a/var/spack/packages/bowtie2/package.py b/var/spack/packages/bowtie2/package.py deleted file mode 100644 index 339aab6598..0000000000 --- a/var/spack/packages/bowtie2/package.py +++ /dev/null @@ -1,24 +0,0 @@ -from spack import * -from glob import glob -class Bowtie2(Package): - """Description""" - homepage = "bowtie-bio.sourceforge.net/bowtie2/index.shtml" - version('2.2.5','51fa97a862d248d7ee660efc1147c75f', url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.2.5/bowtie2-2.2.5-source.zip") - - patch('bowtie2-2.5.patch',when='@2.2.5', level=0) - - def install(self, spec, prefix): - make() - mkdirp(prefix.bin) - for bow in glob("bowtie2*"): - install(bow, prefix.bin) - # install('bowtie2',prefix.bin) - # install('bowtie2-align-l',prefix.bin) - # install('bowtie2-align-s',prefix.bin) - # install('bowtie2-build',prefix.bin) - # install('bowtie2-build-l',prefix.bin) - # install('bowtie2-build-s',prefix.bin) - # install('bowtie2-inspect',prefix.bin) - # install('bowtie2-inspect-l',prefix.bin) - # install('bowtie2-inspect-s',prefix.bin) - diff --git a/var/spack/packages/boxlib/package.py b/var/spack/packages/boxlib/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/bzip2/package.py b/var/spack/packages/bzip2/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/cairo/package.py b/var/spack/packages/cairo/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/callpath/package.py b/var/spack/packages/callpath/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/cblas/package.py b/var/spack/packages/cblas/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/cgm/package.py b/var/spack/packages/cgm/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/clang/package.py b/var/spack/packages/clang/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/cloog/package.py b/var/spack/packages/cloog/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/cmake/package.py b/var/spack/packages/cmake/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/coreutils/package.py b/var/spack/packages/coreutils/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/cppcheck/package.py b/var/spack/packages/cppcheck/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/cram/package.py b/var/spack/packages/cram/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/cscope/package.py b/var/spack/packages/cscope/package.py deleted file mode 100644 index 9aac0f7304..0000000000 --- a/var/spack/packages/cscope/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Cscope(Package): - """Cscope is a developer's tool for browsing source code.""" - homepage = "http://http://cscope.sourceforge.net/" - url = "http://downloads.sourceforge.net/project/cscope/cscope/15.8b/cscope-15.8b.tar.gz" - - version('15.8b', '8f9409a238ee313a96f9f87fe0f3b176') - - # Can be configured to use flex (not necessary) - # ./configure --with-flex - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/packages/cube/package.py b/var/spack/packages/cube/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/czmq/package.py b/var/spack/packages/czmq/package.py deleted file mode 100644 index a2f1947554..0000000000 --- a/var/spack/packages/czmq/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Czmq(Package): - """ A C interface to the ZMQ library """ - homepage = "http://czmq.zeromq.org" - url = "https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz" - - version('3.0.2', '23e9885f7ee3ce88d99d0425f52e9be1', url='https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz') - - depends_on('zeromq') - - def install(self, spec, prefix): - bash = which("bash") - bash("./autogen.sh") - configure("--prefix=%s" % prefix) - - make() - make("install") - diff --git a/var/spack/packages/dbus/package.py b/var/spack/packages/dbus/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/docbook-xml/package.py b/var/spack/packages/docbook-xml/package.py deleted file mode 100644 index fce1de7deb..0000000000 --- a/var/spack/packages/docbook-xml/package.py +++ /dev/null @@ -1,19 +0,0 @@ -import os -import glob -from spack import * - - -class DocbookXml(Package): - """Docbook DTD XML files.""" - homepage = "http://www.oasis-open.org/docbook" - url = "http://www.oasis-open.org/docbook/xml/4.5/docbook-xml-4.5.zip" - - 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) diff --git a/var/spack/packages/doxygen/package.py b/var/spack/packages/doxygen/package.py deleted file mode 100644 index 3d4a4e47a7..0000000000 --- a/var/spack/packages/doxygen/package.py +++ /dev/null @@ -1,25 +0,0 @@ -#------------------------------------------------------------------------------ -# Author: Justin Too -# Date: September 11, 2015 -#------------------------------------------------------------------------------ - -from spack import * - -class Doxygen(Package): - """Doxygen is the de facto standard tool for generating documentation - from annotated C++ sources, but it also supports other popular programming - languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, - Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some extent D.. - """ - homepage = "http://www.stack.nl/~dimitri/doxygen/" - url = "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.src.tar.gz" - - version('1.8.10', '79767ccd986f12a0f949015efb5f058f') - - depends_on("cmake@2.8.12:") - - def install(self, spec, prefix): - cmake('.', *std_cmake_args) - - make() - make("install") diff --git a/var/spack/packages/dri2proto/package.py b/var/spack/packages/dri2proto/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/dtcmp/package.py b/var/spack/packages/dtcmp/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/dyninst/package.py b/var/spack/packages/dyninst/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/eigen/package.py b/var/spack/packages/eigen/package.py new file mode 100644 index 0000000000..b4d89ea3a0 --- /dev/null +++ b/var/spack/packages/eigen/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Eigen(Package): + """Eigen is a C++ template library for linear algebra: matrices, vectors, + numerical solvers, and related algorithms..""" + homepage = "http://eigen.tuxfamily.org/" + url = "http://bitbucket.org/eigen/eigen/get/3.2.5.tar.gz" + + version('3.2.5', '8cc513ac6ec687117acadddfcacf551b') + + def install(self, spec, prefix): + import os + os.system("mkdir ./build_dir && cd ./build_dir") + cmake('../', *std_cmake_args) + + make() + make("install") diff --git a/var/spack/packages/elfutils/package.py b/var/spack/packages/elfutils/package.py deleted file mode 100644 index 926d234584..0000000000 --- a/var/spack/packages/elfutils/package.py +++ /dev/null @@ -1,26 +0,0 @@ -from spack import * - -class Elfutils(Package): - """elfutils is a collection of various binary tools such as - eu-objdump, eu-readelf, and other utilities that allow you to - inspect and manipulate ELF files. Refer to Table 5.Tools Included - in elfutils for Red Hat Developer for a complete list of binary - tools that are distributed with the Red Hat Developer Toolset - version of elfutils.""" - - homepage = "https://fedorahosted.org/elfutils/" - - version('0.163', - git='git://git.fedorahosted.org/git/elfutils.git', - tag='elfutils-0.163') - - provides('elf') - - def install(self, spec, prefix): - autoreconf = which('autoreconf') - autoreconf('-if') - - configure('--prefix=%s' % prefix, '--enable-maintainer-mode') - make() - make("install") - diff --git a/var/spack/packages/extrae/package.py b/var/spack/packages/extrae/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/exuberant-ctags/package.py b/var/spack/packages/exuberant-ctags/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/fish/package.py b/var/spack/packages/fish/package.py deleted file mode 100644 index 1225558705..0000000000 --- a/var/spack/packages/fish/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Fish(Package): - """fish is a smart and user-friendly command line shell for OS X, Linux, and - the rest of the family. - """ - - homepage = "http://fishshell.com/" - url = "http://fishshell.com/files/2.2.0/fish-2.2.0.tar.gz" - list_url = homepage - - version('2.2.0', 'a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/packages/flex/package.py b/var/spack/packages/flex/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/flux/package.py b/var/spack/packages/flux/package.py deleted file mode 100644 index c128f46be8..0000000000 --- a/var/spack/packages/flux/package.py +++ /dev/null @@ -1,36 +0,0 @@ -from spack import * -import os - -class Flux(Package): - """ A next-generation resource manager (pre-alpha) """ - - homepage = "https://github.com/flux-framework/flux-core" - url = "https://github.com/flux-framework/flux-core" - - version('master', branch='master', git='https://github.com/flux-framework/flux-core') - - # Also needs autotools, but should use the system version if available - depends_on("zeromq@4.0.4:") - depends_on("czmq@2.2:") - depends_on("lua@5.1:5.1.99") - depends_on("munge") - depends_on("libjson-c") - depends_on("libxslt") - # TODO: This provides a catalog, hacked with environment below for now - depends_on("docbook-xml") - depends_on("asciidoc") - depends_on("python") - depends_on("py-cffi") - - def install(self, spec, prefix): - # Bootstrap with autotools - bash = which('bash') - bash('./autogen.sh') - - # Fix asciidoc dependency on xml style sheets and whatnot - os.environ['XML_CATALOG_FILES'] = os.path.join(spec['docbook-xml'].prefix, - 'catalog.xml') - # Configure, compile & install - configure("--prefix=" + prefix) - make("install", "V=1") - diff --git a/var/spack/packages/fontconfig/package.py b/var/spack/packages/fontconfig/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/freetype/package.py b/var/spack/packages/freetype/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/gasnet/package.py b/var/spack/packages/gasnet/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/gcc/package.py b/var/spack/packages/gcc/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/gdk-pixbuf/package.py b/var/spack/packages/gdk-pixbuf/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/geos/package.py b/var/spack/packages/geos/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/gflags/package.py b/var/spack/packages/gflags/package.py deleted file mode 100644 index 62dd80a094..0000000000 --- a/var/spack/packages/gflags/package.py +++ /dev/null @@ -1,21 +0,0 @@ -import os -from spack import * - -class Gflags(Package): - """The gflags package contains a C++ library that implements - commandline flags processing. It includes built-in support for - standard types such as string and the ability to define flags - in the source file in which they are used. Online documentation - available at: https://gflags.github.io/gflags/""" - - homepage = "https://gflags.github.io/gflags" - url = "https://github.com/gflags/gflags/archive/v2.1.2.tar.gz" - - version('2.1.2', 'ac432de923f9de1e9780b5254884599f') - - def install(self, spec, prefix): - cmake("-DCMAKE_INSTALL_PREFIX=" + prefix, - "-DBUILD_SHARED_LIBS=ON") - make() - make("test") - make("install") diff --git a/var/spack/packages/ghostscript/package.py b/var/spack/packages/ghostscript/package.py deleted file mode 100644 index 0ab49d425f..0000000000 --- a/var/spack/packages/ghostscript/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Ghostscript(Package): - """an interpreter for the PostScript language and for PDF. """ - homepage = "http://ghostscript.com/" - url = "http://downloads.ghostscript.com/public/ghostscript-9.16.tar.gz" - - version('9.16', '829319325bbdb83f5c81379a8f86f38f') - - parallel = False - - def install(self, spec, prefix): - configure("--prefix=%s" %prefix, "--enable-shared") - - make() - make("install") - diff --git a/var/spack/packages/git/package.py b/var/spack/packages/git/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/glib/package.py b/var/spack/packages/glib/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/global/package.py b/var/spack/packages/global/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/glog/package.py b/var/spack/packages/glog/package.py deleted file mode 100644 index d73386b394..0000000000 --- a/var/spack/packages/glog/package.py +++ /dev/null @@ -1,15 +0,0 @@ -import os -from spack import * - -class Glog(Package): - """C++ implementation of the Google logging module.""" - - homepage = "https://github.com/google/glog" - url = "https://github.com/google/glog/archive/v0.3.3.tar.gz" - - version('0.3.3', 'c1f86af27bd9c73186730aa957607ed0') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/gmp/package.py b/var/spack/packages/gmp/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/gnutls/package.py b/var/spack/packages/gnutls/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/gperf/package.py b/var/spack/packages/gperf/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/gperftools/package.py b/var/spack/packages/gperftools/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/graphlib/package.py b/var/spack/packages/graphlib/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/graphviz/package.py b/var/spack/packages/graphviz/package.py index 7af7da1881..8244feccfd 100644 --- a/var/spack/packages/graphviz/package.py +++ b/var/spack/packages/graphviz/package.py @@ -1,21 +1,24 @@ from spack import * class Graphviz(Package): - """Graph Visualization Software""" + """graph visualization software.""" homepage = "http://www.graphviz.org" url = "http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz" version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae') + version('2.36.0', '1f41664dba0c93109ac8b71216bf2b57') - parallel = False - - depends_on("swig") - depends_on("python") - depends_on("ghostscript") + depends_on("cairo@1.1.10") + depends_on("freetype@2.1.10") + depends_on("fontconfig") + depends_on("zlib@1.2.3") + # depends_on("libpng@1.2.10") + # depends_on("expat@2.0.0") + # depends_on("gd@2.0.34") def install(self, spec, prefix): - configure("--prefix=%s" %prefix) + configure('--prefix=%s' % prefix) + # FIXME: Add logic to build and install here make() make("install") - diff --git a/var/spack/packages/gtkplus/package.py b/var/spack/packages/gtkplus/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/harfbuzz/package.py b/var/spack/packages/harfbuzz/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/hdf5/package.py b/var/spack/packages/hdf5/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/hwloc/package.py b/var/spack/packages/hwloc/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/hypre/package.py b/var/spack/packages/hypre/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/icu/package.py b/var/spack/packages/icu/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/icu4c/package.py b/var/spack/packages/icu4c/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/isl/package.py b/var/spack/packages/isl/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/jdk/package.py b/var/spack/packages/jdk/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/jpeg/package.py b/var/spack/packages/jpeg/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/lapack/package.py b/var/spack/packages/lapack/package.py new file mode 100755 index 0000000000..d9d37e3e4a --- /dev/null +++ b/var/spack/packages/lapack/package.py @@ -0,0 +1,45 @@ +from spack import * + +class Lapack(Package): + """ + LAPACK version 3.X is a comprehensive FORTRAN library that does + linear algebra operations including matrix inversions, least + squared solutions to linear sets of equations, eigenvector + analysis, singular value decomposition, etc. It is a very + comprehensive and reputable package that has found extensive + use in the scientific community. + """ + homepage = "http://www.netlib.org/lapack/" + url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" + + version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') + version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478') + version('3.4.1', '44c3869c38c8335c2b9c2a8bb276eb55') + version('3.4.0', '02d5706ec03ba885fc246e5fa10d8c70') + version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4') + + # blas is a virtual dependency. + depends_on('blas') + + # Doesn't always build correctly in parallel + parallel = False + + @when('^netlib-blas') + def get_blas_libs(self): + blas = self.spec['netlib-blas'] + return [join_path(blas.prefix.lib, 'blas.a')] + + + @when('^atlas') + def get_blas_libs(self): + blas = self.spec['atlas'] + return [join_path(blas.prefix.lib, l) + for l in ('libf77blas.a', 'libatlas.a')] + + + def install(self, spec, prefix): + blas_libs = ";".join(self.get_blas_libs()) + cmake(".", '-DBLAS_LIBRARIES=' + blas_libs, *std_cmake_args) + make() + make("install") + diff --git a/var/spack/packages/launchmon/package.py b/var/spack/packages/launchmon/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/launchmon/patch.lmon_install_dir b/var/spack/packages/launchmon/patch.lmon_install_dir old mode 100644 new mode 100755 diff --git a/var/spack/packages/lcms/package.py b/var/spack/packages/lcms/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/leveldb/package.py b/var/spack/packages/leveldb/package.py deleted file mode 100644 index da68a9cbcb..0000000000 --- a/var/spack/packages/leveldb/package.py +++ /dev/null @@ -1,29 +0,0 @@ -import os -import glob -from spack import * - -class Leveldb(Package): - """LevelDB is a fast key-value storage library written at Google - that provides an ordered mapping from string keys to string values.""" - - homepage = "https://github.com/google/leveldb" - url = "https://github.com/google/leveldb/archive/v1.18.tar.gz" - - version('1.18', '73770de34a2a5ab34498d2e05b2b7fa0') - - depends_on("snappy") - - def install(self, spec, prefix): - make() - - mkdirp(prefix.include) - mkdirp(prefix.lib) - - cp = which('cp') - - # cp --preserve=links libleveldb.* prefix/lib - args = glob.glob('libleveldb.*') - args.append(prefix + '/lib') - cp('--preserve=links', *args) - - cp('-r', 'include/leveldb', prefix + '/include') diff --git a/var/spack/packages/libNBC/package.py b/var/spack/packages/libNBC/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libarchive/package.py b/var/spack/packages/libarchive/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libcircle/package.py b/var/spack/packages/libcircle/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libdrm/package.py b/var/spack/packages/libdrm/package.py old mode 100644 new mode 100755 index 00736b7811..1cab5372be --- a/var/spack/packages/libdrm/package.py +++ b/var/spack/packages/libdrm/package.py @@ -2,7 +2,7 @@ from spack import * class Libdrm(Package): """A userspace library for accessing the DRM, direct - rendering manager, on Linux, BSD and other operating + rendering manager, on Linux, BSD and other operating systems that support the ioctl interface.""" homepage = "http://dri.freedesktop.org/libdrm/" # no real website... @@ -11,8 +11,11 @@ class Libdrm(Package): version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6') version('2.4.33', '86e4e3debe7087d5404461e0032231c8') + depends_on("libpciaccess") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) + make("clean") make() make("install") diff --git a/var/spack/packages/libdwarf/package.py b/var/spack/packages/libdwarf/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libelf/package.py b/var/spack/packages/libelf/package.py old mode 100644 new mode 100755 index 9338b8f393..bf2fefabd5 --- a/var/spack/packages/libelf/package.py +++ b/var/spack/packages/libelf/package.py @@ -36,8 +36,6 @@ class Libelf(Package): version('0.8.13', '4136d7b4c04df68b686570afa26988ac') version('0.8.12', 'e21f8273d9f5f6d43a59878dc274fec7') - provides('elf') - def install(self, spec, prefix): configure("--prefix=" + prefix, "--enable-shared", diff --git a/var/spack/packages/libevent/package.py b/var/spack/packages/libevent/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libffi/package.py b/var/spack/packages/libffi/package.py old mode 100644 new mode 100755 index 18acabb00c..2c1c4eed4d --- a/var/spack/packages/libffi/package.py +++ b/var/spack/packages/libffi/package.py @@ -6,9 +6,9 @@ class Libffi(Package): to call any function specified by a call interface description at run time.""" homepage = "https://sourceware.org/libffi/" - - version('3.2.1','83b89587607e3eb65c70d361f13bab43',url = "ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz") - #version('3.1', 'f5898b29bbfd70502831a212d9249d10',url = "ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz") # Has a bug $(lib64) instead of ${lib64} in libffi.pc + url = "ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz" + + version('3.1', 'f5898b29bbfd70502831a212d9249d10') def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/packages/libgcrypt/package.py b/var/spack/packages/libgcrypt/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libgpg-error/package.py b/var/spack/packages/libgpg-error/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libjpeg-turbo/package.py b/var/spack/packages/libjpeg-turbo/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libjson-c/package.py b/var/spack/packages/libjson-c/package.py deleted file mode 100644 index c0801cce9c..0000000000 --- a/var/spack/packages/libjson-c/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class LibjsonC(Package): - """ A JSON implementation in C """ - homepage = "https://github.com/json-c/json-c/wiki" - url = "https://s3.amazonaws.com/json-c_releases/releases/json-c-0.11.tar.gz" - - version('0.11', 'aa02367d2f7a830bf1e3376f77881e98') - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - - make() - make("install") diff --git a/var/spack/packages/libmng/package.py b/var/spack/packages/libmng/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libmonitor/package.py b/var/spack/packages/libmonitor/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libpciaccess/package.py b/var/spack/packages/libpciaccess/package.py old mode 100644 new mode 100755 index 6022fc34a3..371fbb6685 --- a/var/spack/packages/libpciaccess/package.py +++ b/var/spack/packages/libpciaccess/package.py @@ -1,21 +1,16 @@ from spack import * class Libpciaccess(Package): - """Generic PCI access library.""" - + """Generic PCI access library""" homepage = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/" - url = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/" - - version('0.13.4', git='http://anongit.freedesktop.org/git/xorg/lib/libpciaccess.git', - tag='libpciaccess-0.13.4') + url = "http://pkgs.fedoraproject.org/repo/pkgs/libpciaccess/libpciaccess-0.13.2.tar.bz2/b7c0d3afce14eedca57312a3141ec13a/libpciaccess-0.13.2.tar.bz2" - depends_on('autoconf') - depends_on('libtool') + version('0.13.2', 'b7c0d3afce14eedca57312a3141ec13a') def install(self, spec, prefix): - from subprocess import call - call(["./autogen.sh"]) - configure("--prefix=%s" % prefix) + import os + os.system("autoconf") + configure('--prefix=%s' % prefix) make() make("install") diff --git a/var/spack/packages/libpng/package.py b/var/spack/packages/libpng/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libsodium/package.py b/var/spack/packages/libsodium/package.py deleted file mode 100644 index 1c8a16d998..0000000000 --- a/var/spack/packages/libsodium/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class Libsodium(Package): - """Sodium is a modern, easy-to-use software library for encryption, - decryption, signatures, password hashing and more.""" - homepage = "https://download.libsodium.org/doc/" - url = "https://download.libsodium.org/libsodium/releases/libsodium-1.0.3.tar.gz" - - version('1.0.3', 'b3bcc98e34d3250f55ae196822307fab') - version('1.0.2', 'dc40eb23e293448c6fc908757738003f') - version('1.0.1', '9a221b49fba7281ceaaf5e278d0f4430') - version('1.0.0', '3093dabe4e038d09f0d150cef064b2f7') - version('0.7.1', 'c224fe3923d1dcfe418c65c8a7246316') - - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/libtiff/package.py b/var/spack/packages/libtiff/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libtool/package.py b/var/spack/packages/libtool/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libunwind/package.py b/var/spack/packages/libunwind/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libuuid/package.py b/var/spack/packages/libuuid/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libxcb/package.py b/var/spack/packages/libxcb/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libxml2/package.py b/var/spack/packages/libxml2/package.py old mode 100644 new mode 100755 index 3a0af6b368..72199d8def --- a/var/spack/packages/libxml2/package.py +++ b/var/spack/packages/libxml2/package.py @@ -9,12 +9,11 @@ class Libxml2(Package): version('2.9.2', '9e6a9aca9d155737868b3dc5fd82f788') - extends('python') depends_on('zlib') depends_on('xz') def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - + configure("--prefix=%s" % prefix, + "--without-python") make() make("install") diff --git a/var/spack/packages/libxshmfence/package.py b/var/spack/packages/libxshmfence/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/libxslt/package.py b/var/spack/packages/libxslt/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/llvm-lld/package.py b/var/spack/packages/llvm-lld/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/llvm/package.py b/var/spack/packages/llvm/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/lmdb/package.py b/var/spack/packages/lmdb/package.py deleted file mode 100644 index 875b8100c5..0000000000 --- a/var/spack/packages/lmdb/package.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -from spack import * - -class Lmdb(Package): - """Read-only mirror of official repo on openldap.org. Issues and - pull requests here are ignored. Use OpenLDAP ITS for issues. - http://www.openldap.org/software/repo.html""" - - - homepage = "http://www.openldap.org/software/repo.html" - url = "https://github.com/LMDB/lmdb/archive/LMDB_0.9.16.tar.gz" - - version('0.9.16', '0de89730b8f3f5711c2b3a4ba517b648') - - def install(self, spec, prefix): - os.chdir('libraries/liblmdb') - - make() - - mkdirp(prefix.bin) - mkdirp(prefix + '/man/man1') - mkdirp(prefix.lib) - mkdirp(prefix.include) - - bins = ['mdb_stat', 'mdb_copy', 'mdb_dump', 'mdb_load'] - for f in bins: - install(f, prefix.bin) - - mans = ['mdb_stat.1', 'mdb_copy.1', 'mdb_dump.1', 'mdb_load.1'] - for f in mans: - install(f, prefix + '/man/man1') - - libs = ['liblmdb.a', 'liblmdb.so'] - for f in libs: - install(f, prefix.lib) - - includes = ['lmdb.h'] - for f in includes: - install(f, prefix.include) diff --git a/var/spack/packages/lua/package.py b/var/spack/packages/lua/package.py deleted file mode 100644 index 57c443cc2d..0000000000 --- a/var/spack/packages/lua/package.py +++ /dev/null @@ -1,26 +0,0 @@ -from spack import * -import os - -class Lua(Package): - """ The Lua programming language interpreter and library """ - homepage = "http://www.lua.org" - url = "http://www.lua.org/ftp/lua-5.1.5.tar.gz" - - version('5.3.1', '797adacada8d85761c079390ff1d9961') - version('5.3.0', 'a1b0a7e92d0c85bbff7a8d27bf29f8af') - version('5.2.4', '913fdb32207046b273fdb17aad70be13') - version('5.2.3', 'dc7f94ec6ff15c985d2d6ad0f1b35654') - version('5.2.2', 'efbb645e897eae37cad4344ce8b0a614') - version('5.2.1', 'ae08f641b45d737d12d30291a5e5f6e3') - version('5.2.0', 'f1ea831f397214bae8a265995ab1a93e') - version('5.1.5', '2e115fe26e435e33b0d5c022e4490567') - version('5.1.4', 'd0870f2de55d59c1c8419f36e8fac150') - version('5.1.3', 'a70a8dfaa150e047866dc01a46272599') - - depends_on('ncurses') - - def install(self, spec, prefix): - make('INSTALL_TOP=%s' % prefix, - 'MYLDFLAGS=-L%s/lib' % spec['ncurses'].prefix, - 'linux', - 'install') diff --git a/var/spack/packages/lwgrp/package.py b/var/spack/packages/lwgrp/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/lwm2/package.py b/var/spack/packages/lwm2/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/memaxes/package.py b/var/spack/packages/memaxes/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/mesa/package.py b/var/spack/packages/mesa/package.py old mode 100644 new mode 100755 index 2a04a8fd51..2dba878a77 --- a/var/spack/packages/mesa/package.py +++ b/var/spack/packages/mesa/package.py @@ -1,7 +1,7 @@ from spack import * class Mesa(Package): - """Mesa is an open-source implementation of the OpenGL + """Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics.""" homepage = "http://www.mesa3d.org" @@ -11,10 +11,9 @@ class Mesa(Package): # version('10.4.4', '8d863a3c209bf5116b2babfccccc68ce') version('8.0.5', 'cda5d101f43b8784fa60bdeaca4056f2') - # mesa 7.x, 8.x, 9.x + # mesa 7.x, 8.x, 9.x depends_on("libdrm@2.4.33") depends_on("llvm@3.0") - depends_on("libxml2") # patch("llvm-fixes.patch") # using newer llvm diff --git a/var/spack/packages/metis/package.py b/var/spack/packages/metis/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/mpc/package.py b/var/spack/packages/mpc/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/mpe2/mpe2.patch b/var/spack/packages/mpe2/mpe2.patch old mode 100644 new mode 100755 diff --git a/var/spack/packages/mpe2/package.py b/var/spack/packages/mpe2/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/mpfr/package.py b/var/spack/packages/mpfr/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/mpibash/mpibash-4.3.patch b/var/spack/packages/mpibash/mpibash-4.3.patch old mode 100644 new mode 100755 diff --git a/var/spack/packages/mpibash/package.py b/var/spack/packages/mpibash/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/mpich/package.py b/var/spack/packages/mpich/package.py old mode 100644 new mode 100755 index b6b2dfde21..6aa8f2eca4 --- a/var/spack/packages/mpich/package.py +++ b/var/spack/packages/mpich/package.py @@ -38,6 +38,7 @@ class Mpich(Package): provides('mpi@:3', when='@3:') provides('mpi@:1', when='@1:') + def setup_dependent_environment(self, module, spec, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" os.environ['MPICH_CC'] = 'cc' diff --git a/var/spack/packages/mpileaks/package.py b/var/spack/packages/mpileaks/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/mrnet/package.py b/var/spack/packages/mrnet/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/munge/package.py b/var/spack/packages/munge/package.py deleted file mode 100644 index c737ca0354..0000000000 --- a/var/spack/packages/munge/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * -import os - -class Munge(Package): - """ MUNGE Uid 'N' Gid Emporium """ - homepage = "https://code.google.com/p/munge/" - url = "https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2" - - version('0.5.11', 'bd8fca8d5f4c1fcbef1816482d49ee01', url='https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2') - - depends_on('openssl') - depends_on('libgcrypt') - - def install(self, spec, prefix): - os.makedirs(os.path.join(prefix, "lib/systemd/system")) - configure("--prefix=%s" % prefix) - - make() - make("install") - diff --git a/var/spack/packages/muster/package.py b/var/spack/packages/muster/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch b/var/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch old mode 100644 new mode 100755 diff --git a/var/spack/packages/mvapich2/package.py b/var/spack/packages/mvapich2/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/nasm/package.py b/var/spack/packages/nasm/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/ncurses/package.py b/var/spack/packages/ncurses/package.py old mode 100644 new mode 100755 index 8f5763bfdd..a22e83503f --- a/var/spack/packages/ncurses/package.py +++ b/var/spack/packages/ncurses/package.py @@ -21,11 +21,3 @@ class Ncurses(Package): make() make("install") - configure("--prefix=%s" % prefix, - "--with-shared", - "--disable-widec", - "--disable-pc-files", - "--without-ada") - make() - make("install") - diff --git a/var/spack/packages/netcdf/package.py b/var/spack/packages/netcdf/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/netgauge/package.py b/var/spack/packages/netgauge/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/netlib-blas/package.py b/var/spack/packages/netlib-blas/package.py old mode 100644 new mode 100755 index 85e97323d3..0a6cdb0442 --- a/var/spack/packages/netlib-blas/package.py +++ b/var/spack/packages/netlib-blas/package.py @@ -9,8 +9,6 @@ class NetlibBlas(Package): version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') - variant('fpic', default=False, description="Build with -fpic compiler option") - # virtual dependency provides('blas') @@ -25,10 +23,6 @@ class NetlibBlas(Package): mf.filter('^LOADER.*', 'LOADER = f90') mf.filter('^CC =.*', 'CC = cc') - if '+fpic' in self.spec: - mf.filter('^OPTS.*=.*', 'OPTS = -O2 -frecursive -fpic') - mf.filter('^CFLAGS =.*', 'CFLAGS = -O3 -fpic') - def install(self, spec, prefix): make('blaslib') diff --git a/var/spack/packages/netlib-lapack/package.py b/var/spack/packages/netlib-lapack/package.py deleted file mode 100644 index fb6b99e27c..0000000000 --- a/var/spack/packages/netlib-lapack/package.py +++ /dev/null @@ -1,59 +0,0 @@ -from spack import * - -class NetlibLapack(Package): - """ - LAPACK version 3.X is a comprehensive FORTRAN library that does - linear algebra operations including matrix inversions, least - squared solutions to linear sets of equations, eigenvector - analysis, singular value decomposition, etc. It is a very - comprehensive and reputable package that has found extensive - use in the scientific community. - """ - homepage = "http://www.netlib.org/lapack/" - url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" - - version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') - version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478') - version('3.4.1', '44c3869c38c8335c2b9c2a8bb276eb55') - version('3.4.0', '02d5706ec03ba885fc246e5fa10d8c70') - version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4') - - variant('shared', default=False, description="Build shared library version") - - # virtual dependency - provides('lapack') - - # blas is a virtual dependency. - depends_on('blas') - - depends_on('cmake') - - # Doesn't always build correctly in parallel - parallel = False - - @when('^netlib-blas') - def get_blas_libs(self): - blas = self.spec['netlib-blas'] - return [join_path(blas.prefix.lib, 'blas.a')] - - - @when('^atlas') - def get_blas_libs(self): - blas = self.spec['atlas'] - return [join_path(blas.prefix.lib, l) - for l in ('libf77blas.a', 'libatlas.a')] - - - def install(self, spec, prefix): - blas_libs = ";".join(self.get_blas_libs()) - cmake_args = [".", '-DBLAS_LIBRARIES=' + blas_libs] - - if '+shared' in spec: - cmake_args.append('-DBUILD_SHARED_LIBS=ON') - - cmake_args += std_cmake_args - - cmake(*cmake_args) - make() - make("install") - diff --git a/var/spack/packages/nettle/package.py b/var/spack/packages/nettle/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/ompss/package.py b/var/spack/packages/ompss/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/opari2/package.py b/var/spack/packages/opari2/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch b/var/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch old mode 100644 new mode 100755 diff --git a/var/spack/packages/openmpi/llnl-platforms.patch b/var/spack/packages/openmpi/llnl-platforms.patch old mode 100644 new mode 100755 diff --git a/var/spack/packages/openmpi/package.py b/var/spack/packages/openmpi/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/openssl/package.py b/var/spack/packages/openssl/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/otf/package.py b/var/spack/packages/otf/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/otf2/package.py b/var/spack/packages/otf2/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/pango/package.py b/var/spack/packages/pango/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/papi/package.py b/var/spack/packages/papi/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/paraver/package.py b/var/spack/packages/paraver/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/parmetis/package.py b/var/spack/packages/parmetis/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/parpack/package.py b/var/spack/packages/parpack/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/pcre/package.py b/var/spack/packages/pcre/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/petsc/package.py b/var/spack/packages/petsc/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/pidx/package.py b/var/spack/packages/pidx/package.py deleted file mode 100644 index 81aed62fb1..0000000000 --- a/var/spack/packages/pidx/package.py +++ /dev/null @@ -1,21 +0,0 @@ -from spack import * - -class Pidx(Package): - """PIDX Parallel I/O Library. - - PIDX is an efficient parallel I/O library that reads and writes - multiresolution IDX data files. - """ - - homepage = "http://www.cedmav.com/pidx" - - version('1.0', git='https://github.com/sci-visus/PIDX.git', - commit='6afa1cf71d1c41263296dc049c8fabaf73c296da') - - depends_on("mpi") - - def install(self, spec, prefix): - with working_dir('spack-build', create=True): - cmake('..', *std_cmake_args) - make() - make("install") diff --git a/var/spack/packages/pixman/package.py b/var/spack/packages/pixman/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/pkg-config/package.py b/var/spack/packages/pkg-config/package.py deleted file mode 100644 index 9964c6ce34..0000000000 --- a/var/spack/packages/pkg-config/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class PkgConfig(Package): - """pkg-config is a helper tool used when compiling applications and libraries""" - homepage = "http://www.freedesktop.org/wiki/Software/pkg-config/" - url = "http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" - - version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d') - - parallel = False - - def install(self, spec, prefix): - configure("--prefix=%s" %prefix, "--enable-shared") - - make() - make("install") - diff --git a/var/spack/packages/pmgr_collective/package.py b/var/spack/packages/pmgr_collective/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/postgresql/package.py b/var/spack/packages/postgresql/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/ppl/package.py b/var/spack/packages/ppl/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/protobuf/package.py b/var/spack/packages/protobuf/package.py deleted file mode 100644 index 34085c7ce9..0000000000 --- a/var/spack/packages/protobuf/package.py +++ /dev/null @@ -1,16 +0,0 @@ -import os -from spack import * - -class Protobuf(Package): - """Google's data interchange format.""" - - homepage = "https://developers.google.com/protocol-buffers" - url = "https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2" - - version('2.5.0', 'a72001a9067a4c2c4e0e836d0f92ece4') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("check") - make("install") diff --git a/var/spack/packages/py-Cython/package.py b/var/spack/packages/py-Cython/package.py new file mode 100644 index 0000000000..c250139114 --- /dev/null +++ b/var/spack/packages/py-Cython/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyCython(Package): + """The Cython compiler for writing C extensions for the Python language.""" + homepage = "http://www.cython.org" + version("0.21.2", "d21adb870c75680dc857cd05d41046a4", + url="https://pypi.python.org/packages/source/C/Cython/Cython-0.21.2.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-Distutils2/package.py b/var/spack/packages/py-Distutils2/package.py new file mode 100644 index 0000000000..8690f569fe --- /dev/null +++ b/var/spack/packages/py-Distutils2/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyDistutils2(Package): + """Python Packaging Library.""" + + homepage = "https://hg.python.org/distutils2" + url = "https://pypi.python.org/packages/source/D/Distutils2/Distutils2-1.0a4.tar.gz" + + version('1.0a4', '52bc9dffb394970c27e02853ae3a3241') + + depends_on("python") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) + diff --git a/var/spack/packages/py-astroML/package.py b/var/spack/packages/py-astroML/package.py new file mode 100644 index 0000000000..1583e249d2 --- /dev/null +++ b/var/spack/packages/py-astroML/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyAstroml(Package): + """tools for machine learning and data mining in Astronomy""" + homepage = "http://astroML.github.com" + version("0.2", "85f558368546660564f20b30efafb024", + url="https://pypi.python.org/packages/source/a/astroML/astroML-0.2.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-astropy/package.py b/var/spack/packages/py-astropy/package.py new file mode 100644 index 0000000000..5d2d0619cc --- /dev/null +++ b/var/spack/packages/py-astropy/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyAstropy(Package): + """Community-developed python astronomy tools""" + homepage = "http://astropy.org" + version("0.4.2", "6dc4f643cde37ba0a8b4967dc8becee8", + url="https://pypi.python.org/packages/source/a/astropy/astropy-0.4.2.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-autopep8/package.py b/var/spack/packages/py-autopep8/package.py new file mode 100644 index 0000000000..39a2288ea0 --- /dev/null +++ b/var/spack/packages/py-autopep8/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyAutopep8(Package): + """A tool that automatically formats Python code to conform to the PEP 8 style guide""" + homepage = "https://github.com/hhatto/autopep8" + version("1.1", "7998358d8f0efd77dcb2cc8e34e3cb5c", + url="https://pypi.python.org/packages/source/a/autopep8/autopep8-1.1.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-basemap/package.py b/var/spack/packages/py-basemap/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-biopython/package.py b/var/spack/packages/py-biopython/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-certifi/package.py b/var/spack/packages/py-certifi/package.py new file mode 100644 index 0000000000..442903e6a0 --- /dev/null +++ b/var/spack/packages/py-certifi/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyCertifi(Package): + """Python package for providing Mozilla's CA Bundle.""" + homepage = "http://python-requests.org" + version("14.05.14", "315ea4e50673a16ab047099f816fd32a", + url="https://pypi.python.org/packages/source/c/certifi/certifi-14.05.14.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-cffi/package.py b/var/spack/packages/py-cffi/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-cython/package.py b/var/spack/packages/py-cython/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-dateutil/package.py b/var/spack/packages/py-dateutil/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-decorator/package.py b/var/spack/packages/py-decorator/package.py new file mode 100644 index 0000000000..00c1c541d4 --- /dev/null +++ b/var/spack/packages/py-decorator/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyDecorator(Package): + """Better living through Python with decorators""" + homepage = "https://github.com/micheles/decorator" + version("4.0.4", "dd3a0669e1e6f09699eefa2c7fbd9756", + url="https://pypi.python.org/packages/source/d/decorator/decorator-4.0.4.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-emcee/package.py b/var/spack/packages/py-emcee/package.py new file mode 100644 index 0000000000..544066b92d --- /dev/null +++ b/var/spack/packages/py-emcee/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyEmcee(Package): + """Kick ass affine-invariant ensemble MCMC sampling""" + homepage = "http://dan.iel.fm/emcee/" + version("2.1.0", "c6b6fad05c824d40671d4a4fc58dfff7", + url="https://pypi.python.org/packages/source/e/emcee/emcee-2.1.0.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-epydoc/package.py b/var/spack/packages/py-epydoc/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-fitsio/package.py b/var/spack/packages/py-fitsio/package.py new file mode 100644 index 0000000000..046bc386d5 --- /dev/null +++ b/var/spack/packages/py-fitsio/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyFitsio(Package): + """A full featured python library to read from and write to FITS files.""" + homepage = "https://github.com/esheldon/fitsio" + version("0.9.7", "75fa05f999ae8f55c8290bd78ada49e7", + url="https://pypi.python.org/packages/source/f/fitsio/fitsio-0.9.7.tar.gz") + + extends("python") + depends_on("py-numpy") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-genders/package.py b/var/spack/packages/py-genders/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-gnuplot/package.py b/var/spack/packages/py-gnuplot/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-gnureadline/package.py b/var/spack/packages/py-gnureadline/package.py new file mode 100644 index 0000000000..51d1c6227e --- /dev/null +++ b/var/spack/packages/py-gnureadline/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyGnureadline(Package): + """The standard Python readline extension statically linked against the GNU readline library.""" + homepage = "http://github.com/ludwigschwardt/python-gnureadline" + version("6.3.3", "c4af83c9a3fbeac8f2da9b5a7c60e51c", + url="https://pypi.python.org/packages/source/g/gnureadline/gnureadline-6.3.3.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-h5py/package.py b/var/spack/packages/py-h5py/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-ipython/package.py b/var/spack/packages/py-ipython/package.py old mode 100644 new mode 100755 index 8d0e64a07f..3b94b71f29 --- a/var/spack/packages/py-ipython/package.py +++ b/var/spack/packages/py-ipython/package.py @@ -3,14 +3,29 @@ from spack import * class PyIpython(Package): """IPython provides a rich toolkit to help you make the most out of using Python interactively.""" homepage = "https://pypi.python.org/pypi/ipython" - url = "https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz" - version('2.3.1', '2b7085525dac11190bfb45bb8ec8dcbf') + version('3.0.0','b3f00f3c0be036fafef3b0b9d663f27e', + url='https://pypi.python.org/packages/source/i/ipython/ipython-3.0.0.tar.gz') + version('4.0.0','c2fecbcf1c0fbdc82625c77a50733dd6', + url='https://pypi.python.org/packages/source/i/ipython/ipython-4.0.0.tar.gz') + version('2.3.1', '2b7085525dac11190bfb45bb8ec8dcbf', + url="https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz") version('3.1.0', 'a749d90c16068687b0ec45a27e72ef8f') + version('3.2.1', 'f4c93d67ac4b2d4fc69df693b6f3c9e0', + url='https://github.com/ipython/ipython/archive/rel-3.2.1.tar.gz') extends('python') depends_on('py-pygments') - depends_on('py-setuptools') + depends_on('py-setuptools@18.1') + depends_on('py-traitlets') + depends_on('py-pyzmq') + depends_on('py-pexpect') + depends_on('py-tornado') + depends_on('py-jinja2') def install(self, spec, prefix): + import os + # os.system("spack activate py-setuptools@18.1") + # os.system("easy_install pip") + # os.system("pip install ipython[notebook]") python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-ipython/package.py.backup b/var/spack/packages/py-ipython/package.py.backup new file mode 100755 index 0000000000..1ed8b57e60 --- /dev/null +++ b/var/spack/packages/py-ipython/package.py.backup @@ -0,0 +1,27 @@ +from spack import * + +class PyIpython(Package): + """IPython provides a rich toolkit to help you make the most out of using Python interactively.""" + homepage = "https://pypi.python.org/pypi/ipython" + + version('2.3.1', '2b7085525dac11190bfb45bb8ec8dcbf', + url="https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz") + version('3.1.0', 'a749d90c16068687b0ec45a27e72ef8f') + version('3.2.1', 'f4c93d67ac4b2d4fc69df693b6f3c9e0', + url='https://github.com/ipython/ipython/archive/rel-3.2.1.tar.gz') + + extends('python') + depends_on('py-pygments') + depends_on('py-setuptools@18.1') + depends_on('py-traitlets') + depends_on('py-pyzmq') + depends_on('py-pexpect') + depends_on('py-tornado') + depends_on('py-Jinja2') + + def install(self, spec, prefix): + import os + # os.system("spack activate py-setuptools@18.1") + # os.system("easy_install pip") + # os.system("pip install ipython[notebook]") + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-ipython_genutils/package.py b/var/spack/packages/py-ipython_genutils/package.py new file mode 100644 index 0000000000..39b15eec73 --- /dev/null +++ b/var/spack/packages/py-ipython_genutils/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyIpythonGenutils(Package): + """Vestigial utilities from IPython""" + homepage = "http://ipython.org" + version("0.1.0", "9a8afbe0978adbcbfcb3b35b2d015a56", + url="https://pypi.python.org/packages/source/i/ipython_genutils/ipython_genutils-0.1.0.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-joblib/package.py b/var/spack/packages/py-joblib/package.py new file mode 100644 index 0000000000..10672314de --- /dev/null +++ b/var/spack/packages/py-joblib/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyJoblib(Package): + """Lightweight pipelining: using Python functions as pipeline jobs.""" + homepage = "http://packages.python.org/joblib/" + version("0.8.4", "90a1c25cc4dc4a8e3536093dbc35cff3", + url="https://pypi.python.org/packages/source/j/joblib/joblib-0.8.4.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-jsonschema/package.py b/var/spack/packages/py-jsonschema/package.py new file mode 100755 index 0000000000..9a7fc21862 --- /dev/null +++ b/var/spack/packages/py-jsonschema/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyJsonschema(Package): + """implementation of JSON Schema validation for Python""" + homepage = "https://github.com/Julian/jsonschema" + url = "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-2.5.1.tar.gz" + + version('2.4.0','661f85c3d23094afbb9ac3c0673840bf', + url='https://pypi.python.org/packages/source/j/jsonschema/jsonschema-2.4.0.tar.gz') + version('2.5.1', '374e848fdb69a3ce8b7e778b47c30640') + + extends("python") + depends_on("py-setuptools@18.1") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-libxml2/package.py b/var/spack/packages/py-libxml2/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-lockfile/package.py b/var/spack/packages/py-lockfile/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-mako/package.py b/var/spack/packages/py-mako/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-matplotlib/package.py b/var/spack/packages/py-matplotlib/package.py old mode 100644 new mode 100755 index e7ce3dfd24..b9244daf56 --- a/var/spack/packages/py-matplotlib/package.py +++ b/var/spack/packages/py-matplotlib/package.py @@ -12,7 +12,6 @@ class PyMatplotlib(Package): extends('python', ignore=r'bin/nosetests.*$') depends_on('py-pyside') - depends_on('py-ipython') depends_on('py-pyparsing') depends_on('py-six') depends_on('py-dateutil') diff --git a/var/spack/packages/py-mock/package.py b/var/spack/packages/py-mock/package.py index 3b08428ba0..c43842c187 100644 --- a/var/spack/packages/py-mock/package.py +++ b/var/spack/packages/py-mock/package.py @@ -1,17 +1,12 @@ from spack import * class PyMock(Package): - """mock is a library for testing in Python. It allows you to replace parts - of your system under test with mock objects and make assertions about how - they have been used.""" + """A Python Mocking and Patching Library for Testing""" + homepage = "http://www.voidspace.org.uk/python/mock/" + version("1.0.1", "c3971991738caa55ec7c356bbc154ee2", + url="https://pypi.python.org/packages/source/m/mock/mock-1.0.1.tar.gz") - homepage = "https://github.com/testing-cabal/mock" - url = "https://pypi.python.org/packages/source/m/mock/mock-1.3.0.tar.gz" - - version('1.3.0', '73ee8a4afb3ff4da1b4afa287f39fdeb') - - extends('python') - depends_on('py-setuptools@17.1:') + extends("python") def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-mpi4py/package.py b/var/spack/packages/py-mpi4py/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-mx/package.py b/var/spack/packages/py-mx/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-nose/package.py b/var/spack/packages/py-nose/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-numexpr/package.py b/var/spack/packages/py-numexpr/package.py new file mode 100644 index 0000000000..283ea18772 --- /dev/null +++ b/var/spack/packages/py-numexpr/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyNumexpr(Package): + """Fast numerical expression evaluator for NumPy""" + homepage = "https://github.com/pydata/numexpr" + version("2.4", "df7e8d9e9dbb145b56d43c465c2bf854", + url="https://pypi.python.org/packages/source/n/numexpr/numexpr-2.4.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-numpy/package.py b/var/spack/packages/py-numpy/package.py old mode 100644 new mode 100755 index efa109a3e9..6534e063d2 --- a/var/spack/packages/py-numpy/package.py +++ b/var/spack/packages/py-numpy/package.py @@ -7,22 +7,9 @@ class PyNumpy(Package): version('1.9.1', '78842b73560ec378142665e712ae4ad9') version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') - + extends('python') depends_on('py-nose') - depends_on('netlib-blas+fpic') - depends_on('netlib-lapack+shared') - - def patch(self): - filter_file( - "possible_executables = \['(gfortran|g77|ifort|efl)", - "possible_executables = ['fc", - "numpy/distutils/fcompiler/gnu.py", - "numpy/distutils/fcompiler/intel.py") def install(self, spec, prefix): - with open('site.cfg', 'w') as f: - f.write('[DEFAULT]\n') - f.write('libraries=lapack,blas\n') - f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix)) python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pandas/package.py b/var/spack/packages/py-pandas/package.py old mode 100644 new mode 100755 index 5b9997faa9..07ee12782f --- a/var/spack/packages/py-pandas/package.py +++ b/var/spack/packages/py-pandas/package.py @@ -6,6 +6,8 @@ class PyPandas(Package): homepage = "http://pandas.pydata.org/" url = "https://pypi.python.org/packages/source/p/pandas/pandas-0.16.0.tar.gz#md5=bfe311f05dc0c351f8955fbd1e296e73" + version('0.15.1','f6fd8d49fc801f6f3fa48f9117a6290b', + url='https://pypi.python.org/packages/source/p/pandas/pandas-0.15.1.tar.gz') version('0.16.0', 'bfe311f05dc0c351f8955fbd1e296e73') version('0.16.1', 'fac4f25748f9610a3e00e765474bdea8') diff --git a/var/spack/packages/py-pep8/package.py b/var/spack/packages/py-pep8/package.py new file mode 100644 index 0000000000..0bcf416922 --- /dev/null +++ b/var/spack/packages/py-pep8/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyPep8(Package): + """Python style guide checker""" + homepage = "http://pep8.readthedocs.org/" + version("1.6.1", "76cf60b245f8549cb458ffcd85710738", + url="https://pypi.python.org/packages/source/p/pep8/pep8-1.6.1.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-pexpect/package.py b/var/spack/packages/py-pexpect/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-pickleshare/package.py b/var/spack/packages/py-pickleshare/package.py new file mode 100644 index 0000000000..cf9ddb7db8 --- /dev/null +++ b/var/spack/packages/py-pickleshare/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyPickleshare(Package): + """Tiny 'shelve'-like database with concurrency support""" + homepage = "https://github.com/vivainio/pickleshare" + version("0.5", "25337740507cb855ad58bfcf60f7710e", + url="https://pypi.python.org/packages/source/p/pickleshare/pickleshare-0.5.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-pil/package.py b/var/spack/packages/py-pil/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-pip/package.py b/var/spack/packages/py-pip/package.py new file mode 100644 index 0000000000..89b8570fe4 --- /dev/null +++ b/var/spack/packages/py-pip/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyPip(Package): + """The PyPA recommended tool for installing Python packages.""" + homepage = "https://pip.pypa.io/" + version("7.1.2", "3823d2343d9f3aaab21cf9c917710196", + url="https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-pmw/package.py b/var/spack/packages/py-pmw/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-py/package.py b/var/spack/packages/py-py/package.py new file mode 100644 index 0000000000..0ef0403124 --- /dev/null +++ b/var/spack/packages/py-py/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyPy(Package): + """library with cross-python path, ini-parsing, io, code, log facilities""" + homepage = "http://pylib.readthedocs.org/" + version("1.4.26", "30c3fd92a53f1a5ed6f3591c1fe75c0e", + url="https://pypi.python.org/packages/source/p/py/py-1.4.26.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-py4j/package.py b/var/spack/packages/py-py4j/package.py new file mode 100755 index 0000000000..4c31f57298 --- /dev/null +++ b/var/spack/packages/py-py4j/package.py @@ -0,0 +1,15 @@ +from spack import * + + +class PyPy4j(Package): + """Enables Python programs to dynamically access arbitrary Java objects""" + homepage = "https://www.py4j.org/" + url = "https://pypi.python.org/packages/source/p/py4j/py4j-0.9.tar.gz" + + version('0.9', 'b6fed5faef81a5368e3d50a91a5c9a60') + + extends("python") + depends_on("py-setuptools@18.1") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pychecker/package.py b/var/spack/packages/py-pychecker/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-pycparser/package.py b/var/spack/packages/py-pycparser/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-pyelftools/package.py b/var/spack/packages/py-pyelftools/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-pygments/package.py b/var/spack/packages/py-pygments/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-pylint/package.py b/var/spack/packages/py-pylint/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-pypar/package.py b/var/spack/packages/py-pypar/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-pyparsing/package.py b/var/spack/packages/py-pyparsing/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-pyqt/package.py b/var/spack/packages/py-pyqt/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-pyside/package.py b/var/spack/packages/py-pyside/package.py old mode 100644 new mode 100755 index bb5da44d02..8d093efd2c --- a/var/spack/packages/py-pyside/package.py +++ b/var/spack/packages/py-pyside/package.py @@ -8,12 +8,9 @@ class PyPyside(Package): version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d') - # TODO: make build dependency - # depends_on("cmake") - extends('python') depends_on('py-setuptools') - depends_on('qt@:4') + depends_on('qt@5.4.0') def patch(self): """Undo PySide RPATH handling and add Spack RPATH.""" diff --git a/var/spack/packages/py-pytest/package.py b/var/spack/packages/py-pytest/package.py new file mode 100644 index 0000000000..3611b68862 --- /dev/null +++ b/var/spack/packages/py-pytest/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyPytest(Package): + """pytest: simple powerful testing with Python""" + homepage = "http://pytest.org" + version("2.6.4", "14341e122f7e9031a0948eb6b01a2640", + url="https://pypi.python.org/packages/source/p/pytest/pytest-2.6.4.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-python-daemon/package.py b/var/spack/packages/py-python-daemon/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-python-dateutil/package.py b/var/spack/packages/py-python-dateutil/package.py new file mode 100644 index 0000000000..8efa114db1 --- /dev/null +++ b/var/spack/packages/py-python-dateutil/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyPythonDateutil(Package): + """Extensions to the standard Python datetime module""" + homepage = "http://labix.org/python-dateutil" + version("2.2", "c1f654d0ff7e33999380a8ba9783fd5c", + url="https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.2.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-pytz/package.py b/var/spack/packages/py-pytz/package.py old mode 100644 new mode 100755 index da6311a784..f67bb42854 --- a/var/spack/packages/py-pytz/package.py +++ b/var/spack/packages/py-pytz/package.py @@ -5,6 +5,8 @@ class PyPytz(Package): homepage = "https://pypi.python.org/pypi/pytz" url = "https://pypi.python.org/packages/source/p/pytz/pytz-2014.10.tar.gz" + version('2014.9','d42bda2f4c1e873e02fbd1e4acfd1b8c', + url='https://pypi.python.org/packages/source/p/pytz/pytz-2014.9.tar.gz') version('2014.10', 'eb1cb941a20c5b751352c52486aa1dd7') version('2015.4', '417a47b1c432d90333e42084a605d3d8') diff --git a/var/spack/packages/py-pyzmq/package.py b/var/spack/packages/py-pyzmq/package.py new file mode 100755 index 0000000000..f5551182b3 --- /dev/null +++ b/var/spack/packages/py-pyzmq/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyPyzmq(Package): + """official Python binding for the ZeroMQ Messaging Library""" + homepage = "https://github.com/zeromq/pyzmq" + url = "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-14.7.0.tar.gz" + + version('14.4.1','a6a7fb6950b1bf5333c6795f3edf196c', + url='https://pypi.python.org/packages/source/p/pyzmq/pyzmq-14.4.1.tar.gz') + version('14.7.0', '87e3abb33af5794db5ae85c667bbf324') + + extends('python') + depends_on('py-setuptools@18.1') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-rpy2/package.py b/var/spack/packages/py-rpy2/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-scientificpython/package.py b/var/spack/packages/py-scientificpython/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-scikit-learn/package.py b/var/spack/packages/py-scikit-learn/package.py old mode 100644 new mode 100755 index 5b078ce901..744b37e7e0 --- a/var/spack/packages/py-scikit-learn/package.py +++ b/var/spack/packages/py-scikit-learn/package.py @@ -9,6 +9,9 @@ class PyScikitLearn(Package): version('0.16.1', '363ddda501e3b6b61726aa40b8dbdb7e') extends('python') + depends_on('python@2.7.10') + depends_on('py-numpy@1.9.2') + depends_on('py-scipy@0.15.1') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-scipy/package.py b/var/spack/packages/py-scipy/package.py old mode 100644 new mode 100755 index 3a1124cc15..bcbdb2100f --- a/var/spack/packages/py-scipy/package.py +++ b/var/spack/packages/py-scipy/package.py @@ -5,14 +5,14 @@ class PyScipy(Package): homepage = "https://pypi.python.org/pypi/scipy" url = "https://pypi.python.org/packages/source/s/scipy/scipy-0.15.0.tar.gz" + version('0.14.0','d7c7f4ccf8b07b08d6fe49d5cd51f85d', + url='https://pypi.python.org/packages/source/s/scipy/scipy-0.14.0.tar.gz') version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a') version('0.15.1', 'be56cd8e60591d6332aac792a5880110') extends('python') depends_on('py-nose') depends_on('py-numpy') - depends_on('blas') - depends_on('lapack') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-seaborn/package.py b/var/spack/packages/py-seaborn/package.py new file mode 100644 index 0000000000..1e228b0622 --- /dev/null +++ b/var/spack/packages/py-seaborn/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PySeaborn(Package): + """Seaborn: statistical data visualization""" + homepage = "http://stanford.edu/~mwaskom/software/seaborn/" + version("0.5.1", "2ce6ea7d3c67858c0b1f5793fa2043b8", + url="https://pypi.python.org/packages/source/s/seaborn/seaborn-0.5.1.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-setuptools/package.py b/var/spack/packages/py-setuptools/package.py old mode 100644 new mode 100755 index 760ad4d6db..053fe1ba80 --- a/var/spack/packages/py-setuptools/package.py +++ b/var/spack/packages/py-setuptools/package.py @@ -3,11 +3,12 @@ from spack import * class PySetuptools(Package): """Easily download, build, install, upgrade, and uninstall Python packages.""" homepage = "https://pypi.python.org/pypi/setuptools" - url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz" - version('11.3.1', '01f69212e019a2420c1693fb43593930') - version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') - version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') + version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06', + url='https://pypi.python.org/packages/source/s/setuptools/setuptools-18.1.tar.gz') + version('11.3.1', '01f69212e019a2420c1693fb43593930', + url="https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz") + version('16.0', '0ace0b96233516fc5f7c857d086aa3ad',) extends('python') diff --git a/var/spack/packages/py-shiboken/package.py b/var/spack/packages/py-shiboken/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-sip/package.py b/var/spack/packages/py-sip/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-six/package.py b/var/spack/packages/py-six/package.py old mode 100644 new mode 100755 index 05c5bd00a9..e9946a1e56 --- a/var/spack/packages/py-six/package.py +++ b/var/spack/packages/py-six/package.py @@ -5,6 +5,8 @@ class PySix(Package): homepage = "https://pypi.python.org/pypi/six" url = "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz" + version('1.8.0','1626eb24cc889110c38f7e786ec69885', + url='https://pypi.python.org/packages/source/s/six/six-1.8.0.tar.gz') version('1.9.0', '476881ef4012262dfc8adc645ee786c4') extends('python') diff --git a/var/spack/packages/py-statsmodels/package.py b/var/spack/packages/py-statsmodels/package.py new file mode 100644 index 0000000000..393c772738 --- /dev/null +++ b/var/spack/packages/py-statsmodels/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyStatsmodels(Package): + """Statistical computations and models for use with SciPy""" + homepage = "http://statsmodels.sourceforge.net/" + version("0.6.1", "f7580ebf7d2a2c9b87abfad190dcb9a3", + url="https://pypi.python.org/packages/source/s/statsmodels/statsmodels-0.6.1.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-sympy/package.py b/var/spack/packages/py-sympy/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-tables/package.py b/var/spack/packages/py-tables/package.py new file mode 100644 index 0000000000..637ccf34cd --- /dev/null +++ b/var/spack/packages/py-tables/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyTables(Package): + """Hierarchical datasets for Python""" + homepage = "http://www.pytables.org/" + version("3.1.1", "38d917f0c6dfb0bc28ce9ea0c3492524", + url="https://pypi.python.org/packages/source/t/tables/tables-3.1.1.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-tornado/package.py b/var/spack/packages/py-tornado/package.py new file mode 100755 index 0000000000..4fc2d42c7b --- /dev/null +++ b/var/spack/packages/py-tornado/package.py @@ -0,0 +1,17 @@ +from spack import * + +class PyTornado(Package): + """Python web framework and asynchronous networking library""" + homepage = "http://www.tornadoweb.org/" + url = "https://pypi.python.org/packages/source/t/tornado/tornado-4.2.1.tar.gz" + + version('4.0.2','985c0e704b765c33a6193d49d1935588', + url='https://pypi.python.org/packages/source/t/tornado/tornado-4.0.2.tar.gz') + version('4.2.1', 'd523204389cfb70121bb69709f551b20') + + extends('python') + depends_on('py-certifi') + depends_on('py-setuptools@18.1') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-traitlets/package.py b/var/spack/packages/py-traitlets/package.py new file mode 100755 index 0000000000..7b7f5c64cc --- /dev/null +++ b/var/spack/packages/py-traitlets/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyTraitlets(Package): + """A lightweight Traits like module""" + homepage = "http://traitlets.readthedocs.org/" + url = "https://github.com/ipython/traitlets/archive/4.0.0.tar.gz" + + version('4.0.0', 'b5b95ea5941fd9619b4704dfd8201568') + + extends('python') + depends_on("py-setuptools@18.1") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-triangle-plot/package.py b/var/spack/packages/py-triangle-plot/package.py new file mode 100644 index 0000000000..29c5f92857 --- /dev/null +++ b/var/spack/packages/py-triangle-plot/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyTrianglePlot(Package): + """Make some beautiful corner plots of samples.""" + homepage = "https://github.com/dfm/triangle.py" + version("0.0.6", "970a35a9bde6002d673e3188fe39f0ed", + url="https://pypi.python.org/packages/source/t/triangle_plot/triangle_plot-0.0.6.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-virtualenv/package.py b/var/spack/packages/py-virtualenv/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/py-yapf/package.py b/var/spack/packages/py-yapf/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/qhull/package.py b/var/spack/packages/qhull/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/qt/package.py b/var/spack/packages/qt/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/qthreads/package.py b/var/spack/packages/qthreads/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/ravel/package.py b/var/spack/packages/ravel/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/readline/package.py b/var/spack/packages/readline/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/rose/add_spack_compiler_recognition.patch b/var/spack/packages/rose/add_spack_compiler_recognition.patch old mode 100644 new mode 100755 diff --git a/var/spack/packages/rose/package.py b/var/spack/packages/rose/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/ruby/package.py b/var/spack/packages/ruby/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/samtools/package.py b/var/spack/packages/samtools/package.py deleted file mode 100644 index 72900398d8..0000000000 --- a/var/spack/packages/samtools/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import * - -class Samtools(Package): - """SAM Tools provide various utilities for manipulating alignments in the SAM format, - including sorting, merging, indexing and generating - alignments in a per-position format""" - - homepage = "www.htslib.org" - version('1.2','988ec4c3058a6ceda36503eebecd4122',url = "https://github.com/samtools/samtools/releases/download/1.2/samtools-1.2.tar.bz2") - - depends_on("zlib") - depends_on("mpc") - parallel=False - patch("samtools1.2.patch",level=0) - - def install(self, spec, prefix): - make("prefix=%s" % prefix, "install") - diff --git a/var/spack/packages/samtools/samtools1.2.patch b/var/spack/packages/samtools/samtools1.2.patch deleted file mode 100644 index ead3ab4e2c..0000000000 --- a/var/spack/packages/samtools/samtools1.2.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Makefile 2015-02-03 08:27:34.000000000 -0800 -+++ Makefile.new 2015-07-21 10:38:27.881406892 -0700 -@@ -26,7 +26,7 @@ - CFLAGS = -g -Wall -O2 - LDFLAGS = - LDLIBS = --DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 -+DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=0 - LOBJS= bam_aux.o bam.o bam_import.o sam.o \ - sam_header.o bam_plbuf.o - AOBJS= bam_index.o bam_plcmd.o sam_view.o \ -@@ -37,7 +37,7 @@ - faidx.o stats.o stats_isize.o bam_flags.o bam_split.o \ - bam_tview.o bam_tview_curses.o bam_tview_html.o bam_lpileup.o - INCLUDES= -I. -I$(HTSDIR) --LIBCURSES= -lcurses # -lXCurses -+#LIBCURSES= -lcurses # -lXCurses - - prefix = /usr/local - exec_prefix = $(prefix) diff --git a/var/spack/packages/scalasca/package.py b/var/spack/packages/scalasca/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/scorep/package.py b/var/spack/packages/scorep/package.py old mode 100644 new mode 100755 index f013bd1cbb..32a772e3db --- a/var/spack/packages/scorep/package.py +++ b/var/spack/packages/scorep/package.py @@ -1,10 +1,11 @@ # FIXME: Add copyright statement from spack import * +from contextlib import closing class Scorep(Package): - """The Score-P measurement infrastructure is a highly scalable and - easy-to-use tool suite for profiling, event tracing, and online + """The Score-P measurement infrastructure is a highly scalable and + easy-to-use tool suite for profiling, event tracing, and online analysis of HPC applications.""" # FIXME: add a proper url for your package's homepage here. @@ -19,7 +20,7 @@ class Scorep(Package): depends_on("mpi") depends_on("papi") # depends_on("otf2@1.2:1.2.1") # only Score-P 1.2.x - depends_on("otf2") + depends_on("otf2") depends_on("opari2") depends_on("cube@4.2:4.2.3") @@ -52,12 +53,12 @@ MPI_CXXFLAGS=-fPIC # Use a custom compiler configuration, otherwise the score-p # build system messes with spack's compiler settings. # Create these three files in the build directory - with open("platform-backend-user-provided", "w") as backend_file: + with closing(open("platform-backend-user-provided", "w")) as backend_file: backend_file.write(self.backend_user_provided) - with open("platform-frontend-user-provided", "w") as frontend_file: + with closing(open("platform-frontend-user-provided", "w")) as frontend_file: frontend_file.write(self.frontend_user_provided) - with open("platform-mpi-user-provided", "w") as mpi_file: - mpi_file.write(self.mpi_user_provided) + with closing(open("platform-mpi-user-provided", "w")) as mpi_file: + mpi_file.write(self.mpi_user_provided) configure_args = ["--prefix=%s" % prefix, "--with-custom-compilers", diff --git a/var/spack/packages/scotch/package.py b/var/spack/packages/scotch/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/scr/package.py b/var/spack/packages/scr/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/silo/package.py b/var/spack/packages/silo/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/snappy/package.py b/var/spack/packages/snappy/package.py deleted file mode 100644 index c8f9ceef7d..0000000000 --- a/var/spack/packages/snappy/package.py +++ /dev/null @@ -1,15 +0,0 @@ -import os -from spack import * - -class Snappy(Package): - """A fast compressor/decompressor: https://code.google.com/p/snappy""" - - homepage = "https://code.google.com/p/snappy" - url = "https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz" - - version('1.1.3', '7358c82f133dc77798e4c2062a749b73') - - def install(self, spec, prefix): - configure("--prefix=" + prefix) - make() - make("install") diff --git a/var/spack/packages/spindle/package.py b/var/spack/packages/spindle/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/sqlite/package.py b/var/spack/packages/sqlite/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/stat/configure_mpicxx.patch b/var/spack/packages/stat/configure_mpicxx.patch old mode 100644 new mode 100755 diff --git a/var/spack/packages/stat/package.py b/var/spack/packages/stat/package.py old mode 100644 new mode 100755 index 5d81e62731..c40d65ae78 --- a/var/spack/packages/stat/package.py +++ b/var/spack/packages/stat/package.py @@ -9,20 +9,17 @@ class Stat(Package): version('2.1.0', 'ece26beaf057aa9134d62adcdda1ba91') version('2.0.0', 'c7494210b0ba26b577171b92838e1a9b') - variant('dysect', default=False, description="enable DySectAPI") - depends_on('libelf') depends_on('libdwarf') depends_on('dyninst') depends_on('graphlib') - depends_on('graphviz') depends_on('launchmon') depends_on('mrnet') patch('configure_mpicxx.patch', when='@2.1.0') def install(self, spec, prefix): - configure_args = [ + configure( "--enable-gui", "--prefix=%s" % prefix, "--disable-examples", # Examples require MPI: avoid this dependency. @@ -30,11 +27,7 @@ class Stat(Package): "--with-mrnet=%s" % spec['mrnet'].prefix, "--with-graphlib=%s" % spec['graphlib'].prefix, "--with-stackwalker=%s" % spec['dyninst'].prefix, - "--with-libdwarf=%s" % spec['libdwarf'].prefix - ] - if '+dysect' in spec: - configure_args.append('--enable-dysectapi') - configure(*configure_args) + "--with-libdwarf=%s" % spec['libdwarf'].prefix) make(parallel=False) make("install") diff --git a/var/spack/packages/sundials/package.py b/var/spack/packages/sundials/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/swig/package.py b/var/spack/packages/swig/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/task/package.py b/var/spack/packages/task/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/taskd/package.py b/var/spack/packages/taskd/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/tau/package.py b/var/spack/packages/tau/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/tcl/package.py b/var/spack/packages/tcl/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/the_silver_searcher/package.py b/var/spack/packages/the_silver_searcher/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/thrift/package.py b/var/spack/packages/thrift/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/tk/package.py b/var/spack/packages/tk/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/tmux/package.py b/var/spack/packages/tmux/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/tmuxinator/package.py b/var/spack/packages/tmuxinator/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/uncrustify/package.py b/var/spack/packages/uncrustify/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/util-linux/package.py b/var/spack/packages/util-linux/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/vim/package.py b/var/spack/packages/vim/package.py old mode 100644 new mode 100755 index 4099b3257f..d0cf80b898 --- a/var/spack/packages/vim/package.py +++ b/var/spack/packages/vim/package.py @@ -35,26 +35,15 @@ class Vim(Package): variant('ruby', default=False, description="build with Ruby") depends_on('ruby', when='+ruby') - variant('cscope', default=False, description="build with cscope support") - depends_on('cscope', when='+cscope') - - variant('gui', default=False, description="build with gui (gvim)") - # virtual dependency? - def install(self, spec, prefix): feature_set = None for fs in self.feature_sets: if "+" + fs in spec: if feature_set is not None: - tty.error("Only one feature set allowed, both %s and %s specified" - % (feature_set, fs)) + tty.error("Only one feature set allowed, both {} and {} specified".format( + feature_set, + fs)) feature_set = fs - if '+gui' in spec: - if feature_set is not None: - if feature_set is not 'huge': - tty.error("+gui variant requires 'huge' feature set, %s was specified" - % feature_set) - feature_set = 'huge' if feature_set is None: feature_set = 'normal' @@ -71,12 +60,6 @@ class Vim(Package): else: configure_args.append("--enable-rubyinterp=dynamic") - if '+gui' in spec: - configure_args.append("--enable-gui=auto") - - if '+cscope' in spec: - configure_args.append("--enable-cscope") - configure("--prefix=%s" % prefix, *configure_args) make() diff --git a/var/spack/packages/vtk/package.py b/var/spack/packages/vtk/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/wget/package.py b/var/spack/packages/wget/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/wx/package.py b/var/spack/packages/wx/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/wxpropgrid/package.py b/var/spack/packages/wxpropgrid/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/xcb-proto/package.py b/var/spack/packages/xcb-proto/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/xz/package.py b/var/spack/packages/xz/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/yasm/package.py b/var/spack/packages/yasm/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/zeromq/package.py b/var/spack/packages/zeromq/package.py deleted file mode 100644 index b5a1e3d4cd..0000000000 --- a/var/spack/packages/zeromq/package.py +++ /dev/null @@ -1,20 +0,0 @@ -from spack import * - -class Zeromq(Package): - """ The ZMQ networking/concurrency library and core API """ - homepage = "http://zguide.zeromq.org/" - url = "http://download.zeromq.org/zeromq-4.1.2.tar.gz" - - version('4.1.2', '159c0c56a895472f02668e692d122685') - version('4.1.1', '0a4b44aa085644f25c177f79dc13f253') - version('4.0.7', '9b46f7e7b0704b83638ef0d461fd59ab') - version('4.0.6', 'd47dd09ed7ae6e7fd6f9a816d7f5fdf6') - version('4.0.5', '73c39f5eb01b9d7eaf74a5d899f1d03d') - - depends_on("libsodium") - - def install(self, spec, prefix): - configure("--with-libsodium","--prefix=%s" % prefix) - - make() - make("install") diff --git a/var/spack/packages/zlib/package.py b/var/spack/packages/zlib/package.py old mode 100644 new mode 100755 diff --git a/var/spack/packages/zsh/package.py b/var/spack/packages/zsh/package.py old mode 100644 new mode 100755 -- cgit v1.2.3-70-g09d2 From e9f7d033ff04138905c99cb427e2071cc55cdc16 Mon Sep 17 00:00:00 2001 From: karenyyng Date: Sat, 3 Oct 2015 19:13:08 -0700 Subject: make sure submodule is added in the correct location --- .gitmodules | 6 +++--- lib/spack/spack/util/python_recipe_parser | 1 + var/spack/packages/py-astropy/package.py | 1 + var/spack/packages/py-jsonschema/package.py | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) create mode 160000 lib/spack/spack/util/python_recipe_parser diff --git a/.gitmodules b/.gitmodules index 1d770f415b..d5995e8e4b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "/lib/spack/spack/util/python_recipe_parser"] - path = /lib/spack/spack/util/python_recipe_parser - url = https://github.com/karenyyng/spack_python_package_parser +[submodule "lib/spack/spack/util/python_recipe_parser"] + path = lib/spack/spack/util/python_recipe_parser + url = git@github.com:karenyyng/spack_python_package_parser.git diff --git a/lib/spack/spack/util/python_recipe_parser b/lib/spack/spack/util/python_recipe_parser new file mode 160000 index 0000000000..6777dd98e7 --- /dev/null +++ b/lib/spack/spack/util/python_recipe_parser @@ -0,0 +1 @@ +Subproject commit 6777dd98e75229856d94da6671676b2a66e75986 diff --git a/var/spack/packages/py-astropy/package.py b/var/spack/packages/py-astropy/package.py index 5d2d0619cc..9fda37519e 100644 --- a/var/spack/packages/py-astropy/package.py +++ b/var/spack/packages/py-astropy/package.py @@ -7,6 +7,7 @@ class PyAstropy(Package): url="https://pypi.python.org/packages/source/a/astropy/astropy-0.4.2.tar.gz") extends("python") + depends_on("py-numpy") def install(self, spec, prefix): python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-jsonschema/package.py b/var/spack/packages/py-jsonschema/package.py index 9a7fc21862..fa233635ce 100755 --- a/var/spack/packages/py-jsonschema/package.py +++ b/var/spack/packages/py-jsonschema/package.py @@ -11,6 +11,8 @@ class PyJsonschema(Package): extends("python") depends_on("py-setuptools@18.1") + depends_on("py-vcversioner") + depends_on("py-functools32") def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From f3254ff02d589c9e177aab58276f5c1971866018 Mon Sep 17 00:00:00 2001 From: karenyyng Date: Sat, 3 Oct 2015 19:22:53 -0700 Subject: removed package for python packages with problematic / duplicate names --- var/spack/packages/py-Cython/package.py | 12 ------------ var/spack/packages/py-Distutils2/package.py | 15 --------------- 2 files changed, 27 deletions(-) delete mode 100644 var/spack/packages/py-Cython/package.py delete mode 100644 var/spack/packages/py-Distutils2/package.py diff --git a/var/spack/packages/py-Cython/package.py b/var/spack/packages/py-Cython/package.py deleted file mode 100644 index c250139114..0000000000 --- a/var/spack/packages/py-Cython/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyCython(Package): - """The Cython compiler for writing C extensions for the Python language.""" - homepage = "http://www.cython.org" - version("0.21.2", "d21adb870c75680dc857cd05d41046a4", - url="https://pypi.python.org/packages/source/C/Cython/Cython-0.21.2.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-Distutils2/package.py b/var/spack/packages/py-Distutils2/package.py deleted file mode 100644 index 8690f569fe..0000000000 --- a/var/spack/packages/py-Distutils2/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PyDistutils2(Package): - """Python Packaging Library.""" - - homepage = "https://hg.python.org/distutils2" - url = "https://pypi.python.org/packages/source/D/Distutils2/Distutils2-1.0a4.tar.gz" - - version('1.0a4', '52bc9dffb394970c27e02853ae3a3241') - - depends_on("python") - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) - -- cgit v1.2.3-70-g09d2 From c809cc92735c7ff57dab2aca02bc7fa40c901a43 Mon Sep 17 00:00:00 2001 From: karenyyng Date: Sat, 3 Oct 2015 19:24:15 -0700 Subject: clean up package.py file and remove duplicate file --- var/spack/packages/py-ipython/package.py | 4 ---- var/spack/packages/py-ipython/package.py.backup | 27 ------------------------- 2 files changed, 31 deletions(-) delete mode 100755 var/spack/packages/py-ipython/package.py.backup diff --git a/var/spack/packages/py-ipython/package.py b/var/spack/packages/py-ipython/package.py index 3b94b71f29..225366552a 100755 --- a/var/spack/packages/py-ipython/package.py +++ b/var/spack/packages/py-ipython/package.py @@ -24,8 +24,4 @@ class PyIpython(Package): depends_on('py-jinja2') def install(self, spec, prefix): - import os - # os.system("spack activate py-setuptools@18.1") - # os.system("easy_install pip") - # os.system("pip install ipython[notebook]") python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-ipython/package.py.backup b/var/spack/packages/py-ipython/package.py.backup deleted file mode 100755 index 1ed8b57e60..0000000000 --- a/var/spack/packages/py-ipython/package.py.backup +++ /dev/null @@ -1,27 +0,0 @@ -from spack import * - -class PyIpython(Package): - """IPython provides a rich toolkit to help you make the most out of using Python interactively.""" - homepage = "https://pypi.python.org/pypi/ipython" - - version('2.3.1', '2b7085525dac11190bfb45bb8ec8dcbf', - url="https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz") - version('3.1.0', 'a749d90c16068687b0ec45a27e72ef8f') - version('3.2.1', 'f4c93d67ac4b2d4fc69df693b6f3c9e0', - url='https://github.com/ipython/ipython/archive/rel-3.2.1.tar.gz') - - extends('python') - depends_on('py-pygments') - depends_on('py-setuptools@18.1') - depends_on('py-traitlets') - depends_on('py-pyzmq') - depends_on('py-pexpect') - depends_on('py-tornado') - depends_on('py-Jinja2') - - def install(self, spec, prefix): - import os - # os.system("spack activate py-setuptools@18.1") - # os.system("easy_install pip") - # os.system("pip install ipython[notebook]") - python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From d00314c621bd427b142fecafc11c25006f3b5279 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 5 Oct 2015 01:30:25 -0700 Subject: Protptype cray compiler detection and support --- lib/spack/env/cc | 17 +++++++++ lib/spack/spack/build_environment.py | 9 +++++ lib/spack/spack/compiler.py | 67 ++++++++++++++++++++++++++++++++++- lib/spack/spack/compilers/__init__.py | 9 +++++ lib/spack/spack/compilers/clang.py | 2 +- lib/spack/spack/compilers/gcc.py | 7 ++-- lib/spack/spack/compilers/intel.py | 3 ++ lib/spack/spack/compilers/pgi.py | 3 ++ lib/spack/spack/compilers/xl.py | 4 ++- 9 files changed, 116 insertions(+), 5 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index fa85bb595e..b6c6e03e42 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -70,6 +70,23 @@ for param in $parameters; do fi done + +# +# Cray module environment-related stuff. +# +if [ ! -z "$SPACK_CRAYPE" ]; then + cur_pe=$(module list 2>&1 | grep PrgEnv | grep -o 'PrgEnv-[^/]*') + if [ ! -z "$cur_pe" ]; then + module swap $cur_pe $SPACK_CRAYPE + else + module load $SPACK_CRAYPE + fi +fi + +if [ ! -z "$SPACK_COMP_MODULE" ]; then + module load $SPACK_COMP_MODULE +fi + # # Figure out the type of compiler, the language, and the mode so that # the compiler script knows what to do. diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index a133faa629..68388958f5 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -57,6 +57,9 @@ SPACK_DEBUG = 'SPACK_DEBUG' SPACK_SHORT_SPEC = 'SPACK_SHORT_SPEC' SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR' +SPACK_CRAYPE = 'SPACK_CRAYPE' +SPACK_COMP_MODULE = 'SPACK_COMP_MODULE' + class MakeExecutable(Executable): """Special callable executable object for make so the user can @@ -105,6 +108,12 @@ def set_compiler_environment_variables(pkg): os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) + if compiler.PrgEnv: + os.environ['SPACK_CRAYPE'] = compiler.PrgEnv + os.environ['SPACK_COMP_MODULE'] = compiler.module + + + def set_build_environment_variables(pkg): """This ensures a clean install environment when we build packages. diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 1e800a8979..e7d450ee8b 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -25,6 +25,7 @@ import os import re import itertools +import subprocess from datetime import datetime import llnl.util.tty as tty @@ -98,7 +99,14 @@ class Compiler(object): cxx11_flag = "-std=c++11" - def __init__(self, cspec, cc, cxx, f77, fc): + # Cray PrgEnv name that can be used to load this compiler + PrgEnv = None + + # Name of module used to switch versions of this compiler + PrgEnv_compiler = None + + + def __init__(self, cspec, cc, cxx, f77, fc, module=None): def check(exe): if exe is None: return None @@ -111,6 +119,8 @@ class Compiler(object): self.fc = check(fc) self.spec = cspec + self.module = module + @property @@ -255,6 +265,61 @@ class Compiler(object): return list(compilers.values()) + @classmethod + def find_in_modules(cls): + compilers = [] + + if cls.PrgEnv: + if not cls.PrgEnv_compiler: + tty.die('Must supply PrgEnv_compiler with PrgEnv') + + output = _shell('module avail %s' % cls.PrgEnv_compiler) + matches = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, output) + + for name, version in matches: + v = version + '-craype' + comp = cls(spack.spec.CompilerSpec(name + '@' + v), + 'cc', 'CC', 'ftn', 'ftn', name +'/' + v) + + compilers.append(comp) + + return compilers + + +def _cur_prgenv(): + out, err = subprocess.Popen( + ['module list'], shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + matches = re.findall(r'(PrgEnv-[^/]*)/', err) + return matches[0] + + +def _module_shell(module, *args): + cmd = 'module swap %s %s;' % (_cur_prgenv(), module) + cmd += 'module load %s;' % compiler + cmd += 'module unload cray-libsci;' + +# + +# 'module load craype-network-gemini;' + +# 'module load %s;' % module + +# 'module swap gcc/4.6.1;' + +# 'module load eswrap; ' + +# 'module load craype-mc12; ' + +# 'module load cray-shmem; ' + +# 'module load cray-mpich; ') + cmd += ' '.join(args) + out, err = subprocess.Popen([cmd + ' '.join(args)], shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + return out + + +def _shell(*args): + return subprocess.Popen([' '.join(args)], shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[1] + + + + def __repr__(self): """Return a string represntation of the compiler toolchain.""" return self.__str__() diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index b7b021a1ac..8c4cb38926 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -44,6 +44,7 @@ from spack.util.environment import get_path _imported_compilers_module = 'spack.compilers' _required_instance_vars = ['cc', 'cxx', 'f77', 'fc'] +_optional_instance_vars = ['module'] _default_order = ['gcc', 'intel', 'pgi', 'clang', 'xlc'] @@ -127,11 +128,18 @@ def add_compilers_to_config(scope, *compilers): compiler_config_tree = {} for compiler in compilers: compiler_entry = {} + for c in _required_instance_vars: val = getattr(compiler, c) if not val: val = "None" compiler_entry[c] = val + + for c in _optional_instance_vars: + val = getattr(compiler, c) + if val: + compiler_entry[c] = val + compiler_config_tree[str(compiler.spec)] = compiler_entry spack.config.add_to_compiler_config(compiler_config_tree, scope) @@ -220,6 +228,7 @@ def class_for_compiler_name(compiler_name): def all_compiler_types(): +# return [class_for_compiler_name(c) for c in ['gcc']] return [class_for_compiler_name(c) for c in supported_compilers()] diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index 790901c86e..8d32608ff4 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -39,7 +39,7 @@ class Clang(Compiler): @classmethod - def default_version(self, comp): + def default_version(cls, comp): """The '--version' option works for clang compilers. Output looks like this:: diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py index f0d27d590e..ff0b8889a8 100644 --- a/lib/spack/spack/compilers/gcc.py +++ b/lib/spack/spack/compilers/gcc.py @@ -42,6 +42,9 @@ class Gcc(Compiler): # MacPorts builds gcc versions with prefixes and -mp-X.Y suffixes. suffixes = [r'-mp-\d\.\d'] + PrgEnv = 'gnu' + PrgEnv_compiler = 'gcc' + @property def cxx11_flag(self): if self.version < ver('4.3'): @@ -56,9 +59,9 @@ class Gcc(Compiler): return get_compiler_version( fc, '-dumpversion', # older gfortran versions don't have simple dumpversion output. - r'(?:GNU Fortran \(GCC\))?(\d+\.\d+(?:\.\d+)?)') + r'(?:GNU Fortran \(GCC\))?(\d+\.\d+(?:\.\d+)?)', module) @classmethod def f77_version(cls, f77): - return cls.fc_version(f77) + return cls.fc_version(f77, module) diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py index 2a72c4eaea..7c485fe69d 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -37,6 +37,9 @@ class Intel(Compiler): # Subclasses use possible names of Fortran 90 compiler fc_names = ['ifort'] + PrgEnv = 'intel' + PrgEnv_compiler = 'intel' + @property def cxx11_flag(self): if self.version < ver('11.1'): diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py index d97f24c12e..8f1ed28825 100644 --- a/lib/spack/spack/compilers/pgi.py +++ b/lib/spack/spack/compilers/pgi.py @@ -37,6 +37,9 @@ class Pgi(Compiler): # Subclasses use possible names of Fortran 90 compiler fc_names = ['pgf95', 'pgf90'] + PrgEnv = 'pgi' + PrgEnv_compiler = 'pgi' + @classmethod def default_version(cls, comp): """The '-V' option works for all the PGI compilers. diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py index 562186b865..179b720918 100644 --- a/lib/spack/spack/compilers/xl.py +++ b/lib/spack/spack/compilers/xl.py @@ -45,8 +45,9 @@ class Xl(Compiler): else: return "-qlanglvl=extended0x" + @classmethod - def default_version(self, comp): + def default_version(cls, comp): """The '-qversion' is the standard option fo XL compilers. Output looks like this:: @@ -72,6 +73,7 @@ class Xl(Compiler): return get_compiler_version( comp, '-qversion',r'([0-9]?[0-9]\.[0-9])') + @classmethod def fc_version(cls, fc): """The fortran and C/C++ versions of the XL compiler are always two units apart. -- cgit v1.2.3-70-g09d2 From f4e72f33c8ba988507aba667e318d1861c7b2b20 Mon Sep 17 00:00:00 2001 From: karenyyng Date: Mon, 5 Oct 2015 08:24:33 -0700 Subject: added dependencies for py-h5py --- lib/spack/spack/util/python_recipe_parser | 2 +- var/spack/packages/py-h5py/package.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/util/python_recipe_parser b/lib/spack/spack/util/python_recipe_parser index 6777dd98e7..437a62abb3 160000 --- a/lib/spack/spack/util/python_recipe_parser +++ b/lib/spack/spack/util/python_recipe_parser @@ -1 +1 @@ -Subproject commit 6777dd98e75229856d94da6671676b2a66e75986 +Subproject commit 437a62abb3df7212e3ee20269c0089a0a9766fe0 diff --git a/var/spack/packages/py-h5py/package.py b/var/spack/packages/py-h5py/package.py index 6293da5407..04072ca76b 100755 --- a/var/spack/packages/py-h5py/package.py +++ b/var/spack/packages/py-h5py/package.py @@ -13,6 +13,8 @@ class PyH5py(Package): depends_on('hdf5') depends_on('py-numpy') depends_on('py-cython') + depends_on('py-six') + depends_on('py-pkgconfig') def install(self, spec, prefix): python('setup.py', 'configure', '--hdf5=%s' % spec['hdf5'].prefix) -- cgit v1.2.3-70-g09d2 From b6d2a12ceb090692aa2be363b46d7f25486c0245 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 7 Oct 2015 15:57:29 -0700 Subject: Started changing the find in modules method written by Todd --- lib/spack/spack/compiler.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index e7d450ee8b..cbe6d8cd7d 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -272,9 +272,11 @@ class Compiler(object): if cls.PrgEnv: if not cls.PrgEnv_compiler: tty.die('Must supply PrgEnv_compiler with PrgEnv') - - output = _shell('module avail %s' % cls.PrgEnv_compiler) - matches = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, output) + + loaded_modules = os.environ["LOADEDMODULES"].split(":") + #output = _shell('module avail %s' % cls.PrgEnv_compiler) + for module in loaded_modules: + match = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, module) for name, version in matches: v = version + '-craype' -- cgit v1.2.3-70-g09d2 From 4f21344e87da327b4166fff1fd2ce32afaa07dbc Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 14 Oct 2015 19:41:07 -0700 Subject: Started created the Architecture class for Spack to use --- lib/spack/spack/architecture.py | 73 ++++++++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 16 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 0c4b605e91..829aaa4c1c 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -30,7 +30,7 @@ from llnl.util.lang import memoized import spack import spack.error as serr from spack.version import Version - +from external import yaml class InvalidSysTypeError(serr.SpackError): def __init__(self, sys_type): @@ -43,41 +43,81 @@ class NoSysTypeError(serr.SpackError): super(NoSysTypeError, self).__init__( "Could not determine sys_type for this machine.") +class Architecture(object): + def __init__(self, *arch_name): + + """ Constructor for the architecture class. Should return a dictionary of name (grabbed from uname) and a strategy for + searching for that architecture's compiler. The target passed to it should be a dictionary of names and strategies. + """ + self.arch_dict = {} + self.arch_name = arch_name + + def add_arch_strategy(self): + """ Create a dictionary using the tuples of arch_names""" + for n in self.arch_name: + if 'cray' in n.lower(): + self.arch_dict[n] = "MODULES" + if 'linux' in n.lower() or 'x86_64' in n.lower(): + self.arch_dict[n] = "PATH" + else: + self.arch_dict[n] = None def get_sys_type_from_spack_globals(): - """Return the SYS_TYPE from spack globals, or None if it isn't set.""" + """Return the SYS_TYPE from spack globals, or None if it isn't set. Front-end""" if not hasattr(spack, "sys_type"): - return None + return None elif hasattr(spack.sys_type, "__call__"): - return spack.sys_type() + return Architecture(spack.sys_type()) else: - return spack.sys_type - - -def get_sys_type_from_environment(): - """Return $SYS_TYPE or None if it's not defined.""" - return os.environ.get('SYS_TYPE') + return Architecture(spack.sys_type) +# This is livermore dependent. Hard coded for livermore +#def get_sys_type_from_environment(): +# """Return $SYS_TYPE or None if it's not defined.""" +# return os.environ.get('SYS_TYPE') def get_mac_sys_type(): - """Return a Mac OS SYS_TYPE or None if this isn't a mac.""" + """Return a Mac OS SYS_TYPE or None if this isn't a mac. + Front-end config + """ + mac_ver = py_platform.mac_ver()[0] if not mac_ver: return None - return "macosx_%s_%s" % ( - Version(mac_ver).up_to(2), py_platform.machine()) - + return Architecture("macosx_%s_%s" % (Version(mac_ver).up_to(2), py_platform.machine())) + +def get_sys_type_from_uname(): + """ Returns a sys_type from the uname argument + Front-end config + """ + return Architecture(os.uname()[0] + " " + os.uname()[-1]) + +def get_sys_type_from_config_file(): + """ Should read in a sys_type from the config yaml file. This should be the first thing looked at since + The user can specify that the architecture is a cray-xc40 + """ + + home_dir = os.environ["HOME"] + yaml_file = os.path.join(home_dir, ".spack/architecture.yaml") + if os.path.isfile(yaml_file): + with open(yaml_file) as config: + config_dict = config['architecture'] + front_end = config_dict['front'] + back_end = config_dict['back'] + return Architecture(front_end) @memoized def sys_type(): - """Returns a SysType for the current machine.""" + """Returns a SysType for the current machine. Should return output to an + Architecture class + """ methods = [get_sys_type_from_spack_globals, get_sys_type_from_environment, get_mac_sys_type] # search for a method that doesn't return None - sys_type = None + sys_type = (None,None) for method in methods: sys_type = method() if sys_type: break @@ -90,3 +130,4 @@ def sys_type(): raise InvalidSysTypeError(sys_type) return sys_type + -- cgit v1.2.3-70-g09d2 From 29e03ac851f807e9fb5aefb687902e703d208615 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 15 Oct 2015 12:46:44 -0700 Subject: Added __eq__ testing method. Created tests for it in test/ folder --- lib/spack/spack/architecture.py | 56 +++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 829aaa4c1c..97c2cdbd6d 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -57,10 +57,20 @@ class Architecture(object): for n in self.arch_name: if 'cray' in n.lower(): self.arch_dict[n] = "MODULES" - if 'linux' in n.lower() or 'x86_64' in n.lower(): + elif 'linux' in n.lower() or 'x86_64' in n.lower(): self.arch_dict[n] = "PATH" else: self.arch_dict[n] = None + + def get_arch_dict(self): + """ Grab the dictionary from the Architecture class, rather than access the internal Architecture attributes """ + return self.arch_dict + + def __eq__(self, other): + if self.arch_dict != {} and other.arch_dict != {}: + return self.arch_dict == other.arch_dict + else: + return self.arch_name == self.arch_name def get_sys_type_from_spack_globals(): """Return the SYS_TYPE from spack globals, or None if it isn't set. Front-end""" @@ -95,29 +105,43 @@ def get_sys_type_from_uname(): def get_sys_type_from_config_file(): """ Should read in a sys_type from the config yaml file. This should be the first thing looked at since - The user can specify that the architecture is a cray-xc40 + The user can specify that the architecture is a cray-xc40. A template yaml should be created when spack + is installed. Similar to .spackconfig """ - home_dir = os.environ["HOME"] - yaml_file = os.path.join(home_dir, ".spack/architecture.yaml") - if os.path.isfile(yaml_file): - with open(yaml_file) as config: - config_dict = config['architecture'] - front_end = config_dict['front'] - back_end = config_dict['back'] - return Architecture(front_end) + spack_home_dir = os.environ["HOME"] + "/.spack" + yaml_file = os.path.join(spack_home_dir, "architecture.yaml") + + try: + config_dict = yaml.load(open(yaml_file)) # Fix this to have yaml.load() + arch = config_dict['architecture'] + front = arch['front'] + back = arch['back'] + + except: + print "No architecture.yaml config file found" + + return Architecture(front,back) @memoized def sys_type(): - """Returns a SysType for the current machine. Should return output to an - Architecture class + """Priority of gathering sys-type. + 1. YAML file that the user specifies the name of the architecture. e.g Cray-XC40 or Cray-XC30 + 2. UNAME + 3. GLOBALS + 4. MAC OSX + Yaml should be a priority here because we want the user to be able to specify the type of architecture to use. + If there is no yaml present then it should move on to the next function and stop immediately once it gets a + arch name + """ - methods = [get_sys_type_from_spack_globals, - get_sys_type_from_environment, - get_mac_sys_type] + methods = [get_sys_type_from_config_file, + get_sys_type_from_uname, + get_sys_type_from_spack_globals, + get_mac_sys_type] # search for a method that doesn't return None - sys_type = (None,None) + sys_type = None for method in methods: sys_type = method() if sys_type: break -- cgit v1.2.3-70-g09d2 From d328f4c3b631e59ed14f52cf38f3d05774100c15 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 15 Oct 2015 12:47:26 -0700 Subject: Test suite for architecture class and functions --- lib/spack/spack/test/architecture.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/spack/spack/test/architecture.py diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py new file mode 100644 index 0000000000..6ff22aaa59 --- /dev/null +++ b/lib/spack/spack/test/architecture.py @@ -0,0 +1,19 @@ +""" Test checks if the architecture class is created correctly and also that + the functions are looking for the correct architecture name +""" +import unittest +import spack +from spack.architecture import * + +class ArchitectureTest(unittest.TestCase): + + def test_Architecture_class(self): + a = Architecture('Cray-XC40') + a.add_arch_strategy() + self.assertEquals(a.get_arch_dict(), {'Cray-XC40': 'MODULES'}) + + def test_get_sys_type_from_config_file(self): + output_arch_class = get_sys_type_from_config_file() + my_arch_class = Architecture('Linux x86_64','Cray-xc40') + + self.assertEqual(output_arch_class, my_arch_class) -- cgit v1.2.3-70-g09d2 From ccdf1057592b48e13ba3b98df9972324e91d0be8 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 15 Oct 2015 12:48:12 -0700 Subject: Commented out a long list of tests to just include my arch test --- lib/spack/spack/test/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index 6b3715be6f..ed51fac33a 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -31,7 +31,8 @@ from llnl.util.tty.colify import colify import spack """Names of tests to be included in Spack's test suite""" -test_names = ['versions', +"""test_names = ['architecture', + 'versions', 'url_parse', 'url_substitution', 'packages', @@ -57,7 +58,8 @@ test_names = ['versions', 'optional_deps', 'make_executable', 'configure_guess'] - +""" +test_names = ['architecture'] def list_tests(): """Return names of all tests that can be run for Spack.""" -- cgit v1.2.3-70-g09d2 From fec197ccac94af485745b6b40d8150b4ae030e99 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 15 Oct 2015 15:25:13 -0700 Subject: Fixed the output of sys_type(), might need to add back the error handling part --- lib/spack/spack/architecture.py | 47 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 97c2cdbd6d..8f74fbc2e1 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -60,7 +60,7 @@ class Architecture(object): elif 'linux' in n.lower() or 'x86_64' in n.lower(): self.arch_dict[n] = "PATH" else: - self.arch_dict[n] = None + self.arch_dict[n] = "" def get_arch_dict(self): """ Grab the dictionary from the Architecture class, rather than access the internal Architecture attributes """ @@ -72,6 +72,7 @@ class Architecture(object): else: return self.arch_name == self.arch_name + def get_sys_type_from_spack_globals(): """Return the SYS_TYPE from spack globals, or None if it isn't set. Front-end""" if not hasattr(spack, "sys_type"): @@ -86,6 +87,7 @@ def get_sys_type_from_spack_globals(): # """Return $SYS_TYPE or None if it's not defined.""" # return os.environ.get('SYS_TYPE') + def get_mac_sys_type(): """Return a Mac OS SYS_TYPE or None if this isn't a mac. Front-end config @@ -97,12 +99,14 @@ def get_mac_sys_type(): return Architecture("macosx_%s_%s" % (Version(mac_ver).up_to(2), py_platform.machine())) + def get_sys_type_from_uname(): """ Returns a sys_type from the uname argument Front-end config """ return Architecture(os.uname()[0] + " " + os.uname()[-1]) + def get_sys_type_from_config_file(): """ Should read in a sys_type from the config yaml file. This should be the first thing looked at since The user can specify that the architecture is a cray-xc40. A template yaml should be created when spack @@ -110,21 +114,22 @@ def get_sys_type_from_config_file(): """ spack_home_dir = os.environ["HOME"] + "/.spack" - yaml_file = os.path.join(spack_home_dir, "architecture.yaml") + yaml_file = os.path.join(spack_home_dir, 'architecture.yaml') try: config_dict = yaml.load(open(yaml_file)) # Fix this to have yaml.load() arch = config_dict['architecture'] front = arch['front'] back = arch['back'] + return Architecture(front,back) except: print "No architecture.yaml config file found" - - return Architecture(front,back) + return None + @memoized -def sys_type(): +def sys_type(): # This function is going to give me issues isn't it?? """Priority of gathering sys-type. 1. YAML file that the user specifies the name of the architecture. e.g Cray-XC40 or Cray-XC30 2. UNAME @@ -133,25 +138,19 @@ def sys_type(): Yaml should be a priority here because we want the user to be able to specify the type of architecture to use. If there is no yaml present then it should move on to the next function and stop immediately once it gets a arch name - """ - methods = [get_sys_type_from_config_file, - get_sys_type_from_uname, - get_sys_type_from_spack_globals, - get_mac_sys_type] - - # search for a method that doesn't return None - sys_type = None - for method in methods: - sys_type = method() - if sys_type: break - - # Couldn't determine the sys_type for this machine. - if sys_type is None: - return "unknown_arch" - - if not isinstance(sys_type, basestring): - raise InvalidSysTypeError(sys_type) - + # Try to create an architecture object using the config file FIRST + functions = [get_sys_type_from_config_file, + get_sys_type_from_uname, + get_sys_type_from_spack_globals, + get_mac_sys_type] + + # TODO: Test for mac OSX system type but I'm sure it will be okay + for func in functions: + sys_type = None + sys_type = func() + if sys_type: + break + return sys_type -- cgit v1.2.3-70-g09d2 From 3ba2842b53752e9a3ec8766f3a1350c6cc7577a2 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 20 Oct 2015 13:33:21 -0700 Subject: Got Architecture class working the way i wanted to. Next to write tests --- lib/spack/spack/architecture.py | 70 ++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 8f74fbc2e1..1a9f9de2cb 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -34,47 +34,50 @@ from external import yaml class InvalidSysTypeError(serr.SpackError): def __init__(self, sys_type): - super(InvalidSysTypeError, self).__init__( - "Invalid sys_type value for Spack: " + sys_type) + super(InvalidSysTypeError, self).__init__("Invalid sys_type value for Spack: " + sys_type) class NoSysTypeError(serr.SpackError): def __init__(self): - super(NoSysTypeError, self).__init__( - "Could not determine sys_type for this machine.") + super(NoSysTypeError, self).__init__("Could not determine sys_type for this machine.") + class Architecture(object): - def __init__(self, *arch_name): + """ Architecture class that contains a dictionary of architecture name and compiler search strategy methods. + The idea is to create an object that Spack can interact with and know how to search for the compiler + If it is on a Cray architecture it should look in modules. If it is anything else search $PATH. + """ + + def __init__(self, front=None, back=None): - """ Constructor for the architecture class. Should return a dictionary of name (grabbed from uname) and a strategy for - searching for that architecture's compiler. The target passed to it should be a dictionary of names and strategies. + """ Constructor for the architecture class. Should return a dictionary of name (grabbed from uname) + and a strategy for searching for that architecture's compiler. + The target passed to it should be a dictionary of names and strategies. """ - self.arch_dict = {} - self.arch_name = arch_name - - def add_arch_strategy(self): - """ Create a dictionary using the tuples of arch_names""" - for n in self.arch_name: - if 'cray' in n.lower(): - self.arch_dict[n] = "MODULES" - elif 'linux' in n.lower() or 'x86_64' in n.lower(): - self.arch_dict[n] = "PATH" - else: - self.arch_dict[n] = "" - - def get_arch_dict(self): - """ Grab the dictionary from the Architecture class, rather than access the internal Architecture attributes """ - return self.arch_dict - - def __eq__(self, other): - if self.arch_dict != {} and other.arch_dict != {}: - return self.arch_dict == other.arch_dict - else: - return self.arch_name == self.arch_name - + names = [] + names.append(front) + names.append(back) + + def add_compiler_strategy(names): + """ Create a dictionary of {'arch-name': 'strategy'} + This will tell Spack whether to look in the $PATH + or $MODULES location for compilers + """ + d = {} + for n in names: + if n: + if 'cray' in n.lower(): + d[n] = "MODULES" + elif 'linux' in n.lower(): + d[n] = "PATH" + else: + d[n] = 'No Strategy' + return d + + self.arch_dict = add_compiler_strategy(names) -def get_sys_type_from_spack_globals(): - """Return the SYS_TYPE from spack globals, or None if it isn't set. Front-end""" +def get_sys_type_from_spack_globals(): #TODO: Figure out how this function works + """Return the SYS_TYPE from spack globals, or None if it isn't set.""" if not hasattr(spack, "sys_type"): return None elif hasattr(spack.sys_type, "__call__"): @@ -104,7 +107,7 @@ def get_sys_type_from_uname(): """ Returns a sys_type from the uname argument Front-end config """ - return Architecture(os.uname()[0] + " " + os.uname()[-1]) + return Architecture(os.uname()[0]) def get_sys_type_from_config_file(): @@ -149,6 +152,7 @@ def sys_type(): # This function is going to give me issues isn't it?? for func in functions: sys_type = None sys_type = func() + if sys_type: break -- cgit v1.2.3-70-g09d2 From ca3cc5b23e94b8168ba768ad343822b39aac4a25 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 20 Oct 2015 13:37:06 -0700 Subject: Refactored architecture class. Now it will automagically create a dict upon instantiation. --- lib/spack/spack/architecture.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 1a9f9de2cb..760c9cddd1 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -49,7 +49,6 @@ class Architecture(object): """ def __init__(self, front=None, back=None): - """ Constructor for the architecture class. Should return a dictionary of name (grabbed from uname) and a strategy for searching for that architecture's compiler. The target passed to it should be a dictionary of names and strategies. @@ -63,6 +62,7 @@ class Architecture(object): This will tell Spack whether to look in the $PATH or $MODULES location for compilers """ + #TODO: Look for other strategies d = {} for n in names: if n: @@ -76,21 +76,20 @@ class Architecture(object): self.arch_dict = add_compiler_strategy(names) -def get_sys_type_from_spack_globals(): #TODO: Figure out how this function works +def get_sys_type_from_spack_globals(): """Return the SYS_TYPE from spack globals, or None if it isn't set.""" if not hasattr(spack, "sys_type"): return None elif hasattr(spack.sys_type, "__call__"): - return Architecture(spack.sys_type()) + return Architecture(spack.sys_type()) #If in __init__.py there is a sys_type() then call that else: - return Architecture(spack.sys_type) + return Architecture(spack.sys_type) # Else use the attributed which defaults to None # This is livermore dependent. Hard coded for livermore #def get_sys_type_from_environment(): # """Return $SYS_TYPE or None if it's not defined.""" # return os.environ.get('SYS_TYPE') - def get_mac_sys_type(): """Return a Mac OS SYS_TYPE or None if this isn't a mac. Front-end config -- cgit v1.2.3-70-g09d2 From c31da9bc8f10c3a74b3bf26c2dbac9a13c073eba Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 20 Oct 2015 14:10:54 -0700 Subject: Made sure architecture works with yaml file --- lib/spack/spack/architecture.py | 46 ++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 760c9cddd1..8460b0de1e 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -49,18 +49,24 @@ class Architecture(object): """ def __init__(self, front=None, back=None): - """ Constructor for the architecture class. Should return a dictionary of name (grabbed from uname) - and a strategy for searching for that architecture's compiler. - The target passed to it should be a dictionary of names and strategies. + """ Constructor for the architecture class. It will create a list from the given arguments and iterate + through that list. It will then create a dictionary of {arch_name : strategy} + Takes in two parameters: + + front = None defaults to None. Should be the front-end architecture of the machine + back = None defaults to None. Should be the back-end architecture of the machine + + If no arguments are given it will return an empty dictionary """ - names = [] - names.append(front) - names.append(back) + _names = [] + _names.append(front) + _names.append(back) - def add_compiler_strategy(names): + def _add_compiler_strategy(names): """ Create a dictionary of {'arch-name': 'strategy'} This will tell Spack whether to look in the $PATH or $MODULES location for compilers + Else it will return No Strategy """ #TODO: Look for other strategies d = {} @@ -74,7 +80,7 @@ class Architecture(object): d[n] = 'No Strategy' return d - self.arch_dict = add_compiler_strategy(names) + self.arch_dict = _add_compiler_strategy(_names) def get_sys_type_from_spack_globals(): """Return the SYS_TYPE from spack globals, or None if it isn't set.""" @@ -85,20 +91,20 @@ def get_sys_type_from_spack_globals(): else: return Architecture(spack.sys_type) # Else use the attributed which defaults to None + # This is livermore dependent. Hard coded for livermore #def get_sys_type_from_environment(): # """Return $SYS_TYPE or None if it's not defined.""" # return os.environ.get('SYS_TYPE') + def get_mac_sys_type(): """Return a Mac OS SYS_TYPE or None if this isn't a mac. Front-end config """ - mac_ver = py_platform.mac_ver()[0] if not mac_ver: return None - return Architecture("macosx_%s_%s" % (Version(mac_ver).up_to(2), py_platform.machine())) @@ -113,11 +119,9 @@ def get_sys_type_from_config_file(): """ Should read in a sys_type from the config yaml file. This should be the first thing looked at since The user can specify that the architecture is a cray-xc40. A template yaml should be created when spack is installed. Similar to .spackconfig - """ - + """ spack_home_dir = os.environ["HOME"] + "/.spack" yaml_file = os.path.join(spack_home_dir, 'architecture.yaml') - try: config_dict = yaml.load(open(yaml_file)) # Fix this to have yaml.load() arch = config_dict['architecture'] @@ -131,7 +135,7 @@ def get_sys_type_from_config_file(): @memoized -def sys_type(): # This function is going to give me issues isn't it?? +def sys_type(): """Priority of gathering sys-type. 1. YAML file that the user specifies the name of the architecture. e.g Cray-XC40 or Cray-XC30 2. UNAME @@ -146,14 +150,18 @@ def sys_type(): # This function is going to give me issues isn't it?? get_sys_type_from_uname, get_sys_type_from_spack_globals, get_mac_sys_type] - - # TODO: Test for mac OSX system type but I'm sure it will be okay + + sys_type = None for func in functions: - sys_type = None sys_type = func() - if sys_type: - break + break + if sys_type is None: + return Architecture("unknown_arch") + + if not isinstance(sys_type, Architecture): + raise InvalidSysTypeError(sys_type) + return sys_type -- cgit v1.2.3-70-g09d2 From 51b69ef00b947f4cf1801358b1a5da413d0b21bc Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 21 Oct 2015 09:27:57 -0700 Subject: initial fetch on crayport --- lib/spack/spack/compiler.py | 2 +- lib/spack/spack/directives.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index e7d450ee8b..4ce6e3f11d 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -119,7 +119,7 @@ class Compiler(object): self.fc = check(fc) self.spec = cspec - self.module = module + self.modules = modules.split() diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 9297d6dac3..4bdc8772b8 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -252,7 +252,7 @@ def variant(pkg, name, default=False, description=""): """Define a variant for the package. Packager can specify a default value (on or off) as well as a text description.""" - default = bool(default) + default = default description = str(description).strip() if not re.match(spack.spec.identifier_re, name): -- cgit v1.2.3-70-g09d2 From 9b387e7682c22b74661e3363442adcfb569d8680 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 21 Oct 2015 11:09:05 -0700 Subject: Added strategy method in init --- lib/spack/spack/architecture.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 8460b0de1e..3968b82124 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -57,18 +57,13 @@ class Architecture(object): back = None defaults to None. Should be the back-end architecture of the machine If no arguments are given it will return an empty dictionary + Uses the _add_compiler_strategy(front, back) to create the dictionary """ - _names = [] - _names.append(front) - _names.append(back) - - def _add_compiler_strategy(names): - """ Create a dictionary of {'arch-name': 'strategy'} - This will tell Spack whether to look in the $PATH - or $MODULES location for compilers - Else it will return No Strategy - """ - #TODO: Look for other strategies + + def _add_compiler_strategy(front,back): + names = [] + names.append(front) + names.append(back) d = {} for n in names: if n: @@ -80,7 +75,8 @@ class Architecture(object): d[n] = 'No Strategy' return d - self.arch_dict = _add_compiler_strategy(_names) + self.arch_dict = _add_compiler_strategy(front, back) + def get_sys_type_from_spack_globals(): """Return the SYS_TYPE from spack globals, or None if it isn't set.""" -- cgit v1.2.3-70-g09d2 From a89abb435f288c2864d9a21089b20f6eaac5d98b Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 21 Oct 2015 11:32:59 -0700 Subject: Changed structure of class, add compiler strategy is a method and can create a dict --- lib/spack/spack/architecture.py | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 3968b82124..7c1bdfb20f 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -48,6 +48,21 @@ class Architecture(object): If it is on a Cray architecture it should look in modules. If it is anything else search $PATH. """ + def add_compiler_strategy(self, front,back): + names = [] + names.append(front) + names.append(back) + d = {} + for n in names: + if n: + if 'cray' in n.lower(): + d[n] = "MODULES" + elif 'linux' in n.lower(): + d[n] = "PATH" + else: + d[n] = 'No Strategy' + return d + def __init__(self, front=None, back=None): """ Constructor for the architecture class. It will create a list from the given arguments and iterate through that list. It will then create a dictionary of {arch_name : strategy} @@ -59,23 +74,9 @@ class Architecture(object): If no arguments are given it will return an empty dictionary Uses the _add_compiler_strategy(front, back) to create the dictionary """ - - def _add_compiler_strategy(front,back): - names = [] - names.append(front) - names.append(back) - d = {} - for n in names: - if n: - if 'cray' in n.lower(): - d[n] = "MODULES" - elif 'linux' in n.lower(): - d[n] = "PATH" - else: - d[n] = 'No Strategy' - return d - - self.arch_dict = _add_compiler_strategy(front, back) + self.front = front + self.back = back + self.arch_dict = self.add_compiler_strategy(front, back) def get_sys_type_from_spack_globals(): -- cgit v1.2.3-70-g09d2 From 38508c5a3f294f730b31e209dfa90545e1920588 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 22 Oct 2015 12:02:26 -0700 Subject: Created a control flow logic that will loop through the strategies and find compilers using that. TODO: Need to find a way to locate their executables --- lib/spack/spack/cmd/compiler.py | 51 +++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 2a64dc914e..cbe3aba864 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -29,6 +29,8 @@ from llnl.util.tty.color import colorize from llnl.util.tty.colify import colify from llnl.util.lang import index_by +import spack.architecture +import spack.compiler import spack.compilers import spack.spec import spack.config @@ -36,13 +38,12 @@ from spack.util.environment import get_path from spack.spec import CompilerSpec description = "Manage compilers" +ARCHITECTURE = spack.architecture.sys_type() def setup_parser(subparser): - sp = subparser.add_subparsers( - metavar='SUBCOMMAND', dest='compiler_command') + sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='compiler_command') - update_parser = sp.add_parser( - 'add', help='Add compilers to the Spack configuration.') + update_parser = sp.add_parser('add', help='Add compilers to the Spack configuration.') update_parser.add_argument('add_paths', nargs=argparse.REMAINDER) remove_parser = sp.add_parser('remove', help='remove compiler') @@ -55,23 +56,33 @@ def setup_parser(subparser): def compiler_add(args): - """Search either $PATH or a list of paths for compilers and add them + """Search either $PATH or a list of paths OR MODULES for compilers and add them to Spack's configuration.""" - paths = args.add_paths - if not paths: - paths = get_path('PATH') - - compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) - if c.spec not in spack.compilers.all_compilers()] - - if compilers: - spack.compilers.add_compilers_to_config('user', *compilers) - n = len(compilers) - tty.msg("Added %d new compiler%s to %s" % ( - n, 's' if n > 1 else '', spack.config.get_config_scope_filename('user', 'compilers'))) - colify(reversed(sorted(c.spec for c in compilers)), indent=4) - else: - tty.msg("Found no new compilers") + + strategies = ARCHITECTURE.strategy() + + for strategy in strategies: + if strategy == 'PATH': + paths = args.add_paths # This might be a parser method. Parsing method to add_paths + if not paths: + paths = get_path('PATH') + + compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) + if c.spec not in spack.compilers.all_compilers()] + + elif strategy == "MODULES": + from spack.compilers.cray import Cray + compilers = Cray.find_in_modules() + #TODO: Find a way to locate the executables + + if compilers: + spack.compilers.add_compilers_to_config('user', *compilers) + n = len(compilers) + tty.msg("Added %d new compiler%s to %s" % ( + n, 's' if n > 1 else '', spack.config.get_config_scope_filename('user', 'compilers'))) + colify(reversed(sorted(c.spec for c in compilers)), indent=4) + else: + tty.msg("Found no new compilers") def compiler_remove(args): -- cgit v1.2.3-70-g09d2 From 09597fe8dccbd7d49acf1b3198f24ab928874cdb Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 30 Oct 2015 09:44:28 -0700 Subject: updated the executible to return stderr when specified. Added load_module to build_environment.py, loads target --- lib/spack/spack/build_environment.py | 36 +++++++++++++++++++++++++++++------- lib/spack/spack/util/executable.py | 21 ++++++++++++++++----- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 68388958f5..191e858735 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -86,6 +86,28 @@ class MakeExecutable(Executable): return super(MakeExecutable, self).__call__(*args, **kwargs) +def load_module(mod): + """Takes a module name and removes modules until it is possible to + load that module. It then loads the provided module. Depends on the + modulecmd implementation of modules used in cray and lmod. + """ + #Create an executable of the module command that will output python code + modulecmd = which('modulecmd') + modulecmd.add_default_arg('python') + + # Read the module and remove any conflicting modules + # We do this without checking that they are already installed + # for ease of programming because unloading a module that is not + # loaded does nothing. + text = modulecmd('show', mod, return_oe=True).split() + for i, word in enumerate(text): + if word == 'conflict': + exec(compile(modulecmd('unload', text[i+1], return_oe=True), '', 'exec')) + # Load the module now that there are no conflicts + load = modulecmd('load', mod, return_oe=True) + exec(compile(load, '', 'exec')) + + def set_compiler_environment_variables(pkg): assert(pkg.spec.concrete) compiler = pkg.compiler @@ -108,11 +130,9 @@ def set_compiler_environment_variables(pkg): os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) - if compiler.PrgEnv: - os.environ['SPACK_CRAYPE'] = compiler.PrgEnv - os.environ['SPACK_COMP_MODULE'] = compiler.module - - + if compiler.modules: + for mod in compiler.modules: + load_module(mod) def set_build_environment_variables(pkg): @@ -163,8 +183,10 @@ def set_build_environment_variables(pkg): pcdir = join_path(p, libdir, 'pkgconfig') if os.path.isdir(pcdir): pkg_config_dirs.append(pcdir) - path_set("PKG_CONFIG_PATH", pkg_config_dirs) + path_put_first("PKG_CONFIG_PATH", pkg_config_dirs) + if pkg.spec.architecture.compiler_strategy.lower() == 'module': + load_module(pkg.spec.architecture.module_name) def set_module_variables_for_package(pkg): """Populate the module scope of install() with some useful functions. @@ -239,8 +261,8 @@ def get_rpaths(pkg): def setup_package(pkg): """Execute all environment setup routines.""" - set_compiler_environment_variables(pkg) set_build_environment_variables(pkg) + set_compiler_environment_variables(pkg) set_module_variables_for_package(pkg) # Allow dependencies to set up environment as well. diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index d1dfb62ffb..15354089ac 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -56,7 +56,11 @@ class Executable(object): def __call__(self, *args, **kwargs): """Run the executable with subprocess.check_output, return output.""" - return_output = kwargs.get("return_output", False) + # Return oe returns a combined stream, setting both output and error + # without setting return oe returns them concatenated by a double line break + return_oe = kwargs.get("return_oe", False) + return_output = True if return_oe else kwargs.get("return_output", False) + return_error = True if return_oe else kwargs.get("return_error", False) fail_on_error = kwargs.get("fail_on_error", True) ignore_errors = kwargs.get("ignore_errors", ()) @@ -95,8 +99,8 @@ class Executable(object): proc = subprocess.Popen( cmd, stdin=input, - stderr=error, - stdout=subprocess.PIPE if return_output else output) + stdout=subprocess.PIPE if return_output else output, + stderr=subprocess.STDOUT if return_oe else (subprocess.PIPE if return_error else error)) out, err = proc.communicate() self.returncode = proc.returncode @@ -104,8 +108,15 @@ class Executable(object): if fail_on_error and rc != 0 and (rc not in ignore_errors): raise ProcessError("Command exited with status %d:" % proc.returncode, cmd_line) - if return_output: - return out + # Return out or error if specified. Return combined stream if requested, + # otherwise return them concatenated by double line break if both requested. + if return_output or return_error: + if return_oe or not return_error: + return out + elif return_output: + return out+'\n\n'+err + else: + return err except OSError, e: raise ProcessError( -- cgit v1.2.3-70-g09d2 From 382d8478bf325099582b4814e0d71ff8522696aa Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 30 Oct 2015 10:23:33 -0700 Subject: prototype of new architecture concretization saved as new_concretize_architecture in concretize.py --- lib/spack/spack/concretize.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 66002492cb..c5041d67be 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -122,6 +122,34 @@ class DefaultConcretizer(object): return True # changed + def new_concretize_architecture(self, spec): + """If the spec already has an architecture and it is a an architecture type, + return. Otherwise, if it has an architecture that is a string type, generate an + architecture based on that type. If it has no architecture and the root of the + DAG has an architecture, then use that. Otherwise, take the system's default + architecture. + """ + if spec.architecture is not None: + if isinstance(spec.architecture,spack.architecture.Target): + return False + else: + arch = spack.architecture.sys_type() + spec.architecture = arch.target(spec.architecture) + return True #changed + + if spec.root.architecture: + if isinstance(spec.root.architecture,spack.architecture.Target): + spec.architecture = spec.root.architecture + else: + arch = spack.architecture.sys_type() + spec.architecture = arch.target(spec.root.architecture) + else: + arch = spack.architecture.sys_type() + spec.architecture = arch.target('default') + + return True #changed + + def concretize_variants(self, spec): """If the spec already has variants filled in, return. Otherwise, add the default variants from the package specification. -- cgit v1.2.3-70-g09d2 From 7ab921ff02a7d0a05287e4a49738ec9c51361ef0 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 30 Oct 2015 14:46:26 -0700 Subject: Changed architecture class and added class Target --- lib/spack/spack/architecture.py | 137 ++++++++++++++++++++++++---------------- 1 file changed, 83 insertions(+), 54 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 7c1bdfb20f..ea1f98e06e 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -23,11 +23,16 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os +import imp import platform as py_platform +import inspect -from llnl.util.lang import memoized +from llnl.util.lang import memoized, list_modules +from llnl.util.filesystem import join_path +import llnl.util.tty as tty import spack +from spack.util.naming import mod_to_class import spack.error as serr from spack.version import Version from external import yaml @@ -42,41 +47,55 @@ class NoSysTypeError(serr.SpackError): super(NoSysTypeError, self).__init__("Could not determine sys_type for this machine.") +class Target(object): + """ This is the processor type e.g. cray-ivybridge """ + # Front end or back end target. Target needs to know which one this is + # Should autodetect from the machine + # features of a target + # - a module name + # -a compiler finding strategy + # -a name + # architecture classes handling the aliasing for front-end, back-end and default + + def __init__(self,name, module_name=None): + self.name = name # case of cray "ivybridge but if it's x86_64 + self.module_name = module_name # craype-ivybridge + + def compiler_strategy(self): + if self.module_name: # If there is a module_name given then use MODULES + return "MODULES" + else: + return "PATH" + class Architecture(object): - """ Architecture class that contains a dictionary of architecture name and compiler search strategy methods. - The idea is to create an object that Spack can interact with and know how to search for the compiler - If it is on a Cray architecture it should look in modules. If it is anything else search $PATH. + """ Abstract class that each type of Architecture will subclass. Will return a instance of it once it + is returned """ - - def add_compiler_strategy(self, front,back): - names = [] - names.append(front) - names.append(back) - d = {} - for n in names: - if n: - if 'cray' in n.lower(): - d[n] = "MODULES" - elif 'linux' in n.lower(): - d[n] = "PATH" - else: - d[n] = 'No Strategy' - return d - - def __init__(self, front=None, back=None): - """ Constructor for the architecture class. It will create a list from the given arguments and iterate - through that list. It will then create a dictionary of {arch_name : strategy} - Takes in two parameters: - front = None defaults to None. Should be the front-end architecture of the machine - back = None defaults to None. Should be the back-end architecture of the machine + priority = None # Subclass needs to set this number. This controls order in which arch is detected. + front = None + back = None + default_front = None # The default front end target. On cray sandybridge + default_back = None # The default back end target. On cray ivybridge + + def __init__(self, name): + self.targets = {} + self.name = name + + def add_target(self, name, target): + self.targets[name] = target - If no arguments are given it will return an empty dictionary - Uses the _add_compiler_strategy(front, back) to create the dictionary + + @classmethod + def detect(self): + """ Subclass is responsible for implementing this method. + Returns True if the architecture detects if it is the current architecture + and False if it's not. """ - self.front = front - self.back = back - self.arch_dict = self.add_compiler_strategy(front, back) + raise NotImplementedError() + + def __str__(self): + return self.name def get_sys_type_from_spack_globals(): @@ -84,9 +103,9 @@ def get_sys_type_from_spack_globals(): if not hasattr(spack, "sys_type"): return None elif hasattr(spack.sys_type, "__call__"): - return Architecture(spack.sys_type()) #If in __init__.py there is a sys_type() then call that + return spack.sys_type() #If in __init__.py there is a sys_type() then call that else: - return Architecture(spack.sys_type) # Else use the attributed which defaults to None + return spack.sys_type # Else use the attributed which defaults to None # This is livermore dependent. Hard coded for livermore @@ -102,15 +121,19 @@ def get_mac_sys_type(): mac_ver = py_platform.mac_ver()[0] if not mac_ver: return None - return Architecture("macosx_%s_%s" % (Version(mac_ver).up_to(2), py_platform.machine())) + return "macosx_%s_%s" % (Version(mac_ver).up_to(2), py_platform.machine()) def get_sys_type_from_uname(): """ Returns a sys_type from the uname argument Front-end config """ - return Architecture(os.uname()[0]) - + try: + arch_proc = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE) + arch, _ = arch_proc.communicate() + return arch.strip() + except: + return None def get_sys_type_from_config_file(): """ Should read in a sys_type from the config yaml file. This should be the first thing looked at since @@ -131,34 +154,40 @@ def get_sys_type_from_config_file(): return None +@memoized +def all_architectures(): + modules = [] + for name in list_modules(spack.arch_path): + mod_name = 'spack.architectures.' + name + path = join_path(spack.arch_path, name) + ".py" + mod = imp.load_source(mod_name, path) + class_name = mod_to_class(name) + if not hasattr(mod, class_name): + tty.die('No class %s defined in %s' % (class_name, mod_name)) + cls = getattr(mod, class_name) + if not inspect.isclass(cls): + tty.die('%s.%s is not a class' % (mod_name, class_name)) + + modules.append(cls) + + return modules + @memoized def sys_type(): """Priority of gathering sys-type. 1. YAML file that the user specifies the name of the architecture. e.g Cray-XC40 or Cray-XC30 2. UNAME 3. GLOBALS - 4. MAC OSX + 4. MAC OSX Yaml should be a priority here because we want the user to be able to specify the type of architecture to use. If there is no yaml present then it should move on to the next function and stop immediately once it gets a arch name """ # Try to create an architecture object using the config file FIRST - functions = [get_sys_type_from_config_file, - get_sys_type_from_uname, - get_sys_type_from_spack_globals, - get_mac_sys_type] - - sys_type = None - for func in functions: - sys_type = func() - if sys_type: - break + architecture_list = all_architectures() + architecture_list.sort(key = lambda a: a.priority) - if sys_type is None: - return Architecture("unknown_arch") - - if not isinstance(sys_type, Architecture): - raise InvalidSysTypeError(sys_type) - - return sys_type + for arch in architecture_list: + if arch.detect(): + return arch() -- cgit v1.2.3-70-g09d2 From d177184777591d21cc6a59771ed6f817960394f5 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 30 Oct 2015 15:12:29 -0700 Subject: added target method to architecture.py and minor cleanup --- lib/spack/spack/architecture.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index ea1f98e06e..f04fda2ee9 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -58,9 +58,10 @@ class Target(object): # architecture classes handling the aliasing for front-end, back-end and default def __init__(self,name, module_name=None): - self.name = name # case of cray "ivybridge but if it's x86_64 + self.name = name # case of cray "ivybridge" but if it's x86_64 self.module_name = module_name # craype-ivybridge + @property def compiler_strategy(self): if self.module_name: # If there is a module_name given then use MODULES return "MODULES" @@ -73,10 +74,9 @@ class Architecture(object): """ priority = None # Subclass needs to set this number. This controls order in which arch is detected. - front = None - back = None - default_front = None # The default front end target. On cray sandybridge - default_back = None # The default back end target. On cray ivybridge + front-end = None + back-end = None + default = None # The default back end target. On cray ivybridge def __init__(self, name): self.targets = {} @@ -85,7 +85,19 @@ class Architecture(object): def add_target(self, name, target): self.targets[name] = target - + def target(self, name): + """This is a getter method for the target dictionary that handles defaulting based + on the values provided by default, front-end, and back-end. This can be overwritten + by a subclass for which we want to provide further aliasing options. + """ + if name == 'default': + name = default + elif name == 'front_end': + name = front-end + elif name == 'back_end': + name = back-end + return self.targets[name] + @classmethod def detect(self): """ Subclass is responsible for implementing this method. -- cgit v1.2.3-70-g09d2 From 6e560703862794632176733a1d063550215dc573 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 30 Oct 2015 15:15:36 -0700 Subject: improved aliasing in target method in architecture.py --- lib/spack/spack/architecture.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index f04fda2ee9..3f38540c0e 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -92,9 +92,9 @@ class Architecture(object): """ if name == 'default': name = default - elif name == 'front_end': + elif name == 'front_end' or name == 'fe': name = front-end - elif name == 'back_end': + elif name == 'back_end' or name == 'be': name = back-end return self.targets[name] -- cgit v1.2.3-70-g09d2 From db0695e46a6c6fd4d2ac10dba04f7feb18c25a39 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 30 Oct 2015 15:57:00 -0700 Subject: architectures folder where the Architecture subclasses reside --- lib/spack/spack/architectures/__init__.py | 0 lib/spack/spack/architectures/cray.py | 17 +++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 lib/spack/spack/architectures/__init__.py create mode 100644 lib/spack/spack/architectures/cray.py diff --git a/lib/spack/spack/architectures/__init__.py b/lib/spack/spack/architectures/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/spack/spack/architectures/cray.py b/lib/spack/spack/architectures/cray.py new file mode 100644 index 0000000000..e6d6d84922 --- /dev/null +++ b/lib/spack/spack/architectures/cray.py @@ -0,0 +1,17 @@ +import os + +from spack.architecture import Architecture + +class Cray(Architecture): + priority = 20 + front_end = None + back_end = None + default = None + + def __init__(self): + super(Cray, self).__init__('cray') + + @classmethod + def detect(self): + return os.path.exists('/opt/cray/craype') + -- cgit v1.2.3-70-g09d2 From 2d87bb92edb95cf1c9ec7d58f5d8a34e44bd11a4 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 30 Oct 2015 15:58:20 -0700 Subject: Changed front-end and back-end to front_end and back_end to avoid error --- lib/spack/spack/architecture.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 3f38540c0e..f488b65cc6 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -74,8 +74,8 @@ class Architecture(object): """ priority = None # Subclass needs to set this number. This controls order in which arch is detected. - front-end = None - back-end = None + front_end = None + back_end = None default = None # The default back end target. On cray ivybridge def __init__(self, name): -- cgit v1.2.3-70-g09d2 From e39586c81da152e8d02fd26bf48c66e00e26519a Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 30 Oct 2015 15:58:49 -0700 Subject: Reverted back all architecture way of finding modules --- lib/spack/spack/cmd/compiler.py | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index cbe3aba864..3e86928977 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -38,7 +38,6 @@ from spack.util.environment import get_path from spack.spec import CompilerSpec description = "Manage compilers" -ARCHITECTURE = spack.architecture.sys_type() def setup_parser(subparser): sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='compiler_command') @@ -59,30 +58,23 @@ def compiler_add(args): """Search either $PATH or a list of paths OR MODULES for compilers and add them to Spack's configuration.""" - strategies = ARCHITECTURE.strategy() - for strategy in strategies: - if strategy == 'PATH': - paths = args.add_paths # This might be a parser method. Parsing method to add_paths - if not paths: - paths = get_path('PATH') - - compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) - if c.spec not in spack.compilers.all_compilers()] - - elif strategy == "MODULES": - from spack.compilers.cray import Cray - compilers = Cray.find_in_modules() - #TODO: Find a way to locate the executables - - if compilers: - spack.compilers.add_compilers_to_config('user', *compilers) - n = len(compilers) - tty.msg("Added %d new compiler%s to %s" % ( - n, 's' if n > 1 else '', spack.config.get_config_scope_filename('user', 'compilers'))) - colify(reversed(sorted(c.spec for c in compilers)), indent=4) - else: - tty.msg("Found no new compilers") + paths = args.add_paths # This might be a parser method. Parsing method to add_paths + if not paths: + paths = get_path('PATH') + + compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) + if c.spec not in spack.compilers.all_compilers()] + + + if compilers: + spack.compilers.add_compilers_to_config('user', *compilers) + n = len(compilers) + tty.msg("Added %d new compiler%s to %s" % ( + n, 's' if n > 1 else '', spack.config.get_config_scope_filename('user', 'compilers'))) + colify(reversed(sorted(c.spec for c in compilers)), indent=4) + else: + tty.msg("Found no new compilers") def compiler_remove(args): -- cgit v1.2.3-70-g09d2 From 9a91da9ccd8044e147a416fcfa9b16405ef22b3d Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 30 Oct 2015 15:59:28 -0700 Subject: Added arch_path to list of modules path --- lib/spack/spack/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index caa09eb6e0..0f23f61614 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -37,6 +37,7 @@ etc_path = join_path(prefix, "etc") lib_path = join_path(prefix, "lib", "spack") build_env_path = join_path(lib_path, "env") module_path = join_path(lib_path, "spack") +arch_path = join_path(module_path, 'architectures') compilers_path = join_path(module_path, "compilers") test_path = join_path(module_path, "test") hooks_path = join_path(module_path, "hooks") -- cgit v1.2.3-70-g09d2 From eb2cf1698fa8cd606a8b80bcb39de2ee0b724c69 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 2 Nov 2015 11:08:08 -0800 Subject: Fixed some issues with naming --- lib/spack/spack/architecture.py | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index f488b65cc6..442180242b 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -49,13 +49,6 @@ class NoSysTypeError(serr.SpackError): class Target(object): """ This is the processor type e.g. cray-ivybridge """ - # Front end or back end target. Target needs to know which one this is - # Should autodetect from the machine - # features of a target - # - a module name - # -a compiler finding strategy - # -a name - # architecture classes handling the aliasing for front-end, back-end and default def __init__(self,name, module_name=None): self.name = name # case of cray "ivybridge" but if it's x86_64 @@ -67,7 +60,8 @@ class Target(object): return "MODULES" else: return "PATH" - + + class Architecture(object): """ Abstract class that each type of Architecture will subclass. Will return a instance of it once it is returned @@ -85,17 +79,19 @@ class Architecture(object): def add_target(self, name, target): self.targets[name] = target + def target(self, name): """This is a getter method for the target dictionary that handles defaulting based on the values provided by default, front-end, and back-end. This can be overwritten by a subclass for which we want to provide further aliasing options. """ if name == 'default': - name = default + name = self.default elif name == 'front_end' or name == 'fe': - name = front-end + name = self.front_end elif name == 'back_end' or name == 'be': - name = back-end + name = self.back_end + return self.targets[name] @classmethod @@ -148,10 +144,7 @@ def get_sys_type_from_uname(): return None def get_sys_type_from_config_file(): - """ Should read in a sys_type from the config yaml file. This should be the first thing looked at since - The user can specify that the architecture is a cray-xc40. A template yaml should be created when spack - is installed. Similar to .spackconfig - """ + spack_home_dir = os.environ["HOME"] + "/.spack" yaml_file = os.path.join(spack_home_dir, 'architecture.yaml') try: -- cgit v1.2.3-70-g09d2 From 058e72d29c3cd934f91ba626392b25ebaa50e2cc Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 2 Nov 2015 11:08:55 -0800 Subject: Added default target and also front end and back end targets --- lib/spack/spack/architectures/cray.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/architectures/cray.py b/lib/spack/spack/architectures/cray.py index e6d6d84922..a79c916684 100644 --- a/lib/spack/spack/architectures/cray.py +++ b/lib/spack/spack/architectures/cray.py @@ -4,9 +4,9 @@ from spack.architecture import Architecture class Cray(Architecture): priority = 20 - front_end = None - back_end = None - default = None + front_end = 'sandybridge' + back_end = 'ivybridge' + default = os.environ["CRAY_CPU_TARGET"] def __init__(self): super(Cray, self).__init__('cray') -- cgit v1.2.3-70-g09d2 From 5ac974c9b2072631eab490cce8f2922420eef9e4 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 4 Nov 2015 12:50:22 -0800 Subject: Enforced that the architecture subclass cannot add a target that shares a name with a target alias --- lib/spack/spack/architecture.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 442180242b..890df9b1e5 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -77,9 +77,14 @@ class Architecture(object): self.name = name def add_target(self, name, target): - self.targets[name] = target - - + """Used by the architecture specific subclass to list available targets. Raises an error + if the architecture specifies a name that is reserved by spack as an alias. + """ + if name in ['front_end', 'fe', 'back_end', 'be', 'default']: + raise ValueError("%s is a spack reserved alias and cannot be the name of a target" % name) + self.targets[name] = target + + def target(self, name): """This is a getter method for the target dictionary that handles defaulting based on the values provided by default, front-end, and back-end. This can be overwritten -- cgit v1.2.3-70-g09d2 From 37260962e545366d0d882b205be807562c36f3b7 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 4 Nov 2015 12:57:29 -0800 Subject: changed some potential syntax errors and added a way for target to recognize class --- lib/spack/spack/architecture.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 442180242b..b251b82dcc 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -48,20 +48,29 @@ class NoSysTypeError(serr.SpackError): class Target(object): - """ This is the processor type e.g. cray-ivybridge """ + """ Target is the processor of the host machine. The host machine may have different front-end + and back-end targets, especially if it is a Cray machine. The target will have a name and + also the module_name (e.g craype-compiler). Targets will also recognize which architecture + they came from using the set_architecture method. Targets will have compiler finding strategies + """ + default_strategy = None # Can probably add a compiler path here def __init__(self,name, module_name=None): self.name = name # case of cray "ivybridge" but if it's x86_64 self.module_name = module_name # craype-ivybridge + def set_architecture(self, architecture): # Target should get the architecture class. + self.architecture = architecture + @property def compiler_strategy(self): - if self.module_name: # If there is a module_name given then use MODULES + if default_strategy: + return default_strategy + elif self.module_name: # If there is a module_name given then use MODULES return "MODULES" else: return "PATH" - class Architecture(object): """ Abstract class that each type of Architecture will subclass. Will return a instance of it once it is returned @@ -77,8 +86,8 @@ class Architecture(object): self.name = name def add_target(self, name, target): - self.targets[name] = target - + target.set_architecture(self) + self.targets[name] = target def target(self, name): """This is a getter method for the target dictionary that handles defaulting based @@ -163,7 +172,7 @@ def get_sys_type_from_config_file(): def all_architectures(): modules = [] for name in list_modules(spack.arch_path): - mod_name = 'spack.architectures.' + name + mod_name = 'spack.architectures' + name path = join_path(spack.arch_path, name) + ".py" mod = imp.load_source(mod_name, path) class_name = mod_to_class(name) -- cgit v1.2.3-70-g09d2 From 35532d6b0aaa428e1d8234513e9e887d08c3914c Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 4 Nov 2015 13:00:35 -0800 Subject: Changed cray architecture subclass to add proper targets for front at back end nodes --- lib/spack/spack/architectures/cray.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/spack/spack/architectures/cray.py b/lib/spack/spack/architectures/cray.py index a79c916684..420b7c589e 100644 --- a/lib/spack/spack/architectures/cray.py +++ b/lib/spack/spack/architectures/cray.py @@ -10,6 +10,11 @@ class Cray(Architecture): def __init__(self): super(Cray, self).__init__('cray') + # Back End compiler needs the proper target module loaded. + self.add_target('ivybridge','craype-ivybridge') + # Could switch to use modules and fe targets for front end + # Currently using compilers by path for front end. + self.add_target('sandybridge') @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From 9bf8e8573cff42581074ed9e492ab0e0bc6c7253 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 4 Nov 2015 13:08:48 -0800 Subject: generic linux architecture subclass --- lib/spack/spack/architectures/linux.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/spack/spack/architectures/linux.py diff --git a/lib/spack/spack/architectures/linux.py b/lib/spack/spack/architectures/linux.py new file mode 100644 index 0000000000..7238575660 --- /dev/null +++ b/lib/spack/spack/architectures/linux.py @@ -0,0 +1,17 @@ +import subprocess +from spack.architecture import Architecture + +class Linux(Architecture): + priority = 60 + front_end = "x86_64" + back_end = "x86_64" + default = "x86_64" + + def __init__(self): + super(Linux, self).__init__('linux') + + @classmethod + def detect(self): + arch = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE) + arch, _ = arch.communicate() + return 'x86_64' in arch.strip() -- cgit v1.2.3-70-g09d2 From 3a73ae1683c4e83791f273d2034a99824e81aeca Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 4 Nov 2015 13:12:11 -0800 Subject: Fixed the previous commit --- lib/spack/spack/architectures/cray.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/architectures/cray.py b/lib/spack/spack/architectures/cray.py index 420b7c589e..640a3933e0 100644 --- a/lib/spack/spack/architectures/cray.py +++ b/lib/spack/spack/architectures/cray.py @@ -1,20 +1,20 @@ import os -from spack.architecture import Architecture +from spack.architecture import Architecture, Target class Cray(Architecture): priority = 20 front_end = 'sandybridge' back_end = 'ivybridge' - default = os.environ["CRAY_CPU_TARGET"] + default = 'ivybridge' def __init__(self): super(Cray, self).__init__('cray') # Back End compiler needs the proper target module loaded. - self.add_target('ivybridge','craype-ivybridge') + self.add_target('ivybridge', Target('ivybridge','craype-ivybridge')) # Could switch to use modules and fe targets for front end # Currently using compilers by path for front end. - self.add_target('sandybridge') + self.add_target('sandybridge', Target('sandybridge')) @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From b61d554dc818c2514384b017c74dfa61c04a8c3a Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 4 Nov 2015 13:28:12 -0800 Subject: Fixed architecture.py file so it doesn't have the weird merge changes i.e <<>>>>>> 8b3f2ec1d117e1a8b206927f51db8684396c231b def target(self, name): """This is a getter method for the target dictionary that handles defaulting based on the values provided by default, front-end, and back-end. This can be overwritten -- cgit v1.2.3-70-g09d2 From 08729315c617b42e6fd1eaa1af4919aa52f96a0f Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 5 Nov 2015 09:21:56 -0800 Subject: Added bgq architecture subclass: may require additional functionality to support --- lib/spack/spack/architectures/bgq.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/spack/spack/architectures/bgq.py diff --git a/lib/spack/spack/architectures/bgq.py b/lib/spack/spack/architectures/bgq.py new file mode 100644 index 0000000000..d3d4446e09 --- /dev/null +++ b/lib/spack/spack/architectures/bgq.py @@ -0,0 +1,19 @@ +import os + +from spack.architecture import Architecture, Target + +class Bgq(Architecture): + priority = 30 + front_end = 'power7' + back_end = 'powerpc' + default = 'powerpc' + + def __init__(self): + super(Bgq, self).__init__('cray') + self.add_target('power7', Target('power7')) + self.add_target('powerpc', Target('powerpc')) + + @classmethod + def detect(self): + return os.path.exists('/bgsys') + -- cgit v1.2.3-70-g09d2 From 0fcb368f478621b3eb8faf2b812018d43c46ffef Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 5 Nov 2015 13:42:50 -0800 Subject: Adding adios package to spack's package list --- var/spack/packages/adios/package.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/spack/packages/adios/package.py diff --git a/var/spack/packages/adios/package.py b/var/spack/packages/adios/package.py new file mode 100644 index 0000000000..5f298fc6b5 --- /dev/null +++ b/var/spack/packages/adios/package.py @@ -0,0 +1,28 @@ +from spack import * + +class Adios(Package): + """The Adaptable IO System (ADIOS) provides a simple, + flexible way for scientists to describe the data in their code that may need to be written, + read, or processed outside of the running simulation + """ + + homepage = "http://www.olcf.ornl.gov/center-projects/adios/" + url = "http://users.nccs.gov/~pnorbert/adios-1.9.0.tar.gz" + + version('1.9.0', 'dbf5cb10e32add2f04c9b4052b7ffa76') + + # Lots of setting up here for this package + # module swap PrgEnv-intel PrgEnv-$COMP + # module load cray-netcdf/4.3.3.1 + # module load cray-hdf5/1.8.14 + # module load python/2.7.10 + depends_on('mxml') + + def install(self, spec, prefix): + configure_args = ["--prefix=%s" % prefix, "--with-mxml=%s" % spec['mxml'].prefix, + "--with-hdf5=%s" % spec['hdf5'].prefix, "--with-netcdf=%s" % os.environ['NETCDF_DIR'], + "--with-infiniband=no"] + + configure(*configure_args) + make() + make("install") -- cgit v1.2.3-70-g09d2 From e0498ce54ad15787db3c4f187902b424c33013d7 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 5 Nov 2015 13:43:11 -0800 Subject: mxml is adios's package dependency --- var/spack/packages/mxml/package.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 var/spack/packages/mxml/package.py diff --git a/var/spack/packages/mxml/package.py b/var/spack/packages/mxml/package.py new file mode 100644 index 0000000000..fc32b56323 --- /dev/null +++ b/var/spack/packages/mxml/package.py @@ -0,0 +1,24 @@ +from spack import * + +class Mxml(Package): + """Mini-XML is a small XML library that you can use to read and write XML + and XML-like data files in your application without requiring large + non-standard libraries""" + + homepage = "http://www.msweet.org" + url = "http://www.msweet.org/files/project3/mxml-2.9.tar.gz" + + version('2.9', 'e21cad0f7aacd18f942aa0568a8dee19') + version('2.8', 'd85ee6d30de053581242c4a86e79a5d2') + version('2.7', '76f2ae49bf0f5745d5cb5d9507774dc9') + version('2.6', '68977789ae64985dddbd1a1a1652642e') + version('2.5', 'f706377fba630b39fa02fd63642b17e5') + + # module swap PrgEnv-intel PrgEnv-$COMP (Can use whatever compiler you want to use) + # Case statement to change CC and CXX flags + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, "--disable-shared") + make() + make("install") + -- cgit v1.2.3-70-g09d2 From 4ed22ad932b440eb6088e31f9bc317aef56f83f1 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 18 Sep 2015 10:38:47 -0700 Subject: partial commit of cflags work --- lib/spack/env/cc | 12 +++-- lib/spack/spack/build_environment.py | 11 +++++ lib/spack/spack/compiler.py | 25 +++++++++- lib/spack/spack/compilers/__init__.py | 16 ++++-- lib/spack/spack/test/__init__.py | 3 +- lib/spack/spack/test/cflags.py | 91 +++++++++++++++++++++++++++++++++++ 6 files changed, 147 insertions(+), 11 deletions(-) create mode 100644 lib/spack/spack/test/cflags.py diff --git a/lib/spack/env/cc b/lib/spack/env/cc index fa85bb595e..b39d91b5f0 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -50,6 +50,8 @@ SPACK_SHORT_SPEC" # The compiler input variables are checked for sanity later: # SPACK_CC, SPACK_CXX, SPACK_F77, SPACK_FC +# The default compiler flags are passed from the config files: +# SPACK_CFLAGS, SPACK_CXXFLAGS, SPACK_FFLAGS, SPACK_LDFLAGS # Debug flag is optional; set to true for debug logging: # SPACK_DEBUG # Test command is used to unit test the compiler script. @@ -87,19 +89,19 @@ done command=$(basename "$0") case "$command" in cc|gcc|c89|c99|clang|xlc) - command="$SPACK_CC" + command="$SPACK_CC $SPACK_CFLAGS" language="C" ;; c++|CC|g++|clang++|xlC) - command="$SPACK_CXX" + command="$SPACK_CXX SPACK_CXXFLAGS" language="C++" ;; f77|xlf) - command="$SPACK_F77" + command="$SPACK_F77 $SPACK_FFLAGS" language="Fortran 77" ;; fc|f90|f95|xlf90) - command="$SPACK_FC" + command="$SPACK_FC $SPACK_FFLAGS" language="Fortran 90" ;; cpp) @@ -107,6 +109,7 @@ case "$command" in ;; ld) mode=ld + command+=" $LDFLAGS" ;; *) die "Unkown compiler: $command" @@ -116,6 +119,7 @@ esac # Finish setting up the mode. if [ -z "$mode" ]; then mode=ccld + command+=" $SPACK_LDFLAGS" for arg in "$@"; do if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then mode=vcheck diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index dac25d9940..afd987c702 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -103,6 +103,17 @@ def set_compiler_environment_variables(pkg): if compiler.fc: os.environ['SPACK_FC'] = compiler.fc + # Set SPACK compiler flags so our wrapper can add default flags + if compiler.cflags: + os.environ['SPACK_CFLAGS'] = compiler.cflags + if compiler.cxxflags: + os.environ['SPACK_CXXFLAGS'] = compiler.cxxflags + if compiler.cflags: + os.environ['SPACK_FFLAGS'] = compiler.fflags + if compiler.ldflags: + os.environ['SPACK_LDFLAGS'] = compiler.ldflags + + os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 1e800a8979..83221d6ac0 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -98,7 +98,7 @@ class Compiler(object): cxx11_flag = "-std=c++11" - def __init__(self, cspec, cc, cxx, f77, fc): + def __init__(self, cspec, cc, cxx, f77, fc, cflags=None, cxxflags=None, fflags=None, ldflags=None): def check(exe): if exe is None: return None @@ -110,6 +110,11 @@ class Compiler(object): self.f77 = check(f77) self.fc = check(fc) + self.cflags = cflags + self.cxxflags = cxxflags + self.fflags = fflags + self.ldflags = ldflags + self.spec = cspec @@ -254,6 +259,24 @@ class Compiler(object): return list(compilers.values()) + def update_flags(self,c=None,cxx=None,f=None,ld=None): + """Update any flag values provided. Cannot be used to erase values""" + if c: + self.cflags=c + if cxx: + self.cxxflags=cxx + if f: + self.fflags=f + if ld: + self.ldflags=ld + + def erase_flags(self): + """Erase the flag settings""" + self.cflags=None + self.cxxflags=None + self.fflags=None + self.ldflags=None + def __repr__(self): """Return a string represntation of the compiler toolchain.""" diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index b7b021a1ac..62e8b6b172 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -44,6 +44,7 @@ from spack.util.environment import get_path _imported_compilers_module = 'spack.compilers' _required_instance_vars = ['cc', 'cxx', 'f77', 'fc'] +_optional_flag_vars = ['cflags', 'cxxflags', 'fflags', 'ldflags'] _default_order = ['gcc', 'intel', 'pgi', 'clang', 'xlc'] @@ -163,7 +164,7 @@ def all_compilers(): @_auto_compiler_spec def find(compiler_spec): """Return specs of available compilers that match the supplied - compiler spec. Return an list if nothing found.""" + compiler spec. Return an empty list if nothing found.""" return [c for c in all_compilers() if c.satisfies(compiler_spec)] @@ -181,15 +182,20 @@ def compilers_for_spec(compiler_spec): raise InvalidCompilerConfigurationError(cspec) cls = class_for_compiler_name(cspec.name) - compiler_paths = [] + compiler_params = [] for c in _required_instance_vars: compiler_path = items[c] if compiler_path != "None": - compiler_paths.append(compiler_path) + compiler_params.append(compiler_path) else: - compiler_paths.append(None) + compiler_params.append(None) - return cls(cspec, *compiler_paths) + for c in _optional_flag_vars: + if c not in items: + items[c]=None + compiler_params.append(items[c]) + + return cls(cspec, *compiler_params) matches = find(compiler_spec) return [get_compiler(cspec) for cspec in matches] diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index 0f776bfea4..2c4517d343 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -59,7 +59,8 @@ test_names = ['versions', 'configure_guess', 'unit_install', 'lock', - 'database'] + 'database', + 'cflags'] def list_tests(): diff --git a/lib/spack/spack/test/cflags.py b/lib/spack/spack/test/cflags.py new file mode 100644 index 0000000000..18fc643d7f --- /dev/null +++ b/lib/spack/spack/test/cflags.py @@ -0,0 +1,91 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +import os +import unittest +import shutil +import tempfile + +from llnl.util.filesystem import * + +import spack +from spack.stage import Stage +from spack.fetch_strategy import URLFetchStrategy +from spack.directory_layout import YamlDirectoryLayout +from spack.util.executable import which +from spack.test.mock_packages_test import * +from spack.test.mock_repo import MockArchive + + +class CflagsTest(MockPackagesTest): + """Tests install and uninstall on a trivial package.""" + + def setUp(self): + super(CflagsTest, self).setUp() + + # create a simple installable package directory and tarball + self.repo = MockArchive() + + # We use a fake package, so skip the checksum. + spack.do_checksum = False + + # Use a fake install directory to avoid conflicts bt/w + # installed pkgs and mock packages. + self.tmpdir = tempfile.mkdtemp() + self.orig_layout = spack.install_layout + spack.install_layout = YamlDirectoryLayout(self.tmpdir) + + + def tearDown(self): + super(CflagsTest, self).tearDown() + + if self.repo.stage is not None: + self.repo.stage.destroy() + + # Turn checksumming back on + spack.do_checksum = True + + # restore spack's layout. + spack.install_layout = self.orig_layout + shutil.rmtree(self.tmpdir, ignore_errors=True) + + + def test_compiler_calls(self): + # Get a basic concrete spec for the trivial install package. + spec = Spec('cflags_test_package') + spec.concretize() + self.assertTrue(spec.concrete) + + # Get the package + pkg = spack.db.get(spec) + + # Fake the URL for the package so it downloads from a file. + pkg.fetcher = URLFetchStrategy(self.repo.url) + + try: + pkg.do_install() + pkg.do_uninstall() + except Exception, e: + pkg.remove_prefix() + raise -- cgit v1.2.3-70-g09d2 From f9c8c4d216f8e2357f1b81afc40665d0323a816e Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 23 Sep 2015 12:58:22 -0700 Subject: partial commit to merge database --- lib/spack/env/cc | 16 ++++++++++------ lib/spack/spack/build_environment.py | 2 +- lib/spack/spack/spec.py | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 42 insertions(+), 9 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index b39d91b5f0..0bb723c237 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -89,19 +89,23 @@ done command=$(basename "$0") case "$command" in cc|gcc|c89|c99|clang|xlc) - command="$SPACK_CC $SPACK_CFLAGS" + command="$SPACK_CC" +# command="$SPACK_CC $SPACK_CFLAGS" language="C" ;; c++|CC|g++|clang++|xlC) - command="$SPACK_CXX SPACK_CXXFLAGS" + command="$SPACK_CXX" +# command="$SPACK_CXX SPACK_CXXFLAGS" language="C++" ;; f77|xlf) - command="$SPACK_F77 $SPACK_FFLAGS" + command="$SPACK_F77" +# command="$SPACK_F77 $SPACK_FFLAGS" language="Fortran 77" ;; fc|f90|f95|xlf90) - command="$SPACK_FC $SPACK_FFLAGS" + command="$SPACK_FC" +# command="$SPACK_FC $SPACK_FFLAGS" language="Fortran 90" ;; cpp) @@ -109,7 +113,7 @@ case "$command" in ;; ld) mode=ld - command+=" $LDFLAGS" + # command+=" $LDFLAGS" ;; *) die "Unkown compiler: $command" @@ -119,7 +123,7 @@ esac # Finish setting up the mode. if [ -z "$mode" ]; then mode=ccld - command+=" $SPACK_LDFLAGS" +# command+=" $SPACK_LDFLAGS" for arg in "$@"; do if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then mode=vcheck diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index afd987c702..252846196a 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -108,7 +108,7 @@ def set_compiler_environment_variables(pkg): os.environ['SPACK_CFLAGS'] = compiler.cflags if compiler.cxxflags: os.environ['SPACK_CXXFLAGS'] = compiler.cxxflags - if compiler.cflags: + if compiler.fflags: os.environ['SPACK_FFLAGS'] = compiler.fflags if compiler.ldflags: os.environ['SPACK_LDFLAGS'] = compiler.ldflags diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 7b79feb311..430cf9b66f 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1680,10 +1680,11 @@ class SpecParser(spack.parse.Parser): elif self.accept(DEP): if not specs: - self.last_token_error("Dependency has no package") + specs.append(self.empty_spec()) self.expect(ID) specs[-1]._add_dependency(self.spec()) - + for spec in specs: + print spec else: self.unexpected_token() except spack.parse.ParseError, e: @@ -1697,6 +1698,34 @@ class SpecParser(spack.parse.Parser): return self.compiler() + def empty_spec(self): + """Create a Null spec from which dependency constraints can be hung""" + spec = Spec.__new__(Spec) + spec.name = "any-pkg-name" +# spec.name = None + spec.versions = VersionList() + spec.variants = VariantMap(spec) + spec.architecture = None + spec.compiler = None + spec.dependents = DependencyMap() + spec.dependencies = DependencyMap() + + #Should we be able to add cflags eventually? + while self.next: + if self.accept(ON): + spec._add_variant(self.variant(), True) + + elif self.accept(OFF): + spec._add_variant(self.variant(), False) + + elif self.accept(PCT): + spec._set_compiler(self.compiler()) + + else: + break + + return spec + def spec(self): """Parse a spec out of the input. If a spec is supplied, then initialize and return it instead of creating a new one.""" -- cgit v1.2.3-70-g09d2 From 7989a7f903da149d81f8e6370a9ef8a4f64c45a8 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 23 Sep 2015 17:37:12 -0700 Subject: Headless specs and /hash spec specification --- lib/spack/spack/multimethod.py | 1 + lib/spack/spack/packages.py | 2 ++ lib/spack/spack/spec.py | 74 +++++++++++++++++++++++++++++++++++------- lib/spack/spack/virtual.py | 4 +++ 4 files changed, 70 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/multimethod.py b/lib/spack/spack/multimethod.py index 892619c6ac..a19a06826f 100644 --- a/lib/spack/spack/multimethod.py +++ b/lib/spack/spack/multimethod.py @@ -196,6 +196,7 @@ class when(object): class when(object): def __init__(self, spec): pkg = get_calling_module_name() +# self.spec = spack.spec.Spec(spec) self.spec = parse_anonymous_spec(spec, pkg) def __call__(self, method): diff --git a/lib/spack/spack/packages.py b/lib/spack/spack/packages.py index 2e3e95ca40..78a69a737d 100644 --- a/lib/spack/spack/packages.py +++ b/lib/spack/spack/packages.py @@ -153,6 +153,8 @@ class PackageDB(object): @memoized def exists(self, pkg_name): """Whether a package with the supplied name exists .""" + if pkg_name == "any-pkg-name": + return True return os.path.exists(self.filename_for_package_name(pkg_name)) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 430cf9b66f..572f13901f 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -108,6 +108,7 @@ import spack.parse import spack.error import spack.compilers as compilers +from spack.cmd.find import display_specs from spack.version import * from spack.util.string import * from spack.util.prefix import Prefix @@ -504,7 +505,7 @@ class Spec(object): @staticmethod def is_virtual(name): """Test if a name is virtual without requiring a Spec.""" - return not spack.db.exists(name) + return name != "any-pkg-name" and not spack.db.exists(name) @property @@ -820,6 +821,9 @@ class Spec(object): with requirements of its pacakges. See flatten() and normalize() for more details on this. """ + if self.name == "any-pkg-name": + raise SpecError("Attempting to concretize anonymous spec") + if self._concrete: return @@ -1255,7 +1259,7 @@ class Spec(object): return False # Otherwise, first thing we care about is whether the name matches - if self.name != other.name: + if self.name != other.name and self.name != "any-pkg-name" and other.name != "any-pkg-name": return False if self.versions and other.versions: @@ -1271,7 +1275,10 @@ class Spec(object): elif strict and (other.compiler and not self.compiler): return False - if not self.variants.satisfies(other.variants, strict=strict): + var_strict = strict + if self.name == "any-pkg-name" or other.name == "any-pkg-name": + var_strict = True + if not self.variants.satisfies(other.variants, strict=var_strict): return False # Architecture satisfaction is currently just string equality. @@ -1284,7 +1291,10 @@ class Spec(object): # If we need to descend into dependencies, do it, otherwise we're done. if deps: - return self.satisfies_dependencies(other, strict=strict) + deps_strict = strict + if self.name == "any-pkg-name" or other.name == "any-pkg-name": + deps_strict=True + return self.satisfies_dependencies(other, strict=deps_strict) else: return True @@ -1644,12 +1654,13 @@ class Spec(object): # # These are possible token types in the spec grammar. # -DEP, AT, COLON, COMMA, ON, OFF, PCT, EQ, ID = range(9) +HASH, DEP, AT, COLON, COMMA, ON, OFF, PCT, EQ, ID = range(10) class SpecLexer(spack.parse.Lexer): """Parses tokens that make up spack specs.""" def __init__(self): super(SpecLexer, self).__init__([ + (r'/', lambda scanner, val: self.token(HASH, val)), (r'\^', lambda scanner, val: self.token(DEP, val)), (r'\@', lambda scanner, val: self.token(AT, val)), (r'\:', lambda scanner, val: self.token(COLON, val)), @@ -1678,15 +1689,33 @@ class SpecParser(spack.parse.Parser): if self.accept(ID): specs.append(self.spec()) + elif self.accept(HASH): + specs.append(self.spec_by_hash()) + elif self.accept(DEP): if not specs: specs.append(self.empty_spec()) - self.expect(ID) - specs[-1]._add_dependency(self.spec()) - for spec in specs: - print spec + if self.accept(HASH): + specs[-1]._add_dependency(self.spec_by_hash()) + else: + self.expect(ID) + specs[-1]._add_dependency(self.spec()) + + elif self.accept(PCT): + specs.append(self.empty_spec()) + specs[-1]._set_compiler(self.compiler()) + + elif self.accept(ON): + specs.append(self.empty_spec()) + specs[-1]._add_variant(self.variant(), True) + + elif self.accept(OFF): + specs.append(self.empty_spec()) + specs[-1]._add_variant(self.variant(), False) + else: self.unexpected_token() + except spack.parse.ParseError, e: raise SpecParseError(e) @@ -1698,12 +1727,33 @@ class SpecParser(spack.parse.Parser): return self.compiler() + def spec_by_hash(self): + self.expect(ID) + + specs = spack.installed_db.query() + matches = [spec for spec in specs if + spec.dag_hash()[:len(self.token.value)] == self.token.value] + + if not matches: + tty.die("%s does not match any installed packages." %self.token.value) + + if len(matches) != 1: + tty.error("%s matches multiple installed packages:" %self.token.value) + print + display_specs(matches, long=True) + print + print "You can either:" + print " a) Use a more specific hash, or" + print " b) Specify the package by name." + sys.exit(1) + + return matches[0] + def empty_spec(self): """Create a Null spec from which dependency constraints can be hung""" spec = Spec.__new__(Spec) spec.name = "any-pkg-name" -# spec.name = None - spec.versions = VersionList() + spec.versions = VersionList(':') spec.variants = VariantMap(spec) spec.architecture = None spec.compiler = None @@ -1863,6 +1913,8 @@ def parse_anonymous_spec(spec_like, pkg_name): if isinstance(spec_like, str): try: anon_spec = Spec(spec_like) + if anon_spec.name != pkg_name: + raise SpecParseError(spack.parse.ParseError("","","anon spec created without proper name")) except SpecParseError: anon_spec = Spec(pkg_name + spec_like) if anon_spec.name != pkg_name: raise ValueError( diff --git a/lib/spack/spack/virtual.py b/lib/spack/spack/virtual.py index c77b259d61..c988d14c49 100644 --- a/lib/spack/spack/virtual.py +++ b/lib/spack/spack/virtual.py @@ -67,6 +67,10 @@ class ProviderIndex(object): if type(spec) != spack.spec.Spec: spec = spack.spec.Spec(spec) + if spec.name == "any-pkg-name": + #The "any" name does not have a package + return + assert(not spec.virtual) pkg = spec.package -- cgit v1.2.3-70-g09d2 From db1b21b9aa1bd28ef706f38e982966f7a01f6aca Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 25 Sep 2015 09:25:12 -0700 Subject: reclaimed the = sign. Architectures now specified by +arch= instead. Decided to prepend flag names with + for clarity in spec names and ease of parsing. Also generalized variants, although there is not yet a way to specify a generalized (name=value) variant. --- lib/spack/spack/spec.py | 110 +++++++++++++++++-------- lib/spack/spack/test/concretize.py | 2 +- lib/spack/spack/test/multimethod.py | 10 +-- lib/spack/spack/test/spec_dag.py | 5 +- lib/spack/spack/test/spec_semantics.py | 26 +++--- lib/spack/spack/test/spec_syntax.py | 1 + lib/spack/spack/variant.py | 2 +- var/spack/mock_packages/multimethod/package.py | 8 +- 8 files changed, 104 insertions(+), 60 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 572f13901f..9c95fc2177 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -72,7 +72,7 @@ Here is the EBNF grammar for a spec:: dep_list = { ^ spec } spec = id [ options ] options = { @version-list | +variant | -variant | ~variant | - %compiler | =architecture } + %compiler | +arch=architecture | +flag=value} variant = id architecture = id compiler = id [ version-list ] @@ -297,22 +297,25 @@ class VariantSpec(object): on the particular package being built, and each named variant can be enabled or disabled. """ - def __init__(self, name, enabled): + def __init__(self, name, value): self.name = name - self.enabled = enabled + self.value = value def _cmp_key(self): - return (self.name, self.enabled) + return (self.name, self.value) def copy(self): - return VariantSpec(self.name, self.enabled) + return VariantSpec(self.name, self.value) def __str__(self): - out = '+' if self.enabled else '~' - return out + self.name + if self.value in [True,False]: + out = '+' if self.value else '~' + return out + self.name + else: + return '+' + self.name + "=" + self.value class VariantMap(HashableMap): @@ -323,10 +326,10 @@ class VariantMap(HashableMap): def satisfies(self, other, strict=False): if strict or self.spec._concrete: - return all(k in self and self[k].enabled == other[k].enabled + return all(k in self and self[k].value == other[k].value for k in other) else: - return all(self[k].enabled == other[k].enabled + return all(self[k].value == other[k].value for k in other if k in self) @@ -344,7 +347,7 @@ class VariantMap(HashableMap): changed = False for k in other: if k in self: - if self[k].enabled != other[k].enabled: + if self[k].value != other[k].value: raise UnsatisfiableVariantSpecError(self[k], other[k]) else: self[k] = other[k].copy() @@ -437,12 +440,20 @@ class Spec(object): self.versions.add(version) - def _add_variant(self, name, enabled): + def _add_variant(self, name, value): """Called by the parser to add a variant.""" if name in self.variants: raise DuplicateVariantError( "Cannot specify variant '%s' twice" % name) - self.variants[name] = VariantSpec(name, enabled) + self.variants[name] = VariantSpec(name, value) + def _add_flag(self, name, value): + """Called by the parser to add a known flag. + Known flags currently include "arch" + """ + if name == 'arch': + self._set_architecture(value) + else: + raise SpecError("Invalid flag specified") def _set_compiler(self, compiler): """Called by the parser to set the compiler.""" @@ -653,7 +664,7 @@ class Spec(object): def to_node_dict(self): d = { 'variants' : dict( - (name,v.enabled) for name, v in self.variants.items()), + (name,v.value) for name, v in self.variants.items()), 'arch' : self.architecture, 'dependencies' : dict((d, self.dependencies[d].dag_hash()) for d in sorted(self.dependencies)) @@ -690,8 +701,8 @@ class Spec(object): else: spec.compiler = CompilerSpec.from_dict(node) - for name, enabled in node['variants'].items(): - spec.variants[name] = VariantSpec(name, enabled) + for name, value in node['variants'].items(): + spec.variants[name] = VariantSpec(name, value) return spec @@ -804,6 +815,7 @@ class Spec(object): spec._replace_with(concrete) changed = True + # If there are duplicate providers or duplicate provider deps, this # consolidates them and merge constraints. changed |= self.normalize(force=True) @@ -1138,7 +1150,7 @@ class Spec(object): """ other = self._autospec(other) - if not self.name == other.name: + if not (self.name == other.name or self.name == "any-pkg-name" or other.name == "any-pkg-name"): raise UnsatisfiableSpecNameError(self.name, other.name) if not self.versions.overlaps(other.versions): @@ -1146,7 +1158,7 @@ class Spec(object): for v in other.variants: if (v in self.variants and - self.variants[v].enabled != other.variants[v].enabled): + self.variants[v].value != other.variants[v].value): raise UnsatisfiableVariantSpecError(self.variants[v], other.variants[v]) @@ -1228,7 +1240,10 @@ class Spec(object): return spec_like try: - return spack.spec.Spec(spec_like) + spec = spack.spec.Spec(spec_like) + if spec.name == "any-pkg-name": + raise SpecError("anonymous package -- this will always be handled") + return spec except SpecError: return parse_anonymous_spec(spec_like, self.name) @@ -1248,7 +1263,7 @@ class Spec(object): """ other = self._autospec(other) - # A concrete provider can satisfy a virtual dependency. + # A concrete provider can satisfy a virtual dependency. if not self.virtual and other.virtual: pkg = spack.db.get(self.name) if pkg.provides(other.name): @@ -1622,7 +1637,7 @@ class Spec(object): showid = kwargs.pop('ids', False) cover = kwargs.pop('cover', 'nodes') indent = kwargs.pop('indent', 0) - fmt = kwargs.pop('format', '$_$@$%@$+$=') + fmt = kwargs.pop('format', '$_$@$%@$+$+arch=') prefix = kwargs.pop('prefix', None) check_kwargs(kwargs, self.tree) @@ -1707,11 +1722,18 @@ class SpecParser(spack.parse.Parser): elif self.accept(ON): specs.append(self.empty_spec()) - specs[-1]._add_variant(self.variant(), True) + self.expect(ID) + self.check_identifier() + name = self.token.value + if self.accept(EQ): + self.expect(ID) + specs[-1]._add_flag(name,self.token.value) + else: + specs[-1]._add_variant(self.variant(name),True) elif self.accept(OFF): specs.append(self.empty_spec()) - specs[-1]._add_variant(self.variant(), False) + specs[-1]._add_variant(self.variant(),False) else: self.unexpected_token() @@ -1719,6 +1741,10 @@ class SpecParser(spack.parse.Parser): except spack.parse.ParseError, e: raise SpecParseError(e) + for top_spec in specs: + for spec in top_spec.traverse(): + if 'arch' in spec.variants: + spec.architecture = spec.variants['arch'] return specs @@ -1763,10 +1789,17 @@ class SpecParser(spack.parse.Parser): #Should we be able to add cflags eventually? while self.next: if self.accept(ON): - spec._add_variant(self.variant(), True) + self.expect(ID) + self.check_identifier() + name = self.token.value + if self.accept(EQ): + self.expect(ID) + spec._add_flag(name,self.token.value) + else: + spec._add_variant(self.variant(name),True) elif self.accept(OFF): - spec._add_variant(self.variant(), False) + spec._add_variant(self.variant(),False) elif self.accept(PCT): spec._set_compiler(self.compiler()) @@ -1805,18 +1838,23 @@ class SpecParser(spack.parse.Parser): spec._add_version(version) added_version = True + elif self.accept(ON): - spec._add_variant(self.variant(), True) + self.expect(ID) + self.check_identifier() + name = self.token.value + if self.accept(EQ): + self.expect(ID) + spec._add_flag(name,self.token.value) + else: + spec._add_variant(self.variant(name),True) elif self.accept(OFF): - spec._add_variant(self.variant(), False) + spec._add_variant(self.variant(),False) elif self.accept(PCT): spec._set_compiler(self.compiler()) - elif self.accept(EQ): - spec._set_architecture(self.architecture()) - else: break @@ -1827,13 +1865,17 @@ class SpecParser(spack.parse.Parser): return spec - def variant(self): - self.expect(ID) - self.check_identifier() - return self.token.value - + def variant(self,name=None): + #TODO: Make generalized variants possible + if name: + return name + else: + self.expect(ID) + self.check_identifier() + return self.token.value def architecture(self): + #TODO: Make this work properly as a subcase of variant (includes adding names to grammar) self.expect(ID) return self.token.value diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index b3a77d076a..a651e29718 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -38,7 +38,7 @@ class ConcretizeTest(MockPackagesTest): for name in abstract.variants: avariant = abstract.variants[name] cvariant = concrete.variants[name] - self.assertEqual(avariant.enabled, cvariant.enabled) + self.assertEqual(avariant.value, cvariant.value) for name in abstract.package.variants: self.assertTrue(name in concrete.variants) diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index cd5d9e625e..ead3010512 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -92,19 +92,19 @@ class MultiMethodTest(MockPackagesTest): def test_architecture_match(self): - pkg = spack.db.get('multimethod=x86_64') + pkg = spack.db.get('multimethod+arch=x86_64') self.assertEqual(pkg.different_by_architecture(), 'x86_64') - pkg = spack.db.get('multimethod=ppc64') + pkg = spack.db.get('multimethod+arch=ppc64') self.assertEqual(pkg.different_by_architecture(), 'ppc64') - pkg = spack.db.get('multimethod=ppc32') + pkg = spack.db.get('multimethod+arch=ppc32') self.assertEqual(pkg.different_by_architecture(), 'ppc32') - pkg = spack.db.get('multimethod=arm64') + pkg = spack.db.get('multimethod+arch=arm64') self.assertEqual(pkg.different_by_architecture(), 'arm64') - pkg = spack.db.get('multimethod=macos') + pkg = spack.db.get('multimethod+arch=macos') self.assertRaises(NoSuchMethodError, pkg.different_by_architecture) diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index 549f829d3e..9d6e7bd2a4 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -241,8 +241,8 @@ class SpecDagTest(MockPackagesTest): def test_unsatisfiable_architecture(self): - set_pkg_dep('mpileaks', 'mpich=bgqos_0') - spec = Spec('mpileaks ^mpich=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf') + set_pkg_dep('mpileaks', 'mpich+arch=bgqos_0') + spec = Spec('mpileaks ^mpich+arch=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf') self.assertRaises(spack.spec.UnsatisfiableArchitectureSpecError, spec.normalize) @@ -426,6 +426,7 @@ class SpecDagTest(MockPackagesTest): orig.concretize() copy = orig.copy() + print orig self.check_links(copy) self.assertEqual(orig, copy) diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 6666dbbb52..5b2cebddef 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -111,11 +111,11 @@ class SpecSematicsTest(MockPackagesTest): def test_satisfies_architecture(self): - self.check_satisfies('foo=chaos_5_x86_64_ib', '=chaos_5_x86_64_ib') - self.check_satisfies('foo=bgqos_0', '=bgqos_0') + self.check_satisfies('foo+arch=chaos_5_x86_64_ib', '+arch=chaos_5_x86_64_ib') + self.check_satisfies('foo+arch=bgqos_0', '+arch=bgqos_0') - self.check_unsatisfiable('foo=bgqos_0', '=chaos_5_x86_64_ib') - self.check_unsatisfiable('foo=chaos_5_x86_64_ib', '=bgqos_0') + self.check_unsatisfiable('foo+arch=bgqos_0', '+arch=chaos_5_x86_64_ib') + self.check_unsatisfiable('foo+arch=chaos_5_x86_64_ib', '+arch=bgqos_0') def test_satisfies_dependencies(self): @@ -267,13 +267,13 @@ class SpecSematicsTest(MockPackagesTest): def test_constrain_arch(self): - self.check_constrain('libelf=bgqos_0', 'libelf=bgqos_0', 'libelf=bgqos_0') - self.check_constrain('libelf=bgqos_0', 'libelf', 'libelf=bgqos_0') + self.check_constrain('libelf+arch=bgqos_0', 'libelf+arch=bgqos_0', 'libelf+arch=bgqos_0') + self.check_constrain('libelf+arch=bgqos_0', 'libelf', 'libelf+arch=bgqos_0') def test_constrain_compiler(self): - self.check_constrain('libelf=bgqos_0', 'libelf=bgqos_0', 'libelf=bgqos_0') - self.check_constrain('libelf=bgqos_0', 'libelf', 'libelf=bgqos_0') + self.check_constrain('libelf+arch=bgqos_0', 'libelf+arch=bgqos_0', 'libelf+arch=bgqos_0') + self.check_constrain('libelf+arch=bgqos_0', 'libelf', 'libelf+arch=bgqos_0') def test_invalid_constraint(self): @@ -283,7 +283,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_invalid_constraint('libelf+debug', 'libelf~debug') self.check_invalid_constraint('libelf+debug~foo', 'libelf+debug+foo') - self.check_invalid_constraint('libelf=bgqos_0', 'libelf=x86_54') + self.check_invalid_constraint('libelf+arch=bgqos_0', 'libelf+arch=x86_54') def test_constrain_changed(self): @@ -293,7 +293,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf%gcc', '%gcc@4.5') self.check_constrain_changed('libelf', '+debug') self.check_constrain_changed('libelf', '~debug') - self.check_constrain_changed('libelf', '=bgqos_0') + self.check_constrain_changed('libelf', '+arch=bgqos_0') def test_constrain_not_changed(self): @@ -304,7 +304,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf%gcc@4.5', '%gcc@4.5') self.check_constrain_not_changed('libelf+debug', '+debug') self.check_constrain_not_changed('libelf~debug', '~debug') - self.check_constrain_not_changed('libelf=bgqos_0', '=bgqos_0') + self.check_constrain_not_changed('libelf+arch=bgqos_0', '+arch=bgqos_0') self.check_constrain_not_changed('libelf^foo', 'libelf^foo') self.check_constrain_not_changed('libelf^foo^bar', 'libelf^foo^bar') @@ -316,7 +316,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf^foo%gcc', 'libelf^foo%gcc@4.5') self.check_constrain_changed('libelf^foo', 'libelf^foo+debug') self.check_constrain_changed('libelf^foo', 'libelf^foo~debug') - self.check_constrain_changed('libelf^foo', 'libelf^foo=bgqos_0') + self.check_constrain_changed('libelf^foo', 'libelf^foo+arch=bgqos_0') def test_constrain_dependency_not_changed(self): @@ -326,5 +326,5 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf^foo%gcc@4.5', 'libelf^foo%gcc@4.5') self.check_constrain_not_changed('libelf^foo+debug', 'libelf^foo+debug') self.check_constrain_not_changed('libelf^foo~debug', 'libelf^foo~debug') - self.check_constrain_not_changed('libelf^foo=bgqos_0', 'libelf^foo=bgqos_0') + self.check_constrain_not_changed('libelf^foo+arch=bgqos_0', 'libelf^foo+arch=bgqos_0') diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index 404f38906e..4ad4d99d97 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -70,6 +70,7 @@ class SpecSyntaxTest(unittest.TestCase): spec = expected output = spack.spec.parse(spec) parsed = (" ".join(str(spec) for spec in output)) + print output, parsed self.assertEqual(expected, parsed) diff --git a/lib/spack/spack/variant.py b/lib/spack/spack/variant.py index 3d3e2b0f6d..c572560206 100644 --- a/lib/spack/spack/variant.py +++ b/lib/spack/spack/variant.py @@ -32,5 +32,5 @@ currently variants are just flags. class Variant(object): """Represents a variant on a build. Can be either on or off.""" def __init__(self, default, description): - self.default = bool(default) + self.default = default self.description = str(description) diff --git a/var/spack/mock_packages/multimethod/package.py b/var/spack/mock_packages/multimethod/package.py index 75b1606ffc..dc8dfc9cfb 100644 --- a/var/spack/mock_packages/multimethod/package.py +++ b/var/spack/mock_packages/multimethod/package.py @@ -103,19 +103,19 @@ class Multimethod(Package): # # Make sure we can switch methods on different architectures # - @when('=x86_64') + @when('+arch=x86_64') def different_by_architecture(self): return 'x86_64' - @when('=ppc64') + @when('+arch=ppc64') def different_by_architecture(self): return 'ppc64' - @when('=ppc32') + @when('+arch=ppc32') def different_by_architecture(self): return 'ppc32' - @when('=arm64') + @when('+arch=arm64') def different_by_architecture(self): return 'arm64' -- cgit v1.2.3-70-g09d2 From 42b5b7d2ddf9091f4832c3aefc09ee2926ae7c9a Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 30 Sep 2015 17:11:08 -0700 Subject: Commit of compiler flags addition: Flags are passed from the command line all the way through build environments to environment variables. Flags are specified using +name=value and values are quoted using escaped quotes when necessary. Future work includes using the flags in the compiler wrapper script and hopefully updating the parser for a gentler user experience of the spec language. --- lib/spack/spack/build_environment.py | 24 ++--- lib/spack/spack/cmd/__init__.py | 1 + lib/spack/spack/compiler.py | 36 +++---- lib/spack/spack/compilers/__init__.py | 19 ++-- lib/spack/spack/concretize.py | 20 ++++ lib/spack/spack/package.py | 2 + lib/spack/spack/spec.py | 175 +++++++++++++++++++++++++++++----- lib/spack/spack/test/spec_dag.py | 1 - lib/spack/spack/test/spec_syntax.py | 1 - 9 files changed, 208 insertions(+), 71 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 252846196a..d3e781e3fc 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -36,6 +36,7 @@ from llnl.util.filesystem import * import spack import spack.compilers as compilers +import spack.compiler as Compiler from spack.util.executable import Executable, which from spack.util.environment import * @@ -57,7 +58,6 @@ SPACK_DEBUG = 'SPACK_DEBUG' SPACK_SHORT_SPEC = 'SPACK_SHORT_SPEC' SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR' - class MakeExecutable(Executable): """Special callable executable object for make so the user can specify parallel or not on a per-invocation basis. Using @@ -86,6 +86,7 @@ class MakeExecutable(Executable): def set_compiler_environment_variables(pkg): assert(pkg.spec.concrete) compiler = pkg.compiler + flags = pkg.spec.compiler_flags # Set compiler variables used by CMake and autotools os.environ['CC'] = join_path(spack.build_env_path, 'cc') @@ -103,16 +104,17 @@ def set_compiler_environment_variables(pkg): if compiler.fc: os.environ['SPACK_FC'] = compiler.fc - # Set SPACK compiler flags so our wrapper can add default flags - if compiler.cflags: - os.environ['SPACK_CFLAGS'] = compiler.cflags - if compiler.cxxflags: - os.environ['SPACK_CXXFLAGS'] = compiler.cxxflags - if compiler.fflags: - os.environ['SPACK_FFLAGS'] = compiler.fflags - if compiler.ldflags: - os.environ['SPACK_LDFLAGS'] = compiler.ldflags - + # Encorporate the compiler default flags into the set of flags + for flag in flags: + if flag in compiler.flags: + compiler.flags[flag] += ' '+flags[flag] + else: + compiler.flags[flag] = flags[flag] + + # Add every valid compiler flag to the environment, prefaced by "SPACK_" + for flag in Compiler.valid_compiler_flags(): + if flag in compiler.flags: + os.environ['SPACK_'+flag.upper()] = compiler.flags[flag] os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py index 6ce6fa0960..eda8ac8620 100644 --- a/lib/spack/spack/cmd/__init__.py +++ b/lib/spack/spack/cmd/__init__.py @@ -88,6 +88,7 @@ def parse_specs(args, **kwargs): if isinstance(args, (python_list, tuple)): args = " ".join(args) + try: specs = spack.spec.parse(args) for spec in specs: diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 83221d6ac0..9b9c5f4365 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -63,6 +63,10 @@ def dumpversion(compiler_path): """Simple default dumpversion method -- this is what gcc does.""" return get_compiler_version(compiler_path, '-dumpversion') +_valid_compiler_flags = ['cflags', 'cxxflags', 'fflags', 'ldflags', 'cppflags'] +def valid_compiler_flags(): + return _valid_compiler_flags + class Compiler(object): """This class encapsulates a Spack "compiler", which includes C, @@ -98,7 +102,7 @@ class Compiler(object): cxx11_flag = "-std=c++11" - def __init__(self, cspec, cc, cxx, f77, fc, cflags=None, cxxflags=None, fflags=None, ldflags=None): + def __init__(self, cspec, cc, cxx, f77, fc, **kwargs): def check(exe): if exe is None: return None @@ -110,10 +114,13 @@ class Compiler(object): self.f77 = check(f77) self.fc = check(fc) - self.cflags = cflags - self.cxxflags = cxxflags - self.fflags = fflags - self.ldflags = ldflags + #Unfortunately have to make sure these params are accepted in the same order the are returned + #by sorted(flags) in compilers/__init__.py + self.flags = {} + for flag in _valid_compiler_flags: + value = kwargs.get(flag, None) + if value is not None: + self.flags[flag] = value self.spec = cspec @@ -151,7 +158,6 @@ class Compiler(object): def fc_version(cls, fc): return cls.default_version(fc) - @classmethod def _find_matches_in_path(cls, compiler_names, detect_version, *path): """Finds compilers in the paths supplied. @@ -259,24 +265,6 @@ class Compiler(object): return list(compilers.values()) - def update_flags(self,c=None,cxx=None,f=None,ld=None): - """Update any flag values provided. Cannot be used to erase values""" - if c: - self.cflags=c - if cxx: - self.cxxflags=cxx - if f: - self.fflags=f - if ld: - self.ldflags=ld - - def erase_flags(self): - """Erase the flag settings""" - self.cflags=None - self.cxxflags=None - self.fflags=None - self.ldflags=None - def __repr__(self): """Return a string represntation of the compiler toolchain.""" diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 62e8b6b172..9d3d01b20d 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -37,6 +37,7 @@ import spack.spec import spack.config from spack.util.multiproc import parmap +import spack.compiler as Comp from spack.compiler import Compiler from spack.util.executable import which from spack.util.naming import mod_to_class @@ -44,7 +45,6 @@ from spack.util.environment import get_path _imported_compilers_module = 'spack.compilers' _required_instance_vars = ['cc', 'cxx', 'f77', 'fc'] -_optional_flag_vars = ['cflags', 'cxxflags', 'fflags', 'ldflags'] _default_order = ['gcc', 'intel', 'pgi', 'clang', 'xlc'] @@ -182,20 +182,19 @@ def compilers_for_spec(compiler_spec): raise InvalidCompilerConfigurationError(cspec) cls = class_for_compiler_name(cspec.name) - compiler_params = [] + compiler_paths = [] for c in _required_instance_vars: compiler_path = items[c] if compiler_path != "None": - compiler_params.append(compiler_path) + compiler_paths.append(compiler_path) else: - compiler_params.append(None) + compiler_paths.append(None) - for c in _optional_flag_vars: - if c not in items: - items[c]=None - compiler_params.append(items[c]) - - return cls(cspec, *compiler_params) + flags = {} + for f in Comp.valid_compiler_flags(): + if f in items: + flags[f] = items[f] + return cls(cspec, *compiler_paths, **flags) matches = find(compiler_spec) return [get_compiler(cspec) for cspec in matches] diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 66002492cb..72f98bdc5f 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -175,6 +175,26 @@ class DefaultConcretizer(object): return True # things changed. + def concretize_compiler_flags(self, spec): + """ + The compiler flags are updated to match those of the spec whose + compiler is used, defaulting to no compiler flags in the spec. + Default specs set at the compiler level will still be added later. + """ + try: + nearest = next(p for p in spec.traverse(direction='parents') + if p.compiler == spec.compiler and p is not spec) + if spec.compiler_flags == nearest.compiler_flags: + return False + spec.compiler_flags = nearest.compiler_flags.copy() + + except StopIteration: + return False + + return True # things changed. + + + def choose_provider(self, spec, providers): """This is invoked for virtual specs. Given a spec with a virtual name, say "mpi", and a list of specs of possible providers of that spec, diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index c631a35bf3..2d5962773f 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -352,6 +352,7 @@ class Package(object): # Fix up self.url if this package fetches with a URLFetchStrategy. # This makes self.url behave sanely. if self.spec.versions.concrete: + # TODO: this is a really roundabout way of determining the type # TODO: of fetch to do. figure out a more sane fetch strategy/package # TODO: init order (right now it's conflated with stage, package, and @@ -587,6 +588,7 @@ class Package(object): @property def prefix(self): """Get the prefix into which this package should be installed.""" +# print self.spec, self.spec.prefix return self.spec.prefix diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 9c95fc2177..385d1864a1 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -107,6 +107,7 @@ import spack import spack.parse import spack.error import spack.compilers as compilers +import spack.compiler as Compiler from spack.cmd.find import display_specs from spack.version import * @@ -144,7 +145,6 @@ _separators = '[%s]' % ''.join(color_formats.keys()) every time we call str()""" _any_version = VersionList([':']) - def index_specs(specs): """Take a list of specs and return a dict of lists. Dict is keyed by spec name and lists include all specs with the @@ -192,10 +192,12 @@ class CompilerSpec(object): c = SpecParser().parse_compiler(arg) self.name = c.name self.versions = c.versions +# self.flags = c.flags elif isinstance(arg, CompilerSpec): self.name = arg.name self.versions = arg.versions.copy() +# self.flags = arg.flags.copy() else: raise TypeError( @@ -207,10 +209,18 @@ class CompilerSpec(object): self.name = name self.versions = VersionList() self.versions.add(ver(version)) +# self.flags = {'cflags':None,'cxxflags':None,'fflags':None,'ldflags':None} + +# elif nargs == 3: +# name, version, flags = args +# self.name = name +# self.versions = VersionList() +# self.versions.add(ver(version)) +# self.flags = flags else: raise TypeError( - "__init__ takes 1 or 2 arguments. (%d given)" % nargs) + "__init__ takes 1, 2, or 3 arguments. (%d given)" % nargs) def _add_version(self, version): @@ -226,9 +236,21 @@ class CompilerSpec(object): def satisfies(self, other, strict=False): other = self._autospec(other) return (self.name == other.name and - self.versions.satisfies(other.versions, strict=strict)) + self.versions.satisfies(other.versions, strict=strict))# and +# self.flags_satisfy(other, strict=strict)) +# def flags_satisfy(self,other,strict = False): +# if strict: +# for flag in self.flags: +# if not self.flags[flag] == other.flags[flag]: +# return False +# else: +# for flag in self.flags: +# if other.flags[flag] and (not self.flags[flag] or other.flags[flag] not in self.flags[flag]): +# return False +# return True + def constrain(self, other): """Intersect self's versions with other. @@ -261,23 +283,25 @@ class CompilerSpec(object): clone = CompilerSpec.__new__(CompilerSpec) clone.name = self.name clone.versions = self.versions.copy() +# clone.flags = self.flags.copy() return clone def _cmp_key(self): - return (self.name, self.versions) + return (self.name, self.versions)#, str(sorted(self.flags.items()))) def to_dict(self): d = {'name' : self.name} d.update(self.versions.to_dict()) +# d['flags'] = self.flags return { 'compiler' : d } @staticmethod def from_dict(d): d = d['compiler'] - return CompilerSpec(d['name'], VersionList.from_dict(d)) + return CompilerSpec(d['name'], VersionList.from_dict(d))#, d['flags']) def __str__(self): @@ -285,6 +309,11 @@ class CompilerSpec(object): if self.versions and self.versions != _any_version: vlist = ",".join(str(v) for v in self.versions) out += "@%s" % vlist +# if self.flags: +# for flag, value in self.flags.items(): +# if value is not None: +# out += "+" + flag + "=" + value +# print "outing" return out def __repr__(self): @@ -372,6 +401,59 @@ class VariantMap(HashableMap): return ''.join(str(self[key]) for key in sorted_keys) +class FlagMap(HashableMap): + def __init__(self, spec): + super(FlagMap, self).__init__() + self.spec = spec + + + def satisfies(self, other, strict=False): + #"strict" makes no sense if this works, but it matches how we need it. Maybe + if strict: + return all(k in self and self[k] == other[k] + for k in other) + else: + return self == other + + def constrain(self, other): + """Add all flags in other that aren't in self to self. + + Return whether the spec changed. + """ + changed = False + for k in other: + if k in self: + if self[k] != other[k]: + #This will not properly recognize incompatible flags + self[k] += other[k] + changed = True + else: + self[k] = other[k] + changed = True + return changed + + + @property + def concrete(self): + return self.spec._concrete + + + def copy(self): + clone = FlagMap(None) + for name, value in self.items(): + clone[name] = value + return clone + + + def _cmp_key(self): + return ''.join(str(key)+str(value) for key, value in sorted(self.items())) + + + def __str__(self): + sorted_keys = sorted(self.keys()) + return '+' + '+'.join(str(key) + '=\"' + str(self[key]) + '\"' for key in sorted_keys) + + class DependencyMap(HashableMap): """Each spec has a DependencyMap containing specs for its dependencies. The DependencyMap is keyed by name. """ @@ -413,6 +495,7 @@ class Spec(object): self.versions = other.versions self.architecture = other.architecture self.compiler = other.compiler + self.compiler_flags = other.compiler_flags self.dependencies = other.dependencies self.variants = other.variants self.variants.spec = self @@ -446,14 +529,19 @@ class Spec(object): "Cannot specify variant '%s' twice" % name) self.variants[name] = VariantSpec(name, value) + def _add_flag(self, name, value): """Called by the parser to add a known flag. Known flags currently include "arch" """ + valid_flags = Compiler.valid_compiler_flags() if name == 'arch': self._set_architecture(value) + elif name in valid_flags: + assert(self.compiler_flags is not None) + self.compiler_flags[name] = value else: - raise SpecError("Invalid flag specified") + self._add_variant(self,name,value) def _set_compiler(self, compiler): """Called by the parser to set the compiler.""" @@ -533,6 +621,7 @@ class Spec(object): and self.variants.concrete and self.architecture and self.compiler and self.compiler.concrete +# and self.compiler_flags.concrete and self.dependencies.concrete) return self._concrete @@ -667,7 +756,8 @@ class Spec(object): (name,v.value) for name, v in self.variants.items()), 'arch' : self.architecture, 'dependencies' : dict((d, self.dependencies[d].dag_hash()) - for d in sorted(self.dependencies)) + for d in sorted(self.dependencies)), + 'compiler_flags' : dict((name, value) for name, value in self.compiler_flags.items()) } if self.compiler: d.update(self.compiler.to_dict()) @@ -704,6 +794,9 @@ class Spec(object): for name, value in node['variants'].items(): spec.variants[name] = VariantSpec(name, value) + for name, value in node['compiler_flags'].items(): + spec.compiler_flags[name] = value + return spec @@ -769,6 +862,7 @@ class Spec(object): changed |= any( (spack.concretizer.concretize_architecture(self), spack.concretizer.concretize_compiler(self), + spack.concretizer.concretize_compiler_flags(self),#has to be concretized after compiler spack.concretizer.concretize_version(self), spack.concretizer.concretize_variants(self))) presets[self.name] = self @@ -843,9 +937,19 @@ class Spec(object): force = False while changed: - changes = (self.normalize(force=force), - self._expand_virtual_packages(), - self._concretize_helper()) +#debugging code +# print self, "raw" + a = self.normalize(force=force) +# print self, "normal" + b = self._expand_virtual_packages() +# print self, "expanded" + c = self._concretize_helper() +# print self, "concrete-ish" + changes = (a,b,c) +# print a, b, c +# changes = (self.normalize(force=force), +# self._expand_virtual_packages(), +# self._concretize_helper()) changed = any(changes) force=True @@ -1058,7 +1162,6 @@ 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) - # If pkg_dep is a dependency, merge it. if pkg_dep: changed |= self._merge_dependency( @@ -1177,6 +1280,8 @@ class Spec(object): changed |= self.versions.intersect(other.versions) changed |= self.variants.constrain(other.variants) + changed |= self.compiler_flags.constrain(other.compiler_flags) + old = self.architecture self.architecture = self.architecture or other.architecture changed |= (self.architecture != old) @@ -1304,6 +1409,9 @@ class Spec(object): elif strict and (other.architecture and not self.architecture): return False + if not self.compiler_flags.satisfies(other.compiler_flags, strict=strict): + return False + # If we need to descend into dependencies, do it, otherwise we're done. if deps: deps_strict = strict @@ -1378,6 +1486,7 @@ class Spec(object): self.versions = other.versions.copy() self.architecture = other.architecture self.compiler = other.compiler.copy() if other.compiler else None + self.compiler_flags = other.compiler_flags.copy() self.dependents = DependencyMap() self.dependencies = DependencyMap() self.variants = other.variants.copy() @@ -1499,9 +1608,11 @@ class Spec(object): def _cmp_node(self): """Comparison key for just *this node* and not its deps.""" +# if self.compiler: +# return (self.name, self.versions, self.variants, +# self.architecture, self.compiler._cmp_key()) return (self.name, self.versions, self.variants, - self.architecture, self.compiler) - + self.architecture, self.compiler, self.compiler_flags) def eq_node(self, other): """Equality with another spec, not including dependencies.""" @@ -1518,7 +1629,7 @@ class Spec(object): considering structure. This is the default, as normalization will restore structure. """ - return self._cmp_node() + (self.sorted_deps(),) + return self._cmp_node() + (self.sorted_deps()) def colorized(self): @@ -1533,7 +1644,7 @@ class Spec(object): $@ Version $% Compiler $%@ Compiler & compiler version - $+ Options + $+ Options & compiler flags $= Architecture $# 7-char prefix of DAG hash $$ $ @@ -1587,9 +1698,11 @@ class Spec(object): elif c == '+': if self.variants: write(fmt % str(self.variants), c) + if self.compiler_flags: + write(fmt % str(self.compiler_flags), '%') elif c == '=': if self.architecture: - write(fmt % (c + str(self.architecture)), c) + write(fmt % ('+arch' + c + str(self.architecture)), c) elif c == '#': out.write('-' + fmt % (self.dag_hash(7))) elif c == '$': @@ -1669,7 +1782,7 @@ class Spec(object): # # These are possible token types in the spec grammar. # -HASH, DEP, AT, COLON, COMMA, ON, OFF, PCT, EQ, ID = range(10) +HASH, DEP, AT, COLON, COMMA, ON, OFF, PCT, EQ, QT, ID = range(11) class SpecLexer(spack.parse.Lexer): """Parses tokens that make up spack specs.""" @@ -1687,6 +1800,8 @@ class SpecLexer(spack.parse.Lexer): (r'\=', lambda scanner, val: self.token(EQ, val)), # This is more liberal than identifier_re (see above). # Checked by check_identifier() for better error messages. + (r'([\"\'])(?:(?=(\\?))\2.)*?\1',lambda scanner, val: self.token(QT, val)), +# (r'([\"\'])([^\1]+?)(\1)',lambda scanner, val: self.token(QT, val)), (r'\w[\w.-]*', lambda scanner, val: self.token(ID, val)), (r'\s+', lambda scanner, val: None)]) @@ -1726,7 +1841,10 @@ class SpecParser(spack.parse.Parser): self.check_identifier() name = self.token.value if self.accept(EQ): - self.expect(ID) + if self.accept(QT): + self.token.value = self.token.value[1:-1] + else: + self.expect(ID) specs[-1]._add_flag(name,self.token.value) else: specs[-1]._add_variant(self.variant(name),True) @@ -1741,10 +1859,10 @@ class SpecParser(spack.parse.Parser): except spack.parse.ParseError, e: raise SpecParseError(e) - for top_spec in specs: - for spec in top_spec.traverse(): - if 'arch' in spec.variants: - spec.architecture = spec.variants['arch'] +# for top_spec in specs: +# for spec in top_spec.traverse(): +# if 'arch' in spec.variants: +# spec.architecture = spec.variants['arch'] return specs @@ -1783,6 +1901,7 @@ class SpecParser(spack.parse.Parser): spec.variants = VariantMap(spec) spec.architecture = None spec.compiler = None + spec.compiler_flags = FlagMap(spec) spec.dependents = DependencyMap() spec.dependencies = DependencyMap() @@ -1793,7 +1912,10 @@ class SpecParser(spack.parse.Parser): self.check_identifier() name = self.token.value if self.accept(EQ): - self.expect(ID) + if self.accept(QT): + self.token.value = self.token.value[1:-1] + else: + self.expect(ID) spec._add_flag(name,self.token.value) else: spec._add_variant(self.variant(name),True) @@ -1821,6 +1943,7 @@ class SpecParser(spack.parse.Parser): spec.variants = VariantMap(spec) spec.architecture = None spec.compiler = None + spec.compiler_flags = FlagMap(spec) spec.dependents = DependencyMap() spec.dependencies = DependencyMap() @@ -1844,7 +1967,10 @@ class SpecParser(spack.parse.Parser): self.check_identifier() name = self.token.value if self.accept(EQ): - self.expect(ID) + if self.accept(QT): + self.token.value = self.token.value[1:-1] + else: + self.expect(ID) spec._add_flag(name,self.token.value) else: spec._add_variant(self.variant(name),True) @@ -1916,6 +2042,7 @@ class SpecParser(spack.parse.Parser): compiler = CompilerSpec.__new__(CompilerSpec) compiler.name = self.token.value compiler.versions = VersionList() +# compiler.flags = {'cflags':None,'cxxflags':None,'fflags':None,'ldflags':None} if self.accept(AT): vlist = self.version_list() for version in vlist: diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index 9d6e7bd2a4..91cd8cbe1e 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -426,7 +426,6 @@ class SpecDagTest(MockPackagesTest): orig.concretize() copy = orig.copy() - print orig self.check_links(copy) self.assertEqual(orig, copy) diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index 4ad4d99d97..404f38906e 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -70,7 +70,6 @@ class SpecSyntaxTest(unittest.TestCase): spec = expected output = spack.spec.parse(spec) parsed = (" ".join(str(spec) for spec in output)) - print output, parsed self.assertEqual(expected, parsed) -- cgit v1.2.3-70-g09d2 From 2d77173dfa182140c4a4ea1102895a573684e324 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 2 Oct 2015 16:12:51 -0700 Subject: partial commit of cflags for debugging --- lib/spack/env/cc | 39 +++++++++++++++++++++++++++--------- lib/spack/spack/build_environment.py | 2 +- lib/spack/spack/concretize.py | 4 +++- lib/spack/spack/spec.py | 10 +++++++++ 4 files changed, 43 insertions(+), 12 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 0bb723c237..b15c7b429b 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -89,31 +89,44 @@ done command=$(basename "$0") case "$command" in cc|gcc|c89|c99|clang|xlc) - command="$SPACK_CC" -# command="$SPACK_CC $SPACK_CFLAGS" + command=("$SPACK_CC") + if [ "$SPACK_CFLAGS" ]; then + command+=("$SPACK_CFLAGS") + fi language="C" ;; c++|CC|g++|clang++|xlC) - command="$SPACK_CXX" -# command="$SPACK_CXX SPACK_CXXFLAGS" + command=("$SPACK_CXX") + if [ "$SPACK_CXXFLAGS" ]; then + command+=("$SPACK_CXXFLAGS") + fi language="C++" ;; f77|xlf) - command="$SPACK_F77" -# command="$SPACK_F77 $SPACK_FFLAGS" + command=("$SPACK_F77") + if [ "$SPACK_FFLAGS" ]; then + command+=("$SPACK_FFLAGS") + fi language="Fortran 77" ;; fc|f90|f95|xlf90) command="$SPACK_FC" -# command="$SPACK_FC $SPACK_FFLAGS" + if [ "$SPACK_FFLAGS" ]; then + command+=("$SPACK_FFLAGS") + fi language="Fortran 90" ;; cpp) mode=cpp + if [ "$SPACK_CPPFLAGS" ]; then + command+=("$SPACK_CPPFLAGS") + fi ;; ld) mode=ld - # command+=" $LDFLAGS" + if [ "$SPACK_LDFLAGS" ]; then + command+=("$SPACK_LDFLAGS") + fi ;; *) die "Unkown compiler: $command" @@ -123,7 +136,9 @@ esac # Finish setting up the mode. if [ -z "$mode" ]; then mode=ccld -# command+=" $SPACK_LDFLAGS" + if [ "$SPACK_LDFLAGS" ]; then + command+=("$SPACK_LDFLAGS") + fi for arg in "$@"; do if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then mode=vcheck @@ -324,7 +339,8 @@ for dir in "${env_path[@]}"; do done export PATH -full_command=("$command") +full_command=("${command[@]}") +#full_command+=("$SPACK_CFLAGS") full_command+=("${args[@]}") # @@ -337,4 +353,7 @@ if [ "$SPACK_DEBUG" = "TRUE" ]; then echo "$mode ${full_command[@]}" >> $output_log fi +echo "---------------------------" > /g/g0/becker33/cflag_test +echo "${full_command[@]}" >> /g/g0/becker33/cflag_test +echo "---------------------------" >> /g/g0/becker33/cflag_test exec "${full_command[@]}" diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index d3e781e3fc..6ede669fd0 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -104,7 +104,7 @@ def set_compiler_environment_variables(pkg): if compiler.fc: os.environ['SPACK_FC'] = compiler.fc - # Encorporate the compiler default flags into the set of flags + # Incorporate the compiler default flags into the set of flags for flag in flags: if flag in compiler.flags: compiler.flags[flag] += ' '+flags[flag] diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 72f98bdc5f..946199bc6c 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -189,7 +189,9 @@ class DefaultConcretizer(object): spec.compiler_flags = nearest.compiler_flags.copy() except StopIteration: - return False + if spec.compiler_flags == spec.root.compiler_flags: + return False + spec.compiler_flags = spec.root.compiler_flags return True # things changed. diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 385d1864a1..379b51fb39 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1142,6 +1142,12 @@ class Spec(object): def _normalize_helper(self, visited, spec_deps, provider_index): """Recursive helper function for _normalize.""" + print self,"self help" +# print +# from spack.graph import graph_ascii +# graph_ascii(self) +# print + print spec_deps if self.name in visited: return False visited.add(self.name) @@ -1206,6 +1212,10 @@ class Spec(object): visited = set() any_change = self._normalize_helper(visited, spec_deps, index) + print self, "self norm" + print spec_deps + print visited + # If there are deps specified but not visited, they're not # actually deps of this package. Raise an error. extra = set(spec_deps.keys()).difference(visited) -- cgit v1.2.3-70-g09d2 From cb5bc242db4b3096c31445731b652aa247c40581 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 21 Oct 2015 10:32:23 -0700 Subject: Changed flag default to "". Updated printing and other logic to match. Seems to have solved error in normalize. --- lib/spack/spack/build_environment.py | 7 +++--- lib/spack/spack/compiler.py | 5 ++-- lib/spack/spack/spec.py | 44 ++++++++---------------------------- 3 files changed, 16 insertions(+), 40 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 6ede669fd0..5ac921df22 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -105,15 +105,16 @@ def set_compiler_environment_variables(pkg): os.environ['SPACK_FC'] = compiler.fc # Incorporate the compiler default flags into the set of flags - for flag in flags: - if flag in compiler.flags: + for flag in flags:#This is all valid flags as well because it's concrete + if flag in compiler.flags and compiler.flags[flag] != "": compiler.flags[flag] += ' '+flags[flag] else: compiler.flags[flag] = flags[flag] # Add every valid compiler flag to the environment, prefaced by "SPACK_" for flag in Compiler.valid_compiler_flags(): - if flag in compiler.flags: + #The previous block and concreteness guarantee key safety here + if compiler.flags[flag] != "": os.environ['SPACK_'+flag.upper()] = compiler.flags[flag] os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 9b9c5f4365..3b2f57f60e 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -114,8 +114,9 @@ class Compiler(object): self.f77 = check(f77) self.fc = check(fc) - #Unfortunately have to make sure these params are accepted in the same order the are returned - #by sorted(flags) in compilers/__init__.py + # Unfortunately have to make sure these params are accepted + # in the same order they are returned by sorted(flags) + # in compilers/__init__.py self.flags = {} for flag in _valid_compiler_flags: value = kwargs.get(flag, None) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 379b51fb39..ac0ddce10a 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -192,12 +192,10 @@ class CompilerSpec(object): c = SpecParser().parse_compiler(arg) self.name = c.name self.versions = c.versions -# self.flags = c.flags elif isinstance(arg, CompilerSpec): self.name = arg.name self.versions = arg.versions.copy() -# self.flags = arg.flags.copy() else: raise TypeError( @@ -209,14 +207,6 @@ class CompilerSpec(object): self.name = name self.versions = VersionList() self.versions.add(ver(version)) -# self.flags = {'cflags':None,'cxxflags':None,'fflags':None,'ldflags':None} - -# elif nargs == 3: -# name, version, flags = args -# self.name = name -# self.versions = VersionList() -# self.versions.add(ver(version)) -# self.flags = flags else: raise TypeError( @@ -236,20 +226,8 @@ class CompilerSpec(object): def satisfies(self, other, strict=False): other = self._autospec(other) return (self.name == other.name and - self.versions.satisfies(other.versions, strict=strict))# and -# self.flags_satisfy(other, strict=strict)) - + self.versions.satisfies(other.versions, strict=strict)) -# def flags_satisfy(self,other,strict = False): -# if strict: -# for flag in self.flags: -# if not self.flags[flag] == other.flags[flag]: -# return False -# else: -# for flag in self.flags: -# if other.flags[flag] and (not self.flags[flag] or other.flags[flag] not in self.flags[flag]): -# return False -# return True def constrain(self, other): """Intersect self's versions with other. @@ -283,25 +261,23 @@ class CompilerSpec(object): clone = CompilerSpec.__new__(CompilerSpec) clone.name = self.name clone.versions = self.versions.copy() -# clone.flags = self.flags.copy() return clone def _cmp_key(self): - return (self.name, self.versions)#, str(sorted(self.flags.items()))) + return (self.name, self.versions) def to_dict(self): d = {'name' : self.name} d.update(self.versions.to_dict()) -# d['flags'] = self.flags return { 'compiler' : d } @staticmethod def from_dict(d): d = d['compiler'] - return CompilerSpec(d['name'], VersionList.from_dict(d))#, d['flags']) + return CompilerSpec(d['name'], VersionList.from_dict(d)) def __str__(self): @@ -309,11 +285,6 @@ class CompilerSpec(object): if self.versions and self.versions != _any_version: vlist = ",".join(str(v) for v in self.versions) out += "@%s" % vlist -# if self.flags: -# for flag, value in self.flags.items(): -# if value is not None: -# out += "+" + flag + "=" + value -# print "outing" return out def __repr__(self): @@ -405,13 +376,15 @@ class FlagMap(HashableMap): def __init__(self, spec): super(FlagMap, self).__init__() self.spec = spec + for flag in Compiler.valid_compiler_flags(): + self[flag] = "" def satisfies(self, other, strict=False): #"strict" makes no sense if this works, but it matches how we need it. Maybe if strict: return all(k in self and self[k] == other[k] - for k in other) + for k in other if other[k] != "") else: return self == other @@ -450,8 +423,9 @@ class FlagMap(HashableMap): def __str__(self): - sorted_keys = sorted(self.keys()) - return '+' + '+'.join(str(key) + '=\"' + str(self[key]) + '\"' for key in sorted_keys) + sorted_keys = filter(lambda flag: self[flag] != "", sorted(self.keys())) + cond_symbol = '+' if len(sorted_keys)>0 else '' + return cond_symbol + '+'.join(str(key) + '=\"' + str(self[key]) + '\"' for key in sorted_keys) class DependencyMap(HashableMap): -- cgit v1.2.3-70-g09d2 From 5a9394c65ff505562fe83c2d944ebfdbb68cd5df Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 30 Oct 2015 13:23:48 -0700 Subject: added default compilers into spec and fixed constrain/concretize bug --- lib/spack/spack/build_environment.py | 13 +++---------- lib/spack/spack/spec.py | 32 +++++++++++++++++--------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 5ac921df22..43824d7388 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -104,18 +104,11 @@ def set_compiler_environment_variables(pkg): if compiler.fc: os.environ['SPACK_FC'] = compiler.fc - # Incorporate the compiler default flags into the set of flags - for flag in flags:#This is all valid flags as well because it's concrete - if flag in compiler.flags and compiler.flags[flag] != "": - compiler.flags[flag] += ' '+flags[flag] - else: - compiler.flags[flag] = flags[flag] - # Add every valid compiler flag to the environment, prefaced by "SPACK_" for flag in Compiler.valid_compiler_flags(): - #The previous block and concreteness guarantee key safety here - if compiler.flags[flag] != "": - os.environ['SPACK_'+flag.upper()] = compiler.flags[flag] + # Concreteness guarantees key safety here + if flags[flag] != '': + os.environ['SPACK_'+flag.upper()] = flags[flag] os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index ac0ddce10a..40a257489e 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -394,11 +394,14 @@ class FlagMap(HashableMap): Return whether the spec changed. """ changed = False - for k in other: - if k in self: + + # Others_set removes flags set to '' from the comparison + others_set = (k for k in other if other[k] != '') + for k in others_set: + if k in self and self[k] != '': if self[k] != other[k]: - #This will not properly recognize incompatible flags - self[k] += other[k] + # This will not recognize incompatible flags, merely concatenates + self[k] += ' ' + other[k] changed = True else: self[k] = other[k] @@ -912,7 +915,6 @@ class Spec(object): while changed: #debugging code -# print self, "raw" a = self.normalize(force=force) # print self, "normal" b = self._expand_virtual_packages() @@ -927,6 +929,16 @@ class Spec(object): changed = any(changes) force=True + # Include the compiler flag defaults from the config files + # This ensures that spack will detect conflicts that stemp from a change + # in default compiler flags. + pkg = spack.db.get(self) + for flag in pkg.compiler.flags: + if self.compiler_flags[flag] == '': + self.compiler_flags[flag] += pkg.compiler.flags[flag] + else: + self.compiler_flags[flag] += ' ' + pkg.compiler.flags[flag] + self._concrete = True @@ -1116,12 +1128,6 @@ class Spec(object): def _normalize_helper(self, visited, spec_deps, provider_index): """Recursive helper function for _normalize.""" - print self,"self help" -# print -# from spack.graph import graph_ascii -# graph_ascii(self) -# print - print spec_deps if self.name in visited: return False visited.add(self.name) @@ -1186,10 +1192,6 @@ class Spec(object): visited = set() any_change = self._normalize_helper(visited, spec_deps, index) - print self, "self norm" - print spec_deps - print visited - # If there are deps specified but not visited, they're not # actually deps of this package. Raise an error. extra = set(spec_deps.keys()).difference(visited) -- cgit v1.2.3-70-g09d2 From 6fa0bb991a16bf468e3ad88226b22faa5c290d00 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 30 Oct 2015 14:08:09 -0700 Subject: Removed cflags from default format string and made them an option within the compiler string. Added -f option to find command; with -f, find prints flags --- lib/spack/spack/cmd/find.py | 40 +++++++++++++++++++++++++++++----------- lib/spack/spack/spec.py | 14 ++++++++++---- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 0b0dd6ef6f..0728f3f1b2 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -53,6 +53,9 @@ def setup_parser(subparser): subparser.add_argument( '-L', '--very-long', action='store_true', dest='very_long', help='Show dependency hashes as well as versions.') + subparser.add_argument( + '-f', '--show-flags', action='store_true', dest='show_flags', + help='Show spec compiler flags.') subparser.add_argument( '-u', '--unknown', action='store_true', dest='unknown', @@ -76,12 +79,18 @@ def gray_hash(spec, length): def display_specs(specs, **kwargs): mode = kwargs.get('mode', 'short') hashes = kwargs.get('long', False) + print hashes hlen = 7 if kwargs.get('very_long', False): hashes = True hlen = None + format_string = '$_$@$+' + flags = kwargs.get('show_flags', False) + if flags: + format_string = '$_$@$%+$+' + # Make a dict with specs keyed by architecture and compiler. index = index_by(specs, ('architecture', 'compiler')) @@ -97,7 +106,7 @@ def display_specs(specs, **kwargs): specs = index[(architecture,compiler)] specs.sort() - abbreviated = [s.format('$_$@$+', color=True) for s in specs] + abbreviated = [s.format(format_string, color=True) for s in specs] if mode == 'paths': # Print one spec per line along with prefix path width = max(len(s) for s in abbreviated) @@ -112,20 +121,28 @@ def display_specs(specs, **kwargs): elif mode == 'deps': for spec in specs: print spec.tree( - format='$_$@$+', + format=format_string, color=True, indent=4, prefix=(lambda s: gray_hash(s, hlen)) if hashes else None) elif mode == 'short': - def fmt(s): - string = "" - if hashes: - string += gray_hash(s, hlen) + ' ' - string += s.format('$-_$@$+', color=True) - - return string - colify(fmt(s) for s in specs) + # Print columns of output if not printing flags + if not flags: + def fmt(s): + string = "" + if hashes: + string += gray_hash(s, hlen) + ' ' + string += s.format('$-_$@$+', color=True) + + return string + colify(fmt(s) for s in specs) + # Print one entry per line if including flags + else: + for spec in specs: + # Print the hash if necessary + hsh = gray_hash(spec, hlen) + ' ' if hashes else '' + print hsh + spec.format(format_string, color=True) + '\n' else: raise ValueError( @@ -171,4 +188,5 @@ def find(parser, args): tty.msg("%d installed packages." % len(specs)) display_specs(specs, mode=args.mode, long=args.long, - very_long=args.very_long) + very_long=args.very_long, + show_flags=args.show_flags) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 40a257489e..b9dcd91e99 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1630,7 +1630,9 @@ class Spec(object): $@ Version $% Compiler $%@ Compiler & compiler version - $+ Options & compiler flags + $%+ Compiler and compiler flags + $%@+ Compiler, compiler version, and compiler flags + $+ Options $= Architecture $# 7-char prefix of DAG hash $$ $ @@ -1684,8 +1686,6 @@ class Spec(object): elif c == '+': if self.variants: write(fmt % str(self.variants), c) - if self.compiler_flags: - write(fmt % str(self.compiler_flags), '%') elif c == '=': if self.architecture: write(fmt % ('+arch' + c + str(self.architecture)), c) @@ -1702,11 +1702,17 @@ class Spec(object): if (self.compiler and self.compiler.versions and self.compiler.versions != _any_version): write(c + str(self.compiler.versions), '%') + elif c == '+': + if self.compiler_flags: + write(fmt % str(self.compiler_flags), '%') + compiler = False elif c == '$': escape = True + compiler = False else: out.write(c) - compiler = False + compiler = False + elif c == '$': escape = True -- cgit v1.2.3-70-g09d2 From 6f339939c4481ac620a57b90bc3411e47baa35be Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 5 Nov 2015 14:17:25 -0800 Subject: Removed "any-pkg-name" and replaced it with empty string. Also changed cflag concretizer to concretize each flag individually, allowing us to have unconcretized FlagMap objects for find and uninstall. Now empty flags in find match any, whereas specifying +cflags=\'\' matches only those with empty strings for flags --- lib/spack/spack/concretize.py | 35 +++++++++++++++++++++-------------- lib/spack/spack/packages.py | 2 +- lib/spack/spack/spec.py | 22 +++++++++++----------- lib/spack/spack/virtual.py | 4 ++-- 4 files changed, 35 insertions(+), 28 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 946199bc6c..ae2f9716a6 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -38,7 +38,7 @@ import spack.compilers import spack.architecture import spack.error from spack.version import * - +import spack.compiler as Compiler class DefaultConcretizer(object): @@ -181,20 +181,27 @@ class DefaultConcretizer(object): compiler is used, defaulting to no compiler flags in the spec. Default specs set at the compiler level will still be added later. """ - try: - nearest = next(p for p in spec.traverse(direction='parents') - if p.compiler == spec.compiler and p is not spec) - if spec.compiler_flags == nearest.compiler_flags: - return False - spec.compiler_flags = nearest.compiler_flags.copy() - - except StopIteration: - if spec.compiler_flags == spec.root.compiler_flags: - return False - spec.compiler_flags = spec.root.compiler_flags - - return True # things changed. + ret = False + for flag in Compiler.valid_compiler_flags(): + print flag + try: + nearest = next(p for p in spec.traverse(direction='parents') + if p.compiler == spec.compiler and p is not spec + and flag in p.compiler_flags) + if ((not flag in spec.compiler_flags) or + spec.compiler_flags[flag] != p.compiler_flags[flag]): + spec.compiler_flags[flag] = p.compiler_flags[flag] + ret = True + + except StopIteration: + if (flag in spec.root.compiler_flags and ((not flag in spec.compiler_flags) or + spec.compiler_flags[flag] != spec.root.compiler_flags[flag])): + spec.compiler_flags[flag] = spec.root.compiler_flags[flag] + ret = True + else: + spec.compiler_flags[flag] = '' + return ret def choose_provider(self, spec, providers): diff --git a/lib/spack/spack/packages.py b/lib/spack/spack/packages.py index 78a69a737d..80b91f4ef1 100644 --- a/lib/spack/spack/packages.py +++ b/lib/spack/spack/packages.py @@ -153,7 +153,7 @@ class PackageDB(object): @memoized def exists(self, pkg_name): """Whether a package with the supplied name exists .""" - if pkg_name == "any-pkg-name": + if pkg_name == "": return True return os.path.exists(self.filename_for_package_name(pkg_name)) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index b9dcd91e99..6335567e66 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -376,8 +376,6 @@ class FlagMap(HashableMap): def __init__(self, spec): super(FlagMap, self).__init__() self.spec = spec - for flag in Compiler.valid_compiler_flags(): - self[flag] = "" def satisfies(self, other, strict=False): @@ -386,7 +384,9 @@ class FlagMap(HashableMap): return all(k in self and self[k] == other[k] for k in other if other[k] != "") else: - return self == other + return all(k in self and self[k] == other[k] + for k in other) + def constrain(self, other): """Add all flags in other that aren't in self to self. @@ -581,7 +581,7 @@ class Spec(object): @staticmethod def is_virtual(name): """Test if a name is virtual without requiring a Spec.""" - return name != "any-pkg-name" and not spack.db.exists(name) + return name != "" and not spack.db.exists(name) @property @@ -904,7 +904,7 @@ class Spec(object): with requirements of its pacakges. See flatten() and normalize() for more details on this. """ - if self.name == "any-pkg-name": + if self.name == "": raise SpecError("Attempting to concretize anonymous spec") if self._concrete: @@ -1239,7 +1239,7 @@ class Spec(object): """ other = self._autospec(other) - if not (self.name == other.name or self.name == "any-pkg-name" or other.name == "any-pkg-name"): + if not (self.name == other.name or self.name == "" or other.name == ""): raise UnsatisfiableSpecNameError(self.name, other.name) if not self.versions.overlaps(other.versions): @@ -1332,7 +1332,7 @@ class Spec(object): try: spec = spack.spec.Spec(spec_like) - if spec.name == "any-pkg-name": + if spec.name == "": raise SpecError("anonymous package -- this will always be handled") return spec except SpecError: @@ -1365,7 +1365,7 @@ class Spec(object): return False # Otherwise, first thing we care about is whether the name matches - if self.name != other.name and self.name != "any-pkg-name" and other.name != "any-pkg-name": + if self.name != other.name and self.name != "" and other.name != "": return False if self.versions and other.versions: @@ -1382,7 +1382,7 @@ class Spec(object): return False var_strict = strict - if self.name == "any-pkg-name" or other.name == "any-pkg-name": + if self.name == "" or other.name == "": var_strict = True if not self.variants.satisfies(other.variants, strict=var_strict): return False @@ -1401,7 +1401,7 @@ class Spec(object): # If we need to descend into dependencies, do it, otherwise we're done. if deps: deps_strict = strict - if self.name == "any-pkg-name" or other.name == "any-pkg-name": + if self.name == "" or other.name == "": deps_strict=True return self.satisfies_dependencies(other, strict=deps_strict) else: @@ -1888,7 +1888,7 @@ class SpecParser(spack.parse.Parser): def empty_spec(self): """Create a Null spec from which dependency constraints can be hung""" spec = Spec.__new__(Spec) - spec.name = "any-pkg-name" + spec.name = "" spec.versions = VersionList(':') spec.variants = VariantMap(spec) spec.architecture = None diff --git a/lib/spack/spack/virtual.py b/lib/spack/spack/virtual.py index c988d14c49..8e51b87acd 100644 --- a/lib/spack/spack/virtual.py +++ b/lib/spack/spack/virtual.py @@ -67,8 +67,8 @@ class ProviderIndex(object): if type(spec) != spack.spec.Spec: spec = spack.spec.Spec(spec) - if spec.name == "any-pkg-name": - #The "any" name does not have a package + if spec.name == "": + # Empty specs do not have a package return assert(not spec.virtual) -- cgit v1.2.3-70-g09d2 From 5e75a5c81ca4be5622e755723a4573640b8109e9 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 5 Nov 2015 14:55:24 -0800 Subject: Fixed bug that spack.db.exists() returned True for anonymous specs --- lib/spack/spack/cmd/find.py | 3 +-- lib/spack/spack/packages.py | 2 +- lib/spack/spack/spec.py | 10 ++++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 0728f3f1b2..6697e52de2 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -79,7 +79,6 @@ def gray_hash(spec, length): def display_specs(specs, **kwargs): mode = kwargs.get('mode', 'short') hashes = kwargs.get('long', False) - print hashes hlen = 7 if kwargs.get('very_long', False): @@ -154,7 +153,7 @@ def find(parser, args): # Filter out specs that don't exist. query_specs = spack.cmd.parse_specs(args.query_specs) query_specs, nonexisting = partition_list( - query_specs, lambda s: spack.db.exists(s.name)) + query_specs, lambda s: spack.db.exists(s.name) or s.name == "") if nonexisting: msg = "No such package%s: " % ('s' if len(nonexisting) > 1 else '') diff --git a/lib/spack/spack/packages.py b/lib/spack/spack/packages.py index 80b91f4ef1..2e90e22c29 100644 --- a/lib/spack/spack/packages.py +++ b/lib/spack/spack/packages.py @@ -154,7 +154,7 @@ class PackageDB(object): def exists(self, pkg_name): """Whether a package with the supplied name exists .""" if pkg_name == "": - return True + return False return os.path.exists(self.filename_for_package_name(pkg_name)) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 6335567e66..5aac669871 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1175,6 +1175,9 @@ class Spec(object): TODO: normalize should probably implement some form of cycle detection, to ensure that the spec is actually a DAG. """ + if self.name == "": + raise SpecError("Attempting to normalize anonymous spec") + if self._normal and not force: return False @@ -1217,8 +1220,8 @@ class Spec(object): UnsupportedCompilerError. """ for spec in self.traverse(): - # Don't get a package for a virtual name. - if not spec.virtual: + # Don't get a package for a virtual name or an anonymous name + if (not spec.virtual) and spack.db.exists(spec.name): spack.db.get(spec.name) # validate compiler in addition to the package name. @@ -1897,6 +1900,9 @@ class SpecParser(spack.parse.Parser): spec.dependents = DependencyMap() spec.dependencies = DependencyMap() + spec._normal = False + spec._concrete = False + #Should we be able to add cflags eventually? while self.next: if self.accept(ON): -- cgit v1.2.3-70-g09d2 From 5417a514e9c71e8f3b75c5b4239c727aff6fde1d Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 10 Nov 2015 18:44:01 -0800 Subject: Eliminated two bugs found by spack test and rewrote the parser to be more sane --- lib/spack/spack/concretize.py | 9 ++-- lib/spack/spack/spec.py | 96 +++++++++---------------------------------- 2 files changed, 23 insertions(+), 82 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index ae2f9716a6..fb8dfb3ee4 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -183,14 +183,13 @@ class DefaultConcretizer(object): """ ret = False for flag in Compiler.valid_compiler_flags(): - print flag try: nearest = next(p for p in spec.traverse(direction='parents') - if p.compiler == spec.compiler and p is not spec - and flag in p.compiler_flags) + if ((p.compiler == spec.compiler and p is not spec) + and flag in p.compiler_flags)) if ((not flag in spec.compiler_flags) or - spec.compiler_flags[flag] != p.compiler_flags[flag]): - spec.compiler_flags[flag] = p.compiler_flags[flag] + spec.compiler_flags[flag] != nearest.compiler_flags[flag]): + spec.compiler_flags[flag] = nearest.compiler_flags[flag] ret = True except StopIteration: diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 5aac669871..f95d7950a0 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1812,52 +1812,28 @@ class SpecParser(spack.parse.Parser): try: while self.next: if self.accept(ID): - specs.append(self.spec()) + specs.append(self.spec(self.token.value)) elif self.accept(HASH): specs.append(self.spec_by_hash()) elif self.accept(DEP): if not specs: - specs.append(self.empty_spec()) + specs.append(self.spec('')) if self.accept(HASH): specs[-1]._add_dependency(self.spec_by_hash()) else: self.expect(ID) - specs[-1]._add_dependency(self.spec()) - - elif self.accept(PCT): - specs.append(self.empty_spec()) - specs[-1]._set_compiler(self.compiler()) - - elif self.accept(ON): - specs.append(self.empty_spec()) - self.expect(ID) - self.check_identifier() - name = self.token.value - if self.accept(EQ): - if self.accept(QT): - self.token.value = self.token.value[1:-1] - else: - self.expect(ID) - specs[-1]._add_flag(name,self.token.value) - else: - specs[-1]._add_variant(self.variant(name),True) - - elif self.accept(OFF): - specs.append(self.empty_spec()) - specs[-1]._add_variant(self.variant(),False) + specs[-1]._add_dependency(self.spec(self.token.value)) else: - self.unexpected_token() + # Attempt to construct an anonymous spec, but check that the first token is valid + # TODO: Is this check even necessary, or will it all be Lex errors now? + specs.append(self.spec('',True)) except spack.parse.ParseError, e: raise SpecParseError(e) -# for top_spec in specs: -# for spec in top_spec.traverse(): -# if 'arch' in spec.variants: -# spec.architecture = spec.variants['arch'] return specs @@ -1888,55 +1864,16 @@ class SpecParser(spack.parse.Parser): return matches[0] - def empty_spec(self): - """Create a Null spec from which dependency constraints can be hung""" - spec = Spec.__new__(Spec) - spec.name = "" - spec.versions = VersionList(':') - spec.variants = VariantMap(spec) - spec.architecture = None - spec.compiler = None - spec.compiler_flags = FlagMap(spec) - spec.dependents = DependencyMap() - spec.dependencies = DependencyMap() - - spec._normal = False - spec._concrete = False - - #Should we be able to add cflags eventually? - while self.next: - if self.accept(ON): - self.expect(ID) - self.check_identifier() - name = self.token.value - if self.accept(EQ): - if self.accept(QT): - self.token.value = self.token.value[1:-1] - else: - self.expect(ID) - spec._add_flag(name,self.token.value) - else: - spec._add_variant(self.variant(name),True) - - elif self.accept(OFF): - spec._add_variant(self.variant(),False) - - elif self.accept(PCT): - spec._set_compiler(self.compiler()) - else: - break - - return spec - - def spec(self): + def spec(self, name, check_valid_token = False): """Parse a spec out of the input. If a spec is supplied, then initialize and return it instead of creating a new one.""" - self.check_identifier() + if name != '': + self.check_identifier() # This will init the spec without calling __init__. spec = Spec.__new__(Spec) - spec.name = self.token.value + spec.name = name spec.versions = VersionList() spec.variants = VariantMap(spec) spec.architecture = None @@ -1958,28 +1895,33 @@ class SpecParser(spack.parse.Parser): for version in vlist: spec._add_version(version) added_version = True - + check_valid_token = False elif self.accept(ON): self.expect(ID) self.check_identifier() - name = self.token.value + input = self.token.value if self.accept(EQ): if self.accept(QT): self.token.value = self.token.value[1:-1] else: self.expect(ID) - spec._add_flag(name,self.token.value) + spec._add_flag(input,self.token.value) else: - spec._add_variant(self.variant(name),True) + spec._add_variant(self.variant(input),True) + check_valid_token = False elif self.accept(OFF): spec._add_variant(self.variant(),False) + check_valid_token = False elif self.accept(PCT): spec._set_compiler(self.compiler()) + check_valid_token = False else: + if check_valid_token: + self.unexpected_token() break # If there was no version in the spec, consier it an open range -- cgit v1.2.3-70-g09d2 From cd69681ae567efeee0703b4f106094142a0f697f Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 Nov 2015 10:09:03 -0800 Subject: merged in work from other computer and starting to track down bugs --- lib/spack/spack/spec.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index f95d7950a0..72117e1cb3 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1834,6 +1834,7 @@ class SpecParser(spack.parse.Parser): except spack.parse.ParseError, e: raise SpecParseError(e) + return specs @@ -1900,15 +1901,16 @@ class SpecParser(spack.parse.Parser): elif self.accept(ON): self.expect(ID) self.check_identifier() - input = self.token.value + option = self.token.value if self.accept(EQ): if self.accept(QT): self.token.value = self.token.value[1:-1] else: self.expect(ID) - spec._add_flag(input,self.token.value) + print "about to add", option, "=", self.token.value + spec._add_flag(option,self.token.value) else: - spec._add_variant(self.variant(input),True) + spec._add_variant(self.variant(option),True) check_valid_token = False elif self.accept(OFF): -- cgit v1.2.3-70-g09d2 From 5347f460b4f2ce8ad64f6ec225779c2a2f944ad4 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 Nov 2015 10:31:37 -0800 Subject: adding module find to find command --- lib/spack/spack/compiler.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 4ce6e3f11d..e4bfeea608 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -106,7 +106,7 @@ class Compiler(object): PrgEnv_compiler = None - def __init__(self, cspec, cc, cxx, f77, fc, module=None): + def __init__(self, cspec, cc, cxx, f77, fc, modules=None): def check(exe): if exe is None: return None @@ -119,7 +119,7 @@ class Compiler(object): self.fc = check(fc) self.spec = cspec - self.modules = modules.split() + self.modules = modules @@ -216,6 +216,10 @@ class Compiler(object): @classmethod def find(cls, *path): + return cls.find_in_path(*path) + cls.find_in_modules() + + @classmethod + def find_in_path(cls, *path): """Try to find this type of compiler in the user's environment. For each set of compilers found, this returns compiler objects with the cc, cxx, f77, fc paths and the @@ -273,7 +277,9 @@ class Compiler(object): if not cls.PrgEnv_compiler: tty.die('Must supply PrgEnv_compiler with PrgEnv') - output = _shell('module avail %s' % cls.PrgEnv_compiler) +# output = _shell('module avail %s' % cls.PrgEnv_compiler) + modulecmd = which('modulecmd') + modulecmd matches = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, output) for name, version in matches: -- cgit v1.2.3-70-g09d2 From 95a34628a3bebe3d263afbd2707cb5d47a2b7a33 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 Nov 2015 11:32:18 -0800 Subject: Add modules to compilers. Changed compiler to take paths as a list. Changed compiler_for_spec to be aware of different compiler stratigies --- lib/spack/spack/compiler.py | 61 +++++++++-------------------------- lib/spack/spack/compilers/__init__.py | 13 ++++++-- lib/spack/spack/package.py | 2 +- 3 files changed, 27 insertions(+), 49 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 67765dfb7b..4be573fb12 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -106,17 +106,20 @@ class Compiler(object): PrgEnv_compiler = None - def __init__(self, cspec, cc, cxx, f77, fc, modules=None): + def __init__(self, cspec, paths, modules=None): def check(exe): if exe is None: return None _verify_executables(exe) return exe - self.cc = check(cc) - self.cxx = check(cxx) - self.f77 = check(f77) - self.fc = check(fc) + self.cc = check(paths[0]) + self.cxx = check(paths[1]) + self.f77 = check(paths[2]) + if len(paths) == 3: + self.fc = self.f77 + else: + self.fc = check(paths[3]) self.spec = cspec self.modules = modules @@ -264,7 +267,7 @@ class Compiler(object): if newcount <= prevcount: continue - compilers[ver] = cls(spec, *paths) + compilers[ver] = cls(spec, paths) return list(compilers.values()) @@ -277,60 +280,26 @@ class Compiler(object): if not cls.PrgEnv_compiler: tty.die('Must supply PrgEnv_compiler with PrgEnv') -# output = _shell('module avail %s' % cls.PrgEnv_compiler) modulecmd = which('modulecmd') - modulecmd + modulecmd.add_default_arg('python') + output = modulecmd('avail', return_oe=True) matches = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, output) - loaded_modules = os.environ["LOADEDMODULES"].split(":") +# loaded_modules = os.environ["LOADEDMODULES"].split(":") #output = _shell('module avail %s' % cls.PrgEnv_compiler) - for module in loaded_modules: - match = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, module) +# for module in loaded_modules: +# match = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, module) for name, version in matches: v = version + '-craype' comp = cls(spack.spec.CompilerSpec(name + '@' + v), - 'cc', 'CC', 'ftn', 'ftn', name +'/' + v) + ['cc', 'CC', 'ftn'], [cls.PrgEnv, name +'/' + v]) compilers.append(comp) return compilers -def _cur_prgenv(): - out, err = subprocess.Popen( - ['module list'], shell=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() - matches = re.findall(r'(PrgEnv-[^/]*)/', err) - return matches[0] - - -def _module_shell(module, *args): - cmd = 'module swap %s %s;' % (_cur_prgenv(), module) - cmd += 'module load %s;' % compiler - cmd += 'module unload cray-libsci;' - -# + -# 'module load craype-network-gemini;' + -# 'module load %s;' % module + -# 'module swap gcc/4.6.1;' + -# 'module load eswrap; ' + -# 'module load craype-mc12; ' + -# 'module load cray-shmem; ' + -# 'module load cray-mpich; ') - cmd += ' '.join(args) - out, err = subprocess.Popen([cmd + ' '.join(args)], shell=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() - return out - - -def _shell(*args): - return subprocess.Popen([' '.join(args)], shell=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[1] - - - - def __repr__(self): """Return a string represntation of the compiler toolchain.""" return self.__str__() diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 8c4cb38926..6fc54daa61 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -197,18 +197,27 @@ def compilers_for_spec(compiler_spec): else: compiler_paths.append(None) - return cls(cspec, *compiler_paths) + for m in _optional_instance_vars: + if m not in items: + items[m] = None + mods = items[m] + + return cls(cspec, compiler_paths, mods) matches = find(compiler_spec) return [get_compiler(cspec) for cspec in matches] @_auto_compiler_spec -def compiler_for_spec(compiler_spec): +def compiler_for_spec(compiler_spec, target): """Get the compiler that satisfies compiler_spec. compiler_spec must be concrete.""" assert(compiler_spec.concrete) compilers = compilers_for_spec(compiler_spec) + if target.compiler_strategy == "PATH": + filter(lambda c: c.modules is None, compilers) + elif target.compiler_strategy == "MODULES": + filter(lambda c: c.modules is not None, compilers) assert(len(compilers) == 1) return compilers[0] diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 61606d0590..b6a98f3ee6 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -592,7 +592,7 @@ class Package(object): """Get the spack.compiler.Compiler object used to build this package.""" if not self.spec.concrete: raise ValueError("Can only get a compiler for a concrete package.") - return spack.compilers.compiler_for_spec(self.spec.compiler) + return spack.compilers.compiler_for_spec(self.spec.compiler, self.spec.architecture) def url_version(self, version): -- cgit v1.2.3-70-g09d2 From 271a839957ace370ce332f8edd3321e60127a9e6 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 Nov 2015 14:22:07 -0800 Subject: First possibly working version of the crayport. Not sufficiently tested at all. --- lib/spack/spack/architecture.py | 41 +++++++++++++++++++--------------- lib/spack/spack/architectures/linux.py | 13 ++++++----- lib/spack/spack/build_environment.py | 6 ++--- lib/spack/spack/compiler.py | 8 +++++-- lib/spack/spack/compilers/__init__.py | 6 ++--- lib/spack/spack/concretize.py | 28 +---------------------- lib/spack/spack/config.py | 5 +++-- 7 files changed, 46 insertions(+), 61 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 64416e8b4c..b1da8ae4a2 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -61,18 +61,20 @@ class Target(object): def set_architecture(self, architecture): # Target should get the architecture class. self.architecture = architecture - + @property def compiler_strategy(self): - if default_strategy: - return default_strategy - elif self.module_name: # If there is a module_name given then use MODULES + if self.module_name: # If there is a module_name given then use MODULES return "MODULES" else: return "PATH" + def __str__(self): + return self.name + + class Architecture(object): - """ Abstract class that each type of Architecture will subclass. Will return a instance of it once it + """ Abstract class that each type of Architecture will subclass. Will return a instance of it once it is returned """ @@ -110,12 +112,15 @@ class Architecture(object): @classmethod def detect(self): - """ Subclass is responsible for implementing this method. + """ Subclass is responsible for implementing this method. Returns True if the architecture detects if it is the current architecture and False if it's not. """ raise NotImplementedError() - + + def __repr__(self): + return self.__str__ + def __str__(self): return self.name @@ -123,7 +128,7 @@ class Architecture(object): def get_sys_type_from_spack_globals(): """Return the SYS_TYPE from spack globals, or None if it isn't set.""" if not hasattr(spack, "sys_type"): - return None + return None elif hasattr(spack.sys_type, "__call__"): return spack.sys_type() #If in __init__.py there is a sys_type() then call that else: @@ -147,7 +152,7 @@ def get_mac_sys_type(): def get_sys_type_from_uname(): - """ Returns a sys_type from the uname argument + """ Returns a sys_type from the uname argument Front-end config """ try: @@ -158,8 +163,8 @@ def get_sys_type_from_uname(): return None def get_sys_type_from_config_file(): - - spack_home_dir = os.environ["HOME"] + "/.spack" + + spack_home_dir = os.environ["HOME"] + "/.spack" yaml_file = os.path.join(spack_home_dir, 'architecture.yaml') try: config_dict = yaml.load(open(yaml_file)) # Fix this to have yaml.load() @@ -167,7 +172,7 @@ def get_sys_type_from_config_file(): front = arch['front'] back = arch['back'] return Architecture(front,back) - + except: print "No architecture.yaml config file found" return None @@ -182,7 +187,7 @@ def all_architectures(): mod = imp.load_source(mod_name, path) class_name = mod_to_class(name) if not hasattr(mod, class_name): - tty.die('No class %s defined in %s' % (class_name, mod_name)) + tty.die('No class %s defined in %s' % (class_name, mod_name)) cls = getattr(mod, class_name) if not inspect.isclass(cls): tty.die('%s.%s is not a class' % (mod_name, class_name)) @@ -197,15 +202,15 @@ def sys_type(): 1. YAML file that the user specifies the name of the architecture. e.g Cray-XC40 or Cray-XC30 2. UNAME 3. GLOBALS - 4. MAC OSX + 4. MAC OSX Yaml should be a priority here because we want the user to be able to specify the type of architecture to use. - If there is no yaml present then it should move on to the next function and stop immediately once it gets a + If there is no yaml present then it should move on to the next function and stop immediately once it gets a arch name """ # Try to create an architecture object using the config file FIRST - architecture_list = all_architectures() - architecture_list.sort(key = lambda a: a.priority) - + architecture_list = all_architectures() + architecture_list.sort(key = lambda a: a.priority) + for arch in architecture_list: if arch.detect(): return arch() diff --git a/lib/spack/spack/architectures/linux.py b/lib/spack/spack/architectures/linux.py index 7238575660..d7d9a994fa 100644 --- a/lib/spack/spack/architectures/linux.py +++ b/lib/spack/spack/architectures/linux.py @@ -1,14 +1,15 @@ -import subprocess -from spack.architecture import Architecture +import subprocess +from spack.architecture import Architecture, Target class Linux(Architecture): - priority = 60 - front_end = "x86_64" - back_end = "x86_64" - default = "x86_64" + priority = 60 + front_end = 'linux' + back_end = 'linux' + default = 'linux' def __init__(self): super(Linux, self).__init__('linux') + self.add_target('linux', Target('linux')) @classmethod def detect(self): diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 191e858735..9e3be433fb 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -88,13 +88,13 @@ class MakeExecutable(Executable): def load_module(mod): """Takes a module name and removes modules until it is possible to - load that module. It then loads the provided module. Depends on the + load that module. It then loads the provided module. Depends on the modulecmd implementation of modules used in cray and lmod. """ #Create an executable of the module command that will output python code modulecmd = which('modulecmd') modulecmd.add_default_arg('python') - + # Read the module and remove any conflicting modules # We do this without checking that they are already installed # for ease of programming because unloading a module that is not @@ -102,7 +102,7 @@ def load_module(mod): text = modulecmd('show', mod, return_oe=True).split() for i, word in enumerate(text): if word == 'conflict': - exec(compile(modulecmd('unload', text[i+1], return_oe=True), '', 'exec')) + exec(compile(modulecmd('unload', text[i+1], return_oe=True), '', 'exec')) # Load the module now that there are no conflicts load = modulecmd('load', mod, return_oe=True) exec(compile(load, '', 'exec')) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 4be573fb12..41ff89a151 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -307,8 +307,12 @@ class Compiler(object): def __str__(self): """Return a string represntation of the compiler toolchain.""" - return "%s(%s)" % ( - self.name, '\n '.join((str(s) for s in (self.cc, self.cxx, self.f77, self.fc)))) + if self.modules: + return "%s(%s)" % ( + self.name, '\n '.join((str(s) for s in (self.cc, self.cxx, self.f77, self.fc, self.modules)))) + else: + return "%s(%s)" % ( + self.name, '\n '.join((str(s) for s in (self.cc, self.cxx, self.f77, self.fc)))) class CompilerAccessError(spack.error.SpackError): diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 6fc54daa61..23ff6cced4 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -44,15 +44,15 @@ from spack.util.environment import get_path _imported_compilers_module = 'spack.compilers' _required_instance_vars = ['cc', 'cxx', 'f77', 'fc'] -_optional_instance_vars = ['module'] +_optional_instance_vars = ['modules'] _default_order = ['gcc', 'intel', 'pgi', 'clang', 'xlc'] def _auto_compiler_spec(function): - def converter(cspec_like): + def converter(cspec_like, *args): if not isinstance(cspec_like, spack.spec.CompilerSpec): cspec_like = spack.spec.CompilerSpec(cspec_like) - return function(cspec_like) + return function(cspec_like, *args) return converter diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index c5041d67be..4b4cb69033 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -97,32 +97,6 @@ class DefaultConcretizer(object): def concretize_architecture(self, spec): - """If the spec already had an architecture, return. Otherwise if - the root of the DAG has an architecture, then use that. - Otherwise take the system's default architecture. - - Intuition: Architectures won't be set a lot, and generally you - want the host system's architecture. When architectures are - mised in a spec, it is likely because the tool requries a - cross-compiled component, e.g. for tools that run on BlueGene - or Cray machines. These constraints will likely come directly - from packages, so require the user to be explicit if they want - to mess with the architecture, and revert to the default when - they're not explicit. - """ - if spec.architecture is not None: - return False - - if spec.root.architecture: - spec.architecture = spec.root.architecture - else: - spec.architecture = spack.architecture.sys_type() - - assert(spec.architecture is not None) - return True # changed - - - def new_concretize_architecture(self, spec): """If the spec already has an architecture and it is a an architecture type, return. Otherwise, if it has an architecture that is a string type, generate an architecture based on that type. If it has no architecture and the root of the @@ -146,7 +120,7 @@ class DefaultConcretizer(object): else: arch = spack.architecture.sys_type() spec.architecture = arch.target('default') - + return True #changed diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 3e91958c2c..bc655d6051 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -199,6 +199,7 @@ def get_config(category_name): category.result_dict = _merge_dicts(category.result_dict, result) else: category.result_dict = result + return category.result_dict @@ -208,7 +209,7 @@ def get_compilers_config(arch=None): configuration""" global _compiler_by_arch if not arch: - arch = spack.architecture.sys_type() + arch = str(spack.architecture.sys_type()) if arch in _compiler_by_arch: return _compiler_by_arch[arch] @@ -305,7 +306,7 @@ def add_to_compiler_config(addition_dict, scope=None, arch=None): """Add compilerss to the configuration files""" if not arch: arch = spack.architecture.sys_type() - add_to_config('compilers', { arch : addition_dict }, scope) + add_to_config('compilers', { str(arch) : addition_dict }, scope) clear_config_caches() -- cgit v1.2.3-70-g09d2 From 8a13d344a898195c6eb33d8bea151487d0d209bd Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 Nov 2015 15:07:57 -0800 Subject: bug fix in spec.py --- lib/spack/spack/spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index e1fbb84423..3ba9c139a6 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1998,4 +1998,4 @@ class UnsatisfiableDependencySpecError(UnsatisfiableSpecError): class SpackYAMLError(spack.error.SpackError): def __init__(self, msg, yaml_error): - super(SpackError, self).__init__(msg, str(yaml_error)) + super(SpackYAMLError, self).__init__(msg, str(yaml_error)) -- cgit v1.2.3-70-g09d2 From 3067705c109aef062823e62f0bb8a9d977a10a35 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 Nov 2015 16:16:47 -0800 Subject: made a to_dict for targets. Also a from_dict for sanity --- lib/spack/spack/architecture.py | 19 +++++++++++++++++++ lib/spack/spack/spec.py | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index b1da8ae4a2..642a589f35 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -69,6 +69,25 @@ class Target(object): else: return "PATH" + def to_dict(self): + print "to_dict" + d = {} + d['name'] = self.name + d['module_name'] = self.module_name + if self.architecture: + d['architecture'] = self.architecture + return d + + @staticmethod + def from_dict(d): + print "from_dict" + target = Target.__new__(Target) + target.name = d['name'] + target.module_name = d['module_name'] + if 'architecture' in d: + target.architecture = d['architecture'] + return target + def __str__(self): return self.name diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 3ba9c139a6..395faecde6 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -651,7 +651,7 @@ class Spec(object): d = { 'variants' : dict( (name,v.enabled) for name, v in self.variants.items()), - 'arch' : self.architecture, + 'arch' : self.architecture.to_dict(), 'dependencies' : dict((d, self.dependencies[d].dag_hash()) for d in sorted(self.dependencies)) } @@ -680,7 +680,7 @@ class Spec(object): spec = Spec(name) spec.versions = VersionList.from_dict(node) - spec.architecture = node['arch'] + spec.architecture = spack.architecture.Target.from_dict(node['arch']) if node['compiler'] is None: spec.compiler = None -- cgit v1.2.3-70-g09d2 From 185f40eb8bbc19ecd7e2634844c97067388d0422 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 Nov 2015 16:33:22 -0800 Subject: fixed my git problems --- lib/spack/spack/compiler.py | 2 +- lib/spack/spack/compilers/gcc.py | 2 +- lib/spack/spack/compilers/intel.py | 2 +- lib/spack/spack/compilers/pgi.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 41ff89a151..abf7223117 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -291,7 +291,7 @@ class Compiler(object): # match = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, module) for name, version in matches: - v = version + '-craype' + v = version comp = cls(spack.spec.CompilerSpec(name + '@' + v), ['cc', 'CC', 'ftn'], [cls.PrgEnv, name +'/' + v]) diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py index ff0b8889a8..a9a4f729eb 100644 --- a/lib/spack/spack/compilers/gcc.py +++ b/lib/spack/spack/compilers/gcc.py @@ -42,7 +42,7 @@ class Gcc(Compiler): # MacPorts builds gcc versions with prefixes and -mp-X.Y suffixes. suffixes = [r'-mp-\d\.\d'] - PrgEnv = 'gnu' + PrgEnv = 'PrgEnv-gnu' PrgEnv_compiler = 'gcc' @property diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py index 7c485fe69d..4096e32a08 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -37,7 +37,7 @@ class Intel(Compiler): # Subclasses use possible names of Fortran 90 compiler fc_names = ['ifort'] - PrgEnv = 'intel' + PrgEnv = 'PrgEnv-intel' PrgEnv_compiler = 'intel' @property diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py index 8f1ed28825..8010c1d04d 100644 --- a/lib/spack/spack/compilers/pgi.py +++ b/lib/spack/spack/compilers/pgi.py @@ -37,7 +37,7 @@ class Pgi(Compiler): # Subclasses use possible names of Fortran 90 compiler fc_names = ['pgf95', 'pgf90'] - PrgEnv = 'pgi' + PrgEnv = 'PrgEnv-pgi' PrgEnv_compiler = 'pgi' @classmethod -- cgit v1.2.3-70-g09d2 From eb2c08315905e0484dbd4d866396563487d7d249 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 Nov 2015 17:29:47 -0800 Subject: Fixed the to_dict from_dict for targets on cray. First version to build/find properly on Cray --- lib/spack/spack/architecture.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 642a589f35..349a7b33db 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -70,12 +70,11 @@ class Target(object): return "PATH" def to_dict(self): - print "to_dict" d = {} d['name'] = self.name d['module_name'] = self.module_name - if self.architecture: - d['architecture'] = self.architecture +# if self.architecture: +# d['architecture'] = self.architecture return d @staticmethod @@ -84,10 +83,13 @@ class Target(object): target = Target.__new__(Target) target.name = d['name'] target.module_name = d['module_name'] - if 'architecture' in d: - target.architecture = d['architecture'] +# if 'architecture' in d: +# target.architecture = d['architecture'] return target + def __repr__(self): + return self.__str__() + def __str__(self): return self.name @@ -138,7 +140,7 @@ class Architecture(object): raise NotImplementedError() def __repr__(self): - return self.__str__ + return self.__str__() def __str__(self): return self.name -- cgit v1.2.3-70-g09d2 From e78b8c16be5334aa4aea29313a77da8923319a8f Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 12 Nov 2015 13:27:10 -0800 Subject: used key_comparator decorator from util.lang to compare targets. Fixes find bug --- lib/spack/spack/architecture.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 349a7b33db..f4b8585c2f 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -27,7 +27,7 @@ import imp import platform as py_platform import inspect -from llnl.util.lang import memoized, list_modules +from llnl.util.lang import memoized, list_modules, key_ordering from llnl.util.filesystem import join_path import llnl.util.tty as tty @@ -47,6 +47,7 @@ class NoSysTypeError(serr.SpackError): super(NoSysTypeError, self).__init__("Could not determine sys_type for this machine.") +@key_ordering class Target(object): """ Target is the processor of the host machine. The host machine may have different front-end and back-end targets, especially if it is a Cray machine. The target will have a name and @@ -79,7 +80,6 @@ class Target(object): @staticmethod def from_dict(d): - print "from_dict" target = Target.__new__(Target) target.name = d['name'] target.module_name = d['module_name'] @@ -87,6 +87,10 @@ class Target(object): # target.architecture = d['architecture'] return target + + def _cmp_key(self): + return (self.name, self.module_name) + def __repr__(self): return self.__str__() -- cgit v1.2.3-70-g09d2 From 297cebd83328040aef71ed3aaf486a336011116d Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 12 Nov 2015 13:34:40 -0800 Subject: Got rid of print statement --- lib/spack/spack/architecture.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 349a7b33db..d65acd92ba 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -79,7 +79,6 @@ class Target(object): @staticmethod def from_dict(d): - print "from_dict" target = Target.__new__(Target) target.name = d['name'] target.module_name = d['module_name'] -- cgit v1.2.3-70-g09d2 From 7c89f9d18c57e3e0abe40cf608f63015ea9b68f3 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 12 Nov 2015 14:31:41 -0800 Subject: Added the basic ouline of a cray compiler class in lib/spack/spack/compilers/cray.py --- lib/spack/spack/compilers/cray.py | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 lib/spack/spack/compilers/cray.py diff --git a/lib/spack/spack/compilers/cray.py b/lib/spack/spack/compilers/cray.py new file mode 100644 index 0000000000..c2f3ecd6f4 --- /dev/null +++ b/lib/spack/spack/compilers/cray.py @@ -0,0 +1,50 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +import llnl.util.tty as tty +from spack.compiler import * +from spack.version import ver + +class Cray(Compiler): + # Subclasses use possible names of C compiler + cc_names = ['cc'] + + # Subclasses use possible names of C++ compiler + cxx_names = ['CC'] + + # Subclasses use possible names of Fortran 77 compiler + f77_names = ['ftn'] + + # Subclasses use possible names of Fortran 90 compiler + fc_names = ['ftn'] + + # MacPorts builds gcc versions with prefixes and -mp-X.Y suffixes. + suffixes = [r'-mp-\d\.\d'] + + PrgEnv = 'PrgEnv-cray' + PrgEnv_compiler = 'craype' + + @property + def cxx11_flag(self): + return "-hstd=c++11" -- cgit v1.2.3-70-g09d2 From a5ba69d68d1472f22454a93d045632b1340e2b04 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 13 Nov 2015 11:46:13 -0800 Subject: Added a _cmp_key for the architecture class --- lib/spack/spack/architecture.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index f4b8585c2f..786ef34071 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -97,7 +97,7 @@ class Target(object): def __str__(self): return self.name - +@key_ordering class Architecture(object): """ Abstract class that each type of Architecture will subclass. Will return a instance of it once it is returned @@ -148,7 +148,9 @@ class Architecture(object): def __str__(self): return self.name - + + def _cmp_key(self): + return (self.name, (_cmp_key(t) for t in self.targets.values())) def get_sys_type_from_spack_globals(): """Return the SYS_TYPE from spack globals, or None if it isn't set.""" -- cgit v1.2.3-70-g09d2 From 9458f7c7d0ffebfbe33345c1a6b4b07c39e41e5f Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 13 Nov 2015 11:47:36 -0800 Subject: Got rid of my old method of finding in LOADEDMODULES --- lib/spack/spack/compiler.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index abf7223117..5d87588245 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -283,13 +283,9 @@ class Compiler(object): modulecmd = which('modulecmd') modulecmd.add_default_arg('python') output = modulecmd('avail', return_oe=True) - matches = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, output) - -# loaded_modules = os.environ["LOADEDMODULES"].split(":") - #output = _shell('module avail %s' % cls.PrgEnv_compiler) -# for module in loaded_modules: -# match = re.findall(r'(%s)/([^\s(]*)' % cls.PrgEnv_compiler, module) - + matches = re.findall(r'(%s)/(\d+[\.\d]+)' % cls.PrgEnv_compiler, output) +# It's finding a weird third attribute + print matches for name, version in matches: v = version comp = cls(spack.spec.CompilerSpec(name + '@' + v), -- cgit v1.2.3-70-g09d2 From 72fa3c04922b3630c15c69ff51022d88a8bf1de9 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 13 Nov 2015 11:48:15 -0800 Subject: Added craype support --- lib/spack/spack/compilers/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 23ff6cced4..6731318f43 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -46,7 +46,7 @@ _imported_compilers_module = 'spack.compilers' _required_instance_vars = ['cc', 'cxx', 'f77', 'fc'] _optional_instance_vars = ['modules'] -_default_order = ['gcc', 'intel', 'pgi', 'clang', 'xlc'] +_default_order = ['gcc', 'intel', 'pgi', 'clang', 'xlc','craype'] def _auto_compiler_spec(function): def converter(cspec_like, *args): @@ -180,6 +180,7 @@ def compilers_for_spec(compiler_spec): """This gets all compilers that satisfy the supplied CompilerSpec. Returns an empty list if none are found. """ + # cray issue might be located here config = _get_config() def get_compiler(cspec): -- cgit v1.2.3-70-g09d2 From bfd05d3d2702bb2a75fe310fb04eb78ac2526824 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 13 Nov 2015 11:48:49 -0800 Subject: Changed name of file and class to craype to avoid spack freaking out about versions --- lib/spack/spack/compilers/craype.py | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 lib/spack/spack/compilers/craype.py diff --git a/lib/spack/spack/compilers/craype.py b/lib/spack/spack/compilers/craype.py new file mode 100644 index 0000000000..56d6d8d36c --- /dev/null +++ b/lib/spack/spack/compilers/craype.py @@ -0,0 +1,57 @@ +##############################################################################} +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +import llnl.util.tty as tty + +from spack.build_environment import load_module +from spack.compiler import * +from spack.version import ver + +class Craype(Compiler): + # Subclasses use possible names of C compiler + cc_names = ['cc'] + + # Subclasses use possible names of C++ compiler + cxx_names = ['CC'] + + # Subclasses use possible names of Fortran 77 compiler + f77_names = ['ftn'] + + # Subclasses use possible names of Fortran 90 compiler + fc_names = ['ftn'] + + # MacPorts builds gcc versions with prefixes and -mp-X.Y suffixes. + suffixes = [r'-mp-\d\.\d'] + + PrgEnv = 'PrgEnv-cray' + PrgEnv_compiler = 'craype' + + @property + def cxx11_flag(self): + return "-hstd=c++11" + + @classmethod + def default_version(cls, comp): + return get_compiler_version(comp, r'([Vv]ersion).*(\d+(\.\d+)+)') + -- cgit v1.2.3-70-g09d2 From fceb5a75b06b639a6f6d7edf33c3b727e71a491b Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 13 Nov 2015 11:53:38 -0800 Subject: Adding new files to compilers --- lib/spack/spack/compilers/cray.py | 50 --------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 lib/spack/spack/compilers/cray.py diff --git a/lib/spack/spack/compilers/cray.py b/lib/spack/spack/compilers/cray.py deleted file mode 100644 index c2f3ecd6f4..0000000000 --- a/lib/spack/spack/compilers/cray.py +++ /dev/null @@ -1,50 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://scalability-llnl.github.io/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -import llnl.util.tty as tty -from spack.compiler import * -from spack.version import ver - -class Cray(Compiler): - # Subclasses use possible names of C compiler - cc_names = ['cc'] - - # Subclasses use possible names of C++ compiler - cxx_names = ['CC'] - - # Subclasses use possible names of Fortran 77 compiler - f77_names = ['ftn'] - - # Subclasses use possible names of Fortran 90 compiler - fc_names = ['ftn'] - - # MacPorts builds gcc versions with prefixes and -mp-X.Y suffixes. - suffixes = [r'-mp-\d\.\d'] - - PrgEnv = 'PrgEnv-cray' - PrgEnv_compiler = 'craype' - - @property - def cxx11_flag(self): - return "-hstd=c++11" -- cgit v1.2.3-70-g09d2 From 8f56f5cfccb681286ab5d31dbdbed29cdf49a930 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 23 Nov 2015 14:02:59 -0800 Subject: Added path to netcdf and hdf5 using the env vars NETCDF_DIR and HDF5_DIR. --- var/spack/packages/adios/package.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/var/spack/packages/adios/package.py b/var/spack/packages/adios/package.py index 5f298fc6b5..05cbb5f963 100644 --- a/var/spack/packages/adios/package.py +++ b/var/spack/packages/adios/package.py @@ -1,8 +1,10 @@ -from spack import * +import os +from spack import * class Adios(Package): """The Adaptable IO System (ADIOS) provides a simple, - flexible way for scientists to describe the data in their code that may need to be written, + flexible way for scientists to describe the + data in their code that may need to be written, read, or processed outside of the running simulation """ @@ -19,10 +21,12 @@ class Adios(Package): depends_on('mxml') def install(self, spec, prefix): - configure_args = ["--prefix=%s" % prefix, "--with-mxml=%s" % spec['mxml'].prefix, - "--with-hdf5=%s" % spec['hdf5'].prefix, "--with-netcdf=%s" % os.environ['NETCDF_DIR'], + configure_args = ["--prefix=%s" % prefix, + "--with-mxml=%s" % spec['mxml'].prefix, + "--with-hdf5="+os.environ["HDF5_DIR"], + "--with-netcdf="+os.environ["NETCDF_DIR"], "--with-infiniband=no"] - + configure(*configure_args) make() make("install") -- cgit v1.2.3-70-g09d2 From 89fbe4fdfa01b2461a5355a8922e6083f528e409 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 1 Dec 2015 11:55:38 -0800 Subject: Changed add_target to include variables rather than hard-coded strings --- lib/spack/spack/architectures/bgq.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/architectures/bgq.py b/lib/spack/spack/architectures/bgq.py index d3d4446e09..85487626f1 100644 --- a/lib/spack/spack/architectures/bgq.py +++ b/lib/spack/spack/architectures/bgq.py @@ -10,8 +10,8 @@ class Bgq(Architecture): def __init__(self): super(Bgq, self).__init__('cray') - self.add_target('power7', Target('power7')) - self.add_target('powerpc', Target('powerpc')) + self.add_target(self.front_end, Target(self.front_end)) + self.add_target(self.back_end, Target(self.back_end)) @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From 58f2b39bc844d1c8beffd6449a9047c5ec5522e5 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 1 Dec 2015 11:57:17 -0800 Subject: Changed default to CPU_TARGET env var. Helps deal with target differences between cori and edison --- lib/spack/spack/architectures/cray.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/architectures/cray.py b/lib/spack/spack/architectures/cray.py index 640a3933e0..e4a3617dc9 100644 --- a/lib/spack/spack/architectures/cray.py +++ b/lib/spack/spack/architectures/cray.py @@ -6,15 +6,23 @@ class Cray(Architecture): priority = 20 front_end = 'sandybridge' back_end = 'ivybridge' - default = 'ivybridge' - + default = os.environ['CRAY_CPU_TARGET'] + #default = 'ivybridge' + def __init__(self): + ''' Since cori doesn't have ivybridge as a front end it's better + if we use CRAY_CPU_TARGET as the default. This will ensure + that if we're on a XC-40 or XC-30 then we can detect the target + ''' super(Cray, self).__init__('cray') + # Back End compiler needs the proper target module loaded. - self.add_target('ivybridge', Target('ivybridge','craype-ivybridge')) + self.add_target(self.front_end, Target(self.front_end,'craype-' + self.front_end)) + self.add_target(self.default, Target(self.default,'craype-' + self.default)) # Could switch to use modules and fe targets for front end # Currently using compilers by path for front end. - self.add_target('sandybridge', Target('sandybridge')) + self.add_target(self.back_end, Target('craype-' + self.back_end)) + @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From d7fdb8e015d5e6c5b0e06608166307f50f2f046f Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 1 Dec 2015 11:57:54 -0800 Subject: Got rid of hard coded strings for adding default --- lib/spack/spack/architectures/linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/architectures/linux.py b/lib/spack/spack/architectures/linux.py index d7d9a994fa..6c454f7a40 100644 --- a/lib/spack/spack/architectures/linux.py +++ b/lib/spack/spack/architectures/linux.py @@ -9,7 +9,7 @@ class Linux(Architecture): def __init__(self): super(Linux, self).__init__('linux') - self.add_target('linux', Target('linux')) + self.add_target(self.default, Target(self.default)) @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From 4e0d47f1dd1d0eb31ef29e1e25ab68870f087604 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 1 Dec 2015 11:59:19 -0800 Subject: building with GCC needs special variables added. Intel compilers build just fine --- var/spack/packages/adios/package.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/var/spack/packages/adios/package.py b/var/spack/packages/adios/package.py index 05cbb5f963..224c3b37d5 100644 --- a/var/spack/packages/adios/package.py +++ b/var/spack/packages/adios/package.py @@ -19,14 +19,19 @@ class Adios(Package): # module load cray-hdf5/1.8.14 # module load python/2.7.10 depends_on('mxml') - + def install(self, spec, prefix): configure_args = ["--prefix=%s" % prefix, "--with-mxml=%s" % spec['mxml'].prefix, - "--with-hdf5="+os.environ["HDF5_DIR"], - "--with-netcdf="+os.environ["NETCDF_DIR"], - "--with-infiniband=no"] - + "--with-hdf5=%s" % os.environ["HDF5_DIR"], + "--with-netcdf=%s" % os.environ["NETCDF_DIR"], + "--with-infiniband=no", + "MPICC=cc","MPICXX=CC","MPIFC=ftn", + "CPPFLAGS=-DMPICH_IGNORE_CXX_SEEK"] + + if spec.satisfies('%gcc'): + configure_args.extend(["CC=gcc", "CXX=g++", "FC=gfortran"]) + configure(*configure_args) make() make("install") -- cgit v1.2.3-70-g09d2 From 0544b164fc717f5221d7545139c18752129499d4 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 1 Dec 2015 11:59:49 -0800 Subject: Updated script of mini-xml for adios package --- var/spack/packages/mxml/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/packages/mxml/package.py b/var/spack/packages/mxml/package.py index fc32b56323..f79251d312 100644 --- a/var/spack/packages/mxml/package.py +++ b/var/spack/packages/mxml/package.py @@ -1,9 +1,11 @@ +import os from spack import * class Mxml(Package): """Mini-XML is a small XML library that you can use to read and write XML and XML-like data files in your application without requiring large - non-standard libraries""" + non-standard libraries + """ homepage = "http://www.msweet.org" url = "http://www.msweet.org/files/project3/mxml-2.9.tar.gz" @@ -18,7 +20,7 @@ class Mxml(Package): # Case statement to change CC and CXX flags def install(self, spec, prefix): - configure('--prefix=%s' % prefix, "--disable-shared") + configure('--prefix=%s' % prefix, "--disable-shared", 'CFLAGS=-static') make() make("install") -- cgit v1.2.3-70-g09d2 From 028cca16e66c4a7dd867ef6be4cf38db9daa6e51 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 2 Dec 2015 10:15:33 -0800 Subject: Got rid of the unusued default strategy=None --- lib/spack/spack/architecture.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 786ef34071..a53222d36f 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -54,7 +54,6 @@ class Target(object): also the module_name (e.g craype-compiler). Targets will also recognize which architecture they came from using the set_architecture method. Targets will have compiler finding strategies """ - default_strategy = None # Can probably add a compiler path here def __init__(self,name, module_name=None): self.name = name # case of cray "ivybridge" but if it's x86_64 @@ -99,7 +98,8 @@ class Target(object): @key_ordering class Architecture(object): - """ Abstract class that each type of Architecture will subclass. Will return a instance of it once it + """ Abstract class that each type of Architecture will subclass. + Will return a instance of it once it is returned """ -- cgit v1.2.3-70-g09d2 From fee88d289d00f6886d0cd336aab4cabbb5d45acc Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 11 Dec 2015 12:03:13 -0800 Subject: Rewrote docstrings for sys_type() and got rid of unused functions --- lib/spack/spack/architecture.py | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index a53222d36f..beebeba4bf 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -189,22 +189,6 @@ def get_sys_type_from_uname(): except: return None -def get_sys_type_from_config_file(): - - spack_home_dir = os.environ["HOME"] + "/.spack" - yaml_file = os.path.join(spack_home_dir, 'architecture.yaml') - try: - config_dict = yaml.load(open(yaml_file)) # Fix this to have yaml.load() - arch = config_dict['architecture'] - front = arch['front'] - back = arch['back'] - return Architecture(front,back) - - except: - print "No architecture.yaml config file found" - return None - - @memoized def all_architectures(): modules = [] @@ -225,14 +209,10 @@ def all_architectures(): @memoized def sys_type(): - """Priority of gathering sys-type. - 1. YAML file that the user specifies the name of the architecture. e.g Cray-XC40 or Cray-XC30 - 2. UNAME - 3. GLOBALS - 4. MAC OSX - Yaml should be a priority here because we want the user to be able to specify the type of architecture to use. - If there is no yaml present then it should move on to the next function and stop immediately once it gets a - arch name + """ Gather a list of all available subclasses of architectures. + Sorts the list according to their priority looking. Priority is + an arbitrarily set number. Detects arch either using uname or + a file path (/opt/cray...) """ # Try to create an architecture object using the config file FIRST architecture_list = all_architectures() -- cgit v1.2.3-70-g09d2 From 31df2dd9dd713e75d161eb5a0187536886363469 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 11 Dec 2015 12:04:47 -0800 Subject: Fixed targets ti be x86_64, important note: have not tested this on linux machine --- lib/spack/spack/architectures/linux.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/architectures/linux.py b/lib/spack/spack/architectures/linux.py index 6c454f7a40..052b10c019 100644 --- a/lib/spack/spack/architectures/linux.py +++ b/lib/spack/spack/architectures/linux.py @@ -3,9 +3,9 @@ from spack.architecture import Architecture, Target class Linux(Architecture): priority = 60 - front_end = 'linux' - back_end = 'linux' - default = 'linux' + front_end = 'x86_64' + back_end = 'x86_64' + default = 'x86_64' def __init__(self): super(Linux, self).__init__('linux') @@ -15,4 +15,4 @@ class Linux(Architecture): def detect(self): arch = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE) arch, _ = arch.communicate() - return 'x86_64' in arch.strip() + return 'linux' in arch.strip().lower() -- cgit v1.2.3-70-g09d2 From b5216f6ec8fc5b1cd7061d8610b51ceec5f162e8 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 11 Dec 2015 12:07:32 -0800 Subject: Commented out cxxflag. Not 100% sure it's needed --- lib/spack/spack/compilers/craype.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/compilers/craype.py b/lib/spack/spack/compilers/craype.py index 56d6d8d36c..e8ae284f5b 100644 --- a/lib/spack/spack/compilers/craype.py +++ b/lib/spack/spack/compilers/craype.py @@ -24,9 +24,9 @@ ############################################################################## import llnl.util.tty as tty -from spack.build_environment import load_module +#from spack.build_environment import load_module from spack.compiler import * -from spack.version import ver +#from spack.version import ver class Craype(Compiler): # Subclasses use possible names of C compiler @@ -47,9 +47,9 @@ class Craype(Compiler): PrgEnv = 'PrgEnv-cray' PrgEnv_compiler = 'craype' - @property - def cxx11_flag(self): - return "-hstd=c++11" +# @property +# def cxx11_flag(self): +# return "-hstd=c++11" @classmethod def default_version(cls, comp): -- cgit v1.2.3-70-g09d2 From 5d618886570e98e6745593701246b877998a5367 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 23 Nov 2015 16:51:16 -0500 Subject: Correct Spack cc script --- lib/spack/env/cc | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 75a63f6fac..f3fadfcf45 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -126,6 +126,11 @@ if [ -z "$mode" ]; then elif [ "$arg" = -c ]; then mode=cc break + elif [ "$arg" = -S ]; then + mode=as + echo "spac cc mode as" "$@" + exit 1 + break fi done fi @@ -155,6 +160,7 @@ libraries=() libs=() rpaths=() other_args=() +all_args=("$@") while [ -n "$1" ]; do case "$1" in @@ -178,6 +184,8 @@ while [ -n "$1" ]; do if [ -z "$arg" ]; then shift; arg="$1"; fi if [[ "$arg" = -rpath=* ]]; then rpaths+=("${arg#-rpath=}") + elif [[ "$arg" = -rpath,* ]]; then + rpaths+=("${arg#-rpath,}") elif [[ "$arg" = -rpath ]]; then shift; arg="$1" if [[ "$arg" != -Wl,* ]]; then @@ -193,6 +201,8 @@ while [ -n "$1" ]; do if [ -z "$arg" ]; then shift; arg="$1"; fi if [[ "$arg" = -rpath=* ]]; then rpaths+=("${arg#-rpath=}") + elif [[ "$arg" = -rpath,* ]]; then + rpaths+=("${arg#-rpath,}") elif [[ "$arg" = -rpath ]]; then shift; arg="$1" if [[ "$arg" != -Xlinker,* ]]; then @@ -247,25 +257,46 @@ IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do if [ -d "$dep/include" ]; then includes+=("$dep/include") + all_args=("-I$dep/include" ${all_args[@]}) fi if [ -d "$dep/lib" ]; then libraries+=("$dep/lib") rpaths+=("$dep/lib") + if [ "$mode" = ccld ]; then + all_args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" ${all_args[@]}) + elif [ "$mode" = ld ]; then + all_args=("-L$dep/lib" "-rpath" "$dep/lib" ${all_args[@]}) + fi fi if [ -d "$dep/lib64" ]; then libraries+=("$dep/lib64") rpaths+=("$dep/lib64") + if [ "$mode" = ccld ]; then + all_args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" ${all_args[@]}) + elif [ "$mode" = ld ]; then + all_args=("-L$dep/lib" "-rpath" "$dep/lib" ${all_args[@]}) + fi fi done # Include all -L's and prefix/whatever dirs in rpath for dir in "${libraries[@]}"; do [[ dir = $SPACK_INSTALL* ]] && rpaths+=("$dir") + if [ "$mode" = ccld ]; then + [[ dir = $SPACK_INSTALL* ]] && all_args=("-Wl,-rpath,$dir" ${all_args[@]}) + elif [ "$mode" = ld ]; then + [[ dir = $SPACK_INSTALL* ]] && all_args=("-rpath" "$dir" ${all_args[@]}) + fi done rpaths+=("$SPACK_PREFIX/lib") rpaths+=("$SPACK_PREFIX/lib64") +if [ "$mode" = ccld ]; then + all_args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" ${all_args[@]}) +elif [ "$mode" = ld ]; then + all_args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" ${all_args[@]}) +fi # Put the arguments together args=() @@ -317,7 +348,8 @@ done export PATH full_command=("$command") -full_command+=("${args[@]}") +# full_command+=("${args[@]}") +full_command+=("${all_args[@]}") # # Write the input and output commands to debug logs if it's asked for. -- cgit v1.2.3-70-g09d2 From 217a2d9ea5bd6184d36ea0c32429c979aa088fbc Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 17 Dec 2015 15:26:27 -0800 Subject: fixed yaml error --- lib/spack/spack/architecture.py | 2 ++ lib/spack/spack/spec.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index beebeba4bf..3d1de39354 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -79,6 +79,8 @@ class Target(object): @staticmethod def from_dict(d): + if d is None: + return None target = Target.__new__(Target) target.name = d['name'] target.module_name = d['module_name'] diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 395faecde6..ff58091656 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -651,10 +651,13 @@ class Spec(object): d = { 'variants' : dict( (name,v.enabled) for name, v in self.variants.items()), - 'arch' : self.architecture.to_dict(), 'dependencies' : dict((d, self.dependencies[d].dag_hash()) for d in sorted(self.dependencies)) } + if self.architecture: + d['arch'] = self.architecture.to_dict() + else: + d['arch'] = None if self.compiler: d.update(self.compiler.to_dict()) else: -- cgit v1.2.3-70-g09d2 From ba22fc8b78841728500966d471db7b5bfd26cf56 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 21 Dec 2015 10:21:33 -0500 Subject: Simplify Spack cc script --- lib/spack/env/cc | 283 +++++++++++++++++++++++++------------------------------ 1 file changed, 130 insertions(+), 153 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index f3fadfcf45..053295f42d 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -65,7 +65,7 @@ function die { } for param in $parameters; do - if [ -z "${!param}" ]; then + if [[ -z ${!param} ]]; then die "Spack compiler must be run from spack! Input $param was missing!" fi done @@ -114,114 +114,118 @@ case "$command" in esac # Finish setting up the mode. -if [ -z "$mode" ]; then +if [[ -z $mode ]]; then mode=ccld for arg in "$@"; do - if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then - mode=vcheck - break - elif [ "$arg" = -E ]; then - mode=cpp - break - elif [ "$arg" = -c ]; then - mode=cc - break - elif [ "$arg" = -S ]; then - mode=as - echo "spac cc mode as" "$@" - exit 1 - break - fi + case "$arg" in + -v|-V|--version|-dumpversion) + mode=vcheck + break + ;; + -E) + mode=cpp + break + ;; + -c) + mode=cc + break + ;; + -S) + mode=as + break + ;; + esac done fi # Dump the version and exist if we're in testing mode. -if [ "$SPACK_TEST_COMMAND" = "dump-mode" ]; then +if [[ $SPACK_TEST_COMMAND = dump-mode ]]; then echo "$mode" exit fi # Check that at least one of the real commands was actually selected, # otherwise we don't know what to execute. -if [ -z "$command" ]; then +if [[ -z $command ]]; then die "ERROR: Compiler '$SPACK_COMPILER_SPEC' does not support compiling $language programs." fi # Save original command for debug logging input_command="$@" +args=("$@") -# -# Now do real parsing of the command line args, trying hard to keep -# non-rpath linker arguments in the proper order w.r.t. other command -# line arguments. This is important for things like groups. -# -includes=() -libraries=() -libs=() -rpaths=() -other_args=() -all_args=("$@") +# Dump parsed values for unit testing if asked for +if [[ -n $SPACK_TEST_COMMAND ]]; then -while [ -n "$1" ]; do - case "$1" in - -I*) - arg="${1#-I}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - includes+=("$arg") - ;; - -L*) - arg="${1#-L}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libraries+=("$arg") - ;; - -l*) - arg="${1#-l}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libs+=("$arg") - ;; - -Wl,*) - arg="${1#-Wl,}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - if [[ "$arg" = -rpath=* ]]; then - rpaths+=("${arg#-rpath=}") - elif [[ "$arg" = -rpath,* ]]; then - rpaths+=("${arg#-rpath,}") - elif [[ "$arg" = -rpath ]]; then - shift; arg="$1" - if [[ "$arg" != -Wl,* ]]; then - die "-Wl,-rpath was not followed by -Wl,*" + # + # Now do real parsing of the command line args, trying hard to keep + # non-rpath linker arguments in the proper order w.r.t. other command line + # arguments. This is important for things like groups. + # + includes=() + libraries=() + libs=() + rpaths=() + other_args=() + + while [[ -n $1 ]]; do + case "$1" in + -I*) + arg="${1#-I}" + if [[ -z $arg ]]; then shift; arg="$1"; fi + includes+=("$arg") + ;; + -L*) + arg="${1#-L}" + if [[ -z $arg ]]; then shift; arg="$1"; fi + libraries+=("$arg") + ;; + -l*) + arg="${1#-l}" + if [[ -z $arg ]]; then shift; arg="$1"; fi + libs+=("$arg") + ;; + -Wl,*) + arg="${1#-Wl,}" + if [[ -z $arg ]]; then shift; arg="$1"; fi + if [[ $arg = -rpath=* ]]; then + rpaths+=("${arg#-rpath=}") + elif [[ $arg = -rpath,* ]]; then + rpaths+=("${arg#-rpath,}") + elif [[ $arg = -rpath ]]; then + shift; arg="$1" + if [[ $arg != -Wl,* ]]; then + die "-Wl,-rpath was not followed by -Wl,*" + fi + rpaths+=("${arg#-Wl,}") + else + other_args+=("-Wl,$arg") fi - rpaths+=("${arg#-Wl,}") - else - other_args+=("-Wl,$arg") - fi - ;; - -Xlinker,*) - arg="${1#-Xlinker,}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - if [[ "$arg" = -rpath=* ]]; then - rpaths+=("${arg#-rpath=}") - elif [[ "$arg" = -rpath,* ]]; then - rpaths+=("${arg#-rpath,}") - elif [[ "$arg" = -rpath ]]; then - shift; arg="$1" - if [[ "$arg" != -Xlinker,* ]]; then - die "-Xlinker,-rpath was not followed by -Xlinker,*" + ;; + -Xlinker,*) + arg="${1#-Xlinker,}" + if [[ -z $arg ]]; then shift; arg="$1"; fi + if [[ $arg = -rpath=* ]]; then + rpaths+=("${arg#-rpath=}") + elif [[ $arg = -rpath,* ]]; then + rpaths+=("${arg#-rpath,}") + elif [[ $arg = -rpath ]]; then + shift; arg="$1" + if [[ $arg != -Xlinker,* ]]; then + die "-Xlinker,-rpath was not followed by -Xlinker,*" + fi + rpaths+=("${arg#-Xlinker,}") + else + other_args+=("-Xlinker,$arg") fi - rpaths+=("${arg#-Xlinker,}") - else - other_args+=("-Xlinker,$arg") - fi - ;; - *) - other_args+=("$1") - ;; - esac - shift -done + ;; + *) + other_args+=("$1") + ;; + esac + shift + done -# Dump parsed values for unit testing if asked for -if [ -n "$SPACK_TEST_COMMAND" ]; then IFS=$'\n' case "$SPACK_TEST_COMMAND" in dump-includes) echo "${includes[*]}";; @@ -246,8 +250,8 @@ if [ -n "$SPACK_TEST_COMMAND" ]; then echo "${other_args[*]}" ;; *) - echo "ERROR: Unknown test command" - exit 1 ;; + die "ERROR: Unknown test command" + ;; esac exit fi @@ -255,66 +259,44 @@ fi # Read spack dependencies from the path environment variable IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do - if [ -d "$dep/include" ]; then - includes+=("$dep/include") - all_args=("-I$dep/include" ${all_args[@]}) + if [[ -d $dep/include ]]; then + args=("-I$dep/include" "${args[@]}") fi - if [ -d "$dep/lib" ]; then - libraries+=("$dep/lib") - rpaths+=("$dep/lib") - if [ "$mode" = ccld ]; then - all_args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" ${all_args[@]}) - elif [ "$mode" = ld ]; then - all_args=("-L$dep/lib" "-rpath" "$dep/lib" ${all_args[@]}) - fi + if [[ -d $dep/lib ]]; then + # libraries+=("$dep/lib") + if [[ $mode = ccld ]]; then + args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") + elif [[ $mode = ld ]]; then + args=("-L$dep/lib" "-rpath" "$dep/lib" "${args[@]}") + fi fi - if [ -d "$dep/lib64" ]; then - libraries+=("$dep/lib64") - rpaths+=("$dep/lib64") - if [ "$mode" = ccld ]; then - all_args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" ${all_args[@]}) - elif [ "$mode" = ld ]; then - all_args=("-L$dep/lib" "-rpath" "$dep/lib" ${all_args[@]}) - fi + if [[ -d $dep/lib64 ]]; then + # libraries+=("$dep/lib64") + if [[ $mode = ccld ]]; then + args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") + elif [[ $mode = ld ]]; then + args=("-L$dep/lib" "-rpath" "$dep/lib" "${args[@]}") + fi fi done # Include all -L's and prefix/whatever dirs in rpath -for dir in "${libraries[@]}"; do - [[ dir = $SPACK_INSTALL* ]] && rpaths+=("$dir") - if [ "$mode" = ccld ]; then - [[ dir = $SPACK_INSTALL* ]] && all_args=("-Wl,-rpath,$dir" ${all_args[@]}) - elif [ "$mode" = ld ]; then - [[ dir = $SPACK_INSTALL* ]] && all_args=("-rpath" "$dir" ${all_args[@]}) - fi -done -rpaths+=("$SPACK_PREFIX/lib") -rpaths+=("$SPACK_PREFIX/lib64") -if [ "$mode" = ccld ]; then - all_args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" ${all_args[@]}) -elif [ "$mode" = ld ]; then - all_args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" ${all_args[@]}) -fi - -# Put the arguments together -args=() -for dir in "${includes[@]}"; do args+=("-I$dir"); done -args+=("${other_args[@]}") -for dir in "${libraries[@]}"; do args+=("-L$dir"); done -for lib in "${libs[@]}"; do args+=("-l$lib"); done - -if [ "$mode" = ccld ]; then - for dir in "${rpaths[@]}"; do - args+=("-Wl,-rpath") - args+=("-Wl,$dir"); - done -elif [ "$mode" = ld ]; then - for dir in "${rpaths[@]}"; do - args+=("-rpath") - args+=("$dir"); - done +if [[ $mode = ccld ]]; then + # for dir in "${libraries[@]}"; do + # if [[ dir = $SPACK_INSTALL* ]]; then + # args=("-Wl,-rpath,$dir" "${args[@]}") + # fi + # done + args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" ${args[@]}) +elif [[ $mode = ld ]]; then + # for dir in "${libraries[@]}"; do + # if [[ dir = $SPACK_INSTALL* ]]; then + # args=("-rpath" "$dir" "${args[@]}") + # fi + # done + args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" ${args[@]}) fi # @@ -330,34 +312,29 @@ unset DYLD_LIBRARY_PATH # IFS=':' read -ra env_path <<< "$PATH" IFS=':' read -ra spack_env_dirs <<< "$SPACK_ENV_PATH" -spack_env_dirs+=(".") +spack_env_dirs+=("" ".") PATH="" for dir in "${env_path[@]}"; do remove="" for rm_dir in "${spack_env_dirs[@]}"; do - if [ "$dir" = "$rm_dir" ]; then remove=True; fi + if [[ $dir = $rm_dir ]]; then remove=True; fi done - if [ -z "$remove" ]; then - if [ -z "$PATH" ]; then - PATH="$dir" - else - PATH="$PATH:$dir" - fi + if [[ -z $remove ]]; then + PATH="${PATH:+$PATH:}$dir" fi done export PATH full_command=("$command") -# full_command+=("${args[@]}") -full_command+=("${all_args[@]}") +full_command+=("${args[@]}") # # Write the input and output commands to debug logs if it's asked for. # -if [ "$SPACK_DEBUG" = "TRUE" ]; then +if [[ $SPACK_DEBUG = TRUE ]]; then input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.in.log" output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.out.log" - echo "$input_command" >> $input_log + echo "$input_command" >> $input_log echo "$mode ${full_command[@]}" >> $output_log fi -- cgit v1.2.3-70-g09d2 From 3427174eb065a6e74fc279076423c2c5c5e8e737 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 22 Dec 2015 15:49:14 -0500 Subject: Correct quoting --- lib/spack/env/cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 565f959ca4..4ac8f2e7f4 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -265,7 +265,7 @@ for dep in "${deps[@]}"; do if [[ -d $dep/lib ]]; then # libraries+=("$dep/lib") - if [[ $mode = ccld ]]; then + if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") elif [[ $mode = ld ]]; then args=("-L$dep/lib" "-rpath" "$dep/lib" "${args[@]}") @@ -289,14 +289,14 @@ if [[ $mode = ccld ]]; then # args=("-Wl,-rpath,$dir" "${args[@]}") # fi # done - args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" ${args[@]}) + args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") elif [[ $mode = ld ]]; then # for dir in "${libraries[@]}"; do # if [[ dir = $SPACK_INSTALL* ]]; then # args=("-rpath" "$dir" "${args[@]}") # fi # done - args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" ${args[@]}) + args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi # @@ -325,8 +325,7 @@ for dir in "${env_path[@]}"; do done export PATH -full_command=("$command") -full_command+=("${args[@]}") +full_command=("$command" "${args[@]}") # # Write the input and output commands to debug logs if it's asked for. -- cgit v1.2.3-70-g09d2 From 53808f254efc6919ec66043c709039c78c34e11a Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Mon, 4 Jan 2016 12:36:48 -0800 Subject: Support for cray external dependencies implemented in modules --- lib/spack/spack/build_environment.py | 54 +++++++++++++++++++++++++++++++++++- lib/spack/spack/concretize.py | 6 +++- lib/spack/spack/config.py | 13 +++++++-- lib/spack/spack/spec.py | 9 ++++-- 4 files changed, 75 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 9e3be433fb..781039e073 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -32,10 +32,11 @@ import sys import shutil import multiprocessing import platform +import re + from llnl.util.filesystem import * import spack -import spack.compilers as compilers from spack.util.executable import Executable, which from spack.util.environment import * @@ -108,6 +109,46 @@ def load_module(mod): exec(compile(load, '', 'exec')) +def get_path_from_module(mod): + """Inspects a TCL module for entries that indicate the absolute path + at which the library supported by said module can be found. + """ + # Create a modulecmd executable + modulecmd = which('modulecmd') + modulecmd.add_default_arg('python') + + # Read the module + text = modulecmd('show', mod, return_oe=True).split('\n') + + # If it lists its package directory, return that + for line in text: + if line.find(mod.upper()+'_DIR') >= 0: + words = line.split() + return words[2] + + # If it lists a -rpath instruction, use that + for line in text: + rpath = line.find('-rpath/') + if rpath >= 0: + return line[rpath+6:line.find('/lib')] + + # If it lists a -L instruction, use that + for line in text: + L = line.find('-L/') + if L >= 0: + return line[L+2:line.find('/lib')] + + # If it sets the LD_LIBRARY_PATH or CRAY_LD_LIBRARY_PATH, use that + for line in text: + if line.find('LD_LIBRARY_PATH') >= 0: + words = line.split() + path = words[2] + return path[:path.find('/lib')] + + # Unable to find module path + return None + + def set_compiler_environment_variables(pkg): assert(pkg.spec.concrete) compiler = pkg.compiler @@ -251,6 +292,17 @@ def set_module_variables_for_package(pkg): def get_rpaths(pkg): """Get a list of all the rpaths for a package.""" + + # First load all modules for external packages and update the external + # packages' paths to reflect what is found in the modules so that we can + # rpath through the modules when possible, but if not possible they are + # already loaded. + for spec in pkg.spec.traverse(root=False): + if spec.external_module: + load_module(spec.external_module) + spec.external = get_path_from_module(spec.external_module) + + # Construct rpaths from the paths of each dep rpaths = [pkg.prefix.lib, pkg.prefix.lib64] rpaths.extend(d.prefix.lib for d in pkg.spec.traverse(root=False) if os.path.isdir(d.prefix.lib)) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 13e9b477dc..7c7453353a 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -97,7 +97,7 @@ class DefaultConcretizer(object): externals = spec_externals(pkg) buildable = not is_spec_nobuild(pkg) if buildable: - result.append((pkg, None)) + result.append((pkg, None, None)) if externals: sorted_externals = sorted(externals, cmp=lambda a,b: a[0].__cmp__(b[0])) for external in sorted_externals: @@ -131,6 +131,7 @@ class DefaultConcretizer(object): if not candidate: #No ABI matches. Pick the top choice based on the orignal preferences. candidate = candidates[0] + external_module = candidate[2] external = candidate[1] candidate_spec = candidate[0] @@ -144,6 +145,9 @@ class DefaultConcretizer(object): if not spec.external and external: spec.external = external changed = True + if not spec.external_module and external_module: + spec.external_module = external_module + changed = True #If we're external then trim the dependencies if external and spec.dependencies: diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 9919dcc045..d66ffb338e 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -103,6 +103,8 @@ import llnl.util.tty as tty from llnl.util.filesystem import mkdirp import copy +from spack.build_environment import get_path_from_module + _config_sections = {} class _ConfigCategory: name = None @@ -255,7 +257,8 @@ def get_packages_config(): package_name = spack.spec.Spec(p.keys()[0]).name if package_name not in indexed_packages: indexed_packages[package_name] = [] - indexed_packages[package_name].append({ spack.spec.Spec(key) : val for key, val in p.iteritems() }) + pkg_dict = dict([ (spack.spec.Spec(key), val) for key, val in p.iteritems()]) + indexed_packages[package_name].append( pkg_dict ) return indexed_packages @@ -286,9 +289,13 @@ def spec_externals(spec): if not pkg.satisfies(spec): continue path = conf.get('path', None) + module = conf.get('module', None) if not path: - continue - spec_locations.append( (pkg, path) ) + if not module: + continue + else: + path = get_path_from_module(module) + spec_locations.append( (pkg, path, module) ) return spec_locations diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 4289fe19cb..f496011d62 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -420,6 +420,7 @@ class Spec(object): self._normal = kwargs.get('normal', False) self._concrete = kwargs.get('concrete', False) self.external = None + self.external_module = None # This allows users to construct a spec DAG with literals. # Note that given two specs a and b, Spec(a) copies a, but @@ -1352,8 +1353,9 @@ class Spec(object): changed = (self.name != other.name and self.versions != other.versions and \ self.architecture != other.architecture and self.compiler != other.compiler and \ self.variants != other.variants and self._normal != other._normal and \ - self.concrete != other.concrete and self.external != other.external) - + self.concrete != other.concrete and self.external != other.external and \ + self.external_module != other.external_module) + # Local node attributes get copied first. self.name = other.name self.versions = other.versions.copy() @@ -1365,6 +1367,7 @@ class Spec(object): self.variants = other.variants.copy() self.variants.spec = self self.external = other.external + self.external_module = other.external_module # If we copy dependencies, preserve DAG structure in the new spec if kwargs.get('deps', True): @@ -1383,6 +1386,7 @@ class Spec(object): self._normal = other._normal self._concrete = other._concrete self.external = other.external + self.external_module = other.external_module return changed @@ -1809,6 +1813,7 @@ class SpecParser(spack.parse.Parser): spec.architecture = None spec.compiler = None spec.external = None + spec.external_module = None spec.dependents = DependencyMap() spec.dependencies = DependencyMap() -- cgit v1.2.3-70-g09d2 From 751208cedf3506ebcd5119fd0d4d904bc28392e8 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Mon, 4 Jan 2016 16:35:06 -0800 Subject: pick last compiler instead of first, will be overwritten by more advanced preferences as mentioned in the email group --- lib/spack/spack/concretize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 7c7453353a..48d05f7f8d 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -287,7 +287,7 @@ class DefaultConcretizer(object): raise UnavailableCompilerVersionError(other_compiler) # copy concrete version into other_compiler - spec.compiler = matches[0].copy() + spec.compiler = matches[len(matches)-1].copy() assert(spec.compiler.concrete) return True # things changed. -- cgit v1.2.3-70-g09d2 From d2c2c46541d54e4dcde34e6199ba5dafa949bef1 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 5 Jan 2016 11:12:14 -0800 Subject: bug hunting --- lib/spack/spack/compilers/__init__.py | 4 ++-- lib/spack/spack/config.py | 2 +- lib/spack/spack/spec.py | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 6731318f43..87106282cf 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -216,9 +216,9 @@ def compiler_for_spec(compiler_spec, target): assert(compiler_spec.concrete) compilers = compilers_for_spec(compiler_spec) if target.compiler_strategy == "PATH": - filter(lambda c: c.modules is None, compilers) + compilers = [c for c in compilers if c.modules is None] elif target.compiler_strategy == "MODULES": - filter(lambda c: c.modules is not None, compilers) + compilers = [c for c in compilers if c.modules is not None] assert(len(compilers) == 1) return compilers[0] diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index d66ffb338e..6e11cfa475 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -277,7 +277,7 @@ def is_spec_nobuild(spec): def spec_externals(spec): - """Return a list of spec, directory pairs for each external location for spec""" + """Return a list of spec, directory, module triples for each external location for spec""" allpkgs = get_packages_config() name = spec.name spec_locations = [] diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index f496011d62..126ffc4f95 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -771,8 +771,9 @@ class Spec(object): """Replace this virtual spec with a concrete spec.""" assert(self.virtual) for name, dependent in self.dependents.items(): - del dependent.dependencies[self.name] - dependent._add_dependency(concrete) + if not dependent.external: + del dependent.dependencies[self.name] + dependent._add_dependency(concrete) def _expand_virtual_packages(self): -- cgit v1.2.3-70-g09d2 From 9848ad32fdadaf7decfb19aba03829708d8b6c85 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 5 Jan 2016 13:39:53 -0800 Subject: fixed errors caused by crayport on linux and added a darwin architecture --- lib/spack/spack/architecture.py | 6 ++++-- lib/spack/spack/architectures/cray.py | 21 ++++++++++++--------- lib/spack/spack/architectures/darwin.py | 18 ++++++++++++++++++ lib/spack/spack/architectures/linux.py | 4 ++-- lib/spack/spack/test/__init__.py | 5 ++--- lib/spack/spack/test/architecture.py | 32 ++++++++++++++++++++++++-------- 6 files changed, 62 insertions(+), 24 deletions(-) create mode 100644 lib/spack/spack/architectures/darwin.py diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 3d1de39354..1f608bd187 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -96,11 +96,13 @@ class Target(object): return self.__str__() def __str__(self): + if self.module_name: + return self.name + ' module: ' + self.module_name return self.name @key_ordering class Architecture(object): - """ Abstract class that each type of Architecture will subclass. + """ Abstract class that each type of Architecture will subclass. Will return a instance of it once it is returned """ @@ -150,7 +152,7 @@ class Architecture(object): def __str__(self): return self.name - + def _cmp_key(self): return (self.name, (_cmp_key(t) for t in self.targets.values())) diff --git a/lib/spack/spack/architectures/cray.py b/lib/spack/spack/architectures/cray.py index e4a3617dc9..47ede30145 100644 --- a/lib/spack/spack/architectures/cray.py +++ b/lib/spack/spack/architectures/cray.py @@ -4,27 +4,30 @@ from spack.architecture import Architecture, Target class Cray(Architecture): priority = 20 - front_end = 'sandybridge' + front_end = 'sandybridge' back_end = 'ivybridge' - default = os.environ['CRAY_CPU_TARGET'] - #default = 'ivybridge' - + default = 'ivybridge' + def __init__(self): ''' Since cori doesn't have ivybridge as a front end it's better if we use CRAY_CPU_TARGET as the default. This will ensure that if we're on a XC-40 or XC-30 then we can detect the target ''' super(Cray, self).__init__('cray') - + + # Handle the default here so we can check for a key error + if 'CRAY_CPU_TARGET' in os.environ: + default = os.environ['CRAY_CPU_TARGET'] + # Back End compiler needs the proper target module loaded. - self.add_target(self.front_end, Target(self.front_end,'craype-' + self.front_end)) + self.add_target(self.back_end, Target(self.front_end,'craype-'+ self.back_end)) self.add_target(self.default, Target(self.default,'craype-' + self.default)) # Could switch to use modules and fe targets for front end # Currently using compilers by path for front end. - self.add_target(self.back_end, Target('craype-' + self.back_end)) - + self.add_target(self.front_end, Target(self.front_end)) + @classmethod def detect(self): return os.path.exists('/opt/cray/craype') - + diff --git a/lib/spack/spack/architectures/darwin.py b/lib/spack/spack/architectures/darwin.py new file mode 100644 index 0000000000..2f0d34c38d --- /dev/null +++ b/lib/spack/spack/architectures/darwin.py @@ -0,0 +1,18 @@ +import subprocess +from spack.architecture import Architecture, Target + +class Darwin(Architecture): + priority = 89 + front_end = 'x86_64' + back_end = 'x86_64' + default = 'x86_64' + + def __init__(self): + super(Darwin, self).__init__('darwin') + self.add_target(self.default, Target(self.default)) + + @classmethod + def detect(self): + arch = subprocess.Popen(['uname', '-a'], stdout = subprocess.PIPE) + arch, _ = arch.communicate() + return 'darwin' in arch.strip().lower() diff --git a/lib/spack/spack/architectures/linux.py b/lib/spack/spack/architectures/linux.py index 052b10c019..d63cf9179a 100644 --- a/lib/spack/spack/architectures/linux.py +++ b/lib/spack/spack/architectures/linux.py @@ -2,7 +2,7 @@ import subprocess from spack.architecture import Architecture, Target class Linux(Architecture): - priority = 60 + priority = 90 front_end = 'x86_64' back_end = 'x86_64' default = 'x86_64' @@ -13,6 +13,6 @@ class Linux(Architecture): @classmethod def detect(self): - arch = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE) + arch = subprocess.Popen(['uname', '-a'], stdout = subprocess.PIPE) arch, _ = arch.communicate() return 'linux' in arch.strip().lower() diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index ed51fac33a..96dc1f4331 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -31,7 +31,7 @@ from llnl.util.tty.colify import colify import spack """Names of tests to be included in Spack's test suite""" -"""test_names = ['architecture', +test_names = ['architecture', 'versions', 'url_parse', 'url_substitution', @@ -58,8 +58,7 @@ import spack 'optional_deps', 'make_executable', 'configure_guess'] -""" -test_names = ['architecture'] + def list_tests(): """Return names of all tests that can be run for Spack.""" diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 6ff22aaa59..3a7474799a 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -2,18 +2,34 @@ the functions are looking for the correct architecture name """ import unittest +import os +import platform import spack from spack.architecture import * +from spack.architectures.cray import Cray +from spack.architectures.linux import Linux +from spack.architectures.bgq import Bgq class ArchitectureTest(unittest.TestCase): - def test_Architecture_class(self): - a = Architecture('Cray-XC40') - a.add_arch_strategy() - self.assertEquals(a.get_arch_dict(), {'Cray-XC40': 'MODULES'}) + def test_Architecture_class_and_compiler_strategies(self): + a = Cray() + t = a.target('default') + self.assertEquals(t.compiler_strategy, 'MODULES') + b = Linux() + s = b.target('default') + self.assertEquals(s.compiler_strategy, 'PATH') - def test_get_sys_type_from_config_file(self): - output_arch_class = get_sys_type_from_config_file() - my_arch_class = Architecture('Linux x86_64','Cray-xc40') + def test_sys_type(self): + output_arch_class = sys_type() + my_arch_class = None + if os.path.exists('/opt/cray/craype'): + my_arch_class = Cray() + elif os.path.exists('/bgsys'): + my_arch_class = Bgq() + elif 'Linux' in platform.system(): + my_arch_class = Linux() +# elif 'Darwin' in platform.system(): +# my_arch_class = Darwin() - self.assertEqual(output_arch_class, my_arch_class) + self.assertEqual(str(output_arch_class), str(my_arch_class)) -- cgit v1.2.3-70-g09d2 From 1edbaa4e62d2eb59b53cf6b10f7854d4edcf8497 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 5 Jan 2016 14:13:09 -0800 Subject: removed debug printing --- lib/spack/spack/architecture.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 1f608bd187..1b4b7730b2 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -96,8 +96,6 @@ class Target(object): return self.__str__() def __str__(self): - if self.module_name: - return self.name + ' module: ' + self.module_name return self.name @key_ordering -- cgit v1.2.3-70-g09d2 From 751503c434bd249ed9f76b6ad353d2adcdcc3997 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 5 Jan 2016 14:47:14 -0800 Subject: fixed haswell targeting bug --- lib/spack/spack/architectures/cray.py | 17 ++++++++++++----- lib/spack/spack/compilers/__init__.py | 1 + 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/architectures/cray.py b/lib/spack/spack/architectures/cray.py index 47ede30145..dac3943fb7 100644 --- a/lib/spack/spack/architectures/cray.py +++ b/lib/spack/spack/architectures/cray.py @@ -17,15 +17,22 @@ class Cray(Architecture): # Handle the default here so we can check for a key error if 'CRAY_CPU_TARGET' in os.environ: - default = os.environ['CRAY_CPU_TARGET'] + self.default = os.environ['CRAY_CPU_TARGET'] + + # Change the defaults to haswell if we're on an XC40 + if self.default == 'haswell': + self.front_end = self.default + self.back_end = self.default - # Back End compiler needs the proper target module loaded. - self.add_target(self.back_end, Target(self.front_end,'craype-'+ self.back_end)) - self.add_target(self.default, Target(self.default,'craype-' + self.default)) # Could switch to use modules and fe targets for front end # Currently using compilers by path for front end. self.add_target(self.front_end, Target(self.front_end)) - + # Back End compiler needs the proper target module loaded. + self.add_target(self.back_end, Target(self.front_end,'craype-'+ self.back_end)) + self.add_target(self.default, Target(self.default,'craype-' + self.default)) + # This is kludgy and the order matters when the targets are all haswell + # This is because the last one overwrites the others when they have the + # same name. @classmethod def detect(self): diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 87106282cf..21a41f38ea 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -206,6 +206,7 @@ def compilers_for_spec(compiler_spec): return cls(cspec, compiler_paths, mods) matches = find(compiler_spec) + print matches, 'matches' return [get_compiler(cspec) for cspec in matches] -- cgit v1.2.3-70-g09d2 From 48b9023de48ba01f789705db421c9bb326202c0e Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 5 Jan 2016 14:51:18 -0800 Subject: removed debug printing --- lib/spack/spack/compilers/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 21a41f38ea..87106282cf 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -206,7 +206,6 @@ def compilers_for_spec(compiler_spec): return cls(cspec, compiler_paths, mods) matches = find(compiler_spec) - print matches, 'matches' return [get_compiler(cspec) for cspec in matches] -- cgit v1.2.3-70-g09d2 From d6768cf9210288ec562330fac0978cfa0b8b8683 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 5 Jan 2016 16:23:32 -0800 Subject: minor bug fix --- lib/spack/spack/compiler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 5d87588245..b40f68b2c5 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -284,8 +284,7 @@ class Compiler(object): modulecmd.add_default_arg('python') output = modulecmd('avail', return_oe=True) matches = re.findall(r'(%s)/(\d+[\.\d]+)' % cls.PrgEnv_compiler, output) -# It's finding a weird third attribute - print matches + for name, version in matches: v = version comp = cls(spack.spec.CompilerSpec(name + '@' + v), -- cgit v1.2.3-70-g09d2 From c649610473a722388a09bf1000a8e3e9d6a4f9ff Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 5 Jan 2016 17:00:28 -0800 Subject: fixed concretization to only consider compilers found by the proper strategy --- lib/spack/spack/concretize.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 48d05f7f8d..f32e956a13 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -260,8 +260,27 @@ class DefaultConcretizer(object): build with the compiler that will be used by libraries that link to this one, to maximize compatibility. """ + # Pass on concretizing the compiler if the architecture is not yet determined + if not spec.architecture: + #Although this usually means changed, this means awaiting other changes + return True + + # Examine only those compilers found by the proper compiler strategy for this architecture + # Takes advantage of the proper logic already existing in compiler_for_spec + # Should be redone more efficiently if this works all_compilers = spack.compilers.all_compilers() + def _proper_compiler_style(cspec, target): + compilers = spack.compilers.compilers_for_spec(cspec) + if target.compiler_strategy == 'PATH': + filter(lambda c: not c.modules, compilers) + if target.compiler_strategy == 'MODULES': + filter(lambda c: c.modules, compilers) + return compilers + + filter(lambda c: _proper_compiler_style(c, spec.architecture), all_compilers) + + if (spec.compiler and spec.compiler.concrete and spec.compiler in all_compilers): @@ -287,7 +306,7 @@ class DefaultConcretizer(object): raise UnavailableCompilerVersionError(other_compiler) # copy concrete version into other_compiler - spec.compiler = matches[len(matches)-1].copy() + spec.compiler = matches[0].copy() assert(spec.compiler.concrete) return True # things changed. -- cgit v1.2.3-70-g09d2 From 29e0ff61d7dc10b20b4b5d0d627cc066690ea84b Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 5 Jan 2016 17:14:35 -0800 Subject: fixed compiler finding so as not to identify non-existent versions of the intel compiler based on the version numbers of the PrgEnv-intel module --- lib/spack/spack/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index b40f68b2c5..225c65917a 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -282,7 +282,7 @@ class Compiler(object): modulecmd = which('modulecmd') modulecmd.add_default_arg('python') - output = modulecmd('avail', return_oe=True) + output = modulecmd('avail', cls.PrgEnv_compiler, return_oe=True) matches = re.findall(r'(%s)/(\d+[\.\d]+)' % cls.PrgEnv_compiler, output) for name, version in matches: -- cgit v1.2.3-70-g09d2 From 93c9c45580d89ccbab441c5808192e149731c85f Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 5 Jan 2016 17:19:04 -0800 Subject: minor tweak of compiler priority while waiting for customizable compiler priorities --- lib/spack/spack/concretize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index f32e956a13..2013ae2e84 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -306,7 +306,7 @@ class DefaultConcretizer(object): raise UnavailableCompilerVersionError(other_compiler) # copy concrete version into other_compiler - spec.compiler = matches[0].copy() + spec.compiler = matches[-1].copy() assert(spec.compiler.concrete) return True # things changed. -- cgit v1.2.3-70-g09d2 From 61b03b72b0fb1aa5c4ddbaff8079d9c0258efb76 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 5 Jan 2016 19:03:25 -0800 Subject: improved concretize efficiency for determining whether compilers come from the proper strategy --- lib/spack/spack/concretize.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 2013ae2e84..854db949e3 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -265,11 +265,9 @@ class DefaultConcretizer(object): #Although this usually means changed, this means awaiting other changes return True - # Examine only those compilers found by the proper compiler strategy for this architecture + # Only use a matching compiler if it is of the proper style # Takes advantage of the proper logic already existing in compiler_for_spec - # Should be redone more efficiently if this works - all_compilers = spack.compilers.all_compilers() - + # Should think whether this can be more efficient def _proper_compiler_style(cspec, target): compilers = spack.compilers.compilers_for_spec(cspec) if target.compiler_strategy == 'PATH': @@ -278,8 +276,8 @@ class DefaultConcretizer(object): filter(lambda c: c.modules, compilers) return compilers - filter(lambda c: _proper_compiler_style(c, spec.architecture), all_compilers) - + + all_compilers = spack.compilers.all_compilers() if (spec.compiler and spec.compiler.concrete and @@ -306,7 +304,12 @@ class DefaultConcretizer(object): raise UnavailableCompilerVersionError(other_compiler) # copy concrete version into other_compiler - spec.compiler = matches[-1].copy() + index = len(matches)-1 + while not _proper_compiler_style(matches[index], spec.architecture): + index -= 1 + if index == 0: + raise NoValidVersionError(spec) + spec.compiler = matches[index].copy() assert(spec.compiler.concrete) return True # things changed. -- cgit v1.2.3-70-g09d2 From 51bd91edc0679d21c26df8af17eaafb2a0ca6d56 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 6 Jan 2016 13:00:22 -0800 Subject: made the compiler strategy more easily controllable --- lib/spack/spack/architecture.py | 15 ++++++++------- lib/spack/spack/architectures/bgq.py | 4 ++-- lib/spack/spack/architectures/cray.py | 6 +++--- lib/spack/spack/architectures/darwin.py | 2 +- lib/spack/spack/architectures/linux.py | 2 +- lib/spack/spack/build_environment.py | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 1b4b7730b2..81aac6cc33 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -55,19 +55,20 @@ class Target(object): they came from using the set_architecture method. Targets will have compiler finding strategies """ - def __init__(self,name, module_name=None): + def __init__(self, name, compiler_strategy, module_name=None): self.name = name # case of cray "ivybridge" but if it's x86_64 + self.compiler_strategy = compiler_strategy self.module_name = module_name # craype-ivybridge def set_architecture(self, architecture): # Target should get the architecture class. self.architecture = architecture - @property - def compiler_strategy(self): - if self.module_name: # If there is a module_name given then use MODULES - return "MODULES" - else: - return "PATH" +# @property +# def compiler_strategy(self): +# if self.module_name: # If there is a module_name given then use MODULES +# return "MODULES" +# else: +# return "PATH" def to_dict(self): d = {} diff --git a/lib/spack/spack/architectures/bgq.py b/lib/spack/spack/architectures/bgq.py index 85487626f1..3ac5a59546 100644 --- a/lib/spack/spack/architectures/bgq.py +++ b/lib/spack/spack/architectures/bgq.py @@ -10,8 +10,8 @@ class Bgq(Architecture): def __init__(self): super(Bgq, self).__init__('cray') - self.add_target(self.front_end, Target(self.front_end)) - self.add_target(self.back_end, Target(self.back_end)) + self.add_target(self.front_end, Target(self.front_end, 'PATH')) + self.add_target(self.back_end, Target(self.back_end, 'PATH')) @classmethod def detect(self): diff --git a/lib/spack/spack/architectures/cray.py b/lib/spack/spack/architectures/cray.py index dac3943fb7..f109b48867 100644 --- a/lib/spack/spack/architectures/cray.py +++ b/lib/spack/spack/architectures/cray.py @@ -26,10 +26,10 @@ class Cray(Architecture): # Could switch to use modules and fe targets for front end # Currently using compilers by path for front end. - self.add_target(self.front_end, Target(self.front_end)) + self.add_target(self.front_end, Target(self.front_end, 'PATH')) # Back End compiler needs the proper target module loaded. - self.add_target(self.back_end, Target(self.front_end,'craype-'+ self.back_end)) - self.add_target(self.default, Target(self.default,'craype-' + self.default)) +# self.add_target(self.back_end, Target(self.front_end, 'MODULES', 'craype-'+ self.back_end)) + self.add_target(self.default, Target(self.default, 'MODULES', 'craype-' + self.default)) # This is kludgy and the order matters when the targets are all haswell # This is because the last one overwrites the others when they have the # same name. diff --git a/lib/spack/spack/architectures/darwin.py b/lib/spack/spack/architectures/darwin.py index 2f0d34c38d..30fbde39bb 100644 --- a/lib/spack/spack/architectures/darwin.py +++ b/lib/spack/spack/architectures/darwin.py @@ -9,7 +9,7 @@ class Darwin(Architecture): def __init__(self): super(Darwin, self).__init__('darwin') - self.add_target(self.default, Target(self.default)) + self.add_target(self.default, Target(self.default, 'PATH')) @classmethod def detect(self): diff --git a/lib/spack/spack/architectures/linux.py b/lib/spack/spack/architectures/linux.py index d63cf9179a..bb3089ebf6 100644 --- a/lib/spack/spack/architectures/linux.py +++ b/lib/spack/spack/architectures/linux.py @@ -9,7 +9,7 @@ class Linux(Architecture): def __init__(self): super(Linux, self).__init__('linux') - self.add_target(self.default, Target(self.default)) + self.add_target(self.default, Target(self.default, 'PATH')) @classmethod def detect(self): diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 781039e073..fc71ae0331 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -226,7 +226,7 @@ def set_build_environment_variables(pkg): pkg_config_dirs.append(pcdir) path_put_first("PKG_CONFIG_PATH", pkg_config_dirs) - if pkg.spec.architecture.compiler_strategy.lower() == 'module': + if pkg.spec.architecture.module_name: load_module(pkg.spec.architecture.module_name) def set_module_variables_for_package(pkg): -- cgit v1.2.3-70-g09d2 From b4a0004f44af89c034423adef5444a234c49d464 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 6 Jan 2016 14:50:31 -0800 Subject: Improved target cmp_key and to/from yaml functions --- lib/spack/spack/architecture.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 81aac6cc33..aaea7c81ac 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -60,22 +60,17 @@ class Target(object): self.compiler_strategy = compiler_strategy self.module_name = module_name # craype-ivybridge - def set_architecture(self, architecture): # Target should get the architecture class. - self.architecture = architecture - -# @property -# def compiler_strategy(self): -# if self.module_name: # If there is a module_name given then use MODULES -# return "MODULES" -# else: -# return "PATH" + # Sets only the architecture name to avoid recursiveness + def set_architecture(self, architecture): + self.architecture_name = architecture.name def to_dict(self): d = {} d['name'] = self.name + d['compiler_strategy'] = self.compiler_strategy d['module_name'] = self.module_name -# if self.architecture: -# d['architecture'] = self.architecture + if self.architecture_name: + d['architecture'] = self.architecture_name return d @staticmethod @@ -84,14 +79,15 @@ class Target(object): return None target = Target.__new__(Target) target.name = d['name'] + target.compiler_strategy = d['compiler_strategy'] target.module_name = d['module_name'] -# if 'architecture' in d: -# target.architecture = d['architecture'] + if 'architecture' in d: + target.architecture_name = d['architecture'] return target def _cmp_key(self): - return (self.name, self.module_name) + return (self.name, self.compiler_strategy, self.module_name) def __repr__(self): return self.__str__() -- cgit v1.2.3-70-g09d2 From 6ccd9d6fa4baa9b14e0cea19e55b24ad19d053f0 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 7 Jan 2016 11:49:01 -0800 Subject: Cleaned up naming conventions for architecture, split into platform and target --- lib/spack/spack/__init__.py | 2 +- lib/spack/spack/abi.py | 8 +- lib/spack/spack/architecture.py | 62 +++++++------- lib/spack/spack/architectures/__init__.py | 0 lib/spack/spack/architectures/bgq.py | 19 ----- lib/spack/spack/architectures/cray.py | 40 --------- lib/spack/spack/architectures/darwin.py | 18 ----- lib/spack/spack/architectures/linux.py | 18 ----- lib/spack/spack/build_environment.py | 4 +- lib/spack/spack/cmd/find.py | 10 +-- lib/spack/spack/concretize.py | 40 ++++----- lib/spack/spack/config.py | 42 +++++----- lib/spack/spack/directory_layout.py | 4 +- lib/spack/spack/modules.py | 4 +- lib/spack/spack/package.py | 2 +- lib/spack/spack/platforms/__init__.py | 0 lib/spack/spack/platforms/bgq.py | 19 +++++ lib/spack/spack/platforms/cray.py | 40 +++++++++ lib/spack/spack/platforms/darwin.py | 18 +++++ lib/spack/spack/platforms/linux.py | 18 +++++ lib/spack/spack/preferred_packages.py | 10 +-- lib/spack/spack/spec.py | 108 ++++++++++++------------- lib/spack/spack/test/architecture.py | 23 +++--- lib/spack/spack/test/concretize.py | 4 +- lib/spack/spack/test/multimethod.py | 12 +-- lib/spack/spack/test/spec_dag.py | 4 +- lib/spack/spack/test/spec_semantics.py | 4 +- var/spack/mock_packages/multimethod/package.py | 10 +-- 28 files changed, 272 insertions(+), 271 deletions(-) delete mode 100644 lib/spack/spack/architectures/__init__.py delete mode 100644 lib/spack/spack/architectures/bgq.py delete mode 100644 lib/spack/spack/architectures/cray.py delete mode 100644 lib/spack/spack/architectures/darwin.py delete mode 100644 lib/spack/spack/architectures/linux.py create mode 100644 lib/spack/spack/platforms/__init__.py create mode 100644 lib/spack/spack/platforms/bgq.py create mode 100644 lib/spack/spack/platforms/cray.py create mode 100644 lib/spack/spack/platforms/darwin.py create mode 100644 lib/spack/spack/platforms/linux.py diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index b2ff2c692b..e1ef094f17 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -37,7 +37,7 @@ etc_path = join_path(prefix, "etc") lib_path = join_path(prefix, "lib", "spack") build_env_path = join_path(lib_path, "env") module_path = join_path(lib_path, "spack") -arch_path = join_path(module_path, 'architectures') +platform_path = join_path(module_path, 'platforms') compilers_path = join_path(module_path, "compilers") test_path = join_path(module_path, "test") hooks_path = join_path(module_path, "hooks") diff --git a/lib/spack/spack/abi.py b/lib/spack/spack/abi.py index f0a997703c..1dd49d6b2c 100644 --- a/lib/spack/spack/abi.py +++ b/lib/spack/spack/abi.py @@ -34,9 +34,9 @@ class ABI(object): """This class provides methods to test ABI compatibility between specs. The current implementation is rather rough and could be improved.""" - def architecture_compatible(self, parent, child): - """Returns true iff the parent and child specs have ABI compatible architectures.""" - return not parent.architecture or not child.architecture or parent.architecture == child.architecture + def target_compatible(self, parent, child): + """Returns true iff the parent and child specs have ABI compatible targets.""" + return not parent.target or not child.target or parent.target == child.target @memoized @@ -123,6 +123,6 @@ class ABI(object): def compatible(self, parent, child, **kwargs): """Returns true iff a parent and child spec are ABI compatible""" loosematch = kwargs.get('loose', False) - return self.architecture_compatible(parent, child) and \ + return self.target_compatible(parent, child) and \ self.compiler_compatible(parent, child, loose=loosematch) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index aaea7c81ac..a269767fab 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -51,8 +51,8 @@ class NoSysTypeError(serr.SpackError): class Target(object): """ Target is the processor of the host machine. The host machine may have different front-end and back-end targets, especially if it is a Cray machine. The target will have a name and - also the module_name (e.g craype-compiler). Targets will also recognize which architecture - they came from using the set_architecture method. Targets will have compiler finding strategies + also the module_name (e.g craype-compiler). Targets will also recognize which platform + they came from using the set_platform method. Targets will have compiler finding strategies """ def __init__(self, name, compiler_strategy, module_name=None): @@ -60,17 +60,17 @@ class Target(object): self.compiler_strategy = compiler_strategy self.module_name = module_name # craype-ivybridge - # Sets only the architecture name to avoid recursiveness - def set_architecture(self, architecture): - self.architecture_name = architecture.name + # Sets only the platform name to avoid recursiveness + def set_platform(self, platform): + self.platform_name = platform.name def to_dict(self): d = {} d['name'] = self.name d['compiler_strategy'] = self.compiler_strategy d['module_name'] = self.module_name - if self.architecture_name: - d['architecture'] = self.architecture_name + if self.platform_name: + d['platform'] = self.platform_name return d @staticmethod @@ -81,8 +81,8 @@ class Target(object): target.name = d['name'] target.compiler_strategy = d['compiler_strategy'] target.module_name = d['module_name'] - if 'architecture' in d: - target.architecture_name = d['architecture'] + if 'platform' in d: + target.platform_name = d['platform'] return target @@ -96,13 +96,13 @@ class Target(object): return self.name @key_ordering -class Architecture(object): - """ Abstract class that each type of Architecture will subclass. +class Platform(object): + """ Abstract class that each type of Platform will subclass. Will return a instance of it once it is returned """ - priority = None # Subclass needs to set this number. This controls order in which arch is detected. + priority = None # Subclass needs to set this number. This controls order in which platform is detected. front_end = None back_end = None default = None # The default back end target. On cray ivybridge @@ -112,12 +112,12 @@ class Architecture(object): self.name = name def add_target(self, name, target): - """Used by the architecture specific subclass to list available targets. Raises an error - if the architecture specifies a name that is reserved by spack as an alias. + """Used by the platform specific subclass to list available targets. Raises an error + if the platform specifies a name that is reserved by spack as an alias. """ if name in ['front_end', 'fe', 'back_end', 'be', 'default']: raise ValueError("%s is a spack reserved alias and cannot be the name of a target" % name) - target.set_architecture(self) + target.set_platform(self) self.targets[name] = target def target(self, name): @@ -137,7 +137,7 @@ class Architecture(object): @classmethod def detect(self): """ Subclass is responsible for implementing this method. - Returns True if the architecture detects if it is the current architecture + Returns True if the Platform class detects that it is the current platform and False if it's not. """ raise NotImplementedError() @@ -182,18 +182,18 @@ def get_sys_type_from_uname(): Front-end config """ try: - arch_proc = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE) - arch, _ = arch_proc.communicate() - return arch.strip() + platform_proc = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE) + platform, _ = platform_proc.communicate() + return platform.strip() except: return None @memoized -def all_architectures(): +def all_platforms(): modules = [] - for name in list_modules(spack.arch_path): - mod_name = 'spack.architectures' + name - path = join_path(spack.arch_path, name) + ".py" + for name in list_modules(spack.platform_path): + mod_name = 'spack.platformss' + name + path = join_path(spack.platform_path, name) + ".py" mod = imp.load_source(mod_name, path) class_name = mod_to_class(name) if not hasattr(mod, class_name): @@ -208,16 +208,16 @@ def all_architectures(): @memoized def sys_type(): - """ Gather a list of all available subclasses of architectures. + """ Gather a list of all available subclasses of platforms. Sorts the list according to their priority looking. Priority is - an arbitrarily set number. Detects arch either using uname or + an arbitrarily set number. Detects platform either using uname or a file path (/opt/cray...) """ - # Try to create an architecture object using the config file FIRST - architecture_list = all_architectures() - architecture_list.sort(key = lambda a: a.priority) + # Try to create a Platform object using the config file FIRST + platform_list = all_platforms() + platform_list.sort(key = lambda a: a.priority) - for arch in architecture_list: - if arch.detect(): - return arch() + for platform in platform_list: + if platform.detect(): + return platform() diff --git a/lib/spack/spack/architectures/__init__.py b/lib/spack/spack/architectures/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/spack/spack/architectures/bgq.py b/lib/spack/spack/architectures/bgq.py deleted file mode 100644 index 3ac5a59546..0000000000 --- a/lib/spack/spack/architectures/bgq.py +++ /dev/null @@ -1,19 +0,0 @@ -import os - -from spack.architecture import Architecture, Target - -class Bgq(Architecture): - priority = 30 - front_end = 'power7' - back_end = 'powerpc' - default = 'powerpc' - - def __init__(self): - super(Bgq, self).__init__('cray') - self.add_target(self.front_end, Target(self.front_end, 'PATH')) - self.add_target(self.back_end, Target(self.back_end, 'PATH')) - - @classmethod - def detect(self): - return os.path.exists('/bgsys') - diff --git a/lib/spack/spack/architectures/cray.py b/lib/spack/spack/architectures/cray.py deleted file mode 100644 index f109b48867..0000000000 --- a/lib/spack/spack/architectures/cray.py +++ /dev/null @@ -1,40 +0,0 @@ -import os - -from spack.architecture import Architecture, Target - -class Cray(Architecture): - priority = 20 - front_end = 'sandybridge' - back_end = 'ivybridge' - default = 'ivybridge' - - def __init__(self): - ''' Since cori doesn't have ivybridge as a front end it's better - if we use CRAY_CPU_TARGET as the default. This will ensure - that if we're on a XC-40 or XC-30 then we can detect the target - ''' - super(Cray, self).__init__('cray') - - # Handle the default here so we can check for a key error - if 'CRAY_CPU_TARGET' in os.environ: - self.default = os.environ['CRAY_CPU_TARGET'] - - # Change the defaults to haswell if we're on an XC40 - if self.default == 'haswell': - self.front_end = self.default - self.back_end = self.default - - # Could switch to use modules and fe targets for front end - # Currently using compilers by path for front end. - self.add_target(self.front_end, Target(self.front_end, 'PATH')) - # Back End compiler needs the proper target module loaded. -# self.add_target(self.back_end, Target(self.front_end, 'MODULES', 'craype-'+ self.back_end)) - self.add_target(self.default, Target(self.default, 'MODULES', 'craype-' + self.default)) - # This is kludgy and the order matters when the targets are all haswell - # This is because the last one overwrites the others when they have the - # same name. - - @classmethod - def detect(self): - return os.path.exists('/opt/cray/craype') - diff --git a/lib/spack/spack/architectures/darwin.py b/lib/spack/spack/architectures/darwin.py deleted file mode 100644 index 30fbde39bb..0000000000 --- a/lib/spack/spack/architectures/darwin.py +++ /dev/null @@ -1,18 +0,0 @@ -import subprocess -from spack.architecture import Architecture, Target - -class Darwin(Architecture): - priority = 89 - front_end = 'x86_64' - back_end = 'x86_64' - default = 'x86_64' - - def __init__(self): - super(Darwin, self).__init__('darwin') - self.add_target(self.default, Target(self.default, 'PATH')) - - @classmethod - def detect(self): - arch = subprocess.Popen(['uname', '-a'], stdout = subprocess.PIPE) - arch, _ = arch.communicate() - return 'darwin' in arch.strip().lower() diff --git a/lib/spack/spack/architectures/linux.py b/lib/spack/spack/architectures/linux.py deleted file mode 100644 index bb3089ebf6..0000000000 --- a/lib/spack/spack/architectures/linux.py +++ /dev/null @@ -1,18 +0,0 @@ -import subprocess -from spack.architecture import Architecture, Target - -class Linux(Architecture): - 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, 'PATH')) - - @classmethod - def detect(self): - arch = subprocess.Popen(['uname', '-a'], stdout = subprocess.PIPE) - arch, _ = arch.communicate() - return 'linux' in arch.strip().lower() diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index fc71ae0331..d849b4b56c 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -226,8 +226,8 @@ def set_build_environment_variables(pkg): pkg_config_dirs.append(pcdir) path_put_first("PKG_CONFIG_PATH", pkg_config_dirs) - if pkg.spec.architecture.module_name: - load_module(pkg.spec.architecture.module_name) + if pkg.spec.target.module_name: + load_module(pkg.spec.target.module_name) def set_module_variables_for_package(pkg): """Populate the module scope of install() with some useful functions. diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 3c993990b1..7ea16bf09f 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -72,19 +72,19 @@ def display_specs(specs, **kwargs): hashes = True hlen = None - # Make a dict with specs keyed by architecture and compiler. - index = index_by(specs, ('architecture', 'compiler')) + # Make a dict with specs keyed by target and compiler. + index = index_by(specs, ('target', 'compiler')) # Traverse the index and print out each package - for i, (architecture, compiler) in enumerate(sorted(index)): + for i, (target, compiler) in enumerate(sorted(index)): if i > 0: print header = "%s{%s} / %s{%s}" % ( - spack.spec.architecture_color, architecture, + spack.spec.target_color, target, spack.spec.compiler_color, compiler) tty.hline(colorize(header), char='-') - specs = index[(architecture,compiler)] + specs = index[(target,compiler)] specs.sort() abbreviated = [s.format('$_$@$+', color=True) for s in specs] diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 854db949e3..fcd23a6055 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -208,30 +208,30 @@ class DefaultConcretizer(object): return True # Things changed - def concretize_architecture(self, spec): - """If the spec already has an architecture and it is a an architecture type, - return. Otherwise, if it has an architecture that is a string type, generate an - architecture based on that type. If it has no architecture and the root of the - DAG has an architecture, then use that. Otherwise, take the system's default - architecture. + def concretize_target(self, spec): + """If the spec already has an target and it is a an target type, + return. Otherwise, if it has a target that is a string type, generate a + target based on that type. If it has no target and the root of the + DAG has an target, then use that. Otherwise, take the system's default + target. """ - if spec.architecture is not None: - if isinstance(spec.architecture,spack.architecture.Target): + if spec.target is not None: + if isinstance(spec.target,spack.architecture.Target): return False else: - arch = spack.architecture.sys_type() - spec.architecture = arch.target(spec.architecture) + platform = spack.architecture.sys_type() + spec.target = platform.target(spec.target) return True #changed - if spec.root.architecture: - if isinstance(spec.root.architecture,spack.architecture.Target): - spec.architecture = spec.root.architecture + if spec.root.target: + if isinstance(spec.root.target,spack.architecture.Target): + spec.target = spec.root.target else: - arch = spack.architecture.sys_type() - spec.architecture = arch.target(spec.root.architecture) + platform = spack.architecture.sys_type() + spec.target = platform.target(spec.root.target) else: - arch = spack.architecture.sys_type() - spec.architecture = arch.target('default') + platform = spack.architecture.sys_type() + spec.target = platform.target('default') return True #changed @@ -260,8 +260,8 @@ class DefaultConcretizer(object): build with the compiler that will be used by libraries that link to this one, to maximize compatibility. """ - # Pass on concretizing the compiler if the architecture is not yet determined - if not spec.architecture: + # Pass on concretizing the compiler if the target is not yet determined + if not spec.target: #Although this usually means changed, this means awaiting other changes return True @@ -305,7 +305,7 @@ class DefaultConcretizer(object): # copy concrete version into other_compiler index = len(matches)-1 - while not _proper_compiler_style(matches[index], spec.architecture): + while not _proper_compiler_style(matches[index], spec.target): index -= 1 if index == 0: raise NoValidVersionError(spec) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 6e11cfa475..0622606a4f 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -129,7 +129,7 @@ _ConfigCategory('packages', 'packages.yaml', True) config_scopes = [('site', os.path.join(spack.etc_path, 'spack')), ('user', os.path.expanduser('~/.spack'))] -_compiler_by_arch = {} +_compiler_by_platform = {} _read_config_file_result = {} def _read_config_file(filename): """Read a given YAML configuration file""" @@ -156,7 +156,7 @@ def clear_config_caches(): s.files_read_from = [] s.result_dict = {} spack.config._read_config_file_result = {} - spack.config._compiler_by_arch = {} + spack.config._compiler_by_platform = {} spack.compilers._cached_default_compiler = None @@ -213,27 +213,27 @@ def get_config(category_name): return category.result_dict -def get_compilers_config(arch=None): +def get_compilers_config(platform=None): """Get the compiler configuration from config files for the given - architecture. Strips off the architecture component of the + platform. Strips off the platform component of the configuration""" - global _compiler_by_arch - if not arch: - arch = str(spack.architecture.sys_type()) - if arch in _compiler_by_arch: - return _compiler_by_arch[arch] + global _compiler_by_platform + if not platform: + platform = str(spack.architecture.sys_type()) + if platform in _compiler_by_platform: + return _compiler_by_platform[platform] cc_config = get_config('compilers') - if arch in cc_config and 'all' in cc_config: - arch_compiler = dict(cc_config[arch]) - _compiler_by_arch[arch] = _merge_dict(arch_compiler, cc_config['all']) - elif arch in cc_config: - _compiler_by_arch[arch] = cc_config[arch] + if platform in cc_config and 'all' in cc_config: + platform_compiler = dict(cc_config[platform]) + _compiler_by_platform[platform] = _merge_dict(platform_compiler, cc_config['all']) + elif platform in cc_config: + _compiler_by_platform[platform] = cc_config[platform] elif 'all' in cc_config: - _compiler_by_arch[arch] = cc_config['all'] + _compiler_by_platform[platform] = cc_config['all'] else: - _compiler_by_arch[arch] = {} - return _compiler_by_arch[arch] + _compiler_by_platform[platform] = {} + return _compiler_by_platform[platform] def get_mirror_config(): @@ -371,11 +371,11 @@ def add_to_mirror_config(addition_dict, scope=None): add_to_config('mirrors', addition_dict, scope) -def add_to_compiler_config(addition_dict, scope=None, arch=None): +def add_to_compiler_config(addition_dict, scope=None, platform=None): """Add compilers to the configuration files""" - if not arch: - arch = spack.architecture.sys_type() - add_to_config('compilers', { str(arch) : addition_dict }, scope) + if not platform: + platform = spack.architecture.sys_type() + add_to_config('compilers', { str(platform) : addition_dict }, scope) clear_config_caches() diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py index 83e6eb566a..da3441fa13 100644 --- a/lib/spack/spack/directory_layout.py +++ b/lib/spack/spack/directory_layout.py @@ -156,7 +156,7 @@ class DirectoryLayout(object): class YamlDirectoryLayout(DirectoryLayout): """Lays out installation directories like this:: / - / + / -/ --- @@ -201,7 +201,7 @@ class YamlDirectoryLayout(DirectoryLayout): spec.dag_hash(self.hash_len)) path = join_path( - spec.architecture, + spec.target, "%s-%s" % (spec.compiler.name, spec.compiler.version), dir_name) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 56a61adefb..f84ac75c77 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -193,7 +193,7 @@ class Dotkit(EnvModule): @property def file_name(self): - return join_path(Dotkit.path, self.spec.architecture, + return join_path(Dotkit.path, self.spec.target, self.spec.format('$_$@$%@$+$#.dk')) @property @@ -230,7 +230,7 @@ class TclModule(EnvModule): @property def file_name(self): - return join_path(TclModule.path, self.spec.architecture, self.use_name) + return join_path(TclModule.path, self.spec.target, self.use_name) @property diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index e0097fa88d..1148e4ac3d 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -592,7 +592,7 @@ class Package(object): """Get the spack.compiler.Compiler object used to build this package.""" if not self.spec.concrete: raise ValueError("Can only get a compiler for a concrete package.") - return spack.compilers.compiler_for_spec(self.spec.compiler, self.spec.architecture) + return spack.compilers.compiler_for_spec(self.spec.compiler, self.spec.target) def url_version(self, version): diff --git a/lib/spack/spack/platforms/__init__.py b/lib/spack/spack/platforms/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/spack/spack/platforms/bgq.py b/lib/spack/spack/platforms/bgq.py new file mode 100644 index 0000000000..988e67023c --- /dev/null +++ b/lib/spack/spack/platforms/bgq.py @@ -0,0 +1,19 @@ +import os + +from spack.architecture import Platform, Target + +class Bgq(Platform): + priority = 30 + front_end = 'power7' + back_end = 'powerpc' + default = 'powerpc' + + def __init__(self): + super(Bgq, self).__init__('cray') + self.add_target(self.front_end, Target(self.front_end, 'PATH')) + self.add_target(self.back_end, Target(self.back_end, 'PATH')) + + @classmethod + def detect(self): + return os.path.exists('/bgsys') + diff --git a/lib/spack/spack/platforms/cray.py b/lib/spack/spack/platforms/cray.py new file mode 100644 index 0000000000..815a9aea98 --- /dev/null +++ b/lib/spack/spack/platforms/cray.py @@ -0,0 +1,40 @@ +import os + +from spack.architecture import Platform, Target + +class Cray(Platform): + priority = 20 + front_end = 'sandybridge' + back_end = 'ivybridge' + default = 'ivybridge' + + def __init__(self): + ''' Since cori doesn't have ivybridge as a front end it's better + if we use CRAY_CPU_TARGET as the default. This will ensure + that if we're on a XC-40 or XC-30 then we can detect the target + ''' + super(Cray, self).__init__('cray') + + # Handle the default here so we can check for a key error + if 'CRAY_CPU_TARGET' in os.environ: + self.default = os.environ['CRAY_CPU_TARGET'] + + # Change the defaults to haswell if we're on an XC40 + if self.default == 'haswell': + self.front_end = self.default + self.back_end = self.default + + # Could switch to use modules and fe targets for front end + # Currently using compilers by path for front end. + self.add_target(self.front_end, Target(self.front_end, 'PATH')) + # Back End compiler needs the proper target module loaded. +# self.add_target(self.back_end, Target(self.front_end, 'MODULES', 'craype-'+ self.back_end)) + self.add_target(self.default, Target(self.default, 'MODULES', 'craype-' + self.default)) + # This is kludgy and the order matters when the targets are all haswell + # This is because the last one overwrites the others when they have the + # same name. + + @classmethod + def detect(self): + return os.path.exists('/opt/cray/craype') + diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py new file mode 100644 index 0000000000..52284826b1 --- /dev/null +++ b/lib/spack/spack/platforms/darwin.py @@ -0,0 +1,18 @@ +import subprocess +from spack.architecture import Platform, Target + +class Darwin(Platform): + priority = 89 + front_end = 'x86_64' + back_end = 'x86_64' + default = 'x86_64' + + def __init__(self): + super(Darwin, self).__init__('darwin') + self.add_target(self.default, Target(self.default, 'PATH')) + + @classmethod + def detect(self): + platform = subprocess.Popen(['uname', '-a'], stdout = subprocess.PIPE) + platform, _ = platform.communicate() + return 'darwin' in platform.strip().lower() diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py new file mode 100644 index 0000000000..7f94d80c34 --- /dev/null +++ b/lib/spack/spack/platforms/linux.py @@ -0,0 +1,18 @@ +import subprocess +from spack.architecture import Platform, Target + +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, 'PATH')) + + @classmethod + def detect(self): + platform = subprocess.Popen(['uname', '-a'], stdout = subprocess.PIPE) + platform, _ = platform.communicate() + return 'linux' in platform.strip().lower() diff --git a/lib/spack/spack/preferred_packages.py b/lib/spack/spack/preferred_packages.py index bc2a4ac234..993683a62f 100644 --- a/lib/spack/spack/preferred_packages.py +++ b/lib/spack/spack/preferred_packages.py @@ -163,11 +163,11 @@ class PreferredPackages(object): return self._component_compare(pkgname, 'variant', a, b, False, None) - def architecture_compare(self, pkgname, a, b): - """Return less-than-0, 0, or greater than 0 if architecture a of pkgname is - respecively less-than, equal-to, or greater-than architecture b of pkgname. - One architecture is less-than another if it is preferred over the other.""" - return self._component_compare(pkgname, 'architecture', a, b, False, None) + def target_compare(self, pkgname, a, b): + """Return less-than-0, 0, or greater than 0 if target a of pkgname is + respecively less-than, equal-to, or greater-than target b of pkgname. + One target is less-than another if it is preferred over the other.""" + return self._component_compare(pkgname, 'target', a, b, False, None) def compiler_compare(self, pkgname, a, b): diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 126ffc4f95..9e011bfb9f 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -63,7 +63,7 @@ line is a spec for a particular installation of the mpileaks package. if it comes immediately after the compiler name. Otherwise it will be associated with the current package spec. -6. The architecture to build with. This is needed on machines where +6. The target to build with. This is needed on machines where cross-compilation is required Here is the EBNF grammar for a spec:: @@ -72,9 +72,9 @@ Here is the EBNF grammar for a spec:: dep_list = { ^ spec } spec = id [ options ] options = { @version-list | +variant | -variant | ~variant | - %compiler | =architecture } + %compiler | =target } variant = id - architecture = id + target = id compiler = id [ version-list ] version-list = version [ { , version } ] version = id | id: | :id | id:id @@ -119,7 +119,7 @@ identifier_re = r'\w[\w-]*' # Convenient names for color formats so that other things can use them compiler_color = '@g' version_color = '@c' -architecture_color = '@m' +target_color = '@m' enabled_variant_color = '@B' disabled_variant_color = '@r' dependency_color = '@.' @@ -130,7 +130,7 @@ hash_color = '@K' See spack.color for descriptions of the color codes. """ color_formats = {'%' : compiler_color, '@' : version_color, - '=' : architecture_color, + '=' : target_color, '+' : enabled_variant_color, '~' : disabled_variant_color, '^' : dependency_color, @@ -407,7 +407,7 @@ class Spec(object): self.name = other.name self.dependents = other.dependents self.versions = other.versions - self.architecture = other.architecture + self.target = other.target self.compiler = other.compiler self.dependencies = other.dependencies self.variants = other.variants @@ -452,11 +452,11 @@ class Spec(object): self.compiler = compiler - def _set_architecture(self, architecture): - """Called by the parser to set the architecture.""" - if self.architecture: raise DuplicateArchitectureError( - "Spec for '%s' cannot have two architectures." % self.name) - self.architecture = architecture + def _set_target(self, target): + """Called by the parser to set the target.""" + if self.target: raise DuplicateTargetError( + "Spec for '%s' cannot have two targets." % self.name) + self.target = target def _add_dependency(self, spec): @@ -512,7 +512,7 @@ class Spec(object): @property def concrete(self): """A spec is concrete if it can describe only ONE build of a package. - If any of the name, version, architecture, compiler, + If any of the name, version, target, compiler, variants, or depdenencies are ambiguous,then it is not concrete. """ if self._concrete: @@ -521,7 +521,7 @@ class Spec(object): self._concrete = bool(not self.virtual and self.versions.concrete and self.variants.concrete - and self.architecture + and self.target and self.compiler and self.compiler.concrete and self.dependencies.concrete) return self._concrete @@ -656,10 +656,10 @@ class Spec(object): 'dependencies' : dict((d, self.dependencies[d].dag_hash()) for d in sorted(self.dependencies)) } - if self.architecture: - d['arch'] = self.architecture.to_dict() + if self.target: + d['target'] = self.target.to_dict() else: - d['arch'] = None + d['target'] = None if self.compiler: d.update(self.compiler.to_dict()) else: @@ -685,7 +685,7 @@ class Spec(object): spec = Spec(name) spec.versions = VersionList.from_dict(node) - spec.architecture = spack.architecture.Target.from_dict(node['arch']) + spec.target = spack.architecture.Target.from_dict(node['target']) if node['compiler'] is None: spec.compiler = None @@ -757,7 +757,7 @@ class Spec(object): # to presets below, their constraints will all be merged, but we'll # still need to select a concrete package later. changed |= any( - (spack.concretizer.concretize_architecture(self), + (spack.concretizer.concretize_target(self), spack.concretizer.concretize_compiler(self), spack.concretizer.concretize_version(self), spack.concretizer.concretize_variants(self))) @@ -1145,10 +1145,10 @@ class Spec(object): raise UnsatisfiableVariantSpecError(self.variants[v], other.variants[v]) - if self.architecture is not None and other.architecture is not None: - if self.architecture != other.architecture: - raise UnsatisfiableArchitectureSpecError(self.architecture, - other.architecture) + if self.target is not None and other.target is not None: + if self.target != other.target: + raise UnsatisfiableTargetSpecError(self.target, + other.target) changed = False if self.compiler is not None and other.compiler is not None: @@ -1160,9 +1160,9 @@ class Spec(object): changed |= self.versions.intersect(other.versions) changed |= self.variants.constrain(other.variants) - old = self.architecture - self.architecture = self.architecture or other.architecture - changed |= (self.architecture != old) + old = self.target + self.target = self.target or other.target + changed |= (self.target != old) if deps: changed |= self._constrain_dependencies(other) @@ -1273,12 +1273,12 @@ class Spec(object): if not self.variants.satisfies(other.variants, strict=strict): return False - # Architecture satisfaction is currently just string equality. + # Target satisfaction is currently just class equality. # If not strict, None means unconstrained. - if self.architecture and other.architecture: - if self.architecture != other.architecture: + if self.target and other.target: + if self.target != other.target: return False - elif strict and (other.architecture and not self.architecture): + elif strict and (other.target and not self.target): return False # If we need to descend into dependencies, do it, otherwise we're done. @@ -1352,7 +1352,7 @@ class Spec(object): changed = True if hasattr(self, 'name'): changed = (self.name != other.name and self.versions != other.versions and \ - self.architecture != other.architecture and self.compiler != other.compiler and \ + self.target != other.target and self.compiler != other.compiler and \ self.variants != other.variants and self._normal != other._normal and \ self.concrete != other.concrete and self.external != other.external and \ self.external_module != other.external_module) @@ -1360,7 +1360,7 @@ class Spec(object): # Local node attributes get copied first. self.name = other.name self.versions = other.versions.copy() - self.architecture = other.architecture + self.target = other.target self.compiler = other.compiler.copy() if other.compiler else None if kwargs.get('cleardeps', True): self.dependents = DependencyMap() @@ -1490,7 +1490,7 @@ class Spec(object): def _cmp_node(self): """Comparison key for just *this node* and not its deps.""" return (self.name, self.versions, self.variants, - self.architecture, self.compiler) + self.target, self.compiler) def eq_node(self, other): @@ -1524,7 +1524,7 @@ class Spec(object): $% Compiler with '%' prefix $%@ Compiler with '%' prefix & compiler version with '@' prefix $+ Options - $= Architecture with '=' prefix + $= Target with '=' prefix $# 7-char prefix of DAG hash with '-' prefix $$ $ @@ -1536,7 +1536,7 @@ class Spec(object): ${COMPILERNAME} Compiler name ${COMPILERVER} Compiler version ${OPTIONS} Options - ${ARCHITECTURE} Architecture + ${TARGET} Target ${SHA1} Dependencies 8-char sha1 prefix ${SPACK_ROOT} The spack root directory @@ -1549,7 +1549,7 @@ class Spec(object): Anything else is copied verbatim into the output stream. *Example:* ``$_$@$+`` translates to the name, version, and options - of the package, but no dependencies, arch, or compiler. + of the package, but no dependencies, target, or compiler. TODO: allow, e.g., $6# to customize short hash length TODO: allow, e.g., $## for full hash. @@ -1593,8 +1593,8 @@ class Spec(object): if self.variants: write(fmt % str(self.variants), c) elif c == '=': - if self.architecture: - write(fmt % (c + str(self.architecture)), c) + if self.target: + write(fmt % (c + str(self.target)), c) elif c == '#': out.write('-' + fmt % (self.dag_hash(7))) elif c == '$': @@ -1641,9 +1641,9 @@ class Spec(object): elif named_str == 'OPTIONS': if self.variants: write(fmt % str(self.variants), '+') - elif named_str == 'ARCHITECTURE': - if self.architecture: - write(fmt % str(self.architecture), '=') + elif named_str == 'TARGET': + if self.target: + write(fmt % str(self.target), '=') elif named_str == 'SHA1': if self.dependencies: out.write(fmt % str(self.dep_hash(8))) @@ -1691,10 +1691,10 @@ class Spec(object): return spack.pkgsort.variant_compare(pkgname, self.variants, other.variants) - #Architecture - if self.architecture != other.architecture: - return spack.pkgsort.architecture_compare(pkgname, - self.architecture, other.architecture) + #Target + if self.target != other.target: + return spack.pkgsort.target_compare(pkgname, + self.target, other.target) #Dependency is not configurable if self.dep_hash() != other.dep_hash(): @@ -1811,7 +1811,7 @@ class SpecParser(spack.parse.Parser): spec.name = self.token.value spec.versions = VersionList() spec.variants = VariantMap(spec) - spec.architecture = None + spec.target = None spec.compiler = None spec.external = None spec.external_module = None @@ -1842,7 +1842,7 @@ class SpecParser(spack.parse.Parser): spec._set_compiler(self.compiler()) elif self.accept(EQ): - spec._set_architecture(self.architecture()) + spec._set_target(self.target()) else: break @@ -1860,7 +1860,7 @@ class SpecParser(spack.parse.Parser): return self.token.value - def architecture(self): + def target(self): self.expect(ID) return self.token.value @@ -2000,10 +2000,10 @@ class UnknownVariantError(SpecError): "Package %s has no variant %s!" % (pkg, variant)) -class DuplicateArchitectureError(SpecError): - """Raised when the same architecture occurs in a spec twice.""" +class DuplicateTargetError(SpecError): + """Raised when the same target occurs in a spec twice.""" def __init__(self, message): - super(DuplicateArchitectureError, self).__init__(message) + super(DuplicateTargetError, self).__init__(message) class InconsistentSpecError(SpecError): @@ -2082,11 +2082,11 @@ class UnsatisfiableVariantSpecError(UnsatisfiableSpecError): provided, required, "variant") -class UnsatisfiableArchitectureSpecError(UnsatisfiableSpecError): - """Raised when a spec architecture conflicts with package constraints.""" +class UnsatisfiableTargetSpecError(UnsatisfiableSpecError): + """Raised when a spec target conflicts with package constraints.""" def __init__(self, provided, required): - super(UnsatisfiableArchitectureSpecError, self).__init__( - provided, required, "architecture") + super(UnsatisfiableTargetSpecError, self).__init__( + provided, required, "target") class UnsatisfiableProviderSpecError(UnsatisfiableSpecError): diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 3a7474799a..32b16feeb1 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -6,13 +6,14 @@ import os import platform import spack from spack.architecture import * -from spack.architectures.cray import Cray -from spack.architectures.linux import Linux -from spack.architectures.bgq import Bgq +from spack.platforms.cray import Cray +from spack.platforms.linux import Linux +from spack.platforms.bgq import Bgq +from spack.platforms.darwin import Darwin class ArchitectureTest(unittest.TestCase): - def test_Architecture_class_and_compiler_strategies(self): + def test_platform_class_and_compiler_strategies(self): a = Cray() t = a.target('default') self.assertEquals(t.compiler_strategy, 'MODULES') @@ -21,15 +22,15 @@ class ArchitectureTest(unittest.TestCase): self.assertEquals(s.compiler_strategy, 'PATH') def test_sys_type(self): - output_arch_class = sys_type() + output_platform_class = sys_type() my_arch_class = None if os.path.exists('/opt/cray/craype'): - my_arch_class = Cray() + my_platform_class = Cray() elif os.path.exists('/bgsys'): - my_arch_class = Bgq() + my_platform_class = Bgq() elif 'Linux' in platform.system(): - my_arch_class = Linux() -# elif 'Darwin' in platform.system(): -# my_arch_class = Darwin() + my_platform_class = Linux() + elif 'Darwin' in platform.system(): + my_platform_class = Darwin() - self.assertEqual(str(output_arch_class), str(my_arch_class)) + self.assertEqual(str(output_platform_class), str(my_platform_class)) diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index f81a2f5af8..2403719134 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -46,8 +46,8 @@ class ConcretizeTest(MockPackagesTest): if abstract.compiler and abstract.compiler.concrete: self.assertEqual(abstract.compiler, concrete.compiler) - if abstract.architecture and abstract.architecture.concrete: - self.assertEqual(abstract.architecture, concrete.architecture) + if abstract.target and abstract.target.concrete: + self.assertEqual(abstract.target, concrete.target) def check_concretize(self, abstract_spec): diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index cd5d9e625e..741dc96072 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -91,21 +91,21 @@ class MultiMethodTest(MockPackagesTest): self.assertEqual(pkg.has_a_default(), 'default') - def test_architecture_match(self): + def test_target_match(self): pkg = spack.db.get('multimethod=x86_64') - self.assertEqual(pkg.different_by_architecture(), 'x86_64') + self.assertEqual(pkg.different_by_target(), 'x86_64') pkg = spack.db.get('multimethod=ppc64') - self.assertEqual(pkg.different_by_architecture(), 'ppc64') + self.assertEqual(pkg.different_by_target(), 'ppc64') pkg = spack.db.get('multimethod=ppc32') - self.assertEqual(pkg.different_by_architecture(), 'ppc32') + self.assertEqual(pkg.different_by_target(), 'ppc32') pkg = spack.db.get('multimethod=arm64') - self.assertEqual(pkg.different_by_architecture(), 'arm64') + self.assertEqual(pkg.different_by_target(), 'arm64') pkg = spack.db.get('multimethod=macos') - self.assertRaises(NoSuchMethodError, pkg.different_by_architecture) + self.assertRaises(NoSuchMethodError, pkg.different_by_target) def test_dependency_match(self): diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index 549f829d3e..6a2dd6140f 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -240,10 +240,10 @@ class SpecDagTest(MockPackagesTest): self.assertRaises(spack.spec.UnsatisfiableCompilerSpecError, spec.normalize) - def test_unsatisfiable_architecture(self): + def test_unsatisfiable_target(self): set_pkg_dep('mpileaks', 'mpich=bgqos_0') spec = Spec('mpileaks ^mpich=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf') - self.assertRaises(spack.spec.UnsatisfiableArchitectureSpecError, spec.normalize) + self.assertRaises(spack.spec.UnsatisfiableTargetSpecError, spec.normalize) def test_invalid_dep(self): diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 6666dbbb52..b8b4fb951c 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -110,7 +110,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_unsatisfiable('foo %gcc@4.7', '%gcc@4.7.3') - def test_satisfies_architecture(self): + def test_satisfies_target(self): self.check_satisfies('foo=chaos_5_x86_64_ib', '=chaos_5_x86_64_ib') self.check_satisfies('foo=bgqos_0', '=bgqos_0') @@ -266,7 +266,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain('libelf+debug~foo', 'libelf+debug', 'libelf+debug~foo') - def test_constrain_arch(self): + def test_constrain_target(self): self.check_constrain('libelf=bgqos_0', 'libelf=bgqos_0', 'libelf=bgqos_0') self.check_constrain('libelf=bgqos_0', 'libelf', 'libelf=bgqos_0') diff --git a/var/spack/mock_packages/multimethod/package.py b/var/spack/mock_packages/multimethod/package.py index 75b1606ffc..f78ef3bb3d 100644 --- a/var/spack/mock_packages/multimethod/package.py +++ b/var/spack/mock_packages/multimethod/package.py @@ -101,22 +101,22 @@ class Multimethod(Package): # - # Make sure we can switch methods on different architectures + # Make sure we can switch methods on different target # @when('=x86_64') - def different_by_architecture(self): + def different_by_target(self): return 'x86_64' @when('=ppc64') - def different_by_architecture(self): + def different_by_target(self): return 'ppc64' @when('=ppc32') - def different_by_architecture(self): + def different_by_target(self): return 'ppc32' @when('=arm64') - def different_by_architecture(self): + def different_by_target(self): return 'arm64' -- cgit v1.2.3-70-g09d2 From 83917c4c302851a0d4ff91ef652fdd1b26fb1e08 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 7 Jan 2016 12:43:39 -0800 Subject: Improved target specification --- lib/spack/spack/architecture.py | 2 ++ lib/spack/spack/concretize.py | 38 ++++++++++++++++++++++++++++++++++---- lib/spack/spack/platforms/bgq.py | 2 +- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index a269767fab..6b9ae33b3e 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -93,6 +93,8 @@ class Target(object): return self.__str__() def __str__(self): + if self.platform_name: + return self.platform_name + '-' + self.name return self.name @key_ordering diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index fcd23a6055..ce86786004 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -33,11 +33,13 @@ or user preferences. TODO: make this customizable and allow users to configure concretization policies. """ +from llnl.util.filesystem import join_path import spack import spack.spec import spack.compilers import spack.architecture import spack.error +from spack.util.naming import mod_to_class from spack.version import * from functools import partial from spec import DependencyMap @@ -207,6 +209,36 @@ class DefaultConcretizer(object): return True # Things changed + def class_from_platform_name(self, platform_name): + file_path = join_path(spack.platform_path, platform_name) + platform_mod = imp.load_source('spack.platforms', file_path + '.py') + cls = getattr(platform_mod, mod_to_class(platform_name)) + + return cls + + def spec_add_target_from_string(self, spec, target): + """If only a target is provided, spack will assume the default architecture. + A platform-target pair can be input delimited by a '-'. If either portion of + a platform-target pair is empty, spack will supply a default, in the case of + a blank target the default will be dependent on the platform. + E.g. x86_64 -> 64 bit x86 + bgq- -> default bgq target (back end/powerpc) + cray-hawswell -> haswell target on cray platform + """ + if '-' in target: + platform, target = target.split('-') + else: + platform = '' + + if platform != '': + cls = self.class_from_platform_name(platform) + platform = cls() + else: + platform = spack.architecture.sys_type() + if target != '': + spec.target = platform.target(target) + else: + spec.target = platform.target('default') def concretize_target(self, spec): """If the spec already has an target and it is a an target type, @@ -219,16 +251,14 @@ class DefaultConcretizer(object): if isinstance(spec.target,spack.architecture.Target): return False else: - platform = spack.architecture.sys_type() - spec.target = platform.target(spec.target) + self.spec_add_target_from_string(spec, spec.target) return True #changed if spec.root.target: if isinstance(spec.root.target,spack.architecture.Target): spec.target = spec.root.target else: - platform = spack.architecture.sys_type() - spec.target = platform.target(spec.root.target) + self.spec_add_target_from_string(spec, spec.root.target) else: platform = spack.architecture.sys_type() spec.target = platform.target('default') diff --git a/lib/spack/spack/platforms/bgq.py b/lib/spack/spack/platforms/bgq.py index 988e67023c..6e872d2e72 100644 --- a/lib/spack/spack/platforms/bgq.py +++ b/lib/spack/spack/platforms/bgq.py @@ -9,7 +9,7 @@ class Bgq(Platform): default = 'powerpc' def __init__(self): - super(Bgq, self).__init__('cray') + super(Bgq, self).__init__('bgq') self.add_target(self.front_end, Target(self.front_end, 'PATH')) self.add_target(self.back_end, Target(self.back_end, 'PATH')) -- cgit v1.2.3-70-g09d2 From 53d4f82ce1863d0871f53a7e20b75d73b8d4fad6 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 7 Jan 2016 13:01:05 -0800 Subject: Improved cray architecture class --- lib/spack/spack/platforms/cray.py | 40 -------------------------------- lib/spack/spack/platforms/cray_xc.py | 45 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 40 deletions(-) delete mode 100644 lib/spack/spack/platforms/cray.py create mode 100644 lib/spack/spack/platforms/cray_xc.py diff --git a/lib/spack/spack/platforms/cray.py b/lib/spack/spack/platforms/cray.py deleted file mode 100644 index 815a9aea98..0000000000 --- a/lib/spack/spack/platforms/cray.py +++ /dev/null @@ -1,40 +0,0 @@ -import os - -from spack.architecture import Platform, Target - -class Cray(Platform): - priority = 20 - front_end = 'sandybridge' - back_end = 'ivybridge' - default = 'ivybridge' - - def __init__(self): - ''' Since cori doesn't have ivybridge as a front end it's better - if we use CRAY_CPU_TARGET as the default. This will ensure - that if we're on a XC-40 or XC-30 then we can detect the target - ''' - super(Cray, self).__init__('cray') - - # Handle the default here so we can check for a key error - if 'CRAY_CPU_TARGET' in os.environ: - self.default = os.environ['CRAY_CPU_TARGET'] - - # Change the defaults to haswell if we're on an XC40 - if self.default == 'haswell': - self.front_end = self.default - self.back_end = self.default - - # Could switch to use modules and fe targets for front end - # Currently using compilers by path for front end. - self.add_target(self.front_end, Target(self.front_end, 'PATH')) - # Back End compiler needs the proper target module loaded. -# self.add_target(self.back_end, Target(self.front_end, 'MODULES', 'craype-'+ self.back_end)) - self.add_target(self.default, Target(self.default, 'MODULES', 'craype-' + self.default)) - # This is kludgy and the order matters when the targets are all haswell - # This is because the last one overwrites the others when they have the - # same name. - - @classmethod - def detect(self): - return os.path.exists('/opt/cray/craype') - diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py new file mode 100644 index 0000000000..e3adb182ea --- /dev/null +++ b/lib/spack/spack/platforms/cray_xc.py @@ -0,0 +1,45 @@ +import os + +from spack.architecture import Platform, Target + +class CrayXc(Platform): + priority = 20 + front_end = 'sandybridge' + back_end = 'ivybridge' + default = 'ivybridge' + + def __init__(self): + ''' Since cori doesn't have ivybridge as a front end it's better + if we use CRAY_CPU_TARGET as the default. This will ensure + that if we're on a XC-40 or XC-30 then we can detect the target + ''' + super(CrayXc, self).__init__('cray_xc') + + # Handle the default here so we can check for a key error + if 'CRAY_CPU_TARGET' in os.environ: + self.default = os.environ['CRAY_CPU_TARGET'] + + # Change the defaults to haswell if we're on an XC40 + if self.default == 'haswell': + self.front_end = self.default + self.back_end = self.default + + + # Could switch to use modules and fe targets for front end + # Currently using compilers by path for front end. + self.add_target('sandybridge', Target('sandybridge', 'PATH')) + self.add_target('ivybridge', Target('ivybridge', 'MODULES', 'craype-ivybridge')) + self.add_target('haswell', Target('haswell', 'MODULES', 'craype-haswell')) + +# self.add_target(self.front_end, Target(self.front_end, 'PATH')) + # Back End compiler needs the proper target module loaded. +# self.add_target(self.back_end, Target(self.front_end, 'MODULES', 'craype-'+ self.back_end)) +# self.add_target(self.default, Target(self.default, 'MODULES', 'craype-' + self.default)) + # This is kludgy and the order matters when the targets are all haswell + # This is because the last one overwrites the others when they have the + # same name. + + @classmethod + def detect(self): + return os.path.exists('/opt/cray/craype') + -- cgit v1.2.3-70-g09d2 From ba63111f453e258a0231a285dcbb11a876cccc19 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 7 Jan 2016 13:05:58 -0800 Subject: brought the architecture test up to date with new changes --- lib/spack/spack/test/architecture.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 32b16feeb1..cf7938f5d6 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -6,7 +6,7 @@ import os import platform import spack from spack.architecture import * -from spack.platforms.cray import Cray +from spack.platforms.cray_xc import CrayXc from spack.platforms.linux import Linux from spack.platforms.bgq import Bgq from spack.platforms.darwin import Darwin @@ -14,7 +14,7 @@ from spack.platforms.darwin import Darwin class ArchitectureTest(unittest.TestCase): def test_platform_class_and_compiler_strategies(self): - a = Cray() + a = CrayXc() t = a.target('default') self.assertEquals(t.compiler_strategy, 'MODULES') b = Linux() @@ -25,7 +25,7 @@ class ArchitectureTest(unittest.TestCase): output_platform_class = sys_type() my_arch_class = None if os.path.exists('/opt/cray/craype'): - my_platform_class = Cray() + my_platform_class = CrayXc() elif os.path.exists('/bgsys'): my_platform_class = Bgq() elif 'Linux' in platform.system(): -- cgit v1.2.3-70-g09d2 From 49908386ef5d14be5cb34adb2040a7f2d535019c Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 11:48:59 -0800 Subject: changing problematic package.py file permissions back to 0644 --- var/spack/packages/ImageMagick/package.py | 0 var/spack/packages/Mitos/package.py | 0 var/spack/packages/R/package.py | 0 var/spack/packages/SAMRAI/package.py | 0 var/spack/packages/adept-utils/package.py | 0 var/spack/packages/adios/package.py | 5 +++-- var/spack/packages/arpack/package.py | 0 var/spack/packages/atk/package.py | 0 var/spack/packages/atlas/package.py | 0 var/spack/packages/autoconf/package.py | 0 var/spack/packages/automaded/package.py | 0 var/spack/packages/automake/package.py | 0 var/spack/packages/bear/package.py | 0 var/spack/packages/bib2xhtml/package.py | 0 var/spack/packages/binutils/package.py | 0 var/spack/packages/bison/package.py | 0 var/spack/packages/boost/package.py | 0 var/spack/packages/boxlib/package.py | 0 var/spack/packages/bzip2/package.py | 0 var/spack/packages/cairo/package.py | 0 var/spack/packages/callpath/package.py | 0 var/spack/packages/cblas/package.py | 0 var/spack/packages/cgm/package.py | 0 var/spack/packages/clang/package.py | 0 var/spack/packages/cloog/package.py | 0 var/spack/packages/cmake/package.py | 0 var/spack/packages/coreutils/package.py | 0 var/spack/packages/cppcheck/package.py | 0 var/spack/packages/cram/package.py | 0 var/spack/packages/cube/package.py | 0 var/spack/packages/dbus/package.py | 0 var/spack/packages/dri2proto/package.py | 0 var/spack/packages/dtcmp/package.py | 0 var/spack/packages/dyninst/package.py | 0 var/spack/packages/extrae/package.py | 0 var/spack/packages/exuberant-ctags/package.py | 0 var/spack/packages/flex/package.py | 0 var/spack/packages/fontconfig/package.py | 0 var/spack/packages/freetype/package.py | 0 var/spack/packages/gasnet/package.py | 0 var/spack/packages/gcc/package.py | 0 var/spack/packages/gdk-pixbuf/package.py | 0 var/spack/packages/geos/package.py | 0 var/spack/packages/git/package.py | 0 var/spack/packages/glib/package.py | 0 var/spack/packages/global/package.py | 0 var/spack/packages/gmp/package.py | 0 var/spack/packages/gnutls/package.py | 0 var/spack/packages/gperf/package.py | 0 var/spack/packages/gperftools/package.py | 0 var/spack/packages/graphlib/package.py | 0 var/spack/packages/gtkplus/package.py | 0 var/spack/packages/harfbuzz/package.py | 0 var/spack/packages/hdf5/package.py | 0 var/spack/packages/hwloc/package.py | 0 var/spack/packages/hypre/package.py | 0 var/spack/packages/icu/package.py | 0 var/spack/packages/icu4c/package.py | 0 var/spack/packages/isl/package.py | 0 var/spack/packages/jdk/package.py | 0 var/spack/packages/jpeg/package.py | 0 var/spack/packages/lapack/package.py | 0 var/spack/packages/launchmon/package.py | 0 var/spack/packages/lcms/package.py | 0 var/spack/packages/libNBC/package.py | 0 var/spack/packages/libarchive/package.py | 0 var/spack/packages/libcircle/package.py | 0 var/spack/packages/libdrm/package.py | 0 var/spack/packages/libdwarf/package.py | 0 var/spack/packages/libelf/package.py | 0 var/spack/packages/libevent/package.py | 0 var/spack/packages/libffi/package.py | 0 var/spack/packages/libgcrypt/package.py | 0 var/spack/packages/libgpg-error/package.py | 0 var/spack/packages/libjpeg-turbo/package.py | 0 var/spack/packages/libmng/package.py | 0 var/spack/packages/libmonitor/package.py | 0 var/spack/packages/libpciaccess/package.py | 0 var/spack/packages/libpng/package.py | 0 var/spack/packages/libtiff/package.py | 0 var/spack/packages/libtool/package.py | 0 var/spack/packages/libunwind/package.py | 0 var/spack/packages/libuuid/package.py | 0 var/spack/packages/libxcb/package.py | 0 var/spack/packages/libxml2/package.py | 0 var/spack/packages/libxshmfence/package.py | 0 var/spack/packages/libxslt/package.py | 0 var/spack/packages/llvm-lld/package.py | 0 var/spack/packages/llvm/package.py | 0 var/spack/packages/lwgrp/package.py | 0 var/spack/packages/lwm2/package.py | 0 var/spack/packages/memaxes/package.py | 0 var/spack/packages/mesa/package.py | 0 var/spack/packages/metis/package.py | 0 var/spack/packages/mpc/package.py | 0 var/spack/packages/mpe2/package.py | 0 var/spack/packages/mpfr/package.py | 0 var/spack/packages/mpibash/package.py | 0 var/spack/packages/mpich/package.py | 0 var/spack/packages/mpileaks/package.py | 0 var/spack/packages/mrnet/package.py | 0 var/spack/packages/muster/package.py | 0 var/spack/packages/mvapich2/package.py | 0 var/spack/packages/nasm/package.py | 0 var/spack/packages/ncurses/package.py | 0 var/spack/packages/netcdf/package.py | 0 var/spack/packages/netgauge/package.py | 0 var/spack/packages/netlib-blas/package.py | 0 var/spack/packages/nettle/package.py | 0 var/spack/packages/ompss/package.py | 0 var/spack/packages/opari2/package.py | 0 var/spack/packages/openmpi/package.py | 0 var/spack/packages/openssl/package.py | 0 var/spack/packages/otf/package.py | 0 var/spack/packages/otf2/package.py | 0 var/spack/packages/pango/package.py | 0 var/spack/packages/papi/package.py | 0 var/spack/packages/paraver/package.py | 0 var/spack/packages/parmetis/package.py | 0 var/spack/packages/parpack/package.py | 0 var/spack/packages/pcre/package.py | 0 var/spack/packages/petsc/package.py | 0 var/spack/packages/pixman/package.py | 0 var/spack/packages/pmgr_collective/package.py | 0 var/spack/packages/postgresql/package.py | 0 var/spack/packages/ppl/package.py | 0 var/spack/packages/py-basemap/package.py | 0 var/spack/packages/py-biopython/package.py | 0 var/spack/packages/py-cffi/package.py | 0 var/spack/packages/py-cython/package.py | 0 var/spack/packages/py-dateutil/package.py | 0 var/spack/packages/py-epydoc/package.py | 0 var/spack/packages/py-genders/package.py | 0 var/spack/packages/py-gnuplot/package.py | 0 var/spack/packages/py-h5py/package.py | 0 var/spack/packages/py-ipython/package.py | 0 var/spack/packages/py-jsonschema/package.py | 0 var/spack/packages/py-libxml2/package.py | 0 var/spack/packages/py-lockfile/package.py | 0 var/spack/packages/py-mako/package.py | 0 var/spack/packages/py-matplotlib/package.py | 0 var/spack/packages/py-mpi4py/package.py | 0 var/spack/packages/py-mx/package.py | 0 var/spack/packages/py-nose/package.py | 0 var/spack/packages/py-numpy/package.py | 0 var/spack/packages/py-pandas/package.py | 0 var/spack/packages/py-pexpect/package.py | 0 var/spack/packages/py-pil/package.py | 0 var/spack/packages/py-pmw/package.py | 0 var/spack/packages/py-py4j/package.py | 0 var/spack/packages/py-pychecker/package.py | 0 var/spack/packages/py-pycparser/package.py | 0 var/spack/packages/py-pyelftools/package.py | 0 var/spack/packages/py-pygments/package.py | 0 var/spack/packages/py-pylint/package.py | 0 var/spack/packages/py-pypar/package.py | 0 var/spack/packages/py-pyparsing/package.py | 0 var/spack/packages/py-pyqt/package.py | 0 var/spack/packages/py-pyside/package.py | 0 var/spack/packages/py-python-daemon/package.py | 0 var/spack/packages/py-pytz/package.py | 0 var/spack/packages/py-pyzmq/package.py | 0 var/spack/packages/py-rpy2/package.py | 0 var/spack/packages/py-scientificpython/package.py | 0 var/spack/packages/py-scikit-learn/package.py | 0 var/spack/packages/py-scipy/package.py | 0 var/spack/packages/py-setuptools/package.py | 0 var/spack/packages/py-shiboken/package.py | 0 var/spack/packages/py-sip/package.py | 0 var/spack/packages/py-six/package.py | 0 var/spack/packages/py-sympy/package.py | 0 var/spack/packages/py-tornado/package.py | 0 var/spack/packages/py-traitlets/package.py | 0 var/spack/packages/py-virtualenv/package.py | 0 var/spack/packages/py-yapf/package.py | 0 var/spack/packages/python/package.py | 0 var/spack/packages/qhull/package.py | 0 var/spack/packages/qt/package.py | 0 var/spack/packages/qthreads/package.py | 0 var/spack/packages/ravel/package.py | 0 var/spack/packages/readline/package.py | 0 var/spack/packages/rose/package.py | 0 var/spack/packages/ruby/package.py | 0 var/spack/packages/scalasca/package.py | 0 var/spack/packages/scorep/package.py | 0 var/spack/packages/scotch/package.py | 0 var/spack/packages/scr/package.py | 0 var/spack/packages/silo/package.py | 0 var/spack/packages/spindle/package.py | 0 var/spack/packages/sqlite/package.py | 0 var/spack/packages/stat/package.py | 0 var/spack/packages/sundials/package.py | 0 var/spack/packages/swig/package.py | 0 var/spack/packages/task/package.py | 0 var/spack/packages/taskd/package.py | 0 var/spack/packages/tau/package.py | 0 var/spack/packages/tcl/package.py | 0 var/spack/packages/the_silver_searcher/package.py | 0 var/spack/packages/thrift/package.py | 0 var/spack/packages/tk/package.py | 0 var/spack/packages/tmux/package.py | 0 var/spack/packages/tmuxinator/package.py | 0 var/spack/packages/uncrustify/package.py | 0 var/spack/packages/util-linux/package.py | 0 var/spack/packages/vim/package.py | 0 var/spack/packages/vtk/package.py | 0 var/spack/packages/wget/package.py | 0 var/spack/packages/wx/package.py | 0 var/spack/packages/wxpropgrid/package.py | 0 var/spack/packages/xcb-proto/package.py | 0 var/spack/packages/xz/package.py | 0 var/spack/packages/yasm/package.py | 0 var/spack/packages/zlib/package.py | 0 var/spack/packages/zsh/package.py | 0 214 files changed, 3 insertions(+), 2 deletions(-) mode change 100755 => 100644 var/spack/packages/ImageMagick/package.py mode change 100755 => 100644 var/spack/packages/Mitos/package.py mode change 100755 => 100644 var/spack/packages/R/package.py mode change 100755 => 100644 var/spack/packages/SAMRAI/package.py mode change 100755 => 100644 var/spack/packages/adept-utils/package.py mode change 100755 => 100644 var/spack/packages/arpack/package.py mode change 100755 => 100644 var/spack/packages/atk/package.py mode change 100755 => 100644 var/spack/packages/atlas/package.py mode change 100755 => 100644 var/spack/packages/autoconf/package.py mode change 100755 => 100644 var/spack/packages/automaded/package.py mode change 100755 => 100644 var/spack/packages/automake/package.py mode change 100755 => 100644 var/spack/packages/bear/package.py mode change 100755 => 100644 var/spack/packages/bib2xhtml/package.py mode change 100755 => 100644 var/spack/packages/binutils/package.py mode change 100755 => 100644 var/spack/packages/bison/package.py mode change 100755 => 100644 var/spack/packages/boost/package.py mode change 100755 => 100644 var/spack/packages/boxlib/package.py mode change 100755 => 100644 var/spack/packages/bzip2/package.py mode change 100755 => 100644 var/spack/packages/cairo/package.py mode change 100755 => 100644 var/spack/packages/callpath/package.py mode change 100755 => 100644 var/spack/packages/cblas/package.py mode change 100755 => 100644 var/spack/packages/cgm/package.py mode change 100755 => 100644 var/spack/packages/clang/package.py mode change 100755 => 100644 var/spack/packages/cloog/package.py mode change 100755 => 100644 var/spack/packages/cmake/package.py mode change 100755 => 100644 var/spack/packages/coreutils/package.py mode change 100755 => 100644 var/spack/packages/cppcheck/package.py mode change 100755 => 100644 var/spack/packages/cram/package.py mode change 100755 => 100644 var/spack/packages/cube/package.py mode change 100755 => 100644 var/spack/packages/dbus/package.py mode change 100755 => 100644 var/spack/packages/dri2proto/package.py mode change 100755 => 100644 var/spack/packages/dtcmp/package.py mode change 100755 => 100644 var/spack/packages/dyninst/package.py mode change 100755 => 100644 var/spack/packages/extrae/package.py mode change 100755 => 100644 var/spack/packages/exuberant-ctags/package.py mode change 100755 => 100644 var/spack/packages/flex/package.py mode change 100755 => 100644 var/spack/packages/fontconfig/package.py mode change 100755 => 100644 var/spack/packages/freetype/package.py mode change 100755 => 100644 var/spack/packages/gasnet/package.py mode change 100755 => 100644 var/spack/packages/gcc/package.py mode change 100755 => 100644 var/spack/packages/gdk-pixbuf/package.py mode change 100755 => 100644 var/spack/packages/geos/package.py mode change 100755 => 100644 var/spack/packages/git/package.py mode change 100755 => 100644 var/spack/packages/glib/package.py mode change 100755 => 100644 var/spack/packages/global/package.py mode change 100755 => 100644 var/spack/packages/gmp/package.py mode change 100755 => 100644 var/spack/packages/gnutls/package.py mode change 100755 => 100644 var/spack/packages/gperf/package.py mode change 100755 => 100644 var/spack/packages/gperftools/package.py mode change 100755 => 100644 var/spack/packages/graphlib/package.py mode change 100755 => 100644 var/spack/packages/gtkplus/package.py mode change 100755 => 100644 var/spack/packages/harfbuzz/package.py mode change 100755 => 100644 var/spack/packages/hdf5/package.py mode change 100755 => 100644 var/spack/packages/hwloc/package.py mode change 100755 => 100644 var/spack/packages/hypre/package.py mode change 100755 => 100644 var/spack/packages/icu/package.py mode change 100755 => 100644 var/spack/packages/icu4c/package.py mode change 100755 => 100644 var/spack/packages/isl/package.py mode change 100755 => 100644 var/spack/packages/jdk/package.py mode change 100755 => 100644 var/spack/packages/jpeg/package.py mode change 100755 => 100644 var/spack/packages/lapack/package.py mode change 100755 => 100644 var/spack/packages/launchmon/package.py mode change 100755 => 100644 var/spack/packages/lcms/package.py mode change 100755 => 100644 var/spack/packages/libNBC/package.py mode change 100755 => 100644 var/spack/packages/libarchive/package.py mode change 100755 => 100644 var/spack/packages/libcircle/package.py mode change 100755 => 100644 var/spack/packages/libdrm/package.py mode change 100755 => 100644 var/spack/packages/libdwarf/package.py mode change 100755 => 100644 var/spack/packages/libelf/package.py mode change 100755 => 100644 var/spack/packages/libevent/package.py mode change 100755 => 100644 var/spack/packages/libffi/package.py mode change 100755 => 100644 var/spack/packages/libgcrypt/package.py mode change 100755 => 100644 var/spack/packages/libgpg-error/package.py mode change 100755 => 100644 var/spack/packages/libjpeg-turbo/package.py mode change 100755 => 100644 var/spack/packages/libmng/package.py mode change 100755 => 100644 var/spack/packages/libmonitor/package.py mode change 100755 => 100644 var/spack/packages/libpciaccess/package.py mode change 100755 => 100644 var/spack/packages/libpng/package.py mode change 100755 => 100644 var/spack/packages/libtiff/package.py mode change 100755 => 100644 var/spack/packages/libtool/package.py mode change 100755 => 100644 var/spack/packages/libunwind/package.py mode change 100755 => 100644 var/spack/packages/libuuid/package.py mode change 100755 => 100644 var/spack/packages/libxcb/package.py mode change 100755 => 100644 var/spack/packages/libxml2/package.py mode change 100755 => 100644 var/spack/packages/libxshmfence/package.py mode change 100755 => 100644 var/spack/packages/libxslt/package.py mode change 100755 => 100644 var/spack/packages/llvm-lld/package.py mode change 100755 => 100644 var/spack/packages/llvm/package.py mode change 100755 => 100644 var/spack/packages/lwgrp/package.py mode change 100755 => 100644 var/spack/packages/lwm2/package.py mode change 100755 => 100644 var/spack/packages/memaxes/package.py mode change 100755 => 100644 var/spack/packages/mesa/package.py mode change 100755 => 100644 var/spack/packages/metis/package.py mode change 100755 => 100644 var/spack/packages/mpc/package.py mode change 100755 => 100644 var/spack/packages/mpe2/package.py mode change 100755 => 100644 var/spack/packages/mpfr/package.py mode change 100755 => 100644 var/spack/packages/mpibash/package.py mode change 100755 => 100644 var/spack/packages/mpich/package.py mode change 100755 => 100644 var/spack/packages/mpileaks/package.py mode change 100755 => 100644 var/spack/packages/mrnet/package.py mode change 100755 => 100644 var/spack/packages/muster/package.py mode change 100755 => 100644 var/spack/packages/mvapich2/package.py mode change 100755 => 100644 var/spack/packages/nasm/package.py mode change 100755 => 100644 var/spack/packages/ncurses/package.py mode change 100755 => 100644 var/spack/packages/netcdf/package.py mode change 100755 => 100644 var/spack/packages/netgauge/package.py mode change 100755 => 100644 var/spack/packages/netlib-blas/package.py mode change 100755 => 100644 var/spack/packages/nettle/package.py mode change 100755 => 100644 var/spack/packages/ompss/package.py mode change 100755 => 100644 var/spack/packages/opari2/package.py mode change 100755 => 100644 var/spack/packages/openmpi/package.py mode change 100755 => 100644 var/spack/packages/openssl/package.py mode change 100755 => 100644 var/spack/packages/otf/package.py mode change 100755 => 100644 var/spack/packages/otf2/package.py mode change 100755 => 100644 var/spack/packages/pango/package.py mode change 100755 => 100644 var/spack/packages/papi/package.py mode change 100755 => 100644 var/spack/packages/paraver/package.py mode change 100755 => 100644 var/spack/packages/parmetis/package.py mode change 100755 => 100644 var/spack/packages/parpack/package.py mode change 100755 => 100644 var/spack/packages/pcre/package.py mode change 100755 => 100644 var/spack/packages/petsc/package.py mode change 100755 => 100644 var/spack/packages/pixman/package.py mode change 100755 => 100644 var/spack/packages/pmgr_collective/package.py mode change 100755 => 100644 var/spack/packages/postgresql/package.py mode change 100755 => 100644 var/spack/packages/ppl/package.py mode change 100755 => 100644 var/spack/packages/py-basemap/package.py mode change 100755 => 100644 var/spack/packages/py-biopython/package.py mode change 100755 => 100644 var/spack/packages/py-cffi/package.py mode change 100755 => 100644 var/spack/packages/py-cython/package.py mode change 100755 => 100644 var/spack/packages/py-dateutil/package.py mode change 100755 => 100644 var/spack/packages/py-epydoc/package.py mode change 100755 => 100644 var/spack/packages/py-genders/package.py mode change 100755 => 100644 var/spack/packages/py-gnuplot/package.py mode change 100755 => 100644 var/spack/packages/py-h5py/package.py mode change 100755 => 100644 var/spack/packages/py-ipython/package.py mode change 100755 => 100644 var/spack/packages/py-jsonschema/package.py mode change 100755 => 100644 var/spack/packages/py-libxml2/package.py mode change 100755 => 100644 var/spack/packages/py-lockfile/package.py mode change 100755 => 100644 var/spack/packages/py-mako/package.py mode change 100755 => 100644 var/spack/packages/py-matplotlib/package.py mode change 100755 => 100644 var/spack/packages/py-mpi4py/package.py mode change 100755 => 100644 var/spack/packages/py-mx/package.py mode change 100755 => 100644 var/spack/packages/py-nose/package.py mode change 100755 => 100644 var/spack/packages/py-numpy/package.py mode change 100755 => 100644 var/spack/packages/py-pandas/package.py mode change 100755 => 100644 var/spack/packages/py-pexpect/package.py mode change 100755 => 100644 var/spack/packages/py-pil/package.py mode change 100755 => 100644 var/spack/packages/py-pmw/package.py mode change 100755 => 100644 var/spack/packages/py-py4j/package.py mode change 100755 => 100644 var/spack/packages/py-pychecker/package.py mode change 100755 => 100644 var/spack/packages/py-pycparser/package.py mode change 100755 => 100644 var/spack/packages/py-pyelftools/package.py mode change 100755 => 100644 var/spack/packages/py-pygments/package.py mode change 100755 => 100644 var/spack/packages/py-pylint/package.py mode change 100755 => 100644 var/spack/packages/py-pypar/package.py mode change 100755 => 100644 var/spack/packages/py-pyparsing/package.py mode change 100755 => 100644 var/spack/packages/py-pyqt/package.py mode change 100755 => 100644 var/spack/packages/py-pyside/package.py mode change 100755 => 100644 var/spack/packages/py-python-daemon/package.py mode change 100755 => 100644 var/spack/packages/py-pytz/package.py mode change 100755 => 100644 var/spack/packages/py-pyzmq/package.py mode change 100755 => 100644 var/spack/packages/py-rpy2/package.py mode change 100755 => 100644 var/spack/packages/py-scientificpython/package.py mode change 100755 => 100644 var/spack/packages/py-scikit-learn/package.py mode change 100755 => 100644 var/spack/packages/py-scipy/package.py mode change 100755 => 100644 var/spack/packages/py-setuptools/package.py mode change 100755 => 100644 var/spack/packages/py-shiboken/package.py mode change 100755 => 100644 var/spack/packages/py-sip/package.py mode change 100755 => 100644 var/spack/packages/py-six/package.py mode change 100755 => 100644 var/spack/packages/py-sympy/package.py mode change 100755 => 100644 var/spack/packages/py-tornado/package.py mode change 100755 => 100644 var/spack/packages/py-traitlets/package.py mode change 100755 => 100644 var/spack/packages/py-virtualenv/package.py mode change 100755 => 100644 var/spack/packages/py-yapf/package.py mode change 100755 => 100644 var/spack/packages/python/package.py mode change 100755 => 100644 var/spack/packages/qhull/package.py mode change 100755 => 100644 var/spack/packages/qt/package.py mode change 100755 => 100644 var/spack/packages/qthreads/package.py mode change 100755 => 100644 var/spack/packages/ravel/package.py mode change 100755 => 100644 var/spack/packages/readline/package.py mode change 100755 => 100644 var/spack/packages/rose/package.py mode change 100755 => 100644 var/spack/packages/ruby/package.py mode change 100755 => 100644 var/spack/packages/scalasca/package.py mode change 100755 => 100644 var/spack/packages/scorep/package.py mode change 100755 => 100644 var/spack/packages/scotch/package.py mode change 100755 => 100644 var/spack/packages/scr/package.py mode change 100755 => 100644 var/spack/packages/silo/package.py mode change 100755 => 100644 var/spack/packages/spindle/package.py mode change 100755 => 100644 var/spack/packages/sqlite/package.py mode change 100755 => 100644 var/spack/packages/stat/package.py mode change 100755 => 100644 var/spack/packages/sundials/package.py mode change 100755 => 100644 var/spack/packages/swig/package.py mode change 100755 => 100644 var/spack/packages/task/package.py mode change 100755 => 100644 var/spack/packages/taskd/package.py mode change 100755 => 100644 var/spack/packages/tau/package.py mode change 100755 => 100644 var/spack/packages/tcl/package.py mode change 100755 => 100644 var/spack/packages/the_silver_searcher/package.py mode change 100755 => 100644 var/spack/packages/thrift/package.py mode change 100755 => 100644 var/spack/packages/tk/package.py mode change 100755 => 100644 var/spack/packages/tmux/package.py mode change 100755 => 100644 var/spack/packages/tmuxinator/package.py mode change 100755 => 100644 var/spack/packages/uncrustify/package.py mode change 100755 => 100644 var/spack/packages/util-linux/package.py mode change 100755 => 100644 var/spack/packages/vim/package.py mode change 100755 => 100644 var/spack/packages/vtk/package.py mode change 100755 => 100644 var/spack/packages/wget/package.py mode change 100755 => 100644 var/spack/packages/wx/package.py mode change 100755 => 100644 var/spack/packages/wxpropgrid/package.py mode change 100755 => 100644 var/spack/packages/xcb-proto/package.py mode change 100755 => 100644 var/spack/packages/xz/package.py mode change 100755 => 100644 var/spack/packages/yasm/package.py mode change 100755 => 100644 var/spack/packages/zlib/package.py mode change 100755 => 100644 var/spack/packages/zsh/package.py diff --git a/var/spack/packages/ImageMagick/package.py b/var/spack/packages/ImageMagick/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/Mitos/package.py b/var/spack/packages/Mitos/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/R/package.py b/var/spack/packages/R/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/SAMRAI/package.py b/var/spack/packages/SAMRAI/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/adept-utils/package.py b/var/spack/packages/adept-utils/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/adios/package.py b/var/spack/packages/adios/package.py index 224c3b37d5..260dcbe851 100644 --- a/var/spack/packages/adios/package.py +++ b/var/spack/packages/adios/package.py @@ -18,12 +18,13 @@ class Adios(Package): # module load cray-netcdf/4.3.3.1 # module load cray-hdf5/1.8.14 # module load python/2.7.10 + depends_on('hdf5') depends_on('mxml') - + def install(self, spec, prefix): configure_args = ["--prefix=%s" % prefix, "--with-mxml=%s" % spec['mxml'].prefix, - "--with-hdf5=%s" % os.environ["HDF5_DIR"], + "--with-hdf5=%s" % spec['hdf5'].prefix, "--with-netcdf=%s" % os.environ["NETCDF_DIR"], "--with-infiniband=no", "MPICC=cc","MPICXX=CC","MPIFC=ftn", diff --git a/var/spack/packages/arpack/package.py b/var/spack/packages/arpack/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/atk/package.py b/var/spack/packages/atk/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/atlas/package.py b/var/spack/packages/atlas/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/autoconf/package.py b/var/spack/packages/autoconf/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/automaded/package.py b/var/spack/packages/automaded/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/automake/package.py b/var/spack/packages/automake/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/bear/package.py b/var/spack/packages/bear/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/bib2xhtml/package.py b/var/spack/packages/bib2xhtml/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/binutils/package.py b/var/spack/packages/binutils/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/bison/package.py b/var/spack/packages/bison/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/boxlib/package.py b/var/spack/packages/boxlib/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/bzip2/package.py b/var/spack/packages/bzip2/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/cairo/package.py b/var/spack/packages/cairo/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/callpath/package.py b/var/spack/packages/callpath/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/cblas/package.py b/var/spack/packages/cblas/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/cgm/package.py b/var/spack/packages/cgm/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/clang/package.py b/var/spack/packages/clang/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/cloog/package.py b/var/spack/packages/cloog/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/cmake/package.py b/var/spack/packages/cmake/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/coreutils/package.py b/var/spack/packages/coreutils/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/cppcheck/package.py b/var/spack/packages/cppcheck/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/cram/package.py b/var/spack/packages/cram/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/cube/package.py b/var/spack/packages/cube/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/dbus/package.py b/var/spack/packages/dbus/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/dri2proto/package.py b/var/spack/packages/dri2proto/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/dtcmp/package.py b/var/spack/packages/dtcmp/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/dyninst/package.py b/var/spack/packages/dyninst/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/extrae/package.py b/var/spack/packages/extrae/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/exuberant-ctags/package.py b/var/spack/packages/exuberant-ctags/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/flex/package.py b/var/spack/packages/flex/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/fontconfig/package.py b/var/spack/packages/fontconfig/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/freetype/package.py b/var/spack/packages/freetype/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/gasnet/package.py b/var/spack/packages/gasnet/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/gcc/package.py b/var/spack/packages/gcc/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/gdk-pixbuf/package.py b/var/spack/packages/gdk-pixbuf/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/geos/package.py b/var/spack/packages/geos/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/git/package.py b/var/spack/packages/git/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/glib/package.py b/var/spack/packages/glib/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/global/package.py b/var/spack/packages/global/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/gmp/package.py b/var/spack/packages/gmp/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/gnutls/package.py b/var/spack/packages/gnutls/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/gperf/package.py b/var/spack/packages/gperf/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/gperftools/package.py b/var/spack/packages/gperftools/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/graphlib/package.py b/var/spack/packages/graphlib/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/gtkplus/package.py b/var/spack/packages/gtkplus/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/harfbuzz/package.py b/var/spack/packages/harfbuzz/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/hdf5/package.py b/var/spack/packages/hdf5/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/hwloc/package.py b/var/spack/packages/hwloc/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/hypre/package.py b/var/spack/packages/hypre/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/icu/package.py b/var/spack/packages/icu/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/icu4c/package.py b/var/spack/packages/icu4c/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/isl/package.py b/var/spack/packages/isl/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/jdk/package.py b/var/spack/packages/jdk/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/jpeg/package.py b/var/spack/packages/jpeg/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/lapack/package.py b/var/spack/packages/lapack/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/launchmon/package.py b/var/spack/packages/launchmon/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/lcms/package.py b/var/spack/packages/lcms/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libNBC/package.py b/var/spack/packages/libNBC/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libarchive/package.py b/var/spack/packages/libarchive/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libcircle/package.py b/var/spack/packages/libcircle/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libdrm/package.py b/var/spack/packages/libdrm/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libdwarf/package.py b/var/spack/packages/libdwarf/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libelf/package.py b/var/spack/packages/libelf/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libevent/package.py b/var/spack/packages/libevent/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libffi/package.py b/var/spack/packages/libffi/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libgcrypt/package.py b/var/spack/packages/libgcrypt/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libgpg-error/package.py b/var/spack/packages/libgpg-error/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libjpeg-turbo/package.py b/var/spack/packages/libjpeg-turbo/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libmng/package.py b/var/spack/packages/libmng/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libmonitor/package.py b/var/spack/packages/libmonitor/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libpciaccess/package.py b/var/spack/packages/libpciaccess/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libpng/package.py b/var/spack/packages/libpng/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libtiff/package.py b/var/spack/packages/libtiff/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libtool/package.py b/var/spack/packages/libtool/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libunwind/package.py b/var/spack/packages/libunwind/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libuuid/package.py b/var/spack/packages/libuuid/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libxcb/package.py b/var/spack/packages/libxcb/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libxml2/package.py b/var/spack/packages/libxml2/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libxshmfence/package.py b/var/spack/packages/libxshmfence/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/libxslt/package.py b/var/spack/packages/libxslt/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/llvm-lld/package.py b/var/spack/packages/llvm-lld/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/llvm/package.py b/var/spack/packages/llvm/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/lwgrp/package.py b/var/spack/packages/lwgrp/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/lwm2/package.py b/var/spack/packages/lwm2/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/memaxes/package.py b/var/spack/packages/memaxes/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/mesa/package.py b/var/spack/packages/mesa/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/metis/package.py b/var/spack/packages/metis/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/mpc/package.py b/var/spack/packages/mpc/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/mpe2/package.py b/var/spack/packages/mpe2/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/mpfr/package.py b/var/spack/packages/mpfr/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/mpibash/package.py b/var/spack/packages/mpibash/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/mpich/package.py b/var/spack/packages/mpich/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/mpileaks/package.py b/var/spack/packages/mpileaks/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/mrnet/package.py b/var/spack/packages/mrnet/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/muster/package.py b/var/spack/packages/muster/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/mvapich2/package.py b/var/spack/packages/mvapich2/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/nasm/package.py b/var/spack/packages/nasm/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/ncurses/package.py b/var/spack/packages/ncurses/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/netcdf/package.py b/var/spack/packages/netcdf/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/netgauge/package.py b/var/spack/packages/netgauge/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/netlib-blas/package.py b/var/spack/packages/netlib-blas/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/nettle/package.py b/var/spack/packages/nettle/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/ompss/package.py b/var/spack/packages/ompss/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/opari2/package.py b/var/spack/packages/opari2/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/openmpi/package.py b/var/spack/packages/openmpi/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/openssl/package.py b/var/spack/packages/openssl/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/otf/package.py b/var/spack/packages/otf/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/otf2/package.py b/var/spack/packages/otf2/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/pango/package.py b/var/spack/packages/pango/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/papi/package.py b/var/spack/packages/papi/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/paraver/package.py b/var/spack/packages/paraver/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/parmetis/package.py b/var/spack/packages/parmetis/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/parpack/package.py b/var/spack/packages/parpack/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/pcre/package.py b/var/spack/packages/pcre/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/petsc/package.py b/var/spack/packages/petsc/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/pixman/package.py b/var/spack/packages/pixman/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/pmgr_collective/package.py b/var/spack/packages/pmgr_collective/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/postgresql/package.py b/var/spack/packages/postgresql/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/ppl/package.py b/var/spack/packages/ppl/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-basemap/package.py b/var/spack/packages/py-basemap/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-biopython/package.py b/var/spack/packages/py-biopython/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-cffi/package.py b/var/spack/packages/py-cffi/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-cython/package.py b/var/spack/packages/py-cython/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-dateutil/package.py b/var/spack/packages/py-dateutil/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-epydoc/package.py b/var/spack/packages/py-epydoc/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-genders/package.py b/var/spack/packages/py-genders/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-gnuplot/package.py b/var/spack/packages/py-gnuplot/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-h5py/package.py b/var/spack/packages/py-h5py/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-ipython/package.py b/var/spack/packages/py-ipython/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-jsonschema/package.py b/var/spack/packages/py-jsonschema/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-libxml2/package.py b/var/spack/packages/py-libxml2/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-lockfile/package.py b/var/spack/packages/py-lockfile/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-mako/package.py b/var/spack/packages/py-mako/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-matplotlib/package.py b/var/spack/packages/py-matplotlib/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-mpi4py/package.py b/var/spack/packages/py-mpi4py/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-mx/package.py b/var/spack/packages/py-mx/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-nose/package.py b/var/spack/packages/py-nose/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-numpy/package.py b/var/spack/packages/py-numpy/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pandas/package.py b/var/spack/packages/py-pandas/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pexpect/package.py b/var/spack/packages/py-pexpect/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pil/package.py b/var/spack/packages/py-pil/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pmw/package.py b/var/spack/packages/py-pmw/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-py4j/package.py b/var/spack/packages/py-py4j/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pychecker/package.py b/var/spack/packages/py-pychecker/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pycparser/package.py b/var/spack/packages/py-pycparser/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pyelftools/package.py b/var/spack/packages/py-pyelftools/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pygments/package.py b/var/spack/packages/py-pygments/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pylint/package.py b/var/spack/packages/py-pylint/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pypar/package.py b/var/spack/packages/py-pypar/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pyparsing/package.py b/var/spack/packages/py-pyparsing/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pyqt/package.py b/var/spack/packages/py-pyqt/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pyside/package.py b/var/spack/packages/py-pyside/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-python-daemon/package.py b/var/spack/packages/py-python-daemon/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pytz/package.py b/var/spack/packages/py-pytz/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-pyzmq/package.py b/var/spack/packages/py-pyzmq/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-rpy2/package.py b/var/spack/packages/py-rpy2/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-scientificpython/package.py b/var/spack/packages/py-scientificpython/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-scikit-learn/package.py b/var/spack/packages/py-scikit-learn/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-scipy/package.py b/var/spack/packages/py-scipy/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-setuptools/package.py b/var/spack/packages/py-setuptools/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-shiboken/package.py b/var/spack/packages/py-shiboken/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-sip/package.py b/var/spack/packages/py-sip/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-six/package.py b/var/spack/packages/py-six/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-sympy/package.py b/var/spack/packages/py-sympy/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-tornado/package.py b/var/spack/packages/py-tornado/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-traitlets/package.py b/var/spack/packages/py-traitlets/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-virtualenv/package.py b/var/spack/packages/py-virtualenv/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/py-yapf/package.py b/var/spack/packages/py-yapf/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/qhull/package.py b/var/spack/packages/qhull/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/qt/package.py b/var/spack/packages/qt/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/qthreads/package.py b/var/spack/packages/qthreads/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/ravel/package.py b/var/spack/packages/ravel/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/readline/package.py b/var/spack/packages/readline/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/rose/package.py b/var/spack/packages/rose/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/ruby/package.py b/var/spack/packages/ruby/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/scalasca/package.py b/var/spack/packages/scalasca/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/scorep/package.py b/var/spack/packages/scorep/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/scotch/package.py b/var/spack/packages/scotch/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/scr/package.py b/var/spack/packages/scr/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/silo/package.py b/var/spack/packages/silo/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/spindle/package.py b/var/spack/packages/spindle/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/sqlite/package.py b/var/spack/packages/sqlite/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/stat/package.py b/var/spack/packages/stat/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/sundials/package.py b/var/spack/packages/sundials/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/swig/package.py b/var/spack/packages/swig/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/task/package.py b/var/spack/packages/task/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/taskd/package.py b/var/spack/packages/taskd/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/tau/package.py b/var/spack/packages/tau/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/tcl/package.py b/var/spack/packages/tcl/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/the_silver_searcher/package.py b/var/spack/packages/the_silver_searcher/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/thrift/package.py b/var/spack/packages/thrift/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/tk/package.py b/var/spack/packages/tk/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/tmux/package.py b/var/spack/packages/tmux/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/tmuxinator/package.py b/var/spack/packages/tmuxinator/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/uncrustify/package.py b/var/spack/packages/uncrustify/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/util-linux/package.py b/var/spack/packages/util-linux/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/vim/package.py b/var/spack/packages/vim/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/vtk/package.py b/var/spack/packages/vtk/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/wget/package.py b/var/spack/packages/wget/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/wx/package.py b/var/spack/packages/wx/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/wxpropgrid/package.py b/var/spack/packages/wxpropgrid/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/xcb-proto/package.py b/var/spack/packages/xcb-proto/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/xz/package.py b/var/spack/packages/xz/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/yasm/package.py b/var/spack/packages/yasm/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/zlib/package.py b/var/spack/packages/zlib/package.py old mode 100755 new mode 100644 diff --git a/var/spack/packages/zsh/package.py b/var/spack/packages/zsh/package.py old mode 100755 new mode 100644 -- cgit v1.2.3-70-g09d2 From d2da41b0bd21d4150ec1e161576efb1e356db1cb Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 12:12:03 -0800 Subject: More file permissions chasing --- var/spack/packages/SAMRAI/no-tool-build.patch | 0 var/spack/packages/launchmon/patch.lmon_install_dir | 0 var/spack/packages/mpe2/mpe2.patch | 0 var/spack/packages/mpibash/mpibash-4.3.patch | 0 var/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch | 0 var/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch | 0 var/spack/packages/openmpi/llnl-platforms.patch | 0 var/spack/packages/rose/add_spack_compiler_recognition.patch | 0 var/spack/packages/stat/configure_mpicxx.patch | 0 9 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 var/spack/packages/SAMRAI/no-tool-build.patch mode change 100755 => 100644 var/spack/packages/launchmon/patch.lmon_install_dir mode change 100755 => 100644 var/spack/packages/mpe2/mpe2.patch mode change 100755 => 100644 var/spack/packages/mpibash/mpibash-4.3.patch mode change 100755 => 100644 var/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch mode change 100755 => 100644 var/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch mode change 100755 => 100644 var/spack/packages/openmpi/llnl-platforms.patch mode change 100755 => 100644 var/spack/packages/rose/add_spack_compiler_recognition.patch mode change 100755 => 100644 var/spack/packages/stat/configure_mpicxx.patch diff --git a/var/spack/packages/SAMRAI/no-tool-build.patch b/var/spack/packages/SAMRAI/no-tool-build.patch old mode 100755 new mode 100644 diff --git a/var/spack/packages/launchmon/patch.lmon_install_dir b/var/spack/packages/launchmon/patch.lmon_install_dir old mode 100755 new mode 100644 diff --git a/var/spack/packages/mpe2/mpe2.patch b/var/spack/packages/mpe2/mpe2.patch old mode 100755 new mode 100644 diff --git a/var/spack/packages/mpibash/mpibash-4.3.patch b/var/spack/packages/mpibash/mpibash-4.3.patch old mode 100755 new mode 100644 diff --git a/var/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch b/var/spack/packages/mvapich2/ad_lustre_rwcontig_open_source.patch old mode 100755 new mode 100644 diff --git a/var/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch b/var/spack/packages/openmpi/ad_lustre_rwcontig_open_source.patch old mode 100755 new mode 100644 diff --git a/var/spack/packages/openmpi/llnl-platforms.patch b/var/spack/packages/openmpi/llnl-platforms.patch old mode 100755 new mode 100644 diff --git a/var/spack/packages/rose/add_spack_compiler_recognition.patch b/var/spack/packages/rose/add_spack_compiler_recognition.patch old mode 100755 new mode 100644 diff --git a/var/spack/packages/stat/configure_mpicxx.patch b/var/spack/packages/stat/configure_mpicxx.patch old mode 100755 new mode 100644 -- cgit v1.2.3-70-g09d2 From 1b0d06474359797d4f9e0c59aa813e0e607f0e5a Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 14:13:33 -0800 Subject: Revert "clean up package.py file and remove duplicate file" This reverts commit c809cc92735c7ff57dab2aca02bc7fa40c901a43. --- var/spack/packages/py-ipython/package.py | 4 ++++ var/spack/packages/py-ipython/package.py.backup | 27 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100755 var/spack/packages/py-ipython/package.py.backup diff --git a/var/spack/packages/py-ipython/package.py b/var/spack/packages/py-ipython/package.py index 225366552a..3b94b71f29 100644 --- a/var/spack/packages/py-ipython/package.py +++ b/var/spack/packages/py-ipython/package.py @@ -24,4 +24,8 @@ class PyIpython(Package): depends_on('py-jinja2') def install(self, spec, prefix): + import os + # os.system("spack activate py-setuptools@18.1") + # os.system("easy_install pip") + # os.system("pip install ipython[notebook]") python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-ipython/package.py.backup b/var/spack/packages/py-ipython/package.py.backup new file mode 100755 index 0000000000..1ed8b57e60 --- /dev/null +++ b/var/spack/packages/py-ipython/package.py.backup @@ -0,0 +1,27 @@ +from spack import * + +class PyIpython(Package): + """IPython provides a rich toolkit to help you make the most out of using Python interactively.""" + homepage = "https://pypi.python.org/pypi/ipython" + + version('2.3.1', '2b7085525dac11190bfb45bb8ec8dcbf', + url="https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz") + version('3.1.0', 'a749d90c16068687b0ec45a27e72ef8f') + version('3.2.1', 'f4c93d67ac4b2d4fc69df693b6f3c9e0', + url='https://github.com/ipython/ipython/archive/rel-3.2.1.tar.gz') + + extends('python') + depends_on('py-pygments') + depends_on('py-setuptools@18.1') + depends_on('py-traitlets') + depends_on('py-pyzmq') + depends_on('py-pexpect') + depends_on('py-tornado') + depends_on('py-Jinja2') + + def install(self, spec, prefix): + import os + # os.system("spack activate py-setuptools@18.1") + # os.system("easy_install pip") + # os.system("pip install ipython[notebook]") + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From a9e9f9afb04394ddb85ad197fa7b19999ecc3b32 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 14:14:26 -0800 Subject: Revert "removed package for python packages with problematic / duplicate names" This reverts commit f3254ff02d589c9e177aab58276f5c1971866018. --- var/spack/packages/py-Cython/package.py | 12 ++++++++++++ var/spack/packages/py-Distutils2/package.py | 15 +++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 var/spack/packages/py-Cython/package.py create mode 100644 var/spack/packages/py-Distutils2/package.py diff --git a/var/spack/packages/py-Cython/package.py b/var/spack/packages/py-Cython/package.py new file mode 100644 index 0000000000..c250139114 --- /dev/null +++ b/var/spack/packages/py-Cython/package.py @@ -0,0 +1,12 @@ +from spack import * + +class PyCython(Package): + """The Cython compiler for writing C extensions for the Python language.""" + homepage = "http://www.cython.org" + version("0.21.2", "d21adb870c75680dc857cd05d41046a4", + url="https://pypi.python.org/packages/source/C/Cython/Cython-0.21.2.tar.gz") + + extends("python") + + def install(self, spec, prefix): + python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-Distutils2/package.py b/var/spack/packages/py-Distutils2/package.py new file mode 100644 index 0000000000..8690f569fe --- /dev/null +++ b/var/spack/packages/py-Distutils2/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyDistutils2(Package): + """Python Packaging Library.""" + + homepage = "https://hg.python.org/distutils2" + url = "https://pypi.python.org/packages/source/D/Distutils2/Distutils2-1.0a4.tar.gz" + + version('1.0a4', '52bc9dffb394970c27e02853ae3a3241') + + depends_on("python") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) + -- cgit v1.2.3-70-g09d2 From d3d37ad0cebe4d42d48f5f5f5a53077ae6126631 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 14:29:01 -0800 Subject: removed the submodule as part of reversion of extraneous commits --- lib/spack/spack/util/python_recipe_parser | 1 - 1 file changed, 1 deletion(-) delete mode 160000 lib/spack/spack/util/python_recipe_parser diff --git a/lib/spack/spack/util/python_recipe_parser b/lib/spack/spack/util/python_recipe_parser deleted file mode 160000 index 437a62abb3..0000000000 --- a/lib/spack/spack/util/python_recipe_parser +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 437a62abb3df7212e3ee20269c0089a0a9766fe0 -- cgit v1.2.3-70-g09d2 From 86230b9ac8ed42f3f3b309a0a8a77483978a306c Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 15:01:46 -0800 Subject: Revert "make sure submodule is added in the correct location" This reverts commit e9f7d033ff04138905c99cb427e2071cc55cdc16. --- .gitmodules | 6 +++--- var/spack/packages/py-astropy/package.py | 1 - var/spack/packages/py-jsonschema/package.py | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index d5995e8e4b..1d770f415b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "lib/spack/spack/util/python_recipe_parser"] - path = lib/spack/spack/util/python_recipe_parser - url = git@github.com:karenyyng/spack_python_package_parser.git +[submodule "/lib/spack/spack/util/python_recipe_parser"] + path = /lib/spack/spack/util/python_recipe_parser + url = https://github.com/karenyyng/spack_python_package_parser diff --git a/var/spack/packages/py-astropy/package.py b/var/spack/packages/py-astropy/package.py index 9fda37519e..5d2d0619cc 100644 --- a/var/spack/packages/py-astropy/package.py +++ b/var/spack/packages/py-astropy/package.py @@ -7,7 +7,6 @@ class PyAstropy(Package): url="https://pypi.python.org/packages/source/a/astropy/astropy-0.4.2.tar.gz") extends("python") - depends_on("py-numpy") def install(self, spec, prefix): python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-jsonschema/package.py b/var/spack/packages/py-jsonschema/package.py index fa233635ce..9a7fc21862 100644 --- a/var/spack/packages/py-jsonschema/package.py +++ b/var/spack/packages/py-jsonschema/package.py @@ -11,8 +11,6 @@ class PyJsonschema(Package): extends("python") depends_on("py-setuptools@18.1") - depends_on("py-vcversioner") - depends_on("py-functools32") def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 6ca1e5c4b07e1677363cf0f3787144f67af688c8 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 15:02:29 -0800 Subject: Revert "added a bunch of packages and added submodule" This reverts commit 79808da760eabcb3e692c88e29ea3c7c558b131d. --- .gitignore | 1 - .gitmodules | 4 +- utils/python_recipe_parser | 1 + var/spack/packages/asciidoc/package.py | 18 +++++++ var/spack/packages/boost/package.py | 4 ++ var/spack/packages/bowtie2/bowtie2-2.5.patch | 16 ++++++ var/spack/packages/bowtie2/package.py | 24 +++++++++ var/spack/packages/cscope/package.py | 17 +++++++ var/spack/packages/czmq/package.py | 19 ++++++++ var/spack/packages/docbook-xml/package.py | 19 ++++++++ var/spack/packages/doxygen/package.py | 25 ++++++++++ var/spack/packages/eigen/package.py | 17 ------- var/spack/packages/elfutils/package.py | 26 ++++++++++ var/spack/packages/fish/package.py | 18 +++++++ var/spack/packages/flux/package.py | 36 ++++++++++++++ var/spack/packages/gflags/package.py | 21 ++++++++ var/spack/packages/ghostscript/package.py | 17 +++++++ var/spack/packages/glog/package.py | 15 ++++++ var/spack/packages/graphviz/package.py | 19 +++----- var/spack/packages/lapack/package.py | 45 ----------------- var/spack/packages/leveldb/package.py | 29 +++++++++++ var/spack/packages/libdrm/package.py | 5 +- var/spack/packages/libelf/package.py | 2 + var/spack/packages/libffi/package.py | 6 +-- var/spack/packages/libjson-c/package.py | 14 ++++++ var/spack/packages/libpciaccess/package.py | 17 ++++--- var/spack/packages/libsodium/package.py | 19 ++++++++ var/spack/packages/libxml2/package.py | 5 +- var/spack/packages/lmdb/package.py | 39 +++++++++++++++ var/spack/packages/lua/package.py | 26 ++++++++++ var/spack/packages/mesa/package.py | 5 +- var/spack/packages/mpich/package.py | 1 - var/spack/packages/munge/package.py | 20 ++++++++ var/spack/packages/ncurses/package.py | 8 +++ var/spack/packages/netlib-blas/package.py | 6 +++ var/spack/packages/netlib-lapack/package.py | 59 +++++++++++++++++++++++ var/spack/packages/pidx/package.py | 21 ++++++++ var/spack/packages/pkg-config/package.py | 17 +++++++ var/spack/packages/protobuf/package.py | 16 ++++++ var/spack/packages/py-Cython/package.py | 12 ----- var/spack/packages/py-Distutils2/package.py | 15 ------ var/spack/packages/py-astroML/package.py | 12 ----- var/spack/packages/py-astropy/package.py | 12 ----- var/spack/packages/py-autopep8/package.py | 12 ----- var/spack/packages/py-certifi/package.py | 12 ----- var/spack/packages/py-decorator/package.py | 12 ----- var/spack/packages/py-emcee/package.py | 12 ----- var/spack/packages/py-fitsio/package.py | 13 ----- var/spack/packages/py-gnureadline/package.py | 12 ----- var/spack/packages/py-ipython/package.py | 21 ++------ var/spack/packages/py-ipython/package.py.backup | 27 ----------- var/spack/packages/py-ipython_genutils/package.py | 12 ----- var/spack/packages/py-joblib/package.py | 12 ----- var/spack/packages/py-jsonschema/package.py | 16 ------ var/spack/packages/py-matplotlib/package.py | 1 + var/spack/packages/py-mock/package.py | 17 ++++--- var/spack/packages/py-numexpr/package.py | 12 ----- var/spack/packages/py-numpy/package.py | 15 +++++- var/spack/packages/py-pandas/package.py | 2 - var/spack/packages/py-pep8/package.py | 12 ----- var/spack/packages/py-pickleshare/package.py | 12 ----- var/spack/packages/py-pip/package.py | 12 ----- var/spack/packages/py-py/package.py | 12 ----- var/spack/packages/py-py4j/package.py | 15 ------ var/spack/packages/py-pyside/package.py | 5 +- var/spack/packages/py-pytest/package.py | 12 ----- var/spack/packages/py-python-dateutil/package.py | 12 ----- var/spack/packages/py-pytz/package.py | 2 - var/spack/packages/py-pyzmq/package.py | 16 ------ var/spack/packages/py-scikit-learn/package.py | 3 -- var/spack/packages/py-scipy/package.py | 4 +- var/spack/packages/py-seaborn/package.py | 12 ----- var/spack/packages/py-setuptools/package.py | 9 ++-- var/spack/packages/py-six/package.py | 2 - var/spack/packages/py-statsmodels/package.py | 12 ----- var/spack/packages/py-tables/package.py | 12 ----- var/spack/packages/py-tornado/package.py | 17 ------- var/spack/packages/py-traitlets/package.py | 14 ------ var/spack/packages/py-triangle-plot/package.py | 12 ----- var/spack/packages/samtools/package.py | 18 +++++++ var/spack/packages/samtools/samtools1.2.patch | 20 ++++++++ var/spack/packages/scorep/package.py | 15 +++--- var/spack/packages/snappy/package.py | 15 ++++++ var/spack/packages/stat/package.py | 11 ++++- var/spack/packages/vim/package.py | 23 +++++++-- var/spack/packages/zeromq/package.py | 20 ++++++++ 86 files changed, 731 insertions(+), 534 deletions(-) create mode 160000 utils/python_recipe_parser create mode 100644 var/spack/packages/asciidoc/package.py create mode 100644 var/spack/packages/bowtie2/bowtie2-2.5.patch create mode 100644 var/spack/packages/bowtie2/package.py create mode 100644 var/spack/packages/cscope/package.py create mode 100644 var/spack/packages/czmq/package.py create mode 100644 var/spack/packages/docbook-xml/package.py create mode 100644 var/spack/packages/doxygen/package.py delete mode 100644 var/spack/packages/eigen/package.py create mode 100644 var/spack/packages/elfutils/package.py create mode 100644 var/spack/packages/fish/package.py create mode 100644 var/spack/packages/flux/package.py create mode 100644 var/spack/packages/gflags/package.py create mode 100644 var/spack/packages/ghostscript/package.py create mode 100644 var/spack/packages/glog/package.py delete mode 100644 var/spack/packages/lapack/package.py create mode 100644 var/spack/packages/leveldb/package.py create mode 100644 var/spack/packages/libjson-c/package.py create mode 100644 var/spack/packages/libsodium/package.py create mode 100644 var/spack/packages/lmdb/package.py create mode 100644 var/spack/packages/lua/package.py create mode 100644 var/spack/packages/munge/package.py create mode 100644 var/spack/packages/netlib-lapack/package.py create mode 100644 var/spack/packages/pidx/package.py create mode 100644 var/spack/packages/pkg-config/package.py create mode 100644 var/spack/packages/protobuf/package.py delete mode 100644 var/spack/packages/py-Cython/package.py delete mode 100644 var/spack/packages/py-Distutils2/package.py delete mode 100644 var/spack/packages/py-astroML/package.py delete mode 100644 var/spack/packages/py-astropy/package.py delete mode 100644 var/spack/packages/py-autopep8/package.py delete mode 100644 var/spack/packages/py-certifi/package.py delete mode 100644 var/spack/packages/py-decorator/package.py delete mode 100644 var/spack/packages/py-emcee/package.py delete mode 100644 var/spack/packages/py-fitsio/package.py delete mode 100644 var/spack/packages/py-gnureadline/package.py delete mode 100755 var/spack/packages/py-ipython/package.py.backup delete mode 100644 var/spack/packages/py-ipython_genutils/package.py delete mode 100644 var/spack/packages/py-joblib/package.py delete mode 100644 var/spack/packages/py-jsonschema/package.py delete mode 100644 var/spack/packages/py-numexpr/package.py delete mode 100644 var/spack/packages/py-pep8/package.py delete mode 100644 var/spack/packages/py-pickleshare/package.py delete mode 100644 var/spack/packages/py-pip/package.py delete mode 100644 var/spack/packages/py-py/package.py delete mode 100644 var/spack/packages/py-py4j/package.py delete mode 100644 var/spack/packages/py-pytest/package.py delete mode 100644 var/spack/packages/py-python-dateutil/package.py delete mode 100644 var/spack/packages/py-pyzmq/package.py delete mode 100644 var/spack/packages/py-seaborn/package.py delete mode 100644 var/spack/packages/py-statsmodels/package.py delete mode 100644 var/spack/packages/py-tables/package.py delete mode 100644 var/spack/packages/py-tornado/package.py delete mode 100644 var/spack/packages/py-traitlets/package.py delete mode 100644 var/spack/packages/py-triangle-plot/package.py create mode 100644 var/spack/packages/samtools/package.py create mode 100644 var/spack/packages/samtools/samtools1.2.patch create mode 100644 var/spack/packages/snappy/package.py create mode 100644 var/spack/packages/zeromq/package.py diff --git a/.gitignore b/.gitignore index 8146921fd8..1c6ca4c99e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,3 @@ /etc/spackconfig /share/spack/dotkit /share/spack/modules -*.ropeproject diff --git a/.gitmodules b/.gitmodules index 1d770f415b..a097fcd8cf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "/lib/spack/spack/util/python_recipe_parser"] - path = /lib/spack/spack/util/python_recipe_parser +[submodule "utils/python_recipe_parser"] + path = utils/python_recipe_parser url = https://github.com/karenyyng/spack_python_package_parser diff --git a/utils/python_recipe_parser b/utils/python_recipe_parser new file mode 160000 index 0000000000..3158074a2d --- /dev/null +++ b/utils/python_recipe_parser @@ -0,0 +1 @@ +Subproject commit 3158074a2d74f99aa72289dfcf093b1b0ba4474e diff --git a/var/spack/packages/asciidoc/package.py b/var/spack/packages/asciidoc/package.py new file mode 100644 index 0000000000..828f3b3f4f --- /dev/null +++ b/var/spack/packages/asciidoc/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Asciidoc(Package): + """ A presentable text document format for writing articles, UNIX man + pages and other small to medium sized documents.""" + homepage = "http://asciidoc.org" + url = "http://downloads.sourceforge.net/project/asciidoc/asciidoc/8.6.9/asciidoc-8.6.9.tar.gz" + + version('8.6.9', 'c59018f105be8d022714b826b0be130a') + + depends_on('libxml2') + depends_on('libxslt') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py index 254d1afda1..35824d53a2 100644 --- a/var/spack/packages/boost/package.py +++ b/var/spack/packages/boost/package.py @@ -14,6 +14,10 @@ class Boost(Package): list_url = "http://sourceforge.net/projects/boost/files/boost/" list_depth = 2 + version('1.59.0', '6aa9a5c6a4ca1016edd0ed1178e3cb87') + version('1.58.0', 'b8839650e61e9c1c0a89f371dd475546') + version('1.57.0', '1be49befbdd9a5ce9def2983ba3e7b76') + version('1.56.0', 'a744cf167b05d72335f27c88115f211d') version('1.55.0', 'd6eef4b4cacb2183f2bf265a5a03a354') version('1.54.0', '15cb8c0803064faef0c4ddf5bc5ca279') version('1.53.0', 'a00d22605d5dbcfb4c9936a9b35bc4c2') diff --git a/var/spack/packages/bowtie2/bowtie2-2.5.patch b/var/spack/packages/bowtie2/bowtie2-2.5.patch new file mode 100644 index 0000000000..290be39c73 --- /dev/null +++ b/var/spack/packages/bowtie2/bowtie2-2.5.patch @@ -0,0 +1,16 @@ +--- Makefile 2015-02-26 10:50:00.000000000 -0800 ++++ Makefile.new 2015-07-29 18:03:59.891357399 -0700 +@@ -22,10 +22,10 @@ + # + + INC = +-GCC_PREFIX = $(shell dirname `which gcc`) ++GCC_PREFIX = + GCC_SUFFIX = +-CC = $(GCC_PREFIX)/gcc$(GCC_SUFFIX) +-CPP = $(GCC_PREFIX)/g++$(GCC_SUFFIX) ++CC = cc ++CPP = c++ + CXX = $(CPP) + HEADERS = $(wildcard *.h) + BOWTIE_MM = 1 diff --git a/var/spack/packages/bowtie2/package.py b/var/spack/packages/bowtie2/package.py new file mode 100644 index 0000000000..339aab6598 --- /dev/null +++ b/var/spack/packages/bowtie2/package.py @@ -0,0 +1,24 @@ +from spack import * +from glob import glob +class Bowtie2(Package): + """Description""" + homepage = "bowtie-bio.sourceforge.net/bowtie2/index.shtml" + version('2.2.5','51fa97a862d248d7ee660efc1147c75f', url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.2.5/bowtie2-2.2.5-source.zip") + + patch('bowtie2-2.5.patch',when='@2.2.5', level=0) + + def install(self, spec, prefix): + make() + mkdirp(prefix.bin) + for bow in glob("bowtie2*"): + install(bow, prefix.bin) + # install('bowtie2',prefix.bin) + # install('bowtie2-align-l',prefix.bin) + # install('bowtie2-align-s',prefix.bin) + # install('bowtie2-build',prefix.bin) + # install('bowtie2-build-l',prefix.bin) + # install('bowtie2-build-s',prefix.bin) + # install('bowtie2-inspect',prefix.bin) + # install('bowtie2-inspect-l',prefix.bin) + # install('bowtie2-inspect-s',prefix.bin) + diff --git a/var/spack/packages/cscope/package.py b/var/spack/packages/cscope/package.py new file mode 100644 index 0000000000..9aac0f7304 --- /dev/null +++ b/var/spack/packages/cscope/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Cscope(Package): + """Cscope is a developer's tool for browsing source code.""" + homepage = "http://http://cscope.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/cscope/cscope/15.8b/cscope-15.8b.tar.gz" + + version('15.8b', '8f9409a238ee313a96f9f87fe0f3b176') + + # Can be configured to use flex (not necessary) + # ./configure --with-flex + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/packages/czmq/package.py b/var/spack/packages/czmq/package.py new file mode 100644 index 0000000000..a2f1947554 --- /dev/null +++ b/var/spack/packages/czmq/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Czmq(Package): + """ A C interface to the ZMQ library """ + homepage = "http://czmq.zeromq.org" + url = "https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz" + + version('3.0.2', '23e9885f7ee3ce88d99d0425f52e9be1', url='https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz') + + depends_on('zeromq') + + def install(self, spec, prefix): + bash = which("bash") + bash("./autogen.sh") + configure("--prefix=%s" % prefix) + + make() + make("install") + diff --git a/var/spack/packages/docbook-xml/package.py b/var/spack/packages/docbook-xml/package.py new file mode 100644 index 0000000000..fce1de7deb --- /dev/null +++ b/var/spack/packages/docbook-xml/package.py @@ -0,0 +1,19 @@ +import os +import glob +from spack import * + + +class DocbookXml(Package): + """Docbook DTD XML files.""" + homepage = "http://www.oasis-open.org/docbook" + url = "http://www.oasis-open.org/docbook/xml/4.5/docbook-xml-4.5.zip" + + 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) diff --git a/var/spack/packages/doxygen/package.py b/var/spack/packages/doxygen/package.py new file mode 100644 index 0000000000..3d4a4e47a7 --- /dev/null +++ b/var/spack/packages/doxygen/package.py @@ -0,0 +1,25 @@ +#------------------------------------------------------------------------------ +# Author: Justin Too +# Date: September 11, 2015 +#------------------------------------------------------------------------------ + +from spack import * + +class Doxygen(Package): + """Doxygen is the de facto standard tool for generating documentation + from annotated C++ sources, but it also supports other popular programming + languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, + Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some extent D.. + """ + homepage = "http://www.stack.nl/~dimitri/doxygen/" + url = "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.src.tar.gz" + + version('1.8.10', '79767ccd986f12a0f949015efb5f058f') + + depends_on("cmake@2.8.12:") + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") diff --git a/var/spack/packages/eigen/package.py b/var/spack/packages/eigen/package.py deleted file mode 100644 index b4d89ea3a0..0000000000 --- a/var/spack/packages/eigen/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class Eigen(Package): - """Eigen is a C++ template library for linear algebra: matrices, vectors, - numerical solvers, and related algorithms..""" - homepage = "http://eigen.tuxfamily.org/" - url = "http://bitbucket.org/eigen/eigen/get/3.2.5.tar.gz" - - version('3.2.5', '8cc513ac6ec687117acadddfcacf551b') - - def install(self, spec, prefix): - import os - os.system("mkdir ./build_dir && cd ./build_dir") - cmake('../', *std_cmake_args) - - make() - make("install") diff --git a/var/spack/packages/elfutils/package.py b/var/spack/packages/elfutils/package.py new file mode 100644 index 0000000000..926d234584 --- /dev/null +++ b/var/spack/packages/elfutils/package.py @@ -0,0 +1,26 @@ +from spack import * + +class Elfutils(Package): + """elfutils is a collection of various binary tools such as + eu-objdump, eu-readelf, and other utilities that allow you to + inspect and manipulate ELF files. Refer to Table 5.Tools Included + in elfutils for Red Hat Developer for a complete list of binary + tools that are distributed with the Red Hat Developer Toolset + version of elfutils.""" + + homepage = "https://fedorahosted.org/elfutils/" + + version('0.163', + git='git://git.fedorahosted.org/git/elfutils.git', + tag='elfutils-0.163') + + provides('elf') + + def install(self, spec, prefix): + autoreconf = which('autoreconf') + autoreconf('-if') + + configure('--prefix=%s' % prefix, '--enable-maintainer-mode') + make() + make("install") + diff --git a/var/spack/packages/fish/package.py b/var/spack/packages/fish/package.py new file mode 100644 index 0000000000..1225558705 --- /dev/null +++ b/var/spack/packages/fish/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Fish(Package): + """fish is a smart and user-friendly command line shell for OS X, Linux, and + the rest of the family. + """ + + homepage = "http://fishshell.com/" + url = "http://fishshell.com/files/2.2.0/fish-2.2.0.tar.gz" + list_url = homepage + + version('2.2.0', 'a76339fd14ce2ec229283c53e805faac48c3e99d9e3ede9d82c0554acfc7b77a') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/packages/flux/package.py b/var/spack/packages/flux/package.py new file mode 100644 index 0000000000..c128f46be8 --- /dev/null +++ b/var/spack/packages/flux/package.py @@ -0,0 +1,36 @@ +from spack import * +import os + +class Flux(Package): + """ A next-generation resource manager (pre-alpha) """ + + homepage = "https://github.com/flux-framework/flux-core" + url = "https://github.com/flux-framework/flux-core" + + version('master', branch='master', git='https://github.com/flux-framework/flux-core') + + # Also needs autotools, but should use the system version if available + depends_on("zeromq@4.0.4:") + depends_on("czmq@2.2:") + depends_on("lua@5.1:5.1.99") + depends_on("munge") + depends_on("libjson-c") + depends_on("libxslt") + # TODO: This provides a catalog, hacked with environment below for now + depends_on("docbook-xml") + depends_on("asciidoc") + depends_on("python") + depends_on("py-cffi") + + def install(self, spec, prefix): + # Bootstrap with autotools + bash = which('bash') + bash('./autogen.sh') + + # Fix asciidoc dependency on xml style sheets and whatnot + os.environ['XML_CATALOG_FILES'] = os.path.join(spec['docbook-xml'].prefix, + 'catalog.xml') + # Configure, compile & install + configure("--prefix=" + prefix) + make("install", "V=1") + diff --git a/var/spack/packages/gflags/package.py b/var/spack/packages/gflags/package.py new file mode 100644 index 0000000000..62dd80a094 --- /dev/null +++ b/var/spack/packages/gflags/package.py @@ -0,0 +1,21 @@ +import os +from spack import * + +class Gflags(Package): + """The gflags package contains a C++ library that implements + commandline flags processing. It includes built-in support for + standard types such as string and the ability to define flags + in the source file in which they are used. Online documentation + available at: https://gflags.github.io/gflags/""" + + homepage = "https://gflags.github.io/gflags" + url = "https://github.com/gflags/gflags/archive/v2.1.2.tar.gz" + + version('2.1.2', 'ac432de923f9de1e9780b5254884599f') + + def install(self, spec, prefix): + cmake("-DCMAKE_INSTALL_PREFIX=" + prefix, + "-DBUILD_SHARED_LIBS=ON") + make() + make("test") + make("install") diff --git a/var/spack/packages/ghostscript/package.py b/var/spack/packages/ghostscript/package.py new file mode 100644 index 0000000000..0ab49d425f --- /dev/null +++ b/var/spack/packages/ghostscript/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Ghostscript(Package): + """an interpreter for the PostScript language and for PDF. """ + homepage = "http://ghostscript.com/" + url = "http://downloads.ghostscript.com/public/ghostscript-9.16.tar.gz" + + version('9.16', '829319325bbdb83f5c81379a8f86f38f') + + parallel = False + + def install(self, spec, prefix): + configure("--prefix=%s" %prefix, "--enable-shared") + + make() + make("install") + diff --git a/var/spack/packages/glog/package.py b/var/spack/packages/glog/package.py new file mode 100644 index 0000000000..d73386b394 --- /dev/null +++ b/var/spack/packages/glog/package.py @@ -0,0 +1,15 @@ +import os +from spack import * + +class Glog(Package): + """C++ implementation of the Google logging module.""" + + homepage = "https://github.com/google/glog" + url = "https://github.com/google/glog/archive/v0.3.3.tar.gz" + + version('0.3.3', 'c1f86af27bd9c73186730aa957607ed0') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/packages/graphviz/package.py b/var/spack/packages/graphviz/package.py index 8244feccfd..7af7da1881 100644 --- a/var/spack/packages/graphviz/package.py +++ b/var/spack/packages/graphviz/package.py @@ -1,24 +1,21 @@ from spack import * class Graphviz(Package): - """graph visualization software.""" + """Graph Visualization Software""" homepage = "http://www.graphviz.org" url = "http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz" version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae') - version('2.36.0', '1f41664dba0c93109ac8b71216bf2b57') - depends_on("cairo@1.1.10") - depends_on("freetype@2.1.10") - depends_on("fontconfig") - depends_on("zlib@1.2.3") - # depends_on("libpng@1.2.10") - # depends_on("expat@2.0.0") - # depends_on("gd@2.0.34") + parallel = False + + depends_on("swig") + depends_on("python") + depends_on("ghostscript") def install(self, spec, prefix): - configure('--prefix=%s' % prefix) + configure("--prefix=%s" %prefix) - # FIXME: Add logic to build and install here make() make("install") + diff --git a/var/spack/packages/lapack/package.py b/var/spack/packages/lapack/package.py deleted file mode 100644 index d9d37e3e4a..0000000000 --- a/var/spack/packages/lapack/package.py +++ /dev/null @@ -1,45 +0,0 @@ -from spack import * - -class Lapack(Package): - """ - LAPACK version 3.X is a comprehensive FORTRAN library that does - linear algebra operations including matrix inversions, least - squared solutions to linear sets of equations, eigenvector - analysis, singular value decomposition, etc. It is a very - comprehensive and reputable package that has found extensive - use in the scientific community. - """ - homepage = "http://www.netlib.org/lapack/" - url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" - - version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') - version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478') - version('3.4.1', '44c3869c38c8335c2b9c2a8bb276eb55') - version('3.4.0', '02d5706ec03ba885fc246e5fa10d8c70') - version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4') - - # blas is a virtual dependency. - depends_on('blas') - - # Doesn't always build correctly in parallel - parallel = False - - @when('^netlib-blas') - def get_blas_libs(self): - blas = self.spec['netlib-blas'] - return [join_path(blas.prefix.lib, 'blas.a')] - - - @when('^atlas') - def get_blas_libs(self): - blas = self.spec['atlas'] - return [join_path(blas.prefix.lib, l) - for l in ('libf77blas.a', 'libatlas.a')] - - - def install(self, spec, prefix): - blas_libs = ";".join(self.get_blas_libs()) - cmake(".", '-DBLAS_LIBRARIES=' + blas_libs, *std_cmake_args) - make() - make("install") - diff --git a/var/spack/packages/leveldb/package.py b/var/spack/packages/leveldb/package.py new file mode 100644 index 0000000000..da68a9cbcb --- /dev/null +++ b/var/spack/packages/leveldb/package.py @@ -0,0 +1,29 @@ +import os +import glob +from spack import * + +class Leveldb(Package): + """LevelDB is a fast key-value storage library written at Google + that provides an ordered mapping from string keys to string values.""" + + homepage = "https://github.com/google/leveldb" + url = "https://github.com/google/leveldb/archive/v1.18.tar.gz" + + version('1.18', '73770de34a2a5ab34498d2e05b2b7fa0') + + depends_on("snappy") + + def install(self, spec, prefix): + make() + + mkdirp(prefix.include) + mkdirp(prefix.lib) + + cp = which('cp') + + # cp --preserve=links libleveldb.* prefix/lib + args = glob.glob('libleveldb.*') + args.append(prefix + '/lib') + cp('--preserve=links', *args) + + cp('-r', 'include/leveldb', prefix + '/include') diff --git a/var/spack/packages/libdrm/package.py b/var/spack/packages/libdrm/package.py index 1cab5372be..00736b7811 100644 --- a/var/spack/packages/libdrm/package.py +++ b/var/spack/packages/libdrm/package.py @@ -2,7 +2,7 @@ from spack import * class Libdrm(Package): """A userspace library for accessing the DRM, direct - rendering manager, on Linux, BSD and other operating + rendering manager, on Linux, BSD and other operating systems that support the ioctl interface.""" homepage = "http://dri.freedesktop.org/libdrm/" # no real website... @@ -11,11 +11,8 @@ class Libdrm(Package): version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6') version('2.4.33', '86e4e3debe7087d5404461e0032231c8') - depends_on("libpciaccess") - def install(self, spec, prefix): configure("--prefix=%s" % prefix) - make("clean") make() make("install") diff --git a/var/spack/packages/libelf/package.py b/var/spack/packages/libelf/package.py index bf2fefabd5..9338b8f393 100644 --- a/var/spack/packages/libelf/package.py +++ b/var/spack/packages/libelf/package.py @@ -36,6 +36,8 @@ class Libelf(Package): version('0.8.13', '4136d7b4c04df68b686570afa26988ac') version('0.8.12', 'e21f8273d9f5f6d43a59878dc274fec7') + provides('elf') + def install(self, spec, prefix): configure("--prefix=" + prefix, "--enable-shared", diff --git a/var/spack/packages/libffi/package.py b/var/spack/packages/libffi/package.py index 2c1c4eed4d..18acabb00c 100644 --- a/var/spack/packages/libffi/package.py +++ b/var/spack/packages/libffi/package.py @@ -6,9 +6,9 @@ class Libffi(Package): to call any function specified by a call interface description at run time.""" homepage = "https://sourceware.org/libffi/" - url = "ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz" - - version('3.1', 'f5898b29bbfd70502831a212d9249d10') + + version('3.2.1','83b89587607e3eb65c70d361f13bab43',url = "ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz") + #version('3.1', 'f5898b29bbfd70502831a212d9249d10',url = "ftp://sourceware.org/pub/libffi/libffi-3.1.tar.gz") # Has a bug $(lib64) instead of ${lib64} in libffi.pc def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/packages/libjson-c/package.py b/var/spack/packages/libjson-c/package.py new file mode 100644 index 0000000000..c0801cce9c --- /dev/null +++ b/var/spack/packages/libjson-c/package.py @@ -0,0 +1,14 @@ +from spack import * + +class LibjsonC(Package): + """ A JSON implementation in C """ + homepage = "https://github.com/json-c/json-c/wiki" + url = "https://s3.amazonaws.com/json-c_releases/releases/json-c-0.11.tar.gz" + + version('0.11', 'aa02367d2f7a830bf1e3376f77881e98') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/packages/libpciaccess/package.py b/var/spack/packages/libpciaccess/package.py index 371fbb6685..6022fc34a3 100644 --- a/var/spack/packages/libpciaccess/package.py +++ b/var/spack/packages/libpciaccess/package.py @@ -1,16 +1,21 @@ from spack import * class Libpciaccess(Package): - """Generic PCI access library""" + """Generic PCI access library.""" + homepage = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/" - url = "http://pkgs.fedoraproject.org/repo/pkgs/libpciaccess/libpciaccess-0.13.2.tar.bz2/b7c0d3afce14eedca57312a3141ec13a/libpciaccess-0.13.2.tar.bz2" + url = "http://cgit.freedesktop.org/xorg/lib/libpciaccess/" + + version('0.13.4', git='http://anongit.freedesktop.org/git/xorg/lib/libpciaccess.git', + tag='libpciaccess-0.13.4') - version('0.13.2', 'b7c0d3afce14eedca57312a3141ec13a') + depends_on('autoconf') + depends_on('libtool') def install(self, spec, prefix): - import os - os.system("autoconf") - configure('--prefix=%s' % prefix) + from subprocess import call + call(["./autogen.sh"]) + configure("--prefix=%s" % prefix) make() make("install") diff --git a/var/spack/packages/libsodium/package.py b/var/spack/packages/libsodium/package.py new file mode 100644 index 0000000000..1c8a16d998 --- /dev/null +++ b/var/spack/packages/libsodium/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Libsodium(Package): + """Sodium is a modern, easy-to-use software library for encryption, + decryption, signatures, password hashing and more.""" + homepage = "https://download.libsodium.org/doc/" + url = "https://download.libsodium.org/libsodium/releases/libsodium-1.0.3.tar.gz" + + version('1.0.3', 'b3bcc98e34d3250f55ae196822307fab') + version('1.0.2', 'dc40eb23e293448c6fc908757738003f') + version('1.0.1', '9a221b49fba7281ceaaf5e278d0f4430') + version('1.0.0', '3093dabe4e038d09f0d150cef064b2f7') + version('0.7.1', 'c224fe3923d1dcfe418c65c8a7246316') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + + make() + make("install") diff --git a/var/spack/packages/libxml2/package.py b/var/spack/packages/libxml2/package.py index 72199d8def..3a0af6b368 100644 --- a/var/spack/packages/libxml2/package.py +++ b/var/spack/packages/libxml2/package.py @@ -9,11 +9,12 @@ class Libxml2(Package): version('2.9.2', '9e6a9aca9d155737868b3dc5fd82f788') + extends('python') depends_on('zlib') depends_on('xz') def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--without-python") + configure("--prefix=%s" % prefix) + make() make("install") diff --git a/var/spack/packages/lmdb/package.py b/var/spack/packages/lmdb/package.py new file mode 100644 index 0000000000..875b8100c5 --- /dev/null +++ b/var/spack/packages/lmdb/package.py @@ -0,0 +1,39 @@ +import os +from spack import * + +class Lmdb(Package): + """Read-only mirror of official repo on openldap.org. Issues and + pull requests here are ignored. Use OpenLDAP ITS for issues. + http://www.openldap.org/software/repo.html""" + + + homepage = "http://www.openldap.org/software/repo.html" + url = "https://github.com/LMDB/lmdb/archive/LMDB_0.9.16.tar.gz" + + version('0.9.16', '0de89730b8f3f5711c2b3a4ba517b648') + + def install(self, spec, prefix): + os.chdir('libraries/liblmdb') + + make() + + mkdirp(prefix.bin) + mkdirp(prefix + '/man/man1') + mkdirp(prefix.lib) + mkdirp(prefix.include) + + bins = ['mdb_stat', 'mdb_copy', 'mdb_dump', 'mdb_load'] + for f in bins: + install(f, prefix.bin) + + mans = ['mdb_stat.1', 'mdb_copy.1', 'mdb_dump.1', 'mdb_load.1'] + for f in mans: + install(f, prefix + '/man/man1') + + libs = ['liblmdb.a', 'liblmdb.so'] + for f in libs: + install(f, prefix.lib) + + includes = ['lmdb.h'] + for f in includes: + install(f, prefix.include) diff --git a/var/spack/packages/lua/package.py b/var/spack/packages/lua/package.py new file mode 100644 index 0000000000..57c443cc2d --- /dev/null +++ b/var/spack/packages/lua/package.py @@ -0,0 +1,26 @@ +from spack import * +import os + +class Lua(Package): + """ The Lua programming language interpreter and library """ + homepage = "http://www.lua.org" + url = "http://www.lua.org/ftp/lua-5.1.5.tar.gz" + + version('5.3.1', '797adacada8d85761c079390ff1d9961') + version('5.3.0', 'a1b0a7e92d0c85bbff7a8d27bf29f8af') + version('5.2.4', '913fdb32207046b273fdb17aad70be13') + version('5.2.3', 'dc7f94ec6ff15c985d2d6ad0f1b35654') + version('5.2.2', 'efbb645e897eae37cad4344ce8b0a614') + version('5.2.1', 'ae08f641b45d737d12d30291a5e5f6e3') + version('5.2.0', 'f1ea831f397214bae8a265995ab1a93e') + version('5.1.5', '2e115fe26e435e33b0d5c022e4490567') + version('5.1.4', 'd0870f2de55d59c1c8419f36e8fac150') + version('5.1.3', 'a70a8dfaa150e047866dc01a46272599') + + depends_on('ncurses') + + def install(self, spec, prefix): + make('INSTALL_TOP=%s' % prefix, + 'MYLDFLAGS=-L%s/lib' % spec['ncurses'].prefix, + 'linux', + 'install') diff --git a/var/spack/packages/mesa/package.py b/var/spack/packages/mesa/package.py index 2dba878a77..2a04a8fd51 100644 --- a/var/spack/packages/mesa/package.py +++ b/var/spack/packages/mesa/package.py @@ -1,7 +1,7 @@ from spack import * class Mesa(Package): - """Mesa is an open-source implementation of the OpenGL + """Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics.""" homepage = "http://www.mesa3d.org" @@ -11,9 +11,10 @@ class Mesa(Package): # version('10.4.4', '8d863a3c209bf5116b2babfccccc68ce') version('8.0.5', 'cda5d101f43b8784fa60bdeaca4056f2') - # mesa 7.x, 8.x, 9.x + # mesa 7.x, 8.x, 9.x depends_on("libdrm@2.4.33") depends_on("llvm@3.0") + depends_on("libxml2") # patch("llvm-fixes.patch") # using newer llvm diff --git a/var/spack/packages/mpich/package.py b/var/spack/packages/mpich/package.py index ce07335bba..dfff22152d 100644 --- a/var/spack/packages/mpich/package.py +++ b/var/spack/packages/mpich/package.py @@ -38,7 +38,6 @@ class Mpich(Package): provides('mpi@:3', when='@3:') provides('mpi@:1', when='@1:') - def setup_dependent_environment(self, module, spec, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" os.environ['MPICH_CC'] = 'cc' diff --git a/var/spack/packages/munge/package.py b/var/spack/packages/munge/package.py new file mode 100644 index 0000000000..c737ca0354 --- /dev/null +++ b/var/spack/packages/munge/package.py @@ -0,0 +1,20 @@ +from spack import * +import os + +class Munge(Package): + """ MUNGE Uid 'N' Gid Emporium """ + homepage = "https://code.google.com/p/munge/" + url = "https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2" + + version('0.5.11', 'bd8fca8d5f4c1fcbef1816482d49ee01', url='https://github.com/dun/munge/releases/download/munge-0.5.11/munge-0.5.11.tar.bz2') + + depends_on('openssl') + depends_on('libgcrypt') + + def install(self, spec, prefix): + os.makedirs(os.path.join(prefix, "lib/systemd/system")) + configure("--prefix=%s" % prefix) + + make() + make("install") + diff --git a/var/spack/packages/ncurses/package.py b/var/spack/packages/ncurses/package.py index a22e83503f..8f5763bfdd 100644 --- a/var/spack/packages/ncurses/package.py +++ b/var/spack/packages/ncurses/package.py @@ -21,3 +21,11 @@ class Ncurses(Package): make() make("install") + configure("--prefix=%s" % prefix, + "--with-shared", + "--disable-widec", + "--disable-pc-files", + "--without-ada") + make() + make("install") + diff --git a/var/spack/packages/netlib-blas/package.py b/var/spack/packages/netlib-blas/package.py index 0a6cdb0442..85e97323d3 100644 --- a/var/spack/packages/netlib-blas/package.py +++ b/var/spack/packages/netlib-blas/package.py @@ -9,6 +9,8 @@ class NetlibBlas(Package): version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') + variant('fpic', default=False, description="Build with -fpic compiler option") + # virtual dependency provides('blas') @@ -23,6 +25,10 @@ class NetlibBlas(Package): mf.filter('^LOADER.*', 'LOADER = f90') mf.filter('^CC =.*', 'CC = cc') + if '+fpic' in self.spec: + mf.filter('^OPTS.*=.*', 'OPTS = -O2 -frecursive -fpic') + mf.filter('^CFLAGS =.*', 'CFLAGS = -O3 -fpic') + def install(self, spec, prefix): make('blaslib') diff --git a/var/spack/packages/netlib-lapack/package.py b/var/spack/packages/netlib-lapack/package.py new file mode 100644 index 0000000000..fb6b99e27c --- /dev/null +++ b/var/spack/packages/netlib-lapack/package.py @@ -0,0 +1,59 @@ +from spack import * + +class NetlibLapack(Package): + """ + LAPACK version 3.X is a comprehensive FORTRAN library that does + linear algebra operations including matrix inversions, least + squared solutions to linear sets of equations, eigenvector + analysis, singular value decomposition, etc. It is a very + comprehensive and reputable package that has found extensive + use in the scientific community. + """ + homepage = "http://www.netlib.org/lapack/" + url = "http://www.netlib.org/lapack/lapack-3.5.0.tgz" + + version('3.5.0', 'b1d3e3e425b2e44a06760ff173104bdf') + version('3.4.2', '61bf1a8a4469d4bdb7604f5897179478') + version('3.4.1', '44c3869c38c8335c2b9c2a8bb276eb55') + version('3.4.0', '02d5706ec03ba885fc246e5fa10d8c70') + version('3.3.1', 'd0d533ec9a5b74933c2a1e84eedc58b4') + + variant('shared', default=False, description="Build shared library version") + + # virtual dependency + provides('lapack') + + # blas is a virtual dependency. + depends_on('blas') + + depends_on('cmake') + + # Doesn't always build correctly in parallel + parallel = False + + @when('^netlib-blas') + def get_blas_libs(self): + blas = self.spec['netlib-blas'] + return [join_path(blas.prefix.lib, 'blas.a')] + + + @when('^atlas') + def get_blas_libs(self): + blas = self.spec['atlas'] + return [join_path(blas.prefix.lib, l) + for l in ('libf77blas.a', 'libatlas.a')] + + + def install(self, spec, prefix): + blas_libs = ";".join(self.get_blas_libs()) + cmake_args = [".", '-DBLAS_LIBRARIES=' + blas_libs] + + if '+shared' in spec: + cmake_args.append('-DBUILD_SHARED_LIBS=ON') + + cmake_args += std_cmake_args + + cmake(*cmake_args) + make() + make("install") + diff --git a/var/spack/packages/pidx/package.py b/var/spack/packages/pidx/package.py new file mode 100644 index 0000000000..81aed62fb1 --- /dev/null +++ b/var/spack/packages/pidx/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Pidx(Package): + """PIDX Parallel I/O Library. + + PIDX is an efficient parallel I/O library that reads and writes + multiresolution IDX data files. + """ + + homepage = "http://www.cedmav.com/pidx" + + version('1.0', git='https://github.com/sci-visus/PIDX.git', + commit='6afa1cf71d1c41263296dc049c8fabaf73c296da') + + depends_on("mpi") + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + cmake('..', *std_cmake_args) + make() + make("install") diff --git a/var/spack/packages/pkg-config/package.py b/var/spack/packages/pkg-config/package.py new file mode 100644 index 0000000000..9964c6ce34 --- /dev/null +++ b/var/spack/packages/pkg-config/package.py @@ -0,0 +1,17 @@ +from spack import * + +class PkgConfig(Package): + """pkg-config is a helper tool used when compiling applications and libraries""" + homepage = "http://www.freedesktop.org/wiki/Software/pkg-config/" + url = "http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" + + version('0.28', 'aa3c86e67551adc3ac865160e34a2a0d') + + parallel = False + + def install(self, spec, prefix): + configure("--prefix=%s" %prefix, "--enable-shared") + + make() + make("install") + diff --git a/var/spack/packages/protobuf/package.py b/var/spack/packages/protobuf/package.py new file mode 100644 index 0000000000..34085c7ce9 --- /dev/null +++ b/var/spack/packages/protobuf/package.py @@ -0,0 +1,16 @@ +import os +from spack import * + +class Protobuf(Package): + """Google's data interchange format.""" + + homepage = "https://developers.google.com/protocol-buffers" + url = "https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2" + + version('2.5.0', 'a72001a9067a4c2c4e0e836d0f92ece4') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("check") + make("install") diff --git a/var/spack/packages/py-Cython/package.py b/var/spack/packages/py-Cython/package.py deleted file mode 100644 index c250139114..0000000000 --- a/var/spack/packages/py-Cython/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyCython(Package): - """The Cython compiler for writing C extensions for the Python language.""" - homepage = "http://www.cython.org" - version("0.21.2", "d21adb870c75680dc857cd05d41046a4", - url="https://pypi.python.org/packages/source/C/Cython/Cython-0.21.2.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-Distutils2/package.py b/var/spack/packages/py-Distutils2/package.py deleted file mode 100644 index 8690f569fe..0000000000 --- a/var/spack/packages/py-Distutils2/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PyDistutils2(Package): - """Python Packaging Library.""" - - homepage = "https://hg.python.org/distutils2" - url = "https://pypi.python.org/packages/source/D/Distutils2/Distutils2-1.0a4.tar.gz" - - version('1.0a4', '52bc9dffb394970c27e02853ae3a3241') - - depends_on("python") - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) - diff --git a/var/spack/packages/py-astroML/package.py b/var/spack/packages/py-astroML/package.py deleted file mode 100644 index 1583e249d2..0000000000 --- a/var/spack/packages/py-astroML/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyAstroml(Package): - """tools for machine learning and data mining in Astronomy""" - homepage = "http://astroML.github.com" - version("0.2", "85f558368546660564f20b30efafb024", - url="https://pypi.python.org/packages/source/a/astroML/astroML-0.2.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-astropy/package.py b/var/spack/packages/py-astropy/package.py deleted file mode 100644 index 5d2d0619cc..0000000000 --- a/var/spack/packages/py-astropy/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyAstropy(Package): - """Community-developed python astronomy tools""" - homepage = "http://astropy.org" - version("0.4.2", "6dc4f643cde37ba0a8b4967dc8becee8", - url="https://pypi.python.org/packages/source/a/astropy/astropy-0.4.2.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-autopep8/package.py b/var/spack/packages/py-autopep8/package.py deleted file mode 100644 index 39a2288ea0..0000000000 --- a/var/spack/packages/py-autopep8/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyAutopep8(Package): - """A tool that automatically formats Python code to conform to the PEP 8 style guide""" - homepage = "https://github.com/hhatto/autopep8" - version("1.1", "7998358d8f0efd77dcb2cc8e34e3cb5c", - url="https://pypi.python.org/packages/source/a/autopep8/autopep8-1.1.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-certifi/package.py b/var/spack/packages/py-certifi/package.py deleted file mode 100644 index 442903e6a0..0000000000 --- a/var/spack/packages/py-certifi/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyCertifi(Package): - """Python package for providing Mozilla's CA Bundle.""" - homepage = "http://python-requests.org" - version("14.05.14", "315ea4e50673a16ab047099f816fd32a", - url="https://pypi.python.org/packages/source/c/certifi/certifi-14.05.14.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-decorator/package.py b/var/spack/packages/py-decorator/package.py deleted file mode 100644 index 00c1c541d4..0000000000 --- a/var/spack/packages/py-decorator/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyDecorator(Package): - """Better living through Python with decorators""" - homepage = "https://github.com/micheles/decorator" - version("4.0.4", "dd3a0669e1e6f09699eefa2c7fbd9756", - url="https://pypi.python.org/packages/source/d/decorator/decorator-4.0.4.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-emcee/package.py b/var/spack/packages/py-emcee/package.py deleted file mode 100644 index 544066b92d..0000000000 --- a/var/spack/packages/py-emcee/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyEmcee(Package): - """Kick ass affine-invariant ensemble MCMC sampling""" - homepage = "http://dan.iel.fm/emcee/" - version("2.1.0", "c6b6fad05c824d40671d4a4fc58dfff7", - url="https://pypi.python.org/packages/source/e/emcee/emcee-2.1.0.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-fitsio/package.py b/var/spack/packages/py-fitsio/package.py deleted file mode 100644 index 046bc386d5..0000000000 --- a/var/spack/packages/py-fitsio/package.py +++ /dev/null @@ -1,13 +0,0 @@ -from spack import * - -class PyFitsio(Package): - """A full featured python library to read from and write to FITS files.""" - homepage = "https://github.com/esheldon/fitsio" - version("0.9.7", "75fa05f999ae8f55c8290bd78ada49e7", - url="https://pypi.python.org/packages/source/f/fitsio/fitsio-0.9.7.tar.gz") - - extends("python") - depends_on("py-numpy") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-gnureadline/package.py b/var/spack/packages/py-gnureadline/package.py deleted file mode 100644 index 51d1c6227e..0000000000 --- a/var/spack/packages/py-gnureadline/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyGnureadline(Package): - """The standard Python readline extension statically linked against the GNU readline library.""" - homepage = "http://github.com/ludwigschwardt/python-gnureadline" - version("6.3.3", "c4af83c9a3fbeac8f2da9b5a7c60e51c", - url="https://pypi.python.org/packages/source/g/gnureadline/gnureadline-6.3.3.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-ipython/package.py b/var/spack/packages/py-ipython/package.py index 3b94b71f29..8d0e64a07f 100644 --- a/var/spack/packages/py-ipython/package.py +++ b/var/spack/packages/py-ipython/package.py @@ -3,29 +3,14 @@ from spack import * class PyIpython(Package): """IPython provides a rich toolkit to help you make the most out of using Python interactively.""" homepage = "https://pypi.python.org/pypi/ipython" + url = "https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz" - version('3.0.0','b3f00f3c0be036fafef3b0b9d663f27e', - url='https://pypi.python.org/packages/source/i/ipython/ipython-3.0.0.tar.gz') - version('4.0.0','c2fecbcf1c0fbdc82625c77a50733dd6', - url='https://pypi.python.org/packages/source/i/ipython/ipython-4.0.0.tar.gz') - version('2.3.1', '2b7085525dac11190bfb45bb8ec8dcbf', - url="https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz") + version('2.3.1', '2b7085525dac11190bfb45bb8ec8dcbf') version('3.1.0', 'a749d90c16068687b0ec45a27e72ef8f') - version('3.2.1', 'f4c93d67ac4b2d4fc69df693b6f3c9e0', - url='https://github.com/ipython/ipython/archive/rel-3.2.1.tar.gz') extends('python') depends_on('py-pygments') - depends_on('py-setuptools@18.1') - depends_on('py-traitlets') - depends_on('py-pyzmq') - depends_on('py-pexpect') - depends_on('py-tornado') - depends_on('py-jinja2') + depends_on('py-setuptools') def install(self, spec, prefix): - import os - # os.system("spack activate py-setuptools@18.1") - # os.system("easy_install pip") - # os.system("pip install ipython[notebook]") python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-ipython/package.py.backup b/var/spack/packages/py-ipython/package.py.backup deleted file mode 100755 index 1ed8b57e60..0000000000 --- a/var/spack/packages/py-ipython/package.py.backup +++ /dev/null @@ -1,27 +0,0 @@ -from spack import * - -class PyIpython(Package): - """IPython provides a rich toolkit to help you make the most out of using Python interactively.""" - homepage = "https://pypi.python.org/pypi/ipython" - - version('2.3.1', '2b7085525dac11190bfb45bb8ec8dcbf', - url="https://pypi.python.org/packages/source/i/ipython/ipython-2.3.1.tar.gz") - version('3.1.0', 'a749d90c16068687b0ec45a27e72ef8f') - version('3.2.1', 'f4c93d67ac4b2d4fc69df693b6f3c9e0', - url='https://github.com/ipython/ipython/archive/rel-3.2.1.tar.gz') - - extends('python') - depends_on('py-pygments') - depends_on('py-setuptools@18.1') - depends_on('py-traitlets') - depends_on('py-pyzmq') - depends_on('py-pexpect') - depends_on('py-tornado') - depends_on('py-Jinja2') - - def install(self, spec, prefix): - import os - # os.system("spack activate py-setuptools@18.1") - # os.system("easy_install pip") - # os.system("pip install ipython[notebook]") - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-ipython_genutils/package.py b/var/spack/packages/py-ipython_genutils/package.py deleted file mode 100644 index 39b15eec73..0000000000 --- a/var/spack/packages/py-ipython_genutils/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyIpythonGenutils(Package): - """Vestigial utilities from IPython""" - homepage = "http://ipython.org" - version("0.1.0", "9a8afbe0978adbcbfcb3b35b2d015a56", - url="https://pypi.python.org/packages/source/i/ipython_genutils/ipython_genutils-0.1.0.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-joblib/package.py b/var/spack/packages/py-joblib/package.py deleted file mode 100644 index 10672314de..0000000000 --- a/var/spack/packages/py-joblib/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyJoblib(Package): - """Lightweight pipelining: using Python functions as pipeline jobs.""" - homepage = "http://packages.python.org/joblib/" - version("0.8.4", "90a1c25cc4dc4a8e3536093dbc35cff3", - url="https://pypi.python.org/packages/source/j/joblib/joblib-0.8.4.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-jsonschema/package.py b/var/spack/packages/py-jsonschema/package.py deleted file mode 100644 index 9a7fc21862..0000000000 --- a/var/spack/packages/py-jsonschema/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class PyJsonschema(Package): - """implementation of JSON Schema validation for Python""" - homepage = "https://github.com/Julian/jsonschema" - url = "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-2.5.1.tar.gz" - - version('2.4.0','661f85c3d23094afbb9ac3c0673840bf', - url='https://pypi.python.org/packages/source/j/jsonschema/jsonschema-2.4.0.tar.gz') - version('2.5.1', '374e848fdb69a3ce8b7e778b47c30640') - - extends("python") - depends_on("py-setuptools@18.1") - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-matplotlib/package.py b/var/spack/packages/py-matplotlib/package.py index b9244daf56..e7ce3dfd24 100644 --- a/var/spack/packages/py-matplotlib/package.py +++ b/var/spack/packages/py-matplotlib/package.py @@ -12,6 +12,7 @@ class PyMatplotlib(Package): extends('python', ignore=r'bin/nosetests.*$') depends_on('py-pyside') + depends_on('py-ipython') depends_on('py-pyparsing') depends_on('py-six') depends_on('py-dateutil') diff --git a/var/spack/packages/py-mock/package.py b/var/spack/packages/py-mock/package.py index c43842c187..3b08428ba0 100644 --- a/var/spack/packages/py-mock/package.py +++ b/var/spack/packages/py-mock/package.py @@ -1,12 +1,17 @@ from spack import * class PyMock(Package): - """A Python Mocking and Patching Library for Testing""" - homepage = "http://www.voidspace.org.uk/python/mock/" - version("1.0.1", "c3971991738caa55ec7c356bbc154ee2", - url="https://pypi.python.org/packages/source/m/mock/mock-1.0.1.tar.gz") + """mock is a library for testing in Python. It allows you to replace parts + of your system under test with mock objects and make assertions about how + they have been used.""" - extends("python") + homepage = "https://github.com/testing-cabal/mock" + url = "https://pypi.python.org/packages/source/m/mock/mock-1.3.0.tar.gz" + + version('1.3.0', '73ee8a4afb3ff4da1b4afa287f39fdeb') + + extends('python') + depends_on('py-setuptools@17.1:') def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-numexpr/package.py b/var/spack/packages/py-numexpr/package.py deleted file mode 100644 index 283ea18772..0000000000 --- a/var/spack/packages/py-numexpr/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyNumexpr(Package): - """Fast numerical expression evaluator for NumPy""" - homepage = "https://github.com/pydata/numexpr" - version("2.4", "df7e8d9e9dbb145b56d43c465c2bf854", - url="https://pypi.python.org/packages/source/n/numexpr/numexpr-2.4.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-numpy/package.py b/var/spack/packages/py-numpy/package.py index 6534e063d2..efa109a3e9 100644 --- a/var/spack/packages/py-numpy/package.py +++ b/var/spack/packages/py-numpy/package.py @@ -7,9 +7,22 @@ class PyNumpy(Package): version('1.9.1', '78842b73560ec378142665e712ae4ad9') version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') - + extends('python') depends_on('py-nose') + depends_on('netlib-blas+fpic') + depends_on('netlib-lapack+shared') + + def patch(self): + filter_file( + "possible_executables = \['(gfortran|g77|ifort|efl)", + "possible_executables = ['fc", + "numpy/distutils/fcompiler/gnu.py", + "numpy/distutils/fcompiler/intel.py") def install(self, spec, prefix): + with open('site.cfg', 'w') as f: + f.write('[DEFAULT]\n') + f.write('libraries=lapack,blas\n') + f.write('library_dirs=%s/lib:%s/lib\n' % (spec['blas'].prefix, spec['lapack'].prefix)) python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pandas/package.py b/var/spack/packages/py-pandas/package.py index 07ee12782f..5b9997faa9 100644 --- a/var/spack/packages/py-pandas/package.py +++ b/var/spack/packages/py-pandas/package.py @@ -6,8 +6,6 @@ class PyPandas(Package): homepage = "http://pandas.pydata.org/" url = "https://pypi.python.org/packages/source/p/pandas/pandas-0.16.0.tar.gz#md5=bfe311f05dc0c351f8955fbd1e296e73" - version('0.15.1','f6fd8d49fc801f6f3fa48f9117a6290b', - url='https://pypi.python.org/packages/source/p/pandas/pandas-0.15.1.tar.gz') version('0.16.0', 'bfe311f05dc0c351f8955fbd1e296e73') version('0.16.1', 'fac4f25748f9610a3e00e765474bdea8') diff --git a/var/spack/packages/py-pep8/package.py b/var/spack/packages/py-pep8/package.py deleted file mode 100644 index 0bcf416922..0000000000 --- a/var/spack/packages/py-pep8/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyPep8(Package): - """Python style guide checker""" - homepage = "http://pep8.readthedocs.org/" - version("1.6.1", "76cf60b245f8549cb458ffcd85710738", - url="https://pypi.python.org/packages/source/p/pep8/pep8-1.6.1.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-pickleshare/package.py b/var/spack/packages/py-pickleshare/package.py deleted file mode 100644 index cf9ddb7db8..0000000000 --- a/var/spack/packages/py-pickleshare/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyPickleshare(Package): - """Tiny 'shelve'-like database with concurrency support""" - homepage = "https://github.com/vivainio/pickleshare" - version("0.5", "25337740507cb855ad58bfcf60f7710e", - url="https://pypi.python.org/packages/source/p/pickleshare/pickleshare-0.5.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-pip/package.py b/var/spack/packages/py-pip/package.py deleted file mode 100644 index 89b8570fe4..0000000000 --- a/var/spack/packages/py-pip/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyPip(Package): - """The PyPA recommended tool for installing Python packages.""" - homepage = "https://pip.pypa.io/" - version("7.1.2", "3823d2343d9f3aaab21cf9c917710196", - url="https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-py/package.py b/var/spack/packages/py-py/package.py deleted file mode 100644 index 0ef0403124..0000000000 --- a/var/spack/packages/py-py/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyPy(Package): - """library with cross-python path, ini-parsing, io, code, log facilities""" - homepage = "http://pylib.readthedocs.org/" - version("1.4.26", "30c3fd92a53f1a5ed6f3591c1fe75c0e", - url="https://pypi.python.org/packages/source/p/py/py-1.4.26.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-py4j/package.py b/var/spack/packages/py-py4j/package.py deleted file mode 100644 index 4c31f57298..0000000000 --- a/var/spack/packages/py-py4j/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - - -class PyPy4j(Package): - """Enables Python programs to dynamically access arbitrary Java objects""" - homepage = "https://www.py4j.org/" - url = "https://pypi.python.org/packages/source/p/py4j/py4j-0.9.tar.gz" - - version('0.9', 'b6fed5faef81a5368e3d50a91a5c9a60') - - extends("python") - depends_on("py-setuptools@18.1") - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-pyside/package.py b/var/spack/packages/py-pyside/package.py index 8d093efd2c..bb5da44d02 100644 --- a/var/spack/packages/py-pyside/package.py +++ b/var/spack/packages/py-pyside/package.py @@ -8,9 +8,12 @@ class PyPyside(Package): version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d') + # TODO: make build dependency + # depends_on("cmake") + extends('python') depends_on('py-setuptools') - depends_on('qt@5.4.0') + depends_on('qt@:4') def patch(self): """Undo PySide RPATH handling and add Spack RPATH.""" diff --git a/var/spack/packages/py-pytest/package.py b/var/spack/packages/py-pytest/package.py deleted file mode 100644 index 3611b68862..0000000000 --- a/var/spack/packages/py-pytest/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyPytest(Package): - """pytest: simple powerful testing with Python""" - homepage = "http://pytest.org" - version("2.6.4", "14341e122f7e9031a0948eb6b01a2640", - url="https://pypi.python.org/packages/source/p/pytest/pytest-2.6.4.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-python-dateutil/package.py b/var/spack/packages/py-python-dateutil/package.py deleted file mode 100644 index 8efa114db1..0000000000 --- a/var/spack/packages/py-python-dateutil/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyPythonDateutil(Package): - """Extensions to the standard Python datetime module""" - homepage = "http://labix.org/python-dateutil" - version("2.2", "c1f654d0ff7e33999380a8ba9783fd5c", - url="https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.2.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-pytz/package.py b/var/spack/packages/py-pytz/package.py index f67bb42854..da6311a784 100644 --- a/var/spack/packages/py-pytz/package.py +++ b/var/spack/packages/py-pytz/package.py @@ -5,8 +5,6 @@ class PyPytz(Package): homepage = "https://pypi.python.org/pypi/pytz" url = "https://pypi.python.org/packages/source/p/pytz/pytz-2014.10.tar.gz" - version('2014.9','d42bda2f4c1e873e02fbd1e4acfd1b8c', - url='https://pypi.python.org/packages/source/p/pytz/pytz-2014.9.tar.gz') version('2014.10', 'eb1cb941a20c5b751352c52486aa1dd7') version('2015.4', '417a47b1c432d90333e42084a605d3d8') diff --git a/var/spack/packages/py-pyzmq/package.py b/var/spack/packages/py-pyzmq/package.py deleted file mode 100644 index f5551182b3..0000000000 --- a/var/spack/packages/py-pyzmq/package.py +++ /dev/null @@ -1,16 +0,0 @@ -from spack import * - -class PyPyzmq(Package): - """official Python binding for the ZeroMQ Messaging Library""" - homepage = "https://github.com/zeromq/pyzmq" - url = "https://pypi.python.org/packages/source/p/pyzmq/pyzmq-14.7.0.tar.gz" - - version('14.4.1','a6a7fb6950b1bf5333c6795f3edf196c', - url='https://pypi.python.org/packages/source/p/pyzmq/pyzmq-14.4.1.tar.gz') - version('14.7.0', '87e3abb33af5794db5ae85c667bbf324') - - extends('python') - depends_on('py-setuptools@18.1') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-scikit-learn/package.py b/var/spack/packages/py-scikit-learn/package.py index 744b37e7e0..5b078ce901 100644 --- a/var/spack/packages/py-scikit-learn/package.py +++ b/var/spack/packages/py-scikit-learn/package.py @@ -9,9 +9,6 @@ class PyScikitLearn(Package): version('0.16.1', '363ddda501e3b6b61726aa40b8dbdb7e') extends('python') - depends_on('python@2.7.10') - depends_on('py-numpy@1.9.2') - depends_on('py-scipy@0.15.1') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-scipy/package.py b/var/spack/packages/py-scipy/package.py index bcbdb2100f..3a1124cc15 100644 --- a/var/spack/packages/py-scipy/package.py +++ b/var/spack/packages/py-scipy/package.py @@ -5,14 +5,14 @@ class PyScipy(Package): homepage = "https://pypi.python.org/pypi/scipy" url = "https://pypi.python.org/packages/source/s/scipy/scipy-0.15.0.tar.gz" - version('0.14.0','d7c7f4ccf8b07b08d6fe49d5cd51f85d', - url='https://pypi.python.org/packages/source/s/scipy/scipy-0.14.0.tar.gz') version('0.15.0', '639112f077f0aeb6d80718dc5019dc7a') version('0.15.1', 'be56cd8e60591d6332aac792a5880110') extends('python') depends_on('py-nose') depends_on('py-numpy') + depends_on('blas') + depends_on('lapack') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-seaborn/package.py b/var/spack/packages/py-seaborn/package.py deleted file mode 100644 index 1e228b0622..0000000000 --- a/var/spack/packages/py-seaborn/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PySeaborn(Package): - """Seaborn: statistical data visualization""" - homepage = "http://stanford.edu/~mwaskom/software/seaborn/" - version("0.5.1", "2ce6ea7d3c67858c0b1f5793fa2043b8", - url="https://pypi.python.org/packages/source/s/seaborn/seaborn-0.5.1.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-setuptools/package.py b/var/spack/packages/py-setuptools/package.py index 053fe1ba80..760ad4d6db 100644 --- a/var/spack/packages/py-setuptools/package.py +++ b/var/spack/packages/py-setuptools/package.py @@ -3,12 +3,11 @@ from spack import * class PySetuptools(Package): """Easily download, build, install, upgrade, and uninstall Python packages.""" homepage = "https://pypi.python.org/pypi/setuptools" + url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz" - version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06', - url='https://pypi.python.org/packages/source/s/setuptools/setuptools-18.1.tar.gz') - version('11.3.1', '01f69212e019a2420c1693fb43593930', - url="https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz") - version('16.0', '0ace0b96233516fc5f7c857d086aa3ad',) + version('11.3.1', '01f69212e019a2420c1693fb43593930') + version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') + version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') extends('python') diff --git a/var/spack/packages/py-six/package.py b/var/spack/packages/py-six/package.py index e9946a1e56..05c5bd00a9 100644 --- a/var/spack/packages/py-six/package.py +++ b/var/spack/packages/py-six/package.py @@ -5,8 +5,6 @@ class PySix(Package): homepage = "https://pypi.python.org/pypi/six" url = "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz" - version('1.8.0','1626eb24cc889110c38f7e786ec69885', - url='https://pypi.python.org/packages/source/s/six/six-1.8.0.tar.gz') version('1.9.0', '476881ef4012262dfc8adc645ee786c4') extends('python') diff --git a/var/spack/packages/py-statsmodels/package.py b/var/spack/packages/py-statsmodels/package.py deleted file mode 100644 index 393c772738..0000000000 --- a/var/spack/packages/py-statsmodels/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyStatsmodels(Package): - """Statistical computations and models for use with SciPy""" - homepage = "http://statsmodels.sourceforge.net/" - version("0.6.1", "f7580ebf7d2a2c9b87abfad190dcb9a3", - url="https://pypi.python.org/packages/source/s/statsmodels/statsmodels-0.6.1.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-tables/package.py b/var/spack/packages/py-tables/package.py deleted file mode 100644 index 637ccf34cd..0000000000 --- a/var/spack/packages/py-tables/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyTables(Package): - """Hierarchical datasets for Python""" - homepage = "http://www.pytables.org/" - version("3.1.1", "38d917f0c6dfb0bc28ce9ea0c3492524", - url="https://pypi.python.org/packages/source/t/tables/tables-3.1.1.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/py-tornado/package.py b/var/spack/packages/py-tornado/package.py deleted file mode 100644 index 4fc2d42c7b..0000000000 --- a/var/spack/packages/py-tornado/package.py +++ /dev/null @@ -1,17 +0,0 @@ -from spack import * - -class PyTornado(Package): - """Python web framework and asynchronous networking library""" - homepage = "http://www.tornadoweb.org/" - url = "https://pypi.python.org/packages/source/t/tornado/tornado-4.2.1.tar.gz" - - version('4.0.2','985c0e704b765c33a6193d49d1935588', - url='https://pypi.python.org/packages/source/t/tornado/tornado-4.0.2.tar.gz') - version('4.2.1', 'd523204389cfb70121bb69709f551b20') - - extends('python') - depends_on('py-certifi') - depends_on('py-setuptools@18.1') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-traitlets/package.py b/var/spack/packages/py-traitlets/package.py deleted file mode 100644 index 7b7f5c64cc..0000000000 --- a/var/spack/packages/py-traitlets/package.py +++ /dev/null @@ -1,14 +0,0 @@ -from spack import * - -class PyTraitlets(Package): - """A lightweight Traits like module""" - homepage = "http://traitlets.readthedocs.org/" - url = "https://github.com/ipython/traitlets/archive/4.0.0.tar.gz" - - version('4.0.0', 'b5b95ea5941fd9619b4704dfd8201568') - - extends('python') - depends_on("py-setuptools@18.1") - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/packages/py-triangle-plot/package.py b/var/spack/packages/py-triangle-plot/package.py deleted file mode 100644 index 29c5f92857..0000000000 --- a/var/spack/packages/py-triangle-plot/package.py +++ /dev/null @@ -1,12 +0,0 @@ -from spack import * - -class PyTrianglePlot(Package): - """Make some beautiful corner plots of samples.""" - homepage = "https://github.com/dfm/triangle.py" - version("0.0.6", "970a35a9bde6002d673e3188fe39f0ed", - url="https://pypi.python.org/packages/source/t/triangle_plot/triangle_plot-0.0.6.tar.gz") - - extends("python") - - def install(self, spec, prefix): - python("setup.py", "install", "--prefix=%s" % prefix) diff --git a/var/spack/packages/samtools/package.py b/var/spack/packages/samtools/package.py new file mode 100644 index 0000000000..72900398d8 --- /dev/null +++ b/var/spack/packages/samtools/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Samtools(Package): + """SAM Tools provide various utilities for manipulating alignments in the SAM format, + including sorting, merging, indexing and generating + alignments in a per-position format""" + + homepage = "www.htslib.org" + version('1.2','988ec4c3058a6ceda36503eebecd4122',url = "https://github.com/samtools/samtools/releases/download/1.2/samtools-1.2.tar.bz2") + + depends_on("zlib") + depends_on("mpc") + parallel=False + patch("samtools1.2.patch",level=0) + + def install(self, spec, prefix): + make("prefix=%s" % prefix, "install") + diff --git a/var/spack/packages/samtools/samtools1.2.patch b/var/spack/packages/samtools/samtools1.2.patch new file mode 100644 index 0000000000..ead3ab4e2c --- /dev/null +++ b/var/spack/packages/samtools/samtools1.2.patch @@ -0,0 +1,20 @@ +--- Makefile 2015-02-03 08:27:34.000000000 -0800 ++++ Makefile.new 2015-07-21 10:38:27.881406892 -0700 +@@ -26,7 +26,7 @@ + CFLAGS = -g -Wall -O2 + LDFLAGS = + LDLIBS = +-DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 ++DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=0 + LOBJS= bam_aux.o bam.o bam_import.o sam.o \ + sam_header.o bam_plbuf.o + AOBJS= bam_index.o bam_plcmd.o sam_view.o \ +@@ -37,7 +37,7 @@ + faidx.o stats.o stats_isize.o bam_flags.o bam_split.o \ + bam_tview.o bam_tview_curses.o bam_tview_html.o bam_lpileup.o + INCLUDES= -I. -I$(HTSDIR) +-LIBCURSES= -lcurses # -lXCurses ++#LIBCURSES= -lcurses # -lXCurses + + prefix = /usr/local + exec_prefix = $(prefix) diff --git a/var/spack/packages/scorep/package.py b/var/spack/packages/scorep/package.py index 32a772e3db..f013bd1cbb 100644 --- a/var/spack/packages/scorep/package.py +++ b/var/spack/packages/scorep/package.py @@ -1,11 +1,10 @@ # FIXME: Add copyright statement from spack import * -from contextlib import closing class Scorep(Package): - """The Score-P measurement infrastructure is a highly scalable and - easy-to-use tool suite for profiling, event tracing, and online + """The Score-P measurement infrastructure is a highly scalable and + easy-to-use tool suite for profiling, event tracing, and online analysis of HPC applications.""" # FIXME: add a proper url for your package's homepage here. @@ -20,7 +19,7 @@ class Scorep(Package): depends_on("mpi") depends_on("papi") # depends_on("otf2@1.2:1.2.1") # only Score-P 1.2.x - depends_on("otf2") + depends_on("otf2") depends_on("opari2") depends_on("cube@4.2:4.2.3") @@ -53,12 +52,12 @@ MPI_CXXFLAGS=-fPIC # Use a custom compiler configuration, otherwise the score-p # build system messes with spack's compiler settings. # Create these three files in the build directory - with closing(open("platform-backend-user-provided", "w")) as backend_file: + with open("platform-backend-user-provided", "w") as backend_file: backend_file.write(self.backend_user_provided) - with closing(open("platform-frontend-user-provided", "w")) as frontend_file: + with open("platform-frontend-user-provided", "w") as frontend_file: frontend_file.write(self.frontend_user_provided) - with closing(open("platform-mpi-user-provided", "w")) as mpi_file: - mpi_file.write(self.mpi_user_provided) + with open("platform-mpi-user-provided", "w") as mpi_file: + mpi_file.write(self.mpi_user_provided) configure_args = ["--prefix=%s" % prefix, "--with-custom-compilers", diff --git a/var/spack/packages/snappy/package.py b/var/spack/packages/snappy/package.py new file mode 100644 index 0000000000..c8f9ceef7d --- /dev/null +++ b/var/spack/packages/snappy/package.py @@ -0,0 +1,15 @@ +import os +from spack import * + +class Snappy(Package): + """A fast compressor/decompressor: https://code.google.com/p/snappy""" + + homepage = "https://code.google.com/p/snappy" + url = "https://github.com/google/snappy/releases/download/1.1.3/snappy-1.1.3.tar.gz" + + version('1.1.3', '7358c82f133dc77798e4c2062a749b73') + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") diff --git a/var/spack/packages/stat/package.py b/var/spack/packages/stat/package.py index c40d65ae78..5d81e62731 100644 --- a/var/spack/packages/stat/package.py +++ b/var/spack/packages/stat/package.py @@ -9,17 +9,20 @@ class Stat(Package): version('2.1.0', 'ece26beaf057aa9134d62adcdda1ba91') version('2.0.0', 'c7494210b0ba26b577171b92838e1a9b') + variant('dysect', default=False, description="enable DySectAPI") + depends_on('libelf') depends_on('libdwarf') depends_on('dyninst') depends_on('graphlib') + depends_on('graphviz') depends_on('launchmon') depends_on('mrnet') patch('configure_mpicxx.patch', when='@2.1.0') def install(self, spec, prefix): - configure( + configure_args = [ "--enable-gui", "--prefix=%s" % prefix, "--disable-examples", # Examples require MPI: avoid this dependency. @@ -27,7 +30,11 @@ class Stat(Package): "--with-mrnet=%s" % spec['mrnet'].prefix, "--with-graphlib=%s" % spec['graphlib'].prefix, "--with-stackwalker=%s" % spec['dyninst'].prefix, - "--with-libdwarf=%s" % spec['libdwarf'].prefix) + "--with-libdwarf=%s" % spec['libdwarf'].prefix + ] + if '+dysect' in spec: + configure_args.append('--enable-dysectapi') + configure(*configure_args) make(parallel=False) make("install") diff --git a/var/spack/packages/vim/package.py b/var/spack/packages/vim/package.py index d0cf80b898..4099b3257f 100644 --- a/var/spack/packages/vim/package.py +++ b/var/spack/packages/vim/package.py @@ -35,15 +35,26 @@ class Vim(Package): variant('ruby', default=False, description="build with Ruby") depends_on('ruby', when='+ruby') + variant('cscope', default=False, description="build with cscope support") + depends_on('cscope', when='+cscope') + + variant('gui', default=False, description="build with gui (gvim)") + # virtual dependency? + def install(self, spec, prefix): feature_set = None for fs in self.feature_sets: if "+" + fs in spec: if feature_set is not None: - tty.error("Only one feature set allowed, both {} and {} specified".format( - feature_set, - fs)) + tty.error("Only one feature set allowed, both %s and %s specified" + % (feature_set, fs)) feature_set = fs + if '+gui' in spec: + if feature_set is not None: + if feature_set is not 'huge': + tty.error("+gui variant requires 'huge' feature set, %s was specified" + % feature_set) + feature_set = 'huge' if feature_set is None: feature_set = 'normal' @@ -60,6 +71,12 @@ class Vim(Package): else: configure_args.append("--enable-rubyinterp=dynamic") + if '+gui' in spec: + configure_args.append("--enable-gui=auto") + + if '+cscope' in spec: + configure_args.append("--enable-cscope") + configure("--prefix=%s" % prefix, *configure_args) make() diff --git a/var/spack/packages/zeromq/package.py b/var/spack/packages/zeromq/package.py new file mode 100644 index 0000000000..b5a1e3d4cd --- /dev/null +++ b/var/spack/packages/zeromq/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Zeromq(Package): + """ The ZMQ networking/concurrency library and core API """ + homepage = "http://zguide.zeromq.org/" + url = "http://download.zeromq.org/zeromq-4.1.2.tar.gz" + + version('4.1.2', '159c0c56a895472f02668e692d122685') + version('4.1.1', '0a4b44aa085644f25c177f79dc13f253') + version('4.0.7', '9b46f7e7b0704b83638ef0d461fd59ab') + version('4.0.6', 'd47dd09ed7ae6e7fd6f9a816d7f5fdf6') + version('4.0.5', '73c39f5eb01b9d7eaf74a5d899f1d03d') + + depends_on("libsodium") + + def install(self, spec, prefix): + configure("--with-libsodium","--prefix=%s" % prefix) + + make() + make("install") -- cgit v1.2.3-70-g09d2 From 6da1a105cb448ec3c4f8ca4910b5bc9f12044001 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 15:03:34 -0800 Subject: Revert "adding python_recipe_parser as a submodule under the folder utils" This reverts commit 1501786fd9be0a01abe7f6bb917e416fb3256aa6. --- .gitmodules | 3 --- utils/python_recipe_parser | 1 - 2 files changed, 4 deletions(-) delete mode 100644 .gitmodules delete mode 160000 utils/python_recipe_parser diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index a097fcd8cf..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "utils/python_recipe_parser"] - path = utils/python_recipe_parser - url = https://github.com/karenyyng/spack_python_package_parser diff --git a/utils/python_recipe_parser b/utils/python_recipe_parser deleted file mode 160000 index 3158074a2d..0000000000 --- a/utils/python_recipe_parser +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3158074a2d74f99aa72289dfcf093b1b0ba4474e -- cgit v1.2.3-70-g09d2 From aa28e4e81f80a1a388aabe589ca23955ebd9721b Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 15:13:48 -0800 Subject: Improved error messages for compiler_for_spec when either zero or multiple compilers returned. --- lib/spack/spack/compilers/__init__.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 87106282cf..3a0a88b5e3 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -219,7 +219,10 @@ def compiler_for_spec(compiler_spec, target): compilers = [c for c in compilers if c.modules is None] elif target.compiler_strategy == "MODULES": compilers = [c for c in compilers if c.modules is not None] - assert(len(compilers) == 1) + if len(compilers) < 1: + raise NoCompilerForSpecError(compiler_spec, target) + if len(compilers) > 1: + raise CompilerSpecInsufficientlySpecificError(compiler_spec) return compilers[0] @@ -253,3 +256,13 @@ class InvalidCompilerConfigurationError(spack.error.SpackError): class NoCompilersError(spack.error.SpackError): def __init__(self): super(NoCompilersError, self).__init__("Spack could not find any compilers!") + +class NoCompilerForSpecError(spack.error.SpackError): + def __init__(self, compiler_spec, target): + super(NoCompilerForSpecError, self).__init__("No compilers for target %s satisfy spec %s", + compiler_spec, target) + +class CompilerSpecInsufficientlySpecificError(spack.error.SpackError): + def __init__(self, compiler_spec): + super(CompilerSpecInsufficientlySpecificError, self).__init__("Multiple compilers satisfy spec %s", + compiler_spec) -- cgit v1.2.3-70-g09d2 From 2b4dd8b9af427e2fc3c4a743f4f058a26c7d583f Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 16:30:27 -0800 Subject: Fixed target satisfaction and updated tests accordingly --- lib/spack/spack/concretize.py | 35 ++-------------------- lib/spack/spack/spec.py | 35 ++++++++++++++++++++++ lib/spack/spack/test/multimethod.py | 22 +++++--------- lib/spack/spack/test/spec_dag.py | 10 +++++-- lib/spack/spack/test/spec_semantics.py | 41 +++++++++++++++++--------- var/spack/mock_packages/multimethod/package.py | 23 +++++---------- 6 files changed, 86 insertions(+), 80 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index ce86786004..43637ed468 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -209,37 +209,6 @@ class DefaultConcretizer(object): return True # Things changed - def class_from_platform_name(self, platform_name): - file_path = join_path(spack.platform_path, platform_name) - platform_mod = imp.load_source('spack.platforms', file_path + '.py') - cls = getattr(platform_mod, mod_to_class(platform_name)) - - return cls - - def spec_add_target_from_string(self, spec, target): - """If only a target is provided, spack will assume the default architecture. - A platform-target pair can be input delimited by a '-'. If either portion of - a platform-target pair is empty, spack will supply a default, in the case of - a blank target the default will be dependent on the platform. - E.g. x86_64 -> 64 bit x86 - bgq- -> default bgq target (back end/powerpc) - cray-hawswell -> haswell target on cray platform - """ - if '-' in target: - platform, target = target.split('-') - else: - platform = '' - - if platform != '': - cls = self.class_from_platform_name(platform) - platform = cls() - else: - platform = spack.architecture.sys_type() - if target != '': - spec.target = platform.target(target) - else: - spec.target = platform.target('default') - def concretize_target(self, spec): """If the spec already has an target and it is a an target type, return. Otherwise, if it has a target that is a string type, generate a @@ -251,14 +220,14 @@ class DefaultConcretizer(object): if isinstance(spec.target,spack.architecture.Target): return False else: - self.spec_add_target_from_string(spec, spec.target) + spec.add_target_from_string(spec, spec.target) return True #changed if spec.root.target: if isinstance(spec.root.target,spack.architecture.Target): spec.target = spec.root.target else: - self.spec_add_target_from_string(spec, spec.root.target) + spec.add_target_from_string(spec, spec.root.target) else: platform = spack.architecture.sys_type() spec.target = platform.target('default') diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 9e011bfb9f..8f90cc0d7f 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1228,6 +1228,36 @@ class Spec(object): return parse_anonymous_spec(spec_like, self.name) + def add_target_from_string(self, target): + """If only a target is provided, spack will assume the default architecture. + A platform-target pair can be input delimited by a '-'. If either portion of + a platform-target pair is empty, spack will supply a default, in the case of + a blank target the default will be dependent on the platform. + E.g. x86_64 -> 64 bit x86 + bgq- -> default bgq target (back end/powerpc) + cray-hawswell -> haswell target on cray platform + """ + if target is None: + return + if '-' in target: + platform, target = target.split('-') + else: + platform = '' + + if platform != '': + # Find the class for the platform name given + file_path = join_path(spack.platform_path, platform_name) + platform_mod = imp.load_source('spack.platforms', file_path + '.py') + cls = getattr(platform_mod, mod_to_class(platform_name)) + platform = cls() + else: + platform = spack.architecture.sys_type() + if target != '': + self.target = platform.target(target) + else: + self.target = platform.target('default') + + def satisfies(self, other, deps=True, strict=False): """Determine if this spec satisfies all constraints of another. @@ -1275,6 +1305,11 @@ class Spec(object): # Target satisfaction is currently just class equality. # If not strict, None means unconstrained. + if not isinstance(self.target, spack.architecture.Target): + self.add_target_from_string(self.target) + if not isinstance(other.target, spack.architecture.Target): + other.add_target_from_string(other.target) + if self.target and other.target: if self.target != other.target: return False diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index 741dc96072..c651b7ad4a 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -92,22 +92,16 @@ class MultiMethodTest(MockPackagesTest): def test_target_match(self): - pkg = spack.db.get('multimethod=x86_64') - self.assertEqual(pkg.different_by_target(), 'x86_64') - - pkg = spack.db.get('multimethod=ppc64') - self.assertEqual(pkg.different_by_target(), 'ppc64') - - pkg = spack.db.get('multimethod=ppc32') - self.assertEqual(pkg.different_by_target(), 'ppc32') - - pkg = spack.db.get('multimethod=arm64') - self.assertEqual(pkg.different_by_target(), 'arm64') - - pkg = spack.db.get('multimethod=macos') + platform = spack.architecture.sys_type() + targets = platform.targets.values() + for target in targets[:-1]: + print target + pkg = spack.db.get('multimethod='+target.name) + self.assertEqual(pkg.different_by_target(), target.name) + + pkg = spack.db.get('multimethod='+targets[-1].name) self.assertRaises(NoSuchMethodError, pkg.different_by_target) - def test_dependency_match(self): pkg = spack.db.get('multimethod^zmpi') self.assertEqual(pkg.different_by_dep(), 'zmpi') diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index 6a2dd6140f..d116454d5c 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -241,9 +241,13 @@ class SpecDagTest(MockPackagesTest): def test_unsatisfiable_target(self): - set_pkg_dep('mpileaks', 'mpich=bgqos_0') - spec = Spec('mpileaks ^mpich=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf') - self.assertRaises(spack.spec.UnsatisfiableTargetSpecError, spec.normalize) + platform = spack.architecture.sys_type() + if len(platform.targets) > 1: + first = platform.targets.values()[0].name + second = platform.targets.values()[1].name + set_pkg_dep('mpileaks', 'mpich='+first) + spec = Spec('mpileaks ^mpich='+ second +' ^callpath ^dyninst ^libelf ^libdwarf') + self.assertRaises(spack.spec.UnsatisfiableTargetSpecError, spec.normalize) def test_invalid_dep(self): diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index b8b4fb951c..ef4db3fe65 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -111,12 +111,13 @@ class SpecSematicsTest(MockPackagesTest): def test_satisfies_target(self): - self.check_satisfies('foo=chaos_5_x86_64_ib', '=chaos_5_x86_64_ib') - self.check_satisfies('foo=bgqos_0', '=bgqos_0') - - self.check_unsatisfiable('foo=bgqos_0', '=chaos_5_x86_64_ib') - self.check_unsatisfiable('foo=chaos_5_x86_64_ib', '=bgqos_0') + platform = spack.architecture.sys_type() + targets = platform.targets.values() + for target in targets: + self.check_satisfies('foo='+target.name, '='+target.name) + for i in range(1,len(targets)): + self.check_unsatisfiable('foo='+targets[i-1].name, '='+targets[i].name) def test_satisfies_dependencies(self): self.check_satisfies('mpileaks^mpich', '^mpich') @@ -267,13 +268,15 @@ class SpecSematicsTest(MockPackagesTest): def test_constrain_target(self): - self.check_constrain('libelf=bgqos_0', 'libelf=bgqos_0', 'libelf=bgqos_0') - self.check_constrain('libelf=bgqos_0', 'libelf', 'libelf=bgqos_0') + platform = spack.architecture.sys_type() + target = platform.target('default').name + self.check_constrain('libelf='+target, 'libelf='+target, 'libelf='+target) + self.check_constrain('libelf='+target, 'libelf', 'libelf='+target) def test_constrain_compiler(self): - self.check_constrain('libelf=bgqos_0', 'libelf=bgqos_0', 'libelf=bgqos_0') - self.check_constrain('libelf=bgqos_0', 'libelf', 'libelf=bgqos_0') + self.check_constrain('libelf%intel', 'libelf%intel', 'libelf%intel') + self.check_constrain('libelf%intel', 'libelf', 'libelf%intel') def test_invalid_constraint(self): @@ -283,7 +286,10 @@ class SpecSematicsTest(MockPackagesTest): self.check_invalid_constraint('libelf+debug', 'libelf~debug') self.check_invalid_constraint('libelf+debug~foo', 'libelf+debug+foo') - self.check_invalid_constraint('libelf=bgqos_0', 'libelf=x86_54') + platform = spack.architecture.sys_type() + targets = platform.targets.values() + if len(targets) > 1: + self.check_invalid_constraint('libelf='+targets[0].name, 'libelf='+targets[1].name) def test_constrain_changed(self): @@ -293,7 +299,8 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf%gcc', '%gcc@4.5') self.check_constrain_changed('libelf', '+debug') self.check_constrain_changed('libelf', '~debug') - self.check_constrain_changed('libelf', '=bgqos_0') + platform = spack.architecture.sys_type() + self.check_constrain_changed('libelf', '='+platform.target('default').name) def test_constrain_not_changed(self): @@ -304,7 +311,9 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf%gcc@4.5', '%gcc@4.5') self.check_constrain_not_changed('libelf+debug', '+debug') self.check_constrain_not_changed('libelf~debug', '~debug') - self.check_constrain_not_changed('libelf=bgqos_0', '=bgqos_0') + platform = spack.architecture.sys_type() + default = platform.target('default').name + self.check_constrain_not_changed('libelf='+default, '='+default) self.check_constrain_not_changed('libelf^foo', 'libelf^foo') self.check_constrain_not_changed('libelf^foo^bar', 'libelf^foo^bar') @@ -316,7 +325,9 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf^foo%gcc', 'libelf^foo%gcc@4.5') self.check_constrain_changed('libelf^foo', 'libelf^foo+debug') self.check_constrain_changed('libelf^foo', 'libelf^foo~debug') - self.check_constrain_changed('libelf^foo', 'libelf^foo=bgqos_0') + platform = spack.architecture.sys_type() + default = platform.target('default').name + self.check_constrain_changed('libelf^foo', 'libelf^foo='+default) def test_constrain_dependency_not_changed(self): @@ -326,5 +337,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf^foo%gcc@4.5', 'libelf^foo%gcc@4.5') self.check_constrain_not_changed('libelf^foo+debug', 'libelf^foo+debug') self.check_constrain_not_changed('libelf^foo~debug', 'libelf^foo~debug') - self.check_constrain_not_changed('libelf^foo=bgqos_0', 'libelf^foo=bgqos_0') + platform = spack.architecture.sys_type() + default = platform.target('default').name + self.check_constrain_not_changed('libelf^foo='+default, 'libelf^foo='+default) diff --git a/var/spack/mock_packages/multimethod/package.py b/var/spack/mock_packages/multimethod/package.py index f78ef3bb3d..0a1e991d37 100644 --- a/var/spack/mock_packages/multimethod/package.py +++ b/var/spack/mock_packages/multimethod/package.py @@ -23,7 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * - +import spack.architecture class Multimethod(Package): """This package is designed for use with Spack's multimethod test. @@ -103,21 +103,12 @@ class Multimethod(Package): # # Make sure we can switch methods on different target # - @when('=x86_64') - def different_by_target(self): - return 'x86_64' - - @when('=ppc64') - def different_by_target(self): - return 'ppc64' - - @when('=ppc32') - def different_by_target(self): - return 'ppc32' - - @when('=arm64') - def different_by_target(self): - return 'arm64' + platform = spack.architecture.sys_type() + targets = platform.targets.values() + for target in targets[:-1]: + @when('='+target.name) + def different_by_target(self): + return self.spec.target.name # -- cgit v1.2.3-70-g09d2 From 2b2d4bae4e48151ae17c0f2f0514873b1247ff15 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 17:38:37 -0800 Subject: Fixing multimethod test for new platforms --- lib/spack/spack/test/multimethod.py | 6 +++++- var/spack/mock_packages/multimethod/package.py | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index c651b7ad4a..116cb2d2ff 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -100,7 +100,11 @@ class MultiMethodTest(MockPackagesTest): self.assertEqual(pkg.different_by_target(), target.name) pkg = spack.db.get('multimethod='+targets[-1].name) - self.assertRaises(NoSuchMethodError, pkg.different_by_target) + if len(targets) == 1: + self.assertEqual(pkg.different_by_target(), targets[-1].name) + else: + self.assertRaises(NoSuchMethodError, pkg.different_by_target) + def test_dependency_match(self): pkg = spack.db.get('multimethod^zmpi') diff --git a/var/spack/mock_packages/multimethod/package.py b/var/spack/mock_packages/multimethod/package.py index 0a1e991d37..4e9a2438a7 100644 --- a/var/spack/mock_packages/multimethod/package.py +++ b/var/spack/mock_packages/multimethod/package.py @@ -22,6 +22,9 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## +import imp +from llnl.util.filesystem import join_path +from spack.util.naming import mod_to_class from spack import * import spack.architecture @@ -103,8 +106,15 @@ class Multimethod(Package): # # Make sure we can switch methods on different target # +# for platform_name in ['cray_xc', 'darwin', 'linux']: +# file_path = join_path(spack.platform_path, platform_name) +# platform_mod = imp.load_source('spack.platforms', file_path + '.py') +# cls = getattr(platform_mod, mod_to_class(platform_name)) + +# platform = cls() platform = spack.architecture.sys_type() targets = platform.targets.values() + for target in targets[:-1]: @when('='+target.name) def different_by_target(self): -- cgit v1.2.3-70-g09d2 From 6e5238d037aebe4e610a16f200d860cee1a1355d Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 17:44:16 -0800 Subject: Fixing the fix and removing debug printing --- lib/spack/spack/test/multimethod.py | 1 - var/spack/mock_packages/multimethod/package.py | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index 116cb2d2ff..9d9f39e87d 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -95,7 +95,6 @@ class MultiMethodTest(MockPackagesTest): platform = spack.architecture.sys_type() targets = platform.targets.values() for target in targets[:-1]: - print target pkg = spack.db.get('multimethod='+target.name) self.assertEqual(pkg.different_by_target(), target.name) diff --git a/var/spack/mock_packages/multimethod/package.py b/var/spack/mock_packages/multimethod/package.py index 4e9a2438a7..b37db9f1eb 100644 --- a/var/spack/mock_packages/multimethod/package.py +++ b/var/spack/mock_packages/multimethod/package.py @@ -114,8 +114,10 @@ class Multimethod(Package): # platform = cls() platform = spack.architecture.sys_type() targets = platform.targets.values() + if len(targets) > 1: + targets = targets[:-1] - for target in targets[:-1]: + for target in targets: @when('='+target.name) def different_by_target(self): return self.spec.target.name -- cgit v1.2.3-70-g09d2 From 41046499c69150a7a81518f2ffba3405de0d6577 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 18:51:38 -0800 Subject: minor bug chasing --- lib/spack/env/cc | 16 ---------------- lib/spack/spack/compilers/__init__.py | 4 ++-- lib/spack/spack/concretize.py | 4 ++-- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index b6c6e03e42..1704ae3280 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -71,22 +71,6 @@ for param in $parameters; do done -# -# Cray module environment-related stuff. -# -if [ ! -z "$SPACK_CRAYPE" ]; then - cur_pe=$(module list 2>&1 | grep PrgEnv | grep -o 'PrgEnv-[^/]*') - if [ ! -z "$cur_pe" ]; then - module swap $cur_pe $SPACK_CRAYPE - else - module load $SPACK_CRAYPE - fi -fi - -if [ ! -z "$SPACK_COMP_MODULE" ]; then - module load $SPACK_COMP_MODULE -fi - # # Figure out the type of compiler, the language, and the mode so that # the compiler script knows what to do. diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 3a0a88b5e3..e38ef949d7 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -259,8 +259,8 @@ class NoCompilersError(spack.error.SpackError): class NoCompilerForSpecError(spack.error.SpackError): def __init__(self, compiler_spec, target): - super(NoCompilerForSpecError, self).__init__("No compilers for target %s satisfy spec %s", - compiler_spec, target) + super(NoCompilerForSpecError, self).__init__("No compilers for target %s satisfy spec %s" % ( + target, compiler_spec)) class CompilerSpecInsufficientlySpecificError(spack.error.SpackError): def __init__(self, compiler_spec): diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 43637ed468..b8057cd46c 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -220,14 +220,14 @@ class DefaultConcretizer(object): if isinstance(spec.target,spack.architecture.Target): return False else: - spec.add_target_from_string(spec, spec.target) + spec.add_target_from_string(spec.target) return True #changed if spec.root.target: if isinstance(spec.root.target,spack.architecture.Target): spec.target = spec.root.target else: - spec.add_target_from_string(spec, spec.root.target) + spec.add_target_from_string(spec.root.target) else: platform = spack.architecture.sys_type() spec.target = platform.target('default') -- cgit v1.2.3-70-g09d2 From 9615efd940c425b049a142f8c22545c9a04124df Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 8 Jan 2016 18:53:19 -0800 Subject: cleanup: Removing an unnecessary line in an otherwise unchanged file --- lib/spack/env/cc | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 1704ae3280..fa85bb595e 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -70,7 +70,6 @@ for param in $parameters; do fi done - # # Figure out the type of compiler, the language, and the mode so that # the compiler script knows what to do. -- cgit v1.2.3-70-g09d2 From aab1a67d056bf9f0979f2cebfff607d05ac8b7e9 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 9 Jan 2016 09:42:36 -0800 Subject: Adding needed import modules. Changed platform_name to platform to prevent syntax errors --- lib/spack/spack/spec.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 8f90cc0d7f..264e0c0506 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -91,6 +91,7 @@ specs to avoid ambiguity. Both are provided because ~ can cause shell expansion when it is the first character in an id typed on the command line. """ import sys +import imp import itertools import hashlib import base64 @@ -100,6 +101,7 @@ from external import yaml from external.yaml.error import MarkedYAMLError import llnl.util.tty as tty +from llnl.util.filesystem import join_path from llnl.util.lang import * from llnl.util.tty.color import * @@ -109,6 +111,7 @@ import spack.error import spack.compilers as compilers from spack.version import * +from spack.util.naming import mod_to_class from spack.util.string import * from spack.util.prefix import Prefix from spack.virtual import ProviderIndex @@ -1246,9 +1249,9 @@ class Spec(object): if platform != '': # Find the class for the platform name given - file_path = join_path(spack.platform_path, platform_name) + file_path = join_path(spack.platform_path, platform) platform_mod = imp.load_source('spack.platforms', file_path + '.py') - cls = getattr(platform_mod, mod_to_class(platform_name)) + cls = getattr(platform_mod, mod_to_class(platform)) platform = cls() else: platform = spack.architecture.sys_type() -- cgit v1.2.3-70-g09d2 From 2ac5ea42af0d0a09fcc47e9e9035c267c7e3019b Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Mon, 11 Jan 2016 13:55:11 -0800 Subject: Fixed concretization --- lib/spack/spack/concretize.py | 2 ++ lib/spack/spack/spec.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index fb8dfb3ee4..801d3f162a 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -183,6 +183,8 @@ class DefaultConcretizer(object): """ ret = False for flag in Compiler.valid_compiler_flags(): + if flag in spec.compiler_flags: + continue try: nearest = next(p for p in spec.traverse(direction='parents') if ((p.compiler == spec.compiler and p is not spec) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 72117e1cb3..406bb6aa43 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1745,7 +1745,7 @@ class Spec(object): showid = kwargs.pop('ids', False) cover = kwargs.pop('cover', 'nodes') indent = kwargs.pop('indent', 0) - fmt = kwargs.pop('format', '$_$@$%@$+$+arch=') + fmt = kwargs.pop('format', '$_$@$%@+$+$=') prefix = kwargs.pop('prefix', None) check_kwargs(kwargs, self.tree) -- cgit v1.2.3-70-g09d2 From 528f9cd5830f6c825f6d309d369268b0211923ba Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 12 Jan 2016 15:22:15 -0800 Subject: Implemented flags as lists for subsetting --- lib/spack/env/cc | 39 ++++++++++++++++++++++++++---------- lib/spack/spack/build_environment.py | 2 +- lib/spack/spack/concretize.py | 37 +++++++++++++++++++++++++++------- lib/spack/spack/spec.py | 38 ++++++++++++----------------------- 4 files changed, 72 insertions(+), 44 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index b15c7b429b..846bfd0ff9 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -91,41 +91,53 @@ case "$command" in cc|gcc|c89|c99|clang|xlc) command=("$SPACK_CC") if [ "$SPACK_CFLAGS" ]; then - command+=("$SPACK_CFLAGS") + for flag in ${SPACK_CFLAGS[@]}; do + command+=("$flag"); + done fi language="C" ;; c++|CC|g++|clang++|xlC) command=("$SPACK_CXX") if [ "$SPACK_CXXFLAGS" ]; then - command+=("$SPACK_CXXFLAGS") + for flag in ${SPACK_CXXFLAGS[@]}; do + command+=("$flag"); + done fi language="C++" ;; f77|xlf) command=("$SPACK_F77") if [ "$SPACK_FFLAGS" ]; then - command+=("$SPACK_FFLAGS") + for flag in ${SPACK_FFLAGS[@]}; do + command+=("$flag"); + done fi language="Fortran 77" ;; fc|f90|f95|xlf90) command="$SPACK_FC" if [ "$SPACK_FFLAGS" ]; then - command+=("$SPACK_FFLAGS") + for flag in ${SPACK_FFLAGS[@]}; do + command+=("$flag"); + done fi language="Fortran 90" ;; cpp) mode=cpp if [ "$SPACK_CPPFLAGS" ]; then - command+=("$SPACK_CPPFLAGS") + for flag in ${SPACK_CPPFLAGS[@]}; do + command+=("$flag"); + done fi ;; ld) mode=ld if [ "$SPACK_LDFLAGS" ]; then - command+=("$SPACK_LDFLAGS") + for flag in ${SPACK_LDFLAGS[@]}; do + command+=("$flag"); + done fi ;; *) @@ -137,7 +149,9 @@ esac if [ -z "$mode" ]; then mode=ccld if [ "$SPACK_LDFLAGS" ]; then - command+=("$SPACK_LDFLAGS") + for flag in ${SPACK_LDFLAGS[@]}; do + command+=("$flag"); + done fi for arg in "$@"; do if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then @@ -340,7 +354,6 @@ done export PATH full_command=("${command[@]}") -#full_command+=("$SPACK_CFLAGS") full_command+=("${args[@]}") # @@ -353,7 +366,11 @@ if [ "$SPACK_DEBUG" = "TRUE" ]; then echo "$mode ${full_command[@]}" >> $output_log fi -echo "---------------------------" > /g/g0/becker33/cflag_test -echo "${full_command[@]}" >> /g/g0/becker33/cflag_test -echo "---------------------------" >> /g/g0/becker33/cflag_test +#echo "---------------------------" +#echo "---------------------------" +#echo "---------------------------" +#echo "${full_command[@]}" +#echo "---------------------------" +#echo "---------------------------" +#echo "---------------------------" exec "${full_command[@]}" diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 43824d7388..2a5ecde19f 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -108,7 +108,7 @@ def set_compiler_environment_variables(pkg): for flag in Compiler.valid_compiler_flags(): # Concreteness guarantees key safety here if flags[flag] != '': - os.environ['SPACK_'+flag.upper()] = flags[flag] + os.environ['SPACK_'+flag.upper()] = ' '.join(f for f in flags[flag]) os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 801d3f162a..6631a1afce 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -183,24 +183,47 @@ class DefaultConcretizer(object): """ ret = False for flag in Compiler.valid_compiler_flags(): - if flag in spec.compiler_flags: - continue +# if flag in spec.compiler_flags: +# continue try: nearest = next(p for p in spec.traverse(direction='parents') if ((p.compiler == spec.compiler and p is not spec) and flag in p.compiler_flags)) if ((not flag in spec.compiler_flags) or - spec.compiler_flags[flag] != nearest.compiler_flags[flag]): - spec.compiler_flags[flag] = nearest.compiler_flags[flag] + sorted(spec.compiler_flags[flag]) != sorted(nearest.compiler_flags[flag])): + if flag in spec.compiler_flags: + spec.compiler_flags[flag] = list(set(spec.compiler_flags[flag]) | + set(nearest.compiler_flags[flag])) + else: + spec.compielr_flags[flag] = nearest.compiler_flags[flag] ret = True except StopIteration: if (flag in spec.root.compiler_flags and ((not flag in spec.compiler_flags) or - spec.compiler_flags[flag] != spec.root.compiler_flags[flag])): - spec.compiler_flags[flag] = spec.root.compiler_flags[flag] + sorted(spec.compiler_flags[flag]) != sorted(spec.root.compiler_flags[flag]))): + if flag in spec.compiler_flags: + spec.compiler_flags[flag] = list(set(spec.compiler_flags[flag]) | + set(spec.root.compiler_flags[flag])) + else: + spec.compiler_flags[flag] = spec.root.compiler_flags[flag] ret = True else: - spec.compiler_flags[flag] = '' + if not flag in spec.compiler_flags: + spec.compiler_flags[flag] = [] + + # Include the compiler flag defaults from the config files + # This ensures that spack will detect conflicts that stem from a change + # in default compiler flags. + compiler = spack.compilers.compiler_for_spec(spec.compiler) + for flag in compiler.flags: + if flag not in spec.compiler_flags or spec.compiler_flags[flag] == []: + spec.compiler_flags[flag] = compiler.flags[flag] + ret = True + else: + if (sorted(spec.compiler_flags[flag]) != sorted(compiler.flags[flag])) and (not set(spec.compiler_flags[flag]) >= set(compiler.flags[flag])): + ret = True + spec.compiler_flags[flag] = list(set(spec.compiler_flags[flag]) | + set(compiler.flags[flag])) return ret diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 406bb6aa43..f7cdcc128f 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -381,11 +381,11 @@ class FlagMap(HashableMap): def satisfies(self, other, strict=False): #"strict" makes no sense if this works, but it matches how we need it. Maybe if strict: - return all(k in self and self[k] == other[k] - for k in other if other[k] != "") + return all(f in self and set(self[f]) == set(other[f]) + for f in other if other[f] != []) else: - return all(k in self and self[k] == other[k] - for k in other) + return all(f in self and set(self[f]) >= set(other[f]) + for f in other) def constrain(self, other): @@ -396,13 +396,11 @@ class FlagMap(HashableMap): changed = False # Others_set removes flags set to '' from the comparison - others_set = (k for k in other if other[k] != '') + others_set = (k for k in other if other[k] != []) for k in others_set: - if k in self and self[k] != '': - if self[k] != other[k]: - # This will not recognize incompatible flags, merely concatenates - self[k] += ' ' + other[k] - changed = True + if k in self and self[k] != other[k]: + self[k] = list(set(self[k]) | set(other[k])) + changed = True else: self[k] = other[k] changed = True @@ -422,13 +420,13 @@ class FlagMap(HashableMap): def _cmp_key(self): - return ''.join(str(key)+str(value) for key, value in sorted(self.items())) + return ''.join(str(key) + ' '.join(str(v) for v in value) for key, value in sorted(self.items())) def __str__(self): - sorted_keys = filter(lambda flag: self[flag] != "", sorted(self.keys())) + sorted_keys = filter(lambda flag: self[flag] != [], sorted(self.keys())) cond_symbol = '+' if len(sorted_keys)>0 else '' - return cond_symbol + '+'.join(str(key) + '=\"' + str(self[key]) + '\"' for key in sorted_keys) + return cond_symbol + '+'.join(str(key) + '=\"' + ' '.join(str(f) for f in self[key]) + '\"' for key in sorted_keys) class DependencyMap(HashableMap): @@ -516,7 +514,7 @@ class Spec(object): self._set_architecture(value) elif name in valid_flags: assert(self.compiler_flags is not None) - self.compiler_flags[name] = value + self.compiler_flags[name] = value.split() else: self._add_variant(self,name,value) @@ -816,6 +814,7 @@ class Spec(object): concretized, they're added to the presets, and ancestors will prefer the settings of their children. """ + if presets is None: presets = {} if visited is None: visited = set() @@ -929,16 +928,6 @@ class Spec(object): changed = any(changes) force=True - # Include the compiler flag defaults from the config files - # This ensures that spack will detect conflicts that stemp from a change - # in default compiler flags. - pkg = spack.db.get(self) - for flag in pkg.compiler.flags: - if self.compiler_flags[flag] == '': - self.compiler_flags[flag] += pkg.compiler.flags[flag] - else: - self.compiler_flags[flag] += ' ' + pkg.compiler.flags[flag] - self._concrete = True @@ -1907,7 +1896,6 @@ class SpecParser(spack.parse.Parser): self.token.value = self.token.value[1:-1] else: self.expect(ID) - print "about to add", option, "=", self.token.value spec._add_flag(option,self.token.value) else: spec._add_variant(self.variant(option),True) -- cgit v1.2.3-70-g09d2 From 5e3c883f2cb61b91dfb9bab3b436b07dd18f4a93 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 12 Jan 2016 16:25:54 -0800 Subject: Cleanup and proper flag satisfaction for partial specs --- lib/spack/spack/build_environment.py | 2 +- lib/spack/spack/compiler.py | 8 ++------ lib/spack/spack/compilers/__init__.py | 2 +- lib/spack/spack/spec.py | 18 +++++++++++++----- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 2a5ecde19f..f30a5b0702 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -105,7 +105,7 @@ def set_compiler_environment_variables(pkg): os.environ['SPACK_FC'] = compiler.fc # Add every valid compiler flag to the environment, prefaced by "SPACK_" - for flag in Compiler.valid_compiler_flags(): + for flag in spack.spec.FlagMap.valid_compiler_flags(): # Concreteness guarantees key safety here if flags[flag] != '': os.environ['SPACK_'+flag.upper()] = ' '.join(f for f in flags[flag]) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 3b2f57f60e..9041c6f759 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -63,10 +63,6 @@ def dumpversion(compiler_path): """Simple default dumpversion method -- this is what gcc does.""" return get_compiler_version(compiler_path, '-dumpversion') -_valid_compiler_flags = ['cflags', 'cxxflags', 'fflags', 'ldflags', 'cppflags'] -def valid_compiler_flags(): - return _valid_compiler_flags - class Compiler(object): """This class encapsulates a Spack "compiler", which includes C, @@ -118,10 +114,10 @@ class Compiler(object): # in the same order they are returned by sorted(flags) # in compilers/__init__.py self.flags = {} - for flag in _valid_compiler_flags: + for flag in spack.spec.FlagMap.valid_compiler_flags(): value = kwargs.get(flag, None) if value is not None: - self.flags[flag] = value + self.flags[flag] = value.split() self.spec = cspec diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 9d3d01b20d..895bf8bc95 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -191,7 +191,7 @@ def compilers_for_spec(compiler_spec): compiler_paths.append(None) flags = {} - for f in Comp.valid_compiler_flags(): + for f in spack.spec.FlagMap.valid_compiler_flags(): if f in items: flags[f] = items[f] return cls(cspec, *compiler_paths, **flags) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index f7cdcc128f..4a589d4cdf 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -372,6 +372,7 @@ class VariantMap(HashableMap): return ''.join(str(self[key]) for key in sorted_keys) +_valid_compiler_flags = ['cflags', 'cxxflags', 'fflags', 'ldflags', 'cppflags'] class FlagMap(HashableMap): def __init__(self, spec): super(FlagMap, self).__init__() @@ -384,8 +385,12 @@ class FlagMap(HashableMap): return all(f in self and set(self[f]) == set(other[f]) for f in other if other[f] != []) else: - return all(f in self and set(self[f]) >= set(other[f]) - for f in other) + if other.spec and other.spec.concrete: + return all(f in self and set(self[f]) == set(other[f]) + for f in other) + else: + return all(f in self and set(self[f]) >= set(other[f]) + for f in other) def constrain(self, other): @@ -406,10 +411,13 @@ class FlagMap(HashableMap): changed = True return changed + @staticmethod + def valid_compiler_flags(): + return _valid_compiler_flags @property def concrete(self): - return self.spec._concrete + return all(flag in self for flag in _valid_compiler_flags) def copy(self): @@ -509,7 +517,7 @@ class Spec(object): """Called by the parser to add a known flag. Known flags currently include "arch" """ - valid_flags = Compiler.valid_compiler_flags() + valid_flags = FlagMap.valid_compiler_flags() if name == 'arch': self._set_architecture(value) elif name in valid_flags: @@ -596,7 +604,7 @@ class Spec(object): and self.variants.concrete and self.architecture and self.compiler and self.compiler.concrete -# and self.compiler_flags.concrete + and self.compiler_flags.concrete and self.dependencies.concrete) return self._concrete -- cgit v1.2.3-70-g09d2 From 848728858cf4bf313af5935cf9f35b743bbfb62e Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 12 Jan 2016 18:34:26 -0800 Subject: Removed extra plus signs from command line syntax. Did not yet remove them from printed format --- lib/spack/spack/concretize.py | 2 +- lib/spack/spack/spec.py | 46 ++++++++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 6631a1afce..d2498ec64d 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -182,7 +182,7 @@ class DefaultConcretizer(object): Default specs set at the compiler level will still be added later. """ ret = False - for flag in Compiler.valid_compiler_flags(): + for flag in spack.spec.FlagMap.valid_compiler_flags(): # if flag in spec.compiler_flags: # continue try: diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 4a589d4cdf..4dfc315c90 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1801,7 +1801,7 @@ class SpecLexer(spack.parse.Lexer): class SpecParser(spack.parse.Parser): def __init__(self): super(SpecParser, self).__init__(SpecLexer()) - + self.previous = None def do_parse(self): specs = [] @@ -1809,13 +1809,23 @@ class SpecParser(spack.parse.Parser): try: while self.next: if self.accept(ID): - specs.append(self.spec(self.token.value)) - + self.previous = self.token + if self.accept(EQ): + if not specs: + specs.append(self.spec('')) + if self.accept(QT): + self.token.value = self.token.value[1:-1] + else: + self.expect(ID) + specs[-1]._add_flag(self.previous.value, self.token.value) + else: + specs.append(self.spec(self.previous.value)) elif self.accept(HASH): specs.append(self.spec_by_hash()) elif self.accept(DEP): if not specs: + self.previous = self.token specs.append(self.spec('')) if self.accept(HASH): specs[-1]._add_dependency(self.spec_by_hash()) @@ -1887,6 +1897,13 @@ class SpecParser(spack.parse.Parser): # unspecified or not. added_version = False + if self.previous.value == DEP: + if self.accept(HASH): + spec.add_dependency(self.spec_by_hash()) + else: + self.expect(ID) + spec.add_dependency(self.spec(self.token.value)) + while self.next: if self.accept(AT): vlist = self.version_list() @@ -1896,17 +1913,18 @@ class SpecParser(spack.parse.Parser): check_valid_token = False elif self.accept(ON): - self.expect(ID) - self.check_identifier() - option = self.token.value - if self.accept(EQ): - if self.accept(QT): - self.token.value = self.token.value[1:-1] - else: - self.expect(ID) - spec._add_flag(option,self.token.value) - else: - spec._add_variant(self.variant(option),True) +# self.expect(ID) +# self.check_identifier() +# option = self.token.value +# if self.accept(EQ): +# if self.accept(QT): +# self.token.value = self.token.value[1:-1] +# else: +# self.expect(ID) +# spec._add_flag(option,self.token.value) +# else: +# spec._add_variant(self.variant(option),True) + spec._add_variant(self.variatn(), True) check_valid_token = False elif self.accept(OFF): -- cgit v1.2.3-70-g09d2 From 342f4bc2e0b130f99334a7c83bfd8f449bbbd890 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 15 Jan 2016 14:27:50 -0800 Subject: Fixed virtual/cflag combination bug --- lib/spack/spack/concretize.py | 7 +++--- lib/spack/spack/spec.py | 34 ++++++++++++-------------- lib/spack/spack/test/multimethod.py | 10 ++++---- lib/spack/spack/test/spec_dag.py | 7 ++++-- lib/spack/spack/test/spec_semantics.py | 26 ++++++++++---------- lib/spack/spack/test/spec_yaml.py | 8 +++--- lib/spack/spack/virtual.py | 1 + var/spack/mock_packages/multimethod/package.py | 8 +++--- 8 files changed, 52 insertions(+), 49 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index d2498ec64d..484da97e90 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -195,7 +195,7 @@ class DefaultConcretizer(object): spec.compiler_flags[flag] = list(set(spec.compiler_flags[flag]) | set(nearest.compiler_flags[flag])) else: - spec.compielr_flags[flag] = nearest.compiler_flags[flag] + spec.compiler_flags[flag] = nearest.compiler_flags[flag] ret = True except StopIteration: @@ -216,9 +216,10 @@ class DefaultConcretizer(object): # in default compiler flags. compiler = spack.compilers.compiler_for_spec(spec.compiler) for flag in compiler.flags: - if flag not in spec.compiler_flags or spec.compiler_flags[flag] == []: + if flag not in spec.compiler_flags: spec.compiler_flags[flag] = compiler.flags[flag] - ret = True + if compiler.flags[flag] != []: + ret = True else: if (sorted(spec.compiler_flags[flag]) != sorted(compiler.flags[flag])) and (not set(spec.compiler_flags[flag]) >= set(compiler.flags[flag])): ret = True diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 4dfc315c90..e4bb50dd89 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -403,10 +403,10 @@ class FlagMap(HashableMap): # Others_set removes flags set to '' from the comparison others_set = (k for k in other if other[k] != []) for k in others_set: - if k in self and self[k] != other[k]: + if k in self and not set(self[k]) >= set(other[k]): self[k] = list(set(self[k]) | set(other[k])) changed = True - else: + elif k not in self: self[k] = other[k] changed = True return changed @@ -434,6 +434,7 @@ class FlagMap(HashableMap): def __str__(self): sorted_keys = filter(lambda flag: self[flag] != [], sorted(self.keys())) cond_symbol = '+' if len(sorted_keys)>0 else '' +# return '+' + '+'.join(str(key) + '=\"' + ' '.join(str(f) for f in self[key]) + '\"' for key in self) return cond_symbol + '+'.join(str(key) + '=\"' + ' '.join(str(f) for f in self[key]) + '\"' for key in sorted_keys) @@ -524,7 +525,7 @@ class Spec(object): assert(self.compiler_flags is not None) self.compiler_flags[name] = value.split() else: - self._add_variant(self,name,value) + self._add_variant(name,value) def _set_compiler(self, compiler): """Called by the parser to set the compiler.""" @@ -822,7 +823,6 @@ class Spec(object): concretized, they're added to the presets, and ancestors will prefer the settings of their children. """ - if presets is None: presets = {} if visited is None: visited = set() @@ -922,17 +922,18 @@ class Spec(object): while changed: #debugging code - a = self.normalize(force=force) +# print "pre-a" +# a = self.normalize(force=force) # print self, "normal" - b = self._expand_virtual_packages() +# b = self._expand_virtual_packages() # print self, "expanded" - c = self._concretize_helper() +# c = self._concretize_helper() # print self, "concrete-ish" - changes = (a,b,c) +# changes = (a,b,c) # print a, b, c -# changes = (self.normalize(force=force), -# self._expand_virtual_packages(), -# self._concretize_helper()) + changes = (self.normalize(force=force), + self._expand_virtual_packages(), + self._concretize_helper()) changed = any(changes) force=True @@ -1081,7 +1082,6 @@ class Spec(object): provider = self._find_provider(dep, provider_index) if provider: dep = provider - else: # if it's a real dependency, check whether it provides # something already required in the spec. @@ -1096,13 +1096,11 @@ class Spec(object): if required: raise UnsatisfiableProviderSpecError(required[0], dep) provider_index.update(dep) - # 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() changed = True - # Constrain package information with spec info try: changed |= spec_deps[dep.name].constrain(dep) @@ -1622,7 +1620,7 @@ class Spec(object): return colorize_spec(self) - def format(self, format_string='$_$@$%@$+$=', **kwargs): + def format(self, format_string='$_$@$%@+$+$=', **kwargs): """Prints out particular pieces of a spec, depending on what is in the format string. The format strings you can provide are:: @@ -1897,7 +1895,7 @@ class SpecParser(spack.parse.Parser): # unspecified or not. added_version = False - if self.previous.value == DEP: + if self.previous and self.previous.value == DEP: if self.accept(HASH): spec.add_dependency(self.spec_by_hash()) else: @@ -1924,7 +1922,7 @@ class SpecParser(spack.parse.Parser): # spec._add_flag(option,self.token.value) # else: # spec._add_variant(self.variant(option),True) - spec._add_variant(self.variatn(), True) + spec._add_variant(self.variant(), True) check_valid_token = False elif self.accept(OFF): @@ -2041,7 +2039,7 @@ def parse_anonymous_spec(spec_like, pkg_name): if anon_spec.name != pkg_name: raise SpecParseError(spack.parse.ParseError("","","anon spec created without proper name")) except SpecParseError: - anon_spec = Spec(pkg_name + spec_like) + anon_spec = Spec(pkg_name + ' ' + spec_like) if anon_spec.name != pkg_name: raise ValueError( "Invalid spec for package %s: %s" % (pkg_name, spec_like)) else: diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index ead3010512..4b09e7d2b4 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -92,19 +92,19 @@ class MultiMethodTest(MockPackagesTest): def test_architecture_match(self): - pkg = spack.db.get('multimethod+arch=x86_64') + pkg = spack.db.get('multimethod arch=x86_64') self.assertEqual(pkg.different_by_architecture(), 'x86_64') - pkg = spack.db.get('multimethod+arch=ppc64') + pkg = spack.db.get('multimethod arch=ppc64') self.assertEqual(pkg.different_by_architecture(), 'ppc64') - pkg = spack.db.get('multimethod+arch=ppc32') + pkg = spack.db.get('multimethod arch=ppc32') self.assertEqual(pkg.different_by_architecture(), 'ppc32') - pkg = spack.db.get('multimethod+arch=arm64') + pkg = spack.db.get('multimethod arch=arm64') self.assertEqual(pkg.different_by_architecture(), 'arm64') - pkg = spack.db.get('multimethod+arch=macos') + pkg = spack.db.get('multimethod arch=macos') self.assertRaises(NoSuchMethodError, pkg.different_by_architecture) diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index 91cd8cbe1e..c6714097ce 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -241,8 +241,11 @@ class SpecDagTest(MockPackagesTest): def test_unsatisfiable_architecture(self): - set_pkg_dep('mpileaks', 'mpich+arch=bgqos_0') - spec = Spec('mpileaks ^mpich+arch=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf') + set_pkg_dep('mpileaks', 'mpich arch=bgqos_0') + spec = Spec('mpileaks ^mpich arch=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf') + print spec + spec.normalize() + print spec self.assertRaises(spack.spec.UnsatisfiableArchitectureSpecError, spec.normalize) diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 5b2cebddef..e39bba252b 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -111,11 +111,11 @@ class SpecSematicsTest(MockPackagesTest): def test_satisfies_architecture(self): - self.check_satisfies('foo+arch=chaos_5_x86_64_ib', '+arch=chaos_5_x86_64_ib') - self.check_satisfies('foo+arch=bgqos_0', '+arch=bgqos_0') + self.check_satisfies('foo arch=chaos_5_x86_64_ib', ' arch=chaos_5_x86_64_ib') + self.check_satisfies('foo arch=bgqos_0', ' arch=bgqos_0') - self.check_unsatisfiable('foo+arch=bgqos_0', '+arch=chaos_5_x86_64_ib') - self.check_unsatisfiable('foo+arch=chaos_5_x86_64_ib', '+arch=bgqos_0') + self.check_unsatisfiable('foo arch=bgqos_0', ' arch=chaos_5_x86_64_ib') + self.check_unsatisfiable('foo arch=chaos_5_x86_64_ib', ' arch=bgqos_0') def test_satisfies_dependencies(self): @@ -267,13 +267,13 @@ class SpecSematicsTest(MockPackagesTest): def test_constrain_arch(self): - self.check_constrain('libelf+arch=bgqos_0', 'libelf+arch=bgqos_0', 'libelf+arch=bgqos_0') - self.check_constrain('libelf+arch=bgqos_0', 'libelf', 'libelf+arch=bgqos_0') + self.check_constrain('libelf arch=bgqos_0', 'libelf arch=bgqos_0', 'libelf arch=bgqos_0') + self.check_constrain('libelf arch=bgqos_0', 'libelf', 'libelf arch=bgqos_0') def test_constrain_compiler(self): - self.check_constrain('libelf+arch=bgqos_0', 'libelf+arch=bgqos_0', 'libelf+arch=bgqos_0') - self.check_constrain('libelf+arch=bgqos_0', 'libelf', 'libelf+arch=bgqos_0') + self.check_constrain('libelf arch=bgqos_0', 'libelf arch=bgqos_0', 'libelf arch=bgqos_0') + self.check_constrain('libelf arch=bgqos_0', 'libelf', 'libelf arch=bgqos_0') def test_invalid_constraint(self): @@ -283,7 +283,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_invalid_constraint('libelf+debug', 'libelf~debug') self.check_invalid_constraint('libelf+debug~foo', 'libelf+debug+foo') - self.check_invalid_constraint('libelf+arch=bgqos_0', 'libelf+arch=x86_54') + self.check_invalid_constraint('libelf arch=bgqos_0', 'libelf arch=x86_54') def test_constrain_changed(self): @@ -293,7 +293,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf%gcc', '%gcc@4.5') self.check_constrain_changed('libelf', '+debug') self.check_constrain_changed('libelf', '~debug') - self.check_constrain_changed('libelf', '+arch=bgqos_0') + self.check_constrain_changed('libelf', ' arch=bgqos_0') def test_constrain_not_changed(self): @@ -304,7 +304,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf%gcc@4.5', '%gcc@4.5') self.check_constrain_not_changed('libelf+debug', '+debug') self.check_constrain_not_changed('libelf~debug', '~debug') - self.check_constrain_not_changed('libelf+arch=bgqos_0', '+arch=bgqos_0') + self.check_constrain_not_changed('libelf arch=bgqos_0', ' arch=bgqos_0') self.check_constrain_not_changed('libelf^foo', 'libelf^foo') self.check_constrain_not_changed('libelf^foo^bar', 'libelf^foo^bar') @@ -316,7 +316,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf^foo%gcc', 'libelf^foo%gcc@4.5') self.check_constrain_changed('libelf^foo', 'libelf^foo+debug') self.check_constrain_changed('libelf^foo', 'libelf^foo~debug') - self.check_constrain_changed('libelf^foo', 'libelf^foo+arch=bgqos_0') + self.check_constrain_changed('libelf^foo', 'libelf^foo arch=bgqos_0') def test_constrain_dependency_not_changed(self): @@ -326,5 +326,5 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf^foo%gcc@4.5', 'libelf^foo%gcc@4.5') self.check_constrain_not_changed('libelf^foo+debug', 'libelf^foo+debug') self.check_constrain_not_changed('libelf^foo~debug', 'libelf^foo~debug') - self.check_constrain_not_changed('libelf^foo+arch=bgqos_0', 'libelf^foo+arch=bgqos_0') + self.check_constrain_not_changed('libelf^foo arch=bgqos_0', 'libelf^foo arch=bgqos_0') diff --git a/lib/spack/spack/test/spec_yaml.py b/lib/spack/spack/test/spec_yaml.py index 869befc02a..79ebeafeb8 100644 --- a/lib/spack/spack/test/spec_yaml.py +++ b/lib/spack/spack/test/spec_yaml.py @@ -38,18 +38,18 @@ class SpecDagTest(MockPackagesTest): self.assertTrue(spec.eq_dag(spec_from_yaml)) - def test_simple_spec(self): + def _test_simple_spec(self): spec = Spec('mpileaks') self.check_yaml_round_trip(spec) - def test_normal_spec(self): + def _test_normal_spec(self): spec = Spec('mpileaks+debug~opt') spec.normalize() self.check_yaml_round_trip(spec) - def test_ambiguous_version_spec(self): + def _test_ambiguous_version_spec(self): spec = Spec('mpileaks@1.0:5.0,6.1,7.3+debug~opt') spec.normalize() self.check_yaml_round_trip(spec) @@ -61,7 +61,7 @@ class SpecDagTest(MockPackagesTest): self.check_yaml_round_trip(spec) - def test_yaml_subdag(self): + def _test_yaml_subdag(self): spec = Spec('mpileaks^mpich+debug') spec.concretize() diff --git a/lib/spack/spack/virtual.py b/lib/spack/spack/virtual.py index 8e51b87acd..2241e5a1cd 100644 --- a/lib/spack/spack/virtual.py +++ b/lib/spack/spack/virtual.py @@ -75,6 +75,7 @@ class ProviderIndex(object): pkg = spec.package for provided_spec, provider_spec in pkg.provided.iteritems(): + provider_spec.compiler_flags = spec.compiler_flags.copy()#We want satisfaction other than flags if provider_spec.satisfies(spec, deps=False): provided_name = provided_spec.name diff --git a/var/spack/mock_packages/multimethod/package.py b/var/spack/mock_packages/multimethod/package.py index dc8dfc9cfb..bc3e3d78a4 100644 --- a/var/spack/mock_packages/multimethod/package.py +++ b/var/spack/mock_packages/multimethod/package.py @@ -103,19 +103,19 @@ class Multimethod(Package): # # Make sure we can switch methods on different architectures # - @when('+arch=x86_64') + @when('arch=x86_64') def different_by_architecture(self): return 'x86_64' - @when('+arch=ppc64') + @when('arch=ppc64') def different_by_architecture(self): return 'ppc64' - @when('+arch=ppc32') + @when('arch=ppc32') def different_by_architecture(self): return 'ppc32' - @when('+arch=arm64') + @when('arch=arm64') def different_by_architecture(self): return 'arm64' -- cgit v1.2.3-70-g09d2 From 16e9d658d517d944622d430a4e234f622537a637 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 15 Jan 2016 16:18:40 -0800 Subject: Fixed the way flags on deps are attached so that they aren't moved onto the root before normalize/concretize --- lib/spack/spack/spec.py | 24 +++++++++++++----------- lib/spack/spack/test/spec_dag.py | 7 +++---- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index e4bb50dd89..4a5e14bd85 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1806,6 +1806,8 @@ class SpecParser(spack.parse.Parser): try: while self.next: + if self.previous: + specs.append(self.previous.value) if self.accept(ID): self.previous = self.token if self.accept(EQ): @@ -1818,6 +1820,7 @@ class SpecParser(spack.parse.Parser): specs[-1]._add_flag(self.previous.value, self.token.value) else: specs.append(self.spec(self.previous.value)) + self.previous = None elif self.accept(HASH): specs.append(self.spec_by_hash()) @@ -1825,6 +1828,7 @@ class SpecParser(spack.parse.Parser): if not specs: self.previous = self.token specs.append(self.spec('')) + self.previous = None if self.accept(HASH): specs[-1]._add_dependency(self.spec_by_hash()) else: @@ -1911,17 +1915,6 @@ class SpecParser(spack.parse.Parser): check_valid_token = False elif self.accept(ON): -# self.expect(ID) -# self.check_identifier() -# option = self.token.value -# if self.accept(EQ): -# if self.accept(QT): -# self.token.value = self.token.value[1:-1] -# else: -# self.expect(ID) -# spec._add_flag(option,self.token.value) -# else: -# spec._add_variant(self.variant(option),True) spec._add_variant(self.variant(), True) check_valid_token = False @@ -1933,6 +1926,15 @@ class SpecParser(spack.parse.Parser): spec._set_compiler(self.compiler()) check_valid_token = False + elif self.accept(ID): + self.previous = self.token + if self.accept(EQ): + self.expect(ID) + spec._add_flag(self.previous.value, self.token.value) + self.previous = None + else: + return spec + else: if check_valid_token: self.unexpected_token() diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index c6714097ce..9576c362b8 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -243,9 +243,6 @@ class SpecDagTest(MockPackagesTest): def test_unsatisfiable_architecture(self): set_pkg_dep('mpileaks', 'mpich arch=bgqos_0') spec = Spec('mpileaks ^mpich arch=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf') - print spec - spec.normalize() - print spec self.assertRaises(spack.spec.UnsatisfiableArchitectureSpecError, spec.normalize) @@ -339,7 +336,7 @@ class SpecDagTest(MockPackagesTest): self.assertEqual(lhs, rhs) self.assertEqual(str(lhs), str(rhs)) - # Test that equal and equal_dag are doing the right thing + # test that equal and equal_dag are doing the right thing self.assertEqual(spec, expected_flat) self.assertTrue(spec.eq_dag(expected_flat)) @@ -440,3 +437,5 @@ 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)) + +# LocalWords: libdwarf -- cgit v1.2.3-70-g09d2 From e1a0af87453c4f80864b3f415df79bbe00fe3759 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 15 Jan 2016 16:51:41 -0800 Subject: cleanup --- lib/spack/spack/cmd/__init__.py | 1 - lib/spack/spack/multimethod.py | 1 - lib/spack/spack/package.py | 2 -- lib/spack/spack/test/spec_yaml.py | 8 ++++---- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py index eda8ac8620..6ce6fa0960 100644 --- a/lib/spack/spack/cmd/__init__.py +++ b/lib/spack/spack/cmd/__init__.py @@ -88,7 +88,6 @@ def parse_specs(args, **kwargs): if isinstance(args, (python_list, tuple)): args = " ".join(args) - try: specs = spack.spec.parse(args) for spec in specs: diff --git a/lib/spack/spack/multimethod.py b/lib/spack/spack/multimethod.py index a19a06826f..892619c6ac 100644 --- a/lib/spack/spack/multimethod.py +++ b/lib/spack/spack/multimethod.py @@ -196,7 +196,6 @@ class when(object): class when(object): def __init__(self, spec): pkg = get_calling_module_name() -# self.spec = spack.spec.Spec(spec) self.spec = parse_anonymous_spec(spec, pkg) def __call__(self, method): diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 2d5962773f..c631a35bf3 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -352,7 +352,6 @@ class Package(object): # Fix up self.url if this package fetches with a URLFetchStrategy. # This makes self.url behave sanely. if self.spec.versions.concrete: - # TODO: this is a really roundabout way of determining the type # TODO: of fetch to do. figure out a more sane fetch strategy/package # TODO: init order (right now it's conflated with stage, package, and @@ -588,7 +587,6 @@ class Package(object): @property def prefix(self): """Get the prefix into which this package should be installed.""" -# print self.spec, self.spec.prefix return self.spec.prefix diff --git a/lib/spack/spack/test/spec_yaml.py b/lib/spack/spack/test/spec_yaml.py index 79ebeafeb8..869befc02a 100644 --- a/lib/spack/spack/test/spec_yaml.py +++ b/lib/spack/spack/test/spec_yaml.py @@ -38,18 +38,18 @@ class SpecDagTest(MockPackagesTest): self.assertTrue(spec.eq_dag(spec_from_yaml)) - def _test_simple_spec(self): + def test_simple_spec(self): spec = Spec('mpileaks') self.check_yaml_round_trip(spec) - def _test_normal_spec(self): + def test_normal_spec(self): spec = Spec('mpileaks+debug~opt') spec.normalize() self.check_yaml_round_trip(spec) - def _test_ambiguous_version_spec(self): + def test_ambiguous_version_spec(self): spec = Spec('mpileaks@1.0:5.0,6.1,7.3+debug~opt') spec.normalize() self.check_yaml_round_trip(spec) @@ -61,7 +61,7 @@ class SpecDagTest(MockPackagesTest): self.check_yaml_round_trip(spec) - def _test_yaml_subdag(self): + def test_yaml_subdag(self): spec = Spec('mpileaks^mpich+debug') spec.concretize() -- cgit v1.2.3-70-g09d2 From 8e54babf104985a8db0df3fbb2f3d0f134342571 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 15 Jan 2016 17:21:32 -0800 Subject: minor parsing bug fix --- lib/spack/spack/spec.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 4a5e14bd85..db5282f40b 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1929,7 +1929,10 @@ class SpecParser(spack.parse.Parser): elif self.accept(ID): self.previous = self.token if self.accept(EQ): - self.expect(ID) + if self.accept(QT): + self.token.value = self.token.value[1:-1] + else: + self.expect(ID) spec._add_flag(self.previous.value, self.token.value) self.previous = None else: -- cgit v1.2.3-70-g09d2 From 981cefe8d3f4f73461789713726a9658498a5f14 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Jan 2016 10:54:12 -0500 Subject: Make Boost build with MPI on OS X Boost does not build on OS X with either gold or binutils. The gold linker does not exist on Darwin, and binutils on Darwin provides an assembler that doesn't work for Boost. - Introduce a variant that specifies whether to build with binutils, defaulting to true for backward compatibility - Auto-detect whether we build on Darwin; in this case, set the gold and binutils variant defaults to false - Clean up configure flags for as and ld --- var/spack/packages/boost/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py index 3427b74ad6..894af9edd1 100644 --- a/var/spack/packages/boost/package.py +++ b/var/spack/packages/boost/package.py @@ -1,5 +1,8 @@ from spack import * +import os +import sys + class Boost(Package): """Boost provides free peer-reviewed portable C++ source libraries, emphasizing libraries that work well with the C++ @@ -127,6 +130,16 @@ class Boost(Package): '--layout=tagged']) def install(self, spec, prefix): + # On Darwin, Boost expects the Darwin libtool. However, one of the + # dependencies may have pulled in Spack's GNU libtool, and these two are + # not compatible. We thus create a symlink to Darwin's libtool and add + # it at the beginning of PATH. + if sys.platform == 'darwin': + newdir = os.path.abspath('darwin-libtool') + mkdirp(newdir) + force_symlink('/usr/bin/libtool', join_path(newdir, 'libtool')) + env['PATH'] = newdir + ':' + env['PATH'] + # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = './' -- cgit v1.2.3-70-g09d2 From f3d62f1d3b2d53e88bcea8e6ea8b1c5abe5018b1 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 19 Jan 2016 18:29:39 +0100 Subject: code checking : added pep8 and coveralls --- .coveragerc | 27 +++++++++++++++++++++++++++ .gitignore | 2 ++ .travis.yml | 19 +++++++++++++++---- 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000000..37410a3677 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,27 @@ +# .coveragerc to control coverage.py +[run] +branch = True + +[report] +# Regexes for lines to exclude from consideration +exclude_lines = + # Have to re-enable the standard pragma + pragma: no cover + + # Don't complain about missing debug-only code: + def __repr__ + if self\.debug + + # Don't complain if tests don't hit defensive assertion code: + raise AssertionError + raise NotImplementedError + + # Don't complain if non-runnable code isn't run: + if 0: + if False: + if __name__ == .__main__.: + +ignore_errors = True + +[html] +directory = htmlcov diff --git a/.gitignore b/.gitignore index 4b97de5d50..643e5d9b03 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ /share/spack/dotkit /share/spack/modules /TAGS +/htmlcov +.coverage diff --git a/.travis.yml b/.travis.yml index ab379be486..4207f8d08b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,21 +6,32 @@ python: # Use new Travis infrastructure (Docker can't sudo yet) sudo: false -# No need to install any deps. -install: true +# Install coveralls to obtain code coverage +install: + - "pip install coveralls" + - "pip install pep8" before_install: # Need this for the git tests to succeed. - git config --global user.email "spack@example.com" - git config --global user.name "Test User" + # Need this to be able to compute the list of changed files + - git fetch origin develop:develop script: - . share/spack/setup-env.sh - - spack test + # Run unit tests with code coverage + - coverage run --source=lib --omit=lib/spack/spack/test/*,lib/spack/env/*,lib/spack/docs/* bin/spack test + # Checks if the file that have been changed are pep8 conformant + - CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py/g'` + - if [[ ${CHANGED_PYTHON_FILES} ]] ; then pep8 --max-line-length=120 ${CHANGED_PYTHON_FILES} ; fi + +after_success: + - coveralls notifications: email: recipients: - - tgamblin@llnl.gov + - massimiliano.culpo@gmail.com on_success: change on_failure: always -- cgit v1.2.3-70-g09d2 From ae7c999712167ed68a6e1a45c0f8f8dfc9fb5b17 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 19 Jan 2016 18:55:18 +0100 Subject: code checking : added flake8 --- .travis.yml | 3 +++ flake8.ini | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 flake8.ini diff --git a/.travis.yml b/.travis.yml index 4207f8d08b..2d9bbabe10 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ sudo: false install: - "pip install coveralls" - "pip install pep8" + - "pip install flake8" before_install: # Need this for the git tests to succeed. @@ -25,6 +26,8 @@ script: # Checks if the file that have been changed are pep8 conformant - CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py/g'` - if [[ ${CHANGED_PYTHON_FILES} ]] ; then pep8 --max-line-length=120 ${CHANGED_PYTHON_FILES} ; fi + - if [[ ${CHANGED_PYTHON_FILES} ]] ; then flake8 --format pylint --config flake8.ini ${CHANGED_PYTHON_FILES} ; fi + after_success: - coveralls diff --git a/flake8.ini b/flake8.ini new file mode 100644 index 0000000000..757c71705e --- /dev/null +++ b/flake8.ini @@ -0,0 +1,3 @@ +[flake8] +ignore = W391,F403 +max-line-length = 120 \ No newline at end of file -- cgit v1.2.3-70-g09d2 From f092e69d12fa98d60989d6b827aacfe95cc297aa Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 19 Jan 2016 19:10:40 +0100 Subject: yapf : added style file for convenience --- .style.yapf | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .style.yapf diff --git a/.style.yapf b/.style.yapf new file mode 100644 index 0000000000..b4a1f688b8 --- /dev/null +++ b/.style.yapf @@ -0,0 +1,3 @@ +[style] +based_on_style = pep8 +column_limit = 120 \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 00185a39d9fe0155016e36c47b951f908bb7919f Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 19 Jan 2016 19:28:38 +0100 Subject: reverted email notification --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2d9bbabe10..f935062b02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,6 @@ after_success: notifications: email: recipients: - - massimiliano.culpo@gmail.com + - tgamblin@llnl.gov on_success: change on_failure: always -- cgit v1.2.3-70-g09d2 From 15713219e57a97048f4e3b085f9c75e188a67787 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 20 Jan 2016 10:32:56 -0800 Subject: Better regular expression searching. Tested on edison was finding test compilers and then spack was giving multiple compiler match errors --- lib/spack/spack/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 225c65917a..1a5be3c3fe 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -283,7 +283,7 @@ class Compiler(object): modulecmd = which('modulecmd') modulecmd.add_default_arg('python') output = modulecmd('avail', cls.PrgEnv_compiler, return_oe=True) - matches = re.findall(r'(%s)/(\d+[\.\d]+)' % cls.PrgEnv_compiler, output) + matches = re.findall(r'(%s)/([\d\.]+[\d$])' % cls.PrgEnv_compiler, output) for name, version in matches: v = version -- cgit v1.2.3-70-g09d2 From 840b41c450267764d021456875dbe87af52c2176 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 20 Jan 2016 10:36:15 -0800 Subject: Removed unneccessary $. Still learning regexp --- lib/spack/spack/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 1a5be3c3fe..46f2dfaec7 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -283,7 +283,7 @@ class Compiler(object): modulecmd = which('modulecmd') modulecmd.add_default_arg('python') output = modulecmd('avail', cls.PrgEnv_compiler, return_oe=True) - matches = re.findall(r'(%s)/([\d\.]+[\d$])' % cls.PrgEnv_compiler, output) + matches = re.findall(r'(%s)/([\d\.]+[\d])' % cls.PrgEnv_compiler, output) for name, version in matches: v = version -- cgit v1.2.3-70-g09d2 From 4b22c2406c163c83998de8938b5fefa18886057e Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 5 Feb 2016 08:56:20 +0100 Subject: removed redundant references to pep8 --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f935062b02..082b747bc2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,6 @@ sudo: false # Install coveralls to obtain code coverage install: - "pip install coveralls" - - "pip install pep8" - "pip install flake8" before_install: @@ -23,9 +22,8 @@ script: - . share/spack/setup-env.sh # Run unit tests with code coverage - coverage run --source=lib --omit=lib/spack/spack/test/*,lib/spack/env/*,lib/spack/docs/* bin/spack test - # Checks if the file that have been changed are pep8 conformant + # Checks if the file that have been changed are flake8 conformant - CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py/g'` - - if [[ ${CHANGED_PYTHON_FILES} ]] ; then pep8 --max-line-length=120 ${CHANGED_PYTHON_FILES} ; fi - if [[ ${CHANGED_PYTHON_FILES} ]] ; then flake8 --format pylint --config flake8.ini ${CHANGED_PYTHON_FILES} ; fi -- cgit v1.2.3-70-g09d2 From 03585225338e2ccd61174800b42242c7f256f533 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 6 Feb 2016 15:41:22 -0800 Subject: new branch and also pushing some architecture changes where os is detected by linux and darwin and manually set by cray and bgq --- lib/spack/spack/architecture.py | 136 +++++++++++++++++++++++++--------------- 1 file changed, 84 insertions(+), 52 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 6b9ae33b3e..4f36a3fa92 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -39,20 +39,25 @@ from external import yaml class InvalidSysTypeError(serr.SpackError): def __init__(self, sys_type): - super(InvalidSysTypeError, self).__init__("Invalid sys_type value for Spack: " + sys_type) + super(InvalidSysTypeError, self).__init__( + "Invalid sys_type value for Spack: " + sys_type) class NoSysTypeError(serr.SpackError): def __init__(self): - super(NoSysTypeError, self).__init__("Could not determine sys_type for this machine.") + super(NoSysTypeError, self).__init__( + "Could not determine sys_type for this machine.") @key_ordering class Target(object): - """ Target is the processor of the host machine. The host machine may have different front-end - and back-end targets, especially if it is a Cray machine. The target will have a name and - also the module_name (e.g craype-compiler). Targets will also recognize which platform - they came from using the set_platform method. Targets will have compiler finding strategies + """ Target is the processor of the host machine. + The host machine may have different front-end + and back-end targets, especially if it is a Cray machine. + The target will have a name and module_name (e.g craype-compiler). + Targets will also recognize which platform + they came from using the set_platform method. + Targets will have compiler finding strategies """ def __init__(self, name, compiler_strategy, module_name=None): @@ -60,10 +65,13 @@ class Target(object): self.compiler_strategy = compiler_strategy self.module_name = module_name # craype-ivybridge - # Sets only the platform name to avoid recursiveness + # Sets only the platform name to avoid recursiveness def set_platform(self, platform): self.platform_name = platform.name + def set_operating_system(self, operating_sys): + self.platform_os = operating_sys + def to_dict(self): d = {} d['name'] = self.name @@ -71,6 +79,7 @@ class Target(object): d['module_name'] = self.module_name if self.platform_name: d['platform'] = self.platform_name + return d @staticmethod @@ -87,14 +96,16 @@ class Target(object): def _cmp_key(self): - return (self.name, self.compiler_strategy, self.module_name) + return (self.name, self.compiler_strategy, + self.module_name, self.platform_os) def __repr__(self): return self.__str__() def __str__(self): - if self.platform_name: - return self.platform_name + '-' + self.name + if self.platform_name and self.platform_os: + return (self.platform_name + '-' + + self.platform_os + '-' + self.name) return self.name @key_ordering @@ -105,26 +116,38 @@ class Platform(object): """ priority = None # Subclass needs to set this number. This controls order in which platform is detected. + front_end = None back_end = None default = None # The default back end target. On cray ivybridge + + front_os = None + back_os = None + default_os = None def __init__(self, name): self.targets = {} self.name = name def add_target(self, name, target): - """Used by the platform specific subclass to list available targets. Raises an error - if the platform specifies a name that is reserved by spack as an alias. + """Used by the platform specific subclass to list available targets. + Raises an error if the platform specifies a name + that is reserved by spack as an alias. """ if name in ['front_end', 'fe', 'back_end', 'be', 'default']: - raise ValueError("%s is a spack reserved alias and cannot be the name of a target" % name) + raise ValueError( + "%s is a spack reserved" \ + "alias and cannot be the name of a target" + % name) + + target.set_operating_system(self.platform_os()) target.set_platform(self) self.targets[name] = target def target(self, name): - """This is a getter method for the target dictionary that handles defaulting based - on the values provided by default, front-end, and back-end. This can be overwritten + """This is a getter method for the target dictionary that + handles defaulting based on the values provided by default, + front-end, and back-end. This can be overwritten by a subclass for which we want to provide further aliasing options. """ if name == 'default': @@ -135,6 +158,51 @@ class Platform(object): name = self.back_end return self.targets[name] + + def _detect_linux_os(self): + """ If it is one a linux machine use the python method platform.dist() + """ + os_name = py_platform.dist()[0] + version = py_platform.dist()[1] + a return os_name + version + + def _detect_mac_os(self): + """If it is on a mac machine then use the python method platform.mac_ver + """ + mac_releases = {'10.6' : 'snowleopard', '10.7' : 'lion', + '10.8' : 'mountainlion', '10.9' : 'mavericks', + '10.10' : 'yosemite', '10.11' : 'elcapitan'} + + mac_ver = py_platform.mac_ver() + try: + os_name = mac_releases[mac_ver] + mac_ver = Version(mac_ver) + + except KeyError: + os_name = 'mac_os' + + return os_name + + def set_os(self): + """ Set the OS according to the platform it is on. Darwin and Linux + will simply be an auto-detected linux distro or mac release. The + special cases will be for Cray and BGQ machines which have two + different OS for login and compute nodes. The client should provide + the name and major version of the operating system + """ + if self.name == 'darwin': + self.default_os = self._detect_mac_os() + else: + self.default_os = self._detect_linux_os() + + def platform_os(self, name=None): + """ Get the platform operating system from the platform """ + if name == 'front_os': + return self.front_os + elif name == 'back_os': + return self.back_os + else: + return self.default_os @classmethod def detect(self): @@ -144,6 +212,7 @@ class Platform(object): """ raise NotImplementedError() + def __repr__(self): return self.__str__() @@ -153,43 +222,6 @@ class Platform(object): def _cmp_key(self): return (self.name, (_cmp_key(t) for t in self.targets.values())) -def get_sys_type_from_spack_globals(): - """Return the SYS_TYPE from spack globals, or None if it isn't set.""" - if not hasattr(spack, "sys_type"): - return None - elif hasattr(spack.sys_type, "__call__"): - return spack.sys_type() #If in __init__.py there is a sys_type() then call that - else: - return spack.sys_type # Else use the attributed which defaults to None - - -# This is livermore dependent. Hard coded for livermore -#def get_sys_type_from_environment(): -# """Return $SYS_TYPE or None if it's not defined.""" -# return os.environ.get('SYS_TYPE') - - -def get_mac_sys_type(): - """Return a Mac OS SYS_TYPE or None if this isn't a mac. - Front-end config - """ - mac_ver = py_platform.mac_ver()[0] - if not mac_ver: - return None - return "macosx_%s_%s" % (Version(mac_ver).up_to(2), py_platform.machine()) - - -def get_sys_type_from_uname(): - """ Returns a sys_type from the uname argument - Front-end config - """ - try: - platform_proc = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE) - platform, _ = platform_proc.communicate() - return platform.strip() - except: - return None - @memoized def all_platforms(): modules = [] -- cgit v1.2.3-70-g09d2 From 21a5a3404134c1676a7aa498ec201ed911e80029 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 10 Feb 2016 10:59:16 -0800 Subject: Revert "new branch and also pushing some architecture changes where os is detected by linux and darwin and manually set by cray and bgq" This reverts commit 70088be24b2ed34076f7f5292a2a465a8655a886. --- lib/spack/spack/architecture.py | 136 +++++++++++++++------------------------- 1 file changed, 52 insertions(+), 84 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 4f36a3fa92..6b9ae33b3e 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -39,25 +39,20 @@ from external import yaml class InvalidSysTypeError(serr.SpackError): def __init__(self, sys_type): - super(InvalidSysTypeError, self).__init__( - "Invalid sys_type value for Spack: " + sys_type) + super(InvalidSysTypeError, self).__init__("Invalid sys_type value for Spack: " + sys_type) class NoSysTypeError(serr.SpackError): def __init__(self): - super(NoSysTypeError, self).__init__( - "Could not determine sys_type for this machine.") + super(NoSysTypeError, self).__init__("Could not determine sys_type for this machine.") @key_ordering class Target(object): - """ Target is the processor of the host machine. - The host machine may have different front-end - and back-end targets, especially if it is a Cray machine. - The target will have a name and module_name (e.g craype-compiler). - Targets will also recognize which platform - they came from using the set_platform method. - Targets will have compiler finding strategies + """ Target is the processor of the host machine. The host machine may have different front-end + and back-end targets, especially if it is a Cray machine. The target will have a name and + also the module_name (e.g craype-compiler). Targets will also recognize which platform + they came from using the set_platform method. Targets will have compiler finding strategies """ def __init__(self, name, compiler_strategy, module_name=None): @@ -65,13 +60,10 @@ class Target(object): self.compiler_strategy = compiler_strategy self.module_name = module_name # craype-ivybridge - # Sets only the platform name to avoid recursiveness + # Sets only the platform name to avoid recursiveness def set_platform(self, platform): self.platform_name = platform.name - def set_operating_system(self, operating_sys): - self.platform_os = operating_sys - def to_dict(self): d = {} d['name'] = self.name @@ -79,7 +71,6 @@ class Target(object): d['module_name'] = self.module_name if self.platform_name: d['platform'] = self.platform_name - return d @staticmethod @@ -96,16 +87,14 @@ class Target(object): def _cmp_key(self): - return (self.name, self.compiler_strategy, - self.module_name, self.platform_os) + return (self.name, self.compiler_strategy, self.module_name) def __repr__(self): return self.__str__() def __str__(self): - if self.platform_name and self.platform_os: - return (self.platform_name + '-' + - self.platform_os + '-' + self.name) + if self.platform_name: + return self.platform_name + '-' + self.name return self.name @key_ordering @@ -116,38 +105,26 @@ class Platform(object): """ priority = None # Subclass needs to set this number. This controls order in which platform is detected. - front_end = None back_end = None default = None # The default back end target. On cray ivybridge - - front_os = None - back_os = None - default_os = None def __init__(self, name): self.targets = {} self.name = name def add_target(self, name, target): - """Used by the platform specific subclass to list available targets. - Raises an error if the platform specifies a name - that is reserved by spack as an alias. + """Used by the platform specific subclass to list available targets. Raises an error + if the platform specifies a name that is reserved by spack as an alias. """ if name in ['front_end', 'fe', 'back_end', 'be', 'default']: - raise ValueError( - "%s is a spack reserved" \ - "alias and cannot be the name of a target" - % name) - - target.set_operating_system(self.platform_os()) + raise ValueError("%s is a spack reserved alias and cannot be the name of a target" % name) target.set_platform(self) self.targets[name] = target def target(self, name): - """This is a getter method for the target dictionary that - handles defaulting based on the values provided by default, - front-end, and back-end. This can be overwritten + """This is a getter method for the target dictionary that handles defaulting based + on the values provided by default, front-end, and back-end. This can be overwritten by a subclass for which we want to provide further aliasing options. """ if name == 'default': @@ -158,51 +135,6 @@ class Platform(object): name = self.back_end return self.targets[name] - - def _detect_linux_os(self): - """ If it is one a linux machine use the python method platform.dist() - """ - os_name = py_platform.dist()[0] - version = py_platform.dist()[1] - a return os_name + version - - def _detect_mac_os(self): - """If it is on a mac machine then use the python method platform.mac_ver - """ - mac_releases = {'10.6' : 'snowleopard', '10.7' : 'lion', - '10.8' : 'mountainlion', '10.9' : 'mavericks', - '10.10' : 'yosemite', '10.11' : 'elcapitan'} - - mac_ver = py_platform.mac_ver() - try: - os_name = mac_releases[mac_ver] - mac_ver = Version(mac_ver) - - except KeyError: - os_name = 'mac_os' - - return os_name - - def set_os(self): - """ Set the OS according to the platform it is on. Darwin and Linux - will simply be an auto-detected linux distro or mac release. The - special cases will be for Cray and BGQ machines which have two - different OS for login and compute nodes. The client should provide - the name and major version of the operating system - """ - if self.name == 'darwin': - self.default_os = self._detect_mac_os() - else: - self.default_os = self._detect_linux_os() - - def platform_os(self, name=None): - """ Get the platform operating system from the platform """ - if name == 'front_os': - return self.front_os - elif name == 'back_os': - return self.back_os - else: - return self.default_os @classmethod def detect(self): @@ -212,7 +144,6 @@ class Platform(object): """ raise NotImplementedError() - def __repr__(self): return self.__str__() @@ -222,6 +153,43 @@ class Platform(object): def _cmp_key(self): return (self.name, (_cmp_key(t) for t in self.targets.values())) +def get_sys_type_from_spack_globals(): + """Return the SYS_TYPE from spack globals, or None if it isn't set.""" + if not hasattr(spack, "sys_type"): + return None + elif hasattr(spack.sys_type, "__call__"): + return spack.sys_type() #If in __init__.py there is a sys_type() then call that + else: + return spack.sys_type # Else use the attributed which defaults to None + + +# This is livermore dependent. Hard coded for livermore +#def get_sys_type_from_environment(): +# """Return $SYS_TYPE or None if it's not defined.""" +# return os.environ.get('SYS_TYPE') + + +def get_mac_sys_type(): + """Return a Mac OS SYS_TYPE or None if this isn't a mac. + Front-end config + """ + mac_ver = py_platform.mac_ver()[0] + if not mac_ver: + return None + return "macosx_%s_%s" % (Version(mac_ver).up_to(2), py_platform.machine()) + + +def get_sys_type_from_uname(): + """ Returns a sys_type from the uname argument + Front-end config + """ + try: + platform_proc = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE) + platform, _ = platform_proc.communicate() + return platform.strip() + except: + return None + @memoized def all_platforms(): modules = [] -- cgit v1.2.3-70-g09d2 From 2650c60374a0857679d52f98fc5f94b23c7d6660 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 10 Feb 2016 16:14:50 -0800 Subject: Added operating system class prototype and some autodetect features for operating system --- lib/spack/spack/architecture.py | 61 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 6b9ae33b3e..2914d36ba2 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -109,8 +109,13 @@ class Platform(object): back_end = None default = None # The default back end target. On cray ivybridge + front_os = None + back_os = None + default_os = None + def __init__(self, name): self.targets = {} + self.operating_sys = {} self.name = name def add_target(self, name, target): @@ -136,10 +141,49 @@ class Platform(object): return self.targets[name] + def _detect_linux_os(self): + return OperatingSystem(py_platform.dist()[0], py_platform.dist()[1]) + + def _detect_mac_os(self): + mac_releases = {'10.6': "snowleopard", + "10.7": "lion", + "10.8": "mountainlion", + "10.9": "mavericks", + "10.10": "yosemite", + "10.11": "elcapitan"} + mac_ver = py_platform.mac_ver()[:-2] + try: + os_name = mac_releases[mac_ver] + return OperatingSystem(os_name, mac_ver) + except KeyError: + os_name = "mac_os" + return OperatingSystem(os_name, mac_ver) + + def add_operating_system(self, name=None, operating_system=None): + if self.name == 'linux': + linux_os = self._detect_linux_os() + self.operating_sys[linux_os.name] = linux_os + elif self.name == 'darwin': + mac_os = self._detect_mac_os() + self.operating_sys[mac_os.name] = mac_os + else: + self.operating_sys[name] = operating_system + + def operating_system(self, name): + if name == 'default': + name = self.default_os + if name == 'front_os': + name = self.front_os + if name == 'back_os': + name = self.back_os + + return self.operating_sys[name] + @classmethod def detect(self): """ Subclass is responsible for implementing this method. - Returns True if the Platform class detects that it is the current platform + Returns True if the Platform class detects that + it is the current platform and False if it's not. """ raise NotImplementedError() @@ -153,6 +197,21 @@ class Platform(object): def _cmp_key(self): return (self.name, (_cmp_key(t) for t in self.targets.values())) + +class OperatingSystem(object): + """ The operating system will contain a name and version. It will + also represent itself simple with it's name + """ + def __init__(self, name, version): + self.name = name + self.version = version + + def __str__(self): + return self.name + + def __repr__(self): + return self.__str__() + def get_sys_type_from_spack_globals(): """Return the SYS_TYPE from spack globals, or None if it isn't set.""" if not hasattr(spack, "sys_type"): -- cgit v1.2.3-70-g09d2 From d0ae6dd40159c1e3b043db254f56c8b7ca22294c Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 10 Feb 2016 16:15:25 -0800 Subject: Changed add_target_from_string to include methods to concretize operating_system --- lib/spack/spack/spec.py | 64 ++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 264e0c0506..503f80e1e6 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -90,6 +90,7 @@ thing. Spack uses ~variant in directory names and in the canonical form of specs to avoid ambiguity. Both are provided because ~ can cause shell expansion when it is the first character in an id typed on the command line. """ +from collections import namedtuple import sys import imp import itertools @@ -459,7 +460,7 @@ class Spec(object): """Called by the parser to set the target.""" if self.target: raise DuplicateTargetError( "Spec for '%s' cannot have two targets." % self.name) - self.target = target + self.target = target # a string can be set def _add_dependency(self, spec): @@ -1231,7 +1232,7 @@ class Spec(object): return parse_anonymous_spec(spec_like, self.name) - def add_target_from_string(self, target): + def add_target_from_string(self, arch): """If only a target is provided, spack will assume the default architecture. A platform-target pair can be input delimited by a '-'. If either portion of a platform-target pair is empty, spack will supply a default, in the case of @@ -1240,31 +1241,28 @@ class Spec(object): bgq- -> default bgq target (back end/powerpc) cray-hawswell -> haswell target on cray platform """ - if target is None: + Arch = namedtuple("Arch", "arch_os target") + platform = spack.architecture.sys_type() + + if arch is None: return - if '-' in target: - platform, target = target.split('-') - else: - platform = '' - - if platform != '': - # Find the class for the platform name given - file_path = join_path(spack.platform_path, platform) - platform_mod = imp.load_source('spack.platforms', file_path + '.py') - cls = getattr(platform_mod, mod_to_class(platform)) - platform = cls() - else: - platform = spack.architecture.sys_type() - if target != '': - self.target = platform.target(target) - else: - self.target = platform.target('default') + if '-' in arch: + os_name, target = arch.split('-') + self.target = Arch(arch_os=platform.operating_system(os_name), + target = platform.target(target)) + elif arch in platform.targets: + self.target = Arch(arch_os=platform.operating_system('default'), + target=platform.target(target)) + else: + os_name = arch # Odd naming here, definitely need to change + self.target = Arch(arch_os=platform.operating_system(os_name), + target=platform.target('default')) def satisfies(self, other, deps=True, strict=False): - """Determine if this spec satisfies all constraints of another. + """determine if this spec satisfies all constraints of another. - There are two senses for satisfies: + there are two senses for satisfies: * `loose` (default): the absence of a constraint in self implies that it *could* be satisfied by other, so we only @@ -1276,32 +1274,32 @@ class Spec(object): """ other = self._autospec(other) - # A concrete provider can satisfy a virtual dependency. + # a concrete provider can satisfy a virtual dependency. if not self.virtual and other.virtual: pkg = spack.db.get(self.name) if pkg.provides(other.name): for provided, when_spec in pkg.provided.items(): - if self.satisfies(when_spec, deps=False, strict=strict): + if self.satisfies(when_spec, deps=false, strict=strict): if provided.satisfies(other): - return True - return False + return True + return False - # Otherwise, first thing we care about is whether the name matches + # otherwise, first thing we care about is whether the name matches if self.name != other.name: - return False + return False if self.versions and other.versions: if not self.versions.satisfies(other.versions, strict=strict): - return False + return False elif strict and (self.versions or other.versions): - return False + return False - # None indicates no constraints when not strict. + # none indicates no constraints when not strict. if self.compiler and other.compiler: if not self.compiler.satisfies(other.compiler, strict=strict): - return False + return False elif strict and (other.compiler and not self.compiler): - return False + return True if not self.variants.satisfies(other.variants, strict=strict): return False -- cgit v1.2.3-70-g09d2 From fb234205c210930112f7fcd2c7c360e0c950d042 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 10 Feb 2016 16:16:11 -0800 Subject: Added method to concretize target and os pair --- lib/spack/spack/concretize.py | 79 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 63 insertions(+), 16 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index b8057cd46c..d78c102d93 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -33,6 +33,7 @@ or user preferences. TODO: make this customizable and allow users to configure concretization policies. """ +import collections from llnl.util.filesystem import join_path import spack import spack.spec @@ -209,6 +210,22 @@ class DefaultConcretizer(object): return True # Things changed + def _concretize_operating_system(self, arch, platform): + """ Future method for concretizing operating system """ + if isinstance(arch.arch_os, OperatingSystem): + return False + else: + arch.arch_os = platform.operating_system('default') + return True + + + def _concretize_arch_target(self, arch, platform): + if isinstance(arch.target, spack.architecture.Target): + return False + else: + arch.target = platform.target('default') + return True + def concretize_target(self, spec): """If the spec already has an target and it is a an target type, return. Otherwise, if it has a target that is a string type, generate a @@ -216,23 +233,53 @@ class DefaultConcretizer(object): DAG has an target, then use that. Otherwise, take the system's default target. """ - if spec.target is not None: - if isinstance(spec.target,spack.architecture.Target): - return False - else: - spec.add_target_from_string(spec.target) - return True #changed - - if spec.root.target: - if isinstance(spec.root.target,spack.architecture.Target): - spec.target = spec.root.target - else: - spec.add_target_from_string(spec.root.target) + platform = spack.architecture.sys_type() + + if spec.target is None: + # Create an empty tuple + Arch = collections.namedtuple("Arch", "arch_os target") + spec.target = Arch(arch_os=platform.operating_system('default'), + target=platform.target('default')) + + return True + # If there is a target and it is a tuple and has both filled return + # False + if not isinstance(spec.target, basestring): + return any((self._concretize_operating_system(spec.target, platform), + self._concretize_arch_target(spec.target, plarform))) else: - platform = spack.architecture.sys_type() - spec.target = platform.target('default') - - return True #changed + spec.add_target_from_string(spec.target) + + if spec.root.target and \ + not isinstance(spec.root.target, basestring): + bool_flag = any( + (self._concretize_operating_system(spec.root.target, platform), + self._concretize_arch_target(spec.root.target, platform))) + spec.target =spec.root.target + return bool_flag + else: + spec.add_target_from_string(spec.root.target) + + + # if there is no target specified used the defaults + + #if spec.target is not None: + # if isinstance(spec.target,spack.architecture.Target): + # return False + # else: + # spec.add_target_from_string(spec.target) + # return True #changed + + #if spec.root.target: + # if isinstance(spec.root.target,spack.architecture.Target): + # spec.target = spec.root.target + # else: + # spec.add_target_from_string(spec.root.target) + #else: + # platform = spack.architecture.sys_type() + # spec.target = platform.target('default') + + #return True #changed def concretize_variants(self, spec): -- cgit v1.2.3-70-g09d2 From cb8d5ab1837cfddefa31bd09592ca4ac999692dc Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 10 Feb 2016 16:16:35 -0800 Subject: Added new add_os method --- lib/spack/spack/platforms/cray_xc.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index e3adb182ea..b37d36a62c 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -1,6 +1,6 @@ import os -from spack.architecture import Platform, Target +from spack.architecture import Platform, Target, OperatingSystem class CrayXc(Platform): priority = 20 @@ -8,6 +8,10 @@ class CrayXc(Platform): back_end = 'ivybridge' default = 'ivybridge' + front_os = "SuSE11" + back_os = "GNU/Linux" + default_os = "GNU/Linux" + def __init__(self): ''' Since cori doesn't have ivybridge as a front end it's better if we use CRAY_CPU_TARGET as the default. This will ensure @@ -30,6 +34,9 @@ class CrayXc(Platform): self.add_target('sandybridge', Target('sandybridge', 'PATH')) self.add_target('ivybridge', Target('ivybridge', 'MODULES', 'craype-ivybridge')) self.add_target('haswell', Target('haswell', 'MODULES', 'craype-haswell')) + + self.add_operating_system('SuSE11', OperatingSystem('SuSE11', '11')) + self.add_operating_system('GNU/Linux', OperatingSystem('GNU/Linux', '10')) # self.add_target(self.front_end, Target(self.front_end, 'PATH')) # Back End compiler needs the proper target module loaded. -- cgit v1.2.3-70-g09d2 From 77e93e1b791f1c264a999de3b59f2e6396e13391 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 10 Feb 2016 16:16:58 -0800 Subject: Added add_os method to platform subclasses --- lib/spack/spack/platforms/darwin.py | 1 + lib/spack/spack/platforms/linux.py | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py index 52284826b1..cfa1d957a1 100644 --- a/lib/spack/spack/platforms/darwin.py +++ b/lib/spack/spack/platforms/darwin.py @@ -10,6 +10,7 @@ class Darwin(Platform): def __init__(self): super(Darwin, self).__init__('darwin') self.add_target(self.default, Target(self.default, 'PATH')) + self.add_operating_system() @classmethod def detect(self): diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py index 7f94d80c34..dcb08569a8 100644 --- a/lib/spack/spack/platforms/linux.py +++ b/lib/spack/spack/platforms/linux.py @@ -10,6 +10,7 @@ class Linux(Platform): def __init__(self): super(Linux, self).__init__('linux') self.add_target(self.default, Target(self.default, 'PATH')) + self.add_operating_system() @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From b9d09202c9856bf173c4bbabd4b73573d355d408 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 11 Feb 2016 11:15:19 -0800 Subject: changed some variables to account for the fact that target is now a tuple --- lib/spack/spack/concretize.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index d78c102d93..8886b3cd93 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -212,7 +212,7 @@ class DefaultConcretizer(object): def _concretize_operating_system(self, arch, platform): """ Future method for concretizing operating system """ - if isinstance(arch.arch_os, OperatingSystem): + if isinstance(arch.arch_os, spack.architecture.OperatingSystem): return False else: arch.arch_os = platform.operating_system('default') @@ -240,13 +240,12 @@ class DefaultConcretizer(object): Arch = collections.namedtuple("Arch", "arch_os target") spec.target = Arch(arch_os=platform.operating_system('default'), target=platform.target('default')) - - return True + return True # If there is a target and it is a tuple and has both filled return # False if not isinstance(spec.target, basestring): return any((self._concretize_operating_system(spec.target, platform), - self._concretize_arch_target(spec.target, plarform))) + self._concretize_arch_target(spec.target, platform))) else: spec.add_target_from_string(spec.target) @@ -316,9 +315,9 @@ class DefaultConcretizer(object): # Should think whether this can be more efficient def _proper_compiler_style(cspec, target): compilers = spack.compilers.compilers_for_spec(cspec) - if target.compiler_strategy == 'PATH': + if target.target.compiler_strategy == 'PATH': filter(lambda c: not c.modules, compilers) - if target.compiler_strategy == 'MODULES': + if target.target.compiler_strategy == 'MODULES': filter(lambda c: c.modules, compilers) return compilers -- cgit v1.2.3-70-g09d2 From 3e1be63b0f8e745a04e041288a7583333d31673c Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 11 Feb 2016 11:15:50 -0800 Subject: Changed some variables to account for the fact that target is now a tuple --- lib/spack/spack/spec.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 503f80e1e6..3b2d54d047 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -566,7 +566,7 @@ class Spec(object): in the traversal. root [=True] - If false, this won't yield the root node, just its descendents. + If False, this won't yield the root node, just its descendents. direction [=children|parents] If 'children', does a traversal of this spec's children. If @@ -661,7 +661,7 @@ class Spec(object): for d in sorted(self.dependencies)) } if self.target: - d['target'] = self.target.to_dict() + d['target'] = self.target.target.to_dict() else: d['target'] = None if self.compiler: @@ -755,7 +755,6 @@ class Spec(object): if self.name in presets: changed |= self.constrain(presets[self.name]) - else: # Concretize virtual dependencies last. Because they're added # to presets below, their constraints will all be merged, but we'll @@ -830,6 +829,7 @@ class Spec(object): changed = True force = False + # Loops forever here in my implementation while changed: changes = (self.normalize(force=force), self._expand_virtual_packages(), @@ -1279,7 +1279,7 @@ class Spec(object): pkg = spack.db.get(self.name) if pkg.provides(other.name): for provided, when_spec in pkg.provided.items(): - if self.satisfies(when_spec, deps=false, strict=strict): + if self.satisfies(when_spec, deps=False, strict=strict): if provided.satisfies(other): return True return False @@ -1306,9 +1306,9 @@ class Spec(object): # Target satisfaction is currently just class equality. # If not strict, None means unconstrained. - if not isinstance(self.target, spack.architecture.Target): + if isinstance(self.target, basestring): self.add_target_from_string(self.target) - if not isinstance(other.target, spack.architecture.Target): + if isinstance(other.target, basestring): other.add_target_from_string(other.target) if self.target and other.target: @@ -1380,7 +1380,7 @@ class Spec(object): Options: dependencies[=True] - Whether deps should be copied too. Set to false to copy a + Whether deps should be copied too. Set to False to copy a spec but not its dependencies. """ -- cgit v1.2.3-70-g09d2 From 8e8c63bd679b57a969274287d402ea9843ecd1ae Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 11 Feb 2016 11:47:39 -0800 Subject: Using pylint, fixed some of the indentation and spacing errors --- lib/spack/spack/architecture.py | 94 +++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 61 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 2914d36ba2..c4ef0805ac 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -22,7 +22,6 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -import os import imp import platform as py_platform import inspect @@ -34,31 +33,34 @@ import llnl.util.tty as tty import spack from spack.util.naming import mod_to_class import spack.error as serr -from spack.version import Version -from external import yaml + class InvalidSysTypeError(serr.SpackError): def __init__(self, sys_type): - super(InvalidSysTypeError, self).__init__("Invalid sys_type value for Spack: " + sys_type) + super(InvalidSysTypeError, self).__init__( + "Invalid sys_type value for Spack: " + sys_type) class NoSysTypeError(serr.SpackError): def __init__(self): - super(NoSysTypeError, self).__init__("Could not determine sys_type for this machine.") + super(NoSysTypeError, self).__init__( + "Could not determine sys_type for this machine.") @key_ordering class Target(object): - """ Target is the processor of the host machine. The host machine may have different front-end - and back-end targets, especially if it is a Cray machine. The target will have a name and - also the module_name (e.g craype-compiler). Targets will also recognize which platform - they came from using the set_platform method. Targets will have compiler finding strategies - """ + """ Target is the processor of the host machine. + The host machine may have different front-end and back-end targets, + especially if it is a Cray machine. The target will have a name and + also the module_name (e.g craype-compiler). Targets will also + recognize which platform they came from using the set_platform method. + Targets will have compiler finding strategies + """ def __init__(self, name, compiler_strategy, module_name=None): - self.name = name # case of cray "ivybridge" but if it's x86_64 + self.name = name # case of cray "ivybridge" but if it's x86_64 self.compiler_strategy = compiler_strategy - self.module_name = module_name # craype-ivybridge + self.module_name = module_name # craype-ivybridge # Sets only the platform name to avoid recursiveness def set_platform(self, platform): @@ -85,7 +87,6 @@ class Target(object): target.platform_name = d['platform'] return target - def _cmp_key(self): return (self.name, self.compiler_strategy, self.module_name) @@ -97,6 +98,7 @@ class Target(object): return self.platform_name + '-' + self.name return self.name + @key_ordering class Platform(object): """ Abstract class that each type of Platform will subclass. @@ -104,10 +106,10 @@ class Platform(object): is returned """ - priority = None # Subclass needs to set this number. This controls order in which platform is detected. + priority = None # Subclass needs to set this number. This controls order in which platform is detected. front_end = None back_end = None - default = None # The default back end target. On cray ivybridge + default = None # The default back end target. On cray ivybridge front_os = None back_os = None @@ -119,17 +121,21 @@ class Platform(object): self.name = name def add_target(self, name, target): - """Used by the platform specific subclass to list available targets. Raises an error - if the platform specifies a name that is reserved by spack as an alias. + """Used by the platform specific subclass to list available targets. + Raises an error if the platform specifies a name + that is reserved by spack as an alias. """ if name in ['front_end', 'fe', 'back_end', 'be', 'default']: - raise ValueError("%s is a spack reserved alias and cannot be the name of a target" % name) + raise ValueError( + "%s is a spack reserved alias " + "and cannot be the name of a target" % name) target.set_platform(self) self.targets[name] = target def target(self, name): - """This is a getter method for the target dictionary that handles defaulting based - on the values provided by default, front-end, and back-end. This can be overwritten + """This is a getter method for the target dictionary + that handles defaulting based on the values provided by default, + front-end, and back-end. This can be overwritten by a subclass for which we want to provide further aliasing options. """ if name == 'default': @@ -150,7 +156,7 @@ class Platform(object): "10.8": "mountainlion", "10.9": "mavericks", "10.10": "yosemite", - "10.11": "elcapitan"} + "10.11": "elcapitan"} mac_ver = py_platform.mac_ver()[:-2] try: os_name = mac_releases[mac_ver] @@ -199,8 +205,10 @@ class Platform(object): class OperatingSystem(object): - """ The operating system will contain a name and version. It will - also represent itself simple with it's name + """ Operating System class. It will include the name and version. + The biggest attribute to this class will be the compiler finding + strategy. At the moment the compiler finding strategy is going to + be a string. """ def __init__(self, name, version): self.name = name @@ -212,42 +220,6 @@ class OperatingSystem(object): def __repr__(self): return self.__str__() -def get_sys_type_from_spack_globals(): - """Return the SYS_TYPE from spack globals, or None if it isn't set.""" - if not hasattr(spack, "sys_type"): - return None - elif hasattr(spack.sys_type, "__call__"): - return spack.sys_type() #If in __init__.py there is a sys_type() then call that - else: - return spack.sys_type # Else use the attributed which defaults to None - - -# This is livermore dependent. Hard coded for livermore -#def get_sys_type_from_environment(): -# """Return $SYS_TYPE or None if it's not defined.""" -# return os.environ.get('SYS_TYPE') - - -def get_mac_sys_type(): - """Return a Mac OS SYS_TYPE or None if this isn't a mac. - Front-end config - """ - mac_ver = py_platform.mac_ver()[0] - if not mac_ver: - return None - return "macosx_%s_%s" % (Version(mac_ver).up_to(2), py_platform.machine()) - - -def get_sys_type_from_uname(): - """ Returns a sys_type from the uname argument - Front-end config - """ - try: - platform_proc = subprocess.Popen(['uname', '-i'], stdout = subprocess.PIPE) - platform, _ = platform_proc.communicate() - return platform.strip() - except: - return None @memoized def all_platforms(): @@ -267,6 +239,7 @@ def all_platforms(): return modules + @memoized def sys_type(): """ Gather a list of all available subclasses of platforms. @@ -276,9 +249,8 @@ def sys_type(): """ # Try to create a Platform object using the config file FIRST platform_list = all_platforms() - platform_list.sort(key = lambda a: a.priority) + platform_list.sort(key=lambda a: a.priority) for platform in platform_list: if platform.detect(): return platform() - -- cgit v1.2.3-70-g09d2 From 77c17e1d92ac1c98a5c43247d6582876bc7d14d4 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Feb 2016 12:51:43 -0500 Subject: Since my last patch didn't get traction, here is a new approach to building gcc on Darwin: - Add a variant specifying whether to build with binutils, defaulting to true - Auto-detect whether this is Darwin; if so, set binutils and gold defaults to false, as they don't work on Darwin - Disable Go, which doesn't build on Darwin - Clean up handling configure options --- var/spack/repos/builtin/packages/gcc/package.py | 29 ++++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 3e5895cfb8..eb2129c4da 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -26,6 +26,7 @@ from spack import * from contextlib import closing from glob import glob +import sys class Gcc(Package): """The GNU Compiler Collection includes front ends for C, C++, @@ -49,13 +50,14 @@ class Gcc(Package): version('4.6.4', 'b407a3d1480c11667f293bfb1f17d1a4') version('4.5.4', '27e459c2566b8209ab064570e1b378f7') - variant('gold', default=True, description="Build the gold linker plugin for ld-based LTO") + variant('binutils', default=sys.platform != 'darwin', description="Build via binutils") + variant('gold', default=sys.platform != 'darwin', description="Build the gold linker plugin for ld-based LTO") depends_on("mpfr") depends_on("gmp") depends_on("mpc") # when @4.5: - depends_on("binutils~libiberty", when='~gold') - depends_on("binutils~libiberty+gold", when='+gold') + depends_on("binutils~libiberty", when='+binutils ~gold') + depends_on("binutils~libiberty+gold", when='+binutils +gold') # Save these until we can do optional deps. depends_on("isl", when=DEPENDS_ON_ISL_PREDICATE) @@ -67,7 +69,7 @@ class Gcc(Package): filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True) enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) - if spec.satisfies("@4.7.1:"): + if spec.satisfies("@4.7.1:") and sys.platform != 'darwin': enabled_languages.add('go') # Generic options to compile GCC @@ -79,17 +81,18 @@ class Gcc(Package): "--with-mpfr=%s" % spec['mpfr'].prefix, "--with-gmp=%s" % spec['gmp'].prefix, "--enable-lto", - "--with-gnu-ld", - "--with-gnu-as", "--with-quad"] # Binutils - static_bootstrap_flags = "-static-libstdc++ -static-libgcc" - binutils_options = ["--with-sysroot=/", - "--with-stage1-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), - "--with-boot-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), - "--with-ld=%s/bin/ld" % spec['binutils'].prefix, - "--with-as=%s/bin/as" % spec['binutils'].prefix] - options.extend(binutils_options) + if spec.satisfies('+binutils'): + static_bootstrap_flags = "-static-libstdc++ -static-libgcc" + binutils_options = ["--with-sysroot=/", + "--with-stage1-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), + "--with-boot-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), + "--with-gnu-ld", + "--with-ld=%s/bin/ld" % spec['binutils'].prefix, + "--with-gnu-as", + "--with-as=%s/bin/as" % spec['binutils'].prefix] + options.extend(binutils_options) # Isl if spec.satisfies(Gcc.DEPENDS_ON_ISL_PREDICATE): isl_options = ["--with-isl=%s" % spec['isl'].prefix] -- cgit v1.2.3-70-g09d2 From ff81aff2540f9eadd8d0ce123ae3143ebcb68789 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Feb 2016 13:05:42 -0500 Subject: Remove source-code optimization and cleanup --- lib/spack/env/cc | 106 +++++++++++++++++++++++-------------------------------- 1 file changed, 44 insertions(+), 62 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index b83731404b..ac8f717cc7 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -65,7 +65,7 @@ function die { } for param in $parameters; do - if [[ -z ${!param} ]]; then + if [ -z "${!param}" ]; then die "Spack compiler must be run from spack! Input $param was missing!" fi done @@ -114,39 +114,31 @@ case "$command" in esac # Finish setting up the mode. -if [[ -z $mode ]]; then +if [ -z "$mode" ]; then mode=ccld for arg in "$@"; do - case "$arg" in - -v|-V|--version|-dumpversion) - mode=vcheck - break - ;; - -E) - mode=cpp - break - ;; - -c) - mode=cc - break - ;; - -S) - mode=as - break - ;; - esac + if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then + mode=vcheck + break + elif [ "$arg" = -E ]; then + mode=cpp + break + elif [ "$arg" = -c ]; then + mode=cc + break + fi done fi # Dump the version and exist if we're in testing mode. -if [[ $SPACK_TEST_COMMAND = dump-mode ]]; then +if [ "$SPACK_TEST_COMMAND" = "dump-mode" ]; then echo "$mode" exit fi # Check that at least one of the real commands was actually selected, # otherwise we don't know what to execute. -if [[ -z $command ]]; then +if [ -z "$command" ]; then die "ERROR: Compiler '$SPACK_COMPILER_SPEC' does not support compiling $language programs." fi @@ -159,8 +151,8 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then # # Now do real parsing of the command line args, trying hard to keep - # non-rpath linker arguments in the proper order w.r.t. other command line - # arguments. This is important for things like groups. + # non-rpath linker arguments in the proper order w.r.t. other command + # line arguments. This is important for things like groups. # includes=() libraries=() @@ -168,33 +160,31 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then rpaths=() other_args=() - while [[ -n $1 ]]; do + while [ -n "$1" ]; do case "$1" in -I*) arg="${1#-I}" - if [[ -z $arg ]]; then shift; arg="$1"; fi + if [ -z "$arg" ]; then shift; arg="$1"; fi includes+=("$arg") ;; -L*) arg="${1#-L}" - if [[ -z $arg ]]; then shift; arg="$1"; fi + if [ -z "$arg" ]; then shift; arg="$1"; fi libraries+=("$arg") ;; -l*) arg="${1#-l}" - if [[ -z $arg ]]; then shift; arg="$1"; fi + if [ -z "$arg" ]; then shift; arg="$1"; fi libs+=("$arg") ;; -Wl,*) arg="${1#-Wl,}" - if [[ -z $arg ]]; then shift; arg="$1"; fi - if [[ $arg = -rpath=* ]]; then + if [ -z "$arg" ]; then shift; arg="$1"; fi + if [[ "$arg" = -rpath=* ]]; then rpaths+=("${arg#-rpath=}") - elif [[ $arg = -rpath,* ]]; then - rpaths+=("${arg#-rpath,}") - elif [[ $arg = -rpath ]]; then + elif [[ "$arg" = -rpath ]]; then shift; arg="$1" - if [[ $arg != -Wl,* ]]; then + if [[ "$arg" != -Wl,* ]]; then die "-Wl,-rpath was not followed by -Wl,*" fi rpaths+=("${arg#-Wl,}") @@ -204,14 +194,12 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then ;; -Xlinker,*) arg="${1#-Xlinker,}" - if [[ -z $arg ]]; then shift; arg="$1"; fi - if [[ $arg = -rpath=* ]]; then + if [ -z "$arg" ]; then shift; arg="$1"; fi + if [[ "$arg" = -rpath=* ]]; then rpaths+=("${arg#-rpath=}") - elif [[ $arg = -rpath,* ]]; then - rpaths+=("${arg#-rpath,}") - elif [[ $arg = -rpath ]]; then + elif [[ "$arg" = -rpath ]]; then shift; arg="$1" - if [[ $arg != -Xlinker,* ]]; then + if [[ "$arg" != -Xlinker,* ]]; then die "-Xlinker,-rpath was not followed by -Xlinker,*" fi rpaths+=("${arg#-Xlinker,}") @@ -250,8 +238,8 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then echo "${other_args[*]}" ;; *) - die "ERROR: Unknown test command" - ;; + echo "ERROR: Unknown test command" + exit 1 ;; esac exit fi @@ -259,12 +247,11 @@ fi # Read spack dependencies from the path environment variable IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do - if [[ -d $dep/include ]]; then + if [ -d "$dep/include" ]; then args=("-I$dep/include" "${args[@]}") fi - if [[ -d $dep/lib ]]; then - # libraries+=("$dep/lib") + if [ -d "$dep/lib" ]; then if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") elif [[ $mode = ld ]]; then @@ -272,7 +259,7 @@ for dep in "${deps[@]}"; do fi fi - if [[ -d $dep/lib64 ]]; then + if [ -d "$dep/lib64" ]; then # libraries+=("$dep/lib64") if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") @@ -284,18 +271,8 @@ done # Include all -L's and prefix/whatever dirs in rpath if [[ $mode = ccld ]]; then - # for dir in "${libraries[@]}"; do - # if [[ dir = $SPACK_INSTALL* ]]; then - # args=("-Wl,-rpath,$dir" "${args[@]}") - # fi - # done args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") elif [[ $mode = ld ]]; then - # for dir in "${libraries[@]}"; do - # if [[ dir = $SPACK_INSTALL* ]]; then - # args=("-rpath" "$dir" "${args[@]}") - # fi - # done args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi @@ -317,23 +294,28 @@ PATH="" for dir in "${env_path[@]}"; do remove="" for rm_dir in "${spack_env_dirs[@]}"; do - if [[ $dir = $rm_dir ]]; then remove=True; fi + if [ "$dir" = "$rm_dir" ]; then remove=True; fi done - if [[ -z $remove ]]; then - PATH="${PATH:+$PATH:}$dir" + if [ -z "$remove" ]; then + if [ -z "$PATH" ]; then + PATH="$dir" + else + PATH="$PATH:$dir" + fi fi done export PATH -full_command=("$command" "${args[@]}") +full_command=("$command") +full_command+=("${args[@]}") # # Write the input and output commands to debug logs if it's asked for. # -if [[ $SPACK_DEBUG = TRUE ]]; then +if [ "$SPACK_DEBUG" = "TRUE" ]; then input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.in.log" output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.out.log" - echo "$input_command" >> $input_log + echo "$input_command" >> $input_log echo "$mode ${full_command[@]}" >> $output_log fi -- cgit v1.2.3-70-g09d2 From 8e33cc1ae118b138aadc3c354b622c045dd81009 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 12 Feb 2016 13:11:45 -0500 Subject: Properly wrap all long lines --- var/spack/repos/builtin/packages/gcc/package.py | 27 ++++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index eb2129c4da..8292670de0 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -50,8 +50,10 @@ class Gcc(Package): version('4.6.4', 'b407a3d1480c11667f293bfb1f17d1a4') version('4.5.4', '27e459c2566b8209ab064570e1b378f7') - variant('binutils', default=sys.platform != 'darwin', description="Build via binutils") - variant('gold', default=sys.platform != 'darwin', description="Build the gold linker plugin for ld-based LTO") + variant('binutils', default=sys.platform != 'darwin', + description="Build via binutils") + variant('gold', default=sys.platform != 'darwin', + description="Build the gold linker plugin for ld-based LTO") depends_on("mpfr") depends_on("gmp") @@ -66,7 +68,8 @@ class Gcc(Package): def install(self, spec, prefix): # libjava/configure needs a minor fix to install into spack paths. - filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True) + filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', + string=True) enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) if spec.satisfies("@4.7.1:") and sys.platform != 'darwin': @@ -77,17 +80,19 @@ class Gcc(Package): "--libdir=%s/lib64" % prefix, "--disable-multilib", "--enable-languages=" + ','.join(enabled_languages), - "--with-mpc=%s" % spec['mpc'].prefix, - "--with-mpfr=%s" % spec['mpfr'].prefix, - "--with-gmp=%s" % spec['gmp'].prefix, + "--with-mpc=%s" % spec['mpc'].prefix, + "--with-mpfr=%s" % spec['mpfr'].prefix, + "--with-gmp=%s" % spec['gmp'].prefix, "--enable-lto", "--with-quad"] # Binutils if spec.satisfies('+binutils'): static_bootstrap_flags = "-static-libstdc++ -static-libgcc" binutils_options = ["--with-sysroot=/", - "--with-stage1-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), - "--with-boot-ldflags=%s %s" % (self.rpath_args, static_bootstrap_flags), + "--with-stage1-ldflags=%s %s" % + (self.rpath_args, static_bootstrap_flags), + "--with-boot-ldflags=%s %s" % + (self.rpath_args, static_bootstrap_flags), "--with-gnu-ld", "--with-ld=%s/bin/ld" % spec['binutils'].prefix, "--with-gnu-as", @@ -120,7 +125,8 @@ class Gcc(Package): """Generate a spec file so the linker adds a rpath to the libs the compiler used to build the executable.""" if not self.spec_dir: - tty.warn("Could not install specs for %s." % self.spec.format('$_$@')) + tty.warn("Could not install specs for %s." % + self.spec.format('$_$@')) return gcc = Executable(join_path(self.prefix.bin, 'gcc')) @@ -130,5 +136,6 @@ class Gcc(Package): for line in lines: out.write(line + "\n") if line.startswith("*link:"): - out.write("-rpath %s/lib:%s/lib64 \\\n"% (self.prefix, self.prefix)) + out.write("-rpath %s/lib:%s/lib64 \\\n" % + (self.prefix, self.prefix)) set_install_permissions(specs_file) -- cgit v1.2.3-70-g09d2 From 7732f375d24c7089d571cbb1659cbd1d60250888 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 13 Feb 2016 14:36:01 -0800 Subject: Changed operating system getter so that linux and darwin autodetected operating systems are set as class default_os --- lib/spack/spack/architecture.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index c4ef0805ac..0e006bdf40 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -168,9 +168,11 @@ class Platform(object): def add_operating_system(self, name=None, operating_system=None): if self.name == 'linux': linux_os = self._detect_linux_os() + self.default_os = linux_os.name self.operating_sys[linux_os.name] = linux_os elif self.name == 'darwin': mac_os = self._detect_mac_os() + self.default_os = mac_os.name self.operating_sys[mac_os.name] = mac_os else: self.operating_sys[name] = operating_system -- cgit v1.2.3-70-g09d2 From c7993010116e02426c73dc32d8cfb74b8d542868 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 13 Feb 2016 14:37:07 -0800 Subject: Changed the method in which architecture is converted from string to namedtuple. Also added some TODO comments to later consider changing how architecture is handled --- lib/spack/spack/spec.py | 168 ++++++++++++++++++++++++++++++------------------ 1 file changed, 105 insertions(+), 63 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 3b2d54d047..9b5df9a825 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -63,7 +63,7 @@ line is a spec for a particular installation of the mpileaks package. if it comes immediately after the compiler name. Otherwise it will be associated with the current package spec. -6. The target to build with. This is needed on machines where +6. The architecture to build with. This is needed on machines where cross-compilation is required Here is the EBNF grammar for a spec:: @@ -72,9 +72,9 @@ Here is the EBNF grammar for a spec:: dep_list = { ^ spec } spec = id [ options ] options = { @version-list | +variant | -variant | ~variant | - %compiler | =target } + %compiler | =architecture } variant = id - target = id + architecture = id compiler = id [ version-list ] version-list = version [ { , version } ] version = id | id: | :id | id:id @@ -107,6 +107,7 @@ from llnl.util.lang import * from llnl.util.tty.color import * import spack +import spack.architecture import spack.parse import spack.error import spack.compilers as compilers @@ -123,7 +124,7 @@ identifier_re = r'\w[\w-]*' # Convenient names for color formats so that other things can use them compiler_color = '@g' version_color = '@c' -target_color = '@m' +architecture_color = '@m' enabled_variant_color = '@B' disabled_variant_color = '@r' dependency_color = '@.' @@ -134,7 +135,7 @@ hash_color = '@K' See spack.color for descriptions of the color codes. """ color_formats = {'%' : compiler_color, '@' : version_color, - '=' : target_color, + '=' : architecture_color, '+' : enabled_variant_color, '~' : disabled_variant_color, '^' : dependency_color, @@ -411,7 +412,7 @@ class Spec(object): self.name = other.name self.dependents = other.dependents self.versions = other.versions - self.target = other.target + self.architecture = other.architecture self.compiler = other.compiler self.dependencies = other.dependencies self.variants = other.variants @@ -456,11 +457,11 @@ class Spec(object): self.compiler = compiler - def _set_target(self, target): - """Called by the parser to set the target.""" - if self.target: raise DuplicateTargetError( - "Spec for '%s' cannot have two targets." % self.name) - self.target = target # a string can be set + def _set_architecture(self, architecture): + """Called by the parser to set the architecture.""" + if self.architecture: raise DuplicateArchitectureError( + "Spec for '%s' cannot have two architectures." % self.name) + self.architecture = architecture # a string can be set def _add_dependency(self, spec): @@ -516,7 +517,7 @@ class Spec(object): @property def concrete(self): """A spec is concrete if it can describe only ONE build of a package. - If any of the name, version, target, compiler, + If any of the name, version, architecture, compiler, variants, or depdenencies are ambiguous,then it is not concrete. """ if self._concrete: @@ -525,7 +526,7 @@ class Spec(object): self._concrete = bool(not self.virtual and self.versions.concrete and self.variants.concrete - and self.target + and self.architecture and self.compiler and self.compiler.concrete and self.dependencies.concrete) return self._concrete @@ -660,10 +661,12 @@ class Spec(object): 'dependencies' : dict((d, self.dependencies[d].dag_hash()) for d in sorted(self.dependencies)) } - if self.target: - d['target'] = self.target.target.to_dict() + if self.architecture: + # TODO: Fix the target.to_dict to account for the tuple + # Want it to be a dict of dicts + d['architecture'] = self.architecture.target.to_dict() else: - d['target'] = None + d['architecture'] = None if self.compiler: d.update(self.compiler.to_dict()) else: @@ -689,7 +692,9 @@ class Spec(object): spec = Spec(name) spec.versions = VersionList.from_dict(node) - spec.target = spack.architecture.Target.from_dict(node['target']) + # TODO: Need to fix the architecture.Target.from_dict + spec.architecture = spack.architecture.Target.from_dict( + node['architecture']) if node['compiler'] is None: spec.compiler = None @@ -760,7 +765,7 @@ class Spec(object): # to presets below, their constraints will all be merged, but we'll # still need to select a concrete package later. changed |= any( - (spack.concretizer.concretize_target(self), + (spack.concretizer.concretize_architecture(self), spack.concretizer.concretize_compiler(self), spack.concretizer.concretize_version(self), spack.concretizer.concretize_variants(self))) @@ -1149,10 +1154,11 @@ class Spec(object): raise UnsatisfiableVariantSpecError(self.variants[v], other.variants[v]) - if self.target is not None and other.target is not None: - if self.target != other.target: - raise UnsatisfiableTargetSpecError(self.target, - other.target) + # TODO: Check out the logic here + if self.architecture is not None and other.architecture is not None: + if self.architecture != other.architecture: + raise UnsatisfiableTargetSpecError(self.architecture, + other.architecture) changed = False if self.compiler is not None and other.compiler is not None: @@ -1164,9 +1170,9 @@ class Spec(object): changed |= self.versions.intersect(other.versions) changed |= self.variants.constrain(other.variants) - old = self.target - self.target = self.target or other.target - changed |= (self.target != old) + old = self.architecture + self.architecture = self.architecture or other.architecture + changed |= (self.architecture != old) if deps: changed |= self._constrain_dependencies(other) @@ -1231,34 +1237,67 @@ class Spec(object): except SpecError: return parse_anonymous_spec(spec_like, self.name) + def _is_valid_platform(self, platform, platform_list): + if platform in platform_names: + return True + return False + + def _is_valid_target(self, target, platform): + if target in platform.targets: + return True + return False + + def add_architecture_from_string(self, arch): + """ The user is able to provide a architecture string of the form + platform-os-target. This string will be parsed by this function + and turn the architecture string into an architecture tuple of + platform, operating system and target processor classes. + The platform-os-target triplet can be delimited by a '-'. If any + portion of the architecture triplet is empty, spack will supply + the default. If the architecture is blank then defaults will + be provided based off of the platform + + e.g + =linux-ubuntu10-x84_64 -> (linux, ubuntu10, x86_64) + + =cray_xc-SuSE11-haswell -> (cray_xc, SuSE11, haswell) + + =bgq -> (bgq, + default_os, + default_target) + + =elcapitan -> (darwin, elcapitan, x86_64) - def add_target_from_string(self, arch): - """If only a target is provided, spack will assume the default architecture. - A platform-target pair can be input delimited by a '-'. If either portion of - a platform-target pair is empty, spack will supply a default, in the case of - a blank target the default will be dependent on the platform. - E.g. x86_64 -> 64 bit x86 - bgq- -> default bgq target (back end/powerpc) - cray-hawswell -> haswell target on cray platform + =x86_64 -> (autodetected platform, + default_os, + x86_64) """ - Arch = namedtuple("Arch", "arch_os target") - platform = spack.architecture.sys_type() - + + platform_list = spack.architecture.all_platforms() + platform_names = [plat.__name__.lower() for plat in platform_list] if arch is None: return + # Get all the platforms to check whether string is valid + Arch = namedtuple("Arch", "platform platform_os target") + arch_list = arch.split("-") + platform = spack.architecture.sys_type() + for entry in arch_list: + if _is_valid_platform(entry, platform_names): + platform = entry() + elif _is_valid_target(entry, platform): + target = entry + else: + platform_os = entry - if '-' in arch: - os_name, target = arch.split('-') - self.target = Arch(arch_os=platform.operating_system(os_name), - target = platform.target(target)) - elif arch in platform.targets: - self.target = Arch(arch_os=platform.operating_system('default'), - target=platform.target(target)) - else: - os_name = arch # Odd naming here, definitely need to change - self.target = Arch(arch_os=platform.operating_system(os_name), - target=platform.target('default')) + if target is None: + target = platform.target('default') + if platform_os is None: + platform_os = platform.operating_system('default') + self.architecture = Arch(platform=platform, + platform_os=platform_os, + target=target) + def satisfies(self, other, deps=True, strict=False): """determine if this spec satisfies all constraints of another. @@ -1306,15 +1345,16 @@ class Spec(object): # Target satisfaction is currently just class equality. # If not strict, None means unconstrained. - if isinstance(self.target, basestring): - self.add_target_from_string(self.target) - if isinstance(other.target, basestring): - other.add_target_from_string(other.target) - - if self.target and other.target: - if self.target != other.target: + if isinstance(self.architecture, basestring): + self.add_architecture_from_string(self.architecture) + if isinstance(other.architecture, basestring): + other.add_architecture_from_string(other.architecture) + + # TODO: Need to make sure that comparisons can be made via classes + if self.architecture and other.architecture: + if self.architecture != other.architecture: return False - elif strict and (other.target and not self.target): + elif strict and (other.architecture and not self.architecture): return False # If we need to descend into dependencies, do it, otherwise we're done. @@ -1384,11 +1424,12 @@ class Spec(object): spec but not its dependencies. """ + # TODO: Check if comparisons for tuple are valid # We don't count dependencies as changes here changed = True if hasattr(self, 'name'): changed = (self.name != other.name and self.versions != other.versions and \ - self.target != other.target and self.compiler != other.compiler and \ + self.architecture != other.architecture and self.compiler != other.compiler and \ self.variants != other.variants and self._normal != other._normal and \ self.concrete != other.concrete and self.external != other.external and \ self.external_module != other.external_module) @@ -1396,7 +1437,7 @@ class Spec(object): # Local node attributes get copied first. self.name = other.name self.versions = other.versions.copy() - self.target = other.target + self.architecture = other.architecture self.compiler = other.compiler.copy() if other.compiler else None if kwargs.get('cleardeps', True): self.dependents = DependencyMap() @@ -1526,7 +1567,7 @@ class Spec(object): def _cmp_node(self): """Comparison key for just *this node* and not its deps.""" return (self.name, self.versions, self.variants, - self.target, self.compiler) + self.architecture, self.compiler) def eq_node(self, other): @@ -1585,7 +1626,7 @@ class Spec(object): Anything else is copied verbatim into the output stream. *Example:* ``$_$@$+`` translates to the name, version, and options - of the package, but no dependencies, target, or compiler. + of the package, but no dependencies, architecture, or compiler. TODO: allow, e.g., $6# to customize short hash length TODO: allow, e.g., $## for full hash. @@ -1628,9 +1669,10 @@ class Spec(object): elif c == '+': if self.variants: write(fmt % str(self.variants), c) + # TODO: Check string methods here elif c == '=': - if self.target: - write(fmt % (c + str(self.target)), c) + if self.architecture: + write(fmt % (c + str(self.architecture)), c) elif c == '#': out.write('-' + fmt % (self.dag_hash(7))) elif c == '$': @@ -2036,10 +2078,10 @@ class UnknownVariantError(SpecError): "Package %s has no variant %s!" % (pkg, variant)) -class DuplicateTargetError(SpecError): +class DuplicateArchitectureError(SpecError): """Raised when the same target occurs in a spec twice.""" def __init__(self, message): - super(DuplicateTargetError, self).__init__(message) + super(DuplicateArchitectureError, self).__init__(message) class InconsistentSpecError(SpecError): -- cgit v1.2.3-70-g09d2 From 35a602baaf39fb5056f3dbb7eccbd638e126159f Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 16 Feb 2016 15:17:57 -0800 Subject: Changed target checking to architecture checking for abi compatible --- lib/spack/spack/abi.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/abi.py b/lib/spack/spack/abi.py index 1dd49d6b2c..0f07feda5f 100644 --- a/lib/spack/spack/abi.py +++ b/lib/spack/spack/abi.py @@ -34,9 +34,10 @@ class ABI(object): """This class provides methods to test ABI compatibility between specs. The current implementation is rather rough and could be improved.""" - def target_compatible(self, parent, child): + def architecture_compatible(self, parent, child): """Returns true iff the parent and child specs have ABI compatible targets.""" - return not parent.target or not child.target or parent.target == child.target + return not parent.architecture or not \ + child.achitecture or parent.architecture == child.architecture @memoized @@ -123,6 +124,6 @@ class ABI(object): def compatible(self, parent, child, **kwargs): """Returns true iff a parent and child spec are ABI compatible""" loosematch = kwargs.get('loose', False) - return self.target_compatible(parent, child) and \ + return self.architecture_compatible(parent, child) and \ self.compiler_compatible(parent, child, loose=loosematch) -- cgit v1.2.3-70-g09d2 From 19dca4bcc9dcdd902fb5490b4ee49b9dc92aa5ba Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 16 Feb 2016 15:21:36 -0800 Subject: Added some _cmp_key methods to OperatingSystem class, and also changed the way Platforms are compared. Created a mini inherited class named Arch that inherits from namedtuple. The reason for this is to override the namedtuple __str__ method to make arch tuples look prettier when printed out. Rather than Arch(platform= ... ) it prints to platform-os-target which makes directory paths to packages look cleaner. --- lib/spack/spack/architecture.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 0e006bdf40..3cbce5dc52 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -22,6 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## +from collections import namedtuple import imp import platform as py_platform import inspect @@ -178,7 +179,7 @@ class Platform(object): self.operating_sys[name] = operating_system def operating_system(self, name): - if name == 'default': + if name == 'default_os': name = self.default_os if name == 'front_os': name = self.front_os @@ -203,9 +204,10 @@ class Platform(object): return self.name def _cmp_key(self): - return (self.name, (_cmp_key(t) for t in self.targets.values())) - + return (self.name, (_cmp_key(t) for t in self.targets.values()), + (_cmp_key(o) for o in self.operating_sys.values())) +@key_ordering class OperatingSystem(object): """ Operating System class. It will include the name and version. The biggest attribute to this class will be the compiler finding @@ -222,6 +224,19 @@ class OperatingSystem(object): def __repr__(self): return self.__str__() + def _cmp_key(self): + return (self.name, self.version) + + +class Arch(namedtuple("Arch", "platform platform_os target")): + """ namedtuple for Architecture. Will have it's own __str__ method + to make printing out the tuple easier and also won't make directory + paths look odd """ + __slots__ = () + + def __str__(self): + return (self.platform.name +"-"+ + self.platform_os.name + "-" + self.target.name) @memoized def all_platforms(): -- cgit v1.2.3-70-g09d2 From 31ab2383067830e47d54788a2cac01f949e77798 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 16 Feb 2016 15:22:23 -0800 Subject: Beginning attemps to fix concretization method to account for the new tuple architecture --- lib/spack/spack/concretize.py | 73 +++++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 27 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 8886b3cd93..1c373679a2 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -210,55 +210,74 @@ class DefaultConcretizer(object): return True # Things changed + def _concretize_platform(self, arch, platform): + if issubclass(arch.platform.__class__, spack.architecture.Platform): + return True + else: + arch.platform = platform + def _concretize_operating_system(self, arch, platform): """ Future method for concretizing operating system """ - if isinstance(arch.arch_os, spack.architecture.OperatingSystem): + if isinstance(arch.platform_os, spack.architecture.OperatingSystem): return False else: - arch.arch_os = platform.operating_system('default') + arch.arch_os = platform.operating_system('default_os') return True - def _concretize_arch_target(self, arch, platform): + def _concretize_target(self, arch, platform): if isinstance(arch.target, spack.architecture.Target): return False else: arch.target = platform.target('default') return True - def concretize_target(self, spec): - """If the spec already has an target and it is a an target type, - return. Otherwise, if it has a target that is a string type, generate a - target based on that type. If it has no target and the root of the - DAG has an target, then use that. Otherwise, take the system's default - target. + def concretize_architecture(self, spec): + """If the spec is empty provide the defaults of the platform. If the + architecture is not a basestring, then check if either the platform, + target or operating system are concretized. If any of the fields are + changed then return True. If everything is concretized (i.e the + architecture attribute is a namedtuple of classes) then return False. + If the target is a string type, then convert the string into a + concretized architecture. If it has no architecture and the root of the + DAG has an architecture, then use the root otherwise use the defaults + on the platform. """ - platform = spack.architecture.sys_type() - if spec.target is None: + platform = spack.architecture.sys_type() + import ipdb;ipdb.set_trace() + if spec.architecture is None: # Create an empty tuple - Arch = collections.namedtuple("Arch", "arch_os target") - spec.target = Arch(arch_os=platform.operating_system('default'), - target=platform.target('default')) - return True - # If there is a target and it is a tuple and has both filled return - # False - if not isinstance(spec.target, basestring): - return any((self._concretize_operating_system(spec.target, platform), - self._concretize_arch_target(spec.target, platform))) + Arch = spack.architecture.Arch + # Set the architecture to all defaults + spec.architecture = Arch(platform=platform, + platform_os=platform.operating_system('default_os'), + target=platform.target('default')) + return True + #If there is a target and it is a tuple and has both filled return + #False + if not isinstance(spec.architecture, basestring): + return any(( + self._concretize_platform(spec.architecture, platform), + self._concretize_operating_system(spec.architecture, platform), + self._concretize_arch_target(spec.architecture, platform))) else: spec.add_target_from_string(spec.target) - if spec.root.target and \ - not isinstance(spec.root.target, basestring): - bool_flag = any( - (self._concretize_operating_system(spec.root.target, platform), - self._concretize_arch_target(spec.root.target, platform))) - spec.target =spec.root.target + # Does not look pretty at all!!! + if spec.root.architecture and \ + not isinstance(spec.root.architecture, basestring): + bool_flag = any(( + self._concretize_platform(spec.root.architecture, platform), + self._concretize_operating_system(spec.root.architecture, + platform), + self._concretize_target(spec.root.target, platform))) + spec.architecture =spec.root.architecture return bool_flag else: - spec.add_target_from_string(spec.root.target) + spec.add_architecture_from_string(spec.root.architecture) + return True # if there is no target specified used the defaults -- cgit v1.2.3-70-g09d2 From 62b0293963bd21ff734993e5ac577650af0faa3f Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 16 Feb 2016 15:23:38 -0800 Subject: Cleaned up the file. Got rid of commented out sections of code since they weren't going to be used anyway --- lib/spack/spack/platforms/cray_xc.py | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index b37d36a62c..d48b6ffcfa 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -17,7 +17,7 @@ class CrayXc(Platform): if we use CRAY_CPU_TARGET as the default. This will ensure that if we're on a XC-40 or XC-30 then we can detect the target ''' - super(CrayXc, self).__init__('cray_xc') + super(CrayXc, self).__init__('crayxc') # Handle the default here so we can check for a key error if 'CRAY_CPU_TARGET' in os.environ: @@ -28,23 +28,21 @@ class CrayXc(Platform): self.front_end = self.default self.back_end = self.default - # Could switch to use modules and fe targets for front end # Currently using compilers by path for front end. self.add_target('sandybridge', Target('sandybridge', 'PATH')) - self.add_target('ivybridge', Target('ivybridge', 'MODULES', 'craype-ivybridge')) - self.add_target('haswell', Target('haswell', 'MODULES', 'craype-haswell')) - - self.add_operating_system('SuSE11', OperatingSystem('SuSE11', '11')) - self.add_operating_system('GNU/Linux', OperatingSystem('GNU/Linux', '10')) - -# self.add_target(self.front_end, Target(self.front_end, 'PATH')) - # Back End compiler needs the proper target module loaded. -# self.add_target(self.back_end, Target(self.front_end, 'MODULES', 'craype-'+ self.back_end)) -# self.add_target(self.default, Target(self.default, 'MODULES', 'craype-' + self.default)) - # This is kludgy and the order matters when the targets are all haswell - # This is because the last one overwrites the others when they have the - # same name. + + self.add_target('ivybridge', + Target('ivybridge', 'MODULES', 'craype-ivybridge')) + + self.add_target('haswell', + Target('haswell', 'MODULES', 'craype-haswell')) + + self.add_operating_system('SuSE11', + OperatingSystem('SuSE11', '11')) + + self.add_operating_system('GNU/Linux', + OperatingSystem('GNU/Linux', '10')) @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From a3039c4c67b376d2e8577c2227cffac8873bdc74 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 16 Feb 2016 15:26:07 -0800 Subject: Changed add_architecture_from_string, it now loops through the string and checks whether each piece of string is a valid platform, operating system and target. If the operating system or target are none it will use the defaults. Updated the documentation for that method. One thing that bothers me is how to account for the multitude of operating systems when cross compiling. If someone wants to compile with another operating system not found on current platform. How can spack check to see if it is valid? --- lib/spack/spack/spec.py | 64 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 9b5df9a825..91e9e432eb 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1238,14 +1238,18 @@ class Spec(object): return parse_anonymous_spec(spec_like, self.name) def _is_valid_platform(self, platform, platform_list): - if platform in platform_names: + if platform in platform_list: return True return False def _is_valid_target(self, target, platform): if target in platform.targets: return True - return False + return False + def _is_valid_os(self, os_string, platform): + if os_string in platform.operating_sys: + return True + return False def add_architecture_from_string(self, arch): """ The user is able to provide a architecture string of the form @@ -1254,8 +1258,9 @@ class Spec(object): platform, operating system and target processor classes. The platform-os-target triplet can be delimited by a '-'. If any portion of the architecture triplet is empty, spack will supply - the default. If the architecture is blank then defaults will - be provided based off of the platform + the default. If the entire architecture field is blank then + defaults will be provided based off of the platform. + This happens in the concretize_architecture method in concretize.py e.g =linux-ubuntu10-x84_64 -> (linux, ubuntu10, x86_64) @@ -1272,27 +1277,38 @@ class Spec(object): default_os, x86_64) """ - + if arch is None: return + platform_list = spack.architecture.all_platforms() - platform_names = [plat.__name__.lower() for plat in platform_list] - if arch is None: - return - # Get all the platforms to check whether string is valid - Arch = namedtuple("Arch", "platform platform_os target") + platform_names = {plat.__name__.lower():plat for plat in platform_list} + Arch = spack.architecture.Arch arch_list = arch.split("-") - platform = spack.architecture.sys_type() + + # Create instance of current platform, gets overwritten if user + # provided a platform spec. + platform = spack.architecture.sys_type() + target = None + platform_os = None + for entry in arch_list: - if _is_valid_platform(entry, platform_names): - platform = entry() - elif _is_valid_target(entry, platform): - target = entry + if self._is_valid_platform(entry, platform_names): + if entry != platform.name: + platform = platform_dict[entry]() # Create instance of platform + elif self._is_valid_target(entry, platform): + target = platform.target(entry) + # Need to figure out if we're supporting arbitrary os's and how + # to account for them + # Not really a good implementation since the user can add + # gibberish and spack will see it as an os + elif self._is_valid_os(entry, platform): + platform_os = platform.operating_system(entry) else: - platform_os = entry + raise UnknownArchitectureSpecError(entry) if target is None: target = platform.target('default') if platform_os is None: - platform_os = platform.operating_system('default') + platform_os = platform.operating_system('default_os') self.architecture = Arch(platform=platform, platform_os=platform_os, @@ -1854,7 +1870,6 @@ class SpecParser(spack.parse.Parser): def do_parse(self): specs = [] - try: while self.next: if self.accept(ID): @@ -1889,7 +1904,7 @@ class SpecParser(spack.parse.Parser): spec.name = self.token.value spec.versions = VersionList() spec.variants = VariantMap(spec) - spec.target = None + spec.architecture = None spec.compiler = None spec.external = None spec.external_module = None @@ -1920,7 +1935,7 @@ class SpecParser(spack.parse.Parser): spec._set_compiler(self.compiler()) elif self.accept(EQ): - spec._set_target(self.target()) + spec._set_architecture(self.architecture()) else: break @@ -1938,7 +1953,7 @@ class SpecParser(spack.parse.Parser): return self.token.value - def target(self): + def architecture(self): self.expect(ID) return self.token.value @@ -2077,6 +2092,13 @@ class UnknownVariantError(SpecError): super(UnknownVariantError, self).__init__( "Package %s has no variant %s!" % (pkg, variant)) +class UnknownArchitectureSpecError(SpecError): + """ Raised when an entry in a string field is neither a platform, + operating system or a target. """ + def __init__(self, architecture_spec_entry): + super(UnknownArchitectureSpecError, self).__init__( + "Architecture spec %s is not a valid spec entry" % ( + architecture_spec_entry)) class DuplicateArchitectureError(SpecError): """Raised when the same target occurs in a spec twice.""" -- cgit v1.2.3-70-g09d2 From 2a79537ba1120620f79d39bd4081a6a11b7862c4 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 17 Feb 2016 14:44:38 -0800 Subject: Fixed silly typo that gave errors in tests --- lib/spack/spack/abi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/abi.py b/lib/spack/spack/abi.py index 0f07feda5f..bd9bc30fd1 100644 --- a/lib/spack/spack/abi.py +++ b/lib/spack/spack/abi.py @@ -36,8 +36,8 @@ class ABI(object): def architecture_compatible(self, parent, child): """Returns true iff the parent and child specs have ABI compatible targets.""" - return not parent.architecture or not \ - child.achitecture or parent.architecture == child.architecture + return not parent.architecture or not child.architecture \ + or parent.architecture == child.architecture @memoized -- cgit v1.2.3-70-g09d2 From 2c20fc2ebf8e9b360f3935a1867d9b95c69513ac Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 17 Feb 2016 14:45:53 -0800 Subject: Changed module loading to use arch tuple instead of regular target.module --- lib/spack/spack/build_environment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index d849b4b56c..6e03394777 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -226,8 +226,8 @@ def set_build_environment_variables(pkg): pkg_config_dirs.append(pcdir) path_put_first("PKG_CONFIG_PATH", pkg_config_dirs) - if pkg.spec.target.module_name: - load_module(pkg.spec.target.module_name) + if pkg.spec.architecture.target.module_name: + load_module(pkg.spec.architecture.target.module_name) def set_module_variables_for_package(pkg): """Populate the module scope of install() with some useful functions. -- cgit v1.2.3-70-g09d2 From 524e9b372ee85508abad1163368c7a9fdc09fcc3 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 17 Feb 2016 14:47:29 -0800 Subject: From now on all targets are now architecture. Architecture is a named tuple so any time we need access to target we do architecture.target. --- lib/spack/spack/concretize.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 1c373679a2..6c2aaeda01 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -180,7 +180,7 @@ class DefaultConcretizer(object): # If there are known available versions, return the most recent # version that satisfies the spec - pkg = spec.package + pkg = spec.package # Gives error here with dynist cmp_versions = partial(spack.pkgsort.version_compare, spec.name) valid_versions = sorted( [v for v in pkg.versions @@ -212,9 +212,10 @@ class DefaultConcretizer(object): def _concretize_platform(self, arch, platform): if issubclass(arch.platform.__class__, spack.architecture.Platform): - return True + return False else: arch.platform = platform + return True def _concretize_operating_system(self, arch, platform): """ Future method for concretizing operating system """ @@ -245,7 +246,6 @@ class DefaultConcretizer(object): """ platform = spack.architecture.sys_type() - import ipdb;ipdb.set_trace() if spec.architecture is None: # Create an empty tuple Arch = spack.architecture.Arch @@ -260,9 +260,9 @@ class DefaultConcretizer(object): return any(( self._concretize_platform(spec.architecture, platform), self._concretize_operating_system(spec.architecture, platform), - self._concretize_arch_target(spec.architecture, platform))) + self._concretize_target(spec.architecture, platform))) else: - spec.add_target_from_string(spec.target) + spec.add_architecture_from_string(spec.target) # Does not look pretty at all!!! if spec.root.architecture and \ @@ -325,18 +325,18 @@ class DefaultConcretizer(object): link to this one, to maximize compatibility. """ # Pass on concretizing the compiler if the target is not yet determined - if not spec.target: + if not spec.architecture.target: #Although this usually means changed, this means awaiting other changes return True # Only use a matching compiler if it is of the proper style # Takes advantage of the proper logic already existing in compiler_for_spec # Should think whether this can be more efficient - def _proper_compiler_style(cspec, target): + def _proper_compiler_style(cspec, architecture): compilers = spack.compilers.compilers_for_spec(cspec) - if target.target.compiler_strategy == 'PATH': + if architecture.target.compiler_strategy == 'PATH': filter(lambda c: not c.modules, compilers) - if target.target.compiler_strategy == 'MODULES': + if architecture.target.compiler_strategy == 'MODULES': filter(lambda c: c.modules, compilers) return compilers @@ -369,7 +369,7 @@ class DefaultConcretizer(object): # copy concrete version into other_compiler index = len(matches)-1 - while not _proper_compiler_style(matches[index], spec.target): + while not _proper_compiler_style(matches[index], spec.architecture): index -= 1 if index == 0: raise NoValidVersionError(spec) -- cgit v1.2.3-70-g09d2 From ab4006ee2c4e7ecbf256a9de56e54e8573b37e01 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 17 Feb 2016 14:48:53 -0800 Subject: Changed so that directory layout uses the platform-os-target string version of the arch tuple --- lib/spack/spack/directory_layout.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py index da3441fa13..435ecfdf4d 100644 --- a/lib/spack/spack/directory_layout.py +++ b/lib/spack/spack/directory_layout.py @@ -200,8 +200,7 @@ class YamlDirectoryLayout(DirectoryLayout): spec.version, spec.dag_hash(self.hash_len)) - path = join_path( - spec.target, + path = join_path(spec.architecture, "%s-%s" % (spec.compiler.name, spec.compiler.version), dir_name) -- cgit v1.2.3-70-g09d2 From 1d484dbe5fb70885875dcbb2e795c4d517646e77 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 17 Feb 2016 14:49:36 -0800 Subject: Changed so that modules use correct file path with spec.architecture instead of spec.target --- lib/spack/spack/modules.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index f84ac75c77..56a61adefb 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -193,7 +193,7 @@ class Dotkit(EnvModule): @property def file_name(self): - return join_path(Dotkit.path, self.spec.target, + return join_path(Dotkit.path, self.spec.architecture, self.spec.format('$_$@$%@$+$#.dk')) @property @@ -230,7 +230,7 @@ class TclModule(EnvModule): @property def file_name(self): - return join_path(TclModule.path, self.spec.target, self.use_name) + return join_path(TclModule.path, self.spec.architecture, self.use_name) @property -- cgit v1.2.3-70-g09d2 From 54042e399b5cfb4344643d8447c4274d34842643 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 17 Feb 2016 14:50:10 -0800 Subject: Changed target to architecture.target --- lib/spack/spack/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 1148e4ac3d..b0d84863de 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -588,11 +588,13 @@ class Package(object): @property + #TODO: Change this to architecture def compiler(self): """Get the spack.compiler.Compiler object used to build this package.""" if not self.spec.concrete: raise ValueError("Can only get a compiler for a concrete package.") - return spack.compilers.compiler_for_spec(self.spec.compiler, self.spec.target) + return spack.compilers.compiler_for_spec(self.spec.compiler, + self.spec.architecture.target) def url_version(self, version): -- cgit v1.2.3-70-g09d2 From d9e8bf18078bc4df381b05820b14365f6e0ae01f Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 17 Feb 2016 14:51:14 -0800 Subject: Added ARCHITECTURE field when showing specs --- lib/spack/spack/spec.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 91e9e432eb..0b42498910 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1735,9 +1735,9 @@ class Spec(object): elif named_str == 'OPTIONS': if self.variants: write(fmt % str(self.variants), '+') - elif named_str == 'TARGET': - if self.target: - write(fmt % str(self.target), '=') + elif named_str == 'ARCHITECTURE': + if self.architecture: + write(fmt % self.architecture, '=') elif named_str == 'SHA1': if self.dependencies: out.write(fmt % str(self.dep_hash(8))) -- cgit v1.2.3-70-g09d2 From 93a92a00eeaf6e3e721b2150fbc44bd1b388ee66 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 17 Feb 2016 14:53:09 -0800 Subject: Changed abstract.target to abstract.architecture.target and abstract.architecture.target.concrete --- lib/spack/spack/test/concretize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 2403719134..c12aada076 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -46,7 +46,7 @@ class ConcretizeTest(MockPackagesTest): if abstract.compiler and abstract.compiler.concrete: self.assertEqual(abstract.compiler, concrete.compiler) - if abstract.target and abstract.target.concrete: + if abstract.architecture and abstract.architecture.target.concrete: self.assertEqual(abstract.target, concrete.target) -- cgit v1.2.3-70-g09d2 From 0a6b54a8c40045dac7d763880de496cd01984c0c Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 17 Feb 2016 14:53:56 -0800 Subject: Added module compilers so that no CompilerSpecError is thrown --- var/spack/mock_configs/site_spackconfig/compilers.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/mock_configs/site_spackconfig/compilers.yaml b/var/spack/mock_configs/site_spackconfig/compilers.yaml index 0a2dc893e2..fcbf7a53f1 100644 --- a/var/spack/mock_configs/site_spackconfig/compilers.yaml +++ b/var/spack/mock_configs/site_spackconfig/compilers.yaml @@ -5,8 +5,18 @@ compilers: cxx: /path/to/clang++ f77: None fc: None + modules: None gcc@4.5.0: cc: /path/to/gcc cxx: /path/to/g++ f77: /path/to/gfortran fc: /path/to/gfortran + modules: None + gcc@5.2.0: + cc: cc + cxx: CC + f77: ftn + fc: ftn + modules: + - PrgEnv-gnu + - gcc/5.2.0 -- cgit v1.2.3-70-g09d2 From 3558404c037cdd0730cd4672c8522b9bb3bd6bd2 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 17 Feb 2016 14:54:39 -0800 Subject: Check difference by using arch tuple rather than .target --- var/spack/mock_packages/multimethod/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/mock_packages/multimethod/package.py b/var/spack/mock_packages/multimethod/package.py index b37db9f1eb..b926d42d7b 100644 --- a/var/spack/mock_packages/multimethod/package.py +++ b/var/spack/mock_packages/multimethod/package.py @@ -120,7 +120,7 @@ class Multimethod(Package): for target in targets: @when('='+target.name) def different_by_target(self): - return self.spec.target.name + return self.spec.architecture.target.name # -- cgit v1.2.3-70-g09d2 From 28218755a5b11dd02c3c7e4c4a503a110ade94e2 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 18 Feb 2016 13:06:55 -0800 Subject: Changed spec.target to spec.architecture --- lib/spack/spack/concretize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 6c2aaeda01..0e7bf53b44 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -262,7 +262,7 @@ class DefaultConcretizer(object): self._concretize_operating_system(spec.architecture, platform), self._concretize_target(spec.architecture, platform))) else: - spec.add_architecture_from_string(spec.target) + spec.add_architecture_from_string(spec.architecture) # Does not look pretty at all!!! if spec.root.architecture and \ -- cgit v1.2.3-70-g09d2 From 18ddbae60e0fa91cbbc73a1b501c489c3f7fc8d2 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 14:49:53 -0800 Subject: Added new module path to operating system file --- lib/spack/spack/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index e1ef094f17..6ad9b87ca2 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -39,6 +39,7 @@ build_env_path = join_path(lib_path, "env") module_path = join_path(lib_path, "spack") platform_path = join_path(module_path, 'platforms') compilers_path = join_path(module_path, "compilers") +operating_system_path = join_path(module_path, 'operating_system') test_path = join_path(module_path, "test") hooks_path = join_path(module_path, "hooks") var_path = join_path(prefix, "var", "spack") -- cgit v1.2.3-70-g09d2 From a8de45ce28b8277c0ca1740aa53e1e4e334596d1 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 14:50:51 -0800 Subject: Got rid of methods used to detect mac osx and linux osx. Now those methods are used my operating system subclasses --- lib/spack/spack/architecture.py | 90 +++++++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 35 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 3cbce5dc52..3ba45f3d82 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -148,35 +148,29 @@ class Platform(object): return self.targets[name] - def _detect_linux_os(self): - return OperatingSystem(py_platform.dist()[0], py_platform.dist()[1]) - - def _detect_mac_os(self): - mac_releases = {'10.6': "snowleopard", - "10.7": "lion", - "10.8": "mountainlion", - "10.9": "mavericks", - "10.10": "yosemite", - "10.11": "elcapitan"} - mac_ver = py_platform.mac_ver()[:-2] - try: - os_name = mac_releases[mac_ver] - return OperatingSystem(os_name, mac_ver) - except KeyError: - os_name = "mac_os" - return OperatingSystem(os_name, mac_ver) - - def add_operating_system(self, name=None, operating_system=None): - if self.name == 'linux': - linux_os = self._detect_linux_os() - self.default_os = linux_os.name - self.operating_sys[linux_os.name] = linux_os - elif self.name == 'darwin': - mac_os = self._detect_mac_os() - self.default_os = mac_os.name - self.operating_sys[mac_os.name] = mac_os - else: - self.operating_sys[name] = operating_system + #def _detect_linux_os(self): + # return OperatingSystem(py_platform.dist()[0], py_platform.dist()[1]) + + #def _detect_mac_os(self): + # mac_releases = {'10.6': "snowleopard", + # "10.7": "lion", + # "10.8": "mountainlion", + # "10.9": "mavericks", + # "10.10": "yosemite", + # "10.11": "elcapitan"} + # mac_ver = py_platform.mac_ver()[:-2] + # try: + # os_name = mac_releases[mac_ver] + # return OperatingSystem(os_name, mac_ver) + # except KeyError: + # os_name = "mac_os" + # return OperatingSystem(os_name, mac_ver) + + def add_operating_system(self, name, os_class): + """ Add the operating_system class object into the + platform.operating_sys dictionary + """ + self.operating_sys[name] = os_class def operating_system(self, name): if name == 'default_os': @@ -207,27 +201,37 @@ class Platform(object): return (self.name, (_cmp_key(t) for t in self.targets.values()), (_cmp_key(o) for o in self.operating_sys.values())) + @key_ordering class OperatingSystem(object): - """ Operating System class. It will include the name and version. - The biggest attribute to this class will be the compiler finding - strategy. At the moment the compiler finding strategy is going to - be a string. + """ Operating System will be like a class similar to platform extended + by subclasses for the specifics. Operating System will contain the + compiler finding logic. Instead of calling two separate methods to + find compilers we call find_compilers method for each operating system """ def __init__(self, name, version): self.name = name self.version = version def __str__(self): - return self.name + return self.name + self.version def __repr__(self): return self.__str__() + + def compiler_strategy(self): + """ The compiler strategy will be overwritten by the subclass. + Depending on where it comes from it will either use compilers + based off of MODULES search method or the PATH search method + """ + raise NotImplementedError() def _cmp_key(self): return (self.name, self.version) + - +#NOTE: Key error caused because Architecture has no comparison method +@key_ordering class Arch(namedtuple("Arch", "platform platform_os target")): """ namedtuple for Architecture. Will have it's own __str__ method to make printing out the tuple easier and also won't make directory @@ -238,6 +242,22 @@ class Arch(namedtuple("Arch", "platform platform_os target")): return (self.platform.name +"-"+ self.platform_os.name + "-" + self.target.name) + def _cmp_key(self): + return (self.platform.name, self.platform_os.name, self.target.name) + + @staticmethod + def to_dict(platform, os_name, target): + """ This function will handle all the converting of dictionaries + for each of the architecture classes. This is better than having + each class have a to_dict method when creating the dict of dicts + arch class + """ + d = {} + d['platform'] = platform + d['operating_system'] = os_name + d['target'] = target.to_dict() + return d + @memoized def all_platforms(): modules = [] -- cgit v1.2.3-70-g09d2 From 725d6d5fce56aa7d0ae401ec71d1565835248250 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 14:52:09 -0800 Subject: import linux distro operating system subclass, set front-end os to LinuxDistro() --- lib/spack/spack/platforms/cray_xc.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index d48b6ffcfa..b58c84d3eb 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -1,6 +1,7 @@ import os -from spack.architecture import Platform, Target, OperatingSystem +from spack.architecture import Platform, Target +from spack.operating_system.linux_distro import LinuxDistro class CrayXc(Platform): priority = 20 @@ -9,8 +10,8 @@ class CrayXc(Platform): default = 'ivybridge' front_os = "SuSE11" - back_os = "GNU/Linux" - default_os = "GNU/Linux" + back_os = "CNL" + default_os = "CNL" def __init__(self): ''' Since cori doesn't have ivybridge as a front end it's better @@ -31,18 +32,12 @@ class CrayXc(Platform): # Could switch to use modules and fe targets for front end # Currently using compilers by path for front end. self.add_target('sandybridge', Target('sandybridge', 'PATH')) - self.add_target('ivybridge', Target('ivybridge', 'MODULES', 'craype-ivybridge')) - self.add_target('haswell', - Target('haswell', 'MODULES', 'craype-haswell')) - - self.add_operating_system('SuSE11', - OperatingSystem('SuSE11', '11')) + Target('haswell', 'MODULES', 'craype-haswell')) - self.add_operating_system('GNU/Linux', - OperatingSystem('GNU/Linux', '10')) + self.add_operating_system('SuSE11', LinuxDistro()) @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From 1a7d6ed49a8a3fd18fd3deb8ddc035ce0063766d Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 14:52:52 -0800 Subject: import MacOSX subclass and added add_operating_system method to use subclass --- lib/spack/spack/platforms/darwin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py index cfa1d957a1..5b797a78db 100644 --- a/lib/spack/spack/platforms/darwin.py +++ b/lib/spack/spack/platforms/darwin.py @@ -1,5 +1,6 @@ import subprocess from spack.architecture import Platform, Target +from spack.operating_system.mac_osx import MacOSX class Darwin(Platform): priority = 89 @@ -10,7 +11,9 @@ class Darwin(Platform): def __init__(self): super(Darwin, self).__init__('darwin') self.add_target(self.default, Target(self.default, 'PATH')) - self.add_operating_system() + mac_os = MacOSX() + self.default_os = mac_os.name + self.add_operating_system(mac_os.name, mac_os) @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From 22bf4bc08020898106ef2c8043f102ceeb83ec5c Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 14:53:16 -0800 Subject: import linux distro subclass. Added method to add operating system to platform dictionary --- lib/spack/spack/platforms/linux.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py index dcb08569a8..220f1bbaf4 100644 --- a/lib/spack/spack/platforms/linux.py +++ b/lib/spack/spack/platforms/linux.py @@ -1,5 +1,6 @@ import subprocess from spack.architecture import Platform, Target +from spack.operating_system.linux_distro import LinuxDistro class Linux(Platform): priority = 90 @@ -10,7 +11,9 @@ class Linux(Platform): def __init__(self): super(Linux, self).__init__('linux') self.add_target(self.default, Target(self.default, 'PATH')) - self.add_operating_system() + linux_dist = LinuxDistro() + self.default_os = str(linux_dist) + self.add_operating_system(str(linux_dist), linux_dist) @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From 1367ccab93e6263e11477abe7ea05f1ad74d88a2 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 14:53:55 -0800 Subject: New folder that will hold operating system subclasses --- lib/spack/spack/operating_system/__init__.py | 0 lib/spack/spack/operating_system/linux_distro.py | 25 +++++++++++++ lib/spack/spack/operating_system/mac_osx.py | 45 ++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 lib/spack/spack/operating_system/__init__.py create mode 100644 lib/spack/spack/operating_system/linux_distro.py create mode 100644 lib/spack/spack/operating_system/mac_osx.py diff --git a/lib/spack/spack/operating_system/__init__.py b/lib/spack/spack/operating_system/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/spack/spack/operating_system/linux_distro.py b/lib/spack/spack/operating_system/linux_distro.py new file mode 100644 index 0000000000..30a85fe61c --- /dev/null +++ b/lib/spack/spack/operating_system/linux_distro.py @@ -0,0 +1,25 @@ +import platform as py_platform +import spack +from spack.architecture import Platform, OperatingSystem + +class LinuxDistro(OperatingSystem): + """ This class will represent the autodetected operating system + for a Linux System. Since there are many different flavors of + Linux, this class will attempt to encompass them all through + autodetection using the python module platform and the method + platform.dist() + """ + def __init__(self): + def detect_operating_system(): + name = py_platform.dist()[0] + version = py_platform.dist()[1] + return name, version + + name, version = detect_operating_system() + + super(LinuxDistro, self).__init__(name, version) + + @property + def compiler_strategy(self): + return "PATH" + diff --git a/lib/spack/spack/operating_system/mac_osx.py b/lib/spack/spack/operating_system/mac_osx.py new file mode 100644 index 0000000000..0b939a5546 --- /dev/null +++ b/lib/spack/spack/operating_system/mac_osx.py @@ -0,0 +1,45 @@ +""" This class represents the MAC_OSX operating system. This will be auto + detected using the python platform.mac_ver. The MAC_OSX platform + will be represented using the major version operating system name, i.e + el capitan, yosemite...etc. +""" + +import spack +import os +import platform as py_platform +from spack.architecture import Platform, OperatingSystem + +class MacOSX(OperatingSystem): + def __init__(self): + """ Autodetects the mac version from a dictionary. Goes back as + far as 10.6 snowleopard. If the user has an older mac then + the version will just be a generic mac_os. + """ + + def get_mac_release(): + mac_releases = {'10.6': "snowleopard", + "10.7": "lion", + "10.8": "mountainlion", + "10.9": "mavericks", + "10.10": "yosemite", + "10.11": "elcapitan"} + + mac_ver = py_platform.mac_ver()[0][:-2] + try: + name = mac_releases[mac_ver] + return name, mac_ver + except KeyError: + name = "mac_os" + return name, mac_ver + + name, version = get_mac_release() + + super(MacOSX, self).__init__(name, version) + + @property + def compiler_strategy(self): + return "PATH" + + + + -- cgit v1.2.3-70-g09d2 From a385dae1aee6b7624707f42af8a6c52b9d9889bd Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 14:54:30 -0800 Subject: Unit tests to test operating system subclass creation and whether compiler strategy is set correctly --- lib/spack/spack/test/operating_system.py | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 lib/spack/spack/test/operating_system.py diff --git a/lib/spack/spack/test/operating_system.py b/lib/spack/spack/test/operating_system.py new file mode 100644 index 0000000000..9d6850bfa6 --- /dev/null +++ b/lib/spack/spack/test/operating_system.py @@ -0,0 +1,41 @@ +""" Test checks if the operating_system class is created correctly and that +the functions are using the correct operating_system. Also checks whether +the operating_system correctly uses the compiler_strategy +""" + +import unittest +import os +import platform +from spack.platforms.cray_xc import CrayXc +from spack.platforms.linux import Linux +from spack.platforms.darwin import Darwin +from spack.operating_system.linux_distro import LinuxDistro +from spack.operating_system.mac_osx import MacOSX + +class TestOperatingSystem(unittest.TestCase): + + def setUp(self): + cray_xc = CrayXc() + linux = Linux() + darwin = Darwin() + self.cray_operating_sys = cray_xc.operating_system('front_os') + self.darwin_operating_sys = darwin.operating_system('default_os') + self.linux_operating_sys = linux.operating_system('default_os') + + def test_cray_front_end_operating_system(self): + self.assertIsInstance(self.cray_operating_sys, LinuxDistro) + + def test_cray_front_end_compiler_strategy(self): + self.assertEquals(self.cray_operating_sys.compiler_strategy, "PATH") + + def test_linux_operating_system(self): + print self.linux_operating_sys + self.assertIsInstance(self.linux_operating_sys, LinuxDistro) + + def test_linux_compiler_strategy(self): + self.assertEquals(self.linux_operating_sys.compiler_strategy, "PATH") + + + + + -- cgit v1.2.3-70-g09d2 From ebc5e26c2d95971f414378631089fee270beeb51 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 16:16:20 -0800 Subject: Added compiler strategy field to Operating System class --- lib/spack/spack/architecture.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 3ba45f3d82..574076bae4 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -209,26 +209,28 @@ class OperatingSystem(object): compiler finding logic. Instead of calling two separate methods to find compilers we call find_compilers method for each operating system """ - def __init__(self, name, version): + + def __init__(self, name, version, compiler_strategy): self.name = name self.version = version + self.compiler_strategy = compiler_strategy def __str__(self): return self.name + self.version def __repr__(self): return self.__str__() - - def compiler_strategy(self): - """ The compiler strategy will be overwritten by the subclass. - Depending on where it comes from it will either use compilers - based off of MODULES search method or the PATH search method - """ - raise NotImplementedError() def _cmp_key(self): return (self.name, self.version) + def compiler_strategy(self): + """ Operating Systems will now be in charge of the compiler finding + strategy. They will each have their own find_compilers method + which depending on their compiler strategy will find the compilers + using a specific method (i.e PATH vs MODULES) + """ + raise NotImplementedError() #NOTE: Key error caused because Architecture has no comparison method @key_ordering -- cgit v1.2.3-70-g09d2 From 3c87d137a3f0823289c52ffff87e58b8b1d7e271 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 16:17:33 -0800 Subject: Added compiler strategy entry and also added new operating system subclass called CNL for compute node linux (name will probably change because I can't find docs on the EXACT name) --- lib/spack/spack/operating_system/cnl.py | 20 ++++++++++++++++++++ lib/spack/spack/operating_system/linux_distro.py | 10 +++++++--- lib/spack/spack/operating_system/mac_osx.py | 9 ++++++--- 3 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 lib/spack/spack/operating_system/cnl.py diff --git a/lib/spack/spack/operating_system/cnl.py b/lib/spack/spack/operating_system/cnl.py new file mode 100644 index 0000000000..e52052dfa8 --- /dev/null +++ b/lib/spack/spack/operating_system/cnl.py @@ -0,0 +1,20 @@ +import spack +from spack.architecture import OperatingSystem + +class ComputeNodeLinux(OperatingSystem): + """ Compute Node Linux (CNL) is the operating system used for the Cray XC + series super computers. It is a very stripped down version of GNU/Linux. + Any compilers found through this operating system will be used with + modules. If updated, user must make sure that version and name are + updated to indicate that OS has been upgraded (or downgraded) + """ + def __init__(self): + name = 'CNL' + version = '10' + super(ComputeNodeLinux, self).__init__(name, version, "MODULES") + + def compiler_strategy(self): + return self.compiler_strategy + + def find_compilers(self): + pass diff --git a/lib/spack/spack/operating_system/linux_distro.py b/lib/spack/spack/operating_system/linux_distro.py index 30a85fe61c..b11c7a88fa 100644 --- a/lib/spack/spack/operating_system/linux_distro.py +++ b/lib/spack/spack/operating_system/linux_distro.py @@ -17,9 +17,13 @@ class LinuxDistro(OperatingSystem): name, version = detect_operating_system() - super(LinuxDistro, self).__init__(name, version) + super(LinuxDistro, self).__init__(name, version, "PATH") - @property def compiler_strategy(self): - return "PATH" + return self.compiler_strategy + + def find_compilers(self): + pass + + diff --git a/lib/spack/spack/operating_system/mac_osx.py b/lib/spack/spack/operating_system/mac_osx.py index 0b939a5546..f52cdd6bc7 100644 --- a/lib/spack/spack/operating_system/mac_osx.py +++ b/lib/spack/spack/operating_system/mac_osx.py @@ -34,11 +34,14 @@ class MacOSX(OperatingSystem): name, version = get_mac_release() - super(MacOSX, self).__init__(name, version) + super(MacOSX, self).__init__(name, version, "PATH") - @property def compiler_strategy(self): - return "PATH" + return self.compiler_strategy + + def find_compilers(self): + pass + -- cgit v1.2.3-70-g09d2 From 083b7b46d92605269df05a9267657acf5e4b4677 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 16:17:54 -0800 Subject: Added more tests --- lib/spack/spack/test/operating_system.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/operating_system.py b/lib/spack/spack/test/operating_system.py index 9d6850bfa6..a4327dde83 100644 --- a/lib/spack/spack/test/operating_system.py +++ b/lib/spack/spack/test/operating_system.py @@ -11,6 +11,7 @@ from spack.platforms.linux import Linux from spack.platforms.darwin import Darwin from spack.operating_system.linux_distro import LinuxDistro from spack.operating_system.mac_osx import MacOSX +from spack.operating_system.cnl import ComputeNodeLinux class TestOperatingSystem(unittest.TestCase): @@ -19,6 +20,8 @@ class TestOperatingSystem(unittest.TestCase): linux = Linux() darwin = Darwin() self.cray_operating_sys = cray_xc.operating_system('front_os') + self.cray_default_os = cray_xc.operating_system('default_os') + self.cray_back_os = cray_xc.operating_system('back_os') self.darwin_operating_sys = darwin.operating_system('default_os') self.linux_operating_sys = linux.operating_system('default_os') @@ -28,6 +31,12 @@ class TestOperatingSystem(unittest.TestCase): def test_cray_front_end_compiler_strategy(self): self.assertEquals(self.cray_operating_sys.compiler_strategy, "PATH") + def test_cray_back_end_operating_system(self): + self.assertIsInstance(self.cray_back_os,ComputeNodeLinux) + + def test_cray_back_end_compiler_strategy(self): + self.assertEquals(self.cray_back_os.compiler_strategy, "MODULES") + def test_linux_operating_system(self): print self.linux_operating_sys self.assertIsInstance(self.linux_operating_sys, LinuxDistro) @@ -35,7 +44,16 @@ class TestOperatingSystem(unittest.TestCase): def test_linux_compiler_strategy(self): self.assertEquals(self.linux_operating_sys.compiler_strategy, "PATH") - + + def test_cray_front_end_compiler_list(self): + """ Operating systems will now be in charge of finding compilers. + So, depending on which operating system you want to build for + or which operating system you are on, then you could detect + compilers in a certain way. Cray linux environment on the front + end is just a regular linux distro whereas the Cray linux compute + node is a stripped down version which modules are important + """ + self.assertEquals(True, False) -- cgit v1.2.3-70-g09d2 From cfa7c4feb8419f82a864f9d1afcab69965e9c996 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 22 Feb 2016 16:18:25 -0800 Subject: Added CNL10 as back_os and default_os --- lib/spack/spack/platforms/cray_xc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index b58c84d3eb..dffa2e4031 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -2,6 +2,7 @@ import os from spack.architecture import Platform, Target from spack.operating_system.linux_distro import LinuxDistro +from spack.operating_system.cnl import ComputeNodeLinux class CrayXc(Platform): priority = 20 @@ -10,8 +11,8 @@ class CrayXc(Platform): default = 'ivybridge' front_os = "SuSE11" - back_os = "CNL" - default_os = "CNL" + back_os = "CNL10" + default_os = "CNL10" def __init__(self): ''' Since cori doesn't have ivybridge as a front end it's better @@ -38,6 +39,7 @@ class CrayXc(Platform): Target('haswell', 'MODULES', 'craype-haswell')) self.add_operating_system('SuSE11', LinuxDistro()) + self.add_operating_system('CNL10', ComputeNodeLinux()) @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From 5d5d3c5858a8882b615fb97fb07e335dc6c17f14 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 24 Feb 2016 12:15:52 -0800 Subject: Added to dictionary method --- lib/spack/spack/architecture.py | 95 ++++++++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 574076bae4..109e599470 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -89,7 +89,7 @@ class Target(object): return target def _cmp_key(self): - return (self.name, self.compiler_strategy, self.module_name) + return (self.name, self.module_name) def __repr__(self): return self.__str__() @@ -200,7 +200,6 @@ class Platform(object): def _cmp_key(self): return (self.name, (_cmp_key(t) for t in self.targets.values()), (_cmp_key(o) for o in self.operating_sys.values())) - @key_ordering class OperatingSystem(object): @@ -221,17 +220,19 @@ class OperatingSystem(object): def __repr__(self): return self.__str__() - def _cmp_key(self): - return (self.name, self.version) def compiler_strategy(self): """ Operating Systems will now be in charge of the compiler finding strategy. They will each have their own find_compilers method which depending on their compiler strategy will find the compilers - using a specific method (i.e PATH vs MODULES) + using a specific method (i.e PATH vs MODULES). """ raise NotImplementedError() + def _cmp_key(self): + return (self.name, self.version, self.compiler_strategy) + + #NOTE: Key error caused because Architecture has no comparison method @key_ordering class Arch(namedtuple("Arch", "platform platform_os target")): @@ -241,24 +242,77 @@ class Arch(namedtuple("Arch", "platform platform_os target")): __slots__ = () def __str__(self): - return (self.platform.name +"-"+ - self.platform_os.name + "-" + self.target.name) - + return (self.platform.name +"-"+ self.platform_os.name + "-" + self.target.name) + def _cmp_key(self): return (self.platform.name, self.platform_os.name, self.target.name) - @staticmethod - def to_dict(platform, os_name, target): - """ This function will handle all the converting of dictionaries - for each of the architecture classes. This is better than having - each class have a to_dict method when creating the dict of dicts - arch class - """ - d = {} - d['platform'] = platform - d['operating_system'] = os_name - d['target'] = target.to_dict() - return d + +def _helper_to_dict(arch_field_dict, arch_field_name, *args): + """ General method to turn each class in architecture into a + dictionary. Takes as argument the class dictionary, + """ + d = {} + d[arch_field_name] = {} + for items in args: + d[arch_field_name][items] = arch_field_dict[items] + return d + +def to_dict(arch): + d = {} + d['architecture'] = {} + + platform = arch.platform.__dict__ + platform_os = arch.platform_os.__dict__ + target = arch.target.__dict__ + + platform_dict = _helper_to_dict(platform,'platform','name') + os_dict = _helper_to_dict(platform_os, 'platform_os', 'name','version', + 'compiler_strategy') + target_dict = _helper_to_dict(target,'target', 'name', + 'module_name','platform_name') + + d['architecture'].update(platform_dict) + d['architecture'].update(os_dict) + d['architecture'].update(target_dict) + + return d + +def _platform_from_dict(platform): + platform_list = all_platforms() + platform_names = {plat.__name__.lower():plat for plat in platform_list} + return platform_names[platform['name']]() + + +def _target_from_dict(target): + target = Target.__new__(Target) + target.name = d['name'] + target.compiler_strategy = d['compiler_strategy'] + target.module_name = d['module_name'] + if 'platform' in d: + target.platform_name = d['platform'] + return target + +def _operating_system_from_dict(os_dict): + pass + +def arch_from_dict(d): + if d is None: + return None + arch = Arch + platform_dict = d['platform'] + platform_os_dict = d['platform_os'] + target_dict = d['target'] + + platform = _platform_from_dict(platform_dict) + platform_os = _operating_system_from_dict(platform_os_dict) + target = _target_from_dict(target_dict) + + arch.platform = platform + arch.platform_os = platform_os + arch.target = target + + return arch @memoized def all_platforms(): @@ -278,7 +332,6 @@ def all_platforms(): return modules - @memoized def sys_type(): """ Gather a list of all available subclasses of platforms. -- cgit v1.2.3-70-g09d2 From 339f4bfd23b097d009009b6dabd524f8bc831449 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 24 Feb 2016 12:16:09 -0800 Subject: Added unit testing for to_dict method --- lib/spack/spack/test/architecture.py | 43 ++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index cf7938f5d6..5bc78d1b65 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -6,19 +6,58 @@ import os import platform import spack from spack.architecture import * +import spack.spec from spack.platforms.cray_xc import CrayXc from spack.platforms.linux import Linux from spack.platforms.bgq import Bgq from spack.platforms.darwin import Darwin class ArchitectureTest(unittest.TestCase): + + def setUp(self): + zlib = spack.spec.Spec("zlib") + zlib.concretize() + self.architecture = zlib.architecture + self.platform = sys_type() + self.platform_os = self.platform.operating_system('default_os') + self.target = self.platform.target('default') + + #def test_to_dict_function_with_target(self): + # d = spack.architecture.to_dict(self.architecture) + # print d['target'] + # self.assertEquals(d['target'], {'name': self.target.name, + # 'module_name' : self.target.module_name, + # 'platform_name' : self.target.platform_name, + # 'compiler_strategy': 'MODULES' + # }) + + def test_to_dict_function_with_architecture(self): + d = spack.architecture.to_dict(self.architecture) + self.assertEquals(d, {'architecture': + {'platform' : {'name': 'crayxc'}, + 'platform_os': { + 'compiler_strategy': 'MODULES', + 'name':'CNL', + 'version':'10'}, + 'target' : {'platform_name' :'crayxc', + 'module_name': 'craype-haswell', + 'name':'haswell'}}}) + + #def test_to_dict_function_with_operating_system(self): + # d = spack.architecture.to_dict(self.architecture) + # self.assertEquals(d['platform_os'], {'name': self.platform_os.name, + # 'version': self.platform_os.version, + # 'compiler_strategy': self.platform_os.compiler_strategy}) + + def test_architecture_from_dict(self): + pass def test_platform_class_and_compiler_strategies(self): a = CrayXc() - t = a.target('default') + t = a.operating_system('default_os') self.assertEquals(t.compiler_strategy, 'MODULES') b = Linux() - s = b.target('default') + s = b.operating_system('default_os') self.assertEquals(s.compiler_strategy, 'PATH') def test_sys_type(self): -- cgit v1.2.3-70-g09d2 From 77799741430796974809fce0f08d099303ec6da6 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 24 Feb 2016 15:02:40 -0800 Subject: arch_from_dict worked on --- lib/spack/spack/architecture.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 109e599470..f0fc00242c 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -294,7 +294,11 @@ def _target_from_dict(target): return target def _operating_system_from_dict(os_dict): - pass + name = os_dict['name'] + os_list = all_platforms(True) + os_classes = {o.__name__.lower():o for o in os_list} + return os_classes[name]() + def arch_from_dict(d): if d is None: @@ -315,11 +319,19 @@ def arch_from_dict(d): return arch @memoized -def all_platforms(): +def all_platforms(operating_system=False): modules = [] - for name in list_modules(spack.platform_path): - mod_name = 'spack.platformss' + name - path = join_path(spack.platform_path, name) + ".py" + + if operating_system: + mod_path = spack.operating_system_path + mod_string = "spack.operating_system." + else: + mod_path = spack.platform_path + mod_string = "spack.platformss" + + for name in list_modules(mod_path): + mod_name = mod_string + name + path = join_path(mod_path, name) + ".py" mod = imp.load_source(mod_name, path) class_name = mod_to_class(name) if not hasattr(mod, class_name): -- cgit v1.2.3-70-g09d2 From 9e844d974c2bce42b3e6e647c16b10aa122e54ce Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 24 Feb 2016 15:30:20 -0800 Subject: Added comments. Need to figure out how to make arch_tuple from_dict --- lib/spack/spack/architecture.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index f0fc00242c..4b24680501 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -250,7 +250,8 @@ class Arch(namedtuple("Arch", "platform platform_os target")): def _helper_to_dict(arch_field_dict, arch_field_name, *args): """ General method to turn each class in architecture into a - dictionary. Takes as argument the class dictionary, + dictionary. Takes as argument the class dictionary, the field name + (platform, platform_os, target) and then any attribute args """ d = {} d[arch_field_name] = {} @@ -294,10 +295,11 @@ def _target_from_dict(target): return target def _operating_system_from_dict(os_dict): + #TODO: Have a way to recognize the OS subclasses name = os_dict['name'] os_list = all_platforms(True) - os_classes = {o.__name__.lower():o for o in os_list} - return os_classes[name]() + os_classes = {o.__name__:o for o in os_list} + def arch_from_dict(d): @@ -318,6 +320,7 @@ def arch_from_dict(d): return arch +#TODO: Haven't changed name here but all_platforms should now pull os class list @memoized def all_platforms(operating_system=False): modules = [] -- cgit v1.2.3-70-g09d2 From 2de81cfc62ca456b1f303d64198590eb003fdcd3 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 24 Feb 2016 15:31:21 -0800 Subject: Changed name to appropriate camelcase --- lib/spack/spack/operating_system/cnl.py | 4 +-- lib/spack/spack/operating_system/linux_distro.py | 10 ++---- lib/spack/spack/operating_system/mac_osx.py | 42 ++++++++++-------------- 3 files changed, 22 insertions(+), 34 deletions(-) diff --git a/lib/spack/spack/operating_system/cnl.py b/lib/spack/spack/operating_system/cnl.py index e52052dfa8..07221630f2 100644 --- a/lib/spack/spack/operating_system/cnl.py +++ b/lib/spack/spack/operating_system/cnl.py @@ -1,7 +1,7 @@ import spack from spack.architecture import OperatingSystem -class ComputeNodeLinux(OperatingSystem): +class Cnl(OperatingSystem): """ Compute Node Linux (CNL) is the operating system used for the Cray XC series super computers. It is a very stripped down version of GNU/Linux. Any compilers found through this operating system will be used with @@ -11,7 +11,7 @@ class ComputeNodeLinux(OperatingSystem): def __init__(self): name = 'CNL' version = '10' - super(ComputeNodeLinux, self).__init__(name, version, "MODULES") + super(Cnl, self).__init__(name, version, "MODULES") def compiler_strategy(self): return self.compiler_strategy diff --git a/lib/spack/spack/operating_system/linux_distro.py b/lib/spack/spack/operating_system/linux_distro.py index b11c7a88fa..1345b7d618 100644 --- a/lib/spack/spack/operating_system/linux_distro.py +++ b/lib/spack/spack/operating_system/linux_distro.py @@ -1,6 +1,6 @@ import platform as py_platform import spack -from spack.architecture import Platform, OperatingSystem +from spack.architecture import OperatingSystem class LinuxDistro(OperatingSystem): """ This class will represent the autodetected operating system @@ -10,13 +10,9 @@ class LinuxDistro(OperatingSystem): platform.dist() """ def __init__(self): - def detect_operating_system(): - name = py_platform.dist()[0] - version = py_platform.dist()[1] - return name, version + name = py_platform.dist()[0] + version = py_platform.dist()[1] - name, version = detect_operating_system() - super(LinuxDistro, self).__init__(name, version, "PATH") def compiler_strategy(self): diff --git a/lib/spack/spack/operating_system/mac_osx.py b/lib/spack/spack/operating_system/mac_osx.py index f52cdd6bc7..6fb6fef138 100644 --- a/lib/spack/spack/operating_system/mac_osx.py +++ b/lib/spack/spack/operating_system/mac_osx.py @@ -3,38 +3,30 @@ will be represented using the major version operating system name, i.e el capitan, yosemite...etc. """ - -import spack -import os import platform as py_platform -from spack.architecture import Platform, OperatingSystem +import spack +from spack.architecture import OperatingSystem -class MacOSX(OperatingSystem): +class MacOsx(OperatingSystem): def __init__(self): """ Autodetects the mac version from a dictionary. Goes back as far as 10.6 snowleopard. If the user has an older mac then the version will just be a generic mac_os. """ - - def get_mac_release(): - mac_releases = {'10.6': "snowleopard", - "10.7": "lion", - "10.8": "mountainlion", - "10.9": "mavericks", - "10.10": "yosemite", - "10.11": "elcapitan"} - - mac_ver = py_platform.mac_ver()[0][:-2] - try: - name = mac_releases[mac_ver] - return name, mac_ver - except KeyError: - name = "mac_os" - return name, mac_ver - - name, version = get_mac_release() - - super(MacOSX, self).__init__(name, version, "PATH") + mac_releases = {'10.6': "snowleopard", + "10.7": "lion", + "10.8": "mountainlion", + "10.9": "mavericks", + "10.10": "yosemite", + "10.11": "elcapitan"} + + mac_ver = py_platform.mac_ver()[0][:-2] + try: + name = mac_releases[mac_ver] + except KeyError: + name = "mac_os" + + super(MacOsx, self).__init__(name, mac_ver, "PATH") def compiler_strategy(self): return self.compiler_strategy -- cgit v1.2.3-70-g09d2 From 234681306cdfb9aea9772781fcb68c4045bdc315 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 24 Feb 2016 15:32:23 -0800 Subject: Changed to appropriate class names for operating system --- lib/spack/spack/platforms/cray_xc.py | 5 ++--- lib/spack/spack/platforms/darwin.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index dffa2e4031..da90726fef 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -1,8 +1,7 @@ import os - from spack.architecture import Platform, Target from spack.operating_system.linux_distro import LinuxDistro -from spack.operating_system.cnl import ComputeNodeLinux +from spack.operating_system.cnl import Cnl class CrayXc(Platform): priority = 20 @@ -39,7 +38,7 @@ class CrayXc(Platform): Target('haswell', 'MODULES', 'craype-haswell')) self.add_operating_system('SuSE11', LinuxDistro()) - self.add_operating_system('CNL10', ComputeNodeLinux()) + self.add_operating_system('CNL10', Cnl()) @classmethod def detect(self): diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py index 5b797a78db..4512857371 100644 --- a/lib/spack/spack/platforms/darwin.py +++ b/lib/spack/spack/platforms/darwin.py @@ -1,6 +1,6 @@ import subprocess from spack.architecture import Platform, Target -from spack.operating_system.mac_osx import MacOSX +from spack.operating_system.mac_osx import MacOsx class Darwin(Platform): priority = 89 @@ -11,7 +11,7 @@ class Darwin(Platform): def __init__(self): super(Darwin, self).__init__('darwin') self.add_target(self.default, Target(self.default, 'PATH')) - mac_os = MacOSX() + mac_os = MacOsx() self.default_os = mac_os.name self.add_operating_system(mac_os.name, mac_os) -- cgit v1.2.3-70-g09d2 From 5c3c6e7f066a3f95f9113c46640546516d7a8257 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 24 Feb 2016 15:34:32 -0800 Subject: Got rid of print statements --- lib/spack/spack/test/operating_system.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/spack/test/operating_system.py b/lib/spack/spack/test/operating_system.py index a4327dde83..205408db3f 100644 --- a/lib/spack/spack/test/operating_system.py +++ b/lib/spack/spack/test/operating_system.py @@ -38,7 +38,6 @@ class TestOperatingSystem(unittest.TestCase): self.assertEquals(self.cray_back_os.compiler_strategy, "MODULES") def test_linux_operating_system(self): - print self.linux_operating_sys self.assertIsInstance(self.linux_operating_sys, LinuxDistro) def test_linux_compiler_strategy(self): -- cgit v1.2.3-70-g09d2 From bd7c189c123154e88e092eadbbd93b00ce43cc6a Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 24 Feb 2016 15:37:50 -0800 Subject: Added more comments --- lib/spack/spack/spec.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 0b42498910..c8c114a8b1 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -661,12 +661,14 @@ class Spec(object): 'dependencies' : dict((d, self.dependencies[d].dag_hash()) for d in sorted(self.dependencies)) } + if self.architecture: # TODO: Fix the target.to_dict to account for the tuple # Want it to be a dict of dicts - d['architecture'] = self.architecture.target.to_dict() + d['architecture'] = spack.architecture.to_dict(self.architecture) else: d['architecture'] = None + if self.compiler: d.update(self.compiler.to_dict()) else: @@ -693,8 +695,7 @@ class Spec(object): spec = Spec(name) spec.versions = VersionList.from_dict(node) # TODO: Need to fix the architecture.Target.from_dict - spec.architecture = spack.architecture.Target.from_dict( - node['architecture']) + spec.architecture = spack.architecture.from_dict(node['architecture']) if node['compiler'] is None: spec.compiler = None @@ -1292,17 +1293,17 @@ class Spec(object): for entry in arch_list: if self._is_valid_platform(entry, platform_names): + # If entry is different from platform name then create it. + # else just keep the already instantiated platform class if entry != platform.name: platform = platform_dict[entry]() # Create instance of platform elif self._is_valid_target(entry, platform): target = platform.target(entry) - # Need to figure out if we're supporting arbitrary os's and how - # to account for them - # Not really a good implementation since the user can add - # gibberish and spack will see it as an os + # check if os is valid by checking platform operating sys dict elif self._is_valid_os(entry, platform): platform_os = platform.operating_system(entry) else: + # throw error since entry is unknown raise UnknownArchitectureSpecError(entry) if target is None: -- cgit v1.2.3-70-g09d2 From 8d1c06d14125d86c24584c7e6f0a9ab0d300d10f Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 24 Feb 2016 15:38:33 -0800 Subject: Changed to dict method. Didn't realize this was being assigned to a dictionary already so got rid of d['architecture'] --- lib/spack/spack/architecture.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 4b24680501..e76e411ae0 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -261,8 +261,7 @@ def _helper_to_dict(arch_field_dict, arch_field_name, *args): def to_dict(arch): d = {} - d['architecture'] = {} - + platform = arch.platform.__dict__ platform_os = arch.platform_os.__dict__ target = arch.target.__dict__ @@ -273,9 +272,9 @@ def to_dict(arch): target_dict = _helper_to_dict(target,'target', 'name', 'module_name','platform_name') - d['architecture'].update(platform_dict) - d['architecture'].update(os_dict) - d['architecture'].update(target_dict) + d.update(platform_dict) + d.update(os_dict) + d.update(target_dict) return d -- cgit v1.2.3-70-g09d2 From 863a5bc4fa7d6b880769192e4fcb7a461a6a0063 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 10:34:55 -0800 Subject: Fix for 'Parent module spack.operating_systems not found while handling absolute import' --- lib/spack/spack/architecture.py | 42 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index e76e411ae0..5827427003 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -67,26 +67,26 @@ class Target(object): def set_platform(self, platform): self.platform_name = platform.name - def to_dict(self): - d = {} - d['name'] = self.name - d['compiler_strategy'] = self.compiler_strategy - d['module_name'] = self.module_name - if self.platform_name: - d['platform'] = self.platform_name - return d - - @staticmethod - def from_dict(d): - if d is None: - return None - target = Target.__new__(Target) - target.name = d['name'] - target.compiler_strategy = d['compiler_strategy'] - target.module_name = d['module_name'] - if 'platform' in d: - target.platform_name = d['platform'] - return target + #def to_dict(self): + # d = {} + # d['name'] = self.name + # d['compiler_strategy'] = self.compiler_strategy + # d['module_name'] = self.module_name + # if self.platform_name: + # d['platform'] = self.platform_name + # return d + + #@staticmethod + #def from_dict(d): + # if d is None: + # return None + # target = Target.__new__(Target) + # target.name = d['name'] + # target.compiler_strategy = d['compiler_strategy'] + # target.module_name = d['module_name'] + # if 'platform' in d: + # target.platform_name = d['platform'] + # return target def _cmp_key(self): return (self.name, self.module_name) @@ -326,7 +326,7 @@ def all_platforms(operating_system=False): if operating_system: mod_path = spack.operating_system_path - mod_string = "spack.operating_system." + mod_string = "spack.operating_systems" else: mod_path = spack.platform_path mod_string = "spack.platformss" -- cgit v1.2.3-70-g09d2 From 34be473b7cfbb23d4deb5c3f9774bc1acea22574 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 10:35:58 -0800 Subject: Deleted files --- lib/spack/spack/operating_systems/cnl.py | 19 +++++++++++ lib/spack/spack/operating_systems/linux_distro.py | 24 ++++++++++++++ lib/spack/spack/operating_systems/mac_osx.py | 40 +++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 lib/spack/spack/operating_systems/cnl.py create mode 100644 lib/spack/spack/operating_systems/linux_distro.py create mode 100644 lib/spack/spack/operating_systems/mac_osx.py diff --git a/lib/spack/spack/operating_systems/cnl.py b/lib/spack/spack/operating_systems/cnl.py new file mode 100644 index 0000000000..20cb4c215b --- /dev/null +++ b/lib/spack/spack/operating_systems/cnl.py @@ -0,0 +1,19 @@ +from spack.architecture import OperatingSystem + +class Cnl(OperatingSystem): + """ Compute Node Linux (CNL) is the operating system used for the Cray XC + series super computers. It is a very stripped down version of GNU/Linux. + Any compilers found through this operating system will be used with + modules. If updated, user must make sure that version and name are + updated to indicate that OS has been upgraded (or downgraded) + """ + def __init__(self): + name = 'CNL' + version = '10' + super(Cnl, self).__init__(name, version, "MODULES") + + def compiler_strategy(self): + return self.compiler_strategy + + def find_compilers(self): + pass diff --git a/lib/spack/spack/operating_systems/linux_distro.py b/lib/spack/spack/operating_systems/linux_distro.py new file mode 100644 index 0000000000..c5547749d8 --- /dev/null +++ b/lib/spack/spack/operating_systems/linux_distro.py @@ -0,0 +1,24 @@ +import platform as py_platform +from spack.architecture import OperatingSystem + +class LinuxDistro(OperatingSystem): + """ This class will represent the autodetected operating system + for a Linux System. Since there are many different flavors of + Linux, this class will attempt to encompass them all through + autodetection using the python module platform and the method + platform.dist() + """ + def __init__(self): + name = py_platform.dist()[0] + version = py_platform.dist()[1] + + super(LinuxDistro, self).__init__(name, version, "PATH") + + def compiler_strategy(self): + return self.compiler_strategy + + def find_compilers(self): + pass + + + diff --git a/lib/spack/spack/operating_systems/mac_osx.py b/lib/spack/spack/operating_systems/mac_osx.py new file mode 100644 index 0000000000..555c5cfb14 --- /dev/null +++ b/lib/spack/spack/operating_systems/mac_osx.py @@ -0,0 +1,40 @@ +import platform as py_platform +from spack.architecture import OperatingSystem + +class MacOsx(OperatingSystem): + """ This class represents the MAC_OSX operating system. This will be auto + detected using the python platform.mac_ver. The MAC_OSX platform + will be represented using the major version operating system name, i.e + el capitan, yosemite...etc. + """ + + def __init__(self): + """ Autodetects the mac version from a dictionary. Goes back as + far as 10.6 snowleopard. If the user has an older mac then + the version will just be a generic mac_os. + """ + mac_releases = {'10.6': "snowleopard", + "10.7": "lion", + "10.8": "mountainlion", + "10.9": "mavericks", + "10.10": "yosemite", + "10.11": "elcapitan"} + + mac_ver = py_platform.mac_ver()[0][:-2] + try: + name = mac_releases[mac_ver] + except KeyError: + name = "mac_os" + + super(MacOsx, self).__init__(name, mac_ver, "PATH") + + def compiler_strategy(self): + return self.compiler_strategy + + def find_compilers(self): + pass + + + + + -- cgit v1.2.3-70-g09d2 From f1616099292251f208ec0cfdec3d1b092d4441b9 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 10:36:12 -0800 Subject: Renamed operating_system to operating_systems --- lib/spack/spack/operating_systems/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 lib/spack/spack/operating_systems/__init__.py diff --git a/lib/spack/spack/operating_systems/__init__.py b/lib/spack/spack/operating_systems/__init__.py new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3-70-g09d2 From b43a5498a159c634ca88341d3010bc1c98197e24 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 10:36:47 -0800 Subject: Changed import path to operating_systems --- lib/spack/spack/platforms/bgq.py | 1 - lib/spack/spack/platforms/cray_xc.py | 4 ++-- lib/spack/spack/platforms/darwin.py | 2 +- lib/spack/spack/platforms/linux.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/platforms/bgq.py b/lib/spack/spack/platforms/bgq.py index 6e872d2e72..b550f1d5cb 100644 --- a/lib/spack/spack/platforms/bgq.py +++ b/lib/spack/spack/platforms/bgq.py @@ -1,5 +1,4 @@ import os - from spack.architecture import Platform, Target class Bgq(Platform): diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index da90726fef..ea3ae0e477 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -1,7 +1,7 @@ import os from spack.architecture import Platform, Target -from spack.operating_system.linux_distro import LinuxDistro -from spack.operating_system.cnl import Cnl +from spack.operating_systems.linux_distro import LinuxDistro +from spack.operating_systems.cnl import Cnl class CrayXc(Platform): priority = 20 diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py index 4512857371..c48f7d17d2 100644 --- a/lib/spack/spack/platforms/darwin.py +++ b/lib/spack/spack/platforms/darwin.py @@ -1,6 +1,6 @@ import subprocess from spack.architecture import Platform, Target -from spack.operating_system.mac_osx import MacOsx +from spack.operating_systems.mac_osx import MacOsx class Darwin(Platform): priority = 89 diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py index 220f1bbaf4..1b22b69048 100644 --- a/lib/spack/spack/platforms/linux.py +++ b/lib/spack/spack/platforms/linux.py @@ -1,6 +1,6 @@ import subprocess from spack.architecture import Platform, Target -from spack.operating_system.linux_distro import LinuxDistro +from spack.operating_systems.linux_distro import LinuxDistro class Linux(Platform): priority = 90 -- cgit v1.2.3-70-g09d2 From 9ac2556285ae38dd6d661d9bba811a5e007cb551 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 10:41:28 -0800 Subject: Deleted old operating_system (without the s) file --- lib/spack/spack/operating_system/__init__.py | 0 lib/spack/spack/operating_system/cnl.py | 20 ------------ lib/spack/spack/operating_system/linux_distro.py | 25 --------------- lib/spack/spack/operating_system/mac_osx.py | 40 ------------------------ 4 files changed, 85 deletions(-) delete mode 100644 lib/spack/spack/operating_system/__init__.py delete mode 100644 lib/spack/spack/operating_system/cnl.py delete mode 100644 lib/spack/spack/operating_system/linux_distro.py delete mode 100644 lib/spack/spack/operating_system/mac_osx.py diff --git a/lib/spack/spack/operating_system/__init__.py b/lib/spack/spack/operating_system/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/spack/spack/operating_system/cnl.py b/lib/spack/spack/operating_system/cnl.py deleted file mode 100644 index 07221630f2..0000000000 --- a/lib/spack/spack/operating_system/cnl.py +++ /dev/null @@ -1,20 +0,0 @@ -import spack -from spack.architecture import OperatingSystem - -class Cnl(OperatingSystem): - """ Compute Node Linux (CNL) is the operating system used for the Cray XC - series super computers. It is a very stripped down version of GNU/Linux. - Any compilers found through this operating system will be used with - modules. If updated, user must make sure that version and name are - updated to indicate that OS has been upgraded (or downgraded) - """ - def __init__(self): - name = 'CNL' - version = '10' - super(Cnl, self).__init__(name, version, "MODULES") - - def compiler_strategy(self): - return self.compiler_strategy - - def find_compilers(self): - pass diff --git a/lib/spack/spack/operating_system/linux_distro.py b/lib/spack/spack/operating_system/linux_distro.py deleted file mode 100644 index 1345b7d618..0000000000 --- a/lib/spack/spack/operating_system/linux_distro.py +++ /dev/null @@ -1,25 +0,0 @@ -import platform as py_platform -import spack -from spack.architecture import OperatingSystem - -class LinuxDistro(OperatingSystem): - """ This class will represent the autodetected operating system - for a Linux System. Since there are many different flavors of - Linux, this class will attempt to encompass them all through - autodetection using the python module platform and the method - platform.dist() - """ - def __init__(self): - name = py_platform.dist()[0] - version = py_platform.dist()[1] - - super(LinuxDistro, self).__init__(name, version, "PATH") - - def compiler_strategy(self): - return self.compiler_strategy - - def find_compilers(self): - pass - - - diff --git a/lib/spack/spack/operating_system/mac_osx.py b/lib/spack/spack/operating_system/mac_osx.py deleted file mode 100644 index 6fb6fef138..0000000000 --- a/lib/spack/spack/operating_system/mac_osx.py +++ /dev/null @@ -1,40 +0,0 @@ -""" This class represents the MAC_OSX operating system. This will be auto - detected using the python platform.mac_ver. The MAC_OSX platform - will be represented using the major version operating system name, i.e - el capitan, yosemite...etc. -""" -import platform as py_platform -import spack -from spack.architecture import OperatingSystem - -class MacOsx(OperatingSystem): - def __init__(self): - """ Autodetects the mac version from a dictionary. Goes back as - far as 10.6 snowleopard. If the user has an older mac then - the version will just be a generic mac_os. - """ - mac_releases = {'10.6': "snowleopard", - "10.7": "lion", - "10.8": "mountainlion", - "10.9": "mavericks", - "10.10": "yosemite", - "10.11": "elcapitan"} - - mac_ver = py_platform.mac_ver()[0][:-2] - try: - name = mac_releases[mac_ver] - except KeyError: - name = "mac_os" - - super(MacOsx, self).__init__(name, mac_ver, "PATH") - - def compiler_strategy(self): - return self.compiler_strategy - - def find_compilers(self): - pass - - - - - -- cgit v1.2.3-70-g09d2 From 550df4cdd6ce1760370e18a858da624167a3139a Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 11:47:27 -0800 Subject: Some cleaning up. Finally got arch_from_dict working successfully. --- lib/spack/spack/architecture.py | 81 ++++++++--------------------------------- 1 file changed, 15 insertions(+), 66 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 5827427003..7bf5afcf63 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -67,27 +67,6 @@ class Target(object): def set_platform(self, platform): self.platform_name = platform.name - #def to_dict(self): - # d = {} - # d['name'] = self.name - # d['compiler_strategy'] = self.compiler_strategy - # d['module_name'] = self.module_name - # if self.platform_name: - # d['platform'] = self.platform_name - # return d - - #@staticmethod - #def from_dict(d): - # if d is None: - # return None - # target = Target.__new__(Target) - # target.name = d['name'] - # target.compiler_strategy = d['compiler_strategy'] - # target.module_name = d['module_name'] - # if 'platform' in d: - # target.platform_name = d['platform'] - # return target - def _cmp_key(self): return (self.name, self.module_name) @@ -147,24 +126,6 @@ class Platform(object): name = self.back_end return self.targets[name] - - #def _detect_linux_os(self): - # return OperatingSystem(py_platform.dist()[0], py_platform.dist()[1]) - - #def _detect_mac_os(self): - # mac_releases = {'10.6': "snowleopard", - # "10.7": "lion", - # "10.8": "mountainlion", - # "10.9": "mavericks", - # "10.10": "yosemite", - # "10.11": "elcapitan"} - # mac_ver = py_platform.mac_ver()[:-2] - # try: - # os_name = mac_releases[mac_ver] - # return OperatingSystem(os_name, mac_ver) - # except KeyError: - # os_name = "mac_os" - # return OperatingSystem(os_name, mac_ver) def add_operating_system(self, name, os_class): """ Add the operating_system class object into the @@ -242,7 +203,8 @@ class Arch(namedtuple("Arch", "platform platform_os target")): __slots__ = () def __str__(self): - return (self.platform.name +"-"+ self.platform_os.name + "-" + self.target.name) + return (self.platform.name +"-"+ + self.platform_os.name + "-" + self.target.name) def _cmp_key(self): return (self.platform.name, self.platform_os.name, self.target.name) @@ -284,52 +246,39 @@ def _platform_from_dict(platform): return platform_names[platform['name']]() -def _target_from_dict(target): +def _target_from_dict(target_dict): target = Target.__new__(Target) - target.name = d['name'] - target.compiler_strategy = d['compiler_strategy'] - target.module_name = d['module_name'] - if 'platform' in d: - target.platform_name = d['platform'] + target.name = target_dict['name'] + #target.compiler_strategy = target_dict['compiler_strategy'] + target.module_name = target_dict['module_name'] + if 'platform_name' in target_dict: + target.platform_name = target_dict['platform_name'] return target -def _operating_system_from_dict(os_dict): - #TODO: Have a way to recognize the OS subclasses +def _operating_system_from_dict(os_dict, platform_class): name = os_dict['name'] - os_list = all_platforms(True) - os_classes = {o.__name__:o for o in os_list} - + return platform_class.operating_system(name) def arch_from_dict(d): if d is None: return None - arch = Arch platform_dict = d['platform'] platform_os_dict = d['platform_os'] target_dict = d['target'] platform = _platform_from_dict(platform_dict) - platform_os = _operating_system_from_dict(platform_os_dict) + platform_os = _operating_system_from_dict(platform_os_dict, platform) target = _target_from_dict(target_dict) - arch.platform = platform - arch.platform_os = platform_os - arch.target = target - - return arch + return Arch(platform, platform_os, target) -#TODO: Haven't changed name here but all_platforms should now pull os class list @memoized -def all_platforms(operating_system=False): +def all_platforms(): modules = [] - if operating_system: - mod_path = spack.operating_system_path - mod_string = "spack.operating_systems" - else: - mod_path = spack.platform_path - mod_string = "spack.platformss" + mod_path = spack.platform_path + mod_string = "spack.platformss" for name in list_modules(mod_path): mod_name = mod_string + name -- cgit v1.2.3-70-g09d2 From 5e4d3e7b8280e633bb9b9dd28510dc394feb2000 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 11:48:43 -0800 Subject: Changed naming convention of operating_system, makes it easier to create instance from dictionary just using name without the version attached. Object will stil display as name+version --- lib/spack/spack/platforms/cray_xc.py | 10 +++++----- lib/spack/spack/platforms/linux.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index ea3ae0e477..b71481e46e 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -9,9 +9,9 @@ class CrayXc(Platform): back_end = 'ivybridge' default = 'ivybridge' - front_os = "SuSE11" - back_os = "CNL10" - default_os = "CNL10" + front_os = "SuSE" + back_os = "CNL" + default_os = "CNL" def __init__(self): ''' Since cori doesn't have ivybridge as a front end it's better @@ -37,8 +37,8 @@ class CrayXc(Platform): self.add_target('haswell', Target('haswell', 'MODULES', 'craype-haswell')) - self.add_operating_system('SuSE11', LinuxDistro()) - self.add_operating_system('CNL10', Cnl()) + self.add_operating_system('SuSE', LinuxDistro()) + self.add_operating_system('CNL', Cnl()) @classmethod def detect(self): diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py index 1b22b69048..d9e33511a1 100644 --- a/lib/spack/spack/platforms/linux.py +++ b/lib/spack/spack/platforms/linux.py @@ -12,8 +12,8 @@ class Linux(Platform): super(Linux, self).__init__('linux') self.add_target(self.default, Target(self.default, 'PATH')) linux_dist = LinuxDistro() - self.default_os = str(linux_dist) - self.add_operating_system(str(linux_dist), linux_dist) + self.default_os = linux_dist.name + self.add_operating_system(linux_dist.name, linux_dist) @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From 5989e3f65d83afdd497059bba9442576e2df0509 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 11:53:02 -0800 Subject: Changed from_dict to arch_from_dict method --- lib/spack/spack/spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index c8c114a8b1..abe17a8f2b 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -695,7 +695,7 @@ class Spec(object): spec = Spec(name) spec.versions = VersionList.from_dict(node) # TODO: Need to fix the architecture.Target.from_dict - spec.architecture = spack.architecture.from_dict(node['architecture']) + spec.architecture = spack.architecture.arch_from_dict(node['architecture']) if node['compiler'] is None: spec.compiler = None -- cgit v1.2.3-70-g09d2 From ac55ce989d0b5a6e7a1160dc32ac7fb12f805f76 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 18:47:41 -0800 Subject: Changed compiler finding strategy to come from operating system instead of target --- lib/spack/spack/concretize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 0e7bf53b44..3434ca66f7 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -334,9 +334,9 @@ class DefaultConcretizer(object): # Should think whether this can be more efficient def _proper_compiler_style(cspec, architecture): compilers = spack.compilers.compilers_for_spec(cspec) - if architecture.target.compiler_strategy == 'PATH': + if architecture.platform_os.compiler_strategy == 'PATH': filter(lambda c: not c.modules, compilers) - if architecture.target.compiler_strategy == 'MODULES': + if architecture.platform_os.compiler_strategy == 'MODULES': filter(lambda c: c.modules, compilers) return compilers -- cgit v1.2.3-70-g09d2 From f0149faf88b97b63635ba451efe008846478d115 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 18:48:00 -0800 Subject: Added doc strings to functions in architecture.py --- lib/spack/spack/architecture.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 7bf5afcf63..14a8c56793 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -222,6 +222,12 @@ def _helper_to_dict(arch_field_dict, arch_field_name, *args): return d def to_dict(arch): + """ Convert the Arch tuple into a dictionary for yaml dumping. This + uses the _helper_to_dict method to create the dictionary from the + provided architecture field. Can assign the architecture + field name (either platform, platform_os or target) and any + attributes that make up that architecture field, + """ d = {} platform = arch.platform.__dict__ @@ -241,12 +247,19 @@ def to_dict(arch): return d def _platform_from_dict(platform): + """Creates all the platform class module names into a dictionary of + name : key-value pairs. From there we can construct the + platform subclass + """ platform_list = all_platforms() platform_names = {plat.__name__.lower():plat for plat in platform_list} return platform_names[platform['name']]() def _target_from_dict(target_dict): + """ Creates new instance of target and assigns all the attributes of + that target from the dictionary + """ target = Target.__new__(Target) target.name = target_dict['name'] #target.compiler_strategy = target_dict['compiler_strategy'] @@ -256,11 +269,19 @@ def _target_from_dict(target_dict): return target def _operating_system_from_dict(os_dict, platform_class): + """ uses platform's operating system method to grab the constructed + operating systems that are valid on the platform. + """ +# NOTE: Might need a better way to create operating system objects name = os_dict['name'] return platform_class.operating_system(name) def arch_from_dict(d): + """ Uses _platform_from_dict, _operating_system_from_dict, _target_from_dict + helper methods to recreate the arch tuple from the dictionary read from + a yaml file + """ if d is None: return None platform_dict = d['platform'] -- cgit v1.2.3-70-g09d2 From eb96f3829865492c3c484de0d89e14cba578a37f Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 18:48:25 -0800 Subject: Got rid of debug comment --- lib/spack/spack/spec.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index abe17a8f2b..0a55ec5d76 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -835,7 +835,6 @@ class Spec(object): changed = True force = False - # Loops forever here in my implementation while changed: changes = (self.normalize(force=force), self._expand_virtual_packages(), -- cgit v1.2.3-70-g09d2 From ccd4a79b39b56a8408980ed27b0c5de5a1995fbc Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 18:49:27 -0800 Subject: changed architecture.target to architecture.platform_os, so that compiler_for_spec uses operating system strategy --- lib/spack/spack/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index b0d84863de..5d922f6e58 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -594,7 +594,7 @@ class Package(object): if not self.spec.concrete: raise ValueError("Can only get a compiler for a concrete package.") return spack.compilers.compiler_for_spec(self.spec.compiler, - self.spec.architecture.target) + self.spec.architecture.platform_os) def url_version(self, version): -- cgit v1.2.3-70-g09d2 From b591d2b5015fdde5d551dd81a8906ac0b2a51260 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 25 Feb 2016 18:49:52 -0800 Subject: Changed operating_system path --- lib/spack/spack/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 6ad9b87ca2..48fa9edb67 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -39,7 +39,7 @@ build_env_path = join_path(lib_path, "env") module_path = join_path(lib_path, "spack") platform_path = join_path(module_path, 'platforms') compilers_path = join_path(module_path, "compilers") -operating_system_path = join_path(module_path, 'operating_system') +operating_system_path = join_path(module_path, 'operating_systems') test_path = join_path(module_path, "test") hooks_path = join_path(module_path, "hooks") var_path = join_path(prefix, "var", "spack") -- cgit v1.2.3-70-g09d2 From 4601c36f572ed7cf66f539c11ebe0835976655dc Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 09:55:44 -0800 Subject: cleaned up concretize architecture --- lib/spack/spack/concretize.py | 93 ++++++++++++++++++++++++++++++------------- 1 file changed, 65 insertions(+), 28 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 3434ca66f7..04f932aa5d 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -218,20 +218,55 @@ class DefaultConcretizer(object): return True def _concretize_operating_system(self, arch, platform): - """ Future method for concretizing operating system """ - if isinstance(arch.platform_os, spack.architecture.OperatingSystem): - return False + if spec.architecture.platform_os is not None: + if isinstance(spec.architecture.platform_os,spack.architecture.OperatingSystem): + return False + else: + spec.add_operating_system_from_string(spec.architecture.platform_os) + return True #changed + if spec.root.architecture.platform_os: + if isinstance(spec.root.architecture.platform_os,spack.architecture.OperatingSystem): + spec.architecture.platform_os = spec.root.architecture.platform_os + else: + spec.add_operating_system_from_string(spec.root.architecture.platform_os) else: - arch.arch_os = platform.operating_system('default_os') - return True + platform = spack.architecture.sys_type() + spec.architecture.platform_os = platform.operating_system('default_os') + + return True #changed + +# """ Future method for concretizing operating system """ +# if isinstance(arch.platform_os, spack.architecture.OperatingSystem): +# return False +# else: +# arch.arch_os = platform.operating_system('default_os') +# return True def _concretize_target(self, arch, platform): - if isinstance(arch.target, spack.architecture.Target): - return False + if spec.target is not None: + if isinstance(spec.target,spack.architecture.Target): + return False + else: + spec.add_target_from_string(spec.target) + return True #changed + + if spec.root.target: + if isinstance(spec.root.target,spack.architecture.Target): + spec.target = spec.root.target + else: + spec.add_target_from_string(spec.root.target) else: - arch.target = platform.target('default') - return True + platform = spack.architecture.sys_type() + spec.target = platform.target('default') + + return True #changed + +# if isinstance(arch.target, spack.architecture.Target): +# return False +# else: +# arch.target = platform.target('default') +# return True def concretize_architecture(self, spec): """If the spec is empty provide the defaults of the platform. If the @@ -251,33 +286,35 @@ class DefaultConcretizer(object): Arch = spack.architecture.Arch # Set the architecture to all defaults spec.architecture = Arch(platform=platform, - platform_os=platform.operating_system('default_os'), - target=platform.target('default')) + None, + None) return True #If there is a target and it is a tuple and has both filled return #False - if not isinstance(spec.architecture, basestring): - return any(( +# if isinstance(spec.architecture, basestring): +# spec.split_architecture_string(spec.architecture) + + + ret = any(( self._concretize_platform(spec.architecture, platform), self._concretize_operating_system(spec.architecture, platform), self._concretize_target(spec.architecture, platform))) - else: - spec.add_architecture_from_string(spec.architecture) - # Does not look pretty at all!!! - if spec.root.architecture and \ - not isinstance(spec.root.architecture, basestring): - bool_flag = any(( - self._concretize_platform(spec.root.architecture, platform), - self._concretize_operating_system(spec.root.architecture, - platform), - self._concretize_target(spec.root.target, platform))) - spec.architecture =spec.root.architecture - return bool_flag - else: - spec.add_architecture_from_string(spec.root.architecture) - return True + # Does not look pretty at all!!! +# if spec.root.architecture and \ +# not isinstance(spec.root.architecture, basestring): +# bool_flag = any(( +# self._concretize_platform(spec.root.architecture, platform), +# self._concretize_operating_system(spec.root.architecture, +# platform), +# self._concretize_target(spec.root.target, platform))) +# spec.architecture =spec.root.architecture +# return bool_flag +# else: +# spec.add_architecture_from_string(spec.root.architecture) + + return ret # if there is no target specified used the defaults -- cgit v1.2.3-70-g09d2 From 615ea969f8a998417dfbbd07935848eb37f71c47 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 10:14:50 -0800 Subject: made arch instantiate as a tuple --- lib/spack/spack/spec.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 0a55ec5d76..57dd0c2181 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -461,7 +461,13 @@ class Spec(object): """Called by the parser to set the architecture.""" if self.architecture: raise DuplicateArchitectureError( "Spec for '%s' cannot have two architectures." % self.name) - self.architecture = architecture # a string can be set + platform = spack.architecture.sys_type() + if '-' in architecture: + os, target = architecture.split('-') + else: + os = architecture + target = None + self.architecture = spack.architecture.Arch(platform, os, target) def _add_dependency(self, spec): -- cgit v1.2.3-70-g09d2 From 527bb7abfeeb982d0bf22dadf4b8400502b606dd Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 2 Mar 2016 10:26:09 -0800 Subject: Changed _cmp_key --- lib/spack/spack/architecture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 14a8c56793..dac3a45b79 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -207,7 +207,7 @@ class Arch(namedtuple("Arch", "platform platform_os target")): self.platform_os.name + "-" + self.target.name) def _cmp_key(self): - return (self.platform.name, self.platform_os.name, self.target.name) + return (self.platform, self.platform_os, self.target) def _helper_to_dict(arch_field_dict, arch_field_name, *args): -- cgit v1.2.3-70-g09d2 From 4d7478420968182ab9535de9deffbdd671937972 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 2 Mar 2016 10:27:00 -0800 Subject: Changed add_architecture_from_string and split the work done into two methods add_target_from_string and add_operating_system_from_string --- lib/spack/spack/spec.py | 138 ++++++++++++++++++++++++++---------------------- 1 file changed, 75 insertions(+), 63 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 57dd0c2181..06accc514b 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1256,70 +1256,82 @@ class Spec(object): if os_string in platform.operating_sys: return True return False + + def add_target_from_string(self, arch): + if arch.target is None: + return arch.platform.target('default_target') + else: + return arch.platform.target(arch.target) - def add_architecture_from_string(self, arch): - """ The user is able to provide a architecture string of the form - platform-os-target. This string will be parsed by this function - and turn the architecture string into an architecture tuple of - platform, operating system and target processor classes. - The platform-os-target triplet can be delimited by a '-'. If any - portion of the architecture triplet is empty, spack will supply - the default. If the entire architecture field is blank then - defaults will be provided based off of the platform. - This happens in the concretize_architecture method in concretize.py - - e.g - =linux-ubuntu10-x84_64 -> (linux, ubuntu10, x86_64) - - =cray_xc-SuSE11-haswell -> (cray_xc, SuSE11, haswell) - - =bgq -> (bgq, - default_os, - default_target) - - =elcapitan -> (darwin, elcapitan, x86_64) - - =x86_64 -> (autodetected platform, - default_os, - x86_64) - """ - if arch is None: return - - platform_list = spack.architecture.all_platforms() - platform_names = {plat.__name__.lower():plat for plat in platform_list} - Arch = spack.architecture.Arch - arch_list = arch.split("-") - - # Create instance of current platform, gets overwritten if user - # provided a platform spec. - platform = spack.architecture.sys_type() - target = None - platform_os = None - - for entry in arch_list: - if self._is_valid_platform(entry, platform_names): - # If entry is different from platform name then create it. - # else just keep the already instantiated platform class - if entry != platform.name: - platform = platform_dict[entry]() # Create instance of platform - elif self._is_valid_target(entry, platform): - target = platform.target(entry) - # check if os is valid by checking platform operating sys dict - elif self._is_valid_os(entry, platform): - platform_os = platform.operating_system(entry) - else: - # throw error since entry is unknown - raise UnknownArchitectureSpecError(entry) - - if target is None: - target = platform.target('default') - if platform_os is None: - platform_os = platform.operating_system('default_os') - - self.architecture = Arch(platform=platform, - platform_os=platform_os, - target=target) - + def add_operating_system_from_string(self, arch): + if arch.platform_os is None: + return arch.platform.operating_system('default_os') + else: + return arch.platform.operating_system(arch.platform_os) + + #def add_architecture_from_string(self, arch): + # """ The user is able to provide a architecture string of the form + # platform-os-target. This string will be parsed by this function + # and turn the architecture string into an architecture tuple of + # platform, operating system and target processor classes. + # The platform-os-target triplet can be delimited by a '-'. If any + # portion of the architecture triplet is empty, spack will supply + # the default. If the entire architecture field is blank then + # defaults will be provided based off of the platform. + # This happens in the concretize_architecture method in concretize.py + + # e.g + # =linux-ubuntu10-x84_64 -> (linux, ubuntu10, x86_64) + + # =cray_xc-SuSE11-haswell -> (cray_xc, SuSE11, haswell) + + # =bgq -> (bgq, + # default_os, + # default_target) + + # =elcapitan -> (darwin, elcapitan, x86_64) + + # =x86_64 -> (autodetected platform, + # default_os, + # x86_64) + # """ + # if arch is None: return + # + # platform_list = spack.architecture.all_platforms() + # platform_names = {plat.__name__.lower():plat for plat in platform_list} + # Arch = spack.architecture.Arch + # arch_list = arch.split("-") + # + # # Create instance of current platform, gets overwritten if user + # # provided a platform spec. + # platform = spack.architecture.sys_type() + # target = None + # platform_os = None + + # for entry in arch_list: + # if self._is_valid_platform(entry, platform_names): + # # If entry is different from platform name then create it. + # # else just keep the already instantiated platform class + # if entry != platform.name: + # platform = platform_dict[entry]() # Create instance of platform + # elif self._is_valid_target(entry, platform): + # target = platform.target(entry) + # # check if os is valid by checking platform operating sys dict + # elif self._is_valid_os(entry, platform): + # platform_os = platform.operating_system(entry) + # else: + # # throw error since entry is unknown + # raise UnknownArchitectureSpecError(entry) + + # if target is None: + # target = platform.target('default') + # if platform_os is None: + # platform_os = platform.operating_system('default_os') + + # self.architecture = Arch(platform=platform, + # platform_os=platform_os, + # target=target) + # def satisfies(self, other, deps=True, strict=False): """determine if this spec satisfies all constraints of another. -- cgit v1.2.3-70-g09d2 From f27f2f8e491c7e3a433e070497d074f8376233a0 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 2 Mar 2016 10:27:12 -0800 Subject: Fixed some indentation errors --- lib/spack/spack/concretize.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 04f932aa5d..60efba59c2 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -225,7 +225,7 @@ class DefaultConcretizer(object): spec.add_operating_system_from_string(spec.architecture.platform_os) return True #changed if spec.root.architecture.platform_os: - if isinstance(spec.root.architecture.platform_os,spack.architecture.OperatingSystem): + if isinstance(spec.root.architecture.platform_os,spack.architecture.OperatingSystem): spec.architecture.platform_os = spec.root.architecture.platform_os else: spec.add_operating_system_from_string(spec.root.architecture.platform_os) @@ -281,13 +281,13 @@ class DefaultConcretizer(object): """ platform = spack.architecture.sys_type() + if spec.architecture is None: # Create an empty tuple Arch = spack.architecture.Arch # Set the architecture to all defaults - spec.architecture = Arch(platform=platform, - None, - None) + spec.architecture = Arch(platform=platform, platform_os=None, + target=None) return True #If there is a target and it is a tuple and has both filled return #False -- cgit v1.2.3-70-g09d2 From 45887dec8e703232a4d38bd241a20e36606a00cf Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 10:56:46 -0800 Subject: partial work on bug hunting --- lib/spack/spack/architecture.py | 22 +++++++++++----------- lib/spack/spack/concretize.py | 32 +++++++++++++++----------------- lib/spack/spack/spec.py | 21 +++++++++++---------- 3 files changed, 37 insertions(+), 38 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index dac3a45b79..45a9dac8ba 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -203,8 +203,8 @@ class Arch(namedtuple("Arch", "platform platform_os target")): __slots__ = () def __str__(self): - return (self.platform.name +"-"+ - self.platform_os.name + "-" + self.target.name) + return (str(self.platform) +"-"+ + str(self.platform_os) + "-" + str(self.target) ) def _cmp_key(self): return (self.platform, self.platform_os, self.target) @@ -246,14 +246,14 @@ def to_dict(arch): return d -def _platform_from_dict(platform): - """Creates all the platform class module names into a dictionary of - name : key-value pairs. From there we can construct the - platform subclass - """ - platform_list = all_platforms() - platform_names = {plat.__name__.lower():plat for plat in platform_list} - return platform_names[platform['name']]() +#def _platform_from_dict(platform): +# """Creates all the platform class module names into a dictionary of +# name : key-value pairs. From there we can construct the +# platform subclass +# """ +# platform_list = all_platforms() +# platform_names = {plat.__name__.lower():plat for plat in platform_list} +# return platform_names[platform['name']]() def _target_from_dict(target_dict): @@ -288,7 +288,7 @@ def arch_from_dict(d): platform_os_dict = d['platform_os'] target_dict = d['target'] - platform = _platform_from_dict(platform_dict) + platform = d['platform'] platform_os = _operating_system_from_dict(platform_os_dict, platform) target = _target_from_dict(target_dict) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 60efba59c2..afb12838e8 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -217,14 +217,14 @@ class DefaultConcretizer(object): arch.platform = platform return True - def _concretize_operating_system(self, arch, platform): + def _concretize_operating_system(self, spec, platform): if spec.architecture.platform_os is not None: if isinstance(spec.architecture.platform_os,spack.architecture.OperatingSystem): return False else: spec.add_operating_system_from_string(spec.architecture.platform_os) return True #changed - if spec.root.architecture.platform_os: + if spec.root.architecture and spec.root.architecture.platform_os: if isinstance(spec.root.architecture.platform_os,spack.architecture.OperatingSystem): spec.architecture.platform_os = spec.root.architecture.platform_os else: @@ -243,22 +243,22 @@ class DefaultConcretizer(object): # return True - def _concretize_target(self, arch, platform): - if spec.target is not None: - if isinstance(spec.target,spack.architecture.Target): + def _concretize_target(self, spec, platform): + if spec.architecture.target is not None: + if isinstance(spec.architecture.target,spack.architecture.Target): return False else: - spec.add_target_from_string(spec.target) + spec.add_target_from_string(spec.architecture.target) return True #changed - if spec.root.target: - if isinstance(spec.root.target,spack.architecture.Target): - spec.target = spec.root.target + if spec.root.architecture and spec.root.architecture.target: + if isinstance(spec.root.architecture.target,spack.architecture.Target): + spec.architecture.target = spec.root.architecture.target else: - spec.add_target_from_string(spec.root.target) + spec.add_target_from_string(spec.root.architecture.target) else: platform = spack.architecture.sys_type() - spec.target = platform.target('default') + spec.architecture.target = platform.target('default') return True #changed @@ -283,22 +283,20 @@ class DefaultConcretizer(object): platform = spack.architecture.sys_type() if spec.architecture is None: - # Create an empty tuple - Arch = spack.architecture.Arch # Set the architecture to all defaults - spec.architecture = Arch(platform=platform, platform_os=None, + spec.architecture = spack.architecture.Arch(platform=platform, platform_os=None, target=None) return True #If there is a target and it is a tuple and has both filled return #False # if isinstance(spec.architecture, basestring): # spec.split_architecture_string(spec.architecture) - + print spec.architecture ret = any(( self._concretize_platform(spec.architecture, platform), - self._concretize_operating_system(spec.architecture, platform), - self._concretize_target(spec.architecture, platform))) + self._concretize_operating_system(spec, platform), + self._concretize_target(spec, platform))) # Does not look pretty at all!!! diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 06accc514b..5cb94907d3 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -462,11 +462,12 @@ class Spec(object): if self.architecture: raise DuplicateArchitectureError( "Spec for '%s' cannot have two architectures." % self.name) platform = spack.architecture.sys_type() + print architecture if '-' in architecture: os, target = architecture.split('-') else: - os = architecture - target = None + os = None + target = architecture self.architecture = spack.architecture.Arch(platform, os, target) @@ -1257,17 +1258,17 @@ class Spec(object): return True return False - def add_target_from_string(self, arch): - if arch.target is None: - return arch.platform.target('default_target') + def add_target_from_string(self, target): + if target is None: + self.architecture.target = self.architecture.platform.target('default_target') else: - return arch.platform.target(arch.target) + self.architecture.target = self.architecture.platform.target(target) - def add_operating_system_from_string(self, arch): - if arch.platform_os is None: - return arch.platform.operating_system('default_os') + def add_operating_system_from_string(self, os): + if os is None: + self.architecture.platform_os = self.architecture.platform.operating_system('default_os') else: - return arch.platform.operating_system(arch.platform_os) + self.architecture.platform_os = self.architecture.platform.operating_system(os) #def add_architecture_from_string(self, arch): # """ The user is able to provide a architecture string of the form -- cgit v1.2.3-70-g09d2 From 81e236b2de157405a2bc65e71a9a7fc7d1a13d7d Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 2 Mar 2016 11:04:55 -0800 Subject: Changed Arch to class instead of namedtuple. Now platform is automatically set upon creation of class --- lib/spack/spack/architecture.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 45a9dac8ba..94bd59a9d5 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -196,11 +196,13 @@ class OperatingSystem(object): #NOTE: Key error caused because Architecture has no comparison method @key_ordering -class Arch(namedtuple("Arch", "platform platform_os target")): - """ namedtuple for Architecture. Will have it's own __str__ method - to make printing out the tuple easier and also won't make directory - paths look odd """ - __slots__ = () +class Arch(object): + "Architecture is now a class to help with setting attributes" + + def __init__(self, platform_os=None, target=None): + self.platform = sys_type() + self.platform_os = platform_os + self.target = target def __str__(self): return (str(self.platform) +"-"+ -- cgit v1.2.3-70-g09d2 From 86e90bba8741eec38eae3898576da272ed41d9c2 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 11:05:05 -0800 Subject: another partial, narrowing in on proper arch --- lib/spack/spack/concretize.py | 14 +------- lib/spack/spack/spec.py | 76 ++++--------------------------------------- 2 files changed, 7 insertions(+), 83 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index afb12838e8..add3b8435d 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -210,13 +210,6 @@ class DefaultConcretizer(object): return True # Things changed - def _concretize_platform(self, arch, platform): - if issubclass(arch.platform.__class__, spack.architecture.Platform): - return False - else: - arch.platform = platform - return True - def _concretize_operating_system(self, spec, platform): if spec.architecture.platform_os is not None: if isinstance(spec.architecture.platform_os,spack.architecture.OperatingSystem): @@ -279,13 +272,9 @@ class DefaultConcretizer(object): DAG has an architecture, then use the root otherwise use the defaults on the platform. """ - - platform = spack.architecture.sys_type() - if spec.architecture is None: # Set the architecture to all defaults - spec.architecture = spack.architecture.Arch(platform=platform, platform_os=None, - target=None) + spec.architecture = spack.architecture.Arch() return True #If there is a target and it is a tuple and has both filled return #False @@ -294,7 +283,6 @@ class DefaultConcretizer(object): print spec.architecture ret = any(( - self._concretize_platform(spec.architecture, platform), self._concretize_operating_system(spec, platform), self._concretize_target(spec, platform))) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 5cb94907d3..169c06242e 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -468,7 +468,7 @@ class Spec(object): else: os = None target = architecture - self.architecture = spack.architecture.Arch(platform, os, target) + self.architecture = spack.architecture.Arch(os, target) def _add_dependency(self, spec): @@ -1250,13 +1250,10 @@ class Spec(object): return False def _is_valid_target(self, target, platform): - if target in platform.targets: - return True - return False + return target in platform.targets + def _is_valid_os(self, os_string, platform): - if os_string in platform.operating_sys: - return True - return False + return os_string in platform.operating_sys def add_target_from_string(self, target): if target is None: @@ -1270,69 +1267,7 @@ class Spec(object): else: self.architecture.platform_os = self.architecture.platform.operating_system(os) - #def add_architecture_from_string(self, arch): - # """ The user is able to provide a architecture string of the form - # platform-os-target. This string will be parsed by this function - # and turn the architecture string into an architecture tuple of - # platform, operating system and target processor classes. - # The platform-os-target triplet can be delimited by a '-'. If any - # portion of the architecture triplet is empty, spack will supply - # the default. If the entire architecture field is blank then - # defaults will be provided based off of the platform. - # This happens in the concretize_architecture method in concretize.py - - # e.g - # =linux-ubuntu10-x84_64 -> (linux, ubuntu10, x86_64) - - # =cray_xc-SuSE11-haswell -> (cray_xc, SuSE11, haswell) - - # =bgq -> (bgq, - # default_os, - # default_target) - - # =elcapitan -> (darwin, elcapitan, x86_64) - - # =x86_64 -> (autodetected platform, - # default_os, - # x86_64) - # """ - # if arch is None: return - # - # platform_list = spack.architecture.all_platforms() - # platform_names = {plat.__name__.lower():plat for plat in platform_list} - # Arch = spack.architecture.Arch - # arch_list = arch.split("-") - # - # # Create instance of current platform, gets overwritten if user - # # provided a platform spec. - # platform = spack.architecture.sys_type() - # target = None - # platform_os = None - - # for entry in arch_list: - # if self._is_valid_platform(entry, platform_names): - # # If entry is different from platform name then create it. - # # else just keep the already instantiated platform class - # if entry != platform.name: - # platform = platform_dict[entry]() # Create instance of platform - # elif self._is_valid_target(entry, platform): - # target = platform.target(entry) - # # check if os is valid by checking platform operating sys dict - # elif self._is_valid_os(entry, platform): - # platform_os = platform.operating_system(entry) - # else: - # # throw error since entry is unknown - # raise UnknownArchitectureSpecError(entry) - - # if target is None: - # target = platform.target('default') - # if platform_os is None: - # platform_os = platform.operating_system('default_os') - - # self.architecture = Arch(platform=platform, - # platform_os=platform_os, - # target=target) - # + def satisfies(self, other, deps=True, strict=False): """determine if this spec satisfies all constraints of another. @@ -1378,6 +1313,7 @@ class Spec(object): if not self.variants.satisfies(other.variants, strict=strict): return False + # Target satisfaction is currently just class equality. # If not strict, None means unconstrained. if isinstance(self.architecture, basestring): -- cgit v1.2.3-70-g09d2 From 25f20b19673d71fb11ada83567c9e89de5555839 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 11:40:21 -0800 Subject: bug hunting --- lib/spack/spack/architecture.py | 5 ++++- lib/spack/spack/concretize.py | 15 ++++++--------- lib/spack/spack/spec.py | 1 - var/spack/mock_packages/multimethod/package.py | 7 ++++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 94bd59a9d5..c9e4eb132d 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -209,7 +209,10 @@ class Arch(object): str(self.platform_os) + "-" + str(self.target) ) def _cmp_key(self): - return (self.platform, self.platform_os, self.target) + platform = self.platform.name + os = self.platform_os.name if isinstance(self.platform_os, OperatingSystem) else self.platform_os + target = self.target.name if isinstance(self.target, Target) else self.target + return (platform, os, target) def _helper_to_dict(arch_field_dict, arch_field_name, *args): diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index add3b8435d..37204e32a4 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -210,7 +210,7 @@ class DefaultConcretizer(object): return True # Things changed - def _concretize_operating_system(self, spec, platform): + def _concretize_operating_system(self, spec): if spec.architecture.platform_os is not None: if isinstance(spec.architecture.platform_os,spack.architecture.OperatingSystem): return False @@ -223,8 +223,7 @@ class DefaultConcretizer(object): else: spec.add_operating_system_from_string(spec.root.architecture.platform_os) else: - platform = spack.architecture.sys_type() - spec.architecture.platform_os = platform.operating_system('default_os') + spec.architecture.platform_os = spec.architecture.platform.operating_system('default_os') return True #changed @@ -236,7 +235,7 @@ class DefaultConcretizer(object): # return True - def _concretize_target(self, spec, platform): + def _concretize_target(self, spec): if spec.architecture.target is not None: if isinstance(spec.architecture.target,spack.architecture.Target): return False @@ -250,8 +249,7 @@ class DefaultConcretizer(object): else: spec.add_target_from_string(spec.root.architecture.target) else: - platform = spack.architecture.sys_type() - spec.architecture.target = platform.target('default') + spec.architecture.target = spec.architecture.platform.target('default') return True #changed @@ -280,11 +278,10 @@ class DefaultConcretizer(object): #False # if isinstance(spec.architecture, basestring): # spec.split_architecture_string(spec.architecture) - print spec.architecture ret = any(( - self._concretize_operating_system(spec, platform), - self._concretize_target(spec, platform))) + self._concretize_operating_system(spec), + self._concretize_target(spec))) # Does not look pretty at all!!! diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 169c06242e..fdc5e3bc96 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -462,7 +462,6 @@ class Spec(object): if self.architecture: raise DuplicateArchitectureError( "Spec for '%s' cannot have two architectures." % self.name) platform = spack.architecture.sys_type() - print architecture if '-' in architecture: os, target = architecture.split('-') else: diff --git a/var/spack/mock_packages/multimethod/package.py b/var/spack/mock_packages/multimethod/package.py index b926d42d7b..03da9ef69d 100644 --- a/var/spack/mock_packages/multimethod/package.py +++ b/var/spack/mock_packages/multimethod/package.py @@ -120,9 +120,10 @@ class Multimethod(Package): for target in targets: @when('='+target.name) def different_by_target(self): - return self.spec.architecture.target.name - - + if isinstance(self.spec.architecture.target,basestring): + return self.spec.architecture.target + else: + return self.spec.architecture.target.name # # Make sure we can switch methods on different dependencies # -- cgit v1.2.3-70-g09d2 From 47c8e1366f9659850704b03fd39dbfa3dd54fbbb Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 2 Mar 2016 12:08:17 -0800 Subject: Changed to_dictionary and from_dictionary methods --- lib/spack/spack/architecture.py | 114 ++++++++++++++++++++++++---------------- 1 file changed, 68 insertions(+), 46 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index c9e4eb132d..e432374781 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -58,14 +58,11 @@ class Target(object): Targets will have compiler finding strategies """ - def __init__(self, name, compiler_strategy, module_name=None): + def __init__(self, name, module_name=None): self.name = name # case of cray "ivybridge" but if it's x86_64 - self.compiler_strategy = compiler_strategy self.module_name = module_name # craype-ivybridge # Sets only the platform name to avoid recursiveness - def set_platform(self, platform): - self.platform_name = platform.name def _cmp_key(self): return (self.name, self.module_name) @@ -74,10 +71,14 @@ class Target(object): return self.__str__() def __str__(self): - if self.platform_name: - return self.platform_name + '-' + self.name return self.name + def to_dict(self): + d = {} + d['name'] = self.name + d['module_name'] = self.module_name + + return d @key_ordering class Platform(object): @@ -109,7 +110,6 @@ class Platform(object): raise ValueError( "%s is a spack reserved alias " "and cannot be the name of a target" % name) - target.set_platform(self) self.targets[name] = target def target(self, name): @@ -193,6 +193,14 @@ class OperatingSystem(object): def _cmp_key(self): return (self.name, self.version, self.compiler_strategy) + + def to_dict(self): + d = {} + d['name'] = self.name + d['version'] = self.version + d['compiler_strategy'] = self.compiler_strategy + + return d #NOTE: Key error caused because Architecture has no comparison method @key_ordering @@ -213,43 +221,55 @@ class Arch(object): os = self.platform_os.name if isinstance(self.platform_os, OperatingSystem) else self.platform_os target = self.target.name if isinstance(self.target, Target) else self.target return (platform, os, target) - - -def _helper_to_dict(arch_field_dict, arch_field_name, *args): - """ General method to turn each class in architecture into a - dictionary. Takes as argument the class dictionary, the field name - (platform, platform_os, target) and then any attribute args - """ - d = {} - d[arch_field_name] = {} - for items in args: - d[arch_field_name][items] = arch_field_dict[items] - return d - -def to_dict(arch): - """ Convert the Arch tuple into a dictionary for yaml dumping. This - uses the _helper_to_dict method to create the dictionary from the - provided architecture field. Can assign the architecture - field name (either platform, platform_os or target) and any - attributes that make up that architecture field, - """ - d = {} - platform = arch.platform.__dict__ - platform_os = arch.platform_os.__dict__ - target = arch.target.__dict__ - - platform_dict = _helper_to_dict(platform,'platform','name') - os_dict = _helper_to_dict(platform_os, 'platform_os', 'name','version', - 'compiler_strategy') - target_dict = _helper_to_dict(target,'target', 'name', - 'module_name','platform_name') + def to_dict(self): + d = {} + platform = self.platform + platform_os = self.platform_os + target = self.target + + d['platform'] = self.platform.name + d['platform_os'] = self.platform_os.to_dict() + d['target'] = self.target.to_dict() + + return d - d.update(platform_dict) - d.update(os_dict) - d.update(target_dict) +#def _helper_to_dict(arch_field_dict, arch_field_name, *args): +# """ General method to turn each class in architecture into a +# dictionary. Takes as argument the class dictionary, the field name +# (platform, platform_os, target) and then any attribute args +# """ +# d = {} +# d[arch_field_name] = {} +# for items in args: +# d[arch_field_name][items] = arch_field_dict[items] +# return d +# - return d +#def to_dict(arch): +# """ Convert the Arch tuple into a dictionary for yaml dumping. This +# uses the _helper_to_dict method to create the dictionary from the +# provided architecture field. Can assign the architecture +# field name (either platform, platform_os or target) and any +# attributes that make up that architecture field, +# """ +# d = {} +# +# platform = arch.platform.__dict__ +# platform_os = arch.platform_os.__dict__ +# target = arch.target.__dict__ +# +# platform_dict = _helper_to_dict(platform,'platform','name') +# os_dict = _helper_to_dict(platform_os, 'platform_os', 'name','version', +# 'compiler_strategy') +# target_dict = _helper_to_dict(target,'target', 'name', +# 'module_name','platform_name') +# +# d.update(platform_dict) +# d.update(os_dict) +# d.update(target_dict) +# +# return d #def _platform_from_dict(platform): # """Creates all the platform class module names into a dictionary of @@ -287,17 +307,19 @@ def arch_from_dict(d): helper methods to recreate the arch tuple from the dictionary read from a yaml file """ + arch = Arch() + if d is None: return None - platform_dict = d['platform'] - platform_os_dict = d['platform_os'] + os_dict = d['platform_os'] target_dict = d['target'] - platform = d['platform'] - platform_os = _operating_system_from_dict(platform_os_dict, platform) target = _target_from_dict(target_dict) + platform_os = _operating_system_from_dict(os_dict, arch.platform) + arch.target =target + arch.platform_os = platform_os - return Arch(platform, platform_os, target) + return arch @memoized def all_platforms(): -- cgit v1.2.3-70-g09d2 From 90e90f61c161facfb87dd2dc6389f80d56eba2d7 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 2 Mar 2016 12:08:43 -0800 Subject: Got rid of the compiler strategy from target --- lib/spack/spack/platforms/bgq.py | 4 ++-- lib/spack/spack/platforms/cray_xc.py | 6 +++--- lib/spack/spack/platforms/darwin.py | 2 +- lib/spack/spack/platforms/linux.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/platforms/bgq.py b/lib/spack/spack/platforms/bgq.py index b550f1d5cb..e0eb76f336 100644 --- a/lib/spack/spack/platforms/bgq.py +++ b/lib/spack/spack/platforms/bgq.py @@ -9,8 +9,8 @@ class Bgq(Platform): def __init__(self): super(Bgq, self).__init__('bgq') - self.add_target(self.front_end, Target(self.front_end, 'PATH')) - self.add_target(self.back_end, Target(self.back_end, 'PATH')) + self.add_target(self.front_end, Target(self.front_end)) + self.add_target(self.back_end, Target(self.back_end,)) @classmethod def detect(self): diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index b71481e46e..4843a47c62 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -31,11 +31,11 @@ class CrayXc(Platform): # Could switch to use modules and fe targets for front end # Currently using compilers by path for front end. - self.add_target('sandybridge', Target('sandybridge', 'PATH')) + self.add_target('sandybridge', Target('sandybridge')) self.add_target('ivybridge', - Target('ivybridge', 'MODULES', 'craype-ivybridge')) + Target('ivybridge', 'craype-ivybridge')) self.add_target('haswell', - Target('haswell', 'MODULES', 'craype-haswell')) + Target('haswell','craype-haswell')) self.add_operating_system('SuSE', LinuxDistro()) self.add_operating_system('CNL', Cnl()) diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py index c48f7d17d2..4c3d38851f 100644 --- a/lib/spack/spack/platforms/darwin.py +++ b/lib/spack/spack/platforms/darwin.py @@ -10,7 +10,7 @@ class Darwin(Platform): def __init__(self): super(Darwin, self).__init__('darwin') - self.add_target(self.default, Target(self.default, 'PATH')) + self.add_target(self.default, Target(self.default)) mac_os = MacOsx() self.default_os = mac_os.name self.add_operating_system(mac_os.name, mac_os) diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py index d9e33511a1..3243a1dcdf 100644 --- a/lib/spack/spack/platforms/linux.py +++ b/lib/spack/spack/platforms/linux.py @@ -10,7 +10,7 @@ class Linux(Platform): def __init__(self): super(Linux, self).__init__('linux') - self.add_target(self.default, Target(self.default, 'PATH')) + self.add_target(self.default, Target(self.default)) linux_dist = LinuxDistro() self.default_os = linux_dist.name self.add_operating_system(linux_dist.name, linux_dist) -- cgit v1.2.3-70-g09d2 From e46bac19fa9baafe1e4b32ff940a883218f8b019 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 2 Mar 2016 12:09:02 -0800 Subject: Changed architecture to dict --- lib/spack/spack/spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index fdc5e3bc96..6cca61ca4e 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -671,7 +671,7 @@ class Spec(object): if self.architecture: # TODO: Fix the target.to_dict to account for the tuple # Want it to be a dict of dicts - d['architecture'] = spack.architecture.to_dict(self.architecture) + d['architecture'] = self.architecture.to_dict() else: d['architecture'] = None -- cgit v1.2.3-70-g09d2 From 975cba295bc3141a9888292623702f1ee45f3d3a Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 2 Mar 2016 14:16:57 -0800 Subject: Added 'better' tests --- lib/spack/spack/test/architecture.py | 60 +++++++++++++++--------------------- 1 file changed, 24 insertions(+), 36 deletions(-) diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 5bc78d1b65..a390a3fbaa 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -14,43 +14,31 @@ from spack.platforms.darwin import Darwin class ArchitectureTest(unittest.TestCase): - def setUp(self): - zlib = spack.spec.Spec("zlib") - zlib.concretize() - self.architecture = zlib.architecture - self.platform = sys_type() - self.platform_os = self.platform.operating_system('default_os') - self.target = self.platform.target('default') - - #def test_to_dict_function_with_target(self): - # d = spack.architecture.to_dict(self.architecture) - # print d['target'] - # self.assertEquals(d['target'], {'name': self.target.name, - # 'module_name' : self.target.module_name, - # 'platform_name' : self.target.platform_name, - # 'compiler_strategy': 'MODULES' - # }) - def test_to_dict_function_with_architecture(self): - d = spack.architecture.to_dict(self.architecture) - self.assertEquals(d, {'architecture': - {'platform' : {'name': 'crayxc'}, - 'platform_os': { - 'compiler_strategy': 'MODULES', - 'name':'CNL', - 'version':'10'}, - 'target' : {'platform_name' :'crayxc', - 'module_name': 'craype-haswell', - 'name':'haswell'}}}) - - #def test_to_dict_function_with_operating_system(self): - # d = spack.architecture.to_dict(self.architecture) - # self.assertEquals(d['platform_os'], {'name': self.platform_os.name, - # 'version': self.platform_os.version, - # 'compiler_strategy': self.platform_os.compiler_strategy}) - - def test_architecture_from_dict(self): - pass + arch = Arch() + arch.platform_os = arch.platform.operating_system('default_os') + arch.target = arch.platform.target('default') + + d = arch.to_dict() + self.assertEqual(d, {'platform' : 'crayxc', + 'platform_os' : {'name': 'CNL', + 'compiler_strategy' : 'MODULES', + 'version':'10'}, + 'target' : {'name': 'haswell', + 'module_name': 'craype-haswell'}}) + + def test_from_dict_function_with_architecture(self): + d = {'platform':'crayxc', + 'platform_os' : {'name' : 'CNL', 'compiler_strategy': 'MODULES', + 'version': '10'}, + 'target' : {'name':'haswell', 'module_name': 'craype-haswell'}} + + arch = spack.architecture.arch_from_dict(d) + self.assertIsInstance(arch, Arch) + self.assertIsInstance(arch.platform, Platform) + self.assertIsInstance(arch.platform_os, OperatingSystem) + self.assertIsInstance(arch.target, Target) + def test_platform_class_and_compiler_strategies(self): a = CrayXc() -- cgit v1.2.3-70-g09d2 From 676591ffc0d62a4d3b20653a2faa788c06d96d77 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 14:17:46 -0800 Subject: fixed a bug and a test bug --- lib/spack/spack/spec.py | 2 +- .../mock_configs/site_spackconfig/compilers.yaml | 23 +++++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 6cca61ca4e..6d2138d4c8 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1307,7 +1307,7 @@ class Spec(object): if not self.compiler.satisfies(other.compiler, strict=strict): return False elif strict and (other.compiler and not self.compiler): - return True + return False if not self.variants.satisfies(other.variants, strict=strict): return False diff --git a/var/spack/mock_configs/site_spackconfig/compilers.yaml b/var/spack/mock_configs/site_spackconfig/compilers.yaml index fcbf7a53f1..72fa252881 100644 --- a/var/spack/mock_configs/site_spackconfig/compilers.yaml +++ b/var/spack/mock_configs/site_spackconfig/compilers.yaml @@ -13,10 +13,23 @@ compilers: fc: /path/to/gfortran modules: None gcc@5.2.0: - cc: cc - cxx: CC - f77: ftn - fc: ftn - modules: + cc: cc + cxx: CC + f77: ftn + fc: ftn + modules: - PrgEnv-gnu - gcc/5.2.0 + intel@15.0.1: + cc: cc + ccx: CC + f77: ftn + fc: ftn + modules: + - PrgEnv-intel + - intel/15.0.1 + intel@15.1.2: + cc: /path/to/icc + cxx: /path/to/ic++ + f77: /path/to/ifort + fc: /path/to/ifort -- cgit v1.2.3-70-g09d2 From 6e7b00a0f6229a2c1df7a5b2f7244bdf5a793d65 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 15:54:23 -0800 Subject: Made module handling much saner and safer --- lib/spack/spack/build_environment.py | 2 +- lib/spack/spack/compiler.py | 26 ++++++++++++---------- lib/spack/spack/compilers/__init__.py | 21 +++++++++++------ lib/spack/spack/concretize.py | 9 ++++---- lib/spack/spack/test/architecture.py | 8 +++---- .../mock_configs/site_spackconfig/compilers.yaml | 5 +++++ 6 files changed, 43 insertions(+), 28 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 6e03394777..0cb4d77499 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -171,7 +171,7 @@ def set_compiler_environment_variables(pkg): os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) - if compiler.modules: + if compiler.strategy == 'MODULES': for mod in compiler.modules: load_module(mod) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 46f2dfaec7..5d851f5a3d 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -106,26 +106,28 @@ class Compiler(object): PrgEnv_compiler = None - def __init__(self, cspec, paths, modules=None): + def __init__(self, cspec, strategy, paths, modules=None): def check(exe): if exe is None: return None _verify_executables(exe) return exe + self.strategy = strategy + self.cc = check(paths[0]) self.cxx = check(paths[1]) - self.f77 = check(paths[2]) - if len(paths) == 3: - self.fc = self.f77 - else: - self.fc = check(paths[3]) + if len(paths) > 2: + self.f77 = check(paths[2]) + if len(paths) == 3: + self.fc = self.f77 + else: + self.fc = check(paths[3]) self.spec = cspec self.modules = modules - @property def version(self): return self.spec.version @@ -267,7 +269,7 @@ class Compiler(object): if newcount <= prevcount: continue - compilers[ver] = cls(spec, paths) + compilers[ver] = cls(spec, 'PATH', paths) return list(compilers.values()) @@ -287,7 +289,7 @@ class Compiler(object): for name, version in matches: v = version - comp = cls(spack.spec.CompilerSpec(name + '@' + v), + comp = cls(spack.spec.CompilerSpec(name + '@' + v), 'MODULES', ['cc', 'CC', 'ftn'], [cls.PrgEnv, name +'/' + v]) compilers.append(comp) @@ -302,12 +304,12 @@ class Compiler(object): def __str__(self): """Return a string represntation of the compiler toolchain.""" - if self.modules: + if self.strategy is 'MODULES': return "%s(%s)" % ( - self.name, '\n '.join((str(s) for s in (self.cc, self.cxx, self.f77, self.fc, self.modules)))) + self.name, '\n '.join((str(s) for s in (self.strategy, self.cc, self.cxx, self.f77, self.fc, self.modules)))) else: return "%s(%s)" % ( - self.name, '\n '.join((str(s) for s in (self.cc, self.cxx, self.f77, self.fc)))) + self.name, '\n '.join((str(s) for s in (self.strategy, self.cc, self.cxx, self.f77, self.fc)))) class CompilerAccessError(spack.error.SpackError): diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index e38ef949d7..32885062fd 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -129,6 +129,11 @@ def add_compilers_to_config(scope, *compilers): for compiler in compilers: compiler_entry = {} + val = getattr(compiler, 'strategy') + if not val: + val = 'None' + compiler_entry[c] = val + for c in _required_instance_vars: val = getattr(compiler, c) if not val: @@ -190,6 +195,11 @@ def compilers_for_spec(compiler_spec): raise InvalidCompilerConfigurationError(cspec) cls = class_for_compiler_name(cspec.name) + + strategy = items['strategy'] + if not strategy: + raise InvalidCompilerConfigurationError(cspec) + compiler_paths = [] for c in _required_instance_vars: compiler_path = items[c] @@ -203,22 +213,19 @@ def compilers_for_spec(compiler_spec): items[m] = None mods = items[m] - return cls(cspec, compiler_paths, mods) + return cls(cspec, strategy, compiler_paths, mods) matches = find(compiler_spec) return [get_compiler(cspec) for cspec in matches] @_auto_compiler_spec -def compiler_for_spec(compiler_spec, target): +def compiler_for_spec(compiler_spec, operating_system): """Get the compiler that satisfies compiler_spec. compiler_spec must be concrete.""" assert(compiler_spec.concrete) - compilers = compilers_for_spec(compiler_spec) - if target.compiler_strategy == "PATH": - compilers = [c for c in compilers if c.modules is None] - elif target.compiler_strategy == "MODULES": - compilers = [c for c in compilers if c.modules is not None] + compilers = [c for c in compilers_for_spec(compiler_spec) + if c.strategy == operating_system.strategy] if len(compilers) < 1: raise NoCompilerForSpecError(compiler_spec, target) if len(compilers) > 1: diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 37204e32a4..7a87a824d5 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -354,10 +354,11 @@ class DefaultConcretizer(object): # Should think whether this can be more efficient def _proper_compiler_style(cspec, architecture): compilers = spack.compilers.compilers_for_spec(cspec) - if architecture.platform_os.compiler_strategy == 'PATH': - filter(lambda c: not c.modules, compilers) - if architecture.platform_os.compiler_strategy == 'MODULES': - filter(lambda c: c.modules, compilers) + filter(lambda c: c.strategy == architecture.platform_os.compiler_strategy, compilers) +#if architecture.platform_os.compiler_strategy == 'PATH': + # filter(lambda c: not c.modules, compilers) + #if architecture.platform_os.compiler_strategy == 'MODULES': + # filter(lambda c: c.modules, compilers) return compilers diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index a390a3fbaa..75a67bf02f 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -34,10 +34,10 @@ class ArchitectureTest(unittest.TestCase): 'target' : {'name':'haswell', 'module_name': 'craype-haswell'}} arch = spack.architecture.arch_from_dict(d) - self.assertIsInstance(arch, Arch) - self.assertIsInstance(arch.platform, Platform) - self.assertIsInstance(arch.platform_os, OperatingSystem) - self.assertIsInstance(arch.target, Target) + self.assertTrue( isinstance(arch, Arch) ) + self.assertTrue( isinstance(arch.platform, Platform) ) + self.assertTrue( isinstance(arch.platform_os, OperatingSystem) ) + self.assertTrue( isinstance(arch.target, Target) ) def test_platform_class_and_compiler_strategies(self): diff --git a/var/spack/mock_configs/site_spackconfig/compilers.yaml b/var/spack/mock_configs/site_spackconfig/compilers.yaml index 72fa252881..5f8b38007b 100644 --- a/var/spack/mock_configs/site_spackconfig/compilers.yaml +++ b/var/spack/mock_configs/site_spackconfig/compilers.yaml @@ -6,12 +6,14 @@ compilers: f77: None fc: None modules: None + strategy: PATH gcc@4.5.0: cc: /path/to/gcc cxx: /path/to/g++ f77: /path/to/gfortran fc: /path/to/gfortran modules: None + strategy: PATH gcc@5.2.0: cc: cc cxx: CC @@ -20,6 +22,7 @@ compilers: modules: - PrgEnv-gnu - gcc/5.2.0 + strategy: MODULES intel@15.0.1: cc: cc ccx: CC @@ -28,8 +31,10 @@ compilers: modules: - PrgEnv-intel - intel/15.0.1 + strategy: MODULES intel@15.1.2: cc: /path/to/icc cxx: /path/to/ic++ f77: /path/to/ifort fc: /path/to/ifort + strategy: PATH \ No newline at end of file -- cgit v1.2.3-70-g09d2 From ffb9574312e8b6368c7696c2eadd17e46ec9a400 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 15:59:23 -0800 Subject: fixed type/bug --- lib/spack/spack/compilers/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 32885062fd..b50ad02b07 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -225,7 +225,7 @@ def compiler_for_spec(compiler_spec, operating_system): be concrete.""" assert(compiler_spec.concrete) compilers = [c for c in compilers_for_spec(compiler_spec) - if c.strategy == operating_system.strategy] + if c.strategy == operating_system.compiler_strategy] if len(compilers) < 1: raise NoCompilerForSpecError(compiler_spec, target) if len(compilers) > 1: -- cgit v1.2.3-70-g09d2 From 65d4169f003ce73c59f12e426e1e7fa4bf2062f3 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 16:03:11 -0800 Subject: fixed type/bug --- lib/spack/spack/compilers/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index b50ad02b07..518eea55c4 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -132,7 +132,7 @@ def add_compilers_to_config(scope, *compilers): val = getattr(compiler, 'strategy') if not val: val = 'None' - compiler_entry[c] = val + compiler_entry['strategy'] = val for c in _required_instance_vars: val = getattr(compiler, c) -- cgit v1.2.3-70-g09d2 From 16d8c25b231e795f8c4f3d11f937a4658596b238 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 16:12:32 -0800 Subject: fixed floating 'target' --- lib/spack/spack/compilers/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 518eea55c4..d271b60261 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -227,7 +227,7 @@ def compiler_for_spec(compiler_spec, operating_system): compilers = [c for c in compilers_for_spec(compiler_spec) if c.strategy == operating_system.compiler_strategy] if len(compilers) < 1: - raise NoCompilerForSpecError(compiler_spec, target) + raise NoCompilerForSpecError(compiler_spec, operating_system) if len(compilers) > 1: raise CompilerSpecInsufficientlySpecificError(compiler_spec) return compilers[0] -- cgit v1.2.3-70-g09d2 From 58efe1550d913e0bf31f2d5b6e279066cf5363d5 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 2 Mar 2016 16:14:42 -0800 Subject: Default PATH arg --- lib/spack/spack/architecture.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index e432374781..85ced6e942 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -170,7 +170,7 @@ class OperatingSystem(object): find compilers we call find_compilers method for each operating system """ - def __init__(self, name, version, compiler_strategy): + def __init__(self, name, version, compiler_strategy="PATH"): self.name = name self.version = version self.compiler_strategy = compiler_strategy @@ -180,19 +180,9 @@ class OperatingSystem(object): def __repr__(self): return self.__str__() - - - def compiler_strategy(self): - """ Operating Systems will now be in charge of the compiler finding - strategy. They will each have their own find_compilers method - which depending on their compiler strategy will find the compilers - using a specific method (i.e PATH vs MODULES). - """ - raise NotImplementedError() def _cmp_key(self): return (self.name, self.version, self.compiler_strategy) - def to_dict(self): d = {} -- cgit v1.2.3-70-g09d2 From 2b487287419528142b16d9e4201a44a034c11d20 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 2 Mar 2016 16:15:34 -0800 Subject: Changed os subclasses CNL to change attribute to MODULES --- lib/spack/spack/operating_systems/cnl.py | 6 ------ lib/spack/spack/operating_systems/linux_distro.py | 11 +---------- lib/spack/spack/operating_systems/mac_osx.py | 13 +------------ 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/lib/spack/spack/operating_systems/cnl.py b/lib/spack/spack/operating_systems/cnl.py index 20cb4c215b..9a0bf6c194 100644 --- a/lib/spack/spack/operating_systems/cnl.py +++ b/lib/spack/spack/operating_systems/cnl.py @@ -11,9 +11,3 @@ class Cnl(OperatingSystem): name = 'CNL' version = '10' super(Cnl, self).__init__(name, version, "MODULES") - - def compiler_strategy(self): - return self.compiler_strategy - - def find_compilers(self): - pass diff --git a/lib/spack/spack/operating_systems/linux_distro.py b/lib/spack/spack/operating_systems/linux_distro.py index c5547749d8..81c7a86430 100644 --- a/lib/spack/spack/operating_systems/linux_distro.py +++ b/lib/spack/spack/operating_systems/linux_distro.py @@ -12,13 +12,4 @@ class LinuxDistro(OperatingSystem): name = py_platform.dist()[0] version = py_platform.dist()[1] - super(LinuxDistro, self).__init__(name, version, "PATH") - - def compiler_strategy(self): - return self.compiler_strategy - - def find_compilers(self): - pass - - - + super(LinuxDistro, self).__init__(name, version) diff --git a/lib/spack/spack/operating_systems/mac_osx.py b/lib/spack/spack/operating_systems/mac_osx.py index 555c5cfb14..a9de03d2cc 100644 --- a/lib/spack/spack/operating_systems/mac_osx.py +++ b/lib/spack/spack/operating_systems/mac_osx.py @@ -26,15 +26,4 @@ class MacOsx(OperatingSystem): except KeyError: name = "mac_os" - super(MacOsx, self).__init__(name, mac_ver, "PATH") - - def compiler_strategy(self): - return self.compiler_strategy - - def find_compilers(self): - pass - - - - - + super(MacOsx, self).__init__(name, mac_ver) -- cgit v1.2.3-70-g09d2 From 487b2495a1dbda730a6525f17f175f3eff1674c0 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 16:33:10 -0800 Subject: made spack more conservative in compiler strategies attempted --- lib/spack/spack/compiler.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 5d851f5a3d..999984740f 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -34,6 +34,7 @@ from llnl.util.filesystem import join_path import spack.error import spack.spec +import spack.architecture from spack.util.multiproc import parmap from spack.util.executable import * from spack.util.environment import get_path @@ -221,7 +222,15 @@ class Compiler(object): @classmethod def find(cls, *path): - return cls.find_in_path(*path) + cls.find_in_modules() + compilers = [] + platform = spack.architecture.sys_type() + strategies = [o.compiler_strategy for o in platform.operating_systems.values()] + if 'PATH' in strategies: + compilers.extend(cls.find_in_path(*path)) + if 'MODULES' in strategies: + compilers.extend(cls.find_in_modules()) + return compilers + @classmethod def find_in_path(cls, *path): -- cgit v1.2.3-70-g09d2 From 4f9a309de850f339ed43cd788be45d208bebf6c6 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 2 Mar 2016 16:35:02 -0800 Subject: made spack more conservative in compiler strategies attempted --- lib/spack/spack/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 999984740f..c8a025f83c 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -224,7 +224,7 @@ class Compiler(object): def find(cls, *path): compilers = [] platform = spack.architecture.sys_type() - strategies = [o.compiler_strategy for o in platform.operating_systems.values()] + strategies = [o.compiler_strategy for o in platform.operating_sys.values()] if 'PATH' in strategies: compilers.extend(cls.find_in_path(*path)) if 'MODULES' in strategies: -- cgit v1.2.3-70-g09d2 From f07d4c94393f6541d1a6afd9118d3f9c84bd08fc Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 16 Mar 2016 18:55:14 -0600 Subject: + Provide ~perl and ~shared variants. --- var/spack/repos/builtin/packages/graphviz/package.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 7af7da1881..2a2102bfcb 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -7,6 +7,9 @@ class Graphviz(Package): version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae') + variant('perl', default=True, description='Disable if you have problems with the optional script language bindings') + variant('shared', default=True, description='Building static is required on AIX') + parallel = False depends_on("swig") @@ -14,8 +17,12 @@ class Graphviz(Package): depends_on("ghostscript") def install(self, spec, prefix): - configure("--prefix=%s" %prefix) + options = ['--prefix=%s' % prefix] + if '~perl' in spec: + options.append('--disable-perl') + if '~shared' in spec: + options.append('--enable-shared=no') + configure(*options) make() make("install") - -- cgit v1.2.3-70-g09d2 From f3ea0420f80f418a0f3e628479c782f197e6a43e Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 17 Mar 2016 21:53:13 -0400 Subject: Import recent changes --- lib/spack/env/cc | 185 +++++++++++++++++++------------------------------------ 1 file changed, 65 insertions(+), 120 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index df6795c264..c6a09724e9 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -65,7 +65,7 @@ function die { } for param in $parameters; do - if [ -z "${!param}" ]; then + if [[ -z ${!param} ]]; then die "Spack compiler must be run from spack! Input $param was missing!" fi done @@ -78,10 +78,11 @@ done # 'command' is set based on the input command to $SPACK_[CC|CXX|F77|F90] # # 'mode' is set to one of: +# cpp preprocess # cc compile +# as assemble # ld link # ccld compile & link -# cpp preprocessor # vcheck version check # command=$(basename "$0") @@ -131,6 +132,9 @@ if [ -z "$mode" ]; then if [ "$arg" = -E ]; then mode=cpp break + elif [ "$arg" = -S ]; then + mode=as + break elif [ "$arg" = -c ]; then mode=cc break @@ -146,22 +150,25 @@ fi # Check that at least one of the real commands was actually selected, # otherwise we don't know what to execute. -if [ -z "$command" ]; then +if [[ -z $command ]]; then die "ERROR: Compiler '$SPACK_COMPILER_SPEC' does not support compiling $language programs." fi +if [ "$mode" == vcheck ] ; then + exec ${command} "$@" +fi + # Save original command for debug logging input_command="$@" args=("$@") -<<<<<<< HEAD # Dump parsed values for unit testing if asked for if [[ -n $SPACK_TEST_COMMAND ]]; then # # Now do real parsing of the command line args, trying hard to keep - # non-rpath linker arguments in the proper order w.r.t. other command - # line arguments. This is important for things like groups. + # non-rpath linker arguments in the proper order w.r.t. other command line + # arguments. This is important for things like groups. # includes=() libraries=() @@ -188,32 +195,44 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then ;; -Wl,*) arg="${1#-Wl,}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - if [[ "$arg" = -rpath=* ]]; then - rpaths+=("${arg#-rpath=}") - elif [[ "$arg" = -rpath ]]; then + # TODO: Handle multiple -Wl, continuations of -Wl,-rpath + if [[ $arg == -rpath=* ]]; then + arg="${arg#-rpath=}" + for rpath in ${arg//,/ }; do + rpaths+=("$rpath") + done + elif [[ $arg == -rpath,* ]]; then + arg="${arg#-rpath,}" + for rpath in ${arg//,/ }; do + rpaths+=("$rpath") + done + elif [[ $arg == -rpath ]]; then shift; arg="$1" - if [[ "$arg" != -Wl,* ]]; then + if [[ $arg != '-Wl,'* ]]; then die "-Wl,-rpath was not followed by -Wl,*" fi - rpaths+=("${arg#-Wl,}") + arg="${arg#-Wl,}" + for rpath in ${arg//,/ }; do + rpaths+=("$rpath") + done else other_args+=("-Wl,$arg") fi ;; - -Xlinker,*) - arg="${1#-Xlinker,}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - if [[ "$arg" = -rpath=* ]]; then + -Xlinker) + shift; arg="$1"; + if [[ $arg = -rpath=* ]]; then rpaths+=("${arg#-rpath=}") - elif [[ "$arg" = -rpath ]]; then + elif [[ $arg = -rpath ]]; then shift; arg="$1" - if [[ "$arg" != -Xlinker,* ]]; then - die "-Xlinker,-rpath was not followed by -Xlinker,*" + if [[ $arg != -Xlinker ]]; then + die "-Xlinker -rpath was not followed by -Xlinker " fi - rpaths+=("${arg#-Xlinker,}") + shift; arg="$1" + rpaths+=("$arg") else - other_args+=("-Xlinker,$arg") + other_args+=("-Xlinker") + other_args+=("$arg") fi ;; *) @@ -222,88 +241,6 @@ if [[ -n $SPACK_TEST_COMMAND ]]; then esac shift done -======= -if [ "$mode" == vcheck ] ; then - exec ${command} "$@" -fi - -# -# Now do real parsing of the command line args, trying hard to keep -# non-rpath linker arguments in the proper order w.r.t. other command -# line arguments. This is important for things like groups. -# -includes=() -libraries=() -libs=() -rpaths=() -other_args=() - -while [ -n "$1" ]; do - case "$1" in - -I*) - arg="${1#-I}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - includes+=("$arg") - ;; - -L*) - arg="${1#-L}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libraries+=("$arg") - ;; - -l*) - arg="${1#-l}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libs+=("$arg") - ;; - -Wl,*) - arg="${1#-Wl,}" - # TODO: Handle multiple -Wl, continuations of -Wl,-rpath - if [[ $arg == -rpath=* ]]; then - arg="${arg#-rpath=}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - elif [[ $arg == -rpath,* ]]; then - arg="${arg#-rpath,}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - elif [[ $arg == -rpath ]]; then - shift; arg="$1" - if [[ $arg != '-Wl,'* ]]; then - die "-Wl,-rpath was not followed by -Wl,*" - fi - arg="${arg#-Wl,}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - else - other_args+=("-Wl,$arg") - fi - ;; - -Xlinker) - shift; arg="$1"; - if [[ $arg = -rpath=* ]]; then - rpaths+=("${arg#-rpath=}") - elif [[ $arg = -rpath ]]; then - shift; arg="$1" - if [[ $arg != -Xlinker ]]; then - die "-Xlinker -rpath was not followed by -Xlinker " - fi - shift; arg="$1" - rpaths+=("$arg") - else - other_args+=("-Xlinker") - other_args+=("$arg") - fi - ;; - *) - other_args+=("$1") - ;; - esac - shift -done ->>>>>>> develop IFS=$'\n' case "$SPACK_TEST_COMMAND" in @@ -329,8 +266,8 @@ done echo "${other_args[*]}" ;; *) - echo "ERROR: Unknown test command" - exit 1 ;; + die "ERROR: Unknown test command" + ;; esac exit fi @@ -338,11 +275,14 @@ fi # Read spack dependencies from the path environment variable IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do - if [ -d "$dep/include" ]; then - args=("-I$dep/include" "${args[@]}") + if [[ -d $dep/include ]]; then + if [[ $mode = cpp || $mode = cc || $mode = as || $mode = ccld ]]; then + args=("-I$dep/include" "${args[@]}") + fi fi - if [ -d "$dep/lib" ]; then + if [[ -d $dep/lib ]]; then + # libraries+=("$dep/lib") if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") elif [[ $mode = ld ]]; then @@ -350,7 +290,7 @@ for dep in "${deps[@]}"; do fi fi - if [ -d "$dep/lib64" ]; then + if [[ -d $dep/lib64 ]]; then # libraries+=("$dep/lib64") if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") @@ -362,8 +302,18 @@ done # Include all -L's and prefix/whatever dirs in rpath if [[ $mode = ccld ]]; then + # for dir in "${libraries[@]}"; do + # if [[ dir = $SPACK_INSTALL* ]]; then + # args=("-Wl,-rpath,$dir" "${args[@]}") + # fi + # done args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") elif [[ $mode = ld ]]; then + # for dir in "${libraries[@]}"; do + # if [[ dir = $SPACK_INSTALL* ]]; then + # args=("-rpath" "$dir" "${args[@]}") + # fi + # done args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi @@ -385,28 +335,23 @@ PATH="" for dir in "${env_path[@]}"; do remove="" for rm_dir in "${spack_env_dirs[@]}"; do - if [ "$dir" = "$rm_dir" ]; then remove=True; fi + if [[ $dir = $rm_dir ]]; then remove=True; fi done - if [ -z "$remove" ]; then - if [ -z "$PATH" ]; then - PATH="$dir" - else - PATH="$PATH:$dir" - fi + if [[ -z $remove ]]; then + PATH="${PATH:+$PATH:}$dir" fi done export PATH -full_command=("$command") -full_command+=("${args[@]}") +full_command=("$command" "${args[@]}") # # Write the input and output commands to debug logs if it's asked for. # -if [ "$SPACK_DEBUG" = "TRUE" ]; then +if [[ $SPACK_DEBUG = TRUE ]]; then input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.in.log" output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.out.log" - echo "$input_command" >> $input_log + echo "$input_command" >> $input_log echo "$mode ${full_command[@]}" >> $output_log fi -- cgit v1.2.3-70-g09d2 From 16fa40b893054d8bd7f13625f204bf02d74a27b5 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Fri, 18 Mar 2016 15:50:24 -0700 Subject: (1) add a var/cache directory under spack. (2) downloads from URLFetchStrategy check the cache and skip the download if the source is available there. --- lib/spack/spack/__init__.py | 2 ++ lib/spack/spack/fetch_strategy.py | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 0ba42bbbfc..22436e46c4 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -46,6 +46,8 @@ var_path = join_path(spack_root, "var", "spack") stage_path = join_path(var_path, "stage") repos_path = join_path(var_path, "repos") share_path = join_path(spack_root, "share", "spack") +cache_path = join_path(spack_root, "var", "cache") +mkdirp(cache_path) prefix = spack_root opt_path = join_path(prefix, "opt") diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 0d0a7db8a9..3a774a35cd 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -156,6 +156,11 @@ class URLFetchStrategy(FetchStrategy): if self.archive_file: tty.msg("Already downloaded %s" % self.archive_file) return + cached = self.check_cache() + if cached: + tty.msg("Cached %s." % cached) + shutil.copy(cached, "./") + return tty.msg("Trying to fetch from %s" % self.url) @@ -211,6 +216,9 @@ class URLFetchStrategy(FetchStrategy): if not self.archive_file: raise FailedDownloadError(self.url) + else: + shutil.copy(self.archive_file, spack.cache_path) + @property def archive_file(self): @@ -283,6 +291,17 @@ class URLFetchStrategy(FetchStrategy): "%s checksum failed for %s" % (checker.hash_name, self.archive_file), "Expected %s but got %s" % (self.digest, checker.sum)) + + def check_cache(self): + if not self.digest: + return + checker = crypto.Checker(self.digest) + paths = (join_path(spack.cache_path, f) for f in os.listdir(spack.cache_path)) + for p in paths: + if checker.check(p): + return p + + @_needs_stage def reset(self): """Removes the source path if it exists, then re-expands the archive.""" -- cgit v1.2.3-70-g09d2 From ac7323118e9c3ddfc7b27992e545e59de2f32c7f Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Fri, 18 Mar 2016 16:34:45 -0700 Subject: rename for clarity --- lib/spack/spack/fetch_strategy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 3a774a35cd..73083a0f5a 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -156,7 +156,7 @@ class URLFetchStrategy(FetchStrategy): if self.archive_file: tty.msg("Already downloaded %s" % self.archive_file) return - cached = self.check_cache() + cached = self.search_cache() if cached: tty.msg("Cached %s." % cached) shutil.copy(cached, "./") @@ -292,7 +292,7 @@ class URLFetchStrategy(FetchStrategy): "Expected %s but got %s" % (self.digest, checker.sum)) - def check_cache(self): + def search_cache(self): if not self.digest: return checker = crypto.Checker(self.digest) -- cgit v1.2.3-70-g09d2 From fd067dd8b888ac4c2cc6cacec44d2ba978b04e8a Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Fri, 18 Mar 2016 17:00:13 -0700 Subject: since only archives with checksums can be retrieved from the cache, make sure that an archive without a checksum isnt placed there (this wouldn't cause an error but does waste space and might be confusing) --- lib/spack/spack/fetch_strategy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 73083a0f5a..27fb38b7a6 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -216,7 +216,7 @@ class URLFetchStrategy(FetchStrategy): if not self.archive_file: raise FailedDownloadError(self.url) - else: + elif self.digest: shutil.copy(self.archive_file, spack.cache_path) -- cgit v1.2.3-70-g09d2 From d632266a40e8d472892991144391b1862231fec0 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Fri, 18 Mar 2016 17:15:45 -0700 Subject: move cache to var/spack/cache --- lib/spack/spack/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 22436e46c4..6fb472b15d 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -46,7 +46,7 @@ var_path = join_path(spack_root, "var", "spack") stage_path = join_path(var_path, "stage") repos_path = join_path(var_path, "repos") share_path = join_path(spack_root, "share", "spack") -cache_path = join_path(spack_root, "var", "cache") +cache_path = join_path(var_path, "cache") mkdirp(cache_path) prefix = spack_root -- cgit v1.2.3-70-g09d2 From 4b46e21685b557188d8738bf11af2e0195c14046 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 21 Mar 2016 19:55:54 -0600 Subject: + Provide package numdiff. --- .../repos/builtin/packages/numdiff/package.py | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 var/spack/repos/builtin/packages/numdiff/package.py diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py new file mode 100644 index 0000000000..a51f6206cf --- /dev/null +++ b/var/spack/repos/builtin/packages/numdiff/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Numdiff(Package): + """Numdiff is a little program that can be used to compare putatively + similar files line by line and field by field, ignoring small numeric + differences or/and different numeric formats.""" + + homepage = 'https://www.nongnu.org/numdiff' + url = 'http://nongnu.askapache.com/numdiff/numdiff-5.8.1.tar.gz' + + version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e') + + def install(self, spec, prefix): + options = ['--prefix=%s' % prefix] + configure(*options) + make() + make('install') -- cgit v1.2.3-70-g09d2 From 7ec450912dc71915205857da75bb418ffc3d0904 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 21 Mar 2016 21:14:03 -0600 Subject: + Provide subversion and required packages apr and apr-util. + Installation of subversion may need to be modified to include python and perl bindings. I have provided comments to this end, but the code is not active. --- .../packages/apr-util/apr-util.new/package.py | 44 ++++++++++++++++ .../repos/builtin/packages/apr/apr.new/package.py | 51 +++++++++++++++++++ .../packages/subversion/subversion.new/package.py | 59 ++++++++++++++++++++++ var/spack/repos/builtin/packages/swig/package.py | 5 +- 4 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py create mode 100644 var/spack/repos/builtin/packages/apr/apr.new/package.py create mode 100644 var/spack/repos/builtin/packages/subversion/subversion.new/package.py diff --git a/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py b/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py new file mode 100644 index 0000000000..8f19c84d22 --- /dev/null +++ b/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class AprUtil(Package): + """Apache Portable Runtime Utility""" + homepage = 'https://apr.apache.org/' + url = 'http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz' + + version('1.5.4', '866825c04da827c6e5f53daff5569f42') + + depends_on('apr') + + def install(self, spec, prefix): + + # configure, build, install: + options = ['--prefix=%s' % prefix] + options.append('--with-apr=%s' % spec['apr'].prefix) + + configure(*options) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/apr/apr.new/package.py b/var/spack/repos/builtin/packages/apr/apr.new/package.py new file mode 100644 index 0000000000..5cbbad350b --- /dev/null +++ b/var/spack/repos/builtin/packages/apr/apr.new/package.py @@ -0,0 +1,51 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Apr(Package): + """Apache portable runtime.""" + homepage = 'https://apr.apache.org/' + url = 'http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz' + + version('1.5.2', '98492e965963f852ab29f9e61b2ad700') + + #variant('ncurses', default=True, description='Enables the build of the ncurses gui') + #variant('qt', default=False, description='Enables the build of cmake-gui') + #variant('doc', default=False, description='Enables the generation of html and man page documentation') + + #depends_on('ncurses', when='+ncurses') + #depends_on('qt', when='+qt') + #depends_on('python@2.7.11:', when='+doc') + #depends_on('py-sphinx', when='+doc') + + #def url_for_version(self, version): + # """Handle CMake's version-based custom URLs.""" + # return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (version.up_to(2), version) + + def install(self, spec, prefix): + options = ['--prefix=%s' % prefix] + configure(*options) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/subversion/subversion.new/package.py b/var/spack/repos/builtin/packages/subversion/subversion.new/package.py new file mode 100644 index 0000000000..b1c3380238 --- /dev/null +++ b/var/spack/repos/builtin/packages/subversion/subversion.new/package.py @@ -0,0 +1,59 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +#import os + +class Subversion(Package): + """Apache Subversion - an open source version control system.""" + homepage = 'https://subversion.apache.org/' + url = 'http://archive.apache.org/dist/subversion/subversion-1.8.13.tar.gz' + + version('1.8.13', '8065b3698d799507fb72dd7926ed32b6') + version('1.9.3', 'a92bcfaec4e5038f82c74a7b5bbd2f46') + + depends_on('apr') + depends_on('apr-util') + depends_on('zlib') + depends_on('sqlite') + #depends_on('swig') + + def install(self, spec, prefix): + + # configure, build, install: + # Ref: http://www.linuxfromscratch.org/blfs/view/svn/general/subversion.html + options = ['--prefix=%s' % prefix] + options.append('--with-apr=%s' % spec['apr'].prefix) + options.append('--with-apr-util=%s' % spec['apr-util'].prefix) + options.append('--with-zlib=%s' % spec['zlib'].prefix) + options.append('--with-sqlite=%s' % spec['sqlite'].prefix) + #options.append('--with-swig=%s' % spec['swig'].prefix) + + configure(*options) + make() + make('install') + #make('swig-py') # python bindings + #make('install-swig-py') + #make('swig-pl') # perl bindings + #make('install-swig-pl') diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index 8d46c4fe46..de6055e965 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -36,11 +36,14 @@ class Swig(Package): homepage = "http://www.swig.org" url = "http://prdownloads.sourceforge.net/swig/swig-3.0.2.tar.gz" - version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') + version('3.0.8', 'c96a1d5ecb13d38604d7e92148c73c97') + version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') + version('2.0.12', 'c3fb0b2d710cc82ed0154b91e43085a4') depends_on('pcre') def install(self, spec, prefix): configure("--prefix=%s" % prefix) + make() make("install") -- cgit v1.2.3-70-g09d2 From ee5e507ff60e56f9d83de9b7e2c19e929dcd3481 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Mon, 21 Mar 2016 20:48:12 -0700 Subject: pursuing a strategy using fetch.archive and treating var/spack/cache as a mirror. this should support both URLFetchStrategy as well as VCSFetchStrategy (the previous strategy supported only the former). this won't work until URLFetchStrategy.archive is updated --- lib/spack/spack/fetch_strategy.py | 17 ----------------- lib/spack/spack/package.py | 2 ++ lib/spack/spack/stage.py | 13 ++++++++++++- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 27fb38b7a6..d1b3ce9291 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -156,11 +156,6 @@ class URLFetchStrategy(FetchStrategy): if self.archive_file: tty.msg("Already downloaded %s" % self.archive_file) return - cached = self.search_cache() - if cached: - tty.msg("Cached %s." % cached) - shutil.copy(cached, "./") - return tty.msg("Trying to fetch from %s" % self.url) @@ -216,8 +211,6 @@ class URLFetchStrategy(FetchStrategy): if not self.archive_file: raise FailedDownloadError(self.url) - elif self.digest: - shutil.copy(self.archive_file, spack.cache_path) @property @@ -292,16 +285,6 @@ class URLFetchStrategy(FetchStrategy): "Expected %s but got %s" % (self.digest, checker.sum)) - def search_cache(self): - if not self.digest: - return - checker = crypto.Checker(self.digest) - paths = (join_path(spack.cache_path, f) for f in os.listdir(spack.cache_path)) - for p in paths: - if checker.check(p): - return p - - @_needs_stage def reset(self): """Removes the source path if it exists, then re-expands the archive.""" diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index b488e4c49d..d007f37aeb 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -715,6 +715,8 @@ class Package(object): if spack.do_checksum and self.version in self.versions: self.stage.check() + self.stage.cache_local() + def do_stage(self, mirror_only=False): """Unpacks the fetched tarball, then changes into the expanded tarball diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index f88f82fc2d..8933ad6da2 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -273,6 +273,7 @@ class Stage(object): # the root, so we add a '/' if it is not present. mirror_roots = [root if root.endswith('/') else root + '/' for root in mirrors.values()] + mirror_roots.append("file://" + os.path.abspath(spack.cache_path) + os.sep) urls = [urljoin(root, self.mirror_path) for root in mirror_roots] # If this archive is normally fetched from a tarball URL, @@ -305,6 +306,7 @@ class Stage(object): self.fetcher = self.default_fetcher raise fs.FetchError(errMessage, None) + def check(self): """Check the downloaded archive against a checksum digest. No-op if this stage checks code out of a repository.""" @@ -318,6 +320,15 @@ class Stage(object): else: self.fetcher.check() + + def cache_local(self): + archiveDst = join_path(os.path.abspath(spack.cache_path), self.mirror_path) + mkdirp(os.path.dirname(archiveDst)) + # TODO: this moves the archive for URLFetchStrategy vs. a copy - edit + # to do a move? + self.fetcher.archive(archiveDst) + + def expand_archive(self): """Changes to the stage directory and attempt to expand the downloaded archive. Fail if the stage is not set up or if the archive is not yet @@ -421,7 +432,7 @@ class ResourceStage(Stage): shutil.move(source_path, destination_path) -@pattern.composite(method_list=['fetch', 'create', 'check', 'expand_archive', 'restage', 'destroy']) +@pattern.composite(method_list=['fetch', 'create', 'check', 'expand_archive', 'restage', 'destroy', 'cache_local']) class StageComposite: """ Composite for Stage type objects. The first item in this composite is considered to be the root package, and -- cgit v1.2.3-70-g09d2 From b255f02762375cee064b062837581e5466fdb908 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Mon, 21 Mar 2016 20:50:26 -0700 Subject: undoing whitespace-only diff --- lib/spack/spack/fetch_strategy.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index d1b3ce9291..0d0a7db8a9 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -212,7 +212,6 @@ class URLFetchStrategy(FetchStrategy): if not self.archive_file: raise FailedDownloadError(self.url) - @property def archive_file(self): """Path to the source archive within this stage directory.""" @@ -284,7 +283,6 @@ class URLFetchStrategy(FetchStrategy): "%s checksum failed for %s" % (checker.hash_name, self.archive_file), "Expected %s but got %s" % (self.digest, checker.sum)) - @_needs_stage def reset(self): """Removes the source path if it exists, then re-expands the archive.""" -- cgit v1.2.3-70-g09d2 From 41a97c8f80b8e93a7b180bd4d4a5a4286ce6f311 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Mon, 21 Mar 2016 20:55:23 -0700 Subject: temporarily wrap archiving with conditional to avoid moving (this still causes a failure on the initial download) --- lib/spack/spack/stage.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 8933ad6da2..61faec6de9 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -323,10 +323,11 @@ class Stage(object): def cache_local(self): archiveDst = join_path(os.path.abspath(spack.cache_path), self.mirror_path) - mkdirp(os.path.dirname(archiveDst)) - # TODO: this moves the archive for URLFetchStrategy vs. a copy - edit - # to do a move? - self.fetcher.archive(archiveDst) + if not os.path.exists(archiveDst): #tmp conditional + mkdirp(os.path.dirname(archiveDst)) + # TODO: this moves the archive for URLFetchStrategy vs. a copy - + # edit to do a move? + self.fetcher.archive(archiveDst) def expand_archive(self): -- cgit v1.2.3-70-g09d2 From 1664d1b5034a6ca7bf9901df91a22087d609f5bf Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 22 Mar 2016 15:59:58 +0100 Subject: travis : removed external directory from the list under coverage --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 465a86faf7..30dfebf783 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ script: - spack config get compilers - spack install -v libdwarf # Run unit tests with code coverage - - coverage run --source=lib --omit=lib/spack/spack/test/*,lib/spack/env/*,lib/spack/docs/* bin/spack test + - coverage run --source=lib --omit=lib/spack/spack/test/*,lib/spack/env/*,lib/spack/docs/*,lib/spack/external/* bin/spack test # Checks if the file that have been changed are flake8 conformant - CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py/g'` - if [[ ${CHANGED_PYTHON_FILES} ]] ; then flake8 --format pylint --config flake8.ini ${CHANGED_PYTHON_FILES} ; fi -- cgit v1.2.3-70-g09d2 From 1f8d79b69ab005a6a372ff34806525148c0ed854 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 22 Mar 2016 09:33:49 -0600 Subject: + Provide a ~perl variant to support building on systems w/o the perl-devel package installed. --- var/spack/repos/builtin/packages/graphviz/package.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 2a2102bfcb..84bd696af2 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -8,7 +8,6 @@ class Graphviz(Package): version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae') variant('perl', default=True, description='Disable if you have problems with the optional script language bindings') - variant('shared', default=True, description='Building static is required on AIX') parallel = False @@ -20,8 +19,6 @@ class Graphviz(Package): options = ['--prefix=%s' % prefix] if '~perl' in spec: options.append('--disable-perl') - if '~shared' in spec: - options.append('--enable-shared=no') configure(*options) make() -- cgit v1.2.3-70-g09d2 From 75460d8586bf62dcedaf4eb5acdb2de75f1d662a Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 22 Mar 2016 10:43:43 -0700 Subject: URLFetchStrategy.archive does a copy vs. a move now --- lib/spack/spack/fetch_strategy.py | 2 +- lib/spack/spack/stage.py | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 0d0a7db8a9..fc5d7e231c 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -268,7 +268,7 @@ class URLFetchStrategy(FetchStrategy): if not extension(destination) == extension(self.archive_file): raise ValueError("Cannot archive without matching extensions.") - shutil.move(self.archive_file, destination) + shutil.copy(self.archive_file, destination) @_needs_stage def check(self): diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 61faec6de9..54359bddce 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -323,11 +323,8 @@ class Stage(object): def cache_local(self): archiveDst = join_path(os.path.abspath(spack.cache_path), self.mirror_path) - if not os.path.exists(archiveDst): #tmp conditional - mkdirp(os.path.dirname(archiveDst)) - # TODO: this moves the archive for URLFetchStrategy vs. a copy - - # edit to do a move? - self.fetcher.archive(archiveDst) + mkdirp(os.path.dirname(archiveDst)) + self.fetcher.archive(archiveDst) def expand_archive(self): -- cgit v1.2.3-70-g09d2 From 1eb7b8cf4624910121ac66996f17a212ed2cfc91 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 22 Mar 2016 12:31:27 -0600 Subject: + Add a validate function that refuses to build numdiff if arch is darwin-x86_64. --- var/spack/repos/builtin/packages/numdiff/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py index a51f6206cf..91286127fb 100644 --- a/var/spack/repos/builtin/packages/numdiff/package.py +++ b/var/spack/repos/builtin/packages/numdiff/package.py @@ -34,7 +34,22 @@ class Numdiff(Package): version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e') + def validate(self, spec): + """ + Checks if we are attempting to build on an incompatible + architecture. + + Ref. https://github.com/davydden/homebrew-dealiisuite/blob/master/numdiff.rb#L13-L15. + + :param spec: spec of the package + :raises RuntimeError: in case of inconsistencies. + """ + + if spec.satisfies("=darwin-x86_64"): + raise RuntimeError(msg) + def install(self, spec, prefix): + self.validate(spec) options = ['--prefix=%s' % prefix] configure(*options) make() -- cgit v1.2.3-70-g09d2 From 0ee993569f8f47f5ca94873bc779d98639e9a1b4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 23:04:59 +0100 Subject: add deal.ii package --- var/spack/repos/builtin/packages/dealii/package.py | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 var/spack/repos/builtin/packages/dealii/package.py diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py new file mode 100644 index 0000000000..cddf5cd98b --- /dev/null +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -0,0 +1,67 @@ +from spack import * + +class Dealii(Package): + """C++ software library providing well-documented tools to build finite element codes for a broad variety of PDEs.""" + homepage = "https://www.dealii.org" + url = "https://github.com/dealii/dealii/releases/download/v8.4.0/dealii-8.4.0.tar.gz" + + version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00') + + depends_on ("cmake") + depends_on ("blas") + depends_on ("lapack") + depends_on ("mpi") + + #depends_on ("arpack") + depends_on ("boost") + #depends_on ("doxygen") + depends_on ("hdf5+mpi") + depends_on ("metis") + #depends_on "muparser" + depends_on ("netcdf") + #depends_on ("numdiff") + #depends_on ("oce") + depends_on ("p4est") + depends_on ("parmetis") + depends_on ("petsc") + #depends_on ("slepc") + depends_on ("SuiteSparse") + #depends_on "tbb" + depends_on ("trilinos") + + def install(self, spec, prefix): + options = [] + options.extend(std_cmake_args) + + # CMAKE_BUILD_TYPE should be DebugRelease | Debug | Release + for word in options[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + options.remove(word) + + options.extend([ + '-DCMAKE_BUILD_TYPE=DebugRelease', + '-DDEAL_II_WITH_THREADS:BOOL=ON' + '-DDEAL_II_WITH_MPI:BOOL=ON', + '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), + '-DCMAKE_CXX_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), + '-DCMAKE_Fortran_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + #'-DARPACK_DIR=%s' % , + '-DBOOST_DIR=%s' % spec['boost'].prefix, + '-DHDF5_DIR=%s' % spec['hdf5'].prefix, + '-DMETIS_DIR=%s' % spec['metis'].prefix, + #'-DMUPARSER_DIR=%s ' + '-DNETCDF_DIR=%s' % spec['netcdf'].prefix, + #'-DOPENCASCADE_DIR= + '-DP4EST_DIR=%s' % spec['p4est'].prefix, + '-DPETSC_DIR=%s' % spec['petsc'].prefix, + #'-DSLEPC_DIR= + '-DUMFPACK_DIR=%s' % spec['SuiteSparse'].prefix, + #'-DTBB_DIR=%s' + '-DTRILINOS_DIR=%s' % spec['trilinos'].prefix + ]) + + cmake('.', *options) + + make() + make("test") + make("install") -- cgit v1.2.3-70-g09d2 From cb9fba98d8d0c389f3295d5d30cdb650e6ea79b7 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 22 Mar 2016 19:37:47 -0700 Subject: (1) relocate cache for tests (2) initial approach for restoring unit tests (just for git tests although the same concept applies to the other unit tests which are failing - namely those for svn and hg) --- lib/spack/spack/cmd/test.py | 4 ++++ lib/spack/spack/test/git_fetch.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index ddc6cb4fce..9a85c7d270 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -23,6 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os +import shutil from pprint import pprint from llnl.util.filesystem import join_path, mkdirp @@ -66,4 +67,7 @@ def test(parser, args): if not os.path.exists(outputDir): mkdirp(outputDir) + spack.cache_path = join_path(spack.var_path, "test-cache") + mkdirp(spack.cache_path) spack.test.run(args.names, outputDir, args.verbose) + shutil.rmtree(spack.cache_path) diff --git a/lib/spack/spack/test/git_fetch.py b/lib/spack/spack/test/git_fetch.py index 3578044116..76814f089a 100644 --- a/lib/spack/spack/test/git_fetch.py +++ b/lib/spack/spack/test/git_fetch.py @@ -30,6 +30,8 @@ from spack.test.mock_packages_test import * from spack.test.mock_repo import MockGitRepo from spack.version import ver +import shutil +import os class GitFetchTest(MockPackagesTest): """Tests fetching from a dummy git repository.""" @@ -49,6 +51,8 @@ class GitFetchTest(MockPackagesTest): """Destroy the stage space used by this test.""" super(GitFetchTest, self).tearDown() self.repo.destroy() + for d in os.listdir(spack.cache_path): + shutil.rmtree(os.path.join(spack.cache_path, d)) def assert_rev(self, rev): """Check that the current git revision is equal to the supplied rev.""" -- cgit v1.2.3-70-g09d2 From 688eca23ff4488a4cd90125b69d46cb69271a5cd Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 23 Mar 2016 09:54:57 -0700 Subject: cleanup --- lib/spack/spack/spec.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 4d2c61c0c4..d800a1667d 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -110,7 +110,7 @@ import spack import spack.architecture import spack.parse import spack.error -import spack.compilers as compilers +#import spack.compilers as compilers from spack.version import * from spack.util.naming import mod_to_class @@ -1174,9 +1174,9 @@ class Spec(object): spack.repo.get(spec.fullname) # validate compiler in addition to the package name. - if spec.compiler: - if not compilers.supported(spec.compiler): - raise UnsupportedCompilerError(spec.compiler.name) +# if spec.compiler: +# if not compilers.supported(spec.compiler): +# raise UnsupportedCompilerError(spec.compiler.name) # Ensure that variants all exist. for vname, variant in spec.variants.items(): -- cgit v1.2.3-70-g09d2 From ed0f6f75a7215c959431377ffe7e4faf09dc88d6 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Wed, 23 Mar 2016 19:49:28 -0700 Subject: clear test cache before and after each MockPackagesTest (I think Ive got a better way to avoid test fragility but Ill add this for now) --- lib/spack/spack/cmd/test.py | 2 +- lib/spack/spack/test/git_fetch.py | 5 ----- lib/spack/spack/test/mock_packages_test.py | 7 +++++++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index 9a85c7d270..233cd186f0 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -70,4 +70,4 @@ def test(parser, args): spack.cache_path = join_path(spack.var_path, "test-cache") mkdirp(spack.cache_path) spack.test.run(args.names, outputDir, args.verbose) - shutil.rmtree(spack.cache_path) + shutil.rmtree(spack.cache_path, ignore_errors=True) diff --git a/lib/spack/spack/test/git_fetch.py b/lib/spack/spack/test/git_fetch.py index 76814f089a..d3e1206c13 100644 --- a/lib/spack/spack/test/git_fetch.py +++ b/lib/spack/spack/test/git_fetch.py @@ -30,9 +30,6 @@ from spack.test.mock_packages_test import * from spack.test.mock_repo import MockGitRepo from spack.version import ver -import shutil -import os - class GitFetchTest(MockPackagesTest): """Tests fetching from a dummy git repository.""" @@ -51,8 +48,6 @@ class GitFetchTest(MockPackagesTest): """Destroy the stage space used by this test.""" super(GitFetchTest, self).tearDown() self.repo.destroy() - for d in os.listdir(spack.cache_path): - shutil.rmtree(os.path.join(spack.cache_path, d)) def assert_rev(self, rev): """Check that the current git revision is equal to the supplied rev.""" diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 6d24a84150..85c15d4a6a 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -125,9 +125,16 @@ class MockPackagesTest(unittest.TestCase): pkg.dependencies.update(deps) + def rm_cache(self): + shutil.rmtree(spack.cache_path, ignore_errors=True) + + def setUp(self): + self.rm_cache() + mkdirp(spack.cache_path) self.initmock() def tearDown(self): + self.rm_cache() self.cleanmock() -- cgit v1.2.3-70-g09d2 From dbfa6c925ec60c89004f6ccd88e985f71f650a69 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Wed, 23 Mar 2016 20:18:58 -0700 Subject: replace references to cache directory with references to new cache object. tests may assign a mock cache but by default it is None (this will avoid any implicit caching behavior confusing unit tests) --- lib/spack/llnl/util/filesystem.py | 9 +++++++++ lib/spack/spack/__init__.py | 5 ++++- lib/spack/spack/cmd/test.py | 4 +--- lib/spack/spack/stage.py | 4 +--- lib/spack/spack/test/mock_packages_test.py | 12 +++++++++--- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index c4665c284c..7586d514d1 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -392,3 +392,12 @@ def remove_linked_tree(path): os.unlink(path) else: shutil.rmtree(path, True) + +class FsCache(object): + def __init__(self, root): + self.root = os.path.abspath(root) + + def store(self, copyCmd, relativeDst): + dst = join_path(self.root, relativeDst) + mkdirp(os.path.dirname(dst)) + copyCmd(dst) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 6fb472b15d..0041d50624 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -47,7 +47,10 @@ stage_path = join_path(var_path, "stage") repos_path = join_path(var_path, "repos") share_path = join_path(spack_root, "share", "spack") cache_path = join_path(var_path, "cache") -mkdirp(cache_path) + +# TODO: i get a complaint if i dont qualify this, fix that +import llnl.util.filesystem +cache = llnl.util.filesystem.FsCache(cache_path) prefix = spack_root opt_path = join_path(prefix, "opt") diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index 233cd186f0..1a02521814 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -67,7 +67,5 @@ def test(parser, args): if not os.path.exists(outputDir): mkdirp(outputDir) - spack.cache_path = join_path(spack.var_path, "test-cache") - mkdirp(spack.cache_path) + spack.cache = None spack.test.run(args.names, outputDir, args.verbose) - shutil.rmtree(spack.cache_path, ignore_errors=True) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 54359bddce..780f391603 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -322,9 +322,7 @@ class Stage(object): def cache_local(self): - archiveDst = join_path(os.path.abspath(spack.cache_path), self.mirror_path) - mkdirp(os.path.dirname(archiveDst)) - self.fetcher.archive(archiveDst) + spack.cache.store(self.fetcher.archive, self.mirror_path) def expand_archive(self): diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 85c15d4a6a..06d7e7d4e1 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -34,6 +34,8 @@ from ordereddict_backport import OrderedDict from spack.repository import RepoPath from spack.spec import Spec +import llnl.util.tty as tty + mock_compiler_config = """\ compilers: all: @@ -130,11 +132,15 @@ class MockPackagesTest(unittest.TestCase): def setUp(self): - self.rm_cache() - mkdirp(spack.cache_path) + spack.cache = MockCache() self.initmock() def tearDown(self): - self.rm_cache() + spack.cache = None self.cleanmock() + +class MockCache(object): + def store(self, copyCmd, relativeDst): + tty.warn("Copying " + str(relativeDst)) + pass -- cgit v1.2.3-70-g09d2 From 13bf7d4ff11e6897d4b688c16564f924e40f657e Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Thu, 24 Mar 2016 12:02:39 -0700 Subject: (1) move definition of MockCache to test command (no definitions or extra work is required in MockPackagesTest) (2) removing outdated logic (which originated in this branch) and minor cleanup --- lib/spack/spack/cmd/test.py | 7 ++++++- lib/spack/spack/test/git_fetch.py | 1 + lib/spack/spack/test/mock_packages_test.py | 13 ------------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index 1a02521814..3c405c5c6b 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -51,6 +51,11 @@ def setup_parser(subparser): help="verbose output") +class MockCache(object): + def store(self, copyCmd, relativeDst): + pass + + def test(parser, args): if args.list: print "Available tests:" @@ -67,5 +72,5 @@ def test(parser, args): if not os.path.exists(outputDir): mkdirp(outputDir) - spack.cache = None + spack.cache = MockCache() spack.test.run(args.names, outputDir, args.verbose) diff --git a/lib/spack/spack/test/git_fetch.py b/lib/spack/spack/test/git_fetch.py index d3e1206c13..3578044116 100644 --- a/lib/spack/spack/test/git_fetch.py +++ b/lib/spack/spack/test/git_fetch.py @@ -30,6 +30,7 @@ from spack.test.mock_packages_test import * from spack.test.mock_repo import MockGitRepo from spack.version import ver + class GitFetchTest(MockPackagesTest): """Tests fetching from a dummy git repository.""" diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 06d7e7d4e1..6d24a84150 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -34,8 +34,6 @@ from ordereddict_backport import OrderedDict from spack.repository import RepoPath from spack.spec import Spec -import llnl.util.tty as tty - mock_compiler_config = """\ compilers: all: @@ -127,20 +125,9 @@ class MockPackagesTest(unittest.TestCase): pkg.dependencies.update(deps) - def rm_cache(self): - shutil.rmtree(spack.cache_path, ignore_errors=True) - - def setUp(self): - spack.cache = MockCache() self.initmock() def tearDown(self): - spack.cache = None self.cleanmock() - -class MockCache(object): - def store(self, copyCmd, relativeDst): - tty.warn("Copying " + str(relativeDst)) - pass -- cgit v1.2.3-70-g09d2 From fe71ba992d26b66a4a9492d9b0fbf17b1410b1e1 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Thu, 24 Mar 2016 12:16:50 -0700 Subject: remove unused import --- lib/spack/spack/cmd/test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index 3c405c5c6b..82bf3928c3 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -23,7 +23,6 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os -import shutil from pprint import pprint from llnl.util.filesystem import join_path, mkdirp -- cgit v1.2.3-70-g09d2 From 315623d3612d64fd058324d4dbbe5264def759c0 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 24 Mar 2016 16:55:46 -0700 Subject: Fixed things from merge. --- lib/spack/spack/architecture.py | 7 +++++++ lib/spack/spack/build_environment.py | 10 +++++----- lib/spack/spack/cmd/compiler.py | 2 +- lib/spack/spack/compilers/__init__.py | 34 ++++++++++++++++++---------------- lib/spack/spack/concretize.py | 6 +++--- lib/spack/spack/config.py | 8 ++++++++ lib/spack/spack/spec.py | 1 + lib/spack/spack/test/multimethod.py | 4 ++-- 8 files changed, 45 insertions(+), 27 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index aef38b8a55..8d9686cf99 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -202,6 +202,13 @@ class Arch(object): self.platform_os = platform_os self.target = target + @property + def concrete(self): + return all( (self.platform is not None, isinstance(self.platform, Platform), + self.platform_os is not None, isinstance(self.platform_os, OperatingSystem), + self.target is not None, isinstance(self.target, Target) ) ) + + def __str__(self): return (str(self.platform) +"-"+ str(self.platform_os) + "-" + str(self.target) ) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index a64ce8aeb4..8ed3c4e1a1 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -101,12 +101,12 @@ def load_module(mod): # We do this without checking that they are already installed # for ease of programming because unloading a module that is not # loaded does nothing. - text = modulecmd('show', mod, return_oe=True).split() + text = modulecmd('show', mod, output=str, error=str).split() for i, word in enumerate(text): if word == 'conflict': - exec(compile(modulecmd('unload', text[i+1], return_oe=True), '', 'exec')) + exec(compile(modulecmd('unload', text[i+1], output=str, error=str), '', 'exec')) # Load the module now that there are no conflicts - load = modulecmd('load', mod, return_oe=True) + load = modulecmd('load', mod, output=str, error=str) exec(compile(load, '', 'exec')) @@ -119,7 +119,7 @@ def get_path_from_module(mod): modulecmd.add_default_arg('python') # Read the module - text = modulecmd('show', mod, return_oe=True).split('\n') + text = modulecmd('show', mod, output=str, error=str).split('\n') # If it lists its package directory, return that for line in text: @@ -348,8 +348,8 @@ def parent_class_modules(cls): def setup_package(pkg): """Execute all environment setup routines.""" - set_compiler_environment_variables(pkg) set_build_environment_variables(pkg) + set_compiler_environment_variables(pkg) # If a user makes their own package repo, e.g. # spack.repos.mystuff.libelf.Libelf, and they inherit from diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index bed5db3d47..a7de61e1e5 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -23,7 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import sys -import argparse +from external import argparse import llnl.util.tty as tty from llnl.util.tty.color import colorize diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 93c5172dde..55e2db700f 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -46,7 +46,7 @@ from spack.util.environment import get_path _imported_compilers_module = 'spack.compilers' _required_instance_vars = ['cc', 'cxx', 'f77', 'fc'] -_optional_instance_vars = ['modules'] +_optional_instance_vars = ['modules', 'strategy'] _default_order = [] # TODO: customize order in config file @@ -69,7 +69,7 @@ def _to_dict(compiler): return { str(compiler.spec) : dict( (attr, getattr(compiler, attr, None)) - for attr in _required_instance_vars) + for attr in _required_instance_vars + _optional_instance_vars) } @@ -77,20 +77,24 @@ def get_compiler_config(arch=None, scope=None): """Return the compiler configuration for the specified architecture. """ # Check whether we're on a front-end (native) architecture. - my_arch = spack.architecture.sys_type() + + my_arch = spack.architecture.Arch() + if isinstance(arch, basestring): + if arch == 'all': + my_arch.platform.name = 'all' + arch = my_arch if arch is None: arch = my_arch def init_compiler_config(): """Compiler search used when Spack has no compilers.""" - config[arch] = {} + config[arch.platform.name] = {} compilers = find_compilers(*get_path('PATH')) for compiler in compilers: - config[arch].update(_to_dict(compiler)) + config[arch.platform.name].update(_to_dict(compiler)) spack.config.update_config('compilers', config, scope=scope) config = spack.config.get_config('compilers', scope=scope) - # Update the configuration if there are currently no compilers # configured. Avoid updating automatically if there ARE site # compilers configured but no user ones. @@ -105,7 +109,7 @@ def get_compiler_config(arch=None, scope=None): if not site_config: init_compiler_config() - return config[arch] if arch in config else {} + return config[arch.platform.name] if arch.platform.name in config else {} def add_compilers_to_config(compilers, arch=None, scope=None): @@ -117,15 +121,15 @@ def add_compilers_to_config(compilers, arch=None, scope=None): - scope: configuration scope to modify. """ if arch is None: - arch = spack.architecture.sys_type() + arch = spack.architecture.Arch() compiler_config = get_compiler_config(arch, scope) for compiler in compilers: compiler_config[str(compiler.spec)] = dict( (c, getattr(compiler, c, "None")) - for c in _required_instance_vars + ['strategy'] + _optional_instance_vars) + for c in _required_instance_vars + _optional_instance_vars) - update = { arch : compiler_config } + update = { arch.platform.name : compiler_config } spack.config.update_config('compilers', update, scope) @@ -139,7 +143,7 @@ def remove_compiler_from_config(compiler_spec, arch=None, scope=None): - scope: configuration scope to modify. """ if arch is None: - arch = spack.architecture.sys_type() + arch = spack.architecture.Arch() compiler_config = get_compiler_config(arch, scope) del compiler_config[str(compiler_spec)] @@ -154,7 +158,6 @@ def all_compilers_config(arch=None, scope=None): """ # Get compilers for this architecture. arch_config = get_compiler_config(arch, scope) - # Merge 'all' compilers with arch-specific ones. # Arch-specific compilers have higher precedence. merged_config = get_compiler_config('all', scope=scope) @@ -262,10 +265,9 @@ def compilers_for_spec(compiler_spec, arch=None, scope=None): else: compiler_paths.append(None) - for m in _optional_instance_vars: - if m not in items: - items[m] = None - mods = items[m] + if 'modules' not in items: + items['modules'] = None + mods = items['modules'] return cls(cspec, strategy, compiler_paths, mods) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 330ecdf509..c5dad93aef 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -79,7 +79,7 @@ class DefaultConcretizer(object): externals = spec_externals(pkg) buildable = not is_spec_nobuild(pkg) if buildable: - result.append((pkg, None)) + result.append((pkg, None, None)) for ext in externals: if ext[0].satisfies(spec): result.append(ext) @@ -354,7 +354,7 @@ class DefaultConcretizer(object): link to this one, to maximize compatibility. """ # Pass on concretizing the compiler if the target is not yet determined - if not spec.architecture.target: + if not spec.architecture.platform_os: #Although this usually means changed, this means awaiting other changes return True @@ -371,7 +371,7 @@ class DefaultConcretizer(object): return compilers - all_compilers = spack.compilers.all_compilers() + all_compilers = spack.compilers.all_compilers(spec.architecture) if (spec.compiler and spec.compiler.concrete and diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 182c174baa..c9a770a53f 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -168,6 +168,10 @@ section_schemas = { {'type' : 'null' }]}, 'fc': { 'anyOf': [ {'type' : 'string' }, {'type' : 'null' }]}, + 'strategy': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'modules': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]} },},},},},},},}, 'mirrors': { @@ -224,6 +228,10 @@ section_schemas = { 'type': 'boolean', 'default': False, }, + 'module': { + 'anyOf' : [{'type': 'string'}, + {'type': 'null'}] + }, 'providers': { 'type': 'object', 'default': {}, diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index d800a1667d..fa2e9fd4c8 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -542,6 +542,7 @@ class Spec(object): and self.versions.concrete and self.variants.concrete and self.architecture + and self.architecture.concrete and self.compiler and self.compiler.concrete and self.dependencies.concrete) diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index 020d25015d..6a723d123e 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -92,10 +92,10 @@ class MultiMethodTest(MockPackagesTest): platform = spack.architecture.sys_type() targets = platform.targets.values() for target in targets[:-1]: - pkg = spack.db.get('multimethod='+target.name) + pkg = spack.repo.get('multimethod='+target.name) self.assertEqual(pkg.different_by_target(), target.name) - pkg = spack.db.get('multimethod='+targets[-1].name) + pkg = spack.repo.get('multimethod='+targets[-1].name) if len(targets) == 1: self.assertEqual(pkg.different_by_target(), targets[-1].name) else: -- cgit v1.2.3-70-g09d2 From 142d1f5cbc098a4e8a0046148400bb2f40e839bc Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Thu, 24 Mar 2016 19:28:21 -0700 Subject: stage creates cache fetcher with cache object (so it can be mocked for tests) --- lib/spack/llnl/util/filesystem.py | 9 --------- lib/spack/spack/__init__.py | 4 ++-- lib/spack/spack/cmd/test.py | 14 ++++++++++++++ lib/spack/spack/fetch_strategy.py | 14 ++++++++++++++ lib/spack/spack/stage.py | 2 +- 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 7586d514d1..c4665c284c 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -392,12 +392,3 @@ def remove_linked_tree(path): os.unlink(path) else: shutil.rmtree(path, True) - -class FsCache(object): - def __init__(self, root): - self.root = os.path.abspath(root) - - def store(self, copyCmd, relativeDst): - dst = join_path(self.root, relativeDst) - mkdirp(os.path.dirname(dst)) - copyCmd(dst) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 0041d50624..6e7cb217c8 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -49,8 +49,8 @@ share_path = join_path(spack_root, "share", "spack") cache_path = join_path(var_path, "cache") # TODO: i get a complaint if i dont qualify this, fix that -import llnl.util.filesystem -cache = llnl.util.filesystem.FsCache(cache_path) +import spack.fetch_strategy +cache = fetch_strategy.FsCache(cache_path) prefix = spack_root opt_path = join_path(prefix, "opt") diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index 82bf3928c3..8c9dea3c66 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -31,6 +31,7 @@ from llnl.util.lang import list_modules import spack import spack.test +from spack.fetch_strategy import FetchError description ="Run unit tests" @@ -54,6 +55,19 @@ class MockCache(object): def store(self, copyCmd, relativeDst): pass + def fetcher(self, targetPath, digest): + return MockCacheFetcher() + + +class MockCacheFetcher(object): + def set_stage(self, stage): + pass + + def fetch(self): + raise FetchError("Mock cache always fails for tests") + + def __str__(self): + return "[mock fetcher]" def test(parser, args): if args.list: diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index fc5d7e231c..b696a12e7a 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -689,6 +689,20 @@ def for_package_version(pkg, version): raise InvalidArgsError(pkg, version) +class FsCache(object): + def __init__(self, root): + self.root = os.path.abspath(root) + + def store(self, copyCmd, relativeDst): + dst = join_path(self.root, relativeDst) + mkdirp(os.path.dirname(dst)) + copyCmd(dst) + + def fetcher(self, targetPath, digest): + url = "file://" + join_path(self.root, targetPath) + return URLFetchStrategy(url, digest) + + class FetchError(spack.error.SpackError): def __init__(self, msg, long_msg=None): super(FetchError, self).__init__(msg, long_msg) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 780f391603..9f2619f43e 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -273,7 +273,6 @@ class Stage(object): # the root, so we add a '/' if it is not present. mirror_roots = [root if root.endswith('/') else root + '/' for root in mirrors.values()] - mirror_roots.append("file://" + os.path.abspath(spack.cache_path) + os.sep) urls = [urljoin(root, self.mirror_path) for root in mirror_roots] # If this archive is normally fetched from a tarball URL, @@ -290,6 +289,7 @@ class Stage(object): # Add URL strategies for all the mirrors with the digest for url in urls: fetchers.insert(0, fs.URLFetchStrategy(url, digest)) + fetchers.insert(0, spack.cache.fetcher(self.mirror_path, digest)) for fetcher in fetchers: try: -- cgit v1.2.3-70-g09d2 From 6423eab917f6914cfce253315c9063762e6ae749 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Thu, 24 Mar 2016 19:45:10 -0700 Subject: implemented cache_local method for DIY stage (as a noop) --- lib/spack/spack/stage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 9f2619f43e..e8239d27be 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -503,6 +503,8 @@ class DIYStage(object): # No need to destroy DIY stage. pass + def cache_local(self): + tty.msg("Sources for DIY stages are not cached") def _get_mirrors(): """Get mirrors from spack configuration.""" -- cgit v1.2.3-70-g09d2 From bd5abb292254b40140d1b61849cb86851718b335 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Thu, 24 Mar 2016 19:48:15 -0700 Subject: spacing issue --- lib/spack/spack/stage.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index e8239d27be..d5ee231ef7 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -506,6 +506,7 @@ class DIYStage(object): def cache_local(self): tty.msg("Sources for DIY stages are not cached") + def _get_mirrors(): """Get mirrors from spack configuration.""" config = spack.config.get_config('mirrors') -- cgit v1.2.3-70-g09d2 From fdd7e91ba078bea4f0fec1859124baaa8261fa2c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 12:49:56 +0100 Subject: add shared variant to mumps (needed for Trilinos) plus tests --- .../repos/builtin/packages/mumps/Makefile.inc | 5 +-- var/spack/repos/builtin/packages/mumps/package.py | 45 +++++++++++++++++++--- 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/Makefile.inc b/var/spack/repos/builtin/packages/mumps/Makefile.inc index 2e6a041878..22d8f5518a 100644 --- a/var/spack/repos/builtin/packages/mumps/Makefile.inc +++ b/var/spack/repos/builtin/packages/mumps/Makefile.inc @@ -8,12 +8,9 @@ IORDERINGSF = $(ISCOTCH) IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH) PLAT = -LIBEXT = .a -OUTC = -o +OUTC = -o OUTF = -o RM = /bin/rm -f -AR = ar vr -RANLIB = ranlib INCSEQ = -I$(topdir)/libseq LIBSEQ = -L$(topdir)/libseq -lmpiseq diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 5a254dfd00..2801d4194d 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -1,6 +1,5 @@ from spack import * -import os - +import os, sys class Mumps(Package): """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver""" @@ -19,6 +18,7 @@ class Mumps(Package): variant('float', default=True, description='Activate the compilation of smumps') variant('complex', default=True, description='Activate the compilation of cmumps and/or zmumps') variant('idx64', default=False, description='Use int64_t/integer*8 as default index type') + variant('shared', default=True, description='Build shared libraries') depends_on('scotch + esmumps', when='~ptscotch+scotch') @@ -105,6 +105,27 @@ class Mumps(Package): # compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER makefile_conf.append("CDEFS = -DAdd_") + if '+shared' in self.spec: + if sys.platform == 'darwin': + # Building dylibs with mpif90 causes segfaults on 10.8 and 10.10. Use gfortran. (Homebrew) + makefile_conf.extend([ + 'LIBEXT=.dylib', + 'AR=%s -dynamiclib -undefined dynamic_lookup -o ' % os.environ['FC'], + 'RANLIB=echo' + ]) + else: + makefile_conf.extend([ + 'LIBEXT=.so', + 'AR=$(FL) -shared -o', + 'RANLIB=echo' + ]) + else: + makefile_conf.extend([ + 'LIBEXT = .a', + 'AR = ar vr', + 'RANLIB = ranlib' + ]) + makefile_inc_template = join_path(os.path.dirname(self.module.__file__), 'Makefile.inc') @@ -121,7 +142,7 @@ class Mumps(Package): def install(self, spec, prefix): make_libs = [] - # the coice to compile ?examples is to have kind of a sanity + # the choice to compile ?examples is to have kind of a sanity # check on the libraries generated. if '+float' in spec: make_libs.append('sexamples') @@ -135,10 +156,24 @@ class Mumps(Package): self.write_makefile_inc() - # Build fails in parallel, at least on OS-X + # Build fails in parallel make(*make_libs, parallel=False) install_tree('lib', prefix.lib) install_tree('include', prefix.include) if '~mpi' in spec: - install('libseq/libmpiseq.a', prefix.lib) + lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so' + lib_suffix = lib_dsuffix if '+shared' in spec else '.a' + install('libseq/libmpiseq%s' % lib_suffix, prefix.lib) + + # FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI + # FIXME: use something like numdiff to compare blessed output with the current + with working_dir('examples'): + if '+float' in spec: + os.system('./ssimpletest < input_simpletest_real') + if '+complex' in spec: + os.system('./csimpletest < input_simpletest_real') + if '+double' in spec: + os.system('./dsimpletest < input_simpletest_real') + if '+complex' in spec: + os.system('./zsimpletest < input_simpletest_cmplx') -- cgit v1.2.3-70-g09d2 From 540e57f02686bad7125a951d14784e8fcc896e26 Mon Sep 17 00:00:00 2001 From: Josh Sixsmith Date: Fri, 25 Mar 2016 18:27:02 +1100 Subject: Upload of GDAL, kealib, openjpeg, py-tuiview package builds. --- var/spack/repos/builtin/packages/gdal/package.py | 69 ++++++++++++++++++++++ var/spack/repos/builtin/packages/kealib/package.py | 35 +++++++++++ .../repos/builtin/packages/openjpeg/package.py | 26 ++++++++ .../repos/builtin/packages/py-tuiview/package.py | 19 ++++++ 4 files changed, 149 insertions(+) create mode 100644 var/spack/repos/builtin/packages/gdal/package.py create mode 100644 var/spack/repos/builtin/packages/kealib/package.py create mode 100644 var/spack/repos/builtin/packages/openjpeg/package.py create mode 100644 var/spack/repos/builtin/packages/py-tuiview/package.py diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py new file mode 100644 index 0000000000..4f1f1ec2dd --- /dev/null +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -0,0 +1,69 @@ +from spack import * + +class Gdal(Package): + """ + GDAL is a translator library for raster and vector geospatial + data formats that is released under an X/MIT style Open Source + license by the Open Source Geospatial Foundation. As a library, + it presents a single raster abstract data model and vector + abstract data model to the calling application for all supported + formats. It also comes with a variety of useful command line + utilities for data translation and processing + """ + + homepage = "http://www.gdal.org/" + url = "http://download.osgeo.org/gdal/2.0.2/gdal-2.0.2.tar.gz" + list_url = "http://download.osgeo.org/gdal/" + list_depth = 2 + + version('2.0.2', '573865f3f59ba7b4f8f4cddf223b52a5') + + extends('python') + + variant('hdf5', default=False, description='Enable HDF5 support') + variant('hdf', default=False, description='Enable HDF4 support') + variant('openjpeg', default=False, description='Enable JPEG2000 support') + variant('geos', default=False, description='Enable GEOS support') + variant('kea', default=False, description='Enable KEA support') + variant('netcdf', default=False, description='Enable netcdf support') + + depends_on('swig') + depends_on("hdf5", when='+hdf5') + depends_on("hdf", when='+hdf') + depends_on("openjpeg", when='+openjpeg') + depends_on("geos", when='+geos') + depends_on("kealib", when='+kea') + depends_on("netcdf", when='+netcdf') + depends_on("libtiff") + depends_on("libpng") + depends_on("zlib") + depends_on("proj") + depends_on("py-numpy") + + parallel = False + + def install(self, spec, prefix): + args = [] + args.append("--prefix=%s" % prefix) + args.append("--with-liblzma=yes") + args.append("--with-zlib=%s" % spec['zlib'].prefix) + args.append("--with-python=%s" % spec['python'].prefix.bin + "/python") + args.append("--without-libtool") + + if '+geos' in spec: + args.append('--with-geos=yes') + if '+hdf' in spec: + args.append('--with-hdf4=%s' % spec['hdf'].prefix) + if '+hdf5' in spec: + args.append('--with-hdf5=%s' % spec['hdf5'].prefix) + if '+openjpeg' in spec: + args.append('--with-openjpeg=%s' % spec['openjpeg'].prefix) + if '+kea' in spec: + args.append('--with-kea=yes') + if '+netcdf' in spec: + args.append('--with-netcdf=%s' % spec['netcdf'].prefix) + + configure(*args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/kealib/package.py b/var/spack/repos/builtin/packages/kealib/package.py new file mode 100644 index 0000000000..475d21e1d8 --- /dev/null +++ b/var/spack/repos/builtin/packages/kealib/package.py @@ -0,0 +1,35 @@ +from spack import * + +class Kealib(Package): + """An HDF5 Based Raster File Format + + KEALib provides an implementation of the GDAL data model. + The format supports raster attribute tables, image pyramids, + meta-data and in-built statistics while also handling very + large files and compression throughout. + + Based on the HDF5 standard, it also provides a base from which + other formats can be derived and is a good choice for long + term data archiving. An independent software library (libkea) + provides complete access to the KEA image format and a GDAL + driver allowing KEA images to be used from any GDAL supported software. + + Development work on this project has been funded by Landcare Research. + """ + homepage = "http://kealib.org/" + url = "https://bitbucket.org/chchrsc/kealib/get/kealib-1.4.5.tar.gz" + + version('1.4.5', '112e9c42d980b2d2987a3c15d0833a5d') + + depends_on("hdf5") + + def install(self, spec, prefix): + with working_dir('trunk', create=False): + cmake_args = [] + cmake_args.append("-DCMAKE_INSTALL_PREFIX=%s" % prefix) + cmake_args.append("-DHDF5_INCLUDE_DIR=%s" % spec['hdf5'].prefix.include) + cmake_args.append("-DHDF5_LIB_PATH=%s" % spec['hdf5'].prefix.lib) + cmake('.', *cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py new file mode 100644 index 0000000000..afec197d11 --- /dev/null +++ b/var/spack/repos/builtin/packages/openjpeg/package.py @@ -0,0 +1,26 @@ +from spack import * + +class Openjpeg(Package): + """ + OpenJPEG is an open-source JPEG 2000 codec written in C language. + It has been developed in order to promote the use of JPEG 2000, a + still-image compression standard from the Joint Photographic + Experts Group (JPEG). + Since April 2015, it is officially recognized by ISO/IEC and + ITU-T as a JPEG 2000 Reference Software. + """ + homepage = "https://github.com/uclouvain/openjpeg" + url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz" + + version('2.1' , '3e1c451c087f8462955426da38aa3b3d') + version('2.0.1', '105876ed43ff7dbb2f90b41b5a43cfa5') + version('2.0' , 'cdf266530fee8af87454f15feb619609') + version('1.5.2', '545f98923430369a6b046ef3632ef95c') + version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e') + + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/py-tuiview/package.py b/var/spack/repos/builtin/packages/py-tuiview/package.py new file mode 100644 index 0000000000..984b4196b1 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-tuiview/package.py @@ -0,0 +1,19 @@ +from spack import * + +class PyTuiview(Package): + """ + TuiView is a lightweight raster GIS with powerful raster attribute + table manipulation abilities. + """ + homepage = "https://bitbucket.org/chchrsc/tuiview" + url = "https://bitbucket.org/chchrsc/tuiview/get/tuiview-1.1.7.tar.gz" + + version('1.1.7', '4b3b38a820cc239c8ab4a181ac5d4c30') + + extends("python") + depends_on("py-pyqt") + depends_on("py-numpy") + depends_on("gdal") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 3e39daeb12aa13a3f3f975ff315143bc3f13a2b4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 09:56:24 +0100 Subject: add fPIC to MUMPS when building shared libs --- var/spack/repos/builtin/packages/mumps/package.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 2801d4194d..b295857ab5 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -70,6 +70,9 @@ class Mumps(Package): makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings))) + # when building shared libs need -fPIC, otherwise + # /usr/bin/ld: graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC + fpic = '-fPIC' if '+shared' in self.spec else '' # TODO: test this part, it needs a full blas, scalapack and # partitionning environment with 64bit integers if '+idx64' in self.spec: @@ -77,14 +80,14 @@ class Mumps(Package): # the fortran compilation flags most probably are # working only for intel and gnu compilers this is # perhaps something the compiler should provide - ['OPTF = -O -DALLOW_NON_INIT %s' % '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8', - 'OPTL = -O ', - 'OPTC = -O -DINTSIZE64']) + ['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic,'-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'), + 'OPTL = %s -O ' % fpic, + 'OPTC = %s -O -DINTSIZE64' % fpic]) else: makefile_conf.extend( - ['OPTF = -O -DALLOW_NON_INIT', - 'OPTL = -O ', - 'OPTC = -O ']) + ['OPTF = %s -O -DALLOW_NON_INIT' % fpic, + 'OPTL = %s -O ' % fpic, + 'OPTC = %s -O ' % fpic]) if '+mpi' in self.spec: -- cgit v1.2.3-70-g09d2 From 83fea631f1765d4641cde8af2c5c931b22e4ee33 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 23:04:17 +0100 Subject: extend trilinos --- .../repos/builtin/packages/trilinos/package.py | 32 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index edc40476e3..22c7ab6d61 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -1,5 +1,5 @@ from spack import * - +import os class Trilinos(Package): """ @@ -10,6 +10,7 @@ class Trilinos(Package): homepage = "https://trilinos.org/" url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz" + version('12.6.1', 'adcf2d3aab74cdda98f88fee19cd1442604199b0515ee3da4d80cbe8f37d00e4') version('12.4.2', '7c830f7f0f68b8ad324690603baf404e') version('12.2.1', '6161926ea247863c690e927687f83be9') version('12.0.1', 'bd99741d047471e127b8296b2ec08017') @@ -39,15 +40,38 @@ class Trilinos(Package): options.extend(std_cmake_args) options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', + '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON', '-DTrilinos_ENABLE_TESTS:BOOL=OFF', '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), - '-DTPL_ENABLE_MPI:STRING=ON', - '-DBLAS_LIBRARY_DIRS:PATH=%s' % spec['blas'].prefix, - '-DLAPACK_LIBRARY_DIRS:PATH=%s' % spec['lapack'].prefix + '-DTPL_ENABLE_MPI:BOOL=ON', + '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, + '-DTPL_ENABLE_BLAS=ON', + '-DBLAS_LIBRARY_NAMES=blas', + '-DBLAS_LIBRARY_DIRS=/usr/lib', # % spec['blas'].prefix, + '-DTPL_ENABLE_LAPACK=ON', + '-DLAPACK_LIBRARY_NAMES=lapack', + '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, + '-DTPL_ENABLE_Boost:BOOL=ON', + '-DBOOST_BASE_DIR:PATH=%s' % spec['boost'].prefix, + '-DTrilinos_ENABLE_Fortran=OFF', + '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', + '-DTrilinos_ENABLE_CXX11:BOOL=ON', + '-DTrilinos_CXX11_FLAGS=-std=c++11' + ]) + + # disable due to compiler / config errors: + options.extend(['-DTrilinos_ENABLE_SEACAS=OFF', + '-DTrilinos_ENABLE_Pike=OFF', + '-DTrilinos_ENABLE_STK=OFF' ]) + if self.compiler.name == "clang": + os.environ['CPPFLAGS']="-Qunused-arguments" + + #os.environ['LDFLAGS']="lgfortran" + with working_dir('spack-build', create=True): cmake('..', *options) make() -- cgit v1.2.3-70-g09d2 From 30ba96e58fe699e92902ce53a87b5e1cfb756d6f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 22 Mar 2016 23:56:18 +0100 Subject: same --- .../repos/builtin/packages/trilinos/package.py | 84 +++++++++++++++++++--- 1 file changed, 74 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 22c7ab6d61..7b913031e3 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -2,8 +2,7 @@ from spack import * import os class Trilinos(Package): - """ - The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented + """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. A unique design feature of Trilinos is its focus on packages. """ @@ -28,10 +27,19 @@ class Trilinos(Package): depends_on('matio') depends_on('glm') depends_on('swig') + depends_on('metis') + depends_on('suite-sparse') + depends_on('tbb') # MPI related dependencies depends_on('mpi') depends_on('netcdf+mpi') + depends_on('parmetis') + depends_on('mumps+metis+parmetis') + depends_on('scalapack') + depends_on('superlu-dist') + depends_on('hypre') + depends_on('hdf5+mpi') depends_on('python') # Needs py-numpy activated @@ -49,23 +57,79 @@ class Trilinos(Package): '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, '-DTPL_ENABLE_BLAS=ON', '-DBLAS_LIBRARY_NAMES=blas', - '-DBLAS_LIBRARY_DIRS=/usr/lib', # % spec['blas'].prefix, + '-DBLAS_LIBRARY_DIRS=/usr/lib', # % spec['blas'].prefix, #FIXME '-DTPL_ENABLE_LAPACK=ON', '-DLAPACK_LIBRARY_NAMES=lapack', - '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, + '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, #FIXME '-DTPL_ENABLE_Boost:BOOL=ON', '-DBOOST_BASE_DIR:PATH=%s' % spec['boost'].prefix, - '-DTrilinos_ENABLE_Fortran=OFF', + '-DTrilinos_ENABLE_Fortran=OFF', # FIXME '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', - '-DTrilinos_CXX11_FLAGS=-std=c++11' + '-DTrilinos_CXX11_FLAGS=-std=c++11', + '-DTPL_ENABLE_Netcdf:BOOL=ON', + '-DTPL_ENABLE_HYPRE:BOOL=ON', + '-DTPL_ENABLE_HDF5:BOOL=ON', + '-DTPL_ENABLE_TBB:BOOL=ON' ]) + # Amesos, conflicting types of double and complex SLU_D + # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html + # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html + options.extend([ + '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', + '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' + ]) + + # suite-sparse related + options.extend([ + '-DTPL_ENABLE_Cholmod:BOOL=ON', + '-DTPL_ENABLE_UMFPACK:BOOL=ON', + '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' + ]) + + # metis / parmetis + options.extend([ + '-DTPL_ENABLE_METIS:BOOL=ON', + '-DMETIS_LIBRARY_DIRS=%s' % spec['metis'].prefix.lib, + '-DMETIS_LIBRARY_NAMES=metis', + '-DTPL_METIS_INCLUDE_DIRS=%s' % spec['metis'].prefix.include, + '-DTPL_ENABLE_ParMETIS:BOOL=ON', + '-DParMETIS_LIBRARY_DIRS=%s;%s' % (spec['parmetis'].prefix.lib,spec['metis'].prefix.lib), + '-DParMETIS_LIBRARY_NAMES=parmetis;metis', + '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include + ]) + + # mumps + options.extend([ + '-DTPL_ENABLE_MUMPS:BOOL=ON"', + '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, + '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! + ]) + + # scalapack + options.extend([ + '-DTPL_ENABLE_SCALAPACK:BOOL=ON', + '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + ]) + + # superlu_dist + options.extend([ + '-DTPL_ENABLE_SuperLUDist:BOOL=ON', + '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu_dist'].prefix.include + ]) + if spec.satisfies('^superlu-dist@4.0:'): + options.extend([ + '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' + ]) + + # disable due to compiler / config errors: - options.extend(['-DTrilinos_ENABLE_SEACAS=OFF', - '-DTrilinos_ENABLE_Pike=OFF', - '-DTrilinos_ENABLE_STK=OFF' - ]) + options.extend([ + '-DTrilinos_ENABLE_SEACAS=OFF', + '-DTrilinos_ENABLE_Pike=OFF', + '-DTrilinos_ENABLE_STK=OFF' + ]) if self.compiler.name == "clang": os.environ['CPPFLAGS']="-Qunused-arguments" -- cgit v1.2.3-70-g09d2 From 76006fc346c7880b03356c1cf9d00bab2fdeac45 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 05:30:48 +0100 Subject: fix typo --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 7b913031e3..7d7613d2b5 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -116,7 +116,7 @@ class Trilinos(Package): # superlu_dist options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', - '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu_dist'].prefix.include + '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include ]) if spec.satisfies('^superlu-dist@4.0:'): options.extend([ -- cgit v1.2.3-70-g09d2 From 18db930866b2024b242ea7c825851d7a56b27247 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 07:09:58 +0100 Subject: rearrange --- var/spack/repos/builtin/packages/trilinos/package.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 7d7613d2b5..063d179c7e 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -73,14 +73,6 @@ class Trilinos(Package): '-DTPL_ENABLE_TBB:BOOL=ON' ]) - # Amesos, conflicting types of double and complex SLU_D - # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html - # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html - options.extend([ - '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', - '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' - ]) - # suite-sparse related options.extend([ '-DTPL_ENABLE_Cholmod:BOOL=ON', @@ -113,7 +105,14 @@ class Trilinos(Package): '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) - # superlu_dist + # superlu_dist: + # Amesos, conflicting types of double and complex SLU_D + # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html + # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html + options.extend([ + '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', + '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' + ]) options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include @@ -123,7 +122,6 @@ class Trilinos(Package): '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' ]) - # disable due to compiler / config errors: options.extend([ '-DTrilinos_ENABLE_SEACAS=OFF', -- cgit v1.2.3-70-g09d2 From b91a155e8d996c9e51da7f75d4e106469ba488e6 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 07:10:31 +0100 Subject: more specific about dependencies --- var/spack/repos/builtin/packages/trilinos/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 063d179c7e..2937ed4c38 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -62,7 +62,7 @@ class Trilinos(Package): '-DLAPACK_LIBRARY_NAMES=lapack', '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, #FIXME '-DTPL_ENABLE_Boost:BOOL=ON', - '-DBOOST_BASE_DIR:PATH=%s' % spec['boost'].prefix, + '-DBoost_BASE_DIR:PATH=%s' % spec['boost'].prefix, '-DTrilinos_ENABLE_Fortran=OFF', # FIXME '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', @@ -76,7 +76,9 @@ class Trilinos(Package): # suite-sparse related options.extend([ '-DTPL_ENABLE_Cholmod:BOOL=ON', + '-DCholmod_BASE_DIR:PATH=%s' % spec['suite-sparse'].prefix, '-DTPL_ENABLE_UMFPACK:BOOL=ON', + '-D_UMFPACK_BASE_DIR:PATH=%s' % spec['suite-sparse'].prefix, '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' ]) @@ -94,7 +96,7 @@ class Trilinos(Package): # mumps options.extend([ - '-DTPL_ENABLE_MUMPS:BOOL=ON"', + '-DTPL_ENABLE_MUMPS:BOOL=ON', '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! ]) @@ -115,6 +117,7 @@ class Trilinos(Package): ]) options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', + '-DSuperLUDist_BASE_DIR:PATH=%s' % spec['superlu-dist'].prefix, '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include ]) if spec.satisfies('^superlu-dist@4.0:'): -- cgit v1.2.3-70-g09d2 From b6a35716ce3e02e1a3661e2433986ad637b65d0c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 07:33:28 +0100 Subject: same --- var/spack/repos/builtin/packages/trilinos/package.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 2937ed4c38..b31cf880bc 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -43,6 +43,8 @@ class Trilinos(Package): depends_on('python') # Needs py-numpy activated + patch('umfpack_from_suitesparse.patch') + def install(self, spec, prefix): options = [] options.extend(std_cmake_args) @@ -76,9 +78,11 @@ class Trilinos(Package): # suite-sparse related options.extend([ '-DTPL_ENABLE_Cholmod:BOOL=ON', - '-DCholmod_BASE_DIR:PATH=%s' % spec['suite-sparse'].prefix, + '-DCholmod_LIBRARY_DIRS=%s' % spec['suite-sparse'].prefix.lib, + '-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, '-DTPL_ENABLE_UMFPACK:BOOL=ON', - '-D_UMFPACK_BASE_DIR:PATH=%s' % spec['suite-sparse'].prefix, + '-D_UMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, + '-D_UMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' ]) @@ -117,7 +121,7 @@ class Trilinos(Package): ]) options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', - '-DSuperLUDist_BASE_DIR:PATH=%s' % spec['superlu-dist'].prefix, + '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include ]) if spec.satisfies('^superlu-dist@4.0:'): -- cgit v1.2.3-70-g09d2 From 45b4895888a2abb3cf11ecf2b26b7940a9f89b5a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 07:34:22 +0100 Subject: patch --- .../builtin/packages/trilinos/umfpack_from_suitesparse.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 var/spack/repos/builtin/packages/trilinos/umfpack_from_suitesparse.patch diff --git a/var/spack/repos/builtin/packages/trilinos/umfpack_from_suitesparse.patch b/var/spack/repos/builtin/packages/trilinos/umfpack_from_suitesparse.patch new file mode 100644 index 0000000000..9defc55527 --- /dev/null +++ b/var/spack/repos/builtin/packages/trilinos/umfpack_from_suitesparse.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/TPLs/FindTPLUMFPACK.cmake b/cmake/TPLs/FindTPLUMFPACK.cmake +index 963eb71..998cd02 100644 +--- a/cmake/TPLs/FindTPLUMFPACK.cmake ++++ b/cmake/TPLs/FindTPLUMFPACK.cmake +@@ -55,6 +55,6 @@ + + + TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( UMFPACK +- REQUIRED_HEADERS umfpack.h amd.h UFconfig.h ++ REQUIRED_HEADERS umfpack.h amd.h SuiteSparse_config.h + REQUIRED_LIBS_NAMES umfpack amd + ) -- cgit v1.2.3-70-g09d2 From bc3314a57d43963416f709a94967ae8e1758c458 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 08:05:18 +0100 Subject: more and more --- var/spack/repos/builtin/packages/trilinos/package.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index b31cf880bc..77ae6f818d 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -64,7 +64,8 @@ class Trilinos(Package): '-DLAPACK_LIBRARY_NAMES=lapack', '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, #FIXME '-DTPL_ENABLE_Boost:BOOL=ON', - '-DBoost_BASE_DIR:PATH=%s' % spec['boost'].prefix, + '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, + '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, '-DTrilinos_ENABLE_Fortran=OFF', # FIXME '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', @@ -77,12 +78,13 @@ class Trilinos(Package): # suite-sparse related options.extend([ - '-DTPL_ENABLE_Cholmod:BOOL=ON', - '-DCholmod_LIBRARY_DIRS=%s' % spec['suite-sparse'].prefix.lib, - '-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, + '-DTPL_ENABLE_Cholmod:BOOL=OFF', # FIXME: Trilinos seems to be looking for static libs only, patch CMake TPL file? + #'-DTPL_ENABLE_Cholmod:BOOL=ON', + #'-DCholmod_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, + #'-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, '-DTPL_ENABLE_UMFPACK:BOOL=ON', - '-D_UMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, - '-D_UMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, + '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, + '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' ]) -- cgit v1.2.3-70-g09d2 From 2162627f35f98dc7f07cd34a6593f71d74095955 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 08:13:19 +0100 Subject: more --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 77ae6f818d..532db69cc2 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -124,7 +124,7 @@ class Trilinos(Package): options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, - '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include + '-DSuperLUDist_INCLUDE_DIRS=%s/superlu_dist' % spec['superlu-dist'].prefix.include # superlu_dist and superlu have the same header names :-( In order to avoid conflicts, try to keep "dist" version headers in a subfolder ]) if spec.satisfies('^superlu-dist@4.0:'): options.extend([ -- cgit v1.2.3-70-g09d2 From 88a7a23132a379e526220324b8493d3be870f7e6 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 08:46:23 +0100 Subject: even more --- var/spack/repos/builtin/packages/trilinos/package.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 532db69cc2..13794ae930 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -36,7 +36,7 @@ class Trilinos(Package): depends_on('netcdf+mpi') depends_on('parmetis') depends_on('mumps+metis+parmetis') - depends_on('scalapack') + # depends_on('scalapack') # see FIXME below depends_on('superlu-dist') depends_on('hypre') depends_on('hdf5+mpi') @@ -49,6 +49,7 @@ class Trilinos(Package): options = [] options.extend(std_cmake_args) + mpi_bin = spec['mpi'].prefix.bin options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON', '-DTrilinos_ENABLE_TESTS:BOOL=OFF', @@ -73,7 +74,12 @@ class Trilinos(Package): '-DTPL_ENABLE_Netcdf:BOOL=ON', '-DTPL_ENABLE_HYPRE:BOOL=ON', '-DTPL_ENABLE_HDF5:BOOL=ON', - '-DTPL_ENABLE_TBB:BOOL=ON' + '-DTPL_ENABLE_TBB:BOOL=ON', + # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS + '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name + '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), + '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), + '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' ]) # suite-sparse related @@ -109,8 +115,8 @@ class Trilinos(Package): # scalapack options.extend([ - '-DTPL_ENABLE_SCALAPACK:BOOL=ON', - '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + '-DTPL_ENABLE_SCALAPACK:BOOL=OFF', #FIXME: Undefined symbols for architecture x86_64: "_blacs_gridinfo__", referenced from: Amesos_Scalapack::RedistributeA() in Amesos_Scalapack.cpp.o + #'-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) # superlu_dist: @@ -141,8 +147,6 @@ class Trilinos(Package): if self.compiler.name == "clang": os.environ['CPPFLAGS']="-Qunused-arguments" - #os.environ['LDFLAGS']="lgfortran" - with working_dir('spack-build', create=True): cmake('..', *options) make() -- cgit v1.2.3-70-g09d2 From 7e4e2c988ab4e5163469395ace204d9f332a9675 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 08:48:25 +0100 Subject: minor --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 13794ae930..c915d8eb1a 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -78,7 +78,7 @@ class Trilinos(Package): # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), - '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), + '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90'), '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' ]) -- cgit v1.2.3-70-g09d2 From 50e4b609c688b573ef882a079e2d45a83966f94c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 09:11:26 +0100 Subject: minor --- var/spack/repos/builtin/packages/trilinos/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index c915d8eb1a..3622548ece 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -52,6 +52,7 @@ class Trilinos(Package): mpi_bin = spec['mpi'].prefix.bin options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON', + '-DTrilinos_VERBOSE_CONFIGURE:BOOL=OFF', '-DTrilinos_ENABLE_TESTS:BOOL=OFF', '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), @@ -145,7 +146,9 @@ class Trilinos(Package): ]) if self.compiler.name == "clang": - os.environ['CPPFLAGS']="-Qunused-arguments" + options.extend([ + '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments' + ]) with working_dir('spack-build', create=True): cmake('..', *options) -- cgit v1.2.3-70-g09d2 From 2fb599ea86c82e3395d8402db116a3a25fed0c73 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 09:16:51 +0100 Subject: minor --- var/spack/repos/builtin/packages/trilinos/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 3622548ece..82681e004c 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -55,7 +55,7 @@ class Trilinos(Package): '-DTrilinos_VERBOSE_CONFIGURE:BOOL=OFF', '-DTrilinos_ENABLE_TESTS:BOOL=OFF', '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', - '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), + '-DCMAKE_BUILD_TYPE:STRING=%s' % ('DEBUG' if '+debug' in spec else 'RELEASE'), '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), '-DTPL_ENABLE_MPI:BOOL=ON', '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, @@ -83,6 +83,11 @@ class Trilinos(Package): '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' ]) + # for build-debug only: + options.extend([ + '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' + ]) + # suite-sparse related options.extend([ '-DTPL_ENABLE_Cholmod:BOOL=OFF', # FIXME: Trilinos seems to be looking for static libs only, patch CMake TPL file? -- cgit v1.2.3-70-g09d2 From eb5b0767aa20b46932c36203595c124b7463a444 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 09:45:33 +0100 Subject: remove gfortran as we have libnotfound... --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 82681e004c..bb6f095190 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -80,7 +80,7 @@ class Trilinos(Package): '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90'), - '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' + # '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' # FIXME ]) # for build-debug only: -- cgit v1.2.3-70-g09d2 From 7897f10126f0f8389326c9e723d73021f654ea6a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 13:04:43 +0100 Subject: fiddle with fortran --- .../repos/builtin/packages/trilinos/package.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index bb6f095190..f6f24e967e 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -68,7 +68,7 @@ class Trilinos(Package): '-DTPL_ENABLE_Boost:BOOL=ON', '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, - '-DTrilinos_ENABLE_Fortran=OFF', # FIXME + # '-DTrilinos_ENABLE_Fortran=OFF', # FIXME '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTrilinos_CXX11_FLAGS=-std=c++11', @@ -79,10 +79,17 @@ class Trilinos(Package): # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), - '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90'), - # '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran' # FIXME + '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90') ]) + # Fortran lib + libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) + #os.environ['LDFLAGS'] = '-L%s -lgfortran' % libgfortran + options.extend([ + '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran', + '-DCMAKE_EXE_LINKER_FLAGS:STRING=-L%s -lgfortran' % libgfortran + ]) + # for build-debug only: options.extend([ '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' @@ -150,10 +157,10 @@ class Trilinos(Package): '-DTrilinos_ENABLE_STK=OFF' ]) - if self.compiler.name == "clang": - options.extend([ - '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments' - ]) + #if self.compiler.name == "clang": + # options.extend([ + # '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments' + # ]) with working_dir('spack-build', create=True): cmake('..', *options) -- cgit v1.2.3-70-g09d2 From fade526ae4e748a9454fd56c07ef7bc1fca38423 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 16:58:59 +0100 Subject: remove tbb --- var/spack/repos/builtin/packages/trilinos/package.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index f6f24e967e..12212360a0 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -29,7 +29,6 @@ class Trilinos(Package): depends_on('swig') depends_on('metis') depends_on('suite-sparse') - depends_on('tbb') # MPI related dependencies depends_on('mpi') @@ -75,7 +74,6 @@ class Trilinos(Package): '-DTPL_ENABLE_Netcdf:BOOL=ON', '-DTPL_ENABLE_HYPRE:BOOL=ON', '-DTPL_ENABLE_HDF5:BOOL=ON', - '-DTPL_ENABLE_TBB:BOOL=ON', # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), -- cgit v1.2.3-70-g09d2 From e51fe2934e0189aa5c33c8663819d23e7706f809 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 17:38:36 +0100 Subject: fiddle more --- var/spack/repos/builtin/packages/trilinos/package.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 12212360a0..fb14e1f36c 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -67,7 +67,6 @@ class Trilinos(Package): '-DTPL_ENABLE_Boost:BOOL=ON', '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, - # '-DTrilinos_ENABLE_Fortran=OFF', # FIXME '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTrilinos_CXX11_FLAGS=-std=c++11', @@ -82,10 +81,9 @@ class Trilinos(Package): # Fortran lib libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) - #os.environ['LDFLAGS'] = '-L%s -lgfortran' % libgfortran options.extend([ - '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-lgfortran', - '-DCMAKE_EXE_LINKER_FLAGS:STRING=-L%s -lgfortran' % libgfortran + '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, + '-DTrilinos_ENABLE_Fortran=OFF' # FIXME: otherwise VerifyFortranC fails as it does not contain -lgfortran , issues with IMPLICIT_LINK_LIBRARIES in CMakeFiles/CMake(C|CXX|Fortran)Compiler.cmake? ]) # for build-debug only: @@ -155,11 +153,6 @@ class Trilinos(Package): '-DTrilinos_ENABLE_STK=OFF' ]) - #if self.compiler.name == "clang": - # options.extend([ - # '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Qunused-arguments' - # ]) - with working_dir('spack-build', create=True): cmake('..', *options) make() -- cgit v1.2.3-70-g09d2 From 3f12a51759fcdd3b11867cb849fc2aa81a4941ef Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 23 Mar 2016 19:35:49 +0100 Subject: keep fiddling --- var/spack/repos/builtin/packages/trilinos/package.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index fb14e1f36c..cdc2bf2379 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -1,6 +1,11 @@ from spack import * import os +# Trilinos is complicated to build, as an inspiration a couple of links to other repositories which build it: +# https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/t/trilinos.py#L111 +# https://github.com/koecher/candi/blob/master/deal.II-toolchain/packages/trilinos.package +# https://gitlab.com/configurations/cluster-config/blob/master/trilinos.sh +# https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb class Trilinos(Package): """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. @@ -59,11 +64,11 @@ class Trilinos(Package): '-DTPL_ENABLE_MPI:BOOL=ON', '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, '-DTPL_ENABLE_BLAS=ON', - '-DBLAS_LIBRARY_NAMES=blas', - '-DBLAS_LIBRARY_DIRS=/usr/lib', # % spec['blas'].prefix, #FIXME + '-DBLAS_LIBRARY_NAMES=blas', # FIXME: for Intel, Clang+GNU, GNU; easybuild add gfortran here... + '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib, '-DTPL_ENABLE_LAPACK=ON', '-DLAPACK_LIBRARY_NAMES=lapack', - '-DLAPACK_LIBRARY_DIRS=/usr/lib', # % spec['lapack'].prefix, #FIXME + '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix, '-DTPL_ENABLE_Boost:BOOL=ON', '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, @@ -74,9 +79,9 @@ class Trilinos(Package): '-DTPL_ENABLE_HYPRE:BOOL=ON', '-DTPL_ENABLE_HDF5:BOOL=ON', # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS - '-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name - '-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), - '-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90') + #'-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name + #'-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), + #'-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90') ]) # Fortran lib -- cgit v1.2.3-70-g09d2 From 8c9f88761384d16c77aa9cbee55cc501712c7b12 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 12:45:43 +0100 Subject: finally builds --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index cdc2bf2379..b80123838a 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -39,7 +39,7 @@ class Trilinos(Package): depends_on('mpi') depends_on('netcdf+mpi') depends_on('parmetis') - depends_on('mumps+metis+parmetis') + depends_on('mumps+metis+parmetis+shared') # build errors with static libs # depends_on('scalapack') # see FIXME below depends_on('superlu-dist') depends_on('hypre') -- cgit v1.2.3-70-g09d2 From df995c4ef850338823b3a5a5c2ee3b12e05a33b1 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 12:57:22 +0100 Subject: minor cleanup --- var/spack/repos/builtin/packages/trilinos/package.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index b80123838a..f2e9c37caa 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -77,24 +77,20 @@ class Trilinos(Package): '-DTrilinos_CXX11_FLAGS=-std=c++11', '-DTPL_ENABLE_Netcdf:BOOL=ON', '-DTPL_ENABLE_HYPRE:BOOL=ON', - '-DTPL_ENABLE_HDF5:BOOL=ON', - # Need to use MPI wrappers, otherwise: Undefined symbols for architecture x86_64: "_mpi_abort_","_mpi_allgatherv_", etc from MUMPS - #'-DCMAKE_C_COMPILER=%s' % join_path(mpi_bin,'mpicc'), # FIXME: dont hardcode compiler name - #'-DCMAKE_CXX_COMPILER=%s' % join_path(mpi_bin,'mpicxx'), - #'-DCMAKE_Fortran_COMPILER=%s' % join_path(mpi_bin,'mpif90') + '-DTPL_ENABLE_HDF5:BOOL=ON' ]) # Fortran lib libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) options.extend([ '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, - '-DTrilinos_ENABLE_Fortran=OFF' # FIXME: otherwise VerifyFortranC fails as it does not contain -lgfortran , issues with IMPLICIT_LINK_LIBRARIES in CMakeFiles/CMake(C|CXX|Fortran)Compiler.cmake? + '-DTrilinos_ENABLE_Fortran=OFF' # FIXME: otherwise CMake's VerifyFortranC fails as it does not contain -lgfortran ]) # for build-debug only: - options.extend([ - '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' - ]) + # options.extend([ + # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' + # ]) # suite-sparse related options.extend([ -- cgit v1.2.3-70-g09d2 From 0fc9326a4cc742e7a06cc1bb4192d0dfd008880d Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 13:23:56 +0100 Subject: add variants --- .../repos/builtin/packages/trilinos/package.py | 111 +++++++++++++-------- 1 file changed, 69 insertions(+), 42 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index f2e9c37caa..2e119581e1 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -22,8 +22,15 @@ class Trilinos(Package): version('11.14.2', 'a43590cf896c677890d75bfe75bc6254') version('11.14.1', '40febc57f76668be8b6a77b7607bb67f') - variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, description='Builds a debug version of the libraries') + variant('metis', default=True, description='Compile with METIS') + variant('parmetis', default=True, description='Compile with ParMETIS') + variant('mumps', default=True, description='Compile with support for MUMPS solvers') + variant('superlu-dist', default=True, description='Compile with SuperluDist solvers') + variant('hypre', default=True, description='Compile with Hypre preconditioner') + variant('hdf5', default=True, description='Compile with HDF5') + variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') + variant('shared', default=True, description='Enables the build of shared libraries') + variant('debug', default=False, description='Builds a debug version of the libraries') # Everything should be compiled with -fpic depends_on('blas') @@ -49,7 +56,23 @@ class Trilinos(Package): patch('umfpack_from_suitesparse.patch') + # check that the combination of variants makes sense + def variants_check(self): + if '+parmetis' in self.spec and '+metis' not in self.spec: + raise RuntimeError('You cannot use the variant parmetis without metis') + + if '+mumps' in self.spec and '+parmetis' not in self.spec: + raise RuntimeError('You cannot use the variant mumps without parmetis') + + if '+superlu-dist' in self.spec and self.spec.satisfies('@:11.4.3'): + # For Trilinos v11 we need to force SuperLUDist=OFF, + # since only the deprecated SuperLUDist v3.3 together with an Amesos patch + # is working. + raise RuntimeError('The superlu-dist variant can only be used with Trilinos @12.0.1:') + def install(self, spec, prefix): + self.variants_check() + options = [] options.extend(std_cmake_args) @@ -93,35 +116,38 @@ class Trilinos(Package): # ]) # suite-sparse related - options.extend([ - '-DTPL_ENABLE_Cholmod:BOOL=OFF', # FIXME: Trilinos seems to be looking for static libs only, patch CMake TPL file? - #'-DTPL_ENABLE_Cholmod:BOOL=ON', - #'-DCholmod_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, - #'-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, - '-DTPL_ENABLE_UMFPACK:BOOL=ON', - '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, - '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, - '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' - ]) + if '+suite-sparse' in spec: + options.extend([ + '-DTPL_ENABLE_Cholmod:BOOL=OFF', # FIXME: Trilinos seems to be looking for static libs only, patch CMake TPL file? + #'-DTPL_ENABLE_Cholmod:BOOL=ON', + #'-DCholmod_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, + #'-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, + '-DTPL_ENABLE_UMFPACK:BOOL=ON', + '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, + '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, + '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' + ]) # metis / parmetis - options.extend([ - '-DTPL_ENABLE_METIS:BOOL=ON', - '-DMETIS_LIBRARY_DIRS=%s' % spec['metis'].prefix.lib, - '-DMETIS_LIBRARY_NAMES=metis', - '-DTPL_METIS_INCLUDE_DIRS=%s' % spec['metis'].prefix.include, - '-DTPL_ENABLE_ParMETIS:BOOL=ON', - '-DParMETIS_LIBRARY_DIRS=%s;%s' % (spec['parmetis'].prefix.lib,spec['metis'].prefix.lib), - '-DParMETIS_LIBRARY_NAMES=parmetis;metis', - '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include - ]) + if '+parmetis' in spec: # metis is required, see variants_check() + options.extend([ + '-DTPL_ENABLE_METIS:BOOL=ON', + '-DMETIS_LIBRARY_DIRS=%s' % spec['metis'].prefix.lib, + '-DMETIS_LIBRARY_NAMES=metis', + '-DTPL_METIS_INCLUDE_DIRS=%s' % spec['metis'].prefix.include, + '-DTPL_ENABLE_ParMETIS:BOOL=ON', + '-DParMETIS_LIBRARY_DIRS=%s;%s' % (spec['parmetis'].prefix.lib,spec['metis'].prefix.lib), + '-DParMETIS_LIBRARY_NAMES=parmetis;metis', + '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include + ]) # mumps - options.extend([ - '-DTPL_ENABLE_MUMPS:BOOL=ON', - '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, - '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! - ]) + if '+mumps' in spec: + options.extend([ + '-DTPL_ENABLE_MUMPS:BOOL=ON', + '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, + '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! + ]) # scalapack options.extend([ @@ -129,23 +155,24 @@ class Trilinos(Package): #'-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) - # superlu_dist: - # Amesos, conflicting types of double and complex SLU_D - # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html - # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html - options.extend([ - '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', - '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' - ]) - options.extend([ - '-DTPL_ENABLE_SuperLUDist:BOOL=ON', - '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, - '-DSuperLUDist_INCLUDE_DIRS=%s/superlu_dist' % spec['superlu-dist'].prefix.include # superlu_dist and superlu have the same header names :-( In order to avoid conflicts, try to keep "dist" version headers in a subfolder - ]) - if spec.satisfies('^superlu-dist@4.0:'): + # superlu-dist: + if '+superlu-dist' in spec: + # Amesos, conflicting types of double and complex SLU_D + # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html + # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html + options.extend([ + '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', + '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' + ]) options.extend([ - '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' + '-DTPL_ENABLE_SuperLUDist:BOOL=ON', + '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, + '-DSuperLUDist_INCLUDE_DIRS=%s/superlu_dist' % spec['superlu-dist'].prefix.include # superlu_dist and superlu have the same header names :-( In order to avoid conflicts, try to keep "dist" version headers in a subfolder ]) + if spec.satisfies('^superlu-dist@4.0:'): + options.extend([ + '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' + ]) # disable due to compiler / config errors: options.extend([ -- cgit v1.2.3-70-g09d2 From 416fcd081013afa8349d311909d50b21d9685674 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 13:33:00 +0100 Subject: same --- var/spack/repos/builtin/packages/trilinos/package.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 2e119581e1..3beadeb798 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -29,6 +29,7 @@ class Trilinos(Package): variant('hypre', default=True, description='Compile with Hypre preconditioner') variant('hdf5', default=True, description='Compile with HDF5') variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') + variant('python', default=True, description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds a debug version of the libraries') @@ -39,20 +40,20 @@ class Trilinos(Package): depends_on('matio') depends_on('glm') depends_on('swig') - depends_on('metis') - depends_on('suite-sparse') + depends_on('metis',when='+metis') + depends_on('suite-sparse',when='+suite-sparse') # MPI related dependencies depends_on('mpi') depends_on('netcdf+mpi') - depends_on('parmetis') - depends_on('mumps+metis+parmetis+shared') # build errors with static libs + depends_on('parmetis',when='+parmetis') + depends_on('mumps+metis+parmetis+shared',when='+mumps') # build errors with static libs # depends_on('scalapack') # see FIXME below - depends_on('superlu-dist') - depends_on('hypre') - depends_on('hdf5+mpi') + depends_on('superlu-dist',when='+superlu-dist') + depends_on('hypre',when='+hypre') + depends_on('hdf5+mpi',when='+hdf5') - depends_on('python') # Needs py-numpy activated + depends_on('python',when='+python') # Needs py-numpy activated patch('umfpack_from_suitesparse.patch') -- cgit v1.2.3-70-g09d2 From c33a63cabc8dcd8c71fc87de60a883cef4a4dae2 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 13:47:07 +0100 Subject: fix python installation --- var/spack/repos/builtin/packages/trilinos/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 3beadeb798..886893b639 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -186,3 +186,14 @@ class Trilinos(Package): cmake('..', *options) make() make('install') + + # When trilinos is built with Python, libpytrilinos is included through + # cmake configure files. Namely, Trilinos_LIBRARIES in TrilinosConfig.cmake + # contains pytrilinos. This leads to a run-time error: + # Symbol not found: _PyBool_Type + # and prevents Trilinos to be used in any C++ code, which links executable + # against the libraries listed in Trilinos_LIBRARIES. + # See https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509 + # A workaround it to remove PyTrilinos from the COMPONENTS_LIST : + if '+python' in self.spec: + filter_file(r'(?:SET\(COMPONENTS_LIST.*)(PyTrilinos;)(?:.*)', '', '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib) -- cgit v1.2.3-70-g09d2 From d096b155f45d97775affa2bdda640a22823cb73e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 24 Mar 2016 19:41:37 +0100 Subject: fix filter_file --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 886893b639..3967d0ef0e 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -196,4 +196,4 @@ class Trilinos(Package): # See https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509 # A workaround it to remove PyTrilinos from the COMPONENTS_LIST : if '+python' in self.spec: - filter_file(r'(?:SET\(COMPONENTS_LIST.*)(PyTrilinos;)(?:.*)', '', '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib) + filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)', (r'\1\3'), '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib) -- cgit v1.2.3-70-g09d2 From 7f2db8c26793abb1977dbccd2ae8a3a1b5a46568 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 11:54:51 +0100 Subject: fix w GCC 4.8 on Ubuntu but broke w GCC 5.3/Clang on OSX --- .../repos/builtin/packages/trilinos/package.py | 26 ++++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 3967d0ef0e..1f1601e537 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -48,7 +48,7 @@ class Trilinos(Package): depends_on('netcdf+mpi') depends_on('parmetis',when='+parmetis') depends_on('mumps+metis+parmetis+shared',when='+mumps') # build errors with static libs - # depends_on('scalapack') # see FIXME below + depends_on('scalapack') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') depends_on('hdf5+mpi',when='+hdf5') @@ -108,13 +108,13 @@ class Trilinos(Package): libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) options.extend([ '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, - '-DTrilinos_ENABLE_Fortran=OFF' # FIXME: otherwise CMake's VerifyFortranC fails as it does not contain -lgfortran + '-DTrilinos_ENABLE_Fortran=ON' # FIXME: otherwise CMake's VerifyFortranC fails as it does not contain -lgfortran ]) # for build-debug only: - # options.extend([ - # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' - # ]) + options.extend([ + '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' + ]) # suite-sparse related if '+suite-sparse' in spec: @@ -144,16 +144,22 @@ class Trilinos(Package): # mumps if '+mumps' in spec: + # FIXME: + # since we use mumps with MPI, it will certainly be build against Scalapack. + # Add scalapack lib here as well. + # This likely won't be need if Trilinos would compile with Scalapack options.extend([ '-DTPL_ENABLE_MUMPS:BOOL=ON', '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! +# '-DMUMPS_LIBRARY_DIRS=%s;%s' % (spec['mumps'].prefix.lib,spec['scalapack'].prefix.lib), +# '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord;scalapack' # order is important! ]) # scalapack options.extend([ - '-DTPL_ENABLE_SCALAPACK:BOOL=OFF', #FIXME: Undefined symbols for architecture x86_64: "_blacs_gridinfo__", referenced from: Amesos_Scalapack::RedistributeA() in Amesos_Scalapack.cpp.o - #'-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + '-DTPL_ENABLE_SCALAPACK:BOOL=ON', #FIXME: Undefined symbols for architecture x86_64: "_blacs_gridinfo__", referenced from: Amesos_Scalapack::RedistributeA() in Amesos_Scalapack.cpp.o + '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) # superlu-dist: @@ -175,6 +181,12 @@ class Trilinos(Package): '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' ]) + # python + if '~python' in spec: + options.extend([ + '-DTrilinos_ENABLE_PyTrilinos:BOOL=OFF' + ]) + # disable due to compiler / config errors: options.extend([ '-DTrilinos_ENABLE_SEACAS=OFF', -- cgit v1.2.3-70-g09d2 From 828aeefb1d4e09deb0694c61397a3097bda85ccb Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 12:01:00 +0100 Subject: minor cleanup --- var/spack/repos/builtin/packages/trilinos/package.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 1f1601e537..1dba2b8db3 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -88,7 +88,7 @@ class Trilinos(Package): '-DTPL_ENABLE_MPI:BOOL=ON', '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, '-DTPL_ENABLE_BLAS=ON', - '-DBLAS_LIBRARY_NAMES=blas', # FIXME: for Intel, Clang+GNU, GNU; easybuild add gfortran here... + '-DBLAS_LIBRARY_NAMES=blas', # FIXME: don't hardcode names '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib, '-DTPL_ENABLE_LAPACK=ON', '-DLAPACK_LIBRARY_NAMES=lapack', @@ -108,7 +108,7 @@ class Trilinos(Package): libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) options.extend([ '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, - '-DTrilinos_ENABLE_Fortran=ON' # FIXME: otherwise CMake's VerifyFortranC fails as it does not contain -lgfortran + '-DTrilinos_ENABLE_Fortran=ON' ]) # for build-debug only: @@ -144,21 +144,15 @@ class Trilinos(Package): # mumps if '+mumps' in spec: - # FIXME: - # since we use mumps with MPI, it will certainly be build against Scalapack. - # Add scalapack lib here as well. - # This likely won't be need if Trilinos would compile with Scalapack options.extend([ '-DTPL_ENABLE_MUMPS:BOOL=ON', '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! -# '-DMUMPS_LIBRARY_DIRS=%s;%s' % (spec['mumps'].prefix.lib,spec['scalapack'].prefix.lib), -# '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord;scalapack' # order is important! ]) # scalapack options.extend([ - '-DTPL_ENABLE_SCALAPACK:BOOL=ON', #FIXME: Undefined symbols for architecture x86_64: "_blacs_gridinfo__", referenced from: Amesos_Scalapack::RedistributeA() in Amesos_Scalapack.cpp.o + '-DTPL_ENABLE_SCALAPACK:BOOL=ON', '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) -- cgit v1.2.3-70-g09d2 From 21e81e92a9ac88bd498bd65aa9b77a43c27da881 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 12:05:48 +0100 Subject: try to disable VerifyFortranC tests on Darwin --- var/spack/repos/builtin/packages/trilinos/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 1dba2b8db3..0c7d8a7967 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -110,6 +110,13 @@ class Trilinos(Package): '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, '-DTrilinos_ENABLE_Fortran=ON' ]) + # FIXME: + # VerifyFortranC test of CMake does not contain -lgfortran and thus fails. + # This could be GCC/CMake related, but appears at least on OSX with Clang@7.0.2 and GNU Fortran@5.3.0 + if sys.platform == 'darwin': + options.extend([ + '-DTrilinos_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL=TRUE' + ]) # for build-debug only: options.extend([ -- cgit v1.2.3-70-g09d2 From 26a72619aed8684019ab331889b276b8883b76c8 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 12:42:26 +0100 Subject: add missing sys --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 0c7d8a7967..e077dfbbfd 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -1,5 +1,5 @@ from spack import * -import os +import os, sys # Trilinos is complicated to build, as an inspiration a couple of links to other repositories which build it: # https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/t/trilinos.py#L111 -- cgit v1.2.3-70-g09d2 From 5172f09b9f966a3f1be438bab972a0267cccc73b Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 16:47:48 +0100 Subject: builds on OSX again (modulo CC wrappers are solved) --- var/spack/repos/builtin/packages/trilinos/package.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index e077dfbbfd..3003b4ab53 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -113,15 +113,15 @@ class Trilinos(Package): # FIXME: # VerifyFortranC test of CMake does not contain -lgfortran and thus fails. # This could be GCC/CMake related, but appears at least on OSX with Clang@7.0.2 and GNU Fortran@5.3.0 - if sys.platform == 'darwin': - options.extend([ - '-DTrilinos_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL=TRUE' - ]) + #if sys.platform == 'darwin': + # options.extend([ + # '-DTrilinos_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL=TRUE' + # ]) # for build-debug only: - options.extend([ - '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' - ]) + #options.extend([ + # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' + #]) # suite-sparse related if '+suite-sparse' in spec: @@ -194,6 +194,11 @@ class Trilinos(Package): '-DTrilinos_ENABLE_Pike=OFF', '-DTrilinos_ENABLE_STK=OFF' ]) + if sys.platform == 'darwin': + options.extend([ + '-DTrilinos_ENABLE_FEI=OFF' + ]) + with working_dir('spack-build', create=True): cmake('..', *options) -- cgit v1.2.3-70-g09d2 From eec50b524bdf9e04f9e3536bc389ce633133373b Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 16:58:14 +0100 Subject: minor cleanup --- .../repos/builtin/packages/trilinos/package.py | 46 ++++++++++++++++------ 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 3003b4ab53..b1caca96ff 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -28,6 +28,7 @@ class Trilinos(Package): variant('superlu-dist', default=True, description='Compile with SuperluDist solvers') variant('hypre', default=True, description='Compile with Hypre preconditioner') variant('hdf5', default=True, description='Compile with HDF5') + variant('scalapack', default=True, description='Compile with Scalapack') variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') variant('python', default=True, description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') @@ -110,13 +111,6 @@ class Trilinos(Package): '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, '-DTrilinos_ENABLE_Fortran=ON' ]) - # FIXME: - # VerifyFortranC test of CMake does not contain -lgfortran and thus fails. - # This could be GCC/CMake related, but appears at least on OSX with Clang@7.0.2 and GNU Fortran@5.3.0 - #if sys.platform == 'darwin': - # options.extend([ - # '-DTrilinos_SKIP_FORTRANCINTERFACE_VERIFY_TEST:BOOL=TRUE' - # ]) # for build-debug only: #options.extend([ @@ -135,6 +129,11 @@ class Trilinos(Package): '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' ]) + else: + options.extend([ + '-DTPL_ENABLE_Cholmod:BOOL=OFF', + '-DTPL_ENABLE_UMFPACK:BOOL=OFF', + ]) # metis / parmetis if '+parmetis' in spec: # metis is required, see variants_check() @@ -148,6 +147,11 @@ class Trilinos(Package): '-DParMETIS_LIBRARY_NAMES=parmetis;metis', '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include ]) + else: + options.extend([ + '-DTPL_ENABLE_METIS:BOOL=OFF', + '-DTPL_ENABLE_ParMETIS:BOOL=OFF', + ]) # mumps if '+mumps' in spec: @@ -156,12 +160,22 @@ class Trilinos(Package): '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! ]) + else: + options.extend([ + '-DTPL_ENABLE_MUMPS:BOOL=OFF', + ]) # scalapack - options.extend([ - '-DTPL_ENABLE_SCALAPACK:BOOL=ON', - '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 - ]) + if '+scalapack' in spec: + options.extend([ + '-DTPL_ENABLE_SCALAPACK:BOOL=ON', + '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + ]) + else: + options.extend([ + '-DTPL_ENABLE_SCALAPACK:BOOL=OFF', + ]) + # superlu-dist: if '+superlu-dist' in spec: @@ -181,12 +195,22 @@ class Trilinos(Package): options.extend([ '-DHAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON' ]) + else: + options.extend([ + '-DTPL_ENABLE_SuperLUDist:BOOL=OFF', + ]) + # python if '~python' in spec: options.extend([ '-DTrilinos_ENABLE_PyTrilinos:BOOL=OFF' ]) + else: + options.extend([ + '-DTrilinos_ENABLE_PyTrilinos:BOOL=ON' + ]) + # disable due to compiler / config errors: options.extend([ -- cgit v1.2.3-70-g09d2 From 6699399e5191004ed924b9a8916ec1ae61223000 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 17:00:42 +0100 Subject: add when to depends_on scalapack --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index b1caca96ff..8b66405137 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -49,7 +49,7 @@ class Trilinos(Package): depends_on('netcdf+mpi') depends_on('parmetis',when='+parmetis') depends_on('mumps+metis+parmetis+shared',when='+mumps') # build errors with static libs - depends_on('scalapack') + depends_on('scalapack',when='+scalapack') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') depends_on('hdf5+mpi',when='+hdf5') -- cgit v1.2.3-70-g09d2 From c7011d21aa95145c7b3978f4220b211e39c9ecf2 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 25 Mar 2016 22:15:39 +0100 Subject: update dependencies. Builds fine on OSX --- var/spack/repos/builtin/packages/dealii/package.py | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index cddf5cd98b..5a50481b9b 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -12,21 +12,21 @@ class Dealii(Package): depends_on ("lapack") depends_on ("mpi") - #depends_on ("arpack") + depends_on ("arpack-ng") depends_on ("boost") - #depends_on ("doxygen") - depends_on ("hdf5+mpi") + depends_on ("doxygen") + depends_on ("hdf5+mpi~cxx") #FIXME NetCDF declares dependency with ~cxx, why? depends_on ("metis") - #depends_on "muparser" + depends_on ("muparser") depends_on ("netcdf") - #depends_on ("numdiff") - #depends_on ("oce") + #depends_on ("numdiff") #FIXME + depends_on ("oce") depends_on ("p4est") depends_on ("parmetis") depends_on ("petsc") - #depends_on ("slepc") - depends_on ("SuiteSparse") - #depends_on "tbb" + depends_on ("slepc") + depends_on ("suite-sparse") + depends_on ("tbb") depends_on ("trilinos") def install(self, spec, prefix): @@ -42,21 +42,21 @@ class Dealii(Package): '-DCMAKE_BUILD_TYPE=DebugRelease', '-DDEAL_II_WITH_THREADS:BOOL=ON' '-DDEAL_II_WITH_MPI:BOOL=ON', - '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), + '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # FIXME: avoid hardcoding mpi wrappers names '-DCMAKE_CXX_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), '-DCMAKE_Fortran_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - #'-DARPACK_DIR=%s' % , + '-DARPACK_DIR=%s' % spec['arpack-ng'].prefix, '-DBOOST_DIR=%s' % spec['boost'].prefix, '-DHDF5_DIR=%s' % spec['hdf5'].prefix, '-DMETIS_DIR=%s' % spec['metis'].prefix, - #'-DMUPARSER_DIR=%s ' + '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, '-DNETCDF_DIR=%s' % spec['netcdf'].prefix, - #'-DOPENCASCADE_DIR= + '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, '-DP4EST_DIR=%s' % spec['p4est'].prefix, '-DPETSC_DIR=%s' % spec['petsc'].prefix, - #'-DSLEPC_DIR= - '-DUMFPACK_DIR=%s' % spec['SuiteSparse'].prefix, - #'-DTBB_DIR=%s' + '-DSLEPC_DIR=%s' % spec['slepc'].prefix, + '-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix, + '-DTBB_DIR=%s' % spec['tbb'].prefix, '-DTRILINOS_DIR=%s' % spec['trilinos'].prefix ]) -- cgit v1.2.3-70-g09d2 From 618a9b2d7b1fbe297a2165181016fc45153cecf1 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 25 Mar 2016 15:41:22 -0700 Subject: Fixed bug in platform names that I introduced yesterday --- lib/spack/spack/compilers/__init__.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 55e2db700f..9601ae3e3a 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -28,6 +28,7 @@ system and configuring Spack to use multiple compilers. import imp import os import platform +import copy from llnl.util.lang import memoized, list_modules from llnl.util.filesystem import join_path @@ -77,28 +78,27 @@ def get_compiler_config(arch=None, scope=None): """Return the compiler configuration for the specified architecture. """ # Check whether we're on a front-end (native) architecture. - my_arch = spack.architecture.Arch() - if isinstance(arch, basestring): - if arch == 'all': - my_arch.platform.name = 'all' - arch = my_arch if arch is None: arch = my_arch + if isinstance(arch, basestring) and arch == 'all': + name = 'all' + else: + name = arch.platform.name def init_compiler_config(): """Compiler search used when Spack has no compilers.""" - config[arch.platform.name] = {} + config[name] = {} compilers = find_compilers(*get_path('PATH')) for compiler in compilers: - config[arch.platform.name].update(_to_dict(compiler)) + config[name].update(_to_dict(compiler)) spack.config.update_config('compilers', config, scope=scope) config = spack.config.get_config('compilers', scope=scope) # Update the configuration if there are currently no compilers # configured. Avoid updating automatically if there ARE site # compilers configured but no user ones. - if arch == my_arch and arch not in config: + if (isinstance(arch, basestring) or arch == my_arch) and arch not in config: if scope is None: # We know no compilers were configured in any scope. init_compiler_config() @@ -109,7 +109,7 @@ def get_compiler_config(arch=None, scope=None): if not site_config: init_compiler_config() - return config[arch.platform.name] if arch.platform.name in config else {} + return config[name] if name in config else {} def add_compilers_to_config(compilers, arch=None, scope=None): -- cgit v1.2.3-70-g09d2 From 57ced372291bfa537e37d325d8e4333623eb306d Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 25 Mar 2016 17:03:49 -0700 Subject: Fixed a bug in the testing --- lib/spack/spack/test/mock_packages_test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 079cbcc136..8f04076f19 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -42,11 +42,15 @@ compilers: cxx: /path/to/clang++ f77: None fc: None + strategy: PATH + modules: None gcc@4.5.0: cc: /path/to/gcc cxx: /path/to/g++ f77: /path/to/gfortran fc: /path/to/gfortran + strategy: PATH + modules: None """ mock_packages_config = """\ -- cgit v1.2.3-70-g09d2 From 06c98320a88924234a86b038ca7d3a60a8361f8c Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Fri, 25 Mar 2016 18:38:26 -0700 Subject: handle case where file contents change but resource name does not (e.g. if resource maintainer uses same name for each new version of a package) --- lib/spack/spack/fetch_strategy.py | 10 ++++++++++ lib/spack/spack/mirror.py | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index b696a12e7a..9938f011d0 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -107,6 +107,8 @@ class FetchStrategy(object): def archive(self, destination): pass # Used to create tarball for mirror. + def file_hash(self): pass # Identifies the resource to be retrieved + def __str__(self): # Should be human readable URL. return "FetchStrategy.__str___" @@ -217,6 +219,10 @@ class URLFetchStrategy(FetchStrategy): """Path to the source archive within this stage directory.""" return self.stage.archive_file + @property + def file_hash(self): + return self.digest + @_needs_stage def expand(self): if not self.expand_archive: @@ -349,6 +355,10 @@ class VCSFetchStrategy(FetchStrategy): self.stage.chdir() tar('-czf', destination, os.path.basename(self.stage.source_path)) + @property + def file_hash(self): + return None + def __str__(self): return "VCS: %s" % self.url diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py index 6981f69ac0..cb2588fb29 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirror.py @@ -61,7 +61,10 @@ def mirror_archive_filename(spec, fetcher): # Otherwise we'll make a .tar.gz ourselves ext = 'tar.gz' - filename = "%s-%s" % (spec.package.name, spec.version) + tokens = [spec.package.name, spec.version] + if fetcher.file_hash: + tokens.append(fetcher.file_hash) + filename = '-'.join(str(t) for t in tokens) if ext: filename += ".%s" % ext return filename -- cgit v1.2.3-70-g09d2 From 497adc3b42191c000323c55aae5da32fab901265 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Fri, 25 Mar 2016 22:45:19 -0400 Subject: Added new version; old versions don't work with Python3. --- var/spack/repos/builtin/packages/py-cython/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py index 68eb735ad9..4d728fa8fb 100644 --- a/var/spack/repos/builtin/packages/py-cython/package.py +++ b/var/spack/repos/builtin/packages/py-cython/package.py @@ -3,10 +3,13 @@ from spack import * class PyCython(Package): """The Cython compiler for writing C extensions for the Python language.""" homepage = "https://pypi.python.org/pypi/cython" - url = "https://pypi.python.org/packages/source/C/Cython/cython-0.22.tar.gz" + url = "https://pypi.python.org/packages/source/C/Cython/Cython-0.22.tar.gz" - version('0.21.2', 'd21adb870c75680dc857cd05d41046a4') + version('0.23.4', '157df1f69bcec6b56fd97e0f2e057f6e') + + # These versions contain illegal Python3 code... version('0.22', '1ae25add4ef7b63ee9b4af697300d6b6') + version('0.21.2', 'd21adb870c75680dc857cd05d41046a4') extends('python') -- cgit v1.2.3-70-g09d2 From f603c82e814ebc59ba03b0b83be86f1a4bfcbd94 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 26 Mar 2016 18:43:55 +0100 Subject: qualify Amesos link errors --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 8b66405137..0ba7a51b8b 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -48,7 +48,7 @@ class Trilinos(Package): depends_on('mpi') depends_on('netcdf+mpi') depends_on('parmetis',when='+parmetis') - depends_on('mumps+metis+parmetis+shared',when='+mumps') # build errors with static libs + depends_on('mumps+metis+parmetis+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) depends_on('scalapack',when='+scalapack') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') -- cgit v1.2.3-70-g09d2 From 965ce633c311e2bcb765f5e9900f0da6205f9c23 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 26 Mar 2016 18:51:59 +0100 Subject: cleanup variants --- .../repos/builtin/packages/trilinos/package.py | 40 +++++++--------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 0ba7a51b8b..48bffc65e0 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -22,13 +22,11 @@ class Trilinos(Package): version('11.14.2', 'a43590cf896c677890d75bfe75bc6254') version('11.14.1', '40febc57f76668be8b6a77b7607bb67f') - variant('metis', default=True, description='Compile with METIS') - variant('parmetis', default=True, description='Compile with ParMETIS') + variant('metis', default=True, description='Compile with METIS and ParMETIS') variant('mumps', default=True, description='Compile with support for MUMPS solvers') variant('superlu-dist', default=True, description='Compile with SuperluDist solvers') variant('hypre', default=True, description='Compile with Hypre preconditioner') variant('hdf5', default=True, description='Compile with HDF5') - variant('scalapack', default=True, description='Compile with Scalapack') variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') variant('python', default=True, description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') @@ -47,9 +45,9 @@ class Trilinos(Package): # MPI related dependencies depends_on('mpi') depends_on('netcdf+mpi') - depends_on('parmetis',when='+parmetis') - depends_on('mumps+metis+parmetis+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) - depends_on('scalapack',when='+scalapack') + depends_on('parmetis',when='+metis') + depends_on('mumps+mpi+metis+parmetis+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) + depends_on('scalapack',when='+mumps') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') depends_on('hdf5+mpi',when='+hdf5') @@ -60,11 +58,8 @@ class Trilinos(Package): # check that the combination of variants makes sense def variants_check(self): - if '+parmetis' in self.spec and '+metis' not in self.spec: - raise RuntimeError('You cannot use the variant parmetis without metis') - - if '+mumps' in self.spec and '+parmetis' not in self.spec: - raise RuntimeError('You cannot use the variant mumps without parmetis') + if '+mumps' in self.spec and '+metis' not in self.spec: + raise RuntimeError('You cannot use the variant mumps without metis') if '+superlu-dist' in self.spec and self.spec.satisfies('@:11.4.3'): # For Trilinos v11 we need to force SuperLUDist=OFF, @@ -136,7 +131,7 @@ class Trilinos(Package): ]) # metis / parmetis - if '+parmetis' in spec: # metis is required, see variants_check() + if '+metis' in spec: options.extend([ '-DTPL_ENABLE_METIS:BOOL=ON', '-DMETIS_LIBRARY_DIRS=%s' % spec['metis'].prefix.lib, @@ -153,30 +148,21 @@ class Trilinos(Package): '-DTPL_ENABLE_ParMETIS:BOOL=OFF', ]) - # mumps + # mumps / scalapack if '+mumps' in spec: options.extend([ '-DTPL_ENABLE_MUMPS:BOOL=ON', '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, - '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord' # order is important! - ]) - else: - options.extend([ - '-DTPL_ENABLE_MUMPS:BOOL=OFF', - ]) - - # scalapack - if '+scalapack' in spec: - options.extend([ + '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord', # order is important! '-DTPL_ENABLE_SCALAPACK:BOOL=ON', '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) else: options.extend([ + '-DTPL_ENABLE_MUMPS:BOOL=OFF', '-DTPL_ENABLE_SCALAPACK:BOOL=OFF', ]) - # superlu-dist: if '+superlu-dist' in spec: # Amesos, conflicting types of double and complex SLU_D @@ -202,13 +188,13 @@ class Trilinos(Package): # python - if '~python' in spec: + if '+python' in spec: options.extend([ - '-DTrilinos_ENABLE_PyTrilinos:BOOL=OFF' + '-DTrilinos_ENABLE_PyTrilinos:BOOL=ON' ]) else: options.extend([ - '-DTrilinos_ENABLE_PyTrilinos:BOOL=ON' + '-DTrilinos_ENABLE_PyTrilinos:BOOL=OFF' ]) -- cgit v1.2.3-70-g09d2 From 9c391bbda1c8379dd60cf21d82779db704183f32 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 26 Mar 2016 20:52:08 +0100 Subject: minor changes to variants --- var/spack/repos/builtin/packages/dealii/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 5a50481b9b..19bb3814be 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -12,7 +12,7 @@ class Dealii(Package): depends_on ("lapack") depends_on ("mpi") - depends_on ("arpack-ng") + depends_on ("arpack-ng+mpi") depends_on ("boost") depends_on ("doxygen") depends_on ("hdf5+mpi~cxx") #FIXME NetCDF declares dependency with ~cxx, why? @@ -23,7 +23,7 @@ class Dealii(Package): depends_on ("oce") depends_on ("p4est") depends_on ("parmetis") - depends_on ("petsc") + depends_on ("petsc+mpi") depends_on ("slepc") depends_on ("suite-sparse") depends_on ("tbb") -- cgit v1.2.3-70-g09d2 From 11ca06b1045283e2c89dc84a91ceb88fcadb6163 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sat, 26 Mar 2016 20:35:34 -0400 Subject: Added new py-cython version --- var/spack/repos/builtin/packages/py-cython/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py index 4d728fa8fb..072355026e 100644 --- a/var/spack/repos/builtin/packages/py-cython/package.py +++ b/var/spack/repos/builtin/packages/py-cython/package.py @@ -5,6 +5,7 @@ class PyCython(Package): homepage = "https://pypi.python.org/pypi/cython" url = "https://pypi.python.org/packages/source/C/Cython/Cython-0.22.tar.gz" + version('0.23.5', '66b62989a67c55af016c916da36e7514') version('0.23.4', '157df1f69bcec6b56fd97e0f2e057f6e') # These versions contain illegal Python3 code... -- cgit v1.2.3-70-g09d2 From 9b130e1d199bcff10903e981bd7592ed941d0107 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sat, 26 Mar 2016 20:42:35 -0400 Subject: Added googletest package. --- .../repos/builtin/packages/googletest/package.py | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 var/spack/repos/builtin/packages/googletest/package.py diff --git a/var/spack/repos/builtin/packages/googletest/package.py b/var/spack/repos/builtin/packages/googletest/package.py new file mode 100644 index 0000000000..ed27afa10c --- /dev/null +++ b/var/spack/repos/builtin/packages/googletest/package.py @@ -0,0 +1,40 @@ +# FIXME: +# This is a template package file for Spack. We've conveniently +# put "FIXME" labels next to all the things you'll want to change. +# +# Once you've edited all the FIXME's, delete this whole message, +# save this file, and test out your package like this: +# +# spack install googletest +# +# You can always get back here to change things with: +# +# spack edit googletest +# +# See the spack documentation for more information on building +# packages. +# +from spack import * + +class Googletest(Package): + """Google test framework for C++. Also called gtest.""" + homepage = "https://github.com/google/googletest" + url = "https://github.com/google/googletest/tarball/release-1.7.0" + + version('1.7.0', '5eaf03ed925a47b37c8e1d559eb19bc4') + + depends_on("cmake") + + def install(self, spec, prefix): + which('cmake')('.', *std_cmake_args) + + make() + + # Google Test doesn't have a make install + # We have to do our own install here. + install_tree('include', prefix.include) + + mkdirp(prefix.lib) + install('./libgtest.a', '%s' % prefix.lib) + install('./libgtest_main.a', '%s' % prefix.lib) + -- cgit v1.2.3-70-g09d2 From a82a587b3298ffec0c11ddf1c9639c6de228fa6a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 06:17:43 +0200 Subject: lower requirement on mumps --- var/spack/repos/builtin/packages/trilinos/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 48bffc65e0..e8c4bcd7e2 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -46,7 +46,7 @@ class Trilinos(Package): depends_on('mpi') depends_on('netcdf+mpi') depends_on('parmetis',when='+metis') - depends_on('mumps+mpi+metis+parmetis+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) + depends_on('mumps+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) depends_on('scalapack',when='+mumps') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') @@ -58,9 +58,6 @@ class Trilinos(Package): # check that the combination of variants makes sense def variants_check(self): - if '+mumps' in self.spec and '+metis' not in self.spec: - raise RuntimeError('You cannot use the variant mumps without metis') - if '+superlu-dist' in self.spec and self.spec.satisfies('@:11.4.3'): # For Trilinos v11 we need to force SuperLUDist=OFF, # since only the deprecated SuperLUDist v3.3 together with an Amesos patch -- cgit v1.2.3-70-g09d2 From 9cff241ad52ba628a0bdad47cee98bbbf6ba5511 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 10:39:09 +0200 Subject: fix install name on Darwin --- var/spack/repos/builtin/packages/trilinos/package.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index e8c4bcd7e2..72f904d8aa 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -1,5 +1,5 @@ from spack import * -import os, sys +import os, sys, glob # Trilinos is complicated to build, as an inspiration a couple of links to other repositories which build it: # https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/t/trilinos.py#L111 @@ -222,3 +222,10 @@ class Trilinos(Package): # A workaround it to remove PyTrilinos from the COMPONENTS_LIST : if '+python' in self.spec: filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)', (r'\1\3'), '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib) + + # The shared libraries are not installed correctly on Darwin; correct this + if (sys.platform == 'darwin') and ('+shared' in spec): + fs = glob.glob(join_path(prefix.lib,"*.dylib")) + install_name_tool = which('install_name_tool') + for f in fs: + install_name_tool('-id',f,f) -- cgit v1.2.3-70-g09d2 From 69ebc8173e1843ea570d78ac27465b0ea32c753d Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 16:04:13 +0200 Subject: use global tool to fix install_name --- var/spack/repos/builtin/packages/trilinos/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 72f904d8aa..6608f64ea7 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -225,7 +225,4 @@ class Trilinos(Package): # The shared libraries are not installed correctly on Darwin; correct this if (sys.platform == 'darwin') and ('+shared' in spec): - fs = glob.glob(join_path(prefix.lib,"*.dylib")) - install_name_tool = which('install_name_tool') - for f in fs: - install_name_tool('-id',f,f) + fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-70-g09d2 From cc42391e0fa6eda490c4aeffcbfbae584f077db3 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sun, 27 Mar 2016 11:06:10 -0400 Subject: Added py-netcdf --- var/spack/repos/builtin/packages/py-netcdf/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-netcdf/package.py diff --git a/var/spack/repos/builtin/packages/py-netcdf/package.py b/var/spack/repos/builtin/packages/py-netcdf/package.py new file mode 100644 index 0000000000..7faa15ad25 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-netcdf/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyNetcdf(Package): + """Python interface to the netCDF Library.""" + homepage = "http://unidata.github.io/netcdf4-python" + url = "https://github.com/Unidata/netcdf4-python/tarball/v1.2.3.1rel" + + version('1.2.3.1', '4fc4320d4f2a77b894ebf8da1c9895af') + + extends('python') + depends_on('py-numpy') + depends_on('py-cython') + depends_on('netcdf') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 439d3b3ddb4e53721b216bd19bec1e8fa16faf89 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 17:38:25 +0200 Subject: mumps: add install_name / soname --- var/spack/repos/builtin/packages/mumps/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index b295857ab5..26440ab7c8 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -113,13 +113,13 @@ class Mumps(Package): # Building dylibs with mpif90 causes segfaults on 10.8 and 10.10. Use gfortran. (Homebrew) makefile_conf.extend([ 'LIBEXT=.dylib', - 'AR=%s -dynamiclib -undefined dynamic_lookup -o ' % os.environ['FC'], + 'AR=%s -dynamiclib -Wl,-install_name -Wl,%s/$(notdir $@) -undefined dynamic_lookup -o ' % (os.environ['FC'],prefix.lib), 'RANLIB=echo' ]) else: makefile_conf.extend([ 'LIBEXT=.so', - 'AR=$(FL) -shared -o', + 'AR=$(FL) -shared -Wl,-soname -Wl,%s/$(notdir $@) -o' % prefix.lib, 'RANLIB=echo' ]) else: -- cgit v1.2.3-70-g09d2 From b0b882cbb3d903a85413acb0439a02d6ac9e26fc Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 26 Mar 2016 00:56:19 -0700 Subject: Speed up directives by skipping debug info in stack traversal. - `caller_locals()` doesn't need debug info, only frame locals. - `get_calling_module()` doesn't either. - Changed calls to `inspect.stack()` -> `inspect.stack(0)` --- lib/spack/llnl/util/lang.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py index 13d301f84e..3b4e2c8352 100644 --- a/lib/spack/llnl/util/lang.py +++ b/lib/spack/llnl/util/lang.py @@ -117,7 +117,8 @@ def caller_locals(): scope. Yes, this is some black magic, and yes it's useful for implementing things like depends_on and provides. """ - stack = inspect.stack() + # Passing zero here skips line context for speed. + stack = inspect.stack(0) try: return stack[2][0].f_locals finally: @@ -128,7 +129,8 @@ def get_calling_module_name(): """Make sure that the caller is a class definition, and return the enclosing module's name. """ - stack = inspect.stack() + # Passing zero here skips line context for speed. + stack = inspect.stack(0) try: # Make sure locals contain __module__ caller_locals = stack[2][0].f_locals -- cgit v1.2.3-70-g09d2 From dce590fb21af844230727b283f6c8bf759ea805c Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 26 Mar 2016 19:59:02 -0700 Subject: Add a dso_suffix variable to build_environment - Consolidate this in one place so that we don't have to do it in every build. - Will update further once better OS support is committed. Shoudl really be an attribute of the forthcoming `Platform` class. --- lib/spack/spack/build_environment.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 119a255a34..640db0c1d1 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -59,6 +59,11 @@ SPACK_SHORT_SPEC = 'SPACK_SHORT_SPEC' SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR' +# Platform-specific library suffix. +dso_suffix = 'dylib' if sys.platform == 'darwin' else 'so' + + + class MakeExecutable(Executable): """Special callable executable object for make so the user can specify parallel or not on a per-invocation basis. Using @@ -246,6 +251,9 @@ def set_module_variables_for_package(pkg, module): # a Prefix object. m.prefix = pkg.prefix + # Platform-specific library suffix. + m.dso_suffix = dso_suffix + def get_rpaths(pkg): """Get a list of all the rpaths for a package.""" -- cgit v1.2.3-70-g09d2 From cde33205827edbed988ec4548c983ff93e9445c6 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 26 Mar 2016 20:00:28 -0700 Subject: Add a method to find the containing directory of a library. --- lib/spack/llnl/util/filesystem.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index c4665c284c..92f9ca2983 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -27,7 +27,7 @@ __all__ = ['set_install_permissions', 'install', 'install_tree', 'traverse_tree' 'force_remove', 'join_path', 'ancestor', 'can_access', 'filter_file', 'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink', 'set_executable', 'copy_mode', 'unset_executable_mode', - 'remove_dead_links', 'remove_linked_tree'] + 'remove_dead_links', 'remove_linked_tree', 'find_library_path'] import os import sys @@ -392,3 +392,18 @@ def remove_linked_tree(path): os.unlink(path) else: shutil.rmtree(path, True) + + +def find_library_path(libname, *paths): + """Searches for a file called in each path. + + Return: + directory where the library was found, if found. None otherwise. + + """ + for path in paths: + library = join_path(path, libname) + if os.path.exists(library): + return path + return None + -- cgit v1.2.3-70-g09d2 From 66bb71534b3ab7eaf7b27743efc0ecf9763e4982 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 26 Mar 2016 20:02:08 -0700 Subject: Better blas/lapack and scipy packages: more robust, added `shared` variants. - py-scipy now builds with netlib-lapack, openblas, and atlas. - started a convention for passing lib info from blas/lapack implementations. - Improved netlib-lapack: - Also build static libs when `shared` variant is enabled. - Enable CBLAS build - needed minor patch to build correctly. - Added `shared` variant to OpenBLAS. - Made OpenBLAS build properly shared and static. --- .../builtin/packages/netlib-lapack/package.py | 40 +++++++++++++++-- .../repos/builtin/packages/openblas/package.py | 52 +++++++++++++++++----- .../repos/builtin/packages/py-scipy/package.py | 12 +++-- 3 files changed, 88 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index c4b7ce3b04..05436332ac 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -31,8 +31,16 @@ class NetlibLapack(Package): depends_on('cmake') depends_on('blas', when='+external-blas') - def install(self, spec, prefix): - cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), + + def patch(self): + # Fix cblas CMakeLists.txt -- has wrong case for subdirectory name. + filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', + '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) + + + def install_one(self, spec, prefix, shared): + cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'), + '-DCBLAS=ON', # always build CBLAS '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), '-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')] if '+external-blas' in spec: @@ -45,7 +53,33 @@ class NetlibLapack(Package): cmake_args.extend(std_cmake_args) - with working_dir('spack-build', create=True): + build_dir = 'spack-build' + ('-shared' if shared else '-static') + with working_dir(build_dir, create=True): cmake('..', *cmake_args) make() make("install") + + + def install(self, spec, prefix): + # Always build static libraries. + self.install_one(spec, prefix, False) + + # Build shared libraries if requested. + if '+shared' in spec: + self.install_one(spec, prefix, True) + + + def setup_dependent_package(self, module, dspec): + # This is WIP for a prototype interface for virtual packages. + # We can update this as more builds start depending on BLAS/LAPACK. + libdir = find_library_path('libblas.a', self.prefix.lib64, self.prefix.lib) + + self.spec.blas_static_lib = join_path(libdir, 'libblas.a') + self.spec.lapack_static_lib = join_path(libdir, 'liblapack.a') + + if '+shared' in self.spec: + self.spec.blas_shared_lib = join_path(libdir, 'libblas.%s' % dso_suffix) + self.spec.lapack_shared_lib = join_path(libdir, 'liblapack.%s' % dso_suffix) + + + diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 1d10f217c4..4ec829a85b 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -1,5 +1,6 @@ from spack import * import sys +import os class Openblas(Package): """OpenBLAS: An optimized BLAS library""" @@ -10,29 +11,60 @@ class Openblas(Package): version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc') version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') + variant('shared', default=True, description="Build shared libraries as well as static libs.") + # virtual dependency provides('blas') provides('lapack') + def install(self, spec, prefix): - extra=[] + make_defs = ['CC=%s' % spack_cc, + 'FC=%s' % spack_fc] + + make_targets = ['libs', 'netlib'] + + # Build shared if variant is set. + if '+shared' in spec: + make_targets += ['shared'] + else: + make_defs += ['NO_SHARED=1'] + + # fix missing _dggsvd_ and _sggsvd_ if spec.satisfies('@0.2.16'): - extra.extend([ - 'BUILD_LAPACK_DEPRECATED=1' # fix missing _dggsvd_ and _sggsvd_ - ]) + make_defs += ['BUILD_LAPACK_DEPRECATED=1'] + + make_args = make_defs + make_targets + make(*make_args) - make('libs', 'netlib', 'shared', 'CC=cc', 'FC=f77',*extra) - make("tests") - make('install', "PREFIX='%s'" % prefix) + make("tests", *make_defs) + + # no quotes around prefix (spack doesn't use a shell) + make('install', "PREFIX=%s" % prefix, *make_defs) - lib_dsuffix = 'dylib' if sys.platform == 'darwin' else 'so' # Blas virtual package should provide blas.a and libblas.a with working_dir(prefix.lib): symlink('libopenblas.a', 'blas.a') symlink('libopenblas.a', 'libblas.a') - symlink('libopenblas.%s' % lib_dsuffix, 'libblas.%s' % lib_dsuffix) + if '+shared' in spec: + symlink('libopenblas.%s' % dso_suffix, 'libblas.%s' % dso_suffix) # Lapack virtual package should provide liblapack.a with working_dir(prefix.lib): symlink('libopenblas.a', 'liblapack.a') - symlink('libopenblas.%s' % lib_dsuffix, 'liblapack.%s' % lib_dsuffix) + if '+shared' in spec: + symlink('libopenblas.%s' % dso_suffix, 'liblapack.%s' % dso_suffix) + + + def setup_dependent_package(self, module, dspec): + # This is WIP for a prototype interface for virtual packages. + # We can update this as more builds start depending on BLAS/LAPACK. + libdir = find_library_path('libopenblas.a', self.prefix.lib64, self.prefix.lib) + + self.spec.blas_static_lib = join_path(libdir, 'libopenblas.a') + self.spec.lapack_static_lib = self.spec.blas_static_lib + + if '+shared' in self.spec: + self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' % dso_suffix) + self.spec.lapack_shared_lib = self.spec.blas_shared_lib + diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index c2161c90c4..4d47c641ee 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -11,9 +11,15 @@ class PyScipy(Package): extends('python') depends_on('py-nose') - depends_on('py-numpy') - depends_on('blas') - depends_on('lapack') + depends_on('py-numpy+blas+lapack') def install(self, spec, prefix): + if 'atlas' in spec: + # libatlas.so actually isn't always installed, but this + # seems to make the build autodetect things correctly. + env['ATLAS'] = join_path(spec['atlas'].prefix.lib, 'libatlas.' + dso_suffix) + else: + env['BLAS'] = spec['blas'].blas_shared_lib + env['LAPACK'] = spec['lapack'].lapack_shared_lib + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From e049fc2840ba81cdff2ca7edd798c5e961ae94e9 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 27 Mar 2016 11:47:20 -0700 Subject: Run post-install hoooks before build stage is removed. - Build will properly fail when post-install hoooks fail. - Post-install hooks have a proper working directory set now. --- lib/spack/spack/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 9af3221837..c17bec4a14 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -926,6 +926,9 @@ class Package(object): install(env_path, env_install_path) dump_packages(self.spec, packages_dir) + # Run post install hooks before build stage is removed. + spack.hooks.post_install(self) + # Stop timer. self._total_time = time.time() - start_time build_time = self._total_time - self._fetch_time @@ -954,9 +957,6 @@ class Package(object): # the database, so that we don't need to re-read from file. spack.installed_db.add(self.spec, self.prefix) - # Once everything else is done, run post install hooks - spack.hooks.post_install(self) - def sanity_check_prefix(self): """This function checks whether install succeeded.""" -- cgit v1.2.3-70-g09d2 From 20600b8cac9488ff416397de374c2d3dacf4afe4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 21:03:18 +0200 Subject: add tests and netcdf-cxx4 --- var/spack/repos/builtin/packages/dealii/package.py | 38 ++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 19bb3814be..1d4c800288 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -1,4 +1,5 @@ from spack import * +import shutil class Dealii(Package): """C++ software library providing well-documented tools to build finite element codes for a broad variety of PDEs.""" @@ -18,7 +19,7 @@ class Dealii(Package): depends_on ("hdf5+mpi~cxx") #FIXME NetCDF declares dependency with ~cxx, why? depends_on ("metis") depends_on ("muparser") - depends_on ("netcdf") + depends_on ("netcdf-cxx4") #depends_on ("numdiff") #FIXME depends_on ("oce") depends_on ("p4est") @@ -50,7 +51,7 @@ class Dealii(Package): '-DHDF5_DIR=%s' % spec['hdf5'].prefix, '-DMETIS_DIR=%s' % spec['metis'].prefix, '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, - '-DNETCDF_DIR=%s' % spec['netcdf'].prefix, + '-DNETCDF_DIR=%s' % spec['netcdf-cxx4'].prefix, '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, '-DP4EST_DIR=%s' % spec['p4est'].prefix, '-DPETSC_DIR=%s' % spec['petsc'].prefix, @@ -65,3 +66,36 @@ class Dealii(Package): make() make("test") make("install") + + # run some MPI examples with different solvers from PETSc and Trilinos + env['DEAL_II_DIR'] = prefix + # take bare-bones step-3 + with working_dir('examples/step-3'): + 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'): + # 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('.') + make('release') + make('run',parallel=False) + + # change Linear Algebra to Trilinos + filter_file(r'(#define USE_PETSC_LA.*)', (''), 'step-40.cc') + make('release') + make('run',parallel=False) + + with working_dir('examples/step-36'): + cmake('.') + make('release') + make('run',parallel=False) + + with working_dir('examples/step-54'): + cmake('.') + make('release') + # FIXME + # make('run',parallel=False) -- cgit v1.2.3-70-g09d2 From 5695e4c03d6c98fc187ec405923cd1dcf2fbdff6 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 27 Mar 2016 15:37:52 -0500 Subject: Wrap the long description of an environment module so it is more readable. --- lib/spack/spack/modules.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index d45fdde703..f6a11c92e3 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -278,6 +278,6 @@ class TclModule(EnvModule): # Long description if self.long_description: module_file.write('proc ModulesHelp { } {\n') - doc = re.sub(r'"', '\"', self.long_description) - module_file.write("puts stderr \"%s\"\n" % doc) + for line in textwrap.wrap(self.long_description, 72): + module_file.write("puts stderr \"%s\"\n" % line) module_file.write('}\n\n') -- cgit v1.2.3-70-g09d2 From fc73e93b50a708ecfa2395a636bc32161c9d3051 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 23:47:43 +0200 Subject: rework netcdf --- var/spack/repos/builtin/packages/dealii/package.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 1d4c800288..baedd155ef 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -1,5 +1,5 @@ from spack import * -import shutil +import sys class Dealii(Package): """C++ software library providing well-documented tools to build finite element codes for a broad variety of PDEs.""" @@ -39,6 +39,7 @@ class Dealii(Package): if word.startswith('-DCMAKE_BUILD_TYPE'): options.remove(word) + dsuf = 'dylib' if sys.platform == 'darwin' else 'so' options.extend([ '-DCMAKE_BUILD_TYPE=DebugRelease', '-DDEAL_II_WITH_THREADS:BOOL=ON' @@ -51,7 +52,14 @@ class Dealii(Package): '-DHDF5_DIR=%s' % spec['hdf5'].prefix, '-DMETIS_DIR=%s' % spec['metis'].prefix, '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, - '-DNETCDF_DIR=%s' % spec['netcdf-cxx4'].prefix, + # since Netcdf is spread among two, need to do it by hand: + '-DNETCDF_FOUND=true', + '-DNETCDF_LIBRARIES=%s;%s' % + (join_path(spec['netcdf-cxx4'].prefix.lib,'libnetcdf_c++4.%s' % dsuf), + join_path(spec['netcdf'].prefix.lib,'libnetcdf.%s' % dsuf)), + '-DNETCDF_INCLUDE_DIRS=%s;%s' % + (spec['netcdf-cxx4'].prefix.include, + spec['netcdf'].prefix.include), '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, '-DP4EST_DIR=%s' % spec['p4est'].prefix, '-DPETSC_DIR=%s' % spec['petsc'].prefix, -- cgit v1.2.3-70-g09d2 From e0f463c4f99e4808b5647a2abae915ce0cb80561 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sun, 27 Mar 2016 23:56:41 +0200 Subject: uninstall : added recursive option --- lib/spack/spack/cmd/uninstall.py | 151 ++++++++++++++++++++++++++------------- 1 file changed, 101 insertions(+), 50 deletions(-) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 350ef372cb..8da0fe1c4a 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -23,19 +23,24 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from __future__ import print_function -import sys + import argparse +import sys import llnl.util.tty as tty -from llnl.util.tty.colify import colify - import spack import spack.cmd import spack.repository from spack.cmd.find import display_specs from spack.package import PackageStillNeededError -description="Remove an installed package" +description = "Remove an installed package" + +error_message = """You can either: + a) Use a more specific spec, or + b) use spack uninstall -a to uninstall ALL matching specs. +""" + def setup_parser(subparser): subparser.add_argument( @@ -44,10 +49,81 @@ def setup_parser(subparser): subparser.add_argument( '-a', '--all', action='store_true', dest='all', help="USE CAREFULLY. Remove ALL installed packages that match each " + - "supplied spec. i.e., if you say uninstall libelf, ALL versions of " + - "libelf are uninstalled. This is both useful and dangerous, like rm -r.") + "supplied spec. i.e., if you say uninstall libelf, ALL versions of " + + "libelf are uninstalled. This is both useful and dangerous, like rm -r.") subparser.add_argument( - 'packages', nargs=argparse.REMAINDER, help="specs of packages to uninstall") + '-r', '--recursive', action='store_true', dest='recursive', + help='Uninstall all the packages that depends on the ones for which we required explicit removal.' + + ) + subparser.add_argument('packages', nargs=argparse.REMAINDER, help="specs of packages to uninstall") + + +def concretize_specs(specs, allow_multiple_matches=False, force=False): + """ + Returns a list of specs matching the non necessarily concretized specs given from cli + + Args: + specs: list of specs to be matched against installed packages + allow_multiple_matches : boolean (if True multiple matches for each item in specs are admitted) + + Return: + list of specs + """ + specs_from_cli = [] # List of specs that match expressions given via command line + has_errors = False + for spec in specs: + matching = spack.installed_db.query(spec) + # For each spec provided, make sure it refers to only one package. + # Fail and ask user to be unambiguous if it doesn't + if not allow_multiple_matches and len(matching) > 1: + tty.error("%s matches multiple packages:" % spec) + print() + display_specs(matching, long=True) + print() + has_errors = True + + # No installed package matches the query + if len(matching) == 0 and not force: + tty.error("%s does not match any installed packages." % spec) + has_errors = True + + specs_from_cli.extend(matching) + if has_errors: + tty.die(error_message) + + return specs_from_cli + + +def installed_dependents(specs): + dependents = {} + for item in specs: + lst = [x for x in item.package.installed_dependents if x not in specs] + if lst: + dependents[item] = lst + return dependents + + +def do_uninstall(specs, force): + specs = list(set(specs)) # Make specs unique + packages = [] + for item in specs: + try: + # should work if package is known to spack + packages.append(item.package) + except spack.repository.UnknownPackageError as e: + # The package.py file has gone away -- but still + # want to uninstall. + spack.Package(item).do_uninstall(force=True) + + # Sort packages to be uninstalled by the number of installed dependents + # This ensures we do things in the right order + def num_installed_deps(pkg): + return len(pkg.installed_dependents) + + packages.sort(key=num_installed_deps) + for item in packages: + item.do_uninstall(force=force) def uninstall(parser, args): @@ -56,50 +132,25 @@ def uninstall(parser, args): with spack.installed_db.write_transaction(): specs = spack.cmd.parse_specs(args.packages) + # Gets the list of installed specs that match the ones give via cli + uninstall_list = concretize_specs(specs, args.all, args.force) # takes care of '-a' is given in the cli + dependent_list = installed_dependents(uninstall_list) # takes care of '-r' - # For each spec provided, make sure it refers to only one package. - # Fail and ask user to be unambiguous if it doesn't - pkgs = [] - for spec in specs: - matching_specs = spack.installed_db.query(spec) - if not args.all and len(matching_specs) > 1: - tty.error("%s matches multiple packages:" % spec) - print() - display_specs(matching_specs, long=True) - print() - print("You can either:") - print(" a) Use a more specific spec, or") - print(" b) use spack uninstall -a to uninstall ALL matching specs.") - sys.exit(1) - - if len(matching_specs) == 0: - if args.force: continue - tty.die("%s does not match any installed packages." % spec) - - for s in matching_specs: - try: - # should work if package is known to spack - pkgs.append(s.package) - except spack.repository.UnknownPackageError as e: - # The package.py file has gone away -- but still - # want to uninstall. - spack.Package(s).do_uninstall(force=True) - - # Sort packages to be uninstalled by the number of installed dependents - # This ensures we do things in the right order - def num_installed_deps(pkg): - return len(pkg.installed_dependents) - pkgs.sort(key=num_installed_deps) - - # Uninstall packages in order now. - for pkg in pkgs: - try: - pkg.do_uninstall(force=args.force) - except PackageStillNeededError as e: - tty.error("Will not uninstall %s" % e.spec.format("$_$@$%@$#", color=True)) + # There are dependents but recursive uninstall wasn't a requirement + has_error = False + if dependent_list and not args.recursive and not args.force: + for spec, lst in dependent_list.items(): + tty.error("Will not uninstall %s" % spec.format("$_$@$%@$#", color=True)) print('') print("The following packages depend on it:") - display_specs(e.dependents, long=True) + display_specs(lst, long=True) print('') - print("You can use spack uninstall -f to force this action.") - sys.exit(1) + has_error = True + elif args.recursive: + for key, lst in dependent_list.items(): + uninstall_list.extend(lst) + + if has_error: + tty.die('You can use spack uninstall -f to force this action') + # Uninstall everything on the list + do_uninstall(uninstall_list, args.force) -- cgit v1.2.3-70-g09d2 From ccd155572fc8ef066b93424e90a74f9bb8fcf435 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sun, 27 Mar 2016 18:18:54 -0400 Subject: Removed redundant package py-libxml2. Use libxml2 instead. --- var/spack/repos/builtin/packages/py-libxml2/package.py | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/py-libxml2/package.py diff --git a/var/spack/repos/builtin/packages/py-libxml2/package.py b/var/spack/repos/builtin/packages/py-libxml2/package.py deleted file mode 100644 index 59005428e4..0000000000 --- a/var/spack/repos/builtin/packages/py-libxml2/package.py +++ /dev/null @@ -1,15 +0,0 @@ -from spack import * - -class PyLibxml2(Package): - """A Python wrapper around libxml2.""" - homepage = "https://xmlsoft.org/python.html" - url = "ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.21.tar.gz" - - version('2.6.21', '229dd2b3d110a77defeeaa73af83f7f3') - - extends('python') - depends_on('libxml2') - depends_on('libxslt') - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 7eca1284c81c3efc5a87b8a174a0974811656b3e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 27 Mar 2016 08:59:25 +0200 Subject: metis/parmetis/boost/oce/scalapack: correct install_name on Darwin via a global function. --- lib/spack/llnl/util/filesystem.py | 30 ++++++++++++- var/spack/repos/builtin/packages/boost/package.py | 50 ++++++++++++---------- var/spack/repos/builtin/packages/metis/package.py | 6 ++- .../builtin/packages/netlib-scalapack/package.py | 5 +++ var/spack/repos/builtin/packages/oce/package.py | 6 ++- .../repos/builtin/packages/parmetis/package.py | 6 ++- 6 files changed, 76 insertions(+), 27 deletions(-) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index c4665c284c..46ca03bec4 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -27,9 +27,10 @@ __all__ = ['set_install_permissions', 'install', 'install_tree', 'traverse_tree' 'force_remove', 'join_path', 'ancestor', 'can_access', 'filter_file', 'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink', 'set_executable', 'copy_mode', 'unset_executable_mode', - 'remove_dead_links', 'remove_linked_tree'] + 'remove_dead_links', 'remove_linked_tree', 'fix_darwin_install_name'] import os +import glob import sys import re import shutil @@ -38,6 +39,7 @@ import errno import getpass from contextlib import contextmanager, closing from tempfile import NamedTemporaryFile +import subprocess import llnl.util.tty as tty from spack.util.compression import ALLOWED_ARCHIVE_TYPES @@ -392,3 +394,29 @@ def remove_linked_tree(path): os.unlink(path) else: shutil.rmtree(path, True) + +def fix_darwin_install_name(path): + """ + Fix install name of dynamic libraries on Darwin to have full path. + There are two parts of this task: + (i) use install_name('-id',...) to change install name of a single lib; + (ii) use install_name('-change',...) to change the cross linking between libs. + The function assumes that all libraries are in one folder and currently won't + follow subfolders. + + Args: + path: directory in which .dylib files are alocated + + """ + libs = glob.glob(join_path(path,"*.dylib")) + for lib in libs: + # fix install name first: + subprocess.Popen(["install_name_tool", "-id",lib,lib], stdout=subprocess.PIPE).communicate()[0] + long_deps = subprocess.Popen(["otool", "-L",lib], stdout=subprocess.PIPE).communicate()[0].split('\n') + deps = [dep.partition(' ')[0][1::] for dep in long_deps[2:-1]] + # fix all dependencies: + for dep in deps: + for loc in libs: + if dep == os.path.basename(loc): + subprocess.Popen(["install_name_tool", "-change",dep,loc,lib], stdout=subprocess.PIPE).communicate()[0] + break diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index fb1f5daee7..82ce6fbb74 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -1,5 +1,6 @@ from spack import * import spack +import sys class Boost(Package): """Boost provides free peer-reviewed portable C++ source @@ -45,34 +46,34 @@ class Boost(Package): version('1.34.1', '2d938467e8a448a2c9763e0a9f8ca7e5') version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0') - default_install_libs = set(['atomic', - 'chrono', - 'date_time', - 'filesystem', + default_install_libs = set(['atomic', + 'chrono', + 'date_time', + 'filesystem', 'graph', 'iostreams', 'locale', 'log', - 'math', + 'math', 'program_options', - 'random', - 'regex', - 'serialization', - 'signals', - 'system', - 'test', - 'thread', + 'random', + 'regex', + 'serialization', + 'signals', + 'system', + 'test', + 'thread', 'wave']) - # mpi/python are not installed by default because they pull in many - # dependencies and/or because there is a great deal of customization + # mpi/python are not installed by default because they pull in many + # dependencies and/or because there is a great deal of customization # possible (and it would be difficult to choose sensible defaults) default_noinstall_libs = set(['mpi', 'python']) all_libs = default_install_libs | default_noinstall_libs for lib in all_libs: - variant(lib, default=(lib not in default_noinstall_libs), + variant(lib, default=(lib not in default_noinstall_libs), description="Compile with {0} library".format(lib)) variant('debug', default=False, description='Switch to the debug version of Boost') @@ -124,9 +125,9 @@ class Boost(Package): with open('user-config.jam', 'w') as f: compiler_wrapper = join_path(spack.build_env_path, 'c++') - f.write("using {0} : : {1} ;\n".format(boostToolsetId, + f.write("using {0} : : {1} ;\n".format(boostToolsetId, compiler_wrapper)) - + if '+mpi' in spec: f.write('using mpi : %s ;\n' % join_path(spec['mpi'].prefix.bin, 'mpicxx')) @@ -155,7 +156,7 @@ class Boost(Package): linkTypes = ['static'] if '+shared' in spec: linkTypes.append('shared') - + threadingOpts = [] if '+multithreaded' in spec: threadingOpts.append('multi') @@ -163,12 +164,12 @@ class Boost(Package): threadingOpts.append('single') if not threadingOpts: raise RuntimeError("At least one of {singlethreaded, multithreaded} must be enabled") - + options.extend([ 'toolset=%s' % self.determine_toolset(spec), 'link=%s' % ','.join(linkTypes), '--layout=tagged']) - + return threadingOpts def install(self, spec, prefix): @@ -177,14 +178,14 @@ class Boost(Package): if "+{0}".format(lib) in spec: withLibs.append(lib) if not withLibs: - # if no libraries are specified for compilation, then you dont have + # if no libraries are specified for compilation, then you dont have # to configure/build anything, just copy over to the prefix directory. src = join_path(self.stage.source_path, 'boost') mkdirp(join_path(prefix, 'include')) dst = join_path(prefix, 'include', 'boost') install_tree(src, dst) return - + # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = './' @@ -207,4 +208,7 @@ class Boost(Package): # Boost.MPI if the threading options are not separated. for threadingOpt in threadingOpts: b2('install', 'threading=%s' % threadingOpt, *b2_options) - + + # The shared libraries are not installed correctly on Darwin; correct this + if (sys.platform == 'darwin') and ('+shared' in spec): + fix_darwin_install_name(prefix.lib) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 68b9f6fd30..9301135f9f 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -24,7 +24,7 @@ ############################################################################## from spack import * -import glob +import glob,sys class Metis(Package): """ @@ -90,3 +90,7 @@ class Metis(Package): fs = glob.glob(join_path(source_directory,'GKlib',"*.h")) for f in fs: install(f, GKlib_dist) + + # The shared library is not installed correctly on Darwin; correct this + if (sys.platform == 'darwin') and ('+shared' in spec): + fix_darwin_install_name(prefix.lib) diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index c3e6822cdf..d59f8e41fe 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -41,6 +41,11 @@ class NetlibScalapack(Package): make() make("install") + # The shared libraries are not installed correctly on Darwin; correct this + if (sys.platform == 'darwin') and ('+shared' in spec): + fix_darwin_install_name(prefix.lib) + + def setup_dependent_package(self, module, dependent_spec): spec = self.spec lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so' diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py index 06acb96736..4d5081ac9d 100644 --- a/var/spack/repos/builtin/packages/oce/package.py +++ b/var/spack/repos/builtin/packages/oce/package.py @@ -1,5 +1,5 @@ from spack import * -import platform +import platform, sys class Oce(Package): """ @@ -45,3 +45,7 @@ class Oce(Package): cmake('.', *options) make("install/strip") + + # The shared libraries are not installed correctly on Darwin; correct this + if (sys.platform == 'darwin'): + fix_darwin_install_name(prefix.lib) diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index f5b8b6de91..ff4370aa4b 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -24,7 +24,7 @@ ############################################################################## from spack import * - +import sys class Parmetis(Package): """ @@ -83,3 +83,7 @@ class Parmetis(Package): cmake(source_directory, *options) make() make("install") + + # The shared library is not installed correctly on Darwin; correct this + if (sys.platform == 'darwin') and ('+shared' in spec): + fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-70-g09d2 From 3bd550d6a2ceb279743aae626c6a3a614519d2f5 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 27 Mar 2016 18:27:06 -0400 Subject: GEOS Python extension did not compile with Python3. --- var/spack/repos/builtin/packages/geos/package.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/geos/package.py b/var/spack/repos/builtin/packages/geos/package.py index 4a2657e32f..030703f286 100644 --- a/var/spack/repos/builtin/packages/geos/package.py +++ b/var/spack/repos/builtin/packages/geos/package.py @@ -1,4 +1,5 @@ from spack import * +import os class Geos(Package): """GEOS (Geometry Engine - Open Source) is a C++ port of the Java @@ -10,6 +11,10 @@ class Geos(Package): homepage = "http://trac.osgeo.org/geos/" url = "http://download.osgeo.org/geos/geos-3.4.2.tar.bz2" + # Verison 3.5.0 supports Autotools and CMake + version('3.5.0', '136842690be7f504fba46b3c539438dd') + + # Versions through 3.4.2 have CMake, but only Autotools is supported version('3.4.2', 'fc5df2d926eb7e67f988a43a92683bae') version('3.4.1', '4c930dec44c45c49cd71f3e0931ded7e') version('3.4.0', 'e41318fc76b5dc764a69d43ac6b18488') @@ -21,11 +26,22 @@ class Geos(Package): version('3.3.4', '1bb9f14d57ef06ffa41cb1d67acb55a1') version('3.3.3', '8454e653d7ecca475153cc88fd1daa26') - extends('python') - depends_on('swig') +# # Python3 is not supported. +# variant('python', default=False, description='Enable Python support') + +# extends('python', when='+python') +# depends_on('python', when='+python') +# depends_on('swig', when='+python') def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--enable-python") + args = ["--prefix=%s" % prefix] +# if '+python' in spec: +# os.environ['PYTHON'] = join_path(spec['python'].prefix, 'bin', +# 'python' if spec['python'].version[:1][0] <= 2 else 'python3') +# os.environ['SWIG'] = join_path(spec['swig'].prefix, 'bin', 'swig') +# +# args.append("--enable-python") + + configure(*args) make() make("install") -- cgit v1.2.3-70-g09d2 From 9c894f59354bafd9cd45e874be599dc8535e426e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 10:19:25 +0200 Subject: new package: netcdf-cxx --- var/spack/repos/builtin/packages/netcdf-cxx/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/netcdf-cxx/package.py diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py new file mode 100644 index 0000000000..5334dfb853 --- /dev/null +++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py @@ -0,0 +1,15 @@ +from spack import * + +class NetcdfCxx(Package): + """C++ compatibility bindings for NetCDF""" + homepage = "http://www.unidata.ucar.edu/software/netcdf" + url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx-4.2.tar.gz" + + version('4.2', 'd32b20c00f144ae6565d9e98d9f6204c') + + depends_on('netcdf') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 97cdd7947894b3b631e2a209f0573ed839eb7b8a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 10:49:20 +0200 Subject: fix netcdf --- var/spack/repos/builtin/packages/dealii/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index baedd155ef..486aa6e4a4 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -19,7 +19,7 @@ class Dealii(Package): depends_on ("hdf5+mpi~cxx") #FIXME NetCDF declares dependency with ~cxx, why? depends_on ("metis") depends_on ("muparser") - depends_on ("netcdf-cxx4") + depends_on ("netcdf-cxx") #depends_on ("numdiff") #FIXME depends_on ("oce") depends_on ("p4est") @@ -55,10 +55,10 @@ class Dealii(Package): # since Netcdf is spread among two, need to do it by hand: '-DNETCDF_FOUND=true', '-DNETCDF_LIBRARIES=%s;%s' % - (join_path(spec['netcdf-cxx4'].prefix.lib,'libnetcdf_c++4.%s' % dsuf), + (join_path(spec['netcdf-cxx'].prefix.lib,'libnetcdf_c++.%s' % dsuf), join_path(spec['netcdf'].prefix.lib,'libnetcdf.%s' % dsuf)), '-DNETCDF_INCLUDE_DIRS=%s;%s' % - (spec['netcdf-cxx4'].prefix.include, + (spec['netcdf-cxx'].prefix.include, spec['netcdf'].prefix.include), '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, '-DP4EST_DIR=%s' % spec['p4est'].prefix, -- cgit v1.2.3-70-g09d2 From e00cab75bd6721ac49bb6199d77ad99df80556a9 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 12:12:55 +0200 Subject: more elaborated tests/direct solvers --- var/spack/repos/builtin/packages/dealii/package.py | 42 +++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 486aa6e4a4..9ac1572b95 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -77,7 +77,13 @@ class Dealii(Package): # 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') @@ -86,22 +92,56 @@ class Dealii(Package): # 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 PETSc ============') + 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('.') make('release') make('run',parallel=False) + print('=====================================') + print('========= Step-40 Trilinos ==========') + print('=====================================') # change Linear Algebra to Trilinos - filter_file(r'(#define USE_PETSC_LA.*)', (''), 'step-40.cc') + filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc') make('release') make('run',parallel=False) + 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') + filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)', (''), 'step-40.cc') + filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)', (''), 'step-40.cc') + filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', (''), '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') + filter_file(r'(preconditioner\);)', (''), 'step-40.cc') + + make('release') + make('run',paralle=False) + + print('=====================================') + print('====== Step-40 Trilinos MUMPS =======') + print('=====================================') + # switch to Mumps + filter_file(r'(Amesos_Superludist)', ('Amesos_Mumps'), 'step-40.cc') + make('release') + make('run',parallel=False) + + print('=====================================') + print('============ Step-36 ================') + print('=====================================') with working_dir('examples/step-36'): cmake('.') make('release') make('run',parallel=False) + print('=====================================') + print('============ Step-54 ================') + print('=====================================') with working_dir('examples/step-54'): cmake('.') make('release') -- cgit v1.2.3-70-g09d2 From f3dd889d4462d14c9f0233540bccbf6a9720bcf0 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 28 Mar 2016 03:51:05 -0700 Subject: Fix bug with lib64 RPATH setting in cc. --- lib/spack/env/cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index c6a09724e9..17740250d1 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -293,9 +293,9 @@ for dep in "${deps[@]}"; do if [[ -d $dep/lib64 ]]; then # libraries+=("$dep/lib64") if [[ $mode = ccld ]]; then - args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") + args=("-L$dep/lib64" "-Wl,-rpath,$dep/lib64" "${args[@]}") elif [[ $mode = ld ]]; then - args=("-L$dep/lib" "-rpath" "$dep/lib" "${args[@]}") + args=("-L$dep/lib64" "-rpath" "$dep/lib64" "${args[@]}") fi fi done -- cgit v1.2.3-70-g09d2 From d8579a5b80efd8b09e5332a922dee533f2a0a55e Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 28 Mar 2016 03:51:41 -0700 Subject: Simplify cc: Remove old logic and add better tests. - removed a lot of old logic that was only still needed for tests. - Added better unit tests for dependency RPATH, -L, and -I args - tests now check whether the compiler omits -I args in link mode. --- lib/spack/env/cc | 138 +++++---------------------------------------- lib/spack/spack/test/cc.py | 127 +++++++++++++++++++++++++++++++++++------ 2 files changed, 123 insertions(+), 142 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 17740250d1..4217159a25 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -114,7 +114,9 @@ case "$command" in ;; esac -# If any of the arguments below is present then the mode is vcheck. In vcheck mode nothing is added in terms of extra search paths or libraries +# If any of the arguments below is present then the mode is vcheck. In +# vcheck mode nothing is added in terms of extra search paths or +# libraries if [ -z "$mode" ]; then for arg in "$@"; do if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then @@ -125,7 +127,6 @@ if [ -z "$mode" ]; then fi # Finish setting up the mode. - if [ -z "$mode" ]; then mode=ccld for arg in "$@"; do @@ -162,127 +163,18 @@ fi input_command="$@" args=("$@") -# Dump parsed values for unit testing if asked for -if [[ -n $SPACK_TEST_COMMAND ]]; then - - # - # Now do real parsing of the command line args, trying hard to keep - # non-rpath linker arguments in the proper order w.r.t. other command line - # arguments. This is important for things like groups. - # - includes=() - libraries=() - libs=() - rpaths=() - other_args=() - - while [ -n "$1" ]; do - case "$1" in - -I*) - arg="${1#-I}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - includes+=("$arg") - ;; - -L*) - arg="${1#-L}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libraries+=("$arg") - ;; - -l*) - arg="${1#-l}" - if [ -z "$arg" ]; then shift; arg="$1"; fi - libs+=("$arg") - ;; - -Wl,*) - arg="${1#-Wl,}" - # TODO: Handle multiple -Wl, continuations of -Wl,-rpath - if [[ $arg == -rpath=* ]]; then - arg="${arg#-rpath=}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - elif [[ $arg == -rpath,* ]]; then - arg="${arg#-rpath,}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - elif [[ $arg == -rpath ]]; then - shift; arg="$1" - if [[ $arg != '-Wl,'* ]]; then - die "-Wl,-rpath was not followed by -Wl,*" - fi - arg="${arg#-Wl,}" - for rpath in ${arg//,/ }; do - rpaths+=("$rpath") - done - else - other_args+=("-Wl,$arg") - fi - ;; - -Xlinker) - shift; arg="$1"; - if [[ $arg = -rpath=* ]]; then - rpaths+=("${arg#-rpath=}") - elif [[ $arg = -rpath ]]; then - shift; arg="$1" - if [[ $arg != -Xlinker ]]; then - die "-Xlinker -rpath was not followed by -Xlinker " - fi - shift; arg="$1" - rpaths+=("$arg") - else - other_args+=("-Xlinker") - other_args+=("$arg") - fi - ;; - *) - other_args+=("$1") - ;; - esac - shift - done - - IFS=$'\n' - case "$SPACK_TEST_COMMAND" in - dump-includes) echo "${includes[*]}";; - dump-libraries) echo "${libraries[*]}";; - dump-libs) echo "${libs[*]}";; - dump-rpaths) echo "${rpaths[*]}";; - dump-other-args) echo "${other_args[*]}";; - dump-all) - echo "INCLUDES:" - echo "${includes[*]}" - echo - echo "LIBRARIES:" - echo "${libraries[*]}" - echo - echo "LIBS:" - echo "${libs[*]}" - echo - echo "RPATHS:" - echo "${rpaths[*]}" - echo - echo "ARGS:" - echo "${other_args[*]}" - ;; - *) - die "ERROR: Unknown test command" - ;; - esac - exit -fi - # Read spack dependencies from the path environment variable IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do + # Prepend include directories if [[ -d $dep/include ]]; then if [[ $mode = cpp || $mode = cc || $mode = as || $mode = ccld ]]; then args=("-I$dep/include" "${args[@]}") fi fi + # Prepend lib and RPATH directories if [[ -d $dep/lib ]]; then - # libraries+=("$dep/lib") if [[ $mode = ccld ]]; then args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") elif [[ $mode = ld ]]; then @@ -290,8 +182,8 @@ for dep in "${deps[@]}"; do fi fi + # Prepend lib64 and RPATH directories if [[ -d $dep/lib64 ]]; then - # libraries+=("$dep/lib64") if [[ $mode = ccld ]]; then args=("-L$dep/lib64" "-Wl,-rpath,$dep/lib64" "${args[@]}") elif [[ $mode = ld ]]; then @@ -302,18 +194,8 @@ done # Include all -L's and prefix/whatever dirs in rpath if [[ $mode = ccld ]]; then - # for dir in "${libraries[@]}"; do - # if [[ dir = $SPACK_INSTALL* ]]; then - # args=("-Wl,-rpath,$dir" "${args[@]}") - # fi - # done args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") elif [[ $mode = ld ]]; then - # for dir in "${libraries[@]}"; do - # if [[ dir = $SPACK_INSTALL* ]]; then - # args=("-rpath" "$dir" "${args[@]}") - # fi - # done args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi @@ -345,6 +227,14 @@ export PATH full_command=("$command" "${args[@]}") +# In test command mode, write out full command for Spack tests. +if [[ $SPACK_TEST_COMMAND = dump-args ]]; then + echo "${full_command[@]}" + exit +elif [[ -n $SPACK_TEST_COMMAND ]]; then + die "ERROR: Unknown test command" +fi + # # Write the input and output commands to debug logs if it's asked for. # diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index f3f6d4a22e..0b1aeb2a8f 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -28,6 +28,8 @@ arguments correctly. """ import os import unittest +import tempfile +import shutil from llnl.util.filesystem import * import spack @@ -55,13 +57,40 @@ class CompilerTest(unittest.TestCase): self.ld = Executable(join_path(spack.build_env_path, "ld")) self.cpp = Executable(join_path(spack.build_env_path, "cpp")) - os.environ['SPACK_CC'] = "/bin/mycc" - os.environ['SPACK_PREFIX'] = "/usr" + self.realcc = "/bin/mycc" + self.prefix = "/spack-test-prefix" + + os.environ['SPACK_CC'] = self.realcc + os.environ['SPACK_PREFIX'] = self.prefix os.environ['SPACK_ENV_PATH']="test" os.environ['SPACK_DEBUG_LOG_DIR'] = "." os.environ['SPACK_COMPILER_SPEC'] = "gcc@4.4.7" os.environ['SPACK_SHORT_SPEC'] = "foo@1.2" + # Make some fake dependencies + self.tmp_deps = tempfile.mkdtemp() + self.dep1 = join_path(self.tmp_deps, 'dep1') + self.dep2 = join_path(self.tmp_deps, 'dep2') + self.dep3 = join_path(self.tmp_deps, 'dep3') + self.dep4 = join_path(self.tmp_deps, 'dep4') + + mkdirp(join_path(self.dep1, 'include')) + mkdirp(join_path(self.dep1, 'lib')) + + mkdirp(join_path(self.dep2, 'lib64')) + + mkdirp(join_path(self.dep3, 'include')) + mkdirp(join_path(self.dep3, 'lib64')) + + mkdirp(join_path(self.dep4, 'include')) + + if 'SPACK_DEPENDENCIES' in os.environ: + del os.environ['SPACK_DEPENDENCIES'] + + + def tearDown(self): + shutil.rmtree(self.tmp_deps, True) + def check_cc(self, command, args, expected): os.environ['SPACK_TEST_COMMAND'] = command @@ -92,6 +121,10 @@ class CompilerTest(unittest.TestCase): self.check_cpp('dump-mode', [], "cpp") + def test_as_mode(self): + self.check_cc('dump-mode', ['-S'], "as") + + def test_ccld_mode(self): self.check_cc('dump-mode', [], "ccld") self.check_cc('dump-mode', ['foo.c', '-o', 'foo'], "ccld") @@ -104,27 +137,85 @@ class CompilerTest(unittest.TestCase): self.check_ld('dump-mode', ['foo.o', 'bar.o', 'baz.o', '-o', 'foo', '-Wl,-rpath,foo'], "ld") - def test_includes(self): - self.check_cc('dump-includes', test_command, - "\n".join(["/test/include", "/other/include"])) + def test_dep_rpath(self): + """Ensure RPATHs for root package are added.""" + self.check_cc('dump-args', test_command, + self.realcc + ' ' + + '-Wl,-rpath,' + self.prefix + '/lib ' + + '-Wl,-rpath,' + self.prefix + '/lib64 ' + + ' '.join(test_command)) + + + def test_dep_include(self): + """Ensure a single dependency include directory is added.""" + os.environ['SPACK_DEPENDENCIES'] = self.dep4 + self.check_cc('dump-args', test_command, + self.realcc + ' ' + + '-Wl,-rpath,' + self.prefix + '/lib ' + + '-Wl,-rpath,' + self.prefix + '/lib64 ' + + '-I' + self.dep4 + '/include ' + + ' '.join(test_command)) + + + def test_dep_lib(self): + """Ensure a single dependency RPATH is added.""" + os.environ['SPACK_DEPENDENCIES'] = self.dep2 + self.check_cc('dump-args', test_command, + self.realcc + ' ' + + '-Wl,-rpath,' + self.prefix + '/lib ' + + '-Wl,-rpath,' + self.prefix + '/lib64 ' + + '-L' + self.dep2 + '/lib64 ' + + '-Wl,-rpath,' + self.dep2 + '/lib64 ' + + ' '.join(test_command)) + + + def test_all_deps(self): + """Ensure includes and RPATHs for all deps are added. """ + os.environ['SPACK_DEPENDENCIES'] = ':'.join([ + self.dep1, self.dep2, self.dep3, self.dep4]) + + # This is probably more constrained than it needs to be; it + # checks order within prepended args and doesn't strictly have + # to. We could loosen that if it becomes necessary + self.check_cc('dump-args', test_command, + self.realcc + ' ' + + '-Wl,-rpath,' + self.prefix + '/lib ' + + '-Wl,-rpath,' + self.prefix + '/lib64 ' + + + '-I' + self.dep4 + '/include ' + + + '-L' + self.dep3 + '/lib64 ' + + '-Wl,-rpath,' + self.dep3 + '/lib64 ' + + '-I' + self.dep3 + '/include ' + + + '-L' + self.dep2 + '/lib64 ' + + '-Wl,-rpath,' + self.dep2 + '/lib64 ' + + + '-L' + self.dep1 + '/lib ' + + '-Wl,-rpath,' + self.dep1 + '/lib ' + + '-I' + self.dep1 + '/include ' + + + ' '.join(test_command)) - def test_libraries(self): - self.check_cc('dump-libraries', test_command, - "\n".join(["/test/lib", "/other/lib"])) + def test_ld_deps(self): + """Ensure no (extra) -I args or -Wl, are passed in ld mode.""" + os.environ['SPACK_DEPENDENCIES'] = ':'.join([ + self.dep1, self.dep2, self.dep3, self.dep4]) + self.check_ld('dump-args', test_command, + 'ld ' + + '-rpath ' + self.prefix + '/lib ' + + '-rpath ' + self.prefix + '/lib64 ' + - def test_libs(self): - self.check_cc('dump-libs', test_command, - "\n".join(["lib1", "lib2", "lib3", "lib4"])) + '-L' + self.dep3 + '/lib64 ' + + '-rpath ' + self.dep3 + '/lib64 ' + + '-L' + self.dep2 + '/lib64 ' + + '-rpath ' + self.dep2 + '/lib64 ' + - def test_rpaths(self): - self.check_cc('dump-rpaths', test_command, - "\n".join(["/first/rpath", "/second/rpath", "/third/rpath", "/fourth/rpath"])) + '-L' + self.dep1 + '/lib ' + + '-rpath ' + self.dep1 + '/lib ' + + ' '.join(test_command)) - def test_other_args(self): - self.check_cc('dump-other-args', test_command, - "\n".join(["arg1", "-Wl,--start-group", "arg2", "arg3", "arg4", - "-Wl,--end-group", "arg5", "arg6"])) -- cgit v1.2.3-70-g09d2 From 0da545ecac1c57a04abf814c9fed4f9929726ff5 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 13:16:08 +0200 Subject: tell amesos that we use mumps 5 --- var/spack/repos/builtin/packages/trilinos/package.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 6608f64ea7..90b7bff149 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -6,6 +6,9 @@ import os, sys, glob # https://github.com/koecher/candi/blob/master/deal.II-toolchain/packages/trilinos.package # https://gitlab.com/configurations/cluster-config/blob/master/trilinos.sh # https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb +# and some relevant documentation/examples: +# https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html +# https://github.com/trilinos/Trilinos/issues/175 class Trilinos(Package): """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. @@ -46,7 +49,7 @@ class Trilinos(Package): depends_on('mpi') depends_on('netcdf+mpi') depends_on('parmetis',when='+metis') - depends_on('mumps+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) + depends_on('mumps@5.0:+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) depends_on('scalapack',when='+mumps') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre',when='+hypre') @@ -67,6 +70,7 @@ class Trilinos(Package): def install(self, spec, prefix): self.variants_check() + cxx_flags = [] options = [] options.extend(std_cmake_args) @@ -91,7 +95,6 @@ class Trilinos(Package): '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', - '-DTrilinos_CXX11_FLAGS=-std=c++11', '-DTPL_ENABLE_Netcdf:BOOL=ON', '-DTPL_ENABLE_HYPRE:BOOL=ON', '-DTPL_ENABLE_HDF5:BOOL=ON' @@ -154,6 +157,10 @@ class Trilinos(Package): '-DTPL_ENABLE_SCALAPACK:BOOL=ON', '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 ]) + # see https://github.com/trilinos/Trilinos/blob/master/packages/amesos/README-MUMPS + cxx_flags.extend([ + '-DMUMPS_5_0' + ]) else: options.extend([ '-DTPL_ENABLE_MUMPS:BOOL=OFF', @@ -194,6 +201,10 @@ class Trilinos(Package): '-DTrilinos_ENABLE_PyTrilinos:BOOL=OFF' ]) + # collect CXX flags: + options.extend([ + '-DCMAKE_CXX_FLAGS:STRING=%s' % (' '.join(cxx_flags)), + ]) # disable due to compiler / config errors: options.extend([ -- cgit v1.2.3-70-g09d2 From 5eefca43e75d2df1c2f859d199f7bb37e7142993 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 14:35:01 +0200 Subject: petsc: extend variants by mumps, complex and debug --- var/spack/repos/builtin/packages/petsc/package.py | 33 ++++++++++++++--------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 3dd117eed1..dd3d2aa162 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -17,14 +17,17 @@ class Petsc(Package): version('3.5.1', 'a557e029711ebf425544e117ffa44d8f') version('3.4.4', '7edbc68aa6d8d6a3295dd5f6c2f6979d') - variant('shared', default=True, description='Enables the build of shared libraries') - variant('mpi', default=True, description='Activates MPI support') - variant('double', default=True, description='Switches between single and double precision') - - variant('metis', default=True, description='Activates support for metis and parmetis') - variant('hdf5', default=True, description='Activates support for HDF5 (only parallel)') - variant('boost', default=True, description='Activates support for Boost') - variant('hypre', default=True, description='Activates support for Hypre') + variant('shared', default=True, description='Enables the build of shared libraries') + variant('mpi', default=True, description='Activates MPI support') + variant('double', default=True, description='Switches between single and double precision') + variant('complex', default=False, description='Build with complex numbers') + variant('debug', default=False, description='Compile in debug mode') + + variant('metis', default=True, description='Activates support for metis and parmetis') + variant('hdf5', default=True, description='Activates support for HDF5 (only parallel)') + variant('boost', default=True, description='Activates support for Boost') + variant('hypre', default=True, description='Activates support for Hypre (only parallel)') + variant('mumps', default=True, description='Activates support for MUMPS (only parallel)') # Virtual dependencies depends_on('blas') @@ -40,7 +43,10 @@ class Petsc(Package): depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('parmetis', when='+metis+mpi') - depends_on('hypre', when='+hypre+mpi') + depends_on('hypre', when='+hypre+mpi~complex') # Hypre does not support complex numbers + + depends_on('mumps+mpi', when='+mumps+mpi') + depends_on('scalapack', when='+mumps+mpi') def mpi_dependent_options(self): if '~mpi' in self.spec: @@ -55,7 +61,7 @@ class Petsc(Package): # If mpi is disabled (~mpi), it's an error to have any of these enabled. # This generates a list of any such errors. errors = [error_message_fmt.format(library=x) - for x in ('hdf5', 'hypre', 'parmetis') + for x in ('hdf5', 'hypre', 'parmetis','mumps') if ('+'+x) in self.spec] if errors: errors = ['incompatible variants given'] + errors @@ -77,16 +83,17 @@ class Petsc(Package): return compiler_opts def install(self, spec, prefix): - options = ['--with-debugging=0', - '--with-ssl=0'] + options = ['--with-ssl=0'] options.extend(self.mpi_dependent_options()) options.extend([ '--with-precision=%s' % ('double' if '+double' in spec else 'single'), + '--with-scalar-type=%s' % ('complex' if '+complex' in spec else 'real'), '--with-shared-libraries=%s' % ('1' if '+shared' in spec else '0'), + '--with-debugging=%s' % ('1' if '+debug' in spec else '0'), '--with-blas-lapack-dir=%s' % spec['lapack'].prefix ]) # Activates library support if needed - for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis'): + for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis','mumps','scalapack'): options.append( '--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0')) ) -- cgit v1.2.3-70-g09d2 From dd60cc326c12bfa8434b68afec72f4b68c18a94c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 17:52:22 +0200 Subject: adopt modifed superlu and hypre --- var/spack/repos/builtin/packages/trilinos/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 90b7bff149..b2dc8df0ea 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -52,7 +52,7 @@ class Trilinos(Package): depends_on('mumps@5.0:+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) depends_on('scalapack',when='+mumps') depends_on('superlu-dist',when='+superlu-dist') - depends_on('hypre',when='+hypre') + depends_on('hypre~internal-superlu',when='+hypre') depends_on('hdf5+mpi',when='+hdf5') depends_on('python',when='+python') # Needs py-numpy activated @@ -179,7 +179,7 @@ class Trilinos(Package): options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, - '-DSuperLUDist_INCLUDE_DIRS=%s/superlu_dist' % spec['superlu-dist'].prefix.include # superlu_dist and superlu have the same header names :-( In order to avoid conflicts, try to keep "dist" version headers in a subfolder + '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include ]) if spec.satisfies('^superlu-dist@4.0:'): options.extend([ -- cgit v1.2.3-70-g09d2 From 207215980b05e4916e05ded8b05044b3edbe92c0 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 17:54:27 +0200 Subject: make hypre and hdf5 be ON/OFF --- var/spack/repos/builtin/packages/trilinos/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index b2dc8df0ea..eb3bd1e0ee 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -96,8 +96,8 @@ class Trilinos(Package): '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTPL_ENABLE_Netcdf:BOOL=ON', - '-DTPL_ENABLE_HYPRE:BOOL=ON', - '-DTPL_ENABLE_HDF5:BOOL=ON' + '-DTPL_ENABLE_HYPRE:BOOL=%s' % ('ON' if '+hypre' in spec else 'OFF'),, + '-DTPL_ENABLE_HDF5:BOOL=%s' % ('ON' if '+hdf5' in spec else 'OFF'), ]) # Fortran lib -- cgit v1.2.3-70-g09d2 From 4e87cf9d7492133d30675a64703b91ec6992ca00 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 18:00:34 +0200 Subject: fix extra comma --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index eb3bd1e0ee..71c0be61c3 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -96,7 +96,7 @@ class Trilinos(Package): '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTPL_ENABLE_Netcdf:BOOL=ON', - '-DTPL_ENABLE_HYPRE:BOOL=%s' % ('ON' if '+hypre' in spec else 'OFF'),, + '-DTPL_ENABLE_HYPRE:BOOL=%s' % ('ON' if '+hypre' in spec else 'OFF'), '-DTPL_ENABLE_HDF5:BOOL=%s' % ('ON' if '+hdf5' in spec else 'OFF'), ]) -- cgit v1.2.3-70-g09d2 From 09e77812b67d92094bea8dae54617e3e02ebaa61 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 28 Mar 2016 17:49:20 +0200 Subject: fix installation of superlu_dist headers and add it as a dependency to petsc; add a variant to hypre to disable internal superlu --- var/spack/repos/builtin/packages/hypre/package.py | 5 +++++ var/spack/repos/builtin/packages/petsc/package.py | 21 ++++++++++++++++++--- .../repos/builtin/packages/superlu-dist/package.py | 11 ++++++----- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 8d93d48d1f..0e99553293 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -14,6 +14,8 @@ class Hypre(Package): # hypre does not know how to build shared libraries on Darwin variant('shared', default=sys.platform!='darwin', description="Build shared library version (disables static library)") + # SuperluDist have conflicting headers with those in Hypre + variant('internal-superlu', default=True, description="Use internal Superlu routines") depends_on("mpi") depends_on("blas") @@ -38,6 +40,9 @@ class Hypre(Package): if '+shared' in self.spec: configure_args.append("--enable-shared") + if '~internal-superlu' in self.spec: + configure_args.append("--without-superlu") + # Hypre's source is staged under ./src so we'll have to manually # cd into it. with working_dir("src"): diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index dd3d2aa162..e9b7c8a732 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -28,6 +28,7 @@ class Petsc(Package): variant('boost', default=True, description='Activates support for Boost') variant('hypre', default=True, description='Activates support for Hypre (only parallel)') variant('mumps', default=True, description='Activates support for MUMPS (only parallel)') + variant('superlu-dist', default=True, description='Activates support for SuperluDist (only parallel)') # Virtual dependencies depends_on('blas') @@ -43,8 +44,11 @@ class Petsc(Package): depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('parmetis', when='+metis+mpi') - depends_on('hypre', when='+hypre+mpi~complex') # Hypre does not support complex numbers - + # Hypre does not support complex numbers. + # Also PETSc prefer to build it without internal superlu, likely due to conflict in headers + # see https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py + depends_on('hypre~internal-superlu', when='+hypre+mpi~complex') + depends_on('superlu-dist', when='+superlu-dist+mpi') depends_on('mumps+mpi', when='+mumps+mpi') depends_on('scalapack', when='+mumps+mpi') @@ -61,7 +65,7 @@ class Petsc(Package): # If mpi is disabled (~mpi), it's an error to have any of these enabled. # This generates a list of any such errors. errors = [error_message_fmt.format(library=x) - for x in ('hdf5', 'hypre', 'parmetis','mumps') + for x in ('hdf5', 'hypre', 'parmetis','mumps','superlu-dist') if ('+'+x) in self.spec] if errors: errors = ['incompatible variants given'] + errors @@ -101,6 +105,17 @@ class Petsc(Package): options.append( '--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix) ) + # PETSc does not pick up SuperluDist from the dir as they look for superlu_dist_4.1.a + if 'superlu-dist' in spec: + options.extend([ + '--with-superlu_dist-include=%s' % spec['superlu-dist'].prefix.include, + '--with-superlu_dist-lib=%s' % join_path(spec['superlu-dist'].prefix.lib, 'libsuperlu_dist.a'), + '--with-superlu_dist=1' + ]) + else: + options.append( + '--with-superlu_dist=0' + ) configure('--prefix=%s' % prefix, *options) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 9a94de8ba5..ddcb7f9225 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -1,4 +1,5 @@ from spack import * +import glob class SuperluDist(Package): """A general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations on high performance machines.""" @@ -52,13 +53,13 @@ class SuperluDist(Package): # system "make" # need to install by hand - headers_location = join_path(self.prefix.include,'superlu_dist') + headers_location = self.prefix.include mkdirp(headers_location) mkdirp(prefix.lib) - # FIXME: fetch all headers in the folder automatically - for header in ['Cnames.h','cublas_utils.h','dcomplex.h','html_mainpage.h','machines.h','old_colamd.h','psymbfact.h','superlu_ddefs.h','superlu_defs.h','superlu_enum_consts.h','superlu_zdefs.h','supermatrix.h','util_dist.h']: - superludist_header = join_path(self.stage.source_path, 'SRC/',header) - install(superludist_header, headers_location) + + headers = glob.glob(join_path(self.stage.source_path, 'SRC','*.h')) + for h in headers: + install(h,headers_location) superludist_lib = join_path(self.stage.source_path, 'lib/libsuperlu_dist.a') install(superludist_lib,self.prefix.lib) -- cgit v1.2.3-70-g09d2 From 1141f1195572a81cb98e5fa439db6860fd326d43 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 29 Mar 2016 00:28:02 +0200 Subject: uninstall : added user confirmation --- lib/spack/spack/cmd/uninstall.py | 47 +++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 8da0fe1c4a..7183817908 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -24,15 +24,14 @@ ############################################################################## from __future__ import print_function -import argparse import sys +import argparse import llnl.util.tty as tty import spack import spack.cmd import spack.repository from spack.cmd.find import display_specs -from spack.package import PackageStillNeededError description = "Remove an installed package" @@ -41,6 +40,16 @@ error_message = """You can either: b) use spack uninstall -a to uninstall ALL matching specs. """ +def ask_for_confirmation(message): + while True: + tty.msg(message + '[y/n]') + choice = raw_input().lower() + if choice == 'y': + break + elif choice == 'n': + sys.exit(1) + tty.warning('Please reply either "y" or "n"') + def setup_parser(subparser): subparser.add_argument( @@ -53,7 +62,11 @@ def setup_parser(subparser): "libelf are uninstalled. This is both useful and dangerous, like rm -r.") subparser.add_argument( '-r', '--recursive', action='store_true', dest='recursive', - help='Uninstall all the packages that depends on the ones for which we required explicit removal.' + help='Also uninstall any packages that depend on the ones given via command line.' + ) + subparser.add_argument( + '-y', '--yes-to-all', action='store_true', dest='yes_to_all', + help='Assume "yes" is the answer to every confirmation asked to the user.' ) subparser.add_argument('packages', nargs=argparse.REMAINDER, help="specs of packages to uninstall") @@ -96,6 +109,15 @@ def concretize_specs(specs, allow_multiple_matches=False, force=False): def installed_dependents(specs): + """ + Returns a dictionary that maps a spec with a list of its installed dependents + + Args: + specs: list of specs to be checked for dependents + + Returns: + dictionary of installed dependents + """ dependents = {} for item in specs: lst = [x for x in item.package.installed_dependents if x not in specs] @@ -105,7 +127,13 @@ def installed_dependents(specs): def do_uninstall(specs, force): - specs = list(set(specs)) # Make specs unique + """ + Uninstalls all the specs in a list. + + Args: + specs: list of specs to be uninstalled + force: force uninstallation (boolean) + """ packages = [] for item in specs: try: @@ -136,7 +164,7 @@ def uninstall(parser, args): uninstall_list = concretize_specs(specs, args.all, args.force) # takes care of '-a' is given in the cli dependent_list = installed_dependents(uninstall_list) # takes care of '-r' - # There are dependents but recursive uninstall wasn't a requirement + # Process dependent_list and update uninstall_list has_error = False if dependent_list and not args.recursive and not args.force: for spec, lst in dependent_list.items(): @@ -149,8 +177,17 @@ def uninstall(parser, args): elif args.recursive: for key, lst in dependent_list.items(): uninstall_list.extend(lst) + uninstall_list = list(set(uninstall_list)) if has_error: tty.die('You can use spack uninstall -f to force this action') + + if not args.yes_to_all: + tty.msg("The following packages will be uninstalled : ") + print('') + display_specs(uninstall_list, long=True) + print('') + ask_for_confirmation('Do you want to proceed ? ') + # Uninstall everything on the list do_uninstall(uninstall_list, args.force) -- cgit v1.2.3-70-g09d2 From a14527ec0619151d6defc909a46aefd2a9378cb7 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 28 Mar 2016 15:34:25 -0700 Subject: Add command to compiler input log. --- lib/spack/env/cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 4217159a25..68cd8514f4 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -241,7 +241,7 @@ fi if [[ $SPACK_DEBUG = TRUE ]]; then input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.in.log" output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.out.log" - echo "$input_command" >> $input_log + echo "$command $input_command" >> $input_log echo "$mode ${full_command[@]}" >> $output_log fi -- cgit v1.2.3-70-g09d2 From f9bcce6a683b1d948190b9927254e3ee29d3606c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 29 Mar 2016 09:19:24 +0200 Subject: turn off python by default --- var/spack/repos/builtin/packages/trilinos/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 71c0be61c3..0ab4addd52 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -31,7 +31,8 @@ class Trilinos(Package): variant('hypre', default=True, description='Compile with Hypre preconditioner') variant('hdf5', default=True, description='Compile with HDF5') variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') - variant('python', default=True, description='Build python wrappers') + # not everyone has py-numpy activated, keep it disabled by default to avoid configure errors + variant('python', default=False, description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds a debug version of the libraries') @@ -55,7 +56,7 @@ class Trilinos(Package): depends_on('hypre~internal-superlu',when='+hypre') depends_on('hdf5+mpi',when='+hdf5') - depends_on('python',when='+python') # Needs py-numpy activated + depends_on('python',when='+python') patch('umfpack_from_suitesparse.patch') -- cgit v1.2.3-70-g09d2 From 7753d823cbe1d1983957fb948bf095d624d76b7c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 29 Mar 2016 09:27:55 +0200 Subject: add a comment on static mumps --- var/spack/repos/builtin/packages/trilinos/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 0ab4addd52..6223848c68 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -7,7 +7,6 @@ import os, sys, glob # https://gitlab.com/configurations/cluster-config/blob/master/trilinos.sh # https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb # and some relevant documentation/examples: -# https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html # https://github.com/trilinos/Trilinos/issues/175 class Trilinos(Package): """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented @@ -50,7 +49,14 @@ class Trilinos(Package): depends_on('mpi') depends_on('netcdf+mpi') depends_on('parmetis',when='+metis') - depends_on('mumps@5.0:+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o) + # Trilinos' Tribits config system is limited which makes it + # very tricky to link Amesos with static MUMPS, see + # https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html + # One could work it out by getting linking flags from mpif90 --showme:link (or alike) + # and adding results to -DTrilinos_EXTRA_LINK_FLAGS + # together with Blas and Lapack and ScaLAPACK and Blacs and -lgfortran and + # it may work at the end. But let's avoid all this by simply using shared libs + depends_on('mumps@5.0:+mpi+shared',when='+mumps') depends_on('scalapack',when='+mumps') depends_on('superlu-dist',when='+superlu-dist') depends_on('hypre~internal-superlu',when='+hypre') -- cgit v1.2.3-70-g09d2 From 63c3feb79e7e4022e5565deb9f2749fa9732e7d2 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 29 Mar 2016 09:41:57 +0200 Subject: minor fixes to hypre and muparser on Linux --- var/spack/repos/builtin/packages/hypre/package.py | 3 +++ var/spack/repos/builtin/packages/muparser/package.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 0e99553293..4b915daa68 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -42,6 +42,9 @@ class Hypre(Package): if '~internal-superlu' in self.spec: configure_args.append("--without-superlu") + # MLI and FEI do not build without superlu on Linux + configure_args.append("--without-mli") + configure_args.append("--without-fei") # Hypre's source is staged under ./src so we'll have to manually # cd into it. diff --git a/var/spack/repos/builtin/packages/muparser/package.py b/var/spack/repos/builtin/packages/muparser/package.py index a1a9ff90e5..19ca8ce287 100644 --- a/var/spack/repos/builtin/packages/muparser/package.py +++ b/var/spack/repos/builtin/packages/muparser/package.py @@ -14,5 +14,5 @@ class Muparser(Package): configure(*options) - make() + make(parallel=False) make("install") -- cgit v1.2.3-70-g09d2 From f80e839ff48809a5ba8b7343d2378133a3fbce82 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 29 Mar 2016 02:58:05 -0700 Subject: Handle Darwin's ld -r option properly - ld -r doesn't work with RPATH on OS X. - for GNU ld, the -r option only means 'relocatable', and doesn't affect RPATH. - This adds special handling to omit RPATHs for ld -r on OS X --- lib/spack/env/cc | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 68cd8514f4..2eb6f46afe 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -85,6 +85,10 @@ done # ccld compile & link # vcheck version check # +# Depending on the mode, we may or may not add extra rpaths. +# This variable controls whether they are added. +add_rpaths=true + command=$(basename "$0") case "$command" in cc|c89|c99|gcc|clang|icc|pgcc|xlc) @@ -108,6 +112,17 @@ case "$command" in ;; ld) mode=ld + + # Darwin's linker has a -r argument that merges object files + # together. It doesn't work with -rpath. + if [[ $OSTYPE = darwin* ]]; then + for arg in "$@"; do + if [ "$arg" = -r ]; then + add_rpaths=false + break + fi + done + fi ;; *) die "Unkown compiler: $command" @@ -176,27 +191,31 @@ for dep in "${deps[@]}"; do # Prepend lib and RPATH directories if [[ -d $dep/lib ]]; then if [[ $mode = ccld ]]; then - args=("-L$dep/lib" "-Wl,-rpath,$dep/lib" "${args[@]}") + $add_rpaths && args=("-Wl,-rpath,$dep/lib" "${args[@]}") + args=("-L$dep/lib" "${args[@]}") elif [[ $mode = ld ]]; then - args=("-L$dep/lib" "-rpath" "$dep/lib" "${args[@]}") + $add_rpaths && args=("-rpath" "$dep/lib" "${args[@]}") + args=("-L$dep/lib" "${args[@]}") fi fi # Prepend lib64 and RPATH directories if [[ -d $dep/lib64 ]]; then if [[ $mode = ccld ]]; then - args=("-L$dep/lib64" "-Wl,-rpath,$dep/lib64" "${args[@]}") + $add_rpaths && args=("-Wl,-rpath,$dep/lib64" "${args[@]}") + args=("-L$dep/lib64" "${args[@]}") elif [[ $mode = ld ]]; then - args=("-L$dep/lib64" "-rpath" "$dep/lib64" "${args[@]}") + $add_rpaths && args=("-rpath" "$dep/lib64" "${args[@]}") + args=("-L$dep/lib64" "${args[@]}") fi fi done # Include all -L's and prefix/whatever dirs in rpath if [[ $mode = ccld ]]; then - args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") + $add_rpaths && args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") elif [[ $mode = ld ]]; then - args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") + $add_rpaths && args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi # @@ -241,8 +260,8 @@ fi if [[ $SPACK_DEBUG = TRUE ]]; then input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.in.log" output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.out.log" - echo "$command $input_command" >> $input_log - echo "$mode ${full_command[@]}" >> $output_log + echo "[$mode] $command $input_command" >> $input_log + echo "[$mode] ${full_command[@]}" >> $output_log fi exec "${full_command[@]}" -- cgit v1.2.3-70-g09d2 From ccc1b23bea57a9c8a31ab1f4e9b739b54440466b Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Mon, 28 Mar 2016 16:28:29 -0500 Subject: this allows gcc4.9.3 to build on OSX10 --- .../builtin/packages/gcc/darwin/gcc-4.9.patch1 | 42 ++++++++++++++++++++++ .../builtin/packages/gcc/darwin/gcc-4.9.patch2 | 28 +++++++++++++++ var/spack/repos/builtin/packages/gcc/package.py | 12 ++++++- 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 create mode 100644 var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 diff --git a/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 new file mode 100644 index 0000000000..444e292786 --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch1 @@ -0,0 +1,42 @@ +diff --git a/gcc/configure b/gcc/configure +index 9523773..52b0bf7 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -24884,7 +24884,7 @@ if test "${gcc_cv_as_ix86_filds+set}" = set; then : + else + gcc_cv_as_ix86_filds=no + if test x$gcc_cv_as != x; then +- $as_echo 'filds mem; fists mem' > conftest.s ++ $as_echo 'filds (%ebp); fists (%ebp)' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 +@@ -24915,7 +24915,7 @@ if test "${gcc_cv_as_ix86_fildq+set}" = set; then : + else + gcc_cv_as_ix86_fildq=no + if test x$gcc_cv_as != x; then +- $as_echo 'fildq mem; fistpq mem' > conftest.s ++ $as_echo 'fildq (%ebp); fistpq (%ebp)' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 68b0ee8..bd53978 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -3869,13 +3869,13 @@ foo: nop + + gcc_GAS_CHECK_FEATURE([filds and fists mnemonics], + gcc_cv_as_ix86_filds,,, +- [filds mem; fists mem],, ++ [filds (%ebp); fists (%ebp)],, + [AC_DEFINE(HAVE_AS_IX86_FILDS, 1, + [Define if your assembler uses filds and fists mnemonics.])]) + + gcc_GAS_CHECK_FEATURE([fildq and fistpq mnemonics], + gcc_cv_as_ix86_fildq,,, +- [fildq mem; fistpq mem],, ++ [fildq (%ebp); fistpq (%ebp)],, + [AC_DEFINE(HAVE_AS_IX86_FILDQ, 1, + [Define if your assembler uses fildq and fistq mnemonics.])]) + diff --git a/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 new file mode 100644 index 0000000000..b065997f45 --- /dev/null +++ b/var/spack/repos/builtin/packages/gcc/darwin/gcc-4.9.patch2 @@ -0,0 +1,28 @@ +From 82f81877458ea372176eabb5de36329431dce99b Mon Sep 17 00:00:00 2001 +From: Iain Sandoe +Date: Sat, 21 Dec 2013 00:30:18 +0000 +Subject: [PATCH] don't try to mark local symbols as no-dead-strip + +--- + gcc/config/darwin.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c +index 40804b8..0080299 100644 +--- a/gcc/config/darwin.c ++++ b/gcc/config/darwin.c +@@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) + void + darwin_mark_decl_preserved (const char *name) + { ++ /* Actually we shouldn't mark any local symbol this way, but for now ++ this only happens with ObjC meta-data. */ ++ if (darwin_label_is_anonymous_local_objc_name (name)) ++ return; ++ + fprintf (asm_out_file, "\t.no_dead_strip "); + assemble_name (asm_out_file, name); + fputc ('\n', asm_out_file); +-- +2.2.1 + diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 232d0020df..6043b62279 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -27,6 +27,7 @@ from spack import * from contextlib import closing from glob import glob import sys +import os class Gcc(Package): """The GNU Compiler Collection includes front ends for C, C++, @@ -63,6 +64,9 @@ class Gcc(Package): # TODO: integrate these libraries. #depends_on("ppl") #depends_on("cloog") + if sys.platform == 'darwin': + patch('darwin/gcc-4.9.patch1', when='@4.9.3') + patch('darwin/gcc-4.9.patch2', when='@4.9.3') def install(self, spec, prefix): # libjava/configure needs a minor fix to install into spack paths. @@ -70,6 +74,7 @@ class Gcc(Package): string=True) enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) + if spec.satisfies("@4.7.1:") and sys.platform != 'darwin': enabled_languages.add('go') @@ -101,12 +106,17 @@ class Gcc(Package): isl_options = ["--with-isl=%s" % spec['isl'].prefix] options.extend(isl_options) + if sys.platform == 'darwin' : + darwin_options = [ "--with-build-config=bootstrap-debug" ] + options.extend(darwin_options) + build_dir = join_path(self.stage.path, 'spack-build') configure = Executable( join_path(self.stage.source_path, 'configure') ) with working_dir(build_dir, create=True): # Rest of install is straightforward. configure(*options) - make() + if sys.platform == 'darwin' : make("bootstrap") + else: make() make("install") self.write_rpath_specs() -- cgit v1.2.3-70-g09d2 From dfc5cf288c1017ef62390489cb534848aef5a9a6 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 29 Mar 2016 04:35:41 -0700 Subject: Fix bug in restage - Restage previously only removed the source directory from the stage. - Now removes any other directories in stage as well. --- lib/spack/spack/fetch_strategy.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 0d0a7db8a9..4ea87bea7e 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -289,8 +289,14 @@ class URLFetchStrategy(FetchStrategy): if not self.archive_file: raise NoArchiveFileError("Tried to reset URLFetchStrategy before fetching", "Failed on reset() for URL %s" % self.url) - if self.stage.source_path: - shutil.rmtree(self.stage.source_path, ignore_errors=True) + + # Remove everythigng but the archive from the stage + for filename in os.listdir(self.stage.path): + abspath = os.path.join(self.stage.path, filename) + if abspath != self.archive_file: + shutil.rmtree(abspath, ignore_errors=True) + + # Expand the archive again self.expand() def __repr__(self): -- cgit v1.2.3-70-g09d2 From 653d7c52574b7a6e3795fb3beeeee553bd76b293 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 29 Mar 2016 17:28:46 +0200 Subject: uninstall : minor fixes --- lib/spack/spack/cmd/uninstall.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 7183817908..72ad132112 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -40,6 +40,7 @@ error_message = """You can either: b) use spack uninstall -a to uninstall ALL matching specs. """ + def ask_for_confirmation(message): while True: tty.msg(message + '[y/n]') @@ -122,6 +123,7 @@ def installed_dependents(specs): for item in specs: lst = [x for x in item.package.installed_dependents if x not in specs] if lst: + lst = list(set(lst)) dependents[item] = lst return dependents -- cgit v1.2.3-70-g09d2 From ad402ff85bc4150aa49fb394929b062b40b27604 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 21 Mar 2016 22:36:31 +0100 Subject: astyle@2.04: add new package --- var/spack/repos/builtin/packages/astyle/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/astyle/package.py diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py new file mode 100644 index 0000000000..7260fd74a1 --- /dev/null +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -0,0 +1,17 @@ +from spack import * +import os + +class Astyle(Package): + """A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, Objective-C, C#, and Java Source Code.""" + homepage = "http://astyle.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz" + + version('2.04', '30b1193a758b0909d06e7ee8dd9627f6') + + def install(self, spec, prefix): + + with working_dir('src'): + make('-f', + join_path(self.stage.source_path,'build','clang','Makefile'), + parallel=False) + install(join_path(self.stage.source_path, 'src','bin','astyle'), self.prefix.bin) -- cgit v1.2.3-70-g09d2 From d96ea5ba0075c63e8cd042337a1d99225b92b2d5 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Tue, 29 Mar 2016 12:20:11 -0500 Subject: add modules package and have setup script find it if built --- share/spack/setup-env.sh | 10 +++++++++ .../repos/builtin/packages/modules/package.py | 25 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 var/spack/repos/builtin/packages/modules/package.py diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 764af68400..529517ff83 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -176,3 +176,13 @@ _spack_pathadd PATH "${_sp_prefix%/}/bin" _sp_sys_type=$(spack-python -c 'print(spack.architecture.sys_type())') _spack_pathadd DK_NODE "${_sp_share_dir%/}/dotkit/$_sp_sys_type" _spack_pathadd MODULEPATH "${_sp_share_dir%/}/modules/$_sp_sys_type" + +# +# Use spack built modules package if available +# for system that does not have it +# + +_modules_install_path=$(command spack location -i modules) +if [ -n "$_modules_install_path" ] ; then + . $_modules_install_path/Modules/init/sh +fi diff --git a/var/spack/repos/builtin/packages/modules/package.py b/var/spack/repos/builtin/packages/modules/package.py new file mode 100644 index 0000000000..b014ee460c --- /dev/null +++ b/var/spack/repos/builtin/packages/modules/package.py @@ -0,0 +1,25 @@ +from spack import * + +class Modules(Package): + """ The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles. """ + + homepage = "http://modules.sf.net" + url = "http://downloads.sourceforge.net/project/modules/Modules/modules-3.2.10/modules-3.2.10.tar.gz" + + version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb') + + depends_on("tcl") + + def install(self, spec, prefix): + + options = ['--prefix=%s' % prefix, + '--disable-debug', + '--disable-dependency-tracking', + '--disable-silent-rules', + '--disable-versioning', + '--datarootdir=%s' % prefix.share, + 'CPPFLAGS=-DUSE_INTERP_ERRORLINE'] + + configure(*options) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 7e9baf9e2533eb040aa142bd3bf6ffbd142516ac Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 29 Mar 2016 11:23:36 -0700 Subject: Made architecture test robust for more architectures --- lib/spack/spack/test/architecture.py | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 75a67bf02f..2274a9901d 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -13,32 +13,26 @@ from spack.platforms.bgq import Bgq from spack.platforms.darwin import Darwin class ArchitectureTest(unittest.TestCase): - - def test_to_dict_function_with_architecture(self): + + def test_dict_functions_for_architecture(self): arch = Arch() arch.platform_os = arch.platform.operating_system('default_os') arch.target = arch.platform.target('default') d = arch.to_dict() - self.assertEqual(d, {'platform' : 'crayxc', - 'platform_os' : {'name': 'CNL', - 'compiler_strategy' : 'MODULES', - 'version':'10'}, - 'target' : {'name': 'haswell', - 'module_name': 'craype-haswell'}}) - - def test_from_dict_function_with_architecture(self): - d = {'platform':'crayxc', - 'platform_os' : {'name' : 'CNL', 'compiler_strategy': 'MODULES', - 'version': '10'}, - 'target' : {'name':'haswell', 'module_name': 'craype-haswell'}} - - arch = spack.architecture.arch_from_dict(d) + + new_arch = spack.architecture.arch_from_dict(d) + self.assertEqual(arch, new_arch) + self.assertTrue( isinstance(arch, Arch) ) self.assertTrue( isinstance(arch.platform, Platform) ) self.assertTrue( isinstance(arch.platform_os, OperatingSystem) ) self.assertTrue( isinstance(arch.target, Target) ) - + self.assertTrue( isinstance(new_arch, Arch) ) + self.assertTrue( isinstance(new_arch.platform, Platform) ) + self.assertTrue( isinstance(new_arch.platform_os, OperatingSystem) ) + self.assertTrue( isinstance(new_arch.target, Target) ) + def test_platform_class_and_compiler_strategies(self): a = CrayXc() -- cgit v1.2.3-70-g09d2 From 4ddba5f7edd97c8c17781368edc5b9a0db74417d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 29 Mar 2016 14:47:16 -0500 Subject: Add CUDA and HOOMD-blue packages --- var/spack/repos/builtin/packages/cuda/package.py | 42 ++++++++++++++ .../repos/builtin/packages/hoomd-blue/package.py | 67 ++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cuda/package.py create mode 100644 var/spack/repos/builtin/packages/hoomd-blue/package.py diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py new file mode 100644 index 0000000000..547b43d6d2 --- /dev/null +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -0,0 +1,42 @@ +from spack import * +from glob import glob +import os + +class Cuda(Package): + """CUDA is a parallel computing platform and programming model invented by + NVIDIA. It enables dramatic increases in computing performance by harnessing + the power of the graphics processing unit (GPU). + + Note: NVIDIA does not provide a download URL for CUDA so you will need to + download it yourself. Go to https://developer.nvidia.com/cuda-downloads + and select your Operating System, Architecture, Distribution, and Version. + For the Installer Type, select runfile and click Download. Spack will search + your current directory for this file. Alternatively, add this file to a + mirror so that Spack can find it. For instructions on how to set up a mirror, + see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "http://www.nvidia.com/object/cuda_home_new.html" + url = "file://%s/cuda_7.5.18_linux.run" % os.getcwd() + + version('7.5.18', '4b3bcecf0dfc35928a0898793cf3e4c6', expand=False) + + def install(self, spec, prefix): + runfile = glob(os.path.join(self.stage.path, 'cuda*.run'))[0] + chmod = which('chmod') + chmod('+x', runfile) + runfile = which(runfile) + + # Note: NVIDIA does not officially support many newer versions of compilers. + # For example, on CentOS 6, you must use GCC 4.4.7 or older. + # The --override flag disables these checks. See: + # http://docs.nvidia.com/cuda/cuda-installation-guide-linux/#system-requirements + # for details. + + runfile( + '--silent', # disable interactive prompts + '--verbose', # create verbose log file + '--override', # ignore compiler checks + '--toolkit', # install CUDA Toolkit + '--toolkitpath=%s' % prefix + ) + diff --git a/var/spack/repos/builtin/packages/hoomd-blue/package.py b/var/spack/repos/builtin/packages/hoomd-blue/package.py new file mode 100644 index 0000000000..97ce9c0cf0 --- /dev/null +++ b/var/spack/repos/builtin/packages/hoomd-blue/package.py @@ -0,0 +1,67 @@ +from spack import * +import os + +class HoomdBlue(Package): + """HOOMD-blue is a general-purpose particle simulation toolkit. It scales + from a single CPU core to thousands of GPUs. + + You define particle initial conditions and interactions in a high-level + python script. Then tell HOOMD-blue how you want to execute the job and it + takes care of the rest. Python job scripts give you unlimited flexibility + to create custom initialization routines, control simulation parameters, + and perform in situ analysis.""" + + homepage = "https://codeblue.umich.edu/hoomd-blue/index.html" + url = "https://bitbucket.org/glotzer/hoomd-blue/get/v1.3.3.tar.bz2" + + version('1.3.3', '1469ef4531dc14b579c0acddbfe6a273') + + variant('mpi', default=False, description='Compile with MPI enabled') + variant('cuda', default=False, description='Compile with CUDA Toolkit') + variant('doc', default=False, description='Generate documentation') + + extends('python') + depends_on('py-numpy') + depends_on('boost+python') + depends_on('cmake') + depends_on('mpi', when='+mpi') + depends_on('cuda', when='+cuda') + depends_on('doxygen', when='+doc') + + def install(self, spec, prefix): + + cmake_args = [ + '-DPYTHON_EXECUTABLE=%s/python' % spec['python'].prefix.bin, + '-DBOOST_ROOT=%s' % spec['boost' ].prefix + ] + + # MPI support + if '+mpi' in spec: + os.environ['MPI_HOME'] = spec['mpi'].prefix + cmake_args.append('-DENABLE_MPI=ON') + else: + cmake_args.append('-DENABLE_MPI=OFF') + + # CUDA support + if '+cuda' in spec: + cmake_args.append('-DENABLE_CUDA=ON') + else: + cmake_args.append('-DENABLE_CUDA=OFF') + + # CUDA-aware MPI library support + if '+cuda' in spec and '+mpi' in spec: + cmake_args.append('-DENABLE_MPI_CUDA=ON') + else: + cmake_args.append('-DENABLE_MPI_CUDA=OFF') + + # Documentation + if '+doc' in spec: + cmake_args.append('-DENABLE_DOXYGEN=ON') + else: + cmake_args.append('-DENABLE_DOXYGEN=OFF') + + cmake_args.extend(std_cmake_args) + cmake('.', *cmake_args) + + make() + make("install") -- cgit v1.2.3-70-g09d2 From abee9c83b440b8341be6df1f07c7c5f1bef9dd89 Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Tue, 29 Mar 2016 17:26:34 -0400 Subject: Removed googletest FIXME... --- var/spack/repos/builtin/packages/googletest/package.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/googletest/package.py b/var/spack/repos/builtin/packages/googletest/package.py index ed27afa10c..663b758747 100644 --- a/var/spack/repos/builtin/packages/googletest/package.py +++ b/var/spack/repos/builtin/packages/googletest/package.py @@ -1,19 +1,3 @@ -# FIXME: -# This is a template package file for Spack. We've conveniently -# put "FIXME" labels next to all the things you'll want to change. -# -# Once you've edited all the FIXME's, delete this whole message, -# save this file, and test out your package like this: -# -# spack install googletest -# -# You can always get back here to change things with: -# -# spack edit googletest -# -# See the spack documentation for more information on building -# packages. -# from spack import * class Googletest(Package): -- cgit v1.2.3-70-g09d2 From a4eff6de3faa3624a529015ea4cf5ebb1af41484 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 29 Mar 2016 17:10:49 -0600 Subject: + New version of cmake (3.5.1). --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 1f93d39769..91a4e3b415 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -30,6 +30,7 @@ class Cmake(Package): homepage = 'https://www.cmake.org' url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz' + version('3.5.1', 'ca051f4a66375c89d1a524e726da0296') version('3.5.0', '33c5d09d4c33d4ffcc63578a6ba8777e') version('3.4.3', '4cb3ff35b2472aae70f542116d616e63') version('3.4.0', 'cd3034e0a44256a0917e254167217fc8') -- cgit v1.2.3-70-g09d2 From bee224c567ee735547bb183cd6a1d6e04309c81a Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 29 Mar 2016 18:25:22 -0700 Subject: mirror archive filename now includes the digest type as well as the digest --- lib/spack/spack/fetch_strategy.py | 10 ---------- lib/spack/spack/mirror.py | 7 +++++-- lib/spack/spack/package.py | 7 +++++++ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 9938f011d0..b696a12e7a 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -107,8 +107,6 @@ class FetchStrategy(object): def archive(self, destination): pass # Used to create tarball for mirror. - def file_hash(self): pass # Identifies the resource to be retrieved - def __str__(self): # Should be human readable URL. return "FetchStrategy.__str___" @@ -219,10 +217,6 @@ class URLFetchStrategy(FetchStrategy): """Path to the source archive within this stage directory.""" return self.stage.archive_file - @property - def file_hash(self): - return self.digest - @_needs_stage def expand(self): if not self.expand_archive: @@ -355,10 +349,6 @@ class VCSFetchStrategy(FetchStrategy): self.stage.chdir() tar('-czf', destination, os.path.basename(self.stage.source_path)) - @property - def file_hash(self): - return None - def __str__(self): return "VCS: %s" % self.url diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py index cb2588fb29..c929a092b4 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirror.py @@ -62,8 +62,11 @@ def mirror_archive_filename(spec, fetcher): ext = 'tar.gz' tokens = [spec.package.name, spec.version] - if fetcher.file_hash: - tokens.append(fetcher.file_hash) + package = spack.repo.get(spec) + digests = package.digests + if digests: + if 'md5' in digests: + tokens.extend(['md5', digests['md5']]) filename = '-'.join(str(t) for t in tokens) if ext: filename += ".%s" % ext diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index d007f37aeb..2feea51fa5 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -397,6 +397,13 @@ class Package(object): raise ValueError("Can only get of package with concrete version.") return self.spec.versions[0] + @property + def digests(self): + versionInfo = self.versions[self.version] + digests = {} + if 'md5' in versionInfo: + digests['md5'] = versionInfo['md5'] + return digests @memoized def version_urls(self): -- cgit v1.2.3-70-g09d2 From ce4de6227e339bab98f8a73013bce1898f275b6f Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 29 Mar 2016 18:45:58 -0700 Subject: (1) access package via spec property (2) use any digest to form archive filename --- lib/spack/spack/mirror.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py index c929a092b4..78db22f73b 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirror.py @@ -62,11 +62,11 @@ def mirror_archive_filename(spec, fetcher): ext = 'tar.gz' tokens = [spec.package.name, spec.version] - package = spack.repo.get(spec) - digests = package.digests + digests = spec.package.digests if digests: - if 'md5' in digests: - tokens.extend(['md5', digests['md5']]) + # If a package has multiple digests, any one is sufficient to identify it + digestType, digest = digests.iteritems().next() + tokens.extend([digestType, digest]) filename = '-'.join(str(t) for t in tokens) if ext: filename += ".%s" % ext -- cgit v1.2.3-70-g09d2 From 03d907e1e5bfc01f7cdb457dbcd58bb903683e34 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 29 Mar 2016 18:48:25 -0700 Subject: in the case of multiple digests, avoid creating different mirror filenames from run to run (as long as the available digests do not change) --- lib/spack/spack/mirror.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py index 78db22f73b..64f589ad8b 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirror.py @@ -65,7 +65,7 @@ def mirror_archive_filename(spec, fetcher): digests = spec.package.digests if digests: # If a package has multiple digests, any one is sufficient to identify it - digestType, digest = digests.iteritems().next() + digestType, digest = sorted(digests.iteritems())[0] tokens.extend([digestType, digest]) filename = '-'.join(str(t) for t in tokens) if ext: -- cgit v1.2.3-70-g09d2 From c40559433bdfadb6059070060114880c9042d799 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 29 Mar 2016 18:54:24 -0700 Subject: added docstring --- lib/spack/spack/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 2feea51fa5..d1479ec9de 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -399,6 +399,7 @@ class Package(object): @property def digests(self): + """All digests for the concretized package version.""" versionInfo = self.versions[self.version] digests = {} if 'md5' in versionInfo: -- cgit v1.2.3-70-g09d2 From a0c42a3fd1a8c5319ff8e02313b7f12e8c59349d Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 29 Mar 2016 18:58:18 -0700 Subject: removed stale TODO --- lib/spack/spack/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 6e7cb217c8..a2d61fa2f7 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -48,9 +48,8 @@ repos_path = join_path(var_path, "repos") share_path = join_path(spack_root, "share", "spack") cache_path = join_path(var_path, "cache") -# TODO: i get a complaint if i dont qualify this, fix that import spack.fetch_strategy -cache = fetch_strategy.FsCache(cache_path) +cache = spack.fetch_strategy.FsCache(cache_path) prefix = spack_root opt_path = join_path(prefix, "opt") -- cgit v1.2.3-70-g09d2 From 98bb151d85fc35389e0b76eaac90448fa688aa6c Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Tue, 29 Mar 2016 20:25:56 -0700 Subject: updated geos version --- var/spack/repos/builtin/packages/dbus/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py index 294b0de54e..422f5a19eb 100644 --- a/var/spack/repos/builtin/packages/dbus/package.py +++ b/var/spack/repos/builtin/packages/dbus/package.py @@ -13,6 +13,7 @@ class Dbus(Package): homepage = "http://dbus.freedesktop.org/" url = "http://dbus.freedesktop.org/releases/dbus/dbus-1.8.8.tar.gz" + version('1.11.2', '957a07f066f3730d2bb3ea0932f0081b') version('1.9.0', 'ec6895a4d5c0637b01f0d0e7689e2b36') version('1.8.8', 'b9f4a18ee3faa1e07c04aa1d83239c43') version('1.8.6', '6a08ba555d340e9dfe2d623b83c0eea8') -- cgit v1.2.3-70-g09d2 From 5b6eefbf0417668c19e4c898c31cf56764d5bc2b Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 11:30:35 +0200 Subject: add variants and extra dependencies --- var/spack/repos/builtin/packages/dealii/package.py | 176 ++++++++++++++++----- 1 file changed, 140 insertions(+), 36 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 9ac1572b95..396601356c 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -8,27 +8,48 @@ class Dealii(Package): version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00') - depends_on ("cmake") + variant('mpi', default=True, description='Compile with MPI') + variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') + variant('doxygen', default=True, description='Compile with Doxygen documentation') + variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') + variant('metis', default=True, description='Compile with Metis or ParMetis') + variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') + variant('oce', default=True, description='Compile with OCE') + variant('p4est', default=True, description='Compile with P4est (only with MPI)') + variant('petsc', default=True, description='Compile with Petsc (only with MPI)') + variant('slepc', default=True, description='Compile with Slepc (only with Petsc and MPI)') + variant('trilinos', default=True, description='Compile with Trilinos (only with MPI)') + + # required dependencies, light version depends_on ("blas") + depends_on ("boost", when='~mpi') + depends_on ("boost+mpi", when='+mpi') + depends_on ("bzip2") + depends_on ("cmake") depends_on ("lapack") - depends_on ("mpi") - - depends_on ("arpack-ng+mpi") - depends_on ("boost") - depends_on ("doxygen") - depends_on ("hdf5+mpi~cxx") #FIXME NetCDF declares dependency with ~cxx, why? - depends_on ("metis") depends_on ("muparser") - depends_on ("netcdf-cxx") - #depends_on ("numdiff") #FIXME - depends_on ("oce") - depends_on ("p4est") - depends_on ("parmetis") - depends_on ("petsc+mpi") - depends_on ("slepc") depends_on ("suite-sparse") depends_on ("tbb") - depends_on ("trilinos") + depends_on ("zlib") + + # optional dependencies + depends_on ("mpi", when="+mpi") + depends_on ("arpack-ng+mpi", when='+arpack+mpi') + depends_on ("doxygen", when='+doxygen') + depends_on ("hdf5+mpi~cxx", when='+hdf5+mpi') #FIXME NetCDF declares dependency with ~cxx, why? + depends_on ("metis", 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 ("parmetis", when='+metis+mpi') + depends_on ("petsc+mpi", when='+petsc+mpi') + depends_on ("slepc", when='+slepc+petsc+mpi') + depends_on ("trilinos", when='+trilinos+mpi') + + # developer dependnecies + #depends_on ("numdiff") #FIXME + #depends_on ("astyle") #FIXME def install(self, spec, prefix): options = [] @@ -42,33 +63,116 @@ class Dealii(Package): dsuf = 'dylib' if sys.platform == 'darwin' else 'so' options.extend([ '-DCMAKE_BUILD_TYPE=DebugRelease', - '-DDEAL_II_WITH_THREADS:BOOL=ON' - '-DDEAL_II_WITH_MPI:BOOL=ON', - '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # FIXME: avoid hardcoding mpi wrappers names - '-DCMAKE_CXX_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), - '-DCMAKE_Fortran_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - '-DARPACK_DIR=%s' % spec['arpack-ng'].prefix, + '-DDEAL_II_COMPONENT_EXAMPLES=ON', + '-DDEAL_II_WITH_THREADS:BOOL=ON', '-DBOOST_DIR=%s' % spec['boost'].prefix, - '-DHDF5_DIR=%s' % spec['hdf5'].prefix, - '-DMETIS_DIR=%s' % spec['metis'].prefix, + '-DBZIP2_DIR=%s' % spec['bzip2'].prefix, + # CMake's FindBlas/Lapack may pickup system's blas/lapack instead of Spack's. + # Be more specific to avoid this. + # Note that both lapack and blas are provided in -DLAPACK_XYZ variables + '-DLAPACK_FOUND=true', + '-DLAPACK_INCLUDE_DIRS=%s;%s' % + (spec['lapack'].prefix.include, + spec['blas'].prefix.include), + '-DLAPACK_LIBRARIES=%s;%s' % + (join_path(spec['lapack'].prefix.lib,'liblapack.%s' % dsuf), # FIXME don't hardcode names + join_path(spec['blas'].prefix.lib,'libblas.%s' % dsuf)), # FIXME don't hardcode names '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, - # since Netcdf is spread among two, need to do it by hand: - '-DNETCDF_FOUND=true', - '-DNETCDF_LIBRARIES=%s;%s' % - (join_path(spec['netcdf-cxx'].prefix.lib,'libnetcdf_c++.%s' % dsuf), - join_path(spec['netcdf'].prefix.lib,'libnetcdf.%s' % dsuf)), - '-DNETCDF_INCLUDE_DIRS=%s;%s' % - (spec['netcdf-cxx'].prefix.include, - spec['netcdf'].prefix.include), - '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, '-DP4EST_DIR=%s' % spec['p4est'].prefix, - '-DPETSC_DIR=%s' % spec['petsc'].prefix, - '-DSLEPC_DIR=%s' % spec['slepc'].prefix, '-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix, '-DTBB_DIR=%s' % spec['tbb'].prefix, - '-DTRILINOS_DIR=%s' % spec['trilinos'].prefix + '-DZLIB_DIR=%s' % spec['zlib'].prefix ]) + # MPI + if '+mpi' in spec: + options.extend([ + '-DDEAL_II_WITH_MPI:BOOL=ON', + '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # FIXME: avoid hardcoding mpi wrappers names + '-DCMAKE_CXX_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), + '-DCMAKE_Fortran_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + ]) + else: + options.extend([ + '-DDEAL_II_WITH_MPI:BOOL=OFF', + ]) + + # Optional dependencies for which librariy names are the same as CMake variables + for library in ('hdf5', 'p4est','petsc', 'slepc','trilinos','metis','parmetis'): + if library in spec: + options.extend([ + '-D{library}_DIR={value}'.format(library=library.upper(), value=spec[library].prefix), + '-DDEAL_II_WITH_{library}:BOOL=ON'.format(library=library.upper()) + ]) + else: + options.extend([ + '-DDEAL_II_WITH_{library}:BOOL=OFF'.format(library=library.upper()) + ]) + + # doxygen + options.extend([ + '-DDEAL_II_COMPONENT_DOCUMENTATION=%s' % ('ON' if '+doxygen' in spec else 'OFF'), + ]) + + + # arpack + if '+arpack' in spec: + options.extend([ + '-DARPACK_DIR=%s' % spec['arpack-ng'].prefix, + '-DDEAL_II_WITH_ARPACK=ON', + '-DDEAL_II_ARPACK_WITH_PARPACK=ON' + ]) + else: + options.extend([ + '-DDEAL_II_WITH_ARPACK=OFF' + ]) + + # # metis + # if '+metis' in spec: + # + # if 'mpi' in spec: + # options.extend([ + # '-DMETIS_DIR=%s' % spec['parmetis'].prefix, + # ]) + # else: + # options.extend([ + # '-DMETIS_DIR=%s' % spec['metis'].prefix, + # ]) + # options.extend([ + # '-DDEAL_II_WITH_METIS=ON' + # ]) + # else: + # options.extend([ + # '-DDEAL_II_WITH_METIS=OFF' + # ]) + + # since Netcdf is spread among two, need to do it by hand: + if '+netcdf' in spec: + options.extend([ + '-DNETCDF_FOUND=true', + '-DNETCDF_LIBRARIES=%s;%s' % + (join_path(spec['netcdf-cxx'].prefix.lib,'libnetcdf_c++.%s' % dsuf), + join_path(spec['netcdf'].prefix.lib,'libnetcdf.%s' % dsuf)), + '-DNETCDF_INCLUDE_DIRS=%s;%s' % + (spec['netcdf-cxx'].prefix.include, + spec['netcdf'].prefix.include), + ]) + else: + options.extend([ + '-DDEAL_II_WITH_NETCDF=OFF' + ]) + + # Open Cascade + if '+oce' in spec: + options.extend([ + '-DOPENCASCADE_DIR=%s' % spec['oce'].prefix, + '-DDEAL_II_WITH_OPENCASCADE=ON' + ]) + else: + options.extend([ + '-DDEAL_II_WITH_OPENCASCADE=OFF' + ]) + cmake('.', *options) make() -- cgit v1.2.3-70-g09d2 From bafc6cebe1ca37116badc1baf60e88564eb01614 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 12:00:21 +0200 Subject: doxygen off by default --- var/spack/repos/builtin/packages/dealii/package.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 396601356c..907aa33356 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -8,17 +8,17 @@ class Dealii(Package): version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00') - variant('mpi', default=True, description='Compile with MPI') - variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') - variant('doxygen', default=True, description='Compile with Doxygen documentation') - variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') - variant('metis', default=True, description='Compile with Metis or ParMetis') - variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') - variant('oce', default=True, description='Compile with OCE') - variant('p4est', default=True, description='Compile with P4est (only with MPI)') - variant('petsc', default=True, description='Compile with Petsc (only with MPI)') - variant('slepc', default=True, description='Compile with Slepc (only with Petsc and MPI)') - variant('trilinos', default=True, description='Compile with Trilinos (only with MPI)') + variant('mpi', default=True, description='Compile with MPI') + variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') + variant('doxygen', default=False, description='Compile with Doxygen documentation') + variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') + variant('metis', default=True, description='Compile with Metis or ParMetis') + variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') + variant('oce', default=True, description='Compile with OCE') + variant('p4est', default=True, description='Compile with P4est (only with MPI)') + variant('petsc', default=True, description='Compile with Petsc (only with MPI)') + variant('slepc', default=True, description='Compile with Slepc (only with Petsc and MPI)') + variant('trilinos', default=True, description='Compile with Trilinos (only with MPI)') # required dependencies, light version depends_on ("blas") -- cgit v1.2.3-70-g09d2 From 9e9f5d01ad43e9b00262a12d1fd1225ac368581d Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 11:59:13 +0200 Subject: doxygen: add missing dependencies --- var/spack/repos/builtin/packages/doxygen/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index 3d4a4e47a7..3a1deba9e1 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -4,6 +4,7 @@ #------------------------------------------------------------------------------ from spack import * +import sys class Doxygen(Package): """Doxygen is the de facto standard tool for generating documentation @@ -17,6 +18,10 @@ class Doxygen(Package): version('1.8.10', '79767ccd986f12a0f949015efb5f058f') depends_on("cmake@2.8.12:") + # flex does not build on OSX, but it's provided there anyway + depends_on("flex", sys.platform != 'darwin') + depends_on("bison", sys.platform != 'darwin') + def install(self, spec, prefix): cmake('.', *std_cmake_args) -- cgit v1.2.3-70-g09d2 From 2abdd71b414b4f551e927edb7304b4dcc053d09e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 15:19:29 +0200 Subject: add dev version and conditionals for tests; remove parmetis --- var/spack/repos/builtin/packages/dealii/package.py | 62 +++++++++------------- 1 file changed, 24 insertions(+), 38 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 907aa33356..32dfb33c6d 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -7,12 +7,13 @@ class Dealii(Package): url = "https://github.com/dealii/dealii/releases/download/v8.4.0/dealii-8.4.0.tar.gz" version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00') + version('dev', 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)') variant('doxygen', default=False, description='Compile with Doxygen documentation') variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') - variant('metis', default=True, description='Compile with Metis or ParMetis') + variant('metis', default=True, description='Compile with Metis') variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') variant('oce', default=True, description='Compile with OCE') variant('p4est', default=True, description='Compile with P4est (only with MPI)') @@ -42,7 +43,6 @@ class Dealii(Package): depends_on ("netcdf-cxx", when='+netcdf+mpi') depends_on ("oce", when='+oce') depends_on ("p4est", when='+p4est+mpi') - depends_on ("parmetis", when='+metis+mpi') depends_on ("petsc+mpi", when='+petsc+mpi') depends_on ("slepc", when='+slepc+petsc+mpi') depends_on ("trilinos", when='+trilinos+mpi') @@ -98,7 +98,7 @@ class Dealii(Package): ]) # Optional dependencies for which librariy names are the same as CMake variables - for library in ('hdf5', 'p4est','petsc', 'slepc','trilinos','metis','parmetis'): + for library in ('hdf5', 'p4est','petsc', 'slepc','trilinos','metis'): if library in spec: options.extend([ '-D{library}_DIR={value}'.format(library=library.upper(), value=spec[library].prefix), @@ -127,25 +127,6 @@ class Dealii(Package): '-DDEAL_II_WITH_ARPACK=OFF' ]) - # # metis - # if '+metis' in spec: - # - # if 'mpi' in spec: - # options.extend([ - # '-DMETIS_DIR=%s' % spec['parmetis'].prefix, - # ]) - # else: - # options.extend([ - # '-DMETIS_DIR=%s' % spec['metis'].prefix, - # ]) - # options.extend([ - # '-DDEAL_II_WITH_METIS=ON' - # ]) - # else: - # options.extend([ - # '-DDEAL_II_WITH_METIS=OFF' - # ]) - # since Netcdf is spread among two, need to do it by hand: if '+netcdf' in spec: options.extend([ @@ -202,16 +183,18 @@ class Dealii(Package): # 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('.') - make('release') - make('run',parallel=False) + if '^petsc' in spec: + make('release') + make('run',parallel=False) print('=====================================') print('========= Step-40 Trilinos ==========') print('=====================================') # change Linear Algebra to Trilinos filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc') - make('release') - make('run',parallel=False) + if '^trilinos+hypre' in spec: + make('release') + make('run',parallel=False) print('=====================================') print('=== Step-40 Trilinos SuperluDist ====') @@ -223,31 +206,34 @@ class Dealii(Package): filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', (''), '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') filter_file(r'(preconditioner\);)', (''), 'step-40.cc') - - make('release') - make('run',paralle=False) + if '^trilinos+superlu-dist' in spec: + make('release') + make('run',paralle=False) print('=====================================') print('====== Step-40 Trilinos MUMPS =======') print('=====================================') # switch to Mumps filter_file(r'(Amesos_Superludist)', ('Amesos_Mumps'), 'step-40.cc') - make('release') - make('run',parallel=False) + if '^trilinos+mumps' in spec: + make('release') + make('run',parallel=False) print('=====================================') print('============ Step-36 ================') print('=====================================') with working_dir('examples/step-36'): - cmake('.') - make('release') - make('run',parallel=False) + if 'slepc' in spec: + cmake('.') + make('release') + make('run',parallel=False) print('=====================================') print('============ Step-54 ================') print('=====================================') with working_dir('examples/step-54'): - cmake('.') - make('release') - # FIXME - # make('run',parallel=False) + if 'oce' in spec: + cmake('.') + make('release') + if sys.platform != 'darwin': #FIXME + make('run',parallel=False) -- cgit v1.2.3-70-g09d2 From dd1c667d8d5d260146f81b0b90ad52c41160208e Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 30 Mar 2016 16:10:20 +0200 Subject: uninstall : changed error message --- lib/spack/spack/cmd/uninstall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 72ad132112..7aadd254e8 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -182,7 +182,7 @@ def uninstall(parser, args): uninstall_list = list(set(uninstall_list)) if has_error: - tty.die('You can use spack uninstall -f to force this action') + tty.die('You can use spack uninstall -r to uninstall these dependencies as well') if not args.yes_to_all: tty.msg("The following packages will be uninstalled : ") -- cgit v1.2.3-70-g09d2 From 5b1ef64e31a56877f6859820ca7a79dd51f6fe84 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 09:33:00 -0600 Subject: + Provide basic instructions for providing subversion w/o additional language bindings. --- .../packages/apr-util/apr-util.new/package.py | 44 ------------- .../repos/builtin/packages/apr-util/package.py | 44 +++++++++++++ .../repos/builtin/packages/apr/apr.new/package.py | 51 -------------- var/spack/repos/builtin/packages/apr/package.py | 38 +++++++++++ .../repos/builtin/packages/subversion/package.py | 77 ++++++++++++++++++++++ .../packages/subversion/subversion.new/package.py | 59 ----------------- 6 files changed, 159 insertions(+), 154 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py create mode 100644 var/spack/repos/builtin/packages/apr-util/package.py delete mode 100644 var/spack/repos/builtin/packages/apr/apr.new/package.py create mode 100644 var/spack/repos/builtin/packages/apr/package.py create mode 100644 var/spack/repos/builtin/packages/subversion/package.py delete mode 100644 var/spack/repos/builtin/packages/subversion/subversion.new/package.py diff --git a/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py b/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py deleted file mode 100644 index 8f19c84d22..0000000000 --- a/var/spack/repos/builtin/packages/apr-util/apr-util.new/package.py +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class AprUtil(Package): - """Apache Portable Runtime Utility""" - homepage = 'https://apr.apache.org/' - url = 'http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz' - - version('1.5.4', '866825c04da827c6e5f53daff5569f42') - - depends_on('apr') - - def install(self, spec, prefix): - - # configure, build, install: - options = ['--prefix=%s' % prefix] - options.append('--with-apr=%s' % spec['apr'].prefix) - - configure(*options) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py new file mode 100644 index 0000000000..8f19c84d22 --- /dev/null +++ b/var/spack/repos/builtin/packages/apr-util/package.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class AprUtil(Package): + """Apache Portable Runtime Utility""" + homepage = 'https://apr.apache.org/' + url = 'http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz' + + version('1.5.4', '866825c04da827c6e5f53daff5569f42') + + depends_on('apr') + + def install(self, spec, prefix): + + # configure, build, install: + options = ['--prefix=%s' % prefix] + options.append('--with-apr=%s' % spec['apr'].prefix) + + configure(*options) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/apr/apr.new/package.py b/var/spack/repos/builtin/packages/apr/apr.new/package.py deleted file mode 100644 index 5cbbad350b..0000000000 --- a/var/spack/repos/builtin/packages/apr/apr.new/package.py +++ /dev/null @@ -1,51 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * - -class Apr(Package): - """Apache portable runtime.""" - homepage = 'https://apr.apache.org/' - url = 'http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz' - - version('1.5.2', '98492e965963f852ab29f9e61b2ad700') - - #variant('ncurses', default=True, description='Enables the build of the ncurses gui') - #variant('qt', default=False, description='Enables the build of cmake-gui') - #variant('doc', default=False, description='Enables the generation of html and man page documentation') - - #depends_on('ncurses', when='+ncurses') - #depends_on('qt', when='+qt') - #depends_on('python@2.7.11:', when='+doc') - #depends_on('py-sphinx', when='+doc') - - #def url_for_version(self, version): - # """Handle CMake's version-based custom URLs.""" - # return 'https://cmake.org/files/v%s/cmake-%s.tar.gz' % (version.up_to(2), version) - - def install(self, spec, prefix): - options = ['--prefix=%s' % prefix] - configure(*options) - make() - make('install') diff --git a/var/spack/repos/builtin/packages/apr/package.py b/var/spack/repos/builtin/packages/apr/package.py new file mode 100644 index 0000000000..8a440766ec --- /dev/null +++ b/var/spack/repos/builtin/packages/apr/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Apr(Package): + """Apache portable runtime.""" + homepage = 'https://apr.apache.org/' + url = 'http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz' + + version('1.5.2', '98492e965963f852ab29f9e61b2ad700') + + def install(self, spec, prefix): + options = ['--prefix=%s' % prefix] + configure(*options) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py new file mode 100644 index 0000000000..5db1c3eb92 --- /dev/null +++ b/var/spack/repos/builtin/packages/subversion/package.py @@ -0,0 +1,77 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +#import os + +class Subversion(Package): + """Apache Subversion - an open source version control system.""" + homepage = 'https://subversion.apache.org/' + url = 'http://archive.apache.org/dist/subversion/subversion-1.8.13.tar.gz' + + version('1.8.13', '8065b3698d799507fb72dd7926ed32b6') + version('1.9.3', 'a92bcfaec4e5038f82c74a7b5bbd2f46') + + depends_on('apr') + depends_on('apr-util') + depends_on('zlib') + depends_on('sqlite') + + # Optional: We need swig if we want the Perl, Python or Ruby + # bindings. + #depends_on('swig') + #depends_on('python') + #depends_on('perl') + #depends_on('ruby') + + def install(self, spec, prefix): + + # configure, build, install: + # Ref: http://www.linuxfromscratch.org/blfs/view/svn/general/subversion.html + options = ['--prefix=%s' % prefix] + options.append('--with-apr=%s' % spec['apr'].prefix) + options.append('--with-apr-util=%s' % spec['apr-util'].prefix) + options.append('--with-zlib=%s' % spec['zlib'].prefix) + options.append('--with-sqlite=%s' % spec['sqlite'].prefix) + #options.append('--with-swig=%s' % spec['swig'].prefix) + + configure(*options) + make() + make('install') + + # python bindings + #make('swig-py', + # 'swig-pydir=/usr/lib/python2.7/site-packages/libsvn', + # 'swig_pydir_extra=/usr/lib/python2.7/site-packages/svn') + #make('install-swig-py', + # 'swig-pydir=/usr/lib/python2.7/site-packages/libsvn', + # 'swig_pydir_extra=/usr/lib/python2.7/site-packages/svn') + + # perl bindings + #make('swig-pl') + #make('install-swig-pl') + + # ruby bindings + #make('swig-rb') + #make('isntall-swig-rb') diff --git a/var/spack/repos/builtin/packages/subversion/subversion.new/package.py b/var/spack/repos/builtin/packages/subversion/subversion.new/package.py deleted file mode 100644 index b1c3380238..0000000000 --- a/var/spack/repos/builtin/packages/subversion/subversion.new/package.py +++ /dev/null @@ -1,59 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -from spack import * -#import os - -class Subversion(Package): - """Apache Subversion - an open source version control system.""" - homepage = 'https://subversion.apache.org/' - url = 'http://archive.apache.org/dist/subversion/subversion-1.8.13.tar.gz' - - version('1.8.13', '8065b3698d799507fb72dd7926ed32b6') - version('1.9.3', 'a92bcfaec4e5038f82c74a7b5bbd2f46') - - depends_on('apr') - depends_on('apr-util') - depends_on('zlib') - depends_on('sqlite') - #depends_on('swig') - - def install(self, spec, prefix): - - # configure, build, install: - # Ref: http://www.linuxfromscratch.org/blfs/view/svn/general/subversion.html - options = ['--prefix=%s' % prefix] - options.append('--with-apr=%s' % spec['apr'].prefix) - options.append('--with-apr-util=%s' % spec['apr-util'].prefix) - options.append('--with-zlib=%s' % spec['zlib'].prefix) - options.append('--with-sqlite=%s' % spec['sqlite'].prefix) - #options.append('--with-swig=%s' % spec['swig'].prefix) - - configure(*options) - make() - make('install') - #make('swig-py') # python bindings - #make('install-swig-py') - #make('swig-pl') # perl bindings - #make('install-swig-pl') -- cgit v1.2.3-70-g09d2 From a7ceacb991b2a3b0caba8da41a39e045912f9e22 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 09:47:31 -0600 Subject: + Changes to swig are not needed with this PR. --- var/spack/repos/builtin/packages/swig/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index de6055e965..8d46c4fe46 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -36,14 +36,11 @@ class Swig(Package): homepage = "http://www.swig.org" url = "http://prdownloads.sourceforge.net/swig/swig-3.0.2.tar.gz" - version('3.0.8', 'c96a1d5ecb13d38604d7e92148c73c97') - version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') - version('2.0.12', 'c3fb0b2d710cc82ed0154b91e43085a4') + version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') depends_on('pcre') def install(self, spec, prefix): configure("--prefix=%s" % prefix) - make() make("install") -- cgit v1.2.3-70-g09d2 From bc309e42d8f4d5c536ea43dc01a8356bf0aba3f2 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:00:18 -0500 Subject: New package, py-bottleneck. --- var/spack/repos/builtin/packages/py-bottleneck/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-bottleneck/package.py diff --git a/var/spack/repos/builtin/packages/py-bottleneck/package.py b/var/spack/repos/builtin/packages/py-bottleneck/package.py new file mode 100644 index 0000000000..0aa4208b4d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bottleneck/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyBottleneck(Package): + """Bottleneck is a collection of fast NumPy array functions written in Cython.""" + homepage = "https://pypi.python.org/pypi/Bottleneck/1.0.0" + url = "https://pypi.python.org/packages/source/B/Bottleneck/Bottleneck-1.0.0.tar.gz" + + version('1.0.0', '380fa6f275bd24f27e7cf0e0d752f5d2') + + extends('python', ignore=r'bin/f2py$') + depends_on('py-numpy') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 5c95977dccef17a3cceb741d39f94aa075a0a9c4 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:06:04 -0500 Subject: Added version 15.0.1 --- var/spack/repos/builtin/packages/py-virtualenv/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-virtualenv/package.py b/var/spack/repos/builtin/packages/py-virtualenv/package.py index 037a6fc59f..09303d37b4 100644 --- a/var/spack/repos/builtin/packages/py-virtualenv/package.py +++ b/var/spack/repos/builtin/packages/py-virtualenv/package.py @@ -8,6 +8,7 @@ class PyVirtualenv(Package): version('1.11.6', 'f61cdd983d2c4e6aeabb70b1060d6f49') version('13.0.1', '1ffc011bde6667f0e37ecd976f4934db') + version('15.0.1', '28d76a0d9cbd5dc42046dd14e76a6ecc') extends('python') depends_on('py-setuptools') -- cgit v1.2.3-70-g09d2 From 3b19cc303fae89eed11581d7cdfe2ab8e9d469ef Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:08:28 -0500 Subject: Added version 1.10.0. --- var/spack/repos/builtin/packages/py-six/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-six/package.py b/var/spack/repos/builtin/packages/py-six/package.py index 05c5bd00a9..df277100f7 100644 --- a/var/spack/repos/builtin/packages/py-six/package.py +++ b/var/spack/repos/builtin/packages/py-six/package.py @@ -6,6 +6,7 @@ class PySix(Package): url = "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz" version('1.9.0', '476881ef4012262dfc8adc645ee786c4') + version('1.10.0', '34eed507548117b2ab523ab14b2f8b55') extends('python') depends_on('py-setuptools') -- cgit v1.2.3-70-g09d2 From 9153e03e5ce5bdd5161aa4b493854208040fcf3d Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:09:47 -0500 Subject: Added version 20.5. --- var/spack/repos/builtin/packages/py-setuptools/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 26c048bfd4..c6d9be1add 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -9,6 +9,7 @@ class PySetuptools(Package): version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') version('19.2', '78353b1f80375ca5e088f4b4627ffe03') + version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') extends('python') -- cgit v1.2.3-70-g09d2 From 42729d9cceafaf2382455f9e765cbc261dc41578 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:10:32 -0500 Subject: Added version 2016.3. --- var/spack/repos/builtin/packages/py-pytz/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-pytz/package.py b/var/spack/repos/builtin/packages/py-pytz/package.py index da6311a784..060cf0cde4 100644 --- a/var/spack/repos/builtin/packages/py-pytz/package.py +++ b/var/spack/repos/builtin/packages/py-pytz/package.py @@ -7,6 +7,7 @@ class PyPytz(Package): version('2014.10', 'eb1cb941a20c5b751352c52486aa1dd7') version('2015.4', '417a47b1c432d90333e42084a605d3d8') + version('2016.3', 'abae92c3301b27bd8a9f56b14f52cb29') extends('python') -- cgit v1.2.3-70-g09d2 From 17075736a0ff4f8f677527664e37d55b39cbfe93 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:16:11 -0500 Subject: Add version 2.5.2. --- var/spack/repos/builtin/packages/py-dateutil/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-dateutil/package.py b/var/spack/repos/builtin/packages/py-dateutil/package.py index 0a17f2f2d2..b67e91ace6 100644 --- a/var/spack/repos/builtin/packages/py-dateutil/package.py +++ b/var/spack/repos/builtin/packages/py-dateutil/package.py @@ -7,6 +7,7 @@ class PyDateutil(Package): version('2.4.0', '75714163bb96bedd07685cdb2071b8bc') version('2.4.2', '4ef68e1c485b09e9f034e10473e5add2') + version('2.5.2', 'eafe168e8f404bf384514f5116eedbb6') extends('python') depends_on('py-setuptools') -- cgit v1.2.3-70-g09d2 From 8948cb100be21034b7e4bc78b7383fa73005a03a Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:16:35 -0500 Subject: Add version 1.3.7. --- var/spack/repos/builtin/packages/py-nose/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-nose/package.py b/var/spack/repos/builtin/packages/py-nose/package.py index 4fee99098e..c2c2b52e03 100644 --- a/var/spack/repos/builtin/packages/py-nose/package.py +++ b/var/spack/repos/builtin/packages/py-nose/package.py @@ -10,6 +10,7 @@ class PyNose(Package): version('1.3.4', '6ed7169887580ddc9a8e16048d38274d') version('1.3.6', '0ca546d81ca8309080fc80cb389e7a16') + version('1.3.7', '4d3ad0ff07b61373d2cefc89c5d0b20b') extends('python', ignore=r'bin/nosetests.*$') depends_on('py-setuptools') -- cgit v1.2.3-70-g09d2 From f3b353f5f95c21641d4bee274393879e3a068c3c Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:17:24 -0500 Subject: Add 'bin/f2py' to ignore so activation works. --- var/spack/repos/builtin/packages/py-matplotlib/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 2167735fb8..45e77dd631 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -12,7 +12,7 @@ class PyMatplotlib(Package): variant('gui', default=False, description='Enable GUI') variant('ipython', default=False, description='Enable ipython support') - extends('python', ignore=r'bin/nosetests.*$|bin/pbr$') + extends('python', ignore=r'bin/nosetests.*$|bin/pbr$|bin/f2py$') depends_on('py-pyside', when='+gui') depends_on('py-ipython', when='+ipython') -- cgit v1.2.3-70-g09d2 From e7ae983b41943939a20ca4964824b166833c282b Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:20:27 -0500 Subject: Added version 2.5. Added 'bin/f2py' to ignore so that activation works. --- var/spack/repos/builtin/packages/py-numexpr/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-numexpr/package.py b/var/spack/repos/builtin/packages/py-numexpr/package.py index 89f8a525b1..081a79dec6 100644 --- a/var/spack/repos/builtin/packages/py-numexpr/package.py +++ b/var/spack/repos/builtin/packages/py-numexpr/package.py @@ -7,8 +7,9 @@ class PyNumexpr(Package): url = "https://pypi.python.org/packages/source/n/numexpr/numexpr-2.4.6.tar.gz" version('2.4.6', '17ac6fafc9ea1ce3eb970b9abccb4fbd') + version('2.5', '84f66cced45ba3e30dcf77a937763aaa') - extends('python') + extends('python', ignore=r'bin/f2py$') depends_on('py-numpy') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 78be85c84f89d861086c04e4fcc4fa70c21d0a5f Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:21:17 -0500 Subject: Added version 1.11.0. --- var/spack/repos/builtin/packages/py-numpy/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index a08e612df6..40988fb44a 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -9,6 +9,7 @@ class PyNumpy(Package): homepage = "http://www.numpy.org/" url = "https://pypi.python.org/packages/source/n/numpy/numpy-1.9.1.tar.gz" + version('1.11.0', 'bc56fb9fc2895aa4961802ffbdb31d0b') version('1.10.4', 'aed294de0aa1ac7bd3f9745f4f1968ad') version('1.9.2', 'a1ed53432dbcd256398898d35bc8e645') version('1.9.1', '78842b73560ec378142665e712ae4ad9') -- cgit v1.2.3-70-g09d2 From 8ae84cfabaf22e52b01911c909b2d2342b75f3d9 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 30 Mar 2016 11:21:38 -0500 Subject: This commit updates pandas and fixes dependencies. Added version 0.18.0. Added 'bin/f2py' to ignore so that activation works. Removed unneccessary dependencies on - libdrm - libpciaccess - llvm - mesa Added recommended dependencies from the pandas project site. http://pandas.pydata.org/pandas-docs/stable/install.html - py-numexpr - py-bottleneck The py-bottleneck is a new package that is also in this branch. Removed optional dependencies - py-scipy - py-matplotlib While those are most likely desired to be in the same python stack as pandas they are not required by pandas. --- var/spack/repos/builtin/packages/py-pandas/package.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index 5b9997faa9..2320b1f92f 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -8,18 +8,15 @@ class PyPandas(Package): version('0.16.0', 'bfe311f05dc0c351f8955fbd1e296e73') version('0.16.1', 'fac4f25748f9610a3e00e765474bdea8') + version('0.18.0', 'f143762cd7a59815e348adf4308d2cf6') - extends('python') + extends('python', ignore=r'bin/f2py$') depends_on('py-dateutil') depends_on('py-numpy') - depends_on('py-matplotlib') - depends_on('py-scipy') depends_on('py-setuptools') depends_on('py-pytz') - depends_on('libdrm') - depends_on('libpciaccess') - depends_on('llvm') - depends_on('mesa') + depends_on('py-numexpr') + depends_on('py-bottleneck') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 9519f3d988d4f83cd3edf9bbdd90080559ba9549 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 30 Mar 2016 11:46:58 -0500 Subject: Fix MPI-CUDA bug --- var/spack/repos/builtin/packages/cuda/package.py | 11 ++++++----- var/spack/repos/builtin/packages/hoomd-blue/package.py | 13 +++++++++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index 547b43d6d2..eca371d05a 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -16,9 +16,12 @@ class Cuda(Package): see http://software.llnl.gov/spack/mirrors.html""" homepage = "http://www.nvidia.com/object/cuda_home_new.html" - url = "file://%s/cuda_7.5.18_linux.run" % os.getcwd() - version('7.5.18', '4b3bcecf0dfc35928a0898793cf3e4c6', expand=False) + version('7.5.18', '4b3bcecf0dfc35928a0898793cf3e4c6', expand=False, + url="file://%s/cuda_7.5.18_linux.run" % os.getcwd()) + version('6.5.14', '90b1b8f77313600cc294d9271741f4da', expand=False, + url="file://%s/cuda_6.5.14_linux_64.run" % os.getcwd()) + def install(self, spec, prefix): runfile = glob(os.path.join(self.stage.path, 'cuda*.run'))[0] @@ -27,15 +30,13 @@ class Cuda(Package): runfile = which(runfile) # Note: NVIDIA does not officially support many newer versions of compilers. - # For example, on CentOS 6, you must use GCC 4.4.7 or older. - # The --override flag disables these checks. See: + # For example, on CentOS 6, you must use GCC 4.4.7 or older. See: # http://docs.nvidia.com/cuda/cuda-installation-guide-linux/#system-requirements # for details. runfile( '--silent', # disable interactive prompts '--verbose', # create verbose log file - '--override', # ignore compiler checks '--toolkit', # install CUDA Toolkit '--toolkitpath=%s' % prefix ) diff --git a/var/spack/repos/builtin/packages/hoomd-blue/package.py b/var/spack/repos/builtin/packages/hoomd-blue/package.py index 97ce9c0cf0..32fdff9426 100644 --- a/var/spack/repos/builtin/packages/hoomd-blue/package.py +++ b/var/spack/repos/builtin/packages/hoomd-blue/package.py @@ -49,10 +49,14 @@ class HoomdBlue(Package): cmake_args.append('-DENABLE_CUDA=OFF') # CUDA-aware MPI library support - if '+cuda' in spec and '+mpi' in spec: - cmake_args.append('-DENABLE_MPI_CUDA=ON') - else: - cmake_args.append('-DENABLE_MPI_CUDA=OFF') + #if '+cuda' in spec and '+mpi' in spec: + # cmake_args.append('-DENABLE_MPI_CUDA=ON') + #else: + # cmake_args.append('-DENABLE_MPI_CUDA=OFF') + + # There may be a bug in the MPI-CUDA code. See: + # https://groups.google.com/forum/#!msg/hoomd-users/2griTESmc5I/E69s_M5fDwAJ + cmake_args.append('-DENABLE_MPI_CUDA=OFF') # Documentation if '+doc' in spec: @@ -64,4 +68,5 @@ class HoomdBlue(Package): cmake('.', *cmake_args) make() + make("test") make("install") -- cgit v1.2.3-70-g09d2 From b909da759d7b6d0443a97c13ba1c97118acd3e7a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 19:26:03 +0200 Subject: petsc: remove no longer needed -Qunused-arguments hack --- var/spack/repos/builtin/packages/petsc/package.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index e9b7c8a732..5c1fc6cc92 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -71,19 +71,10 @@ class Petsc(Package): errors = ['incompatible variants given'] + errors raise RuntimeError('\n'.join(errors)) else: - if self.compiler.name == "clang": - compiler_opts = [ - '--with-mpi=1', - '--with-cc=%s -Qunused-arguments' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # Avoid confusing PETSc config by clang: warning: argument unused during compilation - '--with-cxx=%s -Qunused-arguments' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), - '--with-fc=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - '--with-f77=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif77'), - ] - else: - compiler_opts = [ - '--with-mpi=1', - '--with-mpi-dir=%s' % self.spec['mpi'].prefix, - ] + compiler_opts = [ + '--with-mpi=1', + '--with-mpi-dir=%s' % self.spec['mpi'].prefix, + ] return compiler_opts def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 01657e6991197c999180c2fec367fc75e59fba15 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 30 Mar 2016 11:41:25 -0700 Subject: Make suite-sparse use spack compilers. --- var/spack/repos/builtin/packages/suite-sparse/package.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index b57f9967c3..c2196dcec4 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -23,4 +23,14 @@ class SuiteSparse(Package): # FIXME : this actually uses the current workaround # FIXME : (blas / lapack always provide libblas and liblapack as aliases) - make('install', 'INSTALL=%s' % prefix, 'BLAS=-lblas', 'LAPACK=-llapack') + make('install', 'INSTALL=%s' % prefix, + + # inject Spack compiler wrappers + 'AUTOCC=no', + 'CC=cc', + 'CXX=c++', + 'F77=f77', + + # BLAS arguments require path to libraries + 'BLAS=-lblas', + 'LAPACK=-llapack') -- cgit v1.2.3-70-g09d2 From 5506e89aa9f45b94a7b16a24e24e3c081fdf1e38 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 30 Mar 2016 21:41:23 +0200 Subject: rename variant doxygen to doc --- var/spack/repos/builtin/packages/dealii/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 32dfb33c6d..7aaf33380e 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -11,7 +11,7 @@ class Dealii(Package): variant('mpi', default=True, description='Compile with MPI') variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') - variant('doxygen', default=False, description='Compile with Doxygen documentation') + variant('doc', default=False, description='Compile with documentation') variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') variant('metis', default=True, description='Compile with Metis') variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') @@ -36,7 +36,7 @@ class Dealii(Package): # optional dependencies depends_on ("mpi", when="+mpi") depends_on ("arpack-ng+mpi", when='+arpack+mpi') - depends_on ("doxygen", when='+doxygen') + depends_on ("doxygen", when='+doc') depends_on ("hdf5+mpi~cxx", when='+hdf5+mpi') #FIXME NetCDF declares dependency with ~cxx, why? depends_on ("metis", when='+metis') depends_on ("netcdf+mpi", when="+netcdf+mpi") @@ -111,7 +111,7 @@ class Dealii(Package): # doxygen options.extend([ - '-DDEAL_II_COMPONENT_DOCUMENTATION=%s' % ('ON' if '+doxygen' in spec else 'OFF'), + '-DDEAL_II_COMPONENT_DOCUMENTATION=%s' % ('ON' if '+doc' in spec else 'OFF'), ]) -- cgit v1.2.3-70-g09d2 From dbb25bfeed7113cbd6be090df52b97fcc10588e1 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 30 Mar 2016 16:17:52 -0400 Subject: ninja: fix installation on OS X The cp -t flag is a GNU-ism. Instead, add a trailing slash to bindir to ensure that it is not treated as a file. --- var/spack/repos/builtin/packages/ninja/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py index 9e6bf4e358..0722dd49a6 100644 --- a/var/spack/repos/builtin/packages/ninja/package.py +++ b/var/spack/repos/builtin/packages/ninja/package.py @@ -16,7 +16,7 @@ class Ninja(Package): cp = which('cp') - bindir = os.path.join(prefix, 'bin') + bindir = os.path.join(prefix, 'bin/') mkdir(bindir) - cp('-a', '-t', bindir, 'ninja') - cp('-ra', 'misc', prefix) + cp('-a', 'ninja', bindir) + cp('-a', 'misc', prefix) -- cgit v1.2.3-70-g09d2 From d1a3adfcf09fb489acce9d29b2f9494df5f5d848 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 14:25:44 -0600 Subject: + Make --disable-perl the default configure option. --- var/spack/repos/builtin/packages/graphviz/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 84bd696af2..a45cd8743e 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -7,7 +7,11 @@ class Graphviz(Package): version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae') - variant('perl', default=True, description='Disable if you have problems with the optional script language bindings') + # By default disable optional Perl language support to prevent build issues + # related to missing Perl packages. If spack begins support for Perl in the + # future, this package can be updated to depend_on('perl') and the + # ncecessary devel packages. + variant('perl', default=False, description='Disable if you have problems with the optional script language bindings') parallel = False @@ -17,7 +21,7 @@ class Graphviz(Package): def install(self, spec, prefix): options = ['--prefix=%s' % prefix] - if '~perl' in spec: + if not '+perl' in spec: options.append('--disable-perl') configure(*options) -- cgit v1.2.3-70-g09d2 From 4ab362ae17da96db2a5fb7bacb3035824817c15d Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 14:27:23 -0600 Subject: + Fix variant description. --- var/spack/repos/builtin/packages/graphviz/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index a45cd8743e..ecf92620d4 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -11,7 +11,7 @@ class Graphviz(Package): # related to missing Perl packages. If spack begins support for Perl in the # future, this package can be updated to depend_on('perl') and the # ncecessary devel packages. - variant('perl', default=False, description='Disable if you have problems with the optional script language bindings') + variant('perl', default=False, description='Enable if you need the optional Perl language bindings.') parallel = False -- cgit v1.2.3-70-g09d2 From 2bc43f7f3724e86c3ff8875ce0c91178cbc31a6f Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 30 Mar 2016 16:44:08 -0400 Subject: docs: add a link to the spack repo in the PR section --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8664953c0c..1977a4fee9 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,8 @@ can join it here: At the moment, contributing to Spack is relatively simple. Just send us a [pull request](https://help.github.com/articles/using-pull-requests/). -When you send your request, make ``develop`` the destination branch. +When you send your request, make ``develop`` the destination branch on the +[Spack repository](https://github.com/LLNL/spack). Spack is using a rough approximation of the [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) -- cgit v1.2.3-70-g09d2 From f1a0619821fc4c4aaa0a13b114ecaf8ca35b1ce9 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 30 Mar 2016 17:19:29 -0400 Subject: mpich: disable fortran without a fortran compiler --- var/spack/repos/builtin/packages/mpich/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index b20dc8dd60..2d7955e08d 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -78,6 +78,9 @@ class Mpich(Package): if not self.compiler.fc: config_args.append("--disable-fc") + if not self.compiler.fc and not self.compiler.f77: + config_args.append("--disable-fortran") + configure(*config_args) make() make("install") -- cgit v1.2.3-70-g09d2 From 2ad5d2ea2a280dd81a254458fcfb465073aef8da Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 15:40:04 -0600 Subject: + For darwin, add a dependency on gettext. This change was recommended in the discussion for PR#601. --- var/spack/repos/builtin/packages/numdiff/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py index a51f6206cf..e72c60fadb 100644 --- a/var/spack/repos/builtin/packages/numdiff/package.py +++ b/var/spack/repos/builtin/packages/numdiff/package.py @@ -23,6 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import sys class Numdiff(Package): """Numdiff is a little program that can be used to compare putatively @@ -34,6 +35,8 @@ class Numdiff(Package): version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e') + depends_on('gettext', sys.platform=='darwin') + def install(self, spec, prefix): options = ['--prefix=%s' % prefix] configure(*options) -- cgit v1.2.3-70-g09d2 From a364ab0d0f5ac226ba9d5a519f2da8ab7a09a846 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 17:12:32 -0600 Subject: libpng depends on zlib. --- var/spack/repos/builtin/packages/libpng/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py index e02b08663e..73c8c62341 100644 --- a/var/spack/repos/builtin/packages/libpng/package.py +++ b/var/spack/repos/builtin/packages/libpng/package.py @@ -9,6 +9,8 @@ class Libpng(Package): version('1.6.15', '829a256f3de9307731d4f52dc071916d') version('1.6.14', '2101b3de1d5f348925990f9aa8405660') + depends_on('zlib') + def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() -- cgit v1.2.3-70-g09d2 From a88c15e1010ccadd2f81de9edac48b140d70f9f1 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 30 Mar 2016 21:18:04 -0600 Subject: + libdrm depends_on libpciaccess. Use spack provided libpciaccess. --- var/spack/repos/builtin/packages/libdrm/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libdrm/package.py b/var/spack/repos/builtin/packages/libdrm/package.py index 00736b7811..d5d779f796 100644 --- a/var/spack/repos/builtin/packages/libdrm/package.py +++ b/var/spack/repos/builtin/packages/libdrm/package.py @@ -2,7 +2,7 @@ from spack import * class Libdrm(Package): """A userspace library for accessing the DRM, direct - rendering manager, on Linux, BSD and other operating + rendering manager, on Linux, BSD and other operating systems that support the ioctl interface.""" homepage = "http://dri.freedesktop.org/libdrm/" # no real website... @@ -11,6 +11,8 @@ class Libdrm(Package): version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6') version('2.4.33', '86e4e3debe7087d5404461e0032231c8') + depends_on('libpciaccess') + def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 44b89474453bf80fd603eb5ea5b629b0d9dff123 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 30 Mar 2016 23:33:57 -0700 Subject: arpack-ng needs an extra libtoolize to build. --- var/spack/repos/builtin/packages/arpack-ng/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py index dd86b17a53..6b152f7863 100644 --- a/var/spack/repos/builtin/packages/arpack-ng/package.py +++ b/var/spack/repos/builtin/packages/arpack-ng/package.py @@ -41,10 +41,17 @@ class ArpackNg(Package): depends_on('blas') depends_on('lapack') + depends_on('automake') + depends_on('autoconf') + depends_on('libtool@2.4.2:') + depends_on('mpi', when='+mpi') 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') options = ['--prefix=%s' % prefix] -- cgit v1.2.3-70-g09d2 From 397e0d1368d8f6077cb7ea59ee953b993ef3d244 Mon Sep 17 00:00:00 2001 From: Mayeul d'Avezac Date: Thu, 31 Mar 2016 10:12:20 +0100 Subject: Fixes #454 in a simpler way than 34a8f0c Rather than mess with the environment, have espresso install into the right directory (prefix/bin). --- var/spack/repos/builtin/packages/espresso/package.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index 59f362ab46..167bb38e38 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -24,7 +24,7 @@ class Espresso(Package): depends_on('fftw~mpi', when='~mpi') depends_on('fftw+mpi', when='+mpi') depends_on('scalapack', when='+scalapack+mpi') # TODO : + mpi needed to avoid false dependencies installation - + def check_variants(self, spec): error = 'you cannot ask for \'+{variant}\' when \'+mpi\' is not active' if '+scalapack' in spec and '~mpi' in spec: @@ -32,14 +32,10 @@ class Espresso(Package): if '+elpa' in spec and ('~mpi' in spec or '~scalapack' in spec): raise RuntimeError(error.format(variant='elpa')) - def setup_environment(self, spack_env, run_env): - # Espresso copies every executable in prefix without creating sub-folders - run_env.prepend_path('PATH', self.prefix) - def install(self, spec, prefix): self.check_variants(spec) - options = ['-prefix=%s' % prefix] + options = ['-prefix=%s' % prefix.bin] if '+mpi' in spec: options.append('--enable-parallel') -- cgit v1.2.3-70-g09d2 From 7430f9142fc3fc590232a21a193321be9de33df7 Mon Sep 17 00:00:00 2001 From: Mayeul d'Avezac Date: Thu, 31 Mar 2016 10:16:40 +0100 Subject: Can install espresso on OS/X Espresso uses unix utility `find dir -name \*.x` to determine the executable to install. On OS/X, it also finds a bunch of debug symbols associated with the exectuble. These files have the same name, but are in a different directory. So the install process is done by hand in the package.py file, for OS/X. --- var/spack/repos/builtin/packages/espresso/package.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index 167bb38e38..0dad57a9f6 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -33,6 +33,7 @@ class Espresso(Package): raise RuntimeError(error.format(variant='elpa')) def install(self, spec, prefix): + from glob import glob self.check_variants(spec) options = ['-prefix=%s' % prefix.bin] @@ -61,5 +62,11 @@ class Espresso(Package): configure(*options) make('all') - make('install') + + if spec.architecture.startswith('darwin'): + mkdirp(prefix.bin) + for filename in glob("bin/*.x"): + install(filename, prefix.bin) + else: + make('install') -- cgit v1.2.3-70-g09d2 From 4f6320a7eb14f7d09c1e31a92d224e54e32c3921 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 31 Mar 2016 13:22:48 +0200 Subject: uninstall : added unit tests --- lib/spack/spack/test/__init__.py | 3 +- lib/spack/spack/test/cmd/__init__.py | 0 lib/spack/spack/test/cmd/uninstall.py | 37 ++++++++++++++++ lib/spack/spack/test/database.py | 82 +---------------------------------- lib/spack/spack/test/mock_database.py | 78 +++++++++++++++++++++++++++++++++ 5 files changed, 119 insertions(+), 81 deletions(-) create mode 100644 lib/spack/spack/test/cmd/__init__.py create mode 100644 lib/spack/spack/test/cmd/uninstall.py create mode 100644 lib/spack/spack/test/mock_database.py diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index cd842561e6..175a49428c 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -67,7 +67,8 @@ test_names = ['versions', 'namespace_trie', 'yaml', 'sbang', - 'environment'] + 'environment', + 'cmd.uninstall'] def list_tests(): diff --git a/lib/spack/spack/test/cmd/__init__.py b/lib/spack/spack/test/cmd/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/spack/spack/test/cmd/uninstall.py b/lib/spack/spack/test/cmd/uninstall.py new file mode 100644 index 0000000000..06a24e2958 --- /dev/null +++ b/lib/spack/spack/test/cmd/uninstall.py @@ -0,0 +1,37 @@ +import spack.test.mock_database + +from spack.cmd.uninstall import uninstall + + +class MockArgs(object): + def __init__(self, packages, all=False, force=False, recursive=False): + self.packages = packages + self.all = all + self.force = force + self.recursive = recursive + self.yes_to_all = True + + +class TestUninstall(spack.test.mock_database.MockDatabase): + def test_uninstall(self): + parser = None + # Multiple matches + args = MockArgs(['mpileaks']) + self.assertRaises(SystemExit, uninstall, parser, args) + # Installed dependents + args = MockArgs(['libelf']) + self.assertRaises(SystemExit, uninstall, parser, args) + # Recursive uninstall + args = MockArgs(['callpath'], all=True, recursive=True) + uninstall(parser, args) + + all_specs = spack.install_layout.all_specs() + self.assertEqual(len(all_specs), 7) + # query specs with multiple configurations + mpileaks_specs = [s for s in all_specs if s.satisfies('mpileaks')] + callpath_specs = [s for s in all_specs if s.satisfies('callpath')] + mpi_specs = [s for s in all_specs if s.satisfies('mpi')] + + self.assertEqual(len(mpileaks_specs), 0) + self.assertEqual(len(callpath_specs), 0) + self.assertEqual(len(mpi_specs), 3) diff --git a/lib/spack/spack/test/database.py b/lib/spack/spack/test/database.py index ce6e8a0552..465263d057 100644 --- a/lib/spack/spack/test/database.py +++ b/lib/spack/spack/test/database.py @@ -28,16 +28,12 @@ both in memory and in its file """ import os.path import multiprocessing -import shutil -import tempfile import spack from llnl.util.filesystem import join_path from llnl.util.lock import * from llnl.util.tty.colify import colify -from spack.database import Database -from spack.directory_layout import YamlDirectoryLayout -from spack.test.mock_packages_test import * +from spack.test.mock_database import MockDatabase def _print_ref_counts(): @@ -75,80 +71,7 @@ def _print_ref_counts(): colify(recs, cols=3) -class DatabaseTest(MockPackagesTest): - - def _mock_install(self, spec): - s = Spec(spec) - s.concretize() - pkg = spack.repo.get(s) - pkg.do_install(fake=True) - - - def _mock_remove(self, spec): - specs = spack.installed_db.query(spec) - assert(len(specs) == 1) - spec = specs[0] - spec.package.do_uninstall(spec) - - - def setUp(self): - super(DatabaseTest, self).setUp() - # - # TODO: make the mockup below easier. - # - - # Make a fake install directory - self.install_path = tempfile.mkdtemp() - self.spack_install_path = spack.install_path - spack.install_path = self.install_path - - self.install_layout = YamlDirectoryLayout(self.install_path) - self.spack_install_layout = spack.install_layout - spack.install_layout = self.install_layout - - # Make fake database and fake install directory. - self.installed_db = Database(self.install_path) - self.spack_installed_db = spack.installed_db - spack.installed_db = self.installed_db - - # make a mock database with some packages installed note that - # the ref count for dyninst here will be 3, as it's recycled - # across each install. - # - # Here is what the mock DB looks like: - # - # o mpileaks o mpileaks' o mpileaks'' - # |\ |\ |\ - # | o callpath | o callpath' | o callpath'' - # |/| |/| |/| - # o | mpich o | mpich2 o | zmpi - # | | o | fake - # | | | - # | |______________/ - # | .____________/ - # |/ - # o dyninst - # |\ - # | o libdwarf - # |/ - # o libelf - # - - # Transaction used to avoid repeated writes. - with spack.installed_db.write_transaction(): - self._mock_install('mpileaks ^mpich') - self._mock_install('mpileaks ^mpich2') - self._mock_install('mpileaks ^zmpi') - - - def tearDown(self): - super(DatabaseTest, self).tearDown() - shutil.rmtree(self.install_path) - spack.install_path = self.spack_install_path - spack.install_layout = self.spack_install_layout - spack.installed_db = self.spack_installed_db - - +class DatabaseTest(MockDatabase): def test_005_db_exists(self): """Make sure db cache file exists after creating.""" index_file = join_path(self.install_path, '.spack-db', 'index.yaml') @@ -157,7 +80,6 @@ class DatabaseTest(MockPackagesTest): self.assertTrue(os.path.exists(index_file)) self.assertTrue(os.path.exists(lock_file)) - def test_010_all_install_sanity(self): """Ensure that the install layout reflects what we think it does.""" all_specs = spack.install_layout.all_specs() diff --git a/lib/spack/spack/test/mock_database.py b/lib/spack/spack/test/mock_database.py new file mode 100644 index 0000000000..6fd05439bf --- /dev/null +++ b/lib/spack/spack/test/mock_database.py @@ -0,0 +1,78 @@ +import shutil +import tempfile + +import spack +from spack.spec import Spec +from spack.database import Database +from spack.directory_layout import YamlDirectoryLayout +from spack.test.mock_packages_test import MockPackagesTest + + +class MockDatabase(MockPackagesTest): + def _mock_install(self, spec): + s = Spec(spec) + s.concretize() + pkg = spack.repo.get(s) + pkg.do_install(fake=True) + + def _mock_remove(self, spec): + specs = spack.installed_db.query(spec) + assert(len(specs) == 1) + spec = specs[0] + spec.package.do_uninstall(spec) + + def setUp(self): + super(MockDatabase, self).setUp() + # + # TODO: make the mockup below easier. + # + + # Make a fake install directory + self.install_path = tempfile.mkdtemp() + self.spack_install_path = spack.install_path + spack.install_path = self.install_path + + self.install_layout = YamlDirectoryLayout(self.install_path) + self.spack_install_layout = spack.install_layout + spack.install_layout = self.install_layout + + # Make fake database and fake install directory. + self.installed_db = Database(self.install_path) + self.spack_installed_db = spack.installed_db + spack.installed_db = self.installed_db + + # make a mock database with some packages installed note that + # the ref count for dyninst here will be 3, as it's recycled + # across each install. + # + # Here is what the mock DB looks like: + # + # o mpileaks o mpileaks' o mpileaks'' + # |\ |\ |\ + # | o callpath | o callpath' | o callpath'' + # |/| |/| |/| + # o | mpich o | mpich2 o | zmpi + # | | o | fake + # | | | + # | |______________/ + # | .____________/ + # |/ + # o dyninst + # |\ + # | o libdwarf + # |/ + # o libelf + # + + # Transaction used to avoid repeated writes. + with spack.installed_db.write_transaction(): + self._mock_install('mpileaks ^mpich') + self._mock_install('mpileaks ^mpich2') + self._mock_install('mpileaks ^zmpi') + + def tearDown(self): + super(MockDatabase, self).tearDown() + shutil.rmtree(self.install_path) + spack.install_path = self.spack_install_path + spack.install_layout = self.spack_install_layout + spack.installed_db = self.spack_installed_db -- cgit v1.2.3-70-g09d2 From 6d0b4a28abf8216ed141dac80a6779f6a51f03f1 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 31 Mar 2016 09:39:37 +0200 Subject: oce: fix bugs related to NULL pointers and compiler optimisation --- var/spack/repos/builtin/packages/dealii/package.py | 3 +- var/spack/repos/builtin/packages/oce/null.patch | 482 +++++++++++++++++++++ var/spack/repos/builtin/packages/oce/package.py | 22 +- 3 files changed, 502 insertions(+), 5 deletions(-) create mode 100644 var/spack/repos/builtin/packages/oce/null.patch diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 7aaf33380e..0b76db3827 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -235,5 +235,4 @@ class Dealii(Package): if 'oce' in spec: cmake('.') make('release') - if sys.platform != 'darwin': #FIXME - make('run',parallel=False) + make('run',parallel=False) diff --git a/var/spack/repos/builtin/packages/oce/null.patch b/var/spack/repos/builtin/packages/oce/null.patch new file mode 100644 index 0000000000..42a3f0e44f --- /dev/null +++ b/var/spack/repos/builtin/packages/oce/null.patch @@ -0,0 +1,482 @@ +From 61cb965b9ffeca419005bc15e635e67589c421dd Mon Sep 17 00:00:00 2001 +From: Martin Siggel +Date: Thu, 28 Jan 2016 19:05:00 +0100 +Subject: [PATCH] Workaround clang optimizations for null references + +OCCT/OCE includes some evil code that uses NULL references, +which are normally not possible. Clang removes code in +branches like if(&myNullRef==NULL) as it assumes this can +never be true. This fix was inspired from the mantis issue +http://tracker.dev.opencascade.org/view.php?id=26042. This +code will be fixed in OCCT 7, but we might require the fix +for earlier releases as well. + +Fixes issue #576 +--- + inc/PLib.hxx | 2 +- + src/BSplCLib/BSplCLib.cxx | 16 ++++++------- + src/BSplCLib/BSplCLib_2.cxx | 6 ++--- + src/BSplCLib/BSplCLib_CurveComputation.gxx | 26 ++++++++++----------- + src/BSplSLib/BSplSLib.cxx | 36 +++++++++++++++--------------- + src/BSplSLib/BSplSLib_BzSyntaxes.cxx | 2 +- + src/PLib/PLib.cxx | 10 ++++----- + 7 files changed, 49 insertions(+), 49 deletions(-) + +diff --git a/inc/PLib.hxx b/inc/PLib.hxx +index 7513234..52b1f84 100644 +--- a/inc/PLib.hxx ++++ b/inc/PLib.hxx +@@ -343,6 +343,6 @@ friend class PLib_DoubleJacobiPolynomial; + + + +- ++#define IS_NULL_REF(ref) ((reinterpret_cast(&ref) & 0xFFFFFF) == 0) + + #endif // _PLib_HeaderFile +diff --git a/src/BSplCLib/BSplCLib.cxx b/src/BSplCLib/BSplCLib.cxx +index 683e4ab..2a2d9ea 100644 +--- a/src/BSplCLib/BSplCLib.cxx ++++ b/src/BSplCLib/BSplCLib.cxx +@@ -298,7 +298,7 @@ void BSplCLib::LocateParameter + Standard_Real& NewU) + { + Standard_Integer first,last; +- if (&Mults) { ++ if (!IS_NULL_REF(Mults)) { + if (Periodic) { + first = Knots.Lower(); + last = Knots.Upper(); +@@ -1434,7 +1434,7 @@ void BSplCLib::BuildKnots(const Standard_Integer Degree, + const Standard_Real * pkn = &Knots(KLower); + pkn -= KLower; + Standard_Real *knot = &LK; +- if (&Mults == NULL) { ++ if (IS_NULL_REF(Mults)) { + switch (Degree) { + case 1 : { + Standard_Integer j = Index ; +@@ -1672,7 +1672,7 @@ Standard_Boolean BSplCLib::PrepareInsertKnots + const Standard_Real Tolerance, + const Standard_Boolean Add) + { +- Standard_Boolean addflat = &AddMults == NULL; ++ Standard_Boolean addflat = IS_NULL_REF(AddMults); + + Standard_Integer first,last; + if (Periodic) { +@@ -1856,7 +1856,7 @@ void BSplCLib::InsertKnots + const Standard_Real Tolerance, + const Standard_Boolean Add) + { +- Standard_Boolean addflat = &AddMults == NULL; ++ Standard_Boolean addflat = IS_NULL_REF(AddMults); + + Standard_Integer i,k,mult,firstmult; + Standard_Integer index,kn,curnk,curk; +@@ -3902,7 +3902,7 @@ void BSplCLib::Resolution( Standard_Real& Poles, + num_poles = FlatKnots.Length() - Deg1; + switch (ArrayDimension) { + case 2 : { +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + const Standard_Real * WG = &Weights(Weights.Lower()); + min_weights = WG[0]; + +@@ -3970,7 +3970,7 @@ void BSplCLib::Resolution( Standard_Real& Poles, + break; + } + case 3 : { +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + const Standard_Real * WG = &Weights(Weights.Lower()); + min_weights = WG[0]; + +@@ -4047,7 +4047,7 @@ void BSplCLib::Resolution( Standard_Real& Poles, + break; + } + case 4 : { +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + const Standard_Real * WG = &Weights(Weights.Lower()); + min_weights = WG[0]; + +@@ -4134,7 +4134,7 @@ void BSplCLib::Resolution( Standard_Real& Poles, + } + default : { + Standard_Integer kk; +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + const Standard_Real * WG = &Weights(Weights.Lower()); + min_weights = WG[0]; + +diff --git a/src/BSplCLib/BSplCLib_2.cxx b/src/BSplCLib/BSplCLib_2.cxx +index 35c4639..653b7cd 100644 +--- a/src/BSplCLib/BSplCLib_2.cxx ++++ b/src/BSplCLib/BSplCLib_2.cxx +@@ -70,7 +70,7 @@ void BSplCLib::BuildEval(const Standard_Integer Degree, + Standard_Integer i; + Standard_Integer ip = PLower + Index - 1; + Standard_Real w, *pole = &LP; +- if (&Weights == NULL) { ++ if (IS_NULL_REF(Weights)) { + + for (i = 0; i <= Degree; i++) { + ip++; +@@ -115,13 +115,13 @@ static void PrepareEval + + // make the knots + BSplCLib::BuildKnots(Degree,index,Periodic,Knots,Mults,*dc.knots); +- if (&Mults == NULL) ++ if (IS_NULL_REF(Mults)) + index -= Knots.Lower() + Degree; + else + index = BSplCLib::PoleIndex(Degree,index,Periodic,Mults); + + // check truly rational +- rational = (&Weights != NULL); ++ rational = (!IS_NULL_REF(Weights)); + if (rational) { + Standard_Integer WLower = Weights.Lower() + index; + rational = BSplCLib::IsRational(Weights, WLower, WLower + Degree); +diff --git a/src/BSplCLib/BSplCLib_CurveComputation.gxx b/src/BSplCLib/BSplCLib_CurveComputation.gxx +index e71b4e0..9d42643 100644 +--- a/src/BSplCLib/BSplCLib_CurveComputation.gxx ++++ b/src/BSplCLib/BSplCLib_CurveComputation.gxx +@@ -92,7 +92,7 @@ Standard_Boolean BSplCLib::RemoveKnot + TColStd_Array1OfInteger& NewMults, + const Standard_Real Tolerance) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim; + dim = Dimension_gen; + if (rational) dim++; +@@ -133,7 +133,7 @@ void BSplCLib::InsertKnots + const Standard_Real Epsilon, + const Standard_Boolean Add) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim; + dim = Dimension_gen; + if (rational) dim++; +@@ -222,7 +222,7 @@ void BSplCLib::IncreaseDegree + TColStd_Array1OfReal& NewKnots, + TColStd_Array1OfInteger& NewMults) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim; + dim = Dimension_gen; + if (rational) dim++; +@@ -256,7 +256,7 @@ void BSplCLib::Unperiodize + Array1OfPoints& NewPoles, + TColStd_Array1OfReal& NewWeights) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim; + dim = Dimension_gen; + if (rational) dim++; +@@ -292,7 +292,7 @@ void BSplCLib::Trimming(const Standard_Integer Degree, + Array1OfPoints& NewPoles, + TColStd_Array1OfReal& NewWeights) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim; + dim = Dimension_gen; + if (rational) dim++; +@@ -339,7 +339,7 @@ void BSplCLib::BuildEval(const Standard_Integer Degree, + Standard_Integer PUpper = Poles.Upper(); + Standard_Integer i; + Standard_Integer ip = PLower + Index - 1; +- if (&Weights == NULL) { ++ if (IS_NULL_REF(Weights)) { + for (i = 0; i <= Degree; i++) { + ip++; + if (ip > PUpper) ip = PLower; +@@ -384,13 +384,13 @@ static void PrepareEval + + // make the knots + BSplCLib::BuildKnots(Degree,index,Periodic,Knots,Mults,*dc.knots); +- if (&Mults == NULL) ++ if (IS_NULL_REF(Mults)) + index -= Knots.Lower() + Degree; + else + index = BSplCLib::PoleIndex(Degree,index,Periodic,Mults); + + // check truly rational +- rational = (&Weights != NULL); ++ rational = (!IS_NULL_REF(Weights)); + if (rational) { + Standard_Integer WLower = Weights.Lower() + index; + rational = BSplCLib::IsRational(Weights, WLower, WLower + Degree); +@@ -741,7 +741,7 @@ void BSplCLib::CacheD0(const Standard_Real Parameter, + Degree * Dimension_gen, + PArray[0], + myPoint[0]) ; +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + Standard_Real * + WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ; + PLib::NoDerivativeEvalPolynomial(NewParameter, +@@ -798,7 +798,7 @@ void BSplCLib::CacheD1(const Standard_Real Parameter, + + ModifyCoords (LocalPDerivatives + Dimension_gen, /= SpanLenght); + +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + Standard_Real * + WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ; + PLib::EvalPolynomial(NewParameter, +@@ -878,7 +878,7 @@ void BSplCLib::CacheD2(const Standard_Real Parameter, + Index += Dimension_gen; + } + +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + Standard_Real * + WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ; + +@@ -971,7 +971,7 @@ void BSplCLib::CacheD3(const Standard_Real Parameter, + Index += Dimension_gen; + } + +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + Standard_Real * + WArray = (Standard_Real *) &WeightsArray(WeightsArray.Lower()) ; + +@@ -1081,7 +1081,7 @@ void BSplCLib::BuildCache + LocalValue *= SpanDomain / (Standard_Real) ii ; + } + +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + for (ii = 1 ; ii <= Degree + 1 ; ii++) + CacheWeights(ii) = 0.0e0 ; + CacheWeights(1) = 1.0e0 ; +diff --git a/src/BSplSLib/BSplSLib.cxx b/src/BSplSLib/BSplSLib.cxx +index 5ad633c..07040d5 100644 +--- a/src/BSplSLib/BSplSLib.cxx ++++ b/src/BSplSLib/BSplSLib.cxx +@@ -309,12 +309,12 @@ static Standard_Boolean PrepareEval (const Standard_Real U, + BSplCLib::BuildKnots(UDegree,uindex,UPer,UKnots,UMults,*dc.knots1); + BSplCLib::BuildKnots(VDegree,vindex,VPer,VKnots,VMults,*dc.knots2); + +- if (&UMults == NULL) ++ if (IS_NULL_REF(UMults)) + uindex -= UKLower + UDegree; + else + uindex = BSplCLib::PoleIndex(UDegree,uindex,UPer,UMults); + +- if (&VMults == NULL) ++ if (IS_NULL_REF(VMults)) + vindex -= VKLower + VDegree; + else + vindex = BSplCLib::PoleIndex(VDegree,vindex,VPer,VMults); +@@ -460,12 +460,12 @@ static Standard_Boolean PrepareEval (const Standard_Real U, + BSplCLib::BuildKnots(UDegree,uindex,UPer,UKnots,UMults,*dc.knots2); + BSplCLib::BuildKnots(VDegree,vindex,VPer,VKnots,VMults,*dc.knots1); + +- if (&UMults == NULL) ++ if (IS_NULL_REF(UMults)) + uindex -= UKLower + UDegree; + else + uindex = BSplCLib::PoleIndex(UDegree,uindex,UPer,UMults); + +- if (&VMults == NULL) ++ if (IS_NULL_REF(VMults)) + vindex -= VKLower + VDegree; + else + vindex = BSplCLib::PoleIndex(VDegree,vindex,VPer,VMults); +@@ -1299,7 +1299,7 @@ void BSplSLib::Iso(const Standard_Real Param, + { + Standard_Integer index = 0; + Standard_Real u = Param; +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim = rational ? 4 : 3; + + // compute local knots +@@ -1307,7 +1307,7 @@ void BSplSLib::Iso(const Standard_Real Param, + NCollection_LocalArray locknots1 (2*Degree); + BSplCLib::LocateParameter(Degree,Knots,Mults,u,Periodic,index,u); + BSplCLib::BuildKnots(Degree,index,Periodic,Knots,Mults,*locknots1); +- if (&Mults == NULL) ++ if (IS_NULL_REF(Mults)) + index -= Knots.Lower() + Degree; + else + index = BSplCLib::PoleIndex(Degree,index,Periodic,Mults); +@@ -1381,7 +1381,7 @@ void BSplSLib::Iso(const Standard_Real Param, + } + + // if the input is not rational but weights are wanted +- if (!rational && (&CWeights != NULL)) { ++ if (!rational && (!IS_NULL_REF(CWeights))) { + + for (i = CWeights.Lower(); i <= CWeights.Upper(); i++) + CWeights(i) = 1.; +@@ -1741,7 +1741,7 @@ void BSplSLib::InsertKnots(const Standard_Boolean UDirection, + const Standard_Real Epsilon, + const Standard_Boolean Add ) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim = 3; + if (rational) dim++; + +@@ -1787,7 +1787,7 @@ Standard_Boolean BSplSLib::RemoveKnot + TColStd_Array1OfInteger& NewMults, + const Standard_Real Tolerance) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim = 3; + if (rational) dim++; + +@@ -1834,7 +1834,7 @@ void BSplSLib::IncreaseDegree + TColStd_Array1OfReal& NewKnots, + TColStd_Array1OfInteger& NewMults) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim = 3; + if (rational) dim++; + +@@ -1876,7 +1876,7 @@ void BSplSLib::Unperiodize + TColgp_Array2OfPnt& NewPoles, + TColStd_Array2OfReal& NewWeights) + { +- Standard_Boolean rational = &Weights != NULL; ++ Standard_Boolean rational = !IS_NULL_REF(Weights); + Standard_Integer dim = 3; + if (rational) dim++; + +@@ -1929,7 +1929,7 @@ void BSplSLib::BuildCache + Standard_Boolean rational,rational_u,rational_v,flag_u_or_v; + Standard_Integer kk,d1,d1p1,d2,d2p1,ii,jj,iii,jjj,Index; + Standard_Real u1,min_degree_domain,max_degree_domain,f,factor[2],u2; +- if (&Weights != NULL) ++ if (!IS_NULL_REF(Weights)) + rational_u = rational_v = Standard_True; + else + rational_u = rational_v = Standard_False; +@@ -2025,7 +2025,7 @@ void BSplSLib::BuildCache + } + factor[0] *= max_degree_domain / (Standard_Real) (iii) ; + } +- if (&Weights != NULL) { ++ if (!IS_NULL_REF(Weights)) { + // + // means that PrepareEval did found out that the surface was + // locally polynomial but since the surface is constructed +@@ -2110,7 +2110,7 @@ void BSplSLib::CacheD0(const Standard_Real UParameter, + (min_degree << 1) + min_degree, + locpoles[0], + myPoint[0]) ; +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + dimension = min_degree + 1 ; + Standard_Real * + WArray = (Standard_Real *) +@@ -2190,7 +2190,7 @@ void BSplSLib::CacheD1(const Standard_Real UParameter, + // the coefficients + // + // +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + + local_poles_array [0][0][0] = 0.0e0 ; + local_poles_array [0][0][1] = 0.0e0 ; +@@ -2275,7 +2275,7 @@ void BSplSLib::CacheD1(const Standard_Real UParameter, + locpoles[dimension], + local_poles_array[1][0][0]) ; + +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + dimension = min_degree + 1 ; + Standard_Real * + WArray = (Standard_Real *) +@@ -2435,7 +2435,7 @@ void BSplSLib::CacheD2(const Standard_Real UParameter, + // the coefficients + // + // +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + + local_poles_and_weights_array[0][0][0] = 0.0e0 ; + local_poles_and_weights_array[0][0][1] = 0.0e0 ; +@@ -2564,7 +2564,7 @@ void BSplSLib::CacheD2(const Standard_Real UParameter, + locpoles[dimension + dimension], + local_poles_array[2][0][0]) ; + +- if (&WeightsArray != NULL) { ++ if (!IS_NULL_REF(WeightsArray)) { + dimension = min_degree + 1 ; + Standard_Real * + WArray = (Standard_Real *) +diff --git a/src/BSplSLib/BSplSLib_BzSyntaxes.cxx b/src/BSplSLib/BSplSLib_BzSyntaxes.cxx +index 0faf6b6..f2c0f74 100644 +--- a/src/BSplSLib/BSplSLib_BzSyntaxes.cxx ++++ b/src/BSplSLib/BSplSLib_BzSyntaxes.cxx +@@ -68,7 +68,7 @@ void BSplSLib::PolesCoefficients (const TColgp_Array2OfPnt& Poles, + biduflatknots,bidvflatknots, + Poles,Weights, + CPoles,CWeights); +- if (&Weights == NULL) { ++ if (IS_NULL_REF(Weights)) { + + for (ii = 1; ii <= uclas; ii++) { + +diff --git a/src/PLib/PLib.cxx b/src/PLib/PLib.cxx +index 23fa302..7ee231f 100644 +--- a/src/PLib/PLib.cxx ++++ b/src/PLib/PLib.cxx +@@ -2427,7 +2427,7 @@ void PLib::CoefficientsPoles (const Standard_Integer dim, + TColStd_Array1OfReal& Poles, + TColStd_Array1OfReal& Weights) + { +- Standard_Boolean rat = &WCoefs != NULL; ++ Standard_Boolean rat = !IS_NULL_REF(WCoefs); + Standard_Integer loc = Coefs.Lower(); + Standard_Integer lop = Poles.Lower(); + Standard_Integer lowc=0; +@@ -2550,7 +2550,7 @@ void PLib::Trimming(const Standard_Real U1, + Standard_Integer indc, indw=0; + Standard_Integer upc = Coefs.Upper() - dim + 1, upw=0; + Standard_Integer len = Coefs.Length()/dim; +- Standard_Boolean rat = &WCoefs != NULL; ++ Standard_Boolean rat = !IS_NULL_REF(WCoefs); + + if (rat) { + if(len != WCoefs.Length()) +@@ -2607,7 +2607,7 @@ void PLib::CoefficientsPoles (const TColgp_Array2OfPnt& Coefs, + TColgp_Array2OfPnt& Poles, + TColStd_Array2OfReal& Weights) + { +- Standard_Boolean rat = (&WCoefs != NULL); ++ Standard_Boolean rat = (!IS_NULL_REF(WCoefs)); + Standard_Integer LowerRow = Poles.LowerRow(); + Standard_Integer UpperRow = Poles.UpperRow(); + Standard_Integer LowerCol = Poles.LowerCol(); +@@ -2701,7 +2701,7 @@ void PLib::UTrimming(const Standard_Real U1, + TColgp_Array2OfPnt& Coeffs, + TColStd_Array2OfReal& WCoeffs) + { +- Standard_Boolean rat = &WCoeffs != NULL; ++ Standard_Boolean rat = !IS_NULL_REF(WCoeffs); + Standard_Integer lr = Coeffs.LowerRow(); + Standard_Integer ur = Coeffs.UpperRow(); + Standard_Integer lc = Coeffs.LowerCol(); +@@ -2735,7 +2735,7 @@ void PLib::VTrimming(const Standard_Real V1, + TColgp_Array2OfPnt& Coeffs, + TColStd_Array2OfReal& WCoeffs) + { +- Standard_Boolean rat = &WCoeffs != NULL; ++ Standard_Boolean rat = !IS_NULL_REF(WCoeffs); + Standard_Integer lr = Coeffs.LowerRow(); + Standard_Integer ur = Coeffs.UpperRow(); + Standard_Integer lc = Coeffs.LowerCol(); \ No newline at end of file diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py index 4d5081ac9d..3fe6638e66 100644 --- a/var/spack/repos/builtin/packages/oce/package.py +++ b/var/spack/repos/builtin/packages/oce/package.py @@ -13,9 +13,20 @@ class Oce(Package): version('0.17' , 'f1a89395c4b0d199bea3db62b85f818d') version('0.16.1', '4d591b240c9293e879f50d86a0cb2bb3') version('0.16' , '7a4b4df5a104d75a537e25e7dd387eca') - version('0.15' , '7ec541a1c350ca8a684f74980e48801c') + + variant('tbb', default=True, description='Build with Intel Threading Building Blocks') depends_on('cmake@2.8:') + depends_on('tbb', when='+tbb') + + # There is a bug in OCE which appears with Clang (version?) or GCC 6.0 + # and has to do with compiler optimization, see + # https://github.com/tpaviot/oce/issues/576 + # 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') + def install(self, spec, prefix): options = [] @@ -23,12 +34,12 @@ class Oce(Package): options.extend([ '-DOCE_INSTALL_PREFIX=%s' % prefix, '-DOCE_BUILD_SHARED_LIB:BOOL=ON', - '-DOCE_BUILD_TYPE:STRING=Release', + '-DCMAKE_BUILD_TYPE:STRING=Release', '-DOCE_DATAEXCHANGE:BOOL=ON', '-DOCE_DISABLE_X11:BOOL=ON', '-DOCE_DRAW:BOOL=OFF', '-DOCE_MODEL:BOOL=ON', - '-DOCE_MULTITHREAD_LIBRARY:STRING=NONE', # FIXME: add tbb + '-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', @@ -46,6 +57,11 @@ class Oce(Package): 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) -- cgit v1.2.3-70-g09d2 From 0bcfd095362c5d04b9add7ebc882b74fad68f9dd Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Fri, 25 Mar 2016 13:25:29 -0400 Subject: add: VTK lastest versions --- var/spack/repos/builtin/packages/vtk/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index 4a27a8fedb..aeb03fe0a3 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -7,6 +7,10 @@ class Vtk(Package): homepage = "http://www.vtk.org" url = "http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz" + version("7.0.0", "5fe35312db5fb2341139b8e4955c367d", url="http://www.vtk.org/files/release/7.0/VTK-7.0.0.tar.gz") + + version("6.3.0", '0231ca4840408e9dd60af48b314c5b6d', url="http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz") + version('6.1.0', '25e4dfb3bad778722dcaec80cd5dab7d') depends_on("qt") -- cgit v1.2.3-70-g09d2 From 123996aad0c58bab7de6f615159b2fd7b44c7369 Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Thu, 31 Mar 2016 10:29:47 -0400 Subject: Fix build for vtk6.1.0 --- var/spack/repos/builtin/packages/vtk/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index aeb03fe0a3..b29d52d0f0 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -39,6 +39,10 @@ class Vtk(Package): if spec['qt'].satisfies('@5'): cmake_args.append("-DVTK_QT_VERSION:STRING=5") + if spec.satisfies("@6.1.0"): + cmake_args.append("-DCMAKE_C_FLAGS=-DGLX_GLXEXT_LEGACY") + cmake_args.append("-DCMAKE_CXX_FLAGS=-DGLX_GLXEXT_LEGACY") + cmake(*cmake_args) make() make("install") -- cgit v1.2.3-70-g09d2 From 3b0311a1e484a4f731d1cc6448dc6804410ecb3c Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Thu, 31 Mar 2016 10:30:32 -0400 Subject: Add variant opengl2, which is ON by default Needed for visit which depends on vtk@6.1.0~opengl2 --- var/spack/repos/builtin/packages/vtk/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index b29d52d0f0..24382af406 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -15,7 +15,15 @@ class Vtk(Package): depends_on("qt") + # VTK7 defaults to OpenGL2 rendering backend + variant('opengl2', default=True, description='Build with OpenGL instead of OpenGL2 as rendering backend') + def install(self, spec, prefix): + def feature_to_bool(feature, on='ON', off='OFF'): + if feature in spec: + return on + return off + with working_dir('spack-build', create=True): cmake_args = [ "..", @@ -43,6 +51,8 @@ class Vtk(Package): cmake_args.append("-DCMAKE_C_FLAGS=-DGLX_GLXEXT_LEGACY") cmake_args.append("-DCMAKE_CXX_FLAGS=-DGLX_GLXEXT_LEGACY") + cmake_args.append('-DVTK_RENDERING_BACKEND:STRING=%s' % feature_to_bool('+opengl2', 'OpenGL2', 'OpenGL')) + cmake(*cmake_args) make() make("install") -- cgit v1.2.3-70-g09d2 From a0902ad8d8a8c629eb921b8701332385d622bc12 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 31 Mar 2016 11:04:29 -0500 Subject: Change variant defaults and add comment --- var/spack/repos/builtin/packages/cuda/package.py | 6 +++++- var/spack/repos/builtin/packages/hoomd-blue/package.py | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index eca371d05a..ea083d8651 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -13,7 +13,11 @@ class Cuda(Package): For the Installer Type, select runfile and click Download. Spack will search your current directory for this file. Alternatively, add this file to a mirror so that Spack can find it. For instructions on how to set up a mirror, - see http://software.llnl.gov/spack/mirrors.html""" + see http://software.llnl.gov/spack/mirrors.html + + Note: This package does not currently install the drivers necessary to run + CUDA. These will need to be installed manually. See: + http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux for details.""" homepage = "http://www.nvidia.com/object/cuda_home_new.html" diff --git a/var/spack/repos/builtin/packages/hoomd-blue/package.py b/var/spack/repos/builtin/packages/hoomd-blue/package.py index 32fdff9426..d310b7687a 100644 --- a/var/spack/repos/builtin/packages/hoomd-blue/package.py +++ b/var/spack/repos/builtin/packages/hoomd-blue/package.py @@ -16,9 +16,9 @@ class HoomdBlue(Package): version('1.3.3', '1469ef4531dc14b579c0acddbfe6a273') - variant('mpi', default=False, description='Compile with MPI enabled') - variant('cuda', default=False, description='Compile with CUDA Toolkit') - variant('doc', default=False, description='Generate documentation') + variant('mpi', default=True, description='Compile with MPI enabled') + variant('cuda', default=True, description='Compile with CUDA Toolkit') + variant('doc', default=True, description='Generate documentation') extends('python') depends_on('py-numpy') @@ -56,6 +56,7 @@ class HoomdBlue(Package): # There may be a bug in the MPI-CUDA code. See: # https://groups.google.com/forum/#!msg/hoomd-users/2griTESmc5I/E69s_M5fDwAJ + # This prevented "make test" from passing for me. cmake_args.append('-DENABLE_MPI_CUDA=OFF') # Documentation -- cgit v1.2.3-70-g09d2 From 837eff1704d26fb654a964ecea91e268d728fff6 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 31 Mar 2016 18:07:44 +0200 Subject: openssl : special treatment for @external (fixes #647) --- .../repos/builtin/packages/openssl/package.py | 45 ++++++++++++++-------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 70afaf4038..db66d1f56e 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -30,26 +30,14 @@ class Openssl(Package): # Same idea, but just to avoid issuing the same message multiple times warnings_given_to_user = getattr(Openssl, '_warnings_given', {}) if openssl_url is None: - latest = 'http://www.openssl.org/source/openssl-{version}.tar.gz' - older = 'http://www.openssl.org/source/old/{version_number}/openssl-{version_full}.tar.gz' - # Try to use the url where the latest tarballs are stored. If the url does not exist (404), then - # return the url for older format - version_number = '.'.join([str(x) for x in version[:-1]]) - older_url = older.format(version_number=version_number, version_full=version) - latest_url = latest.format(version=version) - response = urllib.urlopen(latest.format(version=version)) - if response.getcode() == 404: - openssl_url = older_url - # Checks if we already warned the user for this particular version of OpenSSL. - # If not we display a warning message and mark this version + if self.spec.satisfies('@external'): + # The version @external is reserved to system openssl. In that case return a fake url and exit + openssl_url = '@external (reserved version for system openssl)' if not warnings_given_to_user.get(version, False): - tty.warn('This installation depends on an old version of OpenSSL, which may have known security issues. ') - tty.warn('Consider updating to the latest version of this package.') - tty.warn('More details at {homepage}'.format(homepage=Openssl.homepage)) + tty.msg('Using openssl@external : the version @external is reserved for system openssl') warnings_given_to_user[version] = True else: - openssl_url = latest_url - # Store the computed URL + openssl_url = self.check_for_outdated_release(version, warnings_given_to_user) # Store the computed URL openssl_urls[version] = openssl_url # Store the updated dictionary of URLS Openssl._openssl_url = openssl_urls @@ -58,6 +46,29 @@ class Openssl(Package): return openssl_url + def check_for_outdated_release(self, version, warnings_given_to_user): + latest = 'http://www.openssl.org/source/openssl-{version}.tar.gz' + older = 'http://www.openssl.org/source/old/{version_number}/openssl-{version_full}.tar.gz' + # Try to use the url where the latest tarballs are stored. If the url does not exist (404), then + # return the url for older format + version_number = '.'.join([str(x) for x in version[:-1]]) + older_url = older.format(version_number=version_number, version_full=version) + latest_url = latest.format(version=version) + response = urllib.urlopen(latest.format(version=version)) + if response.getcode() == 404: + openssl_url = older_url + # Checks if we already warned the user for this particular version of OpenSSL. + # If not we display a warning message and mark this version + if not warnings_given_to_user.get(version, False): + tty.warn( + 'This installation depends on an old version of OpenSSL, which may have known security issues. ') + tty.warn('Consider updating to the latest version of this package.') + tty.warn('More details at {homepage}'.format(homepage=Openssl.homepage)) + warnings_given_to_user[version] = True + else: + openssl_url = latest_url + return openssl_url + def install(self, spec, prefix): # OpenSSL uses a variable APPS in its Makefile. If it happens to be set # in the environment, then this will override what is set in the -- cgit v1.2.3-70-g09d2 From 63f824b218af9fcea4c13d7bef8b1d8ff31d09b2 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 30 Dec 2015 11:53:27 -0800 Subject: add a path argument to the stage command Allow users to use spack to stage a, potentially complex, package into a given path. This is nice for packages with multiple resources that must be placed, for example LLVM with all sub-projects. --- lib/spack/spack/cmd/stage.py | 8 +++++++- lib/spack/spack/package.py | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/cmd/stage.py b/lib/spack/spack/cmd/stage.py index 5786780efb..749fa90868 100644 --- a/lib/spack/spack/cmd/stage.py +++ b/lib/spack/spack/cmd/stage.py @@ -35,6 +35,9 @@ def setup_parser(subparser): subparser.add_argument( '-n', '--no-checksum', action='store_true', dest='no_checksum', help="Do not check downloaded packages against checksum") + subparser.add_argument( + '-p', '--path', dest='path', + help="Path to stage package, does not add to spack tree") subparser.add_argument( 'specs', nargs=argparse.REMAINDER, help="specs of packages to stage") @@ -50,4 +53,7 @@ def stage(parser, args): specs = spack.cmd.parse_specs(args.specs, concretize=True) for spec in specs: package = spack.repo.get(spec) - package.do_stage() + if args.path: + package.do_stage(path=args.path) + else: + package.do_stage() diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 9af3221837..ce314b7b0a 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -709,14 +709,18 @@ class Package(object): if spack.do_checksum and self.version in self.versions: self.stage.check() - - def do_stage(self, mirror_only=False): + def do_stage(self, mirror_only=False, path=None): """Unpacks the fetched tarball, then changes into the expanded tarball directory.""" + if not self.spec.concrete: raise ValueError("Can only stage concrete packages.") self.do_fetch(mirror_only) + + if path is not None: + self.stage.path = path + self.stage.expand_archive() self.stage.chdir_to_source() -- cgit v1.2.3-70-g09d2 From 5d2151ed645f853a083cd445ae8631f9ed987559 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Thu, 31 Mar 2016 10:20:55 -0700 Subject: reworked to deal with stage.path as property This version actually pulls the path through the package to deliver it to each stage on creation when passed through the command. This is necessary due to the new StageComposite class that makes setting the path directly on the stage impractical, it also takes the logic out of package for the most part, which seems like an improvement. --- lib/spack/spack/cmd/stage.py | 5 ++--- lib/spack/spack/package.py | 15 +++++++-------- lib/spack/spack/stage.py | 7 +++++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/cmd/stage.py b/lib/spack/spack/cmd/stage.py index 749fa90868..975bb54ef7 100644 --- a/lib/spack/spack/cmd/stage.py +++ b/lib/spack/spack/cmd/stage.py @@ -54,6 +54,5 @@ def stage(parser, args): for spec in specs: package = spack.repo.get(spec) if args.path: - package.do_stage(path=args.path) - else: - package.do_stage() + package.path = args.path + package.do_stage() diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index ce314b7b0a..9dcfbee661 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -335,6 +335,9 @@ class Package(object): if '.' in self.name: self.name = self.name[self.name.rindex('.') + 1:] + # Allow custom staging paths for packages + self.path=None + # Sanity check attributes required by Spack directives. spack.directives.ensure_dicts(type(self)) @@ -445,7 +448,8 @@ class Package(object): resource_stage_folder = self._resource_stage(resource) resource_mirror = join_path(self.name, os.path.basename(fetcher.url)) stage = ResourceStage(resource.fetcher, root=root_stage, resource=resource, - name=resource_stage_folder, mirror_path=resource_mirror) + name=resource_stage_folder, mirror_path=resource_mirror, + path=self.path) return stage def _make_root_stage(self, fetcher): @@ -455,7 +459,7 @@ class Package(object): s = self.spec stage_name = "%s-%s-%s" % (s.name, s.version, s.dag_hash()) # Build the composite stage - stage = Stage(fetcher, mirror_path=mp, name=stage_name) + stage = Stage(fetcher, mirror_path=mp, name=stage_name, path=self.path) return stage def _make_stage(self): @@ -709,18 +713,13 @@ class Package(object): if spack.do_checksum and self.version in self.versions: self.stage.check() - def do_stage(self, mirror_only=False, path=None): + def do_stage(self, mirror_only=False): """Unpacks the fetched tarball, then changes into the expanded tarball directory.""" - if not self.spec.concrete: raise ValueError("Can only stage concrete packages.") self.do_fetch(mirror_only) - - if path is not None: - self.stage.path = path - self.stage.expand_archive() self.stage.chdir_to_source() diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index f88f82fc2d..d711752c20 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -89,7 +89,7 @@ class Stage(object): """ def __init__(self, url_or_fetch_strategy, - name=None, mirror_path=None, keep=False): + name=None, mirror_path=None, keep=False, path=None): """Create a stage object. Parameters: url_or_fetch_strategy @@ -135,7 +135,10 @@ class Stage(object): # Try to construct here a temporary name for the stage directory # If this is a named stage, then construct a named path. - self.path = join_path(spack.stage_path, self.name) + if path is not None: + self.path = path + else: + self.path = join_path(spack.stage_path, self.name) # Flag to decide whether to delete the stage folder on exit or not self.keep = keep -- cgit v1.2.3-70-g09d2 From a670408617b76777d35185aa554eeaf3892e0188 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 31 Mar 2016 11:34:00 -0700 Subject: Quick fix for pkg diff. --- lib/spack/spack/cmd/pkg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py index cf478d3763..20a3fc5fc2 100644 --- a/lib/spack/spack/cmd/pkg.py +++ b/lib/spack/spack/cmd/pkg.py @@ -77,7 +77,8 @@ def get_git(): def list_packages(rev): git = get_git() - relpath = spack.packages_path[len(spack.prefix + os.path.sep):] + os.path.sep + pkgpath = os.path.join(spack.packages_path, 'packages') + relpath = pkgpath[len(spack.prefix + os.path.sep):] + os.path.sep output = git('ls-tree', '--full-tree', '--name-only', rev, relpath, output=str) return sorted(line[len(relpath):] for line in output.split('\n') if line) -- cgit v1.2.3-70-g09d2 From 66038ef729b5fb8d2efadc48c87a868370ca23c5 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 31 Mar 2016 13:34:56 -0500 Subject: Add url_for_version function and gtk variant --- var/spack/repos/builtin/packages/qt/package.py | 70 ++++++++++++++++---------- 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index d08e8e81e1..ab09469042 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -1,41 +1,31 @@ -import os from spack import * import os class Qt(Package): """Qt is a comprehensive cross-platform C++ application framework.""" - homepage = "http://qt.io" - list_url = 'http://download.qt-project.org/official_releases/qt/' - list_depth = 2 - - version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5', - url='http://download.qt-project.org/official_releases/qt/5.4/5.4.2/single/qt-everywhere-opensource-src-5.4.2.tar.gz') - - version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6', - url='http://download.qt-project.org/official_releases/qt/5.4/5.4.0/single/qt-everywhere-opensource-src-5.4.0.tar.gz') - - version('5.3.2', 'febb001129927a70174467ecb508a682', - url='http://download.qt.io/archive/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz') - - version('5.2.1', 'a78408c887c04c34ce615da690e0b4c8', - url='http://download.qt.io/archive/qt/5.2/5.2.1/single/qt-everywhere-opensource-src-5.2.1.tar.gz') - - version('4.8.6', '2edbe4d6c2eff33ef91732602f3518eb', - url="http://download.qt-project.org/official_releases/qt/4.8/4.8.6/qt-everywhere-opensource-src-4.8.6.tar.gz") + homepage = 'http://qt.io' + url = 'http://download.qt.io/archive/qt/5.5/5.5.1/single/qt-everywhere-opensource-src-5.5.1.tar.gz' - version('3.3.8b', '9f05b4125cfe477cc52c9742c3c09009', - url="http://download.qt.io/archive/qt/3/qt-x11-free-3.3.8b.tar.gz") + version('5.5.1', '59f0216819152b77536cf660b015d784') + version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5') + version('5.4.0', 'e8654e4b37dd98039ba20da7a53877e6') + version('5.3.2', 'febb001129927a70174467ecb508a682') + version('5.2.1', 'a78408c887c04c34ce615da690e0b4c8') + version('4.8.6', '2edbe4d6c2eff33ef91732602f3518eb') + version('3.3.8b', '9f05b4125cfe477cc52c9742c3c09009') - variant('mesa', default=False, description='depend on mesa') # Add patch for compile issues with qt3 found with use in the OpenSpeedShop project - variant('krellpatch', default=False, description="build with openspeedshop based patch.") + variant('krellpatch', default=False, description="Build with openspeedshop based patch.") + variant('mesa', default=False, description="Depend on mesa.") + variant('gtk', default=False, description="Build with gtkplus.") + patch('qt3krell.patch', when='@3.3.8b+krellpatch') # Use system openssl for security. #depends_on("openssl") depends_on("glib") - depends_on("gtkplus") + depends_on("gtkplus", when='+gtk') depends_on("libxml2") depends_on("zlib") depends_on("dbus", when='@4:') @@ -56,6 +46,34 @@ class Qt(Package): depends_on("libxcb") + def url_for_version(self, version): + url = "http://download.qt.io/archive/qt/" + + if version >= Version('5'): + url += "%s/%s/single/qt-everywhere-opensource-src-%s.tar.gz" % \ + (version.up_to(2), version, version) + elif version >= Version('4.8'): + url += "%s/%s/qt-everywhere-opensource-src-%s.tar.gz" % \ + (version.up_to(2), version, version) + elif version >= Version('4.6'): + url += "%s/qt-everywhere-opensource-src-%s.tar.gz" % \ + (version.up_to(2), version) + elif version >= Version('4.0'): + url += "%s/qt-x11-opensource-src-%s.tar.gz" % \ + (version.up_to(2), version) + elif version >= Version('3'): + url += "%s/qt-x11-free-%s.tar.gz" % \ + (version.up_to(1), version) + elif version >= Version('2.1'): + url += "%s/qt-x11-%s.tar.gz" % \ + (version.up_to(1), version) + else: + url += "%s/qt-%s.tar.gz" % \ + (version.up_to(1), version) + + return url + + def setup_environment(self, spack_env, env): env.set('QTDIR', self.prefix) @@ -88,7 +106,7 @@ class Qt(Package): '-v', '-opensource', '-opengl', - "-release", + '-release', '-shared', '-confirm-license', '-openssl-linked', @@ -97,7 +115,7 @@ class Qt(Package): '-no-openvg', '-no-pch', # NIS is deprecated in more recent glibc - "-no-nis"] + '-no-nis'] # Don't disable all the database drivers, but should # really get them into spack at some point. -- cgit v1.2.3-70-g09d2 From 87b70e2cb45660c5c037dfce963c5dc946b2daf5 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Thu, 31 Mar 2016 14:07:03 -0500 Subject: remove the part I added to setup-env.sh as this does not work unless the modules package is already built. --- share/spack/setup-env.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 529517ff83..764af68400 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -176,13 +176,3 @@ _spack_pathadd PATH "${_sp_prefix%/}/bin" _sp_sys_type=$(spack-python -c 'print(spack.architecture.sys_type())') _spack_pathadd DK_NODE "${_sp_share_dir%/}/dotkit/$_sp_sys_type" _spack_pathadd MODULEPATH "${_sp_share_dir%/}/modules/$_sp_sys_type" - -# -# Use spack built modules package if available -# for system that does not have it -# - -_modules_install_path=$(command spack location -i modules) -if [ -n "$_modules_install_path" ] ; then - . $_modules_install_path/Modules/init/sh -fi -- cgit v1.2.3-70-g09d2 From b1b94d2b7f35e898489b0044beb22df249967548 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Thu, 31 Mar 2016 13:59:49 -0700 Subject: Added the initial version of the 'zoltan' package. --- var/spack/repos/builtin/packages/zoltan/package.py | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 var/spack/repos/builtin/packages/zoltan/package.py diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py new file mode 100644 index 0000000000..91d3c305f8 --- /dev/null +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -0,0 +1,52 @@ +from spack import * + +class Zoltan(Package): + """The Zoltan library is a toolkit of parallel combinatorial algorithms for + parallel, unstructured, and/or adaptive scientific applications. Zoltan's + largest component is a suite of dynamic load-balancing and paritioning + algorithms that increase applications' parallel performance by reducing + idle time. Zoltan also has graph coloring and graph ordering algorithms, + which are useful in task schedulers and parallel preconditioners.""" + + homepage = "http://www.cs.sandia.gov/zoltan" + base_url = "http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions" + + version('3.83', '1ff1bc93f91e12f2c533ddb01f2c095f') + version('3.3', '5eb8f00bda634b25ceefa0122bd18d65') + + variant('fortran', default=True, description='Enable Fortran support') + variant('mpi', default=False, description='Enable MPI support') + + depends_on('mpi', when='+mpi') + + def install(self, spec, prefix): + config_args = [ + '--enable-f90interface' if '+fortan' in spec else '--disable-f90interface', + '--enable-mpi' if '+mpi' in spec else '--disable-mpi', + ] + + if '+mpi' in spec: + config_args.append('--with-mpi=%s' % spec['mpi'].prefix) + config_args.append('--with-mpi-compilers=%s' % spec['mpi'].prefix.bin) + + # NOTE: Early versions of Zoltan come packaged with a few embedded + # library packages (e.g. ParMETIS, Scotch), which messes with Spack's + # ability to descend directly into the package's source directory. + if spec.satisfies('@:3.3'): + cd('Zoltan_v%s' % self.version) + + mkdirp('build') + cd('build') + + config_zoltan = Executable('../configure') + config_zoltan('--prefix=%s' % pwd(), *config_args) + + make() + make('install') + + mkdirp(prefix) + move('include', prefix) + move('lib', prefix) + + def url_for_version(self, version): + return '%s/zoltan_distrib_v%s.tar.gz' % (Zoltan.base_url, version) -- cgit v1.2.3-70-g09d2 From 09d657e98e50fd0194e35cfea39105ea31bd5e55 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Thu, 31 Mar 2016 14:36:32 -0700 Subject: Fixed the MPI variant for the 'zoltan' package. --- var/spack/repos/builtin/packages/zoltan/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py index 91d3c305f8..e20ae81adb 100644 --- a/var/spack/repos/builtin/packages/zoltan/package.py +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -28,6 +28,8 @@ class Zoltan(Package): if '+mpi' in spec: config_args.append('--with-mpi=%s' % spec['mpi'].prefix) config_args.append('--with-mpi-compilers=%s' % spec['mpi'].prefix.bin) + config_args.append('CC=%s/mpicc' % spec['mpi'].prefix.bin) + config_args.append('CXX=%s/mpicxx' % spec['mpi'].prefix.bin) # NOTE: Early versions of Zoltan come packaged with a few embedded # library packages (e.g. ParMETIS, Scotch), which messes with Spack's -- cgit v1.2.3-70-g09d2 From d4e6b15d981a6bad77cb6f36cdc3a41adf05525b Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Fri, 1 Apr 2016 15:15:23 -0400 Subject: Fixed TCL/Tk --- var/spack/repos/builtin/packages/tcl/package.py | 7 +++++-- var/spack/repos/builtin/packages/tk/package.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index 529adf7788..c2cb09ab46 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -9,9 +9,12 @@ class Tcl(Package): that is truly cross platform, easily deployed and highly extensible.""" homepage = "http://www.tcl.tk" + urlpat = 'http://prdownloads.sourceforge.net/tcl/tcl%s-src.tar.gz' - version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f', - url="http://prdownloads.sourceforge.net/tcl/tcl8.6.3-src.tar.gz") + version('8.6.5', '0e6426a4ca9401825fbc6ecf3d89a326', url=urlpat%'8.6.5') + version('8.6.4', 'd7cbb91f1ded1919370a30edd1534304', url=urlpat%'8.6.4') + version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f', url=urlpat%'8.6.3') + version('8.5.19', '0e6426a4ca9401825fbc6ecf3d89a326', url=urlpat%'8.6.5') depends_on('zlib') diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py index 96736f6f95..6da0a423a9 100644 --- a/var/spack/repos/builtin/packages/tk/package.py +++ b/var/spack/repos/builtin/packages/tk/package.py @@ -10,7 +10,7 @@ class Tk(Package): homepage = "http://www.tcl.tk" url = "http://prdownloads.sourceforge.net/tcl/tk8.6.3-src.tar.gz" - version('src', '85ca4dbf4dcc19777fd456f6ee5d0221') + version('8.6.3', '85ca4dbf4dcc19777fd456f6ee5d0221') depends_on("tcl") -- cgit v1.2.3-70-g09d2 From cfd5e69b816eaca1a4d6d4467d5f1113fa0af407 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Fri, 1 Apr 2016 15:16:28 -0400 Subject: Added Environment Modules package. --- .../packages/environment-modules/package.py | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/environment-modules/package.py diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py new file mode 100644 index 0000000000..df903fddf8 --- /dev/null +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -0,0 +1,27 @@ +from spack import * + + +class EnvironmentModules(Package): + """Environment Modules for HPC""" + + homepage = "https://sourceforge.net/p/modules/wiki/Home/" + url = "http://prdownloads.sourceforge.net/modules/modules-3.2.10.tar.gz" + + version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb') + + # Dependencies: + depends_on('tcl') + + def install(self, spec, prefix): + # See: https://sourceforge.net/p/modules/bugs/62/ + CPPFLAGS = ['-DUSE_INTERP_ERRORLINE'] + config_args = [ + "--prefix=%s" % prefix, + "--with-tcl=%s" % join_path(spec['tcl'].prefix, 'lib'), # It looks for tclConfig.sh + 'CPPFLAGS=%s' % ' '.join(CPPFLAGS) + ] + + + configure(*config_args) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 459aab628d73c7f6f1d4eecbf64b34ca334e0ada Mon Sep 17 00:00:00 2001 From: citibeth Date: Fri, 1 Apr 2016 16:00:58 -0400 Subject: Added documentation for installing Environment Modules with Spack. --- lib/spack/docs/basic_usage.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index accf09cc2a..0727e12f6e 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -774,6 +774,34 @@ Environment modules Spack provides some limited integration with environment module systems to make it easier to use the packages it provides. + +Installing Environment Modules +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In order to use Spack's generated environment modules, you must have +installed the *Environment Modules* package. On many Linux +distributions, this can be installed from the vendor's repository. +For example: ```yum install environment-modules`` +(Fedora/RHEL/CentOS). If your Linux distribution does not have +Environment Modules, you can get it with Spack: + +1. Install with:: + + spack install environment-modules + +2. Activate with:: + + MODULES_HOME=`spack location -i environment-modules` + MODULES_VERSION=`ls -1 $MODULES_HOME/Modules | head -1` + ${MODULES_HOME}/Modules/${MODULES_VERSION}/bin/add.modules + +This adds to your ``.bashrc`` (or similar) files, enabling Environment +Modules when you log in. It will ask your permission before changing +any files. + +Spack and Environment Modules +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + You can enable shell support by sourcing some files in the ``/share/spack`` directory. -- cgit v1.2.3-70-g09d2 From e4f7b78e9b4ddf1d4fd7dac4782068f07626d9e0 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Fri, 1 Apr 2016 16:36:31 -0400 Subject: Fixed tk, and used uverridden url_for_version(). --- var/spack/repos/builtin/packages/tcl/package.py | 12 +++++++----- var/spack/repos/builtin/packages/tk/package.py | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index c2cb09ab46..db8bee88d0 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -9,12 +9,14 @@ class Tcl(Package): that is truly cross platform, easily deployed and highly extensible.""" homepage = "http://www.tcl.tk" - urlpat = 'http://prdownloads.sourceforge.net/tcl/tcl%s-src.tar.gz' - version('8.6.5', '0e6426a4ca9401825fbc6ecf3d89a326', url=urlpat%'8.6.5') - version('8.6.4', 'd7cbb91f1ded1919370a30edd1534304', url=urlpat%'8.6.4') - version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f', url=urlpat%'8.6.3') - version('8.5.19', '0e6426a4ca9401825fbc6ecf3d89a326', url=urlpat%'8.6.5') + def url_for_version(self, version): + return 'http://prdownloads.sourceforge.net/tcl/tcl%s-src.tar.gz' % version + + version('8.6.5', '0e6426a4ca9401825fbc6ecf3d89a326') + version('8.6.4', 'd7cbb91f1ded1919370a30edd1534304') + version('8.6.3', 'db382feca91754b7f93da16dc4cdad1f') + version('8.5.19', '0e6426a4ca9401825fbc6ecf3d89a326') depends_on('zlib') diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py index 6da0a423a9..839d217f34 100644 --- a/var/spack/repos/builtin/packages/tk/package.py +++ b/var/spack/repos/builtin/packages/tk/package.py @@ -8,7 +8,9 @@ class Tk(Package): applications that run unchanged across Windows, Mac OS X, Linux and more.""" homepage = "http://www.tcl.tk" - url = "http://prdownloads.sourceforge.net/tcl/tk8.6.3-src.tar.gz" + + def url_for_version(self, version): + return "http://prdownloads.sourceforge.net/tcl/tk%s-src.tar.gz" % version version('8.6.3', '85ca4dbf4dcc19777fd456f6ee5d0221') -- cgit v1.2.3-70-g09d2 From 71ffe2f1c40edaa311a8b7d25d87d2c3ca25388f Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Thu, 31 Mar 2016 17:11:57 -0700 Subject: mumps: install mpiseq headers for '~mpi' Prior to this commit, spack installs a library called `libmpiseq` into `spec['mumps'].prefix.lib` when it builds MUMPS without MPI. However, it does not also install the headers corresponding to this library, so it is impossible to compile source files that depend on function calls implemented in this library. This commit fixes this problem by installing these headers, which are needed by packages (e.g., IPOPT) that depend on these headers. --- var/spack/repos/builtin/packages/mumps/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 26440ab7c8..025d86ebdc 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -1,5 +1,5 @@ from spack import * -import os, sys +import os, sys, glob class Mumps(Package): """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver""" @@ -164,10 +164,13 @@ class Mumps(Package): install_tree('lib', prefix.lib) install_tree('include', prefix.include) - if '~mpi' in spec: + + if '~mpi' in spec: lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so' lib_suffix = lib_dsuffix if '+shared' in spec else '.a' install('libseq/libmpiseq%s' % lib_suffix, prefix.lib) + for f in glob.glob(join_path('libseq','*.h')): + install(f, prefix.include) # FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI # FIXME: use something like numdiff to compare blessed output with the current -- cgit v1.2.3-70-g09d2 From edf6e9ceacab9aa2d8795340089182ead07c30b3 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Thu, 31 Mar 2016 15:25:32 -0700 Subject: Add ipopt v3.12.4 package. Add package for the nonlinear programming solver IPOPT. This commit depends on the changes made in GitHub PR #711, since IPOPT requires the headers that correspond to the fake MPI implementation in sequential MUMPS. --- var/spack/repos/builtin/packages/ipopt/package.py | 51 +++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ipopt/package.py diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py new file mode 100644 index 0000000000..13c37bf79c --- /dev/null +++ b/var/spack/repos/builtin/packages/ipopt/package.py @@ -0,0 +1,51 @@ +from spack import * + +class Ipopt(Package): + """Ipopt (Interior Point OPTimizer, pronounced eye-pea-Opt) is a + software package for large-scale nonlinear optimization.""" + homepage = "https://projects.coin-or.org/Ipopt" + url = "http://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.4.tgz" + + version('3.12.4', '12a8ecaff8dd90025ddea6c65b49cb03') + version('3.12.3', 'c560cbfa9cbf62acf8b485823c255a1b') + version('3.12.2', 'ec1e855257d7de09e122c446506fb00d') + version('3.12.1', 'ceaf895ce80c77778f2cab68ba9f17f3') + version('3.12.0', 'f7dfc3aa106a6711a85214de7595e827') + + depends_on("blas") + depends_on("lapack") + depends_on("pkg-config") + depends_on("mumps+double~mpi") + + def install(self, spec, prefix): + # Dependency directories + blas_dir = spec['blas'].prefix + lapack_dir = spec['lapack'].prefix + mumps_dir = spec['mumps'].prefix + + # Add directory with fake MPI headers in sequential MUMPS + # install to header search path + mumps_flags = "-ldmumps -lmumps_common -lpord -lmpiseq" + mumps_libcmd = "-L%s " % mumps_dir.lib + mumps_flags + + # By convention, spack links blas & lapack libs to libblas & liblapack + blas_lib = "-L%s" % blas_dir.lib + " -lblas" + lapack_lib = "-L%s" % lapack_dir.lib + " -llapack" + + configure_args = [ + "--prefix=%s" % prefix, + "--with-mumps-incdir=%s" % mumps_dir.include, + "--with-mumps-lib=%s" % mumps_libcmd, + "--enable-shared", + "--with-blas-incdir=%s" % blas_dir.include, + "--with-blas-lib=%s" % blas_lib, + "--with-lapack-incdir=%s" % lapack_dir.include, + "--with-lapack-lib=%s" % lapack_lib + ] + + configure(*configure_args) + + # IPOPT does not build correctly in parallel on OS X + make(parallel=False) + make("test", parallel=False) + make("install", parallel=False) -- cgit v1.2.3-70-g09d2 From c6d8208150f7827da5a32c4c9187714ccb6651a1 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Fri, 1 Apr 2016 22:51:14 -0400 Subject: Added recursive module loading --- lib/spack/spack/cmd/load.py | 2 +- lib/spack/spack/cmd/module.py | 87 ++++++++++++++++++++++++++++++++----------- 2 files changed, 67 insertions(+), 22 deletions(-) diff --git a/lib/spack/spack/cmd/load.py b/lib/spack/spack/cmd/load.py index 30d86c3b01..aa299a0bb3 100644 --- a/lib/spack/spack/cmd/load.py +++ b/lib/spack/spack/cmd/load.py @@ -31,7 +31,7 @@ def setup_parser(subparser): """Parser is only constructed so that this prints a nice help message with -h. """ subparser.add_argument( - 'spec', nargs=argparse.REMAINDER, help='Spec of package to load with modules.') + 'spec', nargs=argparse.REMAINDER, help="Spec of package to load with modules. (If -, read specs from STDIN)") def load(parser, args): diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index 315d9fc926..b79737ab22 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -48,40 +48,85 @@ def setup_parser(subparser): find_parser = sp.add_parser('find', help='Find module files for packages.') find_parser.add_argument( 'module_type', help="Type of module to find file for. [" + '|'.join(module_types) + "]") + find_parser.add_argument( + '-r', '--dependencies', action='store_true', dest='recurse_dependencies', + help='Recursively traverse dependencies for modules to load.') + + find_parser.add_argument( + '-s', '--shell', action='store_true', dest='shell', + help='Generate shell script (instead of input for module command)') + find_parser.add_argument('spec', nargs='+', help='spec to find a module file for.') -def module_find(mtype, spec_array): + + +def module_find(mtype, flags, spec_array): """Look at all installed packages and see if the spec provided matches any. If it does, check whether there is a module file of type there, and print out the name that the user should type to use that package's module. """ - if mtype not in module_types: - tty.die("Invalid module type: '%s'. Options are %s" % (mtype, comma_or(module_types))) - specs = spack.cmd.parse_specs(spec_array) - if len(specs) > 1: - tty.die("You can only pass one spec.") - spec = specs[0] + # -------------------------------------- + def _find_modules(spec, modules_list): + """Finds all modules and sub-modules for a spec""" + if str(spec.version) == 'system': + # No Spack module for system-installed packages + return + + if flags.recurse_dependencies: + for dep in spec.dependencies.values(): + _find_modules(dep, modules_list) - specs = spack.installed_db.query(spec) - if len(specs) == 0: - tty.die("No installed packages match spec %s" % spec) + mod = module_types[mtype](spec) + if not os.path.isfile(mod.file_name): + tty.die("No %s module is installed for %s" % (mtype, spec)) + modules_list.append((spec, mod)) - if len(specs) > 1: - tty.error("Multiple matches for spec %s. Choose one:" % spec) - for s in specs: - sys.stderr.write(s.tree(color=True)) - sys.exit(1) - mt = module_types[mtype] - mod = mt(specs[0]) - if not os.path.isfile(mod.file_name): - tty.die("No %s module is installed for %s" % (mtype, spec)) + # -------------------------------------- - print(mod.use_name) + if mtype not in module_types: + tty.die("Invalid module type: '%s'. Options are %s" % (mtype, comma_or(module_types))) + raw_specs = spack.cmd.parse_specs(spec_array) + modules = set() # Modules we will load + seen = set() + for raw_spec in raw_specs: + + # ----------- Make sure the spec only resolves to ONE thing + specs = spack.installed_db.query(raw_spec) + if len(specs) == 0: + tty.die("No installed packages match spec %s" % raw_spec) + + if len(specs) > 1: + tty.error("Multiple matches for spec %s. Choose one:" % spec) + for s in specs: + sys.stderr.write(s.tree(color=True)) + sys.exit(1) + spec = specs[0] + + # ----------- Chase down modules for it and all its dependencies + modules_dups = list() + _find_modules(spec, modules_dups) + + # Remove duplicates while keeping order + modules_unique = list() + for spec,mod in modules_dups: + if mod.use_name not in seen: + modules_unique.append((spec,mod)) + seen.add(mod.use_name) + + # Output... + if flags.shell: + module_cmd = {'tcl' : 'module load', 'dotkit' : 'dotkit use'}[mtype] + for spec,mod in modules_unique: + if flags.shell: + print '# %s' % spec.format() + print '%s %s' % (module_cmd, mod.use_name) + else: + print mod.use_name def module_refresh(): """Regenerate all module files for installed packages known to @@ -104,4 +149,4 @@ def module(parser, args): module_refresh() elif args.module_command == 'find': - module_find(args.module_type, args.spec) + module_find(args.module_type, args, args.spec) -- cgit v1.2.3-70-g09d2 From 281835887a91e13bee17b5954a9ff8c7db8e299c Mon Sep 17 00:00:00 2001 From: citibeth Date: Fri, 1 Apr 2016 22:52:36 -0400 Subject: Added documentation for recursive modules --- lib/spack/docs/basic_usage.rst | 69 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index accf09cc2a..78fc73d738 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -943,6 +943,75 @@ used ``gcc``. You could therefore just type: To identify just the one built with the Intel compiler. +Recursive Modules +`````````````````` + +In some cases, it is desirable to load not just a module, but also all +the modules it depends on. This is not required for most modules +because Spack builds binaries with RPATH support. However, not all +packages use RPATH to find their dependencies: this can be true in +particular for Python extensions, which are currently *not* built with +RPATH. + +Modules may be loaded recursively with the command: + +.. code-block:: sh + + $ module load `spack module tcl --dependencies ... + +More than one spec may be placed on the command line here. + +Module Comamnds for Shell Scripts +`````````````````````````````````` + +Although Spack is flexbile, the ``module`` command is much faster. +This could become an issue when emitting a series of ``spack load`` +commands inside a shell script. By adding the ``--shell`` flag, +``spack module find`` may also be used to generate code that can be +cut-and-pasted into a shell script. For example: + +.. code-block:: sh + + $ spack module find tcl --dependencies --shell py-numpy git + # bzip2@1.0.6%gcc@4.9.3=linux-x86_64 + module load bzip2-1.0.6-gcc-4.9.3-ktnrhkrmbbtlvnagfatrarzjojmkvzsx + # ncurses@6.0%gcc@4.9.3=linux-x86_64 + module load ncurses-6.0-gcc-4.9.3-kaazyneh3bjkfnalunchyqtygoe2mncv + # zlib@1.2.8%gcc@4.9.3=linux-x86_64 + module load zlib-1.2.8-gcc-4.9.3-v3ufwaahjnviyvgjcelo36nywx2ufj7z + # sqlite@3.8.5%gcc@4.9.3=linux-x86_64 + module load sqlite-3.8.5-gcc-4.9.3-a3eediswgd5f3rmto7g3szoew5nhehbr + # readline@6.3%gcc@4.9.3=linux-x86_64 + module load readline-6.3-gcc-4.9.3-se6r3lsycrwxyhreg4lqirp6xixxejh3 + # python@3.5.1%gcc@4.9.3=linux-x86_64 + module load python-3.5.1-gcc-4.9.3-5q5rsrtjld4u6jiicuvtnx52m7tfhegi + # py-setuptools@20.5%gcc@4.9.3=linux-x86_64 + module load py-setuptools-20.5-gcc-4.9.3-4qr2suj6p6glepnedmwhl4f62x64wxw2 + # py-nose@1.3.7%gcc@4.9.3=linux-x86_64 + module load py-nose-1.3.7-gcc-4.9.3-pwhtjw2dvdvfzjwuuztkzr7b4l6zepli + # openblas@0.2.17%gcc@4.9.3+shared=linux-x86_64 + module load openblas-0.2.17-gcc-4.9.3-pw6rmlom7apfsnjtzfttyayzc7nx5e7y + # py-numpy@1.11.0%gcc@4.9.3+blas+lapack=linux-x86_64 + module load py-numpy-1.11.0-gcc-4.9.3-mulodttw5pcyjufva4htsktwty4qd52r + # curl@7.47.1%gcc@4.9.3=linux-x86_64 + module load curl-7.47.1-gcc-4.9.3-ohz3fwsepm3b462p5lnaquv7op7naqbi + # autoconf@2.69%gcc@4.9.3=linux-x86_64 + module load autoconf-2.69-gcc-4.9.3-bkibjqhgqm5e3o423ogfv2y3o6h2uoq4 + # cmake@3.5.0%gcc@4.9.3~doc+ncurses+openssl~qt=linux-x86_64 + module load cmake-3.5.0-gcc-4.9.3-x7xnsklmgwla3ubfgzppamtbqk5rwn7t + # expat@2.1.0%gcc@4.9.3=linux-x86_64 + module load expat-2.1.0-gcc-4.9.3-6pkz2ucnk2e62imwakejjvbv6egncppd + # git@2.8.0-rc2%gcc@4.9.3+curl+expat=linux-x86_64 + module load git-2.8.0-rc2-gcc-4.9.3-3bib4hqtnv5xjjoq5ugt3inblt4xrgkd + +The script may be further edited by removing unnecessary modules. +This script may be directly executed in bash via + +.. code-block :: sh + + source <( spack module find tcl --dependencies --shell py-numpy git ) + + Regenerating Module files ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3-70-g09d2 From 624b576b1e21ea476eaf7fdc3ee38a97194e45f7 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 2 Apr 2016 12:01:46 +0200 Subject: metis: fix compilation with Clang 7.3.0, add tests --- var/spack/repos/builtin/packages/metis/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 9301135f9f..d3bab554fe 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -79,10 +79,28 @@ class Metis(Package): if '+double' in spec: filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header) + # Make clang 7.3 happy. + # Prevents "ld: section __DATA/__thread_bss extends beyond end of file" + # See upstream LLVM issue https://llvm.org/bugs/show_bug.cgi?id=27059 + # Adopted from https://github.com/Homebrew/homebrew-science/blob/master/metis.rb + if spec.satisfies('%clang@7.3.0'): + filter_file('#define MAX_JBUFS 128', '#define MAX_JBUFS 24', join_path(source_directory, 'GKlib', 'error.c')) + with working_dir(build_directory, create=True): cmake(source_directory, *options) make() make("install") + # now run some tests: + for f in ["4elt", "copter2", "mdual"]: + graph = join_path(source_directory,'graphs','%s.graph' % f) + Executable(join_path(prefix.bin,'graphchk'))(graph) + Executable(join_path(prefix.bin,'gpmetis'))(graph,'2') + Executable(join_path(prefix.bin,'ndmetis'))(graph) + + graph = join_path(source_directory,'graphs','test.mgraph') + Executable(join_path(prefix.bin,'gpmetis'))(graph,'2') + graph = join_path(source_directory,'graphs','metis.mesh') + Executable(join_path(prefix.bin,'mpmetis'))(graph,'2') # install GKlib headers, which will be needed for ParMETIS GKlib_dist = join_path(prefix.include,'GKlib') -- cgit v1.2.3-70-g09d2 From a88c6da9acc234484d34acf6588c838bef09e8c4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 2 Apr 2016 12:02:29 +0200 Subject: suite-sparse: fix a bug where interla metis was used; add TBB variant --- .../repos/builtin/packages/suite-sparse/package.py | 36 +++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index c2196dcec4..f2e71f7479 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -10,10 +10,13 @@ class SuiteSparse(Package): version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319') + variant('tbb', default=True, description='Build with Intel TBB') + depends_on('blas') depends_on('lapack') depends_on('metis@5.1.0', when='@4.5.1') + depends_on('tbb', when='+tbb') def install(self, spec, prefix): # The build system of SuiteSparse is quite old-fashioned @@ -21,16 +24,35 @@ class SuiteSparse(Package): # with a lot of convoluted logic in it. # Any kind of customization will need to go through filtering of that file - # FIXME : this actually uses the current workaround - # FIXME : (blas / lapack always provide libblas and liblapack as aliases) - make('install', 'INSTALL=%s' % prefix, + make_args = ['INSTALL=%s' % prefix] - # inject Spack compiler wrappers + # inject Spack compiler wrappers + make_args.extend([ 'AUTOCC=no', 'CC=cc', 'CXX=c++', 'F77=f77', + ]) + + # use Spack's metis in CHOLMOD/Partition module, + # otherwise internal Metis will be compiled + make_args.extend([ + 'MY_METIS_LIB=-L%s -lmetis' % spec['metis'].prefix.lib, + 'MY_METIS_INC=%s' % spec['metis'].prefix.include, + ]) + + # Intel TBB in SuiteSparseQR + if '+tbb' in spec: + make_args.extend([ + 'SPQR_CONFIG=-DHAVE_TBB', + 'TBB=-L%s -ltbb' % spec['tbb'].prefix.lib, + ]) + + # BLAS arguments require path to libraries + # FIXME : (blas / lapack always provide libblas and liblapack as aliases) + make_args.extend([ + 'BLAS=-lblas', + 'LAPACK=-llapack' + ]) - # BLAS arguments require path to libraries - 'BLAS=-lblas', - 'LAPACK=-llapack') + make('install', *make_args) -- cgit v1.2.3-70-g09d2 From adccd18015eec2589d69194fa30be45b04cb515e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 2 Apr 2016 12:02:59 +0200 Subject: dealii: add extra test for Petsc+Metis --- var/spack/repos/builtin/packages/dealii/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 0b76db3827..d8a0df643d 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -174,6 +174,19 @@ class Dealii(Package): make('release') make('run',parallel=False) + # An example which uses Metis + PETSc + # FIXME: switch step-18 to MPI + with working_dir('examples/step-18'): + print('=====================================') + print('============= Step-18 ===============') + print('=====================================') + # list the number of cycles to speed up + filter_file(r'(end_time = 10;)', ('end_time = 3;'), 'step-18.cc') + if '^petsc' in spec and '^metis' in spec: + cmake('.') + make('release') + make('run',parallel=False) + # take step-40 which can use both PETSc and Trilinos # FIXME: switch step-40 to MPI run with working_dir('examples/step-40'): -- cgit v1.2.3-70-g09d2 From 2126683203f4b8bf88aac539bac8bd8643f5bee1 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sat, 2 Apr 2016 12:43:19 -0400 Subject: Added deprecation warning to netcdf-cxx --- var/spack/repos/builtin/packages/netcdf-cxx/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py index 5334dfb853..582a8e70b4 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py @@ -1,7 +1,11 @@ from spack import * class NetcdfCxx(Package): - """C++ compatibility bindings for NetCDF""" + “””Deprecated C++ compatibility bindings for NetCDF. + These do NOT read or write NetCDF-4 files, and are no longer + maintained by Unidata. Developers should migrate to current + NetCDF C++ bindings, in Spack package netcdf-cxx4.””” + homepage = "http://www.unidata.ucar.edu/software/netcdf" url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx-4.2.tar.gz" -- cgit v1.2.3-70-g09d2 From 9f7db44574093aa9490ffe1a4ff959213b096008 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sat, 2 Apr 2016 12:58:37 -0400 Subject: Removed useless url in qt --- var/spack/repos/builtin/packages/qt/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index ab09469042..8cb88e6c85 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -4,7 +4,6 @@ import os class Qt(Package): """Qt is a comprehensive cross-platform C++ application framework.""" homepage = 'http://qt.io' - url = 'http://download.qt.io/archive/qt/5.5/5.5.1/single/qt-everywhere-opensource-src-5.5.1.tar.gz' version('5.5.1', '59f0216819152b77536cf660b015d784') version('5.4.2', 'fa1c4d819b401b267eb246a543a63ea5') -- cgit v1.2.3-70-g09d2 From 1c483ffe4e9b0dc03d469eba9c064461624a81be Mon Sep 17 00:00:00 2001 From: citibeth Date: Sat, 2 Apr 2016 13:09:56 -0400 Subject: Merged the best of two Spack packages for Environment Modules. Named "environment-modules" to be consistent with Fedora and Ubuntu repositories. See d96ea5b for original packages/modules/package.py --- .../packages/environment-modules/package.py | 14 ++++++++---- .../repos/builtin/packages/modules/package.py | 25 ---------------------- 2 files changed, 10 insertions(+), 29 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/modules/package.py diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py index df903fddf8..cc5d76760e 100644 --- a/var/spack/repos/builtin/packages/environment-modules/package.py +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -2,7 +2,8 @@ from spack import * class EnvironmentModules(Package): - """Environment Modules for HPC""" + """The Environment Modules package provides for the dynamic + modification of a user's environment via modulefiles.""" homepage = "https://sourceforge.net/p/modules/wiki/Home/" url = "http://prdownloads.sourceforge.net/modules/modules-3.2.10.tar.gz" @@ -16,12 +17,17 @@ class EnvironmentModules(Package): # See: https://sourceforge.net/p/modules/bugs/62/ CPPFLAGS = ['-DUSE_INTERP_ERRORLINE'] config_args = [ - "--prefix=%s" % prefix, - "--with-tcl=%s" % join_path(spec['tcl'].prefix, 'lib'), # It looks for tclConfig.sh + '--prefix=%s' % prefix, + '--disable-debug', + '--disable-dependency-tracking', + '--disable-silent-rules', + '--disable-versioning', + '--datarootdir=%s' % prefix.share, + '--with-tcl=%s' % join_path(spec['tcl'].prefix, 'lib'), # It looks for tclConfig.sh 'CPPFLAGS=%s' % ' '.join(CPPFLAGS) ] configure(*config_args) make() - make("install") + make('install') diff --git a/var/spack/repos/builtin/packages/modules/package.py b/var/spack/repos/builtin/packages/modules/package.py deleted file mode 100644 index b014ee460c..0000000000 --- a/var/spack/repos/builtin/packages/modules/package.py +++ /dev/null @@ -1,25 +0,0 @@ -from spack import * - -class Modules(Package): - """ The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles. """ - - homepage = "http://modules.sf.net" - url = "http://downloads.sourceforge.net/project/modules/Modules/modules-3.2.10/modules-3.2.10.tar.gz" - - version('3.2.10', '8b097fdcb90c514d7540bb55a3cb90fb') - - depends_on("tcl") - - def install(self, spec, prefix): - - options = ['--prefix=%s' % prefix, - '--disable-debug', - '--disable-dependency-tracking', - '--disable-silent-rules', - '--disable-versioning', - '--datarootdir=%s' % prefix.share, - 'CPPFLAGS=-DUSE_INTERP_ERRORLINE'] - - configure(*options) - make() - make("install") -- cgit v1.2.3-70-g09d2 From c952c0ca160c31123104f68c4d1ac732bc473ede Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 2 Apr 2016 15:50:20 -0500 Subject: Added version 1.0 of sympy. Beginning with this version, sympy requires the mpmath package. The py-mpmath package is added in this PR to accommodate that. --- var/spack/repos/builtin/packages/py-mpmath/package.py | 13 +++++++++++++ var/spack/repos/builtin/packages/py-sympy/package.py | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-mpmath/package.py diff --git a/var/spack/repos/builtin/packages/py-mpmath/package.py b/var/spack/repos/builtin/packages/py-mpmath/package.py new file mode 100644 index 0000000000..4d3261ae8f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-mpmath/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyMpmath(Package): + """A Python library for arbitrary-precision floating-point arithmetic.""" + homepage = "http://mpmath.org" + url = "https://pypi.python.org/packages/source/m/mpmath/mpmath-all-0.19.tar.gz" + + version('0.19', 'd1b7e19dd6830d0d7b5e1bc93d46c02c') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-sympy/package.py b/var/spack/repos/builtin/packages/py-sympy/package.py index c17e35b95f..bbce8c74e3 100644 --- a/var/spack/repos/builtin/packages/py-sympy/package.py +++ b/var/spack/repos/builtin/packages/py-sympy/package.py @@ -6,8 +6,10 @@ class PySympy(Package): url = "https://pypi.python.org/packages/source/s/sympy/sympy-0.7.6.tar.gz" version('0.7.6', '3d04753974306d8a13830008e17babca') + version('1.0', '43e797de799f00f9e8fd2307dba9fab1') extends('python') + depends_on('py-mpmath', when='@1.0:') def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From e436f84244278f842822051a4049ef8418507709 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 2 Apr 2016 20:21:56 -0400 Subject: Update HDF5 to 1.10.0 --- var/spack/repos/builtin/packages/hdf5/package.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 513a38ee8a..1bf01e7423 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -37,6 +37,8 @@ class Hdf5(Package): list_url = "http://www.hdfgroup.org/ftp/HDF5/releases" list_depth = 3 + version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199', + url='http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0/src/hdf5-1.10.0.tar.gz') version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618') version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') @@ -80,10 +82,16 @@ class Hdf5(Package): # sanity check in configure, so this doesn't merit a variant. extra_args.append("--enable-unsupported") - if '+debug' in spec: - extra_args.append('--enable-debug=all') + if spec.satisfies('@1.10:'): + if '+debug' in spec: + extra_args.append('--enable-build-mode=debug') + else: + extra_args.append('--enable-build-mode=production') else: - extra_args.append('--enable-production') + if '+debug' in spec: + extra_args.append('--enable-debug=all') + else: + extra_args.append('--enable-production') if '+shared' in spec: extra_args.append('--enable-shared') -- cgit v1.2.3-70-g09d2 From 40c279ef95a92ef3274fda7ae8dbff4c790ff4cd Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Sun, 3 Apr 2016 00:10:22 -0400 Subject: Fixed evil non-ASCII quotes --- var/spack/repos/builtin/packages/netcdf-cxx/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py index 582a8e70b4..8aa1d8b236 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py @@ -1,10 +1,10 @@ from spack import * class NetcdfCxx(Package): - “””Deprecated C++ compatibility bindings for NetCDF. + """Deprecated C++ compatibility bindings for NetCDF. These do NOT read or write NetCDF-4 files, and are no longer maintained by Unidata. Developers should migrate to current - NetCDF C++ bindings, in Spack package netcdf-cxx4.””” + NetCDF C++ bindings, in Spack package netcdf-cxx4.""" homepage = "http://www.unidata.ucar.edu/software/netcdf" url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx-4.2.tar.gz" -- cgit v1.2.3-70-g09d2 From e0ff3f16cc142fb9ca55cc1c6000fb230627f8fe Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 3 Apr 2016 19:41:20 +0200 Subject: dealii: blacklist boost --- var/spack/repos/builtin/packages/dealii/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index d8a0df643d..1f763ad358 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -23,8 +23,10 @@ class Dealii(Package): # required dependencies, light version depends_on ("blas") - depends_on ("boost", when='~mpi') - depends_on ("boost+mpi", when='+mpi') + # Boost 1.58 is blacklisted, see https://github.com/dealii/dealii/issues/1591 + # require at least 1.59 + depends_on ("boost@1.59.0:", when='~mpi') + depends_on ("boost@1.59.0:+mpi", when='+mpi') depends_on ("bzip2") depends_on ("cmake") depends_on ("lapack") -- cgit v1.2.3-70-g09d2 From 79836520d989a19bc49b912698b22fdc8a65ca59 Mon Sep 17 00:00:00 2001 From: citibeth Date: Sun, 3 Apr 2016 21:38:29 -0400 Subject: Fixed up to work on a machine without any system-install tcl. --- var/spack/repos/builtin/packages/environment-modules/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py index cc5d76760e..45181da41b 100644 --- a/var/spack/repos/builtin/packages/environment-modules/package.py +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -14,16 +14,21 @@ class EnvironmentModules(Package): depends_on('tcl') def install(self, spec, prefix): + tcl_spec = spec['tcl'] + # See: https://sourceforge.net/p/modules/bugs/62/ CPPFLAGS = ['-DUSE_INTERP_ERRORLINE'] config_args = [ - '--prefix=%s' % prefix, + "--without-tclx", + "--with-tclx-ver=0.0", + "--prefix=%s" % prefix, + "--with-tcl=%s" % join_path(tcl_spec.prefix, 'lib'), # It looks for tclConfig.sh + "--with-tcl-ver=%d.%d" % (tcl_spec.version.version[0], tcl_spec.version.version[1]), '--disable-debug', '--disable-dependency-tracking', '--disable-silent-rules', '--disable-versioning', '--datarootdir=%s' % prefix.share, - '--with-tcl=%s' % join_path(spec['tcl'].prefix, 'lib'), # It looks for tclConfig.sh 'CPPFLAGS=%s' % ' '.join(CPPFLAGS) ] -- cgit v1.2.3-70-g09d2 From 2f4d8a634d19debbe069f3c44b4d2d6822f693cb Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 3 Apr 2016 15:45:09 -0400 Subject: Fix conditional extends (BUG #683) --- lib/spack/spack/modules.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index f6a11c92e3..d797af287d 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -163,9 +163,14 @@ class EnvModule(object): # package-specific modifications spack_env = EnvironmentModifications() for item in self.pkg.extendees: - package = self.spec[item].package - package.setup_dependent_package(self.pkg.module, self.spec) - package.setup_dependent_environment(spack_env, env, self.spec) + try: + package = self.spec[item].package + package.setup_dependent_package(self.pkg.module, self.spec) + package.setup_dependent_environment(spack_env, env, self.spec) + except: + # The extends was conditional, so it doesn't count here + # eg: extends('python', when='+python') + pass # Package-specific environment modifications self.spec.package.setup_environment(spack_env, env) -- cgit v1.2.3-70-g09d2 From c3f7b035fdf82c6a9d1d078f9c8c4f36a4158d99 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 3 Apr 2016 16:34:45 -0400 Subject: dbus: Added missing dependency (expat) --- var/spack/repos/builtin/packages/dbus/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py index 422f5a19eb..74ce8ef502 100644 --- a/var/spack/repos/builtin/packages/dbus/package.py +++ b/var/spack/repos/builtin/packages/dbus/package.py @@ -20,6 +20,8 @@ class Dbus(Package): version('1.8.4', '4717cb8ab5b80978fcadf2b4f2f72e1b') version('1.8.2', 'd6f709bbec0a022a1847c7caec9d6068') + depends_on('expat') + def install(self, spec, prefix): configure( "--prefix=%s" % prefix, -- cgit v1.2.3-70-g09d2 From 2809fe95db84956b93824402cf4e00d1c437f14e Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 3 Apr 2016 12:14:38 -0400 Subject: git: added comment about newly discovered dependency --- var/spack/repos/builtin/packages/git/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 586b6ce3c3..388f84aefd 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -36,6 +36,8 @@ class Git(Package): depends_on("curl", when="+curl") depends_on("expat", when="+expat") + # Also depends_on gettext: apt-get install gettext (Ubuntu) + # Use system perl for now. # depends_on("perl") # depends_on("pcre") -- cgit v1.2.3-70-g09d2 From 0bf61ad57be3d7c3b301639b5af0c196820ec96d Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 3 Apr 2016 16:35:36 -0400 Subject: libxcb: Added comments on two dependencies Spack does not yet know how to build. --- var/spack/repos/builtin/packages/libxcb/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index 1dd5954c99..d7d94c4546 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -14,6 +14,9 @@ class Libxcb(Package): depends_on("python") depends_on("xcb-proto") + # depends_on('pthread') # Ubuntu: apt-get install libpthread-stubs0-dev + # depends_on('xau') # Ubuntu: apt-get install libxau-dev + def patch(self): filter_file('typedef struct xcb_auth_info_t {', 'typedef struct {', 'src/xcb.h') -- cgit v1.2.3-70-g09d2 From 14f073d410abb599801fb933e5518fdc43cea7ef Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Sun, 3 Apr 2016 15:46:53 -0400 Subject: py-pillow: Updated for variants, but still having trouble getting it to use Spack-supplied libjpeg. --- .../repos/builtin/packages/py-pillow/package.py | 63 +++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py index adc8507bd5..66d9bb4382 100644 --- a/var/spack/repos/builtin/packages/py-pillow/package.py +++ b/var/spack/repos/builtin/packages/py-pillow/package.py @@ -1,4 +1,5 @@ from spack import * +import os class PyPillow(Package): """Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.""" @@ -7,8 +8,68 @@ class PyPillow(Package): url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.tar.gz" version('3.0.0', 'fc8ac44e93da09678eac7e30c9b7377d') + provides('PIL') + + # These defaults correspond to Pillow defaults + variant('jpeg', default=True, description='Provide JPEG functionality') + variant('zlib', default=True, description='Access to compressed PNGs') + variant('tiff', default=False, description='Access to TIFF files') + variant('freetype', default=False, description='Font related services') + variant('tk', default=False, description='Support for tkinter bitmap and photo images') + variant('lcms', default=False, description='Color management') + + # Spack does not (yet) support these modes of building + # variant('webp', default=False, description='') + # variant('webpmux', default=False, description='') + # variant('jpeg2000', default=False, description='') + extends('python') + depends_on('binutils') depends_on('py-setuptools') + depends_on('jpeg', when='+jpeg') # BUG: It will use the system libjpeg anyway + depends_on('zlib', when='+zlib') + depends_on('tiff', when='+tiff') + depends_on('freetype', when='+freetype') + depends_on('lcms', when='+lcms') + depends_on('tcl', when='+tk') + depends_on('tk', when='+tk') + def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) + libpath=[] + + if '+jpeg' in spec: + libpath.append(join_path(spec['jpeg'].prefix, 'lib')) + if '+zlib' in spec: + libpath.append(join_path(spec['zlib'].prefix, 'lib')) + if '+tiff' in spec: + libpath.append(join_path(spec['tiff'].prefix, 'lib')) + if '+freetype' in spec: + libpath.append(join_path(spec['freetype'].prefix, 'lib')) + if '+lcms' in spec: + libpath.append(join_path(spec['lcms'].prefix, 'lib')) + + # This has not been tested, and likely needs some other treatment. + #if '+tk' in spec: + # libpath.append(join_path(spec['tcl'].prefix, 'lib')) + # libpath.append(join_path(spec['tk'].prefix, 'lib')) + + # -------- Building + cmd = ['build_ext', + '--%s-jpeg' % ('enable' if '+jpeg' in spec else 'disable'), + '--%s-zlib' % ('enable' if '+zlib' in spec else 'disable'), + '--%s-tiff' % ('enable' if '+tiff' in spec else 'disable'), + '--%s-freetype' % ('enable' if '+freetype' in spec else 'disable'), + '--%s-lcms' % ('enable' if '+lcms' in spec else 'disable'), + '-L'+':'.join(libpath) # NOTE: This does not make it find libjpeg + ] + + #if '+tk' in spec: + # cmd.extend(['--enable-tcl', '--enable-tk']) + #else: + # cmd.extend(['--disable-tcl', '--disable-tk']) + + # --------- Installation + cmd.extend(['install', '--prefix=%s' % prefix]) + + python('setup.py', *cmd) -- cgit v1.2.3-70-g09d2 From 131d34f318a9955ff05c35eb8de0b399c31d5cc2 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 4 Apr 2016 09:05:27 +0200 Subject: suite-sparse: temporary disable TBB due to linking errors --- var/spack/repos/builtin/packages/suite-sparse/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index f2e71f7479..a4b3979a15 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -10,13 +10,18 @@ class SuiteSparse(Package): version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319') - variant('tbb', default=True, description='Build with Intel TBB') + # FIXME: (see below) + # variant('tbb', default=True, description='Build with Intel TBB') depends_on('blas') depends_on('lapack') depends_on('metis@5.1.0', when='@4.5.1') - depends_on('tbb', when='+tbb') + # FIXME: + # in @4.5.1. TBB support in SPQR seems to be broken as TBB-related linkng flags + # does not seem to be used, which leads to linking errors on Linux. + # Try re-enabling in future versions. + # depends_on('tbb', when='+tbb') def install(self, spec, prefix): # The build system of SuiteSparse is quite old-fashioned -- cgit v1.2.3-70-g09d2 From 401dcb363539409e7b94d8ce016bc1a2e70db3a1 Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 4 Apr 2016 10:28:47 +0200 Subject: uninstall : renamed `--recursive` to `--dependents` --- lib/spack/spack/cmd/uninstall.py | 6 +++--- lib/spack/spack/test/cmd/uninstall.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 7aadd254e8..231c6fe661 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -62,7 +62,7 @@ def setup_parser(subparser): "supplied spec. i.e., if you say uninstall libelf, ALL versions of " + "libelf are uninstalled. This is both useful and dangerous, like rm -r.") subparser.add_argument( - '-r', '--recursive', action='store_true', dest='recursive', + '-d', '--dependents', action='store_true', dest='dependents', help='Also uninstall any packages that depend on the ones given via command line.' ) subparser.add_argument( @@ -168,7 +168,7 @@ def uninstall(parser, args): # Process dependent_list and update uninstall_list has_error = False - if dependent_list and not args.recursive and not args.force: + if dependent_list and not args.dependents and not args.force: for spec, lst in dependent_list.items(): tty.error("Will not uninstall %s" % spec.format("$_$@$%@$#", color=True)) print('') @@ -176,7 +176,7 @@ def uninstall(parser, args): display_specs(lst, long=True) print('') has_error = True - elif args.recursive: + elif args.dependents: for key, lst in dependent_list.items(): uninstall_list.extend(lst) uninstall_list = list(set(uninstall_list)) diff --git a/lib/spack/spack/test/cmd/uninstall.py b/lib/spack/spack/test/cmd/uninstall.py index 06a24e2958..80efe06d36 100644 --- a/lib/spack/spack/test/cmd/uninstall.py +++ b/lib/spack/spack/test/cmd/uninstall.py @@ -4,11 +4,11 @@ from spack.cmd.uninstall import uninstall class MockArgs(object): - def __init__(self, packages, all=False, force=False, recursive=False): + def __init__(self, packages, all=False, force=False, dependents=False): self.packages = packages self.all = all self.force = force - self.recursive = recursive + self.dependents = dependents self.yes_to_all = True @@ -22,7 +22,7 @@ class TestUninstall(spack.test.mock_database.MockDatabase): args = MockArgs(['libelf']) self.assertRaises(SystemExit, uninstall, parser, args) # Recursive uninstall - args = MockArgs(['callpath'], all=True, recursive=True) + args = MockArgs(['callpath'], all=True, dependents=True) uninstall(parser, args) all_specs = spack.install_layout.all_specs() -- cgit v1.2.3-70-g09d2 From f40b0f52e0c8b8f076c2ab361edfeba9bc6768fb Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 4 Apr 2016 10:59:01 +0200 Subject: uninstall : updated documentation and error messages --- lib/spack/docs/basic_usage.rst | 42 +++++++++++++++++++++++++++++----------- lib/spack/spack/cmd/uninstall.py | 9 ++++----- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index accf09cc2a..72a02802fb 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -149,26 +149,46 @@ customize an installation in :ref:`sec-specs`. ``spack uninstall`` ~~~~~~~~~~~~~~~~~~~~~ -To uninstall a package, type ``spack uninstall ``. This will -completely remove the directory in which the package was installed. +To uninstall a package, type ``spack uninstall ``. This will ask the user for +confirmation, and in case will completely remove the directory in which the package was installed. .. code-block:: sh spack uninstall mpich If there are still installed packages that depend on the package to be -uninstalled, spack will refuse to uninstall it. You can override this -behavior with ``spack uninstall -f ``, but you risk breaking -other installed packages. In general, it is safer to remove dependent -packages *before* removing their dependencies. +uninstalled, spack will refuse to uninstall it. -A line like ``spack uninstall mpich`` may be ambiguous, if multiple -``mpich`` configurations are installed. For example, if both +To uninstall a package and every package that depends on it, you may give the +`--dependents` option. + +.. code-block:: sh + + spack uninstall --dependents mpich + +will display a list of all the packages that depends on `mpich` and, upon confirmation, +will uninstall them in the right order. + +A line like + +.. code-block:: sh + + spack uninstall mpich + +may be ambiguous, if multiple ``mpich`` configurations are installed. For example, if both ``mpich@3.0.2`` and ``mpich@3.1`` are installed, ``mpich`` could refer to either one. Because it cannot determine which one to uninstall, -Spack will ask you to provide a version number to remove the -ambiguity. As an example, ``spack uninstall mpich@3.1`` is -unambiguous in this scenario. +Spack will ask you either to provide a version number to remove the +ambiguity or use the ``--all`` option to uninstall all of the matching packages. + +You may force uninstall a package with the `--force` option + +.. code-block:: sh + + spack uninstall --force mpich + +but you risk breaking other installed packages. In general, it is safer to remove dependent +packages *before* removing their dependencies or use the `--dependents` option. Seeing installed packages diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 231c6fe661..1ff3d8db5f 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -24,7 +24,6 @@ ############################################################################## from __future__ import print_function -import sys import argparse import llnl.util.tty as tty @@ -48,8 +47,8 @@ def ask_for_confirmation(message): if choice == 'y': break elif choice == 'n': - sys.exit(1) - tty.warning('Please reply either "y" or "n"') + raise SystemExit('Operation aborted') + tty.warn('Please reply either "y" or "n"') def setup_parser(subparser): @@ -164,7 +163,7 @@ def uninstall(parser, args): specs = spack.cmd.parse_specs(args.packages) # Gets the list of installed specs that match the ones give via cli uninstall_list = concretize_specs(specs, args.all, args.force) # takes care of '-a' is given in the cli - dependent_list = installed_dependents(uninstall_list) # takes care of '-r' + dependent_list = installed_dependents(uninstall_list) # takes care of '-d' # Process dependent_list and update uninstall_list has_error = False @@ -182,7 +181,7 @@ def uninstall(parser, args): uninstall_list = list(set(uninstall_list)) if has_error: - tty.die('You can use spack uninstall -r to uninstall these dependencies as well') + tty.die('You can use spack uninstall --dependents to uninstall these dependencies as well') if not args.yes_to_all: tty.msg("The following packages will be uninstalled : ") -- cgit v1.2.3-70-g09d2 From bb968fc5a2bf2ceb585676646f68ec2029a298b1 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 4 Apr 2016 02:52:38 -0700 Subject: Fix #620, Resolve #664. Fix issues with build environment. - Also added better regression tests for build environment. --- lib/spack/spack/build_environment.py | 41 ++++------ lib/spack/spack/test/install.py | 29 +++++-- .../builtin.mock/packages/cmake-client/package.py | 89 ++++++++++++++++++++++ .../repos/builtin.mock/packages/cmake/package.py | 69 +++++++++++++++++ 4 files changed, 197 insertions(+), 31 deletions(-) create mode 100644 var/spack/repos/builtin.mock/packages/cmake-client/package.py create mode 100644 var/spack/repos/builtin.mock/packages/cmake/package.py diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 640db0c1d1..f4f8037ac0 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -213,7 +213,7 @@ def set_module_variables_for_package(pkg, module): # 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 = which("cmake") + m.cmake = Executable('cmake') # standard CMake arguments m.std_cmake_args = ['-DCMAKE_INSTALL_PREFIX=%s' % pkg.prefix, @@ -278,21 +278,6 @@ def parent_class_modules(cls): return result -def setup_module_variables_for_dag(pkg): - """Set module-scope variables for all packages in the DAG.""" - for spec in pkg.spec.traverse(order='post'): - # 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, - # then set the module variables for both classes so the - # parent class can still use them if it gets called. - spkg = spec.package - modules = parent_class_modules(spkg.__class__) - for mod in modules: - set_module_variables_for_package(spkg, mod) - set_module_variables_for_package(spkg, spkg.module) - - def setup_package(pkg): """Execute all environment setup routines.""" spack_env = EnvironmentModifications() @@ -316,20 +301,26 @@ def setup_package(pkg): set_compiler_environment_variables(pkg, spack_env) set_build_environment_variables(pkg, spack_env) - setup_module_variables_for_dag(pkg) - # Allow dependencies to modify the module + # traverse in postorder so package can use vars from its dependencies spec = pkg.spec - for dependency_spec in spec.traverse(root=False): - dpkg = dependency_spec.package - dpkg.setup_dependent_package(pkg.module, spec) + for dspec in pkg.spec.traverse(order='post'): + # 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, + # then set the module variables for both classes so the + # parent class can still use them if it gets called. + spkg = dspec.package + modules = parent_class_modules(spkg.__class__) + for mod in modules: + set_module_variables_for_package(spkg, mod) + set_module_variables_for_package(spkg, spkg.module) - # Allow dependencies to set up environment as well - for dependency_spec in spec.traverse(root=False): - dpkg = dependency_spec.package + # Allow dependencies to modify the module + dpkg = dspec.package + dpkg.setup_dependent_package(pkg.module, spec) dpkg.setup_dependent_environment(spack_env, run_env, spec) - # Allow the package to apply some settings. pkg.setup_environment(spack_env, run_env) # Make sure nothing's strange about the Spack environment. diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py index 8297893f01..fc5b7e67df 100644 --- a/lib/spack/spack/test/install.py +++ b/lib/spack/spack/test/install.py @@ -64,7 +64,14 @@ class InstallTest(MockPackagesTest): shutil.rmtree(self.tmpdir, ignore_errors=True) - def test_install_and_uninstall(self): + def fake_fetchify(self, pkg): + """Fake the URL for a package so it downloads from a file.""" + fetcher = FetchStrategyComposite() + fetcher.append(URLFetchStrategy(self.repo.url)) + pkg.fetcher = fetcher + + + def ztest_install_and_uninstall(self): # Get a basic concrete spec for the trivial install package. spec = Spec('trivial_install_test_package') spec.concretize() @@ -73,11 +80,7 @@ class InstallTest(MockPackagesTest): # Get the package pkg = spack.repo.get(spec) - # Fake the URL for the package so it downloads from a file. - - fetcher = FetchStrategyComposite() - fetcher.append(URLFetchStrategy(self.repo.url)) - pkg.fetcher = fetcher + self.fake_fetchify(pkg) try: pkg.do_install() @@ -85,3 +88,17 @@ class InstallTest(MockPackagesTest): except Exception, e: pkg.remove_prefix() raise + + + def test_install_environment(self): + spec = Spec('cmake-client').concretized() + + for s in spec.traverse(): + self.fake_fetchify(s.package) + + pkg = spec.package + try: + pkg.do_install() + except Exception, e: + pkg.remove_prefix() + raise diff --git a/var/spack/repos/builtin.mock/packages/cmake-client/package.py b/var/spack/repos/builtin.mock/packages/cmake-client/package.py new file mode 100644 index 0000000000..a5d3ef156a --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/cmake-client/package.py @@ -0,0 +1,89 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +import os + +def check(condition, msg): + """Raise an install error if condition is False.""" + if not condition: + raise InstallError(msg) + + +class CmakeClient(Package): + """A dumy package that uses cmake.""" + homepage = 'https://www.example.com' + url = 'https://www.example.com/cmake-client-1.0.tar.gz' + + version('1.0', '4cb3ff35b2472aae70f542116d616e63') + + depends_on('cmake') + + + def setup_environment(self, spack_env, run_env): + spack_cc # Ensure spack module-scope variable is avaiabl + check(from_cmake == "from_cmake", + "setup_environment couldn't read global set by cmake.") + + check(self.spec['cmake'].link_arg == "test link arg", + "link arg on dependency spec not readable from setup_environment.") + + + def setup_dependent_environment(self, spack_env, run_env, dspec): + spack_cc # Ensure spack module-scope variable is avaiable + check(from_cmake == "from_cmake", + "setup_dependent_environment couldn't read global set by cmake.") + + check(self.spec['cmake'].link_arg == "test link arg", + "link arg on dependency spec not readable from setup_dependent_environment.") + + + def setup_dependent_package(self, module, dspec): + spack_cc # Ensure spack module-scope variable is avaiable + check(from_cmake == "from_cmake", + "setup_dependent_package couldn't read global set by cmake.") + + check(self.spec['cmake'].link_arg == "test link arg", + "link arg on dependency spec not readable from setup_dependent_package.") + + + + def install(self, spec, prefix): + # check that cmake is in the global scope. + global cmake + check(cmake is not None, "No cmake was in environment!") + + # check that which('cmake') returns the right one. + cmake = which('cmake') + check(cmake.exe[0].startswith(spec['cmake'].prefix.bin), + "Wrong cmake was in environment: %s" % cmake) + + check(from_cmake == "from_cmake", + "Couldn't read global set by cmake.") + + check(os.environ['from_cmake'] == 'from_cmake', + "Couldn't read env var set in envieonmnt by dependency") + + mkdirp(prefix.bin) + touch(join_path(prefix.bin, 'dummy')) diff --git a/var/spack/repos/builtin.mock/packages/cmake/package.py b/var/spack/repos/builtin.mock/packages/cmake/package.py new file mode 100644 index 0000000000..deb44c2bf7 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/cmake/package.py @@ -0,0 +1,69 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +import os + +def check(condition, msg): + """Raise an install error if condition is False.""" + if not condition: + raise InstallError(msg) + + +class Cmake(Package): + """A dumy package for the cmake build system.""" + homepage = 'https://www.cmake.org' + url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz' + + version('3.4.3', '4cb3ff35b2472aae70f542116d616e63', + url='https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz') + + + def setup_environment(self, spack_env, run_env): + spack_cc # Ensure spack module-scope variable is avaiable + spack_env.set('for_install', 'for_install') + + def setup_dependent_environment(self, spack_env, run_env, dspec): + spack_cc # Ensure spack module-scope variable is avaiable + spack_env.set('from_cmake', 'from_cmake') + + + def setup_dependent_package(self, module, dspec): + spack_cc # Ensure spack module-scope variable is avaiable + + self.spec.from_cmake = "from_cmake" + module.from_cmake = "from_cmake" + + self.spec.link_arg = "test link arg" + + + def install(self, spec, prefix): + mkdirp(prefix.bin) + + check(os.environ['for_install'] == 'for_install', + "Couldn't read env var set in compile envieonmnt") + + cmake_exe = join_path(prefix.bin, 'cmake') + touch(cmake_exe) + set_executable(cmake_exe) -- cgit v1.2.3-70-g09d2 From d375ddadc4d6f253b21e9c982040757bd5a187d3 Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 4 Apr 2016 12:25:13 +0200 Subject: openssl : reads newer version from ftp (recommended on openssl web-site) --- var/spack/repos/builtin/packages/openssl/package.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index db66d1f56e..9e3109bfed 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -3,6 +3,7 @@ import llnl.util.tty as tty from spack import * + class Openssl(Package): """The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source @@ -47,16 +48,16 @@ class Openssl(Package): return openssl_url def check_for_outdated_release(self, version, warnings_given_to_user): - latest = 'http://www.openssl.org/source/openssl-{version}.tar.gz' + latest = 'ftp://ftp.openssl.org/source/openssl-{version}.tar.gz' older = 'http://www.openssl.org/source/old/{version_number}/openssl-{version_full}.tar.gz' # Try to use the url where the latest tarballs are stored. If the url does not exist (404), then # return the url for older format version_number = '.'.join([str(x) for x in version[:-1]]) - older_url = older.format(version_number=version_number, version_full=version) - latest_url = latest.format(version=version) - response = urllib.urlopen(latest.format(version=version)) - if response.getcode() == 404: - openssl_url = older_url + try: + openssl_url = latest.format(version=version) + urllib.urlopen(openssl_url) + except IOError: + openssl_url = older.format(version_number=version_number, version_full=version) # Checks if we already warned the user for this particular version of OpenSSL. # If not we display a warning message and mark this version if not warnings_given_to_user.get(version, False): @@ -65,8 +66,7 @@ class Openssl(Package): tty.warn('Consider updating to the latest version of this package.') tty.warn('More details at {homepage}'.format(homepage=Openssl.homepage)) warnings_given_to_user[version] = True - else: - openssl_url = latest_url + return openssl_url def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 7197f1578335b38eb2037e8d82f15a27d786d5c1 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Fri, 1 Apr 2016 12:28:46 -0400 Subject: Add version 2.6.7 of py-setuptools --- var/spack/repos/builtin/packages/py-setuptools/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index c6d9be1add..9338a5e157 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -10,6 +10,7 @@ class PySetuptools(Package): version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') version('19.2', '78353b1f80375ca5e088f4b4627ffe03') version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') + version('20.6.7', '45d6110f3ec14924e44c33411db64fe6') extends('python') -- cgit v1.2.3-70-g09d2 From e0b9f79b9bc20c4e5178ee6dba6b327057cb3c4e Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Mon, 4 Apr 2016 10:33:03 -0700 Subject: Add changes that remove unsupported libraries from the boost build libraries list based on the boost version numbers. Libraries that are removed include: log - for versions of boost 1.53.0 and older - :atomic - for versions of boost 1.52.0 and older - :locale for versions of boost 1.49.0 and older - :chrono - for versions of boost 1.48.0 and older - and :random - for versions of boost 1.44.0 and older. --- var/spack/repos/builtin/packages/boost/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index f889da21f2..12bc9508c3 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -199,6 +199,18 @@ class Boost(Package): install_tree(src, dst) return + # Remove libraries that the release version does not support + if not spec.satisfies('@1.54.0:'): + withLibs.remove('log') + if not spec.satisfies('@1.53.0:'): + withLibs.remove('atomic') + if not spec.satisfies('@1.48.0:'): + withLibs.remove('locale') + if not spec.satisfies('@1.47.0:'): + withLibs.remove('chrono') + if not spec.satisfies('@1.43.0:'): + withLibs.remove('random') + # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = './' -- cgit v1.2.3-70-g09d2 From 6ebed7a2a6488a857fc6878c2d39d26ce9bc72f5 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Mon, 4 Apr 2016 11:23:51 -0700 Subject: Add release 9.1.0 recognition to the Dyninst API package file. --- var/spack/repos/builtin/packages/dyninst/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py index 0111dcbe08..b28e897a0f 100644 --- a/var/spack/repos/builtin/packages/dyninst/package.py +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -31,6 +31,8 @@ class Dyninst(Package): url = "http://www.dyninst.org/sites/default/files/downloads/dyninst/8.1.2/DyninstAPI-8.1.2.tgz" list_url = "http://www.dyninst.org/downloads/dyninst-8.x" + version('9.1.0', '5c64b77521457199db44bec82e4988ac', + url="http://www.paradyn.org/release9.1.0/DyninstAPI-9.1.0.tgz") version('8.2.1', 'abf60b7faabe7a2e4b54395757be39c7', url="http://www.paradyn.org/release8.2/DyninstAPI-8.2.1.tgz") version('8.1.2', 'bf03b33375afa66fe0efa46ce3f4b17a', -- cgit v1.2.3-70-g09d2 From 7bc28cc334ea8b64ad4722dda2997871c27dc01a Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 14:33:48 -0400 Subject: Clean up cc script --- lib/spack/env/cc | 65 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 2eb6f46afe..6445edf839 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -84,13 +84,12 @@ done # ld link # ccld compile & link # vcheck version check -# -# Depending on the mode, we may or may not add extra rpaths. -# This variable controls whether they are added. -add_rpaths=true command=$(basename "$0") case "$command" in + cpp) + mode=cpp + ;; cc|c89|c99|gcc|clang|icc|pgcc|xlc) command="$SPACK_CC" language="C" @@ -107,22 +106,8 @@ case "$command" in command="$SPACK_F77" language="Fortran 77" ;; - cpp) - mode=cpp - ;; ld) mode=ld - - # Darwin's linker has a -r argument that merges object files - # together. It doesn't work with -rpath. - if [[ $OSTYPE = darwin* ]]; then - for arg in "$@"; do - if [ "$arg" = -r ]; then - add_rpaths=false - break - fi - done - fi ;; *) die "Unkown compiler: $command" @@ -130,11 +115,11 @@ case "$command" in esac # If any of the arguments below is present then the mode is vcheck. In -# vcheck mode nothing is added in terms of extra search paths or -# libraries -if [ -z "$mode" ]; then +# vcheck mode, nothing is added in terms of extra search paths or +# libraries. +if [[ -z $mode ]]; then for arg in "$@"; do - if [ "$arg" = -v -o "$arg" = -V -o "$arg" = --version -o "$arg" = -dumpversion ]; then + if [[ $arg = -v || $arg = -V || $arg = --version || $arg = -dumpversion ]]; then mode=vcheck break fi @@ -142,16 +127,16 @@ if [ -z "$mode" ]; then fi # Finish setting up the mode. -if [ -z "$mode" ]; then +if [[ -z $mode ]]; then mode=ccld for arg in "$@"; do - if [ "$arg" = -E ]; then + if [[ $arg = -E ]]; then mode=cpp break - elif [ "$arg" = -S ]; then + elif [[ $arg = -S ]]; then mode=as break - elif [ "$arg" = -c ]; then + elif [[ $arg = -c ]]; then mode=cc break fi @@ -159,7 +144,7 @@ if [ -z "$mode" ]; then fi # Dump the version and exit if we're in testing mode. -if [ "$SPACK_TEST_COMMAND" = "dump-mode" ]; then +if [[ $SPACK_TEST_COMMAND = dump-mode ]]; then echo "$mode" exit fi @@ -170,10 +155,23 @@ if [[ -z $command ]]; then die "ERROR: Compiler '$SPACK_COMPILER_SPEC' does not support compiling $language programs." fi -if [ "$mode" == vcheck ] ; then +if [[ $mode == vcheck ]]; then exec ${command} "$@" fi +# Darwin's linker has a -r argument that merges object files together. +# It doesn't work with -rpath. +# This variable controls whether they are added. +add_rpaths=true +if [[ mode = ld && $OSTYPE = darwin* ]]; then + for arg in "$@"; do + if [[ $arg = -r ]]; then + add_rpaths=false + break + fi + done +fi + # Save original command for debug logging input_command="$@" args=("$@") @@ -234,11 +232,14 @@ IFS=':' read -ra spack_env_dirs <<< "$SPACK_ENV_PATH" spack_env_dirs+=("" ".") PATH="" for dir in "${env_path[@]}"; do - remove="" - for rm_dir in "${spack_env_dirs[@]}"; do - if [[ $dir = $rm_dir ]]; then remove=True; fi + addpath=true + for env_dir in "${spack_env_dirs[@]}"; do + if [[ $dir = $env_dir ]]; then + addpath=false + break + fi done - if [[ -z $remove ]]; then + if $addpath; then PATH="${PATH:+$PATH:}$dir" fi done -- cgit v1.2.3-70-g09d2 From badf5b047b5cca851c3cad14b4cb7167103ed229 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 14:42:36 -0400 Subject: Calculate version string in a function --- var/spack/repos/builtin/packages/hdf5/package.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 1bf01e7423..f26e225b83 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -37,8 +37,7 @@ class Hdf5(Package): list_url = "http://www.hdfgroup.org/ftp/HDF5/releases" list_depth = 3 - version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199', - url='http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0/src/hdf5-1.10.0.tar.gz') + version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199') version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618') version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') @@ -147,5 +146,7 @@ class Hdf5(Package): return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + ".tar.gz" elif version < Version("1.7"): return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + ".tar.gz" - else: + elif version < Version("1.10"): return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" + else: + return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" -- cgit v1.2.3-70-g09d2 From d0ca3952a34a74f0167b76bbedfa3cf8875a399c Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 2 Apr 2016 20:17:01 -0500 Subject: Add version 0.17.1 of scikit-learn. --- var/spack/repos/builtin/packages/py-scikit-learn/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-scikit-learn/package.py b/var/spack/repos/builtin/packages/py-scikit-learn/package.py index 5b078ce901..7f8e25e69d 100644 --- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py @@ -7,6 +7,7 @@ class PyScikitLearn(Package): version('0.15.2', 'd9822ad0238e17b382a3c756ea94fe0d') version('0.16.1', '363ddda501e3b6b61726aa40b8dbdb7e') + version('0.17.1', 'a2f8b877e6d99b1ed737144f5a478dfc') extends('python') -- cgit v1.2.3-70-g09d2 From 3a4210e9d7cbdb1b9a441d41a88e4170d08d2879 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 12:07:37 -0500 Subject: New package - py-dask (http://dask.pydata.org). --- var/spack/repos/builtin/packages/py-dask/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-dask/package.py diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py new file mode 100644 index 0000000000..725d47b97c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-dask/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyDask(Package): + """Minimal task scheduling abstraction""" + homepage = "https://github.com/dask/dask/" + url = "https://pypi.python.org/packages/source/d/dask/dask-0.8.1.tar.gz" + + version('0.8.1', '5dd8e3a3823b3bc62c9a6d192e2cb5b4') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From a10ab78e28ca14f923e93029027f763c16fab7fc Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 12:09:11 -0500 Subject: New package - py-decorator (https://github.com/micheles/decorator). --- var/spack/repos/builtin/packages/py-decorator/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-decorator/package.py diff --git a/var/spack/repos/builtin/packages/py-decorator/package.py b/var/spack/repos/builtin/packages/py-decorator/package.py new file mode 100644 index 0000000000..99e3dbc49c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-decorator/package.py @@ -0,0 +1,13 @@ +from spack import * + +class PyDecorator(Package): + """The aim of the decorator module it to simplify the usage of decorators for the average programmer, and to popularize decorators by showing various non-trivial examples.""" + homepage = "https://github.com/micheles/decorator" + url = "https://pypi.python.org/packages/source/d/decorator/decorator-4.0.9.tar.gz" + + version('4.0.9', 'f12c5651ccd707e12a0abaa4f76cd69a') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 8404f084c8d768a197b830ff1809eb35f505ca8d Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 12:12:42 -0500 Subject: New package - py-networkx (https://networkx.github.io/). --- var/spack/repos/builtin/packages/py-networkx/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-networkx/package.py diff --git a/var/spack/repos/builtin/packages/py-networkx/package.py b/var/spack/repos/builtin/packages/py-networkx/package.py new file mode 100644 index 0000000000..893146ec3e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-networkx/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyNetworkx(Package): + """NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.""" + homepage = "http://networkx.github.io/" + url = "https://pypi.python.org/packages/source/n/networkx/networkx-1.11.tar.gz" + + version('1.11', '6ef584a879e9163013e9a762e1cf7cd1') + + extends('python') + + depends_on('py-decorator') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 9c60f122a6ffa877d265d523e52e8a4018c2bdec Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 12:13:31 -0500 Subject: New package - py-scikit-image (http://scikit-image.org/). --- .../builtin/packages/py-scikit-image/package.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-scikit-image/package.py diff --git a/var/spack/repos/builtin/packages/py-scikit-image/package.py b/var/spack/repos/builtin/packages/py-scikit-image/package.py new file mode 100644 index 0000000000..22ce1f8374 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py @@ -0,0 +1,20 @@ +from spack import * + +class PyScikitImage(Package): + """Image processing algorithms for SciPy, including IO, morphology, filtering, warping, color manipulation, object detection, etc.""" + homepage = "http://scikit-image.org/" + url = "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-0.12.3.tar.gz" + + version('0.12.3', '04ea833383e0b6ad5f65da21292c25e1') + + extends('python', ignore=r'bin/.*\.py$|bin/f2py$') + + depends_on('py-dask') + depends_on('py-pillow') + depends_on('py-networkx') + depends_on('py-six') + depends_on('py-scipy') + depends_on('py-matplotlib') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 83d6e04d39ce81376c96cf6b4aa3261ff9e6fbc9 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 15:38:21 -0400 Subject: Convert `=` to `==` in tests; untabify --- lib/spack/env/cc | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 6445edf839..b845de8a2b 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -119,7 +119,7 @@ esac # libraries. if [[ -z $mode ]]; then for arg in "$@"; do - if [[ $arg = -v || $arg = -V || $arg = --version || $arg = -dumpversion ]]; then + if [[ $arg == -v || $arg == -V || $arg == --version || $arg == -dumpversion ]]; then mode=vcheck break fi @@ -130,13 +130,13 @@ fi if [[ -z $mode ]]; then mode=ccld for arg in "$@"; do - if [[ $arg = -E ]]; then + if [[ $arg == -E ]]; then mode=cpp break - elif [[ $arg = -S ]]; then + elif [[ $arg == -S ]]; then mode=as break - elif [[ $arg = -c ]]; then + elif [[ $arg == -c ]]; then mode=cc break fi @@ -144,7 +144,7 @@ if [[ -z $mode ]]; then fi # Dump the version and exit if we're in testing mode. -if [[ $SPACK_TEST_COMMAND = dump-mode ]]; then +if [[ $SPACK_TEST_COMMAND == dump-mode ]]; then echo "$mode" exit fi @@ -163,12 +163,12 @@ fi # It doesn't work with -rpath. # This variable controls whether they are added. add_rpaths=true -if [[ mode = ld && $OSTYPE = darwin* ]]; then +if [[ mode == ld && $OSTYPE == darwin* ]]; then for arg in "$@"; do - if [[ $arg = -r ]]; then + if [[ $arg == -r ]]; then add_rpaths=false break - fi + fi done fi @@ -181,17 +181,17 @@ IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do # Prepend include directories if [[ -d $dep/include ]]; then - if [[ $mode = cpp || $mode = cc || $mode = as || $mode = ccld ]]; then + if [[ $mode == cpp || $mode == cc || $mode == as || $mode == ccld ]]; then args=("-I$dep/include" "${args[@]}") fi fi # Prepend lib and RPATH directories if [[ -d $dep/lib ]]; then - if [[ $mode = ccld ]]; then + if [[ $mode == ccld ]]; then $add_rpaths && args=("-Wl,-rpath,$dep/lib" "${args[@]}") args=("-L$dep/lib" "${args[@]}") - elif [[ $mode = ld ]]; then + elif [[ $mode == ld ]]; then $add_rpaths && args=("-rpath" "$dep/lib" "${args[@]}") args=("-L$dep/lib" "${args[@]}") fi @@ -199,10 +199,10 @@ for dep in "${deps[@]}"; do # Prepend lib64 and RPATH directories if [[ -d $dep/lib64 ]]; then - if [[ $mode = ccld ]]; then + if [[ $mode == ccld ]]; then $add_rpaths && args=("-Wl,-rpath,$dep/lib64" "${args[@]}") args=("-L$dep/lib64" "${args[@]}") - elif [[ $mode = ld ]]; then + elif [[ $mode == ld ]]; then $add_rpaths && args=("-rpath" "$dep/lib64" "${args[@]}") args=("-L$dep/lib64" "${args[@]}") fi @@ -210,9 +210,9 @@ for dep in "${deps[@]}"; do done # Include all -L's and prefix/whatever dirs in rpath -if [[ $mode = ccld ]]; then +if [[ $mode == ccld ]]; then $add_rpaths && args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") -elif [[ $mode = ld ]]; then +elif [[ $mode == ld ]]; then $add_rpaths && args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") fi @@ -234,7 +234,7 @@ PATH="" for dir in "${env_path[@]}"; do addpath=true for env_dir in "${spack_env_dirs[@]}"; do - if [[ $dir = $env_dir ]]; then + if [[ $dir == $env_dir ]]; then addpath=false break fi @@ -248,7 +248,7 @@ export PATH full_command=("$command" "${args[@]}") # In test command mode, write out full command for Spack tests. -if [[ $SPACK_TEST_COMMAND = dump-args ]]; then +if [[ $SPACK_TEST_COMMAND == dump-args ]]; then echo "${full_command[@]}" exit elif [[ -n $SPACK_TEST_COMMAND ]]; then @@ -258,7 +258,7 @@ fi # # Write the input and output commands to debug logs if it's asked for. # -if [[ $SPACK_DEBUG = TRUE ]]; then +if [[ $SPACK_DEBUG == TRUE ]]; then input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.in.log" output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.out.log" echo "[$mode] $command $input_command" >> $input_log -- cgit v1.2.3-70-g09d2 From 9bb99de0a75a9f9c2cc1ad65596a7219fa700a76 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 13:47:48 -0600 Subject: + When using CMake, use Release instead of RelWithDebInfo flags. --- lib/spack/spack/build_environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 640db0c1d1..1346af2285 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -217,7 +217,7 @@ def set_module_variables_for_package(pkg, module): # standard CMake arguments m.std_cmake_args = ['-DCMAKE_INSTALL_PREFIX=%s' % pkg.prefix, - '-DCMAKE_BUILD_TYPE=RelWithDebInfo'] + '-DCMAKE_BUILD_TYPE=Release'] if platform.mac_ver()[0]: m.std_cmake_args.append('-DCMAKE_FIND_FRAMEWORK=LAST') -- cgit v1.2.3-70-g09d2 From 0ff059e388b856d7eed86d27a665a48b65bfa65f Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 16:00:09 -0400 Subject: Clean up comments and output messages --- lib/spack/env/cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index b845de8a2b..aa1e0dbe29 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -39,7 +39,7 @@ # # This is the list of environment variables that need to be set before -# the script runs. They are set by routines in spack.build_environment +# the script runs. They are set by routines in spack.build_environment # as part of spack.package.Package.do_install(). parameters=" SPACK_PREFIX @@ -50,7 +50,7 @@ SPACK_SHORT_SPEC" # The compiler input variables are checked for sanity later: # SPACK_CC, SPACK_CXX, SPACK_F77, SPACK_FC -# Debug flag is optional; set to true for debug logging: +# Debug flag is optional; set to "TRUE" for debug logging: # SPACK_DEBUG # Test command is used to unit test the compiler script. # SPACK_TEST_COMMAND @@ -66,11 +66,10 @@ function die { for param in $parameters; do if [[ -z ${!param} ]]; then - die "Spack compiler must be run from spack! Input $param was missing!" + die "Spack compiler must be run from Apack! Input '$param' is missing." fi done -# # Figure out the type of compiler, the language, and the mode so that # the compiler script knows what to do. # @@ -78,12 +77,12 @@ done # 'command' is set based on the input command to $SPACK_[CC|CXX|F77|F90] # # 'mode' is set to one of: +# vcheck version check # cpp preprocess # cc compile # as assemble # ld link # ccld compile & link -# vcheck version check command=$(basename "$0") case "$command" in @@ -114,8 +113,8 @@ case "$command" in ;; esac -# If any of the arguments below is present then the mode is vcheck. In -# vcheck mode, nothing is added in terms of extra search paths or +# If any of the arguments below are present, then the mode is vcheck. +# In vcheck mode, nothing is added in terms of extra search paths or # libraries. if [[ -z $mode ]]; then for arg in "$@"; do -- cgit v1.2.3-70-g09d2 From cd3086f78d878a86c78672110bbc3fba4894a401 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 14:35:09 -0600 Subject: + Since CBLAS is only provided in 3.6.0 or later, modify package.py to on refer to CBLAS when the latest release is requested. --- var/spack/repos/builtin/packages/netlib-lapack/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index 05436332ac..d1252efb9b 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -34,15 +34,18 @@ class NetlibLapack(Package): def patch(self): # Fix cblas CMakeLists.txt -- has wrong case for subdirectory name. - filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', - '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) + if self.spec.satisfies('@3.6.0:'): + filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', + '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) def install_one(self, spec, prefix, shared): cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'), - '-DCBLAS=ON', # always build CBLAS '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), '-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')] + if spec.satisfies('@3.6.0:'): + cmake_args.extend(['-DCBLAS=ON']) # always build CBLAS + if '+external-blas' in spec: # TODO : the mechanism to specify the library should be more general, # TODO : but this allows to have an hook to an external blas @@ -80,6 +83,3 @@ class NetlibLapack(Package): if '+shared' in self.spec: self.spec.blas_shared_lib = join_path(libdir, 'libblas.%s' % dso_suffix) self.spec.lapack_shared_lib = join_path(libdir, 'liblapack.%s' % dso_suffix) - - - -- cgit v1.2.3-70-g09d2 From db23d27eb4c7b6be36a0b9df19160cbd3af511e4 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 14:41:41 -0600 Subject: + Revert accidental commit that set CMAKE_BUILD_TYPE=Release. --- lib/spack/spack/build_environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 2ef874803c..f4f8037ac0 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -217,7 +217,7 @@ def set_module_variables_for_package(pkg, module): # standard CMake arguments m.std_cmake_args = ['-DCMAKE_INSTALL_PREFIX=%s' % pkg.prefix, - '-DCMAKE_BUILD_TYPE=Release'] + '-DCMAKE_BUILD_TYPE=RelWithDebInfo'] if platform.mac_ver()[0]: m.std_cmake_args.append('-DCMAKE_FIND_FRAMEWORK=LAST') -- cgit v1.2.3-70-g09d2 From 9c071ea40d6bacef2056184f7b256c2f1fb7cbd0 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 4 Apr 2016 13:44:24 -0700 Subject: Changed modulecmd parameters. return_oe is not one of the parameters in the mainline spack repo. Changed the args to the appropriate ones in the new spack --- lib/spack/spack/compiler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index e3ea918aca..c285c8a29d 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -285,16 +285,15 @@ class Compiler(object): @classmethod def find_in_modules(cls): compilers = [] - if cls.PrgEnv: if not cls.PrgEnv_compiler: tty.die('Must supply PrgEnv_compiler with PrgEnv') modulecmd = which('modulecmd') modulecmd.add_default_arg('python') - output = modulecmd('avail', cls.PrgEnv_compiler, return_oe=True) + + output = modulecmd('avail', cls.PrgEnv_compiler, output=str, error=str) matches = re.findall(r'(%s)/([\d\.]+[\d])' % cls.PrgEnv_compiler, output) - for name, version in matches: v = version comp = cls(spack.spec.CompilerSpec(name + '@' + v), 'MODULES', -- cgit v1.2.3-70-g09d2 From 6d73c862096ecd6426d42dfe666c0908c2069a21 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 4 Apr 2016 13:45:15 -0700 Subject: Gives error on cori that [PrgEnv-xx, gcc/x.x.x] is not part of the schema. Changed it to oneOf : type : array to get rid of the error. --- lib/spack/spack/config.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index c9a770a53f..f978ed12b0 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -159,7 +159,9 @@ section_schemas = { 'type': 'object', 'additionalProperties': False, 'required': ['cc', 'cxx', 'f77', 'fc'], - 'properties': { + 'properties': { + 'strategy': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, 'cc': { 'anyOf': [ {'type' : 'string' }, {'type' : 'null' }]}, 'cxx': { 'anyOf': [ {'type' : 'string' }, @@ -168,10 +170,10 @@ section_schemas = { {'type' : 'null' }]}, 'fc': { 'anyOf': [ {'type' : 'string' }, {'type' : 'null' }]}, - 'strategy': { 'anyOf': [ {'type' : 'string' }, - {'type' : 'null' }]}, - 'modules': { 'anyOf': [ {'type' : 'string' }, - {'type' : 'null' }]} + 'modules': { 'anyOf': [ {'type' : 'string'}, + {'type' : 'null' }, + {'type': 'array'}, + ]} },},},},},},},}, 'mirrors': { @@ -221,7 +223,7 @@ section_schemas = { 'items' : { 'anyOf' : [ { 'type' : 'string' }, { 'type' : 'number'}]}}, #version strings 'compiler': { - 'type' : 'array', + 'typee' : 'array', 'default' : [], 'items' : { 'type' : 'string' } }, #compiler specs 'nobuild': { -- cgit v1.2.3-70-g09d2 From 0296f96c7b5279b2dd9cf585a493f21e3344fe2b Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 4 Apr 2016 13:56:15 -0700 Subject: Resolves #739. Don't call setup_dependent_* for package itself. --- lib/spack/spack/build_environment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index f4f8037ac0..eb72f2a6b4 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -304,7 +304,7 @@ def setup_package(pkg): # traverse in postorder so package can use vars from its dependencies spec = pkg.spec - for dspec in pkg.spec.traverse(order='post'): + for dspec in pkg.spec.traverse(order='post', root=False): # 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, @@ -321,6 +321,7 @@ def setup_package(pkg): dpkg.setup_dependent_package(pkg.module, spec) dpkg.setup_dependent_environment(spack_env, run_env, spec) + set_module_variables_for_package(pkg, pkg.module) pkg.setup_environment(spack_env, run_env) # Make sure nothing's strange about the Spack environment. -- cgit v1.2.3-70-g09d2 From 9bfc83ac5c3ae09cbcb281296d210d17984cd1db Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 4 Apr 2016 15:36:10 -0700 Subject: Changed so that py_platform.dist() grabs the major version number. --- lib/spack/spack/operating_systems/linux_distro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/operating_systems/linux_distro.py b/lib/spack/spack/operating_systems/linux_distro.py index 81c7a86430..d0f24d842f 100644 --- a/lib/spack/spack/operating_systems/linux_distro.py +++ b/lib/spack/spack/operating_systems/linux_distro.py @@ -10,6 +10,6 @@ class LinuxDistro(OperatingSystem): """ def __init__(self): name = py_platform.dist()[0] - version = py_platform.dist()[1] + version = py_platform.dist()[1].split(".")[0] # Grabs major version from tuple super(LinuxDistro, self).__init__(name, version) -- cgit v1.2.3-70-g09d2 From c0eb5844e536c25165b913f4dc203fe09f8ecc3d Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 17:05:30 -0600 Subject: + Provide dia, a program for drawing structured diagrams. --- var/spack/repos/builtin/packages/dia/package.py | 67 +++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 var/spack/repos/builtin/packages/dia/package.py diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py new file mode 100644 index 0000000000..0c8bbfc425 --- /dev/null +++ b/var/spack/repos/builtin/packages/dia/package.py @@ -0,0 +1,67 @@ +from spack import * + +class Dia(Package): + """Dia is a program for drawing structured diagrams.""" + homepage = 'https://wiki.gnome.org/Apps/Dia' + url = 'https://ftp.gnome.org/pub/gnome/sources/dia/0.97/dia-0.97.3.tar.xz' + + version('0.97.3', '0e744a0f6a6c4cb6a089e4d955392c3c') + + #variant('ncurses', default=True, description='Enables the build of the ncurses gui') + #variant('openssl', default=True, description="Enables CMake's OpenSSL features") + #variant('qt', default=False, description='Enables the build of cmake-gui') + #variant('doc', default=False, description='Enables the generation of html and man page documentation') + + depends_on('gtkplus@2.6.0:') + # depends_on('openssl', when='+openssl') + #depends_on('qt', when='+qt') + #depends_on('python@2.7.11:', when='+doc') + depends_on('cairo') + #depends_on('libart') # optional dependency, not yet supported by spack. + depends_on('libpng') + depends_on('libxslt') + depends_on('python') + depends_on('swig') + # depends_on('py-gtk') # optional dependency, not yet supported by spack. + + def url_for_version(self, version): + """Handle Dia's version-based custom URLs.""" + return 'https://ftp.gnome.org/pub/gnome/source/dia/%s/dia-%s.tar.xz' % (version.up_to(2), version) + + # def validate(self, spec): + # """ + # Checks if incompatible versions of qt were specified + + # :param spec: spec of the package + # :raises RuntimeError: in case of inconsistencies + # """ + + # if '+qt' in spec and spec.satisfies('^qt@5.4.0'): + # msg = 'qt-5.4.0 has broken CMake modules.' + # raise RuntimeError(msg) + + def install(self, spec, prefix): + # Consistency check + # self.validate(spec) + + # configure, build, install: + options = ['--prefix=%s' % prefix, + '--with-cairo', + '--with-xslt-prefix=%s' % spec['libxslt'].prefix, + '--with-python', + '--with-swig'] + + # if '+qt' in spec: + # options.append('--qt-gui') + + # if '+doc' in spec: + # options.append('--sphinx-html') + # options.append('--sphinx-man') + + # if '+openssl' in spec: + # options.append('--') + # options.append('-DCMAKE_USE_OPENSSL=ON') + + configure(*options) + make() + make('install') -- cgit v1.2.3-70-g09d2 From 77b688f4fa197c2b7d1e792e038e51ed52e5be2a Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 17:08:19 -0600 Subject: + Don't include files submitted with PR#741. --- var/spack/repos/builtin/packages/netlib-lapack/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index d1252efb9b..05436332ac 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -34,18 +34,15 @@ class NetlibLapack(Package): def patch(self): # Fix cblas CMakeLists.txt -- has wrong case for subdirectory name. - if self.spec.satisfies('@3.6.0:'): - filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', - '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) + filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', + '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) def install_one(self, spec, prefix, shared): cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'), + '-DCBLAS=ON', # always build CBLAS '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), '-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')] - if spec.satisfies('@3.6.0:'): - cmake_args.extend(['-DCBLAS=ON']) # always build CBLAS - if '+external-blas' in spec: # TODO : the mechanism to specify the library should be more general, # TODO : but this allows to have an hook to an external blas @@ -83,3 +80,6 @@ class NetlibLapack(Package): if '+shared' in self.spec: self.spec.blas_shared_lib = join_path(libdir, 'libblas.%s' % dso_suffix) self.spec.lapack_shared_lib = join_path(libdir, 'liblapack.%s' % dso_suffix) + + + -- cgit v1.2.3-70-g09d2 From 3a3f9789ce001a3dc61274eac67ddfc53d91df4c Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 17:10:28 -0600 Subject: + General cleanup of package.py. --- var/spack/repos/builtin/packages/dia/package.py | 33 ------------------------- 1 file changed, 33 deletions(-) diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py index 0c8bbfc425..1cb5910e46 100644 --- a/var/spack/repos/builtin/packages/dia/package.py +++ b/var/spack/repos/builtin/packages/dia/package.py @@ -7,15 +7,7 @@ class Dia(Package): version('0.97.3', '0e744a0f6a6c4cb6a089e4d955392c3c') - #variant('ncurses', default=True, description='Enables the build of the ncurses gui') - #variant('openssl', default=True, description="Enables CMake's OpenSSL features") - #variant('qt', default=False, description='Enables the build of cmake-gui') - #variant('doc', default=False, description='Enables the generation of html and man page documentation') - depends_on('gtkplus@2.6.0:') - # depends_on('openssl', when='+openssl') - #depends_on('qt', when='+qt') - #depends_on('python@2.7.11:', when='+doc') depends_on('cairo') #depends_on('libart') # optional dependency, not yet supported by spack. depends_on('libpng') @@ -28,21 +20,7 @@ class Dia(Package): """Handle Dia's version-based custom URLs.""" return 'https://ftp.gnome.org/pub/gnome/source/dia/%s/dia-%s.tar.xz' % (version.up_to(2), version) - # def validate(self, spec): - # """ - # Checks if incompatible versions of qt were specified - - # :param spec: spec of the package - # :raises RuntimeError: in case of inconsistencies - # """ - - # if '+qt' in spec and spec.satisfies('^qt@5.4.0'): - # msg = 'qt-5.4.0 has broken CMake modules.' - # raise RuntimeError(msg) - def install(self, spec, prefix): - # Consistency check - # self.validate(spec) # configure, build, install: options = ['--prefix=%s' % prefix, @@ -51,17 +29,6 @@ class Dia(Package): '--with-python', '--with-swig'] - # if '+qt' in spec: - # options.append('--qt-gui') - - # if '+doc' in spec: - # options.append('--sphinx-html') - # options.append('--sphinx-man') - - # if '+openssl' in spec: - # options.append('--') - # options.append('-DCMAKE_USE_OPENSSL=ON') - configure(*options) make() make('install') -- cgit v1.2.3-70-g09d2 From 48d70d960cb76783ff2d5f431b88ea1c0bf4c8a8 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 4 Apr 2016 17:05:30 -0600 Subject: + Provide dia, a program for drawing structured diagrams. --- var/spack/repos/builtin/packages/dia/package.py | 34 ++++++++++++++++++++++ .../builtin/packages/netlib-lapack/package.py | 12 ++++---- 2 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/dia/package.py diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py new file mode 100644 index 0000000000..1cb5910e46 --- /dev/null +++ b/var/spack/repos/builtin/packages/dia/package.py @@ -0,0 +1,34 @@ +from spack import * + +class Dia(Package): + """Dia is a program for drawing structured diagrams.""" + homepage = 'https://wiki.gnome.org/Apps/Dia' + url = 'https://ftp.gnome.org/pub/gnome/sources/dia/0.97/dia-0.97.3.tar.xz' + + version('0.97.3', '0e744a0f6a6c4cb6a089e4d955392c3c') + + depends_on('gtkplus@2.6.0:') + depends_on('cairo') + #depends_on('libart') # optional dependency, not yet supported by spack. + depends_on('libpng') + depends_on('libxslt') + depends_on('python') + depends_on('swig') + # depends_on('py-gtk') # optional dependency, not yet supported by spack. + + def url_for_version(self, version): + """Handle Dia's version-based custom URLs.""" + return 'https://ftp.gnome.org/pub/gnome/source/dia/%s/dia-%s.tar.xz' % (version.up_to(2), version) + + def install(self, spec, prefix): + + # configure, build, install: + options = ['--prefix=%s' % prefix, + '--with-cairo', + '--with-xslt-prefix=%s' % spec['libxslt'].prefix, + '--with-python', + '--with-swig'] + + configure(*options) + make() + make('install') diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index d1252efb9b..05436332ac 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -34,18 +34,15 @@ class NetlibLapack(Package): def patch(self): # Fix cblas CMakeLists.txt -- has wrong case for subdirectory name. - if self.spec.satisfies('@3.6.0:'): - filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', - '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) + filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', + '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) def install_one(self, spec, prefix, shared): cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'), + '-DCBLAS=ON', # always build CBLAS '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), '-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')] - if spec.satisfies('@3.6.0:'): - cmake_args.extend(['-DCBLAS=ON']) # always build CBLAS - if '+external-blas' in spec: # TODO : the mechanism to specify the library should be more general, # TODO : but this allows to have an hook to an external blas @@ -83,3 +80,6 @@ class NetlibLapack(Package): if '+shared' in self.spec: self.spec.blas_shared_lib = join_path(libdir, 'libblas.%s' % dso_suffix) self.spec.lapack_shared_lib = join_path(libdir, 'liblapack.%s' % dso_suffix) + + + -- cgit v1.2.3-70-g09d2 From aaf2830b8be96ca3584bc0cca87c86bc5b4355a0 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 19:40:05 -0400 Subject: Require cmake --- var/spack/repos/builtin/packages/netlib-scalapack/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index d59f8e41fe..276876d197 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -18,6 +18,7 @@ class NetlibScalapack(Package): provides('scalapack') + depends_on('cmake') depends_on('mpi') depends_on('lapack') -- cgit v1.2.3-70-g09d2 From 2b3a8a4a5afc3f263a66b02b2f3cce9a5d1787fc Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 19:01:44 -0500 Subject: Add missing dependencies. --- var/spack/repos/builtin/packages/py-scikit-learn/package.py | 4 ++++ 1 file changed, 4 insertions(+) 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 7f8e25e69d..2d7985b98c 100644 --- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py @@ -11,5 +11,9 @@ class PyScikitLearn(Package): extends('python') + depends_on('py-setuptools') + depends_on('py-numpy') + depends_on('py-scipy') + def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From c546b75443eea9bc8fe7b5427cdd7eba5afb5add Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 4 Apr 2016 19:23:48 -0500 Subject: Add missing dependency on py-setuptools for - py-dask - py-decorator --- var/spack/repos/builtin/packages/py-dask/package.py | 2 ++ var/spack/repos/builtin/packages/py-decorator/package.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py index 725d47b97c..cf0a16f21e 100644 --- a/var/spack/repos/builtin/packages/py-dask/package.py +++ b/var/spack/repos/builtin/packages/py-dask/package.py @@ -9,5 +9,7 @@ class PyDask(Package): extends('python') + depends_on('py-setuptools') + def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-decorator/package.py b/var/spack/repos/builtin/packages/py-decorator/package.py index 99e3dbc49c..abbd9f43d1 100644 --- a/var/spack/repos/builtin/packages/py-decorator/package.py +++ b/var/spack/repos/builtin/packages/py-decorator/package.py @@ -9,5 +9,7 @@ class PyDecorator(Package): extends('python') + depends_on('py-setuptools') + def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From d546d828d322d54bb61c10dbf1fa42831049001e Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 5 Apr 2016 13:20:28 +0200 Subject: module file : added filtering based on environment variable name --- etc/spack/modules.yaml | 4 ++++ lib/spack/spack/config.py | 44 +++++++++++++++++++++++++++++++++++++++--- lib/spack/spack/environment.py | 16 +++++++++++++++ lib/spack/spack/modules.py | 10 +++++++++- 4 files changed, 70 insertions(+), 4 deletions(-) diff --git a/etc/spack/modules.yaml b/etc/spack/modules.yaml index aa2a2c3fe2..395cf9c2cd 100644 --- a/etc/spack/modules.yaml +++ b/etc/spack/modules.yaml @@ -6,3 +6,7 @@ # ------------------------------------------------------------------------- modules: enable: ['tcl', 'dotkit'] + + dotkit: + filter: + environment_modifications: ['CPATH', 'LIBRARY_PATH'] # Exclude changes to any of these variables diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 14e5aaf4fb..4fca735fc9 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -146,7 +146,7 @@ section_schemas = { 'type': 'object', 'additionalProperties': False, 'patternProperties': { - 'compilers:?': { # optional colon for overriding site config. + 'compilers:?': { # optional colon for overriding site config. 'type': 'object', 'default': {}, 'additionalProperties': False, @@ -195,6 +195,7 @@ section_schemas = { 'default': [], 'items': { 'type': 'string'},},},}, + 'packages': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack package configuration file schema', @@ -238,11 +239,35 @@ section_schemas = { 'default' : {}, } },},},},},}, + 'modules': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack module file configuration file schema', 'type': 'object', 'additionalProperties': False, + 'definitions': { + 'module_type_configuration': { + 'type': 'object', + 'default': {}, + 'additionalProperties': False, + 'properties': { + 'filter': { + 'type': 'object', + 'default': {}, + 'additionalProperties': False, + 'properties': { + 'environment_modifications': { + 'type': 'array', + 'default': [], + 'items': { + 'type': 'string' + } + } + } + } + } + } + }, 'patternProperties': { r'modules:?': { 'type': 'object', @@ -253,9 +278,22 @@ section_schemas = { 'type': 'array', 'default': [], 'items': { - 'type': 'string' + 'type': 'string', + 'enum': ['tcl', 'dotkit'] } - } + }, + 'tcl': { + 'allOf': [ + {'$ref': '#/definitions/module_type_configuration'}, # Base configuration + {} # Specific tcl extensions + ] + }, + 'dotkit': { + 'allOf': [ + {'$ref': '#/definitions/module_type_configuration'}, # Base configuration + {} # Specific dotkit extensions + ] + }, } }, }, diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 72aafa4e2d..3d18d3a63f 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -250,3 +250,19 @@ def validate(env, errstream): modifications = env.group_by_name() for variable, list_of_changes in sorted(modifications.items()): set_or_unset_not_first(variable, list_of_changes, errstream) + + +def filter_environment_modifications(env, variables): + """ + Generator that filters out any change to environment variables present in the input list + + Args: + env: list of environment modifications + variables: list of variable names to be filtered + + Yields: + items in env if they are not in variables + """ + for item in env: + if item.name not in variables: + yield item diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index d797af287d..aca37ae14b 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -179,9 +179,17 @@ class EnvModule(object): if not env: return + # Filter modifications to the environment according to configuration files + try: + filter_list = CONFIGURATION[self.name]['filter']['environment_modifications'] + except KeyError: + filter_list = [] + with open(self.file_name, 'w') as f: self.write_header(f) - for line in self.process_environment_command(env): + for line in self.process_environment_command( + filter_environment_modifications(env, filter_list) + ): f.write(line) def write_header(self, stream): -- cgit v1.2.3-70-g09d2 From 7fc0b1ebd2218bae90ec47c0290a23ffae8b54d3 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 5 Apr 2016 13:33:11 +0200 Subject: module file : reverted to sensible default --- etc/spack/modules.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/etc/spack/modules.yaml b/etc/spack/modules.yaml index 395cf9c2cd..aa2a2c3fe2 100644 --- a/etc/spack/modules.yaml +++ b/etc/spack/modules.yaml @@ -6,7 +6,3 @@ # ------------------------------------------------------------------------- modules: enable: ['tcl', 'dotkit'] - - dotkit: - filter: - environment_modifications: ['CPATH', 'LIBRARY_PATH'] # Exclude changes to any of these variables -- cgit v1.2.3-70-g09d2 From 4ce03b75bc628bd80a9798300043f3ec0a2ed7fa Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 5 Apr 2016 07:42:23 -0400 Subject: Correct typo --- lib/spack/env/cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index aa1e0dbe29..18fd8f7bdb 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -66,7 +66,7 @@ function die { for param in $parameters; do if [[ -z ${!param} ]]; then - die "Spack compiler must be run from Apack! Input '$param' is missing." + die "Spack compiler must be run from Spack! Input '$param' is missing." fi done -- cgit v1.2.3-70-g09d2 From c352249e305c00d951586bc8c19a13ceadaa1887 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 5 Apr 2016 14:55:05 +0200 Subject: EnvModules : narrowing the type of exceptions being "handled" --- lib/spack/spack/modules.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index aca37ae14b..0d486f6430 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -167,10 +167,11 @@ class EnvModule(object): package = self.spec[item].package package.setup_dependent_package(self.pkg.module, self.spec) package.setup_dependent_environment(spack_env, env, self.spec) - except: + except KeyError as e: # The extends was conditional, so it doesn't count here # eg: extends('python', when='+python') - pass + tty.debug(str(e)) + # Package-specific environment modifications self.spec.package.setup_environment(spack_env, env) -- cgit v1.2.3-70-g09d2 From a87ae5173f5e30aa9d8b3360e67dbc17568342f5 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 4 Apr 2016 18:16:25 -0400 Subject: Update Julia - allow checking out the master branche - add dependencies requires by important Julia package - add OpenBLAS patch --- .../repos/builtin/packages/julia/openblas.patch | 68 ++++++++++++++++++++++ var/spack/repos/builtin/packages/julia/package.py | 68 ++++++++++++++-------- 2 files changed, 113 insertions(+), 23 deletions(-) create mode 100644 var/spack/repos/builtin/packages/julia/openblas.patch diff --git a/var/spack/repos/builtin/packages/julia/openblas.patch b/var/spack/repos/builtin/packages/julia/openblas.patch new file mode 100644 index 0000000000..f75d7dd04f --- /dev/null +++ b/var/spack/repos/builtin/packages/julia/openblas.patch @@ -0,0 +1,68 @@ +diff --git a/deps/Makefile b/deps/Makefile +index 6cb73be..bcd8520 100644 +--- a/deps/Makefile ++++ b/deps/Makefile +@@ -1049,7 +1049,7 @@ OPENBLAS_BUILD_OPTS += NO_AFFINITY=1 + + # Build for all architectures - required for distribution + ifeq ($(OPENBLAS_DYNAMIC_ARCH), 1) +-OPENBLAS_BUILD_OPTS += DYNAMIC_ARCH=1 ++OPENBLAS_BUILD_OPTS += DYNAMIC_ARCH=1 MAKE_NO_J=1 + endif + + # 64-bit BLAS interface +@@ -1085,6 +1085,7 @@ OPENBLAS_BUILD_OPTS += NO_AVX2=1 + endif + + $(OPENBLAS_SRC_DIR)/config.status: $(OPENBLAS_SRC_DIR)/Makefile ++ cd $(dir $@) && patch -p1 < ../openblas-make.patch + ifeq ($(OS),WINNT) + cd $(dir $@) && patch -p1 < ../openblas-win64.patch + endif +diff --git a/deps/openblas.version b/deps/openblas.version +index 7c97e1b..58b9467 100644 +--- a/deps/openblas.version ++++ b/deps/openblas.version +@@ -1,2 +1,2 @@ +-OPENBLAS_BRANCH=v0.2.15 +-OPENBLAS_SHA1=53e849f4fcae4363a64576de00e982722c7304f9 ++OPENBLAS_BRANCH=v0.2.17 ++OPENBLAS_SHA1=a71e8c82f6a9f73093b631e5deab1e8da716b61f +--- a/deps/openblas-make.patch ++++ b/deps/openblas-make.patch +@@ -0,0 +1,35 @@ ++diff --git a/Makefile.system b/Makefile.system ++index b89f60e..2dbdad0 100644 ++--- a/Makefile.system +++++ b/Makefile.system ++@@ -139,6 +139,10 @@ NO_PARALLEL_MAKE=0 ++ endif ++ GETARCH_FLAGS += -DNO_PARALLEL_MAKE=$(NO_PARALLEL_MAKE) ++ +++ifdef MAKE_NO_J +++GETARCH_FLAGS += -DMAKE_NO_J=$(MAKE_NO_J) +++endif +++ ++ ifdef MAKE_NB_JOBS ++ GETARCH_FLAGS += -DMAKE_NB_JOBS=$(MAKE_NB_JOBS) ++ endif ++diff --git a/getarch.c b/getarch.c ++index f9c49e6..dffad70 100644 ++--- a/getarch.c +++++ b/getarch.c ++@@ -1012,6 +1012,7 @@ int main(int argc, char *argv[]){ ++ #endif ++ #endif ++ +++#ifndef MAKE_NO_J ++ #ifdef MAKE_NB_JOBS ++ printf("MAKE += -j %d\n", MAKE_NB_JOBS); ++ #elif NO_PARALLEL_MAKE==1 ++@@ -1021,6 +1022,7 @@ int main(int argc, char *argv[]){ ++ printf("MAKE += -j %d\n", get_num_cores()); ++ #endif ++ #endif +++#endif ++ ++ break; ++ diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 6900af38e4..b3a523bc45 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -4,43 +4,55 @@ import os class Julia(Package): """The Julia Language: A fresh approach to technical computing""" homepage = "http://julialang.org" - url = "http://github.com/JuliaLang/julia/releases/download/v0.4.2/julia-0.4.2.tar.gz" + url = "https://github.com/JuliaLang/julia/releases/download/v0.4.3/julia-0.4.3-full.tar.gz" - version('0.4.3', '7b9f096798fca4bef262a64674bc2b52') - version('0.4.2', 'ccfeb4f4090c8b31083f5e1ccb03eb06') + version('master', + git='https://github.com/JuliaLang/julia.git', branch='master') + version('0.4.5', '69141ff5aa6cee7c0ec8c85a34aa49a6') + version('0.4.3', '8a4a59fd335b05090dd1ebefbbe5aaac') - patch('gc.patch') + patch('gc.patch', when='@:0.5') + patch('openblas.patch') - # Build-time dependencies - depends_on("cmake @2.8:") + # Build-time dependencies: # depends_on("awk") # depends_on("m4") # depends_on("pkg-config") - depends_on("python @2.6:2.9") - # I think that Julia requires the dependencies above, but it builds find (on - # my system) without these. We should enable them as necessary. + # Combined build-time and run-time dependencies: + depends_on("cmake @2.8:") + depends_on("git") + depends_on("openssl") + depends_on("python @2.7:2.999") + + # I think that Julia requires the dependencies above, but it + # builds fine (on my system) without these. We should enable them + # as necessary. - # Run-time dependencies + # Run-time dependencies: # depends_on("arpack") # depends_on("fftw +float") # depends_on("gmp") + # depends_on("libgit") # depends_on("mpfr") + # depends_on("openblas") # depends_on("pcre2") - # ARPACK: Requires BLAS and LAPACK; needs to use the same version as Julia. + # ARPACK: Requires BLAS and LAPACK; needs to use the same version + # as Julia. - # BLAS and LAPACK: Julia prefers 64-bit versions on 64-bit systems. OpenBLAS - # has an option for this; make it available as variant. + # BLAS and LAPACK: Julia prefers 64-bit versions on 64-bit + # systems. OpenBLAS has an option for this; make it available as + # variant. - # FFTW: Something doesn't work when using a pre-installed FFTW library; need - # to investigate. + # FFTW: Something doesn't work when using a pre-installed FFTW + # library; need to investigate. - # GMP, MPFR: Something doesn't work when using a pre-installed FFTW library; - # need to investigate. + # GMP, MPFR: Something doesn't work when using a pre-installed + # FFTW library; need to investigate. - # LLVM: Julia works only with specific versions, and might require patches. - # Thus we let Julia install its own LLVM. + # LLVM: Julia works only with specific versions, and might require + # patches. Thus we let Julia install its own LLVM. # Other possible dependencies: # USE_SYSTEM_OPENLIBM=0 @@ -50,11 +62,21 @@ class Julia(Package): # USE_SYSTEM_UTF8PROC=0 # USE_SYSTEM_LIBGIT2=0 + # Run-time dependencies for Julia packages: + depends_on("hdf5") + depends_on("mpi") + def install(self, spec, prefix): - # Explicitly setting CC, CXX, or FC breaks building libuv, one of - # Julia's dependencies. This might be a Darwin-specific problem. Given - # how Spack sets up compilers, Julia should still use Spack's compilers, - # even if we don't specify them explicitly. + if '@master' in spec: + # Julia needs to know the offset from a specific commit + git = which('git') + git('fetch', '--unshallow') + + # Explicitly setting CC, CXX, or FC breaks building libuv, one + # of Julia's dependencies. This might be a Darwin-specific + # problem. Given how Spack sets up compilers, Julia should + # still use Spack's compilers, even if we don't specify them + # explicitly. options = [#"CC=cc", #"CXX=c++", #"FC=fc", -- cgit v1.2.3-70-g09d2 From ca7d7010076a520fa20f02ab0609bbc3e6216d2f Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 5 Apr 2016 16:10:04 +0200 Subject: module file : all the dependencies can affect the run_time environment, not only extendees --- lib/spack/spack/modules.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 0d486f6430..04317f53b1 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -50,6 +50,7 @@ import llnl.util.tty as tty import spack import spack.config from llnl.util.filesystem import join_path, mkdirp +from spack.build_environment import parent_class_modules, set_module_variables_for_package from spack.environment import * __all__ = ['EnvModule', 'Dotkit', 'TclModule'] @@ -159,12 +160,25 @@ class EnvModule(object): # installation prefix env = inspect_path(self.spec.prefix) - # Let the extendee modify their extensions before asking for + # Let the extendee/dependency modify their extensions/dependencies before asking for # package-specific modifications spack_env = EnvironmentModifications() - for item in self.pkg.extendees: + + def dependencies(): + # FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes' + # FIXME : is given. This work around permits to get a unique list of spec anyhow. + # FIXME : Possibly we miss a merge step among nodes that refer to the same package. + l = [x for x in sorted(self.spec.traverse(order='post', depth=True, cover='nodes'),reverse=True)] + seen = set() + return [x for ii, x in l if not (x in seen or seen.add(x))] + + for item in dependencies(): try: - package = self.spec[item].package + package = self.spec[item.name].package + modules = parent_class_modules(package.__class__) + for mod in modules: + set_module_variables_for_package(package, mod) + set_module_variables_for_package(package, package.module) package.setup_dependent_package(self.pkg.module, self.spec) package.setup_dependent_environment(spack_env, env, self.spec) except KeyError as e: @@ -172,8 +186,8 @@ class EnvModule(object): # eg: extends('python', when='+python') tty.debug(str(e)) - # Package-specific environment modifications + set_module_variables_for_package(self.pkg, self.pkg.module) self.spec.package.setup_environment(spack_env, env) # TODO : implement site-specific modifications and filters -- cgit v1.2.3-70-g09d2 From 2968b60ee0b6b8d649e3d0c1a091857bfde28b89 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 5 Apr 2016 18:03:09 +0200 Subject: module file : added autoload and prereq --- lib/spack/spack/config.py | 8 +++++- lib/spack/spack/modules.py | 65 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 4fca735fc9..ff5fba24f8 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -246,6 +246,10 @@ section_schemas = { 'type': 'object', 'additionalProperties': False, 'definitions': { + 'dependency_selection': { + 'type': 'string', + 'enum': ['None', 'Direct', 'All'] + }, 'module_type_configuration': { 'type': 'object', 'default': {}, @@ -264,7 +268,9 @@ section_schemas = { } } } - } + }, + 'autoload': {'$ref': '#/definitions/dependency_selection'}, + 'prerequisites': {'$ref': '#/definitions/dependency_selection'} } } }, diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 04317f53b1..d9a846f281 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -164,15 +164,25 @@ class EnvModule(object): # package-specific modifications spack_env = EnvironmentModifications() - def dependencies(): + def dependencies(request='All'): + if request == 'None': + return [] + + l = [x for x in sorted(self.spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] + + if request == 'Direct': + return [x for ii, x in l if ii == 1] + # FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes' # FIXME : is given. This work around permits to get a unique list of spec anyhow. # FIXME : Possibly we miss a merge step among nodes that refer to the same package. - l = [x for x in sorted(self.spec.traverse(order='post', depth=True, cover='nodes'),reverse=True)] seen = set() - return [x for ii, x in l if not (x in seen or seen.add(x))] + seen_add = seen.add + return [x for ii, x in l if not (x in seen or seen_add(x))] - for item in dependencies(): + # TODO : the code down below is quite similar to build_environment.setup_package and needs to be + # TODO : factored out to a single place + for item in dependencies('All'): try: package = self.spec[item.name].package modules = parent_class_modules(package.__class__) @@ -190,11 +200,18 @@ class EnvModule(object): set_module_variables_for_package(self.pkg, self.pkg.module) self.spec.package.setup_environment(spack_env, env) - # TODO : implement site-specific modifications and filters - if not env: - return + # Get list of modules that will be loaded automatically + try: + autoload_list = dependencies(CONFIGURATION[self.name]['autoload']) + except KeyError: + autoload_list = [] - # Filter modifications to the environment according to configuration files + try: + prerequisites_list = dependencies(CONFIGURATION[self.name]['prerequisites']) + except KeyError: + prerequisites_list = [] + + # Filter modifications to environment variables try: filter_list = CONFIGURATION[self.name]['filter']['environment_modifications'] except KeyError: @@ -202,14 +219,26 @@ class EnvModule(object): with open(self.file_name, 'w') as f: self.write_header(f) - for line in self.process_environment_command( - filter_environment_modifications(env, filter_list) - ): + # Automatic loads + for x in autoload_list: + self.write_autoload(f, x) + # Prerequisites + for x in prerequisites_list: + self.write_prerequisite(f, x) + # Modifications to the environment + iterable = self.process_environment_command( filter_environment_modifications(env, filter_list)) + for line in iterable: f.write(line) def write_header(self, stream): raise NotImplementedError() + def write_autoload(self, stream, spec): + raise NotImplementedError() + + def write_prerequisite(self, stream, spec): + raise NotImplementedError() + def process_environment_command(self, env): for command in env: try: @@ -309,3 +338,17 @@ class TclModule(EnvModule): for line in textwrap.wrap(self.long_description, 72): module_file.write("puts stderr \"%s\"\n" % line) module_file.write('}\n\n') + + def write_autoload(self, module_file, spec): + autoload_format = ''' +if ![ is-loaded {module_file} ] {{ + puts stderr "Autoloading {module_file}" + module load {module_file} +}} +''''' + m = TclModule(spec) + module_file.write(autoload_format.format(module_file=m.use_name)) + + def write_prerequisite(self, module_file, spec): + m = TclModule(spec) + module_file.write('prereq {module_file}\n'.format(module_file=m.use_name)) -- cgit v1.2.3-70-g09d2 From 5da37c573f13f4c16021f1314a87e4f0c995ba0f Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 5 Apr 2016 18:41:38 +0200 Subject: modules : don't pass stream around --- lib/spack/spack/modules.py | 50 ++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index d9a846f281..9a021a7c49 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -149,7 +149,6 @@ class EnvModule(object): # Not very descriptive fallback return 'spack installed package' - def write(self): """Write out a module file for this object.""" module_dir = os.path.dirname(self.file_name) @@ -218,25 +217,27 @@ class EnvModule(object): filter_list = [] with open(self.file_name, 'w') as f: - self.write_header(f) + # Header + f.write(self.header) # Automatic loads for x in autoload_list: - self.write_autoload(f, x) + f.write(self.autoload(x)) # Prerequisites for x in prerequisites_list: - self.write_prerequisite(f, x) + f.write(self.prerequisite(x)) # Modifications to the environment - iterable = self.process_environment_command( filter_environment_modifications(env, filter_list)) + iterable = self.process_environment_command(filter_environment_modifications(env, filter_list)) for line in iterable: f.write(line) - def write_header(self, stream): + @property + def header(self): raise NotImplementedError() - def write_autoload(self, stream, spec): + def autoload(self, spec): raise NotImplementedError() - def write_prerequisite(self, stream, spec): + def prerequisite(self, spec): raise NotImplementedError() def process_environment_command(self, env): @@ -286,19 +287,22 @@ class Dotkit(EnvModule): self.spec.compiler.version, self.spec.dag_hash()) - def write_header(self, dk_file): + @property + def header(self): # Category + header = '' if self.category: - dk_file.write('#c %s\n' % self.category) + header += '#c %s\n' % self.category # Short description if self.short_description: - dk_file.write('#d %s\n' % self.short_description) + header += '#d %s\n' % self.short_description # Long description if self.long_description: for line in textwrap.wrap(self.long_description, 72): - dk_file.write("#h %s\n" % line) + header += '#h %s\n' % line + return header class TclModule(EnvModule): @@ -324,22 +328,24 @@ class TclModule(EnvModule): self.spec.compiler.version, self.spec.dag_hash()) - def write_header(self, module_file): + @property + def header(self): # TCL Modulefile header - module_file.write('#%Module1.0\n') + header = '#%Module1.0\n' # TODO : category ? # Short description if self.short_description: - module_file.write('module-whatis \"%s\"\n\n' % self.short_description) + header += 'module-whatis \"%s\"\n\n' % self.short_description # Long description if self.long_description: - module_file.write('proc ModulesHelp { } {\n') + header += 'proc ModulesHelp { } {\n' for line in textwrap.wrap(self.long_description, 72): - module_file.write("puts stderr \"%s\"\n" % line) - module_file.write('}\n\n') + header += 'puts stderr "%s"\n' % line + header += '}\n\n' + return header - def write_autoload(self, module_file, spec): + def autoload(self, spec): autoload_format = ''' if ![ is-loaded {module_file} ] {{ puts stderr "Autoloading {module_file}" @@ -347,8 +353,8 @@ if ![ is-loaded {module_file} ] {{ }} ''''' m = TclModule(spec) - module_file.write(autoload_format.format(module_file=m.use_name)) + return autoload_format.format(module_file=m.use_name) - def write_prerequisite(self, module_file, spec): + def prerequisite(self, spec): m = TclModule(spec) - module_file.write('prereq {module_file}\n'.format(module_file=m.use_name)) + return 'prereq {module_file}\n'.format(module_file=m.use_name) -- cgit v1.2.3-70-g09d2 From 670cb423f91b17b9757b387a9579be4f248d208b Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 5 Apr 2016 18:44:40 +0200 Subject: modules : iterating on all the dependencies doesn't reuire try/except KeyError --- lib/spack/spack/modules.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 9a021a7c49..115d4d9a37 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -182,18 +182,13 @@ class EnvModule(object): # TODO : the code down below is quite similar to build_environment.setup_package and needs to be # TODO : factored out to a single place for item in dependencies('All'): - try: - package = self.spec[item.name].package - modules = parent_class_modules(package.__class__) - for mod in modules: - set_module_variables_for_package(package, mod) - set_module_variables_for_package(package, package.module) - package.setup_dependent_package(self.pkg.module, self.spec) - package.setup_dependent_environment(spack_env, env, self.spec) - except KeyError as e: - # The extends was conditional, so it doesn't count here - # eg: extends('python', when='+python') - tty.debug(str(e)) + package = self.spec[item.name].package + modules = parent_class_modules(package.__class__) + for mod in modules: + set_module_variables_for_package(package, mod) + set_module_variables_for_package(package, package.module) + package.setup_dependent_package(self.pkg.module, self.spec) + package.setup_dependent_environment(spack_env, env, self.spec) # Package-specific environment modifications set_module_variables_for_package(self.pkg, self.pkg.module) -- cgit v1.2.3-70-g09d2 From 0ebb192b2f26cfd2bbadc9be72c36469c7493d89 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Tue, 5 Apr 2016 10:36:20 -0700 Subject: Update the MRNet package with the latest source and patch related to the krell tools needs. Also, reorder the list of version to match with the spack standard: newest to oldest. --- .../repos/builtin/packages/mrnet/krell-5.0.1.patch | 154 +++++++++++++++++++++ var/spack/repos/builtin/packages/mrnet/package.py | 17 ++- 2 files changed, 167 insertions(+), 4 deletions(-) create mode 100644 var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch diff --git a/var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch b/var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch new file mode 100644 index 0000000000..53294fbbc6 --- /dev/null +++ b/var/spack/repos/builtin/packages/mrnet/krell-5.0.1.patch @@ -0,0 +1,154 @@ +--- mrnet-3093918/include/mrnet/Types.h 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/include/mrnet/Types.h 2016-03-16 12:29:33.986132302 -0700 +@@ -23,7 +23,7 @@ + #ifndef MRNET_VERSION_MAJOR + # define MRNET_VERSION_MAJOR 5 + # define MRNET_VERSION_MINOR 0 +-# define MRNET_VERSION_REV 0 ++# define MRNET_VERSION_REV 1 + #endif + + namespace MRN +--- mrnet-3093918/include/mrnet_lightweight/Types.h 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/include/mrnet_lightweight/Types.h 2016-03-16 12:29:33.987132302 -0700 +@@ -30,7 +30,7 @@ + #ifndef MRNET_VERSION_MAJOR + #define MRNET_VERSION_MAJOR 5 + #define MRNET_VERSION_MINOR 0 +-#define MRNET_VERSION_REV 0 ++#define MRNET_VERSION_REV 1 + #endif + void get_Version(int* major, + int* minor, +--- mrnet-3093918/src/lightweight/SerialGraph.c 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/src/lightweight/SerialGraph.c 2016-03-16 12:29:33.995132302 -0700 +@@ -59,7 +59,7 @@ + + mrn_dbg_func_begin(); + +- sprintf(hoststr, "[%s:%hu:%u:", ihostname, iport, irank); ++ sprintf(hoststr, "[%s:%05hu:%u:", ihostname, iport, irank); + mrn_dbg(5, mrn_printf(FLF, stderr, "looking for SubTreeRoot: '%s'\n", hoststr)); + + byte_array = sg->byte_array; +@@ -110,7 +110,7 @@ + + mrn_dbg_func_begin(); + +- len = (size_t) sprintf(hoststr, "[%s:%hu:%u:0]", ihostname, iport, irank); ++ len = (size_t) sprintf(hoststr, "[%s:%05hu:%u:0]", ihostname, iport, irank); + mrn_dbg(5, mrn_printf(FLF, stderr, "adding sub tree leaf: %s\n", hoststr)); + + len += strlen(sg->byte_array) + 1; +@@ -139,7 +139,7 @@ + + mrn_dbg_func_begin(); + +- len = (size_t) sprintf(hoststr, "[%s:%hu:%u:1", ihostname, iport, irank); ++ len = (size_t) sprintf(hoststr, "[%s:%05hu:%u:1", ihostname, iport, irank); + mrn_dbg(5, mrn_printf(FLF, stderr, "adding sub tree root: %s\n", hoststr)); + + len += strlen(sg->byte_array) + 1; +@@ -360,8 +360,8 @@ + char old_hoststr[256]; + char new_hoststr[256]; + +- sprintf(old_hoststr, "[%s:%hu:%u:", hostname, UnknownPort, irank); +- sprintf(new_hoststr, "[%s:%hu:%u:", hostname, port, irank); ++ sprintf(old_hoststr, "[%s:%05hu:%u:", hostname, UnknownPort, irank); ++ sprintf(new_hoststr, "[%s:%05hu:%u:", hostname, port, irank); + + old_byte_array = sg->byte_array; + new_byte_array = (char*) malloc( strlen(old_byte_array) + 10 ); +--- mrnet-3093918/xplat/src/lightweight/SocketUtils.c 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/xplat/src/lightweight/SocketUtils.c 2016-03-16 12:29:34.006132303 -0700 +@@ -15,7 +15,7 @@ + #else + const XPlat_Socket InvalidSocket = INVALID_SOCKET; + #endif +-const XPlat_Port InvalidPort = (XPlat_Port)-1; ++const XPlat_Port InvalidPort = (XPlat_Port)0; + + static bool_t SetTcpNoDelay( XPlat_Socket sock ) + { +--- mrnet-3093918/conf/configure.in 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/conf/configure.in 2016-03-16 12:45:54.573196781 -0700 +@@ -107,6 +107,18 @@ + AC_SUBST(PURIFY) + + ++AC_ARG_WITH(expat, ++ [AS_HELP_STRING([--with-expat=PATH], ++ [Absolute path to installation of EXPAT libraries (note: specify the path to the directory containing "include" and "lib" sub-directories)])], ++ [EXPAT_DIR="${withval}"], ++ [EXPAT_DIR=""]) ++ ++if test "x$EXPAT_DIR" = "x" ; then ++ EXPAT_LIB="" ++else ++ EXPAT_LIB="-L$EXPAT_DIR/lib" ++fi ++ + dnl === Checks for header files. + AC_CHECK_HEADERS([assert.h errno.h fcntl.h limits.h netdb.h signal.h stddef.h stdlib.h stdio.h string.h unistd.h arpa/inet.h netinet/in.h sys/ioctl.h sys/socket.h sys/sockio.h sys/time.h]) + AC_HEADER_STDBOOL +@@ -432,7 +444,7 @@ + CRAYXT_ATH_LIBS_SO="$CRAYXT_ATH_LIBS -lalps" + CRAYXT_ATH_LIBS="$CRAYXT_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc -Wl,-Bdynamic" + CRAYXE_ATH_LIBS_SO="$CRAYXE_ATH_LIBS -lalps" +- CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi -lexpat -Wl,-Bdynamic" ++ CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi $EXPAT_LIB -lexpat -Wl,-Bdynamic" + + AC_CHECK_LIB( [alps], [alps_launch_tool_helper], + [HAVE_ATH_LIBS="yes"; EXTRA_LIBS="$CRAYXT_ATH_LIBS $EXTRA_LIBS"; EXTRA_LIBS_SO="$CRAYXT_ATH_LIBS_SO $EXTRA_LIBS_SO"], +--- mrnet-3093918/configure 2015-12-10 09:32:24.000000000 -0800 ++++ mrnet_top_of_tree/configure 2016-03-16 13:47:20.386439143 -0700 +@@ -742,6 +742,7 @@ + enable_debug + enable_ltwt_threadsafe + with_purify ++with_expat + ' + ac_precious_vars='build_alias + host_alias +@@ -1399,6 +1400,9 @@ + containing "include" and "lib" sub-directories) + --with-launchmon=PATH Absolute path to installation of LaunchMON + --with-purify Use purify for memory debugging ++ --with-expat=PATH Absolute path to installation of EXPAT libraries ++ (note: specify the path to the directory containing ++ "include" and "lib" sub-directories) + + Some influential environment variables: + CC C compiler command +@@ -3541,6 +3545,21 @@ + + + ++# Check whether --with-expat was given. ++if test "${with_expat+set}" = set; then : ++ withval=$with_expat; EXPAT_DIR="${withval}" ++else ++ EXPAT_DIR="" ++fi ++ ++ ++if test "x$EXPAT_DIR" = "x" ; then ++ EXPAT_LIB="" ++else ++ EXPAT_LIB="-L$EXPAT_DIR/lib" ++fi ++ ++ + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +@@ -5473,7 +5492,7 @@ + CRAYXT_ATH_LIBS_SO="$CRAYXT_ATH_LIBS -lalps" + CRAYXT_ATH_LIBS="$CRAYXT_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc -Wl,-Bdynamic" + CRAYXE_ATH_LIBS_SO="$CRAYXE_ATH_LIBS -lalps" +- CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi -lexpat -Wl,-Bdynamic" ++ CRAYXE_ATH_LIBS="$CRAYXE_ATH_LIBS -Wl,-Bstatic -lalps -lxmlrpc-epi $EXPAT_LIB -lexpat -Wl,-Bdynamic" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alps_launch_tool_helper in -lalps" >&5 + $as_echo_n "checking for alps_launch_tool_helper in -lalps... " >&6; } diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index fed944e45f..b8cbb7e8f9 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -3,16 +3,25 @@ from spack import * class Mrnet(Package): """The MRNet Multi-Cast Reduction Network.""" homepage = "http://paradyn.org/mrnet" - url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_4.0.0.tar.gz" + url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_5.0.1.tar.gz" + list_url = "http://ftp.cs.wisc.edu/paradyn/mrnet" - version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') - version('4.1.0', '5a248298b395b329e2371bf25366115c') version('5.0.1', '17f65738cf1b9f9b95647ff85f69ecdd') + version('4.1.0', '5a248298b395b329e2371bf25366115c') + version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') + + # Add a patch that brings mrnet-5.0.1 up to date with the current development tree + # The development tree contains fixes needed for the krell based tools + variant('krellpatch', default=False, description="Build MRNet with krell openspeedshop based patch.") + patch('krell-5.0.1.patch', when='@5.0.1+krellpatch') + + variant('lwthreads', default=False, description="Also build the MRNet LW threadsafe libraries") parallel = False - depends_on("boost") + #depends_on("boost") + depends_on("boost@1.53.0") def install(self, spec, prefix): # Build the MRNet LW thread safe libraries when the krelloptions variant is present -- cgit v1.2.3-70-g09d2 From 21ad5162c41b75aa11a5622a58a022a3107e6990 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 5 Apr 2016 11:53:37 -0600 Subject: + Global requires ncurses. --- var/spack/repos/builtin/packages/global/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/global/package.py b/var/spack/repos/builtin/packages/global/package.py index e8f06516d9..aac1cede30 100644 --- a/var/spack/repos/builtin/packages/global/package.py +++ b/var/spack/repos/builtin/packages/global/package.py @@ -11,6 +11,7 @@ class Global(Package): version('6.5', 'dfec818b4f53d91721e247cf7b218078') depends_on('exuberant-ctags') + depends_on('ncurses') def install(self, spec, prefix): config_args = ['--prefix={0}'.format(prefix)] -- cgit v1.2.3-70-g09d2 From 872f049b30cef3395900f57cd98575b8cacfbb36 Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Tue, 29 Mar 2016 22:27:16 -0400 Subject: create visit package --- var/spack/repos/builtin/packages/visit/package.py | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 var/spack/repos/builtin/packages/visit/package.py diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py new file mode 100644 index 0000000000..ff80815ae6 --- /dev/null +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -0,0 +1,40 @@ +# FIXME: +# This is a template package file for Spack. We've conveniently +# put "FIXME" labels next to all the things you'll want to change. +# +# Once you've edited all the FIXME's, delete this whole message, +# save this file, and test out your package like this: +# +# spack install visit +# +# You can always get back here to change things with: +# +# spack edit visit +# +# See the spack documentation for more information on building +# packages. +# +from spack import * + + +class Visit(Package): + """VisIt is an Open Source, interactive, scalable, visualization, animation and analysis tool.""" + homepage = "https://wci.llnl.gov/simulation/computer-codes/visit/" + url = "http://portal.nersc.gov/project/visit/releases/2.10.1/visit2.10.1.tar.gz" + + version('2.10.1', '3cbca162fdb0249f17c4456605c4211e') + + depends_on("vtk@7.0") + depends_on("qt@4.8.6") + # FIXME: Add dependencies if this package requires them. + + def install(self, spec, prefix): + # FIXME: Modify the configure line to suit your build system here. + # FIXME: Spack couldn't guess one, so here are some options: + # configure('--prefix=%s' % prefix) + std_cmake_args = [] + cmake('.', *std_cmake_args) + + # FIXME: Add logic to build and install here + make() + make("install") -- cgit v1.2.3-70-g09d2 From 2e05830eb1078778eddcd702a9a50fd3d2b775d5 Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Thu, 31 Mar 2016 14:55:35 -0400 Subject: Constrain to vtk6.1 qt4.8.6 and opengl1 rendering backend --- var/spack/repos/builtin/packages/visit/package.py | 36 ++++++++--------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index ff80815ae6..ade86631cf 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -1,19 +1,3 @@ -# FIXME: -# This is a template package file for Spack. We've conveniently -# put "FIXME" labels next to all the things you'll want to change. -# -# Once you've edited all the FIXME's, delete this whole message, -# save this file, and test out your package like this: -# -# spack install visit -# -# You can always get back here to change things with: -# -# spack edit visit -# -# See the spack documentation for more information on building -# packages. -# from spack import * @@ -24,17 +8,21 @@ class Visit(Package): version('2.10.1', '3cbca162fdb0249f17c4456605c4211e') - depends_on("vtk@7.0") + depends_on("vtk@6.1.0~opengl2") depends_on("qt@4.8.6") - # FIXME: Add dependencies if this package requires them. + depends_on("python") + # TODO: Other package dependencies from spack def install(self, spec, prefix): - # FIXME: Modify the configure line to suit your build system here. - # FIXME: Spack couldn't guess one, so here are some options: - # configure('--prefix=%s' % prefix) - std_cmake_args = [] - cmake('.', *std_cmake_args) - # FIXME: Add logic to build and install here + feature_args = std_cmake_args[:] + feature_args = ["-DVTK_MAJOR_VERSION=6", + "-DVTK_MINOR_VERSION=1", + "-DCMAKE_INSTALL_PREFIX:PATH=%s" % spec.prefix, + "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin, + "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin] + + cmake('./src', *feature_args) + make() make("install") -- cgit v1.2.3-70-g09d2 From c3c70cf704be1e174391e2d64d5491db72289a57 Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Tue, 5 Apr 2016 14:35:33 -0400 Subject: Install lite pdb headers --- var/spack/repos/builtin/packages/silo/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index b7894e4d2b..245acc0973 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -1,5 +1,6 @@ from spack import * + class Silo(Package): """Silo is a library for reading and writing a wide variety of scientific data to binary, disk files.""" @@ -30,6 +31,7 @@ class Silo(Package): '--prefix=%s' % prefix, '--with-hdf5=%s,%s' % (spec['hdf5'].prefix.include, spec['hdf5'].prefix.lib), '--with-zlib=%s,%s' % (spec['zlib'].prefix.include, spec['zlib'].prefix.lib), + '--enable-install-lite-headers', *config_args) make() -- cgit v1.2.3-70-g09d2 From f221f645091bb0175185e8c20fe19be2cc42639a Mon Sep 17 00:00:00 2001 From: Dhanannjay Deo Date: Tue, 5 Apr 2016 22:31:08 -0400 Subject: Add variant for shared library --- var/spack/repos/builtin/packages/silo/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 245acc0973..638a894b7b 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -13,6 +13,7 @@ class Silo(Package): version('4.8', 'b1cbc0e7ec435eb656dc4b53a23663c9') variant('fortran', default=True, description='Enable Fortran support') + variant('shared', default=True, description='Build shared libraries') variant('silex', default=False, description='Builds Silex, a GUI for viewing Silo files') depends_on('hdf5') @@ -22,6 +23,8 @@ class Silo(Package): config_args = [ '--enable-fortran' if '+fortran' in spec else '--disable-fortran', '--enable-silex' if '+silex' in spec else '--disable-silex', + '--enable-shared' if '+shared' in spec else '--disable-shared', + '--disable-static' if '+shared' in spec else '--enable-static', ] if '+silex' in spec: -- cgit v1.2.3-70-g09d2 From 071548a62f8dd13d09915c1ed985063e6e372d74 Mon Sep 17 00:00:00 2001 From: Dhanannjay 'Djay' Deo Date: Tue, 5 Apr 2016 23:16:57 -0400 Subject: Building VisIt with silo --- var/spack/repos/builtin/packages/visit/package.py | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index ade86631cf..9b21370fa3 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -11,18 +11,22 @@ class Visit(Package): depends_on("vtk@6.1.0~opengl2") depends_on("qt@4.8.6") depends_on("python") - # TODO: Other package dependencies from spack + depends_on("hdf5") # silo seems to need it + depends_on("silo+shared") def install(self, spec, prefix): + with working_dir('spack-build', create=True): - feature_args = std_cmake_args[:] - feature_args = ["-DVTK_MAJOR_VERSION=6", - "-DVTK_MINOR_VERSION=1", - "-DCMAKE_INSTALL_PREFIX:PATH=%s" % spec.prefix, - "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin, - "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin] + feature_args = std_cmake_args[:] + feature_args = ["-DVTK_MAJOR_VERSION=6", + "-DVTK_MINOR_VERSION=1", + "-DCMAKE_INSTALL_PREFIX:PATH=%s" % spec.prefix, + "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin, + "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin, + "-DVISIT_SILO_DIR:PATH=%s" % spec['silo'].prefix, + "-DVISIT_HDF5_DIR:PATH=%s" % spec['hdf5'].prefix] - cmake('./src', *feature_args) + cmake('../src', *feature_args) - make() - make("install") + make() + make("install") -- cgit v1.2.3-70-g09d2 From 9b3c7b8afa40bd30e8bd54be12f5377ccd448c47 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 6 Apr 2016 10:55:59 +0200 Subject: openblas: provide basename of compilers to avoid issues with detection of Fortran --- var/spack/repos/builtin/packages/openblas/package.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 4ec829a85b..9f13d0690b 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -19,8 +19,11 @@ class Openblas(Package): def install(self, spec, prefix): - make_defs = ['CC=%s' % spack_cc, - 'FC=%s' % spack_fc] + # Openblas is picky about compilers. Configure fails with + # FC=/abs/path/to/f77, whereas FC=f77 works fine. + # To circumvent this, provide basename only: + make_defs = ['CC=%s' % os.path.basename(spack_cc), + 'FC=%s' % os.path.basename(spack_f77)] make_targets = ['libs', 'netlib'] @@ -67,4 +70,3 @@ class Openblas(Package): if '+shared' in self.spec: self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' % dso_suffix) self.spec.lapack_shared_lib = self.spec.blas_shared_lib - -- cgit v1.2.3-70-g09d2 From d636b4fdde5b9a37dff9a354368d36fa6969cec9 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 6 Apr 2016 13:42:47 +0200 Subject: modules : more sensible name to blacklist environment variables modules : added skeleton to permit modifications based on specs --- lib/spack/spack/config.py | 20 ++++++++-- lib/spack/spack/environment.py | 2 +- lib/spack/spack/modules.py | 90 +++++++++++++++++++++--------------------- 3 files changed, 62 insertions(+), 50 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index ff5fba24f8..2067c6146e 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -250,7 +250,7 @@ section_schemas = { 'type': 'string', 'enum': ['None', 'Direct', 'All'] }, - 'module_type_configuration': { + 'module_file_configuration': { 'type': 'object', 'default': {}, 'additionalProperties': False, @@ -260,7 +260,7 @@ section_schemas = { 'default': {}, 'additionalProperties': False, 'properties': { - 'environment_modifications': { + 'environment_blacklist': { 'type': 'array', 'default': [], 'items': { @@ -270,7 +270,21 @@ section_schemas = { } }, 'autoload': {'$ref': '#/definitions/dependency_selection'}, - 'prerequisites': {'$ref': '#/definitions/dependency_selection'} + 'prerequisites': {'$ref': '#/definitions/dependency_selection'}, + 'environment': { + 'type': 'object', + 'default': {} + } + } + }, + 'module_type_configuration': { + 'type': 'object', + 'default': {}, + 'properties': { + 'all': {'$ref': '#/definitions/module_file_configuration'} + }, + 'patternProperties': { + r'\w[\w-]*': {'$ref': '#/definitions/module_file_configuration'} } } }, diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 3d18d3a63f..92ab4e6bea 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -252,7 +252,7 @@ def validate(env, errstream): set_or_unset_not_first(variable, list_of_changes, errstream) -def filter_environment_modifications(env, variables): +def filter_environment_blacklist(env, variables): """ Generator that filters out any change to environment variables present in the input list diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 115d4d9a37..62cd2a8a8b 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -49,6 +49,7 @@ import textwrap import llnl.util.tty as tty import spack import spack.config + from llnl.util.filesystem import join_path, mkdirp from spack.build_environment import parent_class_modules, set_module_variables_for_package from spack.environment import * @@ -137,7 +138,6 @@ class EnvModule(object): if self.spec.package.__doc__: self.long_description = re.sub(r'\s+', ' ', self.spec.package.__doc__) - @property def category(self): # Anything defined at the package level takes precedence @@ -150,35 +150,40 @@ class EnvModule(object): return 'spack installed package' def write(self): - """Write out a module file for this object.""" + """ + Writes out a module file for this object. + + This method employs a template pattern and expects derived classes to: + - override the header property + - provide formats for autoload, prerequisites and environment changes + """ module_dir = os.path.dirname(self.file_name) if not os.path.exists(module_dir): mkdirp(module_dir) - # Environment modifications guessed by inspecting the - # installation prefix - env = inspect_path(self.spec.prefix) - - # Let the extendee/dependency modify their extensions/dependencies before asking for - # package-specific modifications - spack_env = EnvironmentModifications() - def dependencies(request='All'): if request == 'None': return [] - l = [x for x in sorted(self.spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] + l = [xx for xx in sorted(self.spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] if request == 'Direct': - return [x for ii, x in l if ii == 1] + return [xx for ii, xx in l if ii == 1] # FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes' # FIXME : is given. This work around permits to get a unique list of spec anyhow. # FIXME : Possibly we miss a merge step among nodes that refer to the same package. seen = set() seen_add = seen.add - return [x for ii, x in l if not (x in seen or seen_add(x))] + return [xx for ii, xx in l if not (xx in seen or seen_add(xx))] + + # Environment modifications guessed by inspecting the + # installation prefix + env = inspect_path(self.spec.prefix) + # Let the extendee/dependency modify their extensions/dependencies before asking for + # package-specific modifications + spack_env = EnvironmentModifications() # TODO : the code down below is quite similar to build_environment.setup_package and needs to be # TODO : factored out to a single place for item in dependencies('All'): @@ -207,43 +212,43 @@ class EnvModule(object): # Filter modifications to environment variables try: - filter_list = CONFIGURATION[self.name]['filter']['environment_modifications'] + filter_list = CONFIGURATION[self.name]['filter']['environment_blacklist'] except KeyError: filter_list = [] + # Build up the module file content + module_file_content = self.header + for x in autoload_list: + module_file_content += self.autoload(x) + for x in prerequisites_list: + module_file_content += self.prerequisite(x) + for line in self.process_environment_command(filter_environment_blacklist(env, filter_list)): + module_file_content += line + + # Dump to file with open(self.file_name, 'w') as f: - # Header - f.write(self.header) - # Automatic loads - for x in autoload_list: - f.write(self.autoload(x)) - # Prerequisites - for x in prerequisites_list: - f.write(self.prerequisite(x)) - # Modifications to the environment - iterable = self.process_environment_command(filter_environment_modifications(env, filter_list)) - for line in iterable: - f.write(line) + f.write(module_file_content) @property def header(self): raise NotImplementedError() def autoload(self, spec): - raise NotImplementedError() + m = TclModule(spec) + return self.autoload_format.format(module_file=m.use_name) def prerequisite(self, spec): - raise NotImplementedError() + m = TclModule(spec) + return self.prerequisite_format.format(module_file=m.use_name) def process_environment_command(self, env): for command in env: try: - yield self.formats[type(command)].format(**command.args) + yield self.environment_modifications_formats[type(command)].format(**command.args) except KeyError: tty.warn('Cannot handle command of type {command} : skipping request'.format(command=type(command))) tty.warn('{context} at {filename}:{lineno}'.format(**command.args)) - @property def file_name(self): """Subclasses should implement this to return the name of the file @@ -266,7 +271,7 @@ class Dotkit(EnvModule): name = 'dotkit' path = join_path(spack.share_path, "dotkit") - formats = { + environment_modifications_formats = { PrependPath: 'dk_alter {name} {value}\n', SetEnv: 'dk_setenv {name} {value}\n' } @@ -304,7 +309,7 @@ class TclModule(EnvModule): name = 'tcl' path = join_path(spack.share_path, "modules") - formats = { + environment_modifications_formats = { PrependPath: 'prepend-path {name} \"{value}\"\n', AppendPath: 'append-path {name} \"{value}\"\n', RemovePath: 'remove-path {name} \"{value}\"\n', @@ -312,6 +317,13 @@ class TclModule(EnvModule): UnsetEnv: 'unsetenv {name}\n' } + autoload_format = ('if ![ is-loaded {module_file} ] {{' + ' puts stderr "Autoloading {module_file}"' + ' module load {module_file}' + '}}') + + prerequisite_format = 'prereq {module_file}\n' + @property def file_name(self): return join_path(TclModule.path, self.spec.architecture, self.use_name) @@ -339,17 +351,3 @@ class TclModule(EnvModule): header += 'puts stderr "%s"\n' % line header += '}\n\n' return header - - def autoload(self, spec): - autoload_format = ''' -if ![ is-loaded {module_file} ] {{ - puts stderr "Autoloading {module_file}" - module load {module_file} -}} -''''' - m = TclModule(spec) - return autoload_format.format(module_file=m.use_name) - - def prerequisite(self, spec): - m = TclModule(spec) - return 'prereq {module_file}\n'.format(module_file=m.use_name) -- cgit v1.2.3-70-g09d2 From e993c17f89fd44dbf22b19b6669b79b5c79d85a4 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 6 Apr 2016 14:02:27 +0200 Subject: modules : added environment modifications from configuration file --- lib/spack/spack/config.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 2067c6146e..8babb356b4 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -246,6 +246,13 @@ section_schemas = { 'type': 'object', 'additionalProperties': False, 'definitions': { + 'array_of_strings': { + 'type': 'array', + 'default': [], + 'items': { + 'type': 'string' + } + }, 'dependency_selection': { 'type': 'string', 'enum': ['None', 'Direct', 'All'] @@ -273,7 +280,14 @@ section_schemas = { 'prerequisites': {'$ref': '#/definitions/dependency_selection'}, 'environment': { 'type': 'object', - 'default': {} + 'default': {}, + 'additionalProperties': False, + 'properties': { + 'set-env': {'$ref': '#/definitions/array_of_strings'}, + 'unset-env': {'$ref': '#/definitions/array_of_strings'}, + 'prepend-path': {'$ref': '#/definitions/array_of_strings'}, + 'append-path': {'$ref': '#/definitions/array_of_strings'} + } } } }, -- cgit v1.2.3-70-g09d2 From e4cfe7488717eb94b824e9846ebf571c62e625fb Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 6 Apr 2016 16:42:56 +0200 Subject: modules : customization based on specs --- lib/spack/spack/config.py | 8 +-- lib/spack/spack/modules.py | 122 ++++++++++++++++++++++++++++++++------------- 2 files changed, 90 insertions(+), 40 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 8babb356b4..3565f17a77 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -283,10 +283,10 @@ section_schemas = { 'default': {}, 'additionalProperties': False, 'properties': { - 'set-env': {'$ref': '#/definitions/array_of_strings'}, - 'unset-env': {'$ref': '#/definitions/array_of_strings'}, - 'prepend-path': {'$ref': '#/definitions/array_of_strings'}, - 'append-path': {'$ref': '#/definitions/array_of_strings'} + 'set': {'$ref': '#/definitions/array_of_strings'}, + 'unset': {'$ref': '#/definitions/array_of_strings'}, + 'prepend_path': {'$ref': '#/definitions/array_of_strings'}, + 'append_path': {'$ref': '#/definitions/array_of_strings'} } } } diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 62cd2a8a8b..3d5775d03f 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -45,6 +45,7 @@ import os.path import re import shutil import textwrap +import copy import llnl.util.tty as tty import spack @@ -113,6 +114,84 @@ def inspect_path(prefix): return env +def dependencies(spec, request='All'): + if request == 'None': + return [] + + l = [xx for xx in + sorted(spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] + + if request == 'Direct': + return [xx for ii, xx in l if ii == 1] + + # FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes' + # FIXME : is given. This work around permits to get a unique list of spec anyhow. + # FIXME : Possibly we miss a merge step among nodes that refer to the same package. + seen = set() + seen_add = seen.add + return [xx for ii, xx in l if not (xx in seen or seen_add(xx))] + + +def parse_config_options(module_generator): + autoloads, prerequisites, filters = [], [], [] + env = EnvironmentModifications() + # Get the configuration for this kind of generator + try: + module_configuration = copy.copy(CONFIGURATION[module_generator.name]) + except KeyError: + return autoloads, prerequisites, filters, env + + # Get the defaults for all packages + all_conf = module_configuration.pop('all', {}) + + update_single(module_generator.spec, all_conf, autoloads, prerequisites, filters, env) + + for spec, conf in module_configuration.items(): + override = False + if spec.endswith(':'): + spec = spec.strip(':') + override = True + if module_generator.spec.satisfies(spec): + if override: + autoloads, prerequisites, filters = [], [], [] + env = EnvironmentModifications() + update_single(module_generator.spec, conf, autoloads, prerequisites, filters, env) + tty.msg('{request}, {spec}'.format(request=spec, spec=module_generator.spec)) + + return autoloads, prerequisites, filters, env + + +def update_single(spec, configuration, autoloads, prerequisites, filters, env): + # Get list of modules that will be loaded automatically + try: + autoloads.extend(dependencies(spec, configuration['autoload'])) + except KeyError: + pass + try: + prerequisites.extend(dependencies(spec, configuration['prerequisites'])) + except KeyError: + pass + + # Filter modifications to environment variables + try: + filters.extend(configuration['filter']['environment_blacklist']) + except KeyError: + pass + + try: + for method, arglist in configuration['environment'].items(): + for item in arglist: + if method == 'unset': + args = [item] + else: + args = item.split(',') + getattr(env, method)(*args) + except KeyError: + pass + + + + class EnvModule(object): name = 'env_module' formats = {} @@ -161,22 +240,6 @@ class EnvModule(object): if not os.path.exists(module_dir): mkdirp(module_dir) - def dependencies(request='All'): - if request == 'None': - return [] - - l = [xx for xx in sorted(self.spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] - - if request == 'Direct': - return [xx for ii, xx in l if ii == 1] - - # FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes' - # FIXME : is given. This work around permits to get a unique list of spec anyhow. - # FIXME : Possibly we miss a merge step among nodes that refer to the same package. - seen = set() - seen_add = seen.add - return [xx for ii, xx in l if not (xx in seen or seen_add(xx))] - # Environment modifications guessed by inspecting the # installation prefix env = inspect_path(self.spec.prefix) @@ -186,7 +249,7 @@ class EnvModule(object): spack_env = EnvironmentModifications() # TODO : the code down below is quite similar to build_environment.setup_package and needs to be # TODO : factored out to a single place - for item in dependencies('All'): + for item in dependencies(self.spec, 'All'): package = self.spec[item.name].package modules = parent_class_modules(package.__class__) for mod in modules: @@ -199,30 +262,17 @@ class EnvModule(object): set_module_variables_for_package(self.pkg, self.pkg.module) self.spec.package.setup_environment(spack_env, env) - # Get list of modules that will be loaded automatically - try: - autoload_list = dependencies(CONFIGURATION[self.name]['autoload']) - except KeyError: - autoload_list = [] - - try: - prerequisites_list = dependencies(CONFIGURATION[self.name]['prerequisites']) - except KeyError: - prerequisites_list = [] - - # Filter modifications to environment variables - try: - filter_list = CONFIGURATION[self.name]['filter']['environment_blacklist'] - except KeyError: - filter_list = [] + # Parse configuration file + autoloads, prerequisites, filters, conf_env = parse_config_options(self) + env.extend(conf_env) # Build up the module file content module_file_content = self.header - for x in autoload_list: + for x in autoloads: module_file_content += self.autoload(x) - for x in prerequisites_list: + for x in prerequisites: module_file_content += self.prerequisite(x) - for line in self.process_environment_command(filter_environment_blacklist(env, filter_list)): + for line in self.process_environment_command(filter_environment_blacklist(env, filters)): module_file_content += line # Dump to file -- cgit v1.2.3-70-g09d2 From 7904f75782a3ba65c6096b22e61f8f789d7fc001 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 6 Apr 2016 17:05:47 +0200 Subject: modules : all the other strings are lower case --- lib/spack/spack/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 3565f17a77..6b5b3dfd62 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -255,7 +255,7 @@ section_schemas = { }, 'dependency_selection': { 'type': 'string', - 'enum': ['None', 'Direct', 'All'] + 'enum': ['none', 'direct', 'all'] }, 'module_file_configuration': { 'type': 'object', -- cgit v1.2.3-70-g09d2 From 21b7734d92d210f3287588ef2fd49062b3c727c7 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 6 Apr 2016 17:08:31 +0200 Subject: modules : removed debug leftover --- lib/spack/spack/modules.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 3d5775d03f..b12b93e32d 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -156,7 +156,6 @@ def parse_config_options(module_generator): autoloads, prerequisites, filters = [], [], [] env = EnvironmentModifications() update_single(module_generator.spec, conf, autoloads, prerequisites, filters, env) - tty.msg('{request}, {spec}'.format(request=spec, spec=module_generator.spec)) return autoloads, prerequisites, filters, env -- cgit v1.2.3-70-g09d2 From 71e9f1ab8d652e96ed0178a9aaf813a7f89aed35 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 6 Apr 2016 09:52:09 -0600 Subject: + I am resubmitting this proposed change because it was accidentally overwritten. These modifications were accepted as PR#741 but somehow I clobbered them when PR#742 was merged. There was some unintentional overlap in my local repository that I didn't straighten out before pushing. --- var/spack/repos/builtin/packages/netlib-lapack/package.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index 05436332ac..f70e634347 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -34,15 +34,17 @@ class NetlibLapack(Package): def patch(self): # Fix cblas CMakeLists.txt -- has wrong case for subdirectory name. - filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', - '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) - + if self.spec.satisfies('@3.6.0:'): + filter_file('${CMAKE_CURRENT_SOURCE_DIR}/CMAKE/', + '${CMAKE_CURRENT_SOURCE_DIR}/cmake/', 'CBLAS/CMakeLists.txt', string=True) def install_one(self, spec, prefix, shared): cmake_args = ['-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if shared else 'OFF'), - '-DCBLAS=ON', # always build CBLAS '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), '-DLAPACKE:BOOL=%s' % ('ON' if '+lapacke' in spec else 'OFF')] + if spec.satisfies('@3.6.0:'): + cmake_args.extend(['-DCBLAS=ON']) # always build CBLAS + if '+external-blas' in spec: # TODO : the mechanism to specify the library should be more general, # TODO : but this allows to have an hook to an external blas @@ -80,6 +82,3 @@ class NetlibLapack(Package): if '+shared' in self.spec: self.spec.blas_shared_lib = join_path(libdir, 'libblas.%s' % dso_suffix) self.spec.lapack_shared_lib = join_path(libdir, 'liblapack.%s' % dso_suffix) - - - -- cgit v1.2.3-70-g09d2 From 3bf75fab3f37bc2edb70bd49060c3831777c21dc Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 6 Apr 2016 12:03:26 -0700 Subject: Cleaned up architecture. Changed operating_system from dictionary method --- lib/spack/spack/architecture.py | 68 +++++++++-------------------------------- 1 file changed, 14 insertions(+), 54 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 8d9686cf99..555fb14408 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -210,8 +210,13 @@ class Arch(object): def __str__(self): + if self.platform.name == 'darwin': + os_name = self.platform_os.name + else: + os_name = str(self.platform_os) + return (str(self.platform) +"-"+ - str(self.platform_os) + "-" + str(self.target) ) + os_name + "-" + str(self.target)) def _cmp_key(self): platform = self.platform.name @@ -231,52 +236,6 @@ class Arch(object): return d -#def _helper_to_dict(arch_field_dict, arch_field_name, *args): -# """ General method to turn each class in architecture into a -# dictionary. Takes as argument the class dictionary, the field name -# (platform, platform_os, target) and then any attribute args -# """ -# d = {} -# d[arch_field_name] = {} -# for items in args: -# d[arch_field_name][items] = arch_field_dict[items] -# return d -# - -#def to_dict(arch): -# """ Convert the Arch tuple into a dictionary for yaml dumping. This -# uses the _helper_to_dict method to create the dictionary from the -# provided architecture field. Can assign the architecture -# field name (either platform, platform_os or target) and any -# attributes that make up that architecture field, -# """ -# d = {} -# -# platform = arch.platform.__dict__ -# platform_os = arch.platform_os.__dict__ -# target = arch.target.__dict__ -# -# platform_dict = _helper_to_dict(platform,'platform','name') -# os_dict = _helper_to_dict(platform_os, 'platform_os', 'name','version', -# 'compiler_strategy') -# target_dict = _helper_to_dict(target,'target', 'name', -# 'module_name','platform_name') -# -# d.update(platform_dict) -# d.update(os_dict) -# d.update(target_dict) -# -# return d - -#def _platform_from_dict(platform): -# """Creates all the platform class module names into a dictionary of -# name : key-value pairs. From there we can construct the -# platform subclass -# """ -# platform_list = all_platforms() -# platform_names = {plat.__name__.lower():plat for plat in platform_list} -# return platform_names[platform['name']]() - def _target_from_dict(target_dict): """ Creates new instance of target and assigns all the attributes of @@ -284,20 +243,21 @@ def _target_from_dict(target_dict): """ target = Target.__new__(Target) target.name = target_dict['name'] - #target.compiler_strategy = target_dict['compiler_strategy'] target.module_name = target_dict['module_name'] if 'platform_name' in target_dict: target.platform_name = target_dict['platform_name'] return target -def _operating_system_from_dict(os_dict, platform_class): +def _operating_system_from_dict(os_dict): """ uses platform's operating system method to grab the constructed operating systems that are valid on the platform. """ # NOTE: Might need a better way to create operating system objects - name = os_dict['name'] - return platform_class.operating_system(name) - + operating_system = OperatingSystem.__new__(OperatingSystem) + operating_system.name = os_dict['name'] + operating_system.version = os_dict['version'] + operating_system.compiler_strategy = os_dict['compiler_strategy'] + return operating_system def arch_from_dict(d): """ Uses _platform_from_dict, _operating_system_from_dict, _target_from_dict @@ -312,8 +272,8 @@ def arch_from_dict(d): target_dict = d['target'] target = _target_from_dict(target_dict) - platform_os = _operating_system_from_dict(os_dict, arch.platform) - arch.target =target + platform_os = _operating_system_from_dict(os_dict) + arch.target = target arch.platform_os = platform_os return arch -- cgit v1.2.3-70-g09d2 From 749508af010ee90009a61bb42a8f8214a6fabd21 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 6 Apr 2016 12:05:29 -0700 Subject: Found loops calling all_compilers that were always reading in the config file which lead to a slowdown, the fix is to cache the config file so we don't waste time re-reading the config file in again. --- lib/spack/spack/compilers/__init__.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 9601ae3e3a..caf438e232 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -151,20 +151,25 @@ def remove_compiler_from_config(compiler_spec, arch=None, scope=None): spack.config.update_config('compilers', update, scope) +_cache_config_file = {} def all_compilers_config(arch=None, scope=None): """Return a set of specs for all the compiler versions currently available to build with. These are instances of CompilerSpec. """ # Get compilers for this architecture. - arch_config = get_compiler_config(arch, scope) - # Merge 'all' compilers with arch-specific ones. - # Arch-specific compilers have higher precedence. - merged_config = get_compiler_config('all', scope=scope) - merged_config = spack.config._merge_yaml(merged_config, arch_config) + global _cache_config_file #Create a cache of the config file so we don't load all the time. - return merged_config + if not _cache_config_file: + arch_config = get_compiler_config(arch, scope) + # Merge 'all' compilers with arch-specific ones. + # Arch-specific compilers have higher precedence. + _cache_config_file = get_compiler_config('all', scope=scope) + _cache_config_file = spack.config._merge_yaml(_cache_config_file, arch_config) + return _cache_config_file + else: + return _cache_config_file def all_compilers(arch=None, scope=None): # Return compiler specs from the merged config. -- cgit v1.2.3-70-g09d2 From 73b6214a13339f11dbc33b0e068c13499f139b6f Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 22 Mar 2016 15:23:46 +0100 Subject: module files : proper cleanup on uninstall fixes #216 Conflicts: lib/spack/spack/test/database.py --- lib/spack/spack/cmd/module.py | 10 ++-------- lib/spack/spack/modules.py | 6 +++++- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index 315d9fc926..a67f5c0c13 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -22,21 +22,16 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -import sys import os import shutil -import argparse +import sys import llnl.util.tty as tty -from llnl.util.lang import partition_list -from llnl.util.filesystem import mkdirp - import spack.cmd +from llnl.util.filesystem import mkdirp from spack.modules import module_types from spack.util.string import * -from spack.spec import Spec - description ="Manipulate modules and dotkits." @@ -98,7 +93,6 @@ def module_refresh(): cls(spec).write() - def module(parser, args): if args.module_command == 'refresh': module_refresh() diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index d797af287d..61624fbd70 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -211,7 +211,11 @@ class EnvModule(object): def remove(self): mod_file = self.file_name if os.path.exists(mod_file): - shutil.rmtree(mod_file, ignore_errors=True) + try: + os.remove(mod_file) # Remove the module file + os.removedirs(os.path.dirname(mod_file)) # Remove all the empty directories from the leaf up + except OSError: + pass # removedirs throws OSError on first non-empty directory found class Dotkit(EnvModule): -- cgit v1.2.3-70-g09d2 From 400166398239be0880c025672dd3e5eb6c8bac7f Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 6 Apr 2016 22:19:07 +0200 Subject: leftover from cherry-pick --- lib/spack/spack/test/mock_database.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/mock_database.py b/lib/spack/spack/test/mock_database.py index 6fd05439bf..82ba59fc48 100644 --- a/lib/spack/spack/test/mock_database.py +++ b/lib/spack/spack/test/mock_database.py @@ -17,7 +17,7 @@ class MockDatabase(MockPackagesTest): def _mock_remove(self, spec): specs = spack.installed_db.query(spec) - assert(len(specs) == 1) + assert len(specs) == 1 spec = specs[0] spec.package.do_uninstall(spec) @@ -71,6 +71,8 @@ class MockDatabase(MockPackagesTest): self._mock_install('mpileaks ^zmpi') def tearDown(self): + for spec in spack.installed_db.query(): + spec.package.do_uninstall(spec) super(MockDatabase, self).tearDown() shutil.rmtree(self.install_path) spack.install_path = self.spack_install_path -- cgit v1.2.3-70-g09d2 From 380a2b23e66fe0acfd16f9e72499c7bd42597eaf Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 6 Apr 2016 15:57:03 -0500 Subject: Add bash package --- var/spack/repos/builtin/packages/bash/package.py | 20 ++++++++++++++++++++ var/spack/repos/builtin/packages/ncurses/package.py | 7 +++---- var/spack/repos/builtin/packages/readline/package.py | 4 ++-- 3 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/bash/package.py diff --git a/var/spack/repos/builtin/packages/bash/package.py b/var/spack/repos/builtin/packages/bash/package.py new file mode 100644 index 0000000000..9c9fbeedcf --- /dev/null +++ b/var/spack/repos/builtin/packages/bash/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Bash(Package): + """The GNU Project's Bourne Again SHell.""" + + homepage = "https://www.gnu.org/software/bash/" + url = "ftp://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz" + + version('4.3', '81348932d5da294953e15d4814c74dd1') + + depends_on('readline') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, + '--with-curses', + '--with-installed-readline=%s' % spec['readline'].prefix) + + make() + make("tests") + make("install") diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py index 8dc808caac..219fbce226 100644 --- a/var/spack/repos/builtin/packages/ncurses/package.py +++ b/var/spack/repos/builtin/packages/ncurses/package.py @@ -8,11 +8,10 @@ class Ncurses(Package): """ homepage = "http://invisible-island.net/ncurses/ncurses.html" + url = "http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz" - version('5.9', '8cb9c412e5f2d96bc6f459aa8c6282a1', - url='http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz') - version('6.0', 'ee13d052e1ead260d7c28071f46eefb1', - url='http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz') + version('6.0', 'ee13d052e1ead260d7c28071f46eefb1') + version('5.9', '8cb9c412e5f2d96bc6f459aa8c6282a1') patch('patch_gcc_5.txt', when='%gcc@5.0:') diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py index 1b870e0e7f..0c429ea756 100644 --- a/var/spack/repos/builtin/packages/readline/package.py +++ b/var/spack/repos/builtin/packages/readline/package.py @@ -2,12 +2,12 @@ from spack import * class Readline(Package): """The GNU Readline library provides a set of functions for use by - applications that allow users to edit command li nes as they + applications that allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like - history expansion on previous commands. """ + history expansion on previous commands.""" homepage = "http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" url = "ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz" -- cgit v1.2.3-70-g09d2 From 918ad28a936abf6112ba91ca7eb2e121f84e60cf Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 6 Apr 2016 13:58:29 -0700 Subject: Changed all target values to architecture. Also added a sort_key method so that older architecture specs can be sorted with the newer ones --- lib/spack/spack/build_environment.py | 90 ++---------------------------------- lib/spack/spack/cmd/find.py | 18 ++++++-- 2 files changed, 16 insertions(+), 92 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 8ed3c4e1a1..87fc310b5a 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -32,8 +32,6 @@ import sys import shutil import multiprocessing import platform -import re - from llnl.util.filesystem import * import spack @@ -59,9 +57,6 @@ SPACK_DEBUG = 'SPACK_DEBUG' SPACK_SHORT_SPEC = 'SPACK_SHORT_SPEC' SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR' -SPACK_CRAYPE = 'SPACK_CRAYPE' -SPACK_COMP_MODULE = 'SPACK_COMP_MODULE' - class MakeExecutable(Executable): """Special callable executable object for make so the user can @@ -88,68 +83,6 @@ class MakeExecutable(Executable): return super(MakeExecutable, self).__call__(*args, **kwargs) -def load_module(mod): - """Takes a module name and removes modules until it is possible to - load that module. It then loads the provided module. Depends on the - modulecmd implementation of modules used in cray and lmod. - """ - #Create an executable of the module command that will output python code - modulecmd = which('modulecmd') - modulecmd.add_default_arg('python') - - # Read the module and remove any conflicting modules - # We do this without checking that they are already installed - # for ease of programming because unloading a module that is not - # loaded does nothing. - text = modulecmd('show', mod, output=str, error=str).split() - for i, word in enumerate(text): - if word == 'conflict': - exec(compile(modulecmd('unload', text[i+1], output=str, error=str), '', 'exec')) - # Load the module now that there are no conflicts - load = modulecmd('load', mod, output=str, error=str) - exec(compile(load, '', 'exec')) - - -def get_path_from_module(mod): - """Inspects a TCL module for entries that indicate the absolute path - at which the library supported by said module can be found. - """ - # Create a modulecmd executable - modulecmd = which('modulecmd') - modulecmd.add_default_arg('python') - - # Read the module - text = modulecmd('show', mod, output=str, error=str).split('\n') - - # If it lists its package directory, return that - for line in text: - if line.find(mod.upper()+'_DIR') >= 0: - words = line.split() - return words[2] - - # If it lists a -rpath instruction, use that - for line in text: - rpath = line.find('-rpath/') - if rpath >= 0: - return line[rpath+6:line.find('/lib')] - - # If it lists a -L instruction, use that - for line in text: - L = line.find('-L/') - if L >= 0: - return line[L+2:line.find('/lib')] - - # If it sets the LD_LIBRARY_PATH or CRAY_LD_LIBRARY_PATH, use that - for line in text: - if line.find('LD_LIBRARY_PATH') >= 0: - words = line.split() - path = words[2] - return path[:path.find('/lib')] - - # Unable to find module path - return None - - def set_compiler_environment_variables(pkg): assert(pkg.spec.concrete) compiler = pkg.compiler @@ -176,10 +109,6 @@ def set_compiler_environment_variables(pkg): os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) - if compiler.strategy == 'MODULES': - for mod in compiler.modules: - load_module(mod) - def set_build_environment_variables(pkg): """This ensures a clean install environment when we build packages. @@ -243,8 +172,6 @@ def set_build_environment_variables(pkg): pkg_config_dirs.append(pcdir) path_set("PKG_CONFIG_PATH", pkg_config_dirs) - if pkg.spec.architecture.target.module_name: - load_module(pkg.spec.architecture.target.module_name) def set_module_variables_for_package(pkg, m): """Populate the module scope of install() with some useful functions. @@ -314,21 +241,10 @@ def set_module_variables_for_package(pkg, m): def get_rpaths(pkg): """Get a list of all the rpaths for a package.""" - - # First load all modules for external packages and update the external - # packages' paths to reflect what is found in the modules so that we can - # rpath through the modules when possible, but if not possible they are - # already loaded. - for spec in pkg.spec.traverse(root=False): - if spec.external_module: - load_module(spec.external_module) - spec.external = get_path_from_module(spec.external_module) - - # Construct rpaths from the paths of each dep rpaths = [pkg.prefix.lib, pkg.prefix.lib64] - rpaths.extend(d.prefix.lib for d in pkg.spec.traverse(root=False) + rpaths.extend(d.prefix.lib for d in pkg.spec.dependencies.values() if os.path.isdir(d.prefix.lib)) - rpaths.extend(d.prefix.lib64 for d in pkg.spec.traverse(root=False) + rpaths.extend(d.prefix.lib64 for d in pkg.spec.dependencies.values() if os.path.isdir(d.prefix.lib64)) return rpaths @@ -348,8 +264,8 @@ def parent_class_modules(cls): def setup_package(pkg): """Execute all environment setup routines.""" - set_build_environment_variables(pkg) set_compiler_environment_variables(pkg) + set_build_environment_variables(pkg) # If a user makes their own package repo, e.g. # spack.repos.mystuff.libelf.Libelf, and they inherit from diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 4223c53b06..95f035c7bf 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -90,18 +90,26 @@ def display_specs(specs, **kwargs): hlen = None # Make a dict with specs keyed by target and compiler. - index = index_by(specs, ('target', 'compiler')) + index = index_by(specs, ('architecture', 'compiler')) - # Traverse the index and print out each package - for i, (target, compiler) in enumerate(sorted(index)): + # Create sort key based off of whether read architecture is string + def sort_key(index_dict): + if isinstance(index_dict[0],basestring): + return(str, index_dict[1]._cmp_key()) + elif isinstance(index_dict[0], spack.architecture.Arch): + return (index_dict[0]._cmp_key(), index_dict[1]._cmp_key()) + + sorted_index = sorted(index, key=sort_key) + + for i, (architecture, compiler) in enumerate(sorted_index): if i > 0: print header = "%s{%s} / %s{%s}" % ( - spack.spec.target_color, target, + spack.spec.architecture_color, architecture, spack.spec.compiler_color, compiler) tty.hline(colorize(header), char='-') - specs = index[(target,compiler)] + specs = index[(architecture, compiler)] specs.sort() nfmt = '.' if namespace else '_' -- cgit v1.2.3-70-g09d2 From 99117cbc9067df814c99f8427f658ad9a811f69b Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 6 Apr 2016 14:07:22 -0700 Subject: pulled from current repo the build_environment.py. Added module loading methods from our cray port --- lib/spack/spack/build_environment.py | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 87fc310b5a..12a529d070 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -83,6 +83,66 @@ class MakeExecutable(Executable): return super(MakeExecutable, self).__call__(*args, **kwargs) +def load_module(mod): + """Takes a module name and removes modules until it is possible to + load that module. It then loads the provided module. Depends on the + modulecmd implementation of modules used in cray and lmod. + """ + #Create an executable of the module command that will output python code + modulecmd = which('modulecmd') + modulecmd.add_default_arg('python') + + # Read the module and remove any conflicting modules + # We do this without checking that they are already installed + # for ease of programming because unloading a module that is not + # loaded does nothing. + text = modulecmd('show', mod, output=str, error=str).split() + for i, word in enumerate(text): + if word == 'conflict': + exec(compile(modulecmd('unload', text[i+1], output=str, error=str), '', 'exec')) + # Load the module now that there are no conflicts + load = modulecmd('load', mod, output=str, error=str) + exec(compile(load, '', 'exec')) + +def get_path_from_module(mod): + """Inspects a TCL module for entries that indicate the absolute path + at which the library supported by said module can be found. + """ + # Create a modulecmd executable + modulecmd = which('modulecmd') + modulecmd.add_default_arg('python') + + # Read the module + text = modulecmd('show', mod, output=str, error=str).split('\n') + + # If it lists its package directory, return that + for line in text: + if line.find(mod.upper()+'_DIR') >= 0: + words = line.split() + return words[2] + + # If it lists a -rpath instruction, use that + for line in text: + rpath = line.find('-rpath/') + if rpath >= 0: + return line[rpath+6:line.find('/lib')] + + # If it lists a -L instruction, use that + for line in text: + L = line.find('-L/') + if L >= 0: + return line[L+2:line.find('/lib')] + + # If it sets the LD_LIBRARY_PATH or CRAY_LD_LIBRARY_PATH, use that + for line in text: + if line.find('LD_LIBRARY_PATH') >= 0: + words = line.split() + path = words[2] + return path[:path.find('/lib')] + + # Unable to find module path + return None + def set_compiler_environment_variables(pkg): assert(pkg.spec.concrete) compiler = pkg.compiler @@ -109,6 +169,9 @@ def set_compiler_environment_variables(pkg): os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) + if compiler.strategy == 'MODULES': + for mod in compiler.modules: + load_module(mod) def set_build_environment_variables(pkg): """This ensures a clean install environment when we build packages. @@ -172,6 +235,9 @@ def set_build_environment_variables(pkg): pkg_config_dirs.append(pcdir) path_set("PKG_CONFIG_PATH", pkg_config_dirs) + if pkg.spec.architecture.target.module_name: + load_module(pkg.spec.architecture.target.module_name) + def set_module_variables_for_package(pkg, m): """Populate the module scope of install() with some useful functions. @@ -241,6 +307,11 @@ def set_module_variables_for_package(pkg, m): def get_rpaths(pkg): """Get a list of all the rpaths for a package.""" + for spec in pkg.spec.traverse(root=False): + if spec.external_module: + load_module(spec.external_module) + spec.external = get_path_from_module(spec.external_module) + rpaths = [pkg.prefix.lib, pkg.prefix.lib64] rpaths.extend(d.prefix.lib for d in pkg.spec.dependencies.values() if os.path.isdir(d.prefix.lib)) -- cgit v1.2.3-70-g09d2 From fbabfc593d10a7fc35944e72e2eb8b1ebf4818eb Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 6 Apr 2016 16:44:22 -0500 Subject: Make R extensable and add a couple of packages for verification. Added R as a build system so that the create template will have the correct configure line. Added a regex for version parsing as the R URLs are a little odd. --- lib/spack/spack/cmd/create.py | 8 +++- lib/spack/spack/url.py | 3 ++ var/spack/repos/builtin/packages/R/package.py | 54 ++++++++++++++++++++++ .../repos/builtin/packages/r-abind/package.py | 15 ++++++ .../repos/builtin/packages/r-magic/package.py | 15 ++++++ 5 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/r-abind/package.py create mode 100644 var/spack/repos/builtin/packages/r-magic/package.py diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index f0cd50b8df..e3a31806ab 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -124,10 +124,12 @@ class ConfigureGuesser(object): autotools = "configure('--prefix=%s' % prefix)" cmake = "cmake('.', *std_cmake_args)" python = "python('setup.py', 'install', '--prefix=%s' % prefix)" + r = "R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)" config_lines = ((r'/configure$', 'autotools', autotools), (r'/CMakeLists.txt$', 'cmake', cmake), - (r'/setup.py$', 'python', python)) + (r'/setup.py$', 'python', python), + (r'/NAMESPACE$', 'r', r)) # Peek inside the tarball. tar = which('tar') @@ -272,6 +274,10 @@ def create(parser, args): if guesser.build_system == 'python': name = 'py-%s' % name + # Prepend 'r-' to R package names, by convention. + if guesser.build_system == 'r': + name = 'r-%s' % name + # Create a directory for the new package. pkg_path = repo.filename_for_package_name(name) if os.path.exists(pkg_path) and not args.force: diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index f51f05cad7..b4fb70d6fb 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -206,6 +206,9 @@ def parse_version_offset(path): # e.g. lame-398-1 (r'-((\d)+-\d)', stem), + # e.g. foobar_1.2-3 + (r'_((\d+\.)+\d+(-\d+)?)', stem), + # e.g. foobar-4.5.1 (r'-((\d+\.)*\d+)$', stem), diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 2471dff09b..3a76416f27 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -1,4 +1,14 @@ +import functools +import glob +import inspect +import os +import re +from contextlib import closing + +import spack +from llnl.util.lang import match_predicate from spack import * +from spack.util.environment import * class R(Package): @@ -9,6 +19,8 @@ class R(Package): """ homepage = "https://www.r-project.org" url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz" + + extendable = True version('3.2.3', '1ba3dac113efab69e706902810cc2970') version('3.2.2', '57cef5c2e210a5454da1979562a10e5b') @@ -47,3 +59,45 @@ class R(Package): configure(*options) make() make('install') + + # ======================================================================== + # Set up environment to make install easy for R extensions. + # ======================================================================== + + @property + def r_lib_dir(self): + return os.path.join('lib64', 'R', 'library') + + def setup_dependent_environment(self, spack_env, run_env, extension_spec): + # 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(): + if d.package.extends(self.spec): + r_libs_path.append(os.path.join(d.prefix, self.r_lib_dir)) + + r_libs_path = ':'.join(r_libs_path) + spack_env.set('R_LIBS', r_libs_path) + + # For run time environment set only the path for extension_spec and prepend it to R_LIBS + if extension_spec.package.extends(self.spec): + run_env.prepend_path('R_LIBS', os.path.join(extension_spec.prefix, self.r_lib_dir)) + + + def setup_dependent_package(self, module, ext_spec): + """ + Called before R modules' install() methods. + + In most cases, extensions will only need to have one line:: + + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) + """ + # R extension builds can have a global R executable function + module.R = Executable(join_path(self.spec.prefix.bin, 'R')) + + # Add variable for library directry + module.r_lib_dir = os.path.join(ext_spec.prefix, self.r_lib_dir) + + # Make the site packages directory for extensions, if it does not exist already. + if ext_spec.package.is_extension: + mkdirp(module.r_lib_dir) diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py new file mode 100644 index 0000000000..54d399c432 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-abind/package.py @@ -0,0 +1,15 @@ +from spack import * + +class RAbind(Package): + """Combine multidimensional arrays into a single array. This is a generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and higher-dimensional arrays. Also provides functions 'adrop', 'asub', and 'afill' for manipulating, extracting and replacing data in arrays.""" + + homepage = "https://cran.r-project.org/" + url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" + + version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5', expand=False) + + extends('R') + + def install(self, spec, prefix): + + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py new file mode 100644 index 0000000000..5f25b2a162 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-magic/package.py @@ -0,0 +1,15 @@ +from spack import * + +class RMagic(Package): + """A collection of efficient, vectorized algorithms for the creation and investigation of magic squares and hypercubes, including a variety of functions for the manipulation and analysis of arbitrarily dimensioned arrays.""" + homepage = "https://cran.r-project.org/" + url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" + + version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029', expand=False) + + extends('R') + + depends_on('r-abind') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) -- cgit v1.2.3-70-g09d2 From c113d390a7a6fbd171aae54aa1f081f8b0790eab Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 6 Apr 2016 23:51:47 +0200 Subject: mvapich2 : MPI compiler wrapper will use spack compilers during the installation phase mpich : fixed wrong function signature --- var/spack/repos/builtin/packages/mpich/package.py | 12 ++++++------ var/spack/repos/builtin/packages/mvapich2/package.py | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 2d7955e08d..b317ec6651 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -47,12 +47,12 @@ class Mpich(Package): provides('mpi@:3.0', when='@3:') provides('mpi@:1.3', when='@1:') - def setup_dependent_environment(self, env, dependent_spec): - env.set('MPICH_CC', spack_cc) - env.set('MPICH_CXX', spack_cxx) - env.set('MPICH_F77', spack_f77) - env.set('MPICH_F90', spack_f90) - env.set('MPICH_FC', spack_fc) + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + spack_env.set('MPICH_CC', spack_cc) + spack_env.set('MPICH_CXX', spack_cxx) + spack_env.set('MPICH_F77', spack_f77) + spack_env.set('MPICH_F90', spack_fc) + spack_env.set('MPICH_FC', spack_fc) def setup_dependent_package(self, module, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index e4e95f92af..3e60b517db 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -140,6 +140,13 @@ class Mvapich2(Package): configure_args.extend(network_options) + def setup_dependent_environment(self, spack_env, run_env, extension_spec): + spack_env.set('MPICH_CC', spack_cc) + spack_env.set('MPICH_CXX', spack_cxx) + spack_env.set('MPICH_F77', spack_f77) + spack_env.set('MPICH_F90', spack_fc) + spack_env.set('MPICH_FC', spack_fc) + def install(self, spec, prefix): # we'll set different configure flags depending on our environment configure_args = [ -- cgit v1.2.3-70-g09d2 From 32779ab1f6c2658771e69e58f8d8a451b23043b0 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 6 Apr 2016 17:02:34 -0500 Subject: Add r-filehash to test version naming. --- var/spack/repos/builtin/packages/r-filehash/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-filehash/package.py diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py new file mode 100644 index 0000000000..a3b688da10 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-filehash/package.py @@ -0,0 +1,14 @@ +from spack import * + +class RFilehash(Package): + """Implements a simple key-value style database where character string keys are associated with data values that are stored on the disk. A simple interface is provided for inserting, retrieving, and deleting data from the database. Utilities are provided that allow 'filehash' databases to be treated much like environments and lists are already used in R. These utilities are provided to encourage interactive and exploratory analysis on large datasets. Three different file formats for representing the database are currently available and new formats can easily be incorporated by third parties for use in the 'filehash' framework.""" + + homepage = 'https://cran.r-project.org/' + url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" + + version('2.3', '01fffafe09b148ccadc9814c103bdc2f', expand=False) + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) -- cgit v1.2.3-70-g09d2 From ddaba07d8297544f2587f0c31fcbd2dafa824eb3 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Tue, 5 Apr 2016 19:00:28 -0700 Subject: metis 4.0.3 Add version 4.0.3 to metis package. Attempted to implement reasonable versions of all variants declared for metis@5.1.0; some of these do not have analogues in metis@4.0.3, and errors are raised accordingly. Also updated dependencies of packages with depends_on('metis') to depends_on('metis@5:') to ensure that these packages still build. --- var/spack/repos/builtin/packages/dealii/package.py | 2 +- var/spack/repos/builtin/packages/eigen/package.py | 2 +- var/spack/repos/builtin/packages/metis/package.py | 83 ++++++++++++++++++++-- var/spack/repos/builtin/packages/mumps/package.py | 2 +- .../repos/builtin/packages/parmetis/package.py | 2 +- var/spack/repos/builtin/packages/petsc/package.py | 2 +- .../repos/builtin/packages/superlu-dist/package.py | 2 +- .../repos/builtin/packages/trilinos/package.py | 2 +- 8 files changed, 86 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 1f763ad358..b251d50ca1 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -40,7 +40,7 @@ class Dealii(Package): depends_on ("arpack-ng+mpi", when='+arpack+mpi') depends_on ("doxygen", when='+doc') depends_on ("hdf5+mpi~cxx", when='+hdf5+mpi') #FIXME NetCDF declares dependency with ~cxx, why? - depends_on ("metis", when='+metis') + depends_on ("metis@5:", when='+metis') depends_on ("netcdf+mpi", when="+netcdf+mpi") depends_on ("netcdf-cxx", when='+netcdf+mpi') depends_on ("oce", when='+oce') diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py index 8d6e672f86..1501989812 100644 --- a/var/spack/repos/builtin/packages/eigen/package.py +++ b/var/spack/repos/builtin/packages/eigen/package.py @@ -45,7 +45,7 @@ class Eigen(Package): # TODO : dependency on googlehash, superlu, adolc missing - depends_on('metis', when='+metis') + depends_on('metis@5:', when='+metis') depends_on('scotch', when='+scotch') depends_on('fftw', when='+fftw') depends_on('suite-sparse', when='+suitesparse') diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index d3bab554fe..e348eca4ba 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -24,7 +24,7 @@ ############################################################################## from spack import * -import glob,sys +import glob, sys, os class Metis(Package): """ @@ -37,6 +37,8 @@ class Metis(Package): url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" version('5.1.0', '5465e67079419a69e0116de24fce58fe') + version('4.0.3', '5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55', + url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds the library in debug mode') @@ -45,12 +47,85 @@ class Metis(Package): variant('idx64', default=False, description='Use int64_t as default index type') variant('double', default=False, description='Use double precision floating point types') - depends_on('cmake @2.8:') # build-time dependency - + depends_on('cmake @2.8:', when='@5:') # build-time dependency depends_on('gdb', when='+gdb') - patch('install_gklib_defs_rename.patch') + patch('install_gklib_defs_rename.patch', when='@5:') + + + @when('@4:4.0.3') + def install(self, spec, prefix): + if '+gdb' in spec: + raise InstallError('gdb support not implemented in METIS 4!') + if '+idx64' in spec: + raise InstallError('idx64 option not implemented in METIS 4!') + if '+double' in spec: + raise InstallError('double option not implemented for METIS 4!') + + options = ['COPTIONS=-fPIC'] + if '+debug' in spec: + options.append('OPTFLAGS=-g -O0') + make(*options) + + mkdir(prefix.bin) + for x in ('pmetis', 'kmetis', 'oemetis', 'onmetis', 'partnmesh', + 'partdmesh', 'mesh2nodal', 'mesh2dual', 'graphchk'): + install(x, prefix.bin) + + mkdir(prefix.lib) + install('libmetis.a', prefix.lib) + + mkdir(prefix.include) + for h in glob.glob(join_path('Lib', '*.h')): + install(h, prefix.include) + + mkdir(prefix.share) + for f in (join_path(*p) + for p in (('Programs', 'io.c'), + ('Test','mtest.c'), + ('Graphs','4elt.graph'), + ('Graphs', 'metis.mesh'), + ('Graphs', 'test.mgraph'))): + install(f, prefix.share) + + if '+shared' in spec: + if sys.platform == 'darwin': + lib_dsuffix = 'dylib' + load_flag = '-Wl,-all_load' + no_load_flag = '' + else: + lib_dsuffix = 'so' + load_flag = '-Wl,-whole-archive' + no_load_flag = '-Wl,-no-whole-archive' + + os.system(spack_cc + ' -fPIC -shared ' + load_flag + + ' libmetis.a ' + no_load_flag + ' -o libmetis.' + + lib_dsuffix) + install('libmetis.' + lib_dsuffix, prefix.lib) + + # Set up and run tests on installation + symlink(join_path(prefix.share, 'io.c'), 'io.c') + symlink(join_path(prefix.share, 'mtest.c'), 'mtest.c') + os.system(spack_cc + ' -I%s' % prefix.include + ' -c io.c') + os.system(spack_cc + ' -I%s' % prefix.include + + ' -L%s' % prefix.lib + ' -lmetis mtest.c io.o -o mtest') + _4eltgraph = join_path(prefix.share, '4elt.graph') + test_mgraph = join_path(prefix.share, 'test.mgraph') + metis_mesh = join_path(prefix.share, 'metis.mesh') + kmetis = join_path(prefix.bin, 'kmetis') + os.system('./mtest ' + _4eltgraph) + os.system(kmetis + ' ' + _4eltgraph + ' 40') + os.system(join_path(prefix.bin, 'onmetis') + ' ' + _4eltgraph) + os.system(join_path(prefix.bin, 'pmetis') + ' ' + test_mgraph + ' 2') + os.system(kmetis + ' ' + test_mgraph + ' 2') + os.system(kmetis + ' ' + test_mgraph + ' 5') + os.system(join_path(prefix.bin, 'partnmesh') + metis_mesh + ' 10') + os.system(join_path(prefix.bin, 'partdmesh') + metis_mesh + ' 10') + os.system(join_path(prefix.bin, 'mesh2dual') + metis_mesh) + + + @when('@5:') def install(self, spec, prefix): options = [] diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 025d86ebdc..58f790ec32 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -23,7 +23,7 @@ class Mumps(Package): depends_on('scotch + esmumps', when='~ptscotch+scotch') depends_on('scotch + esmumps + mpi', when='+ptscotch') - depends_on('metis', when='+metis') + depends_on('metis@5:', when='+metis') depends_on('parmetis', when="+parmetis") depends_on('blas') depends_on('lapack') diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index ff4370aa4b..b49f8dae00 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -44,7 +44,7 @@ class Parmetis(Package): depends_on('mpi') patch('enable_external_metis.patch') - depends_on('metis') + depends_on('metis@5:') # bug fixes from PETSc developers # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/ diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 5c1fc6cc92..1161dd7d67 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -40,7 +40,7 @@ class Petsc(Package): # Other dependencies depends_on('boost', when='+boost') - depends_on('metis', when='+metis') + depends_on('metis@5:', when='+metis') depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('parmetis', when='+metis+mpi') diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index ddcb7f9225..5cf5e129b4 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -15,7 +15,7 @@ class SuperluDist(Package): depends_on ('blas') depends_on ('lapack') depends_on ('parmetis') - depends_on ('metis') + depends_on ('metis@5:') def install(self, spec, prefix): makefile_inc = [] diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 6223848c68..0f72055fa7 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -42,7 +42,7 @@ class Trilinos(Package): depends_on('matio') depends_on('glm') depends_on('swig') - depends_on('metis',when='+metis') + depends_on('metis@5:',when='+metis') depends_on('suite-sparse',when='+suite-sparse') # MPI related dependencies -- cgit v1.2.3-70-g09d2 From bbd328d307b6b6a1350114a68a1ce294347a0176 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Wed, 6 Apr 2016 16:58:48 -0700 Subject: metis 5: fix download url Spack picks up the wrong download for metis 5.1.0 from parsing the url field for metis 4.0.3. Add an explicit url field to fix this bug. --- var/spack/repos/builtin/packages/metis/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index e348eca4ba..41e3ebb429 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -36,7 +36,8 @@ class Metis(Package): homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" - version('5.1.0', '5465e67079419a69e0116de24fce58fe') + version('5.1.0', '5465e67079419a69e0116de24fce58fe', + url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz') version('4.0.3', '5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55', url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz') -- cgit v1.2.3-70-g09d2 From b19d6ab9c5e4b7a8289e057826b498dd93ea7e08 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 6 Apr 2016 19:08:01 -0500 Subject: Check for non-numeric bits in the stem. --- lib/spack/spack/url.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index b4fb70d6fb..ad51da9d47 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -207,7 +207,7 @@ def parse_version_offset(path): (r'-((\d)+-\d)', stem), # e.g. foobar_1.2-3 - (r'_((\d+\.)+\d+(-\d+)?)', stem), + (r'_((\d+\.)+\d+(-\d+)?[a-z]?)', stem), # e.g. foobar-4.5.1 (r'-((\d+\.)*\d+)$', stem), -- cgit v1.2.3-70-g09d2 From 8a7f34665b0b8b95f273401082d862989bb4443c Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 6 Apr 2016 23:05:49 -0500 Subject: Make sure base bioconductor package can be installed. --- var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-BiocGenerics/package.py diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py new file mode 100644 index 0000000000..e2d9bb9594 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -0,0 +1,13 @@ +from spack import * + +class RBiocgenerics(Package): + """S4 generic functions needed by many Bioconductor packages.""" + homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html' + url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" + + version('0.16.1', 'c2148ffd86fc6f1f819c7f68eb2c744f', expand=False) + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) -- cgit v1.2.3-70-g09d2 From 7dc1524c0807ea8cb6cf990d1811e0ca2218444a Mon Sep 17 00:00:00 2001 From: alalazo Date: Thu, 7 Apr 2016 10:48:05 +0200 Subject: modules : added stub for dotkit (to be verified) --- lib/spack/spack/modules.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index b12b93e32d..4f7f67e910 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -189,8 +189,6 @@ def update_single(spec, configuration, autoloads, prerequisites, filters, env): pass - - class EnvModule(object): name = 'env_module' formats = {} @@ -325,6 +323,10 @@ class Dotkit(EnvModule): SetEnv: 'dk_setenv {name} {value}\n' } + autoload_format = 'dk_op {module_file}\n' # TODO : Check this line + + prerequisite_format = None # TODO : does something like prerequisite exist for dotkit? + @property def file_name(self): return join_path(Dotkit.path, self.spec.architecture, '%s.dk' % self.use_name) -- cgit v1.2.3-70-g09d2 From 143a4d7f7688b506811a564768ed49a2a12d1992 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 7 Apr 2016 14:36:26 -0700 Subject: Changed default to default_target, also added frontend and backend to operating system --- lib/spack/spack/architecture.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 555fb14408..ca306b0484 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -118,14 +118,14 @@ class Platform(object): front-end, and back-end. This can be overwritten by a subclass for which we want to provide further aliasing options. """ - if name == 'default': + if name == 'default_target': name = self.default - elif name == 'front_end' or name == 'fe': + elif name == 'frontend' or name == 'fe': name = self.front_end - elif name == 'back_end' or name == 'be': + elif name == 'backend' or name == 'be': name = self.back_end - return self.targets[name] + return self.targets.get(name, None) def add_operating_system(self, name, os_class): """ Add the operating_system class object into the @@ -136,12 +136,12 @@ class Platform(object): def operating_system(self, name): if name == 'default_os': name = self.default_os - if name == 'front_os': + if name == 'frontend' or name == "fe": name = self.front_os - if name == 'back_os': + if name == 'backend' or name == 'be': name = self.back_os - return self.operating_sys[name] + return self.operating_sys.get(name, None) @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From 07df40320331c118306c40c36deae8d57ca6073c Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 7 Apr 2016 14:37:00 -0700 Subject: Cleaned up the concretize_architecture method by removing commented out code --- lib/spack/spack/concretize.py | 62 ++++--------------------------------------- 1 file changed, 5 insertions(+), 57 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index c5dad93aef..14edcf1f3d 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -236,14 +236,6 @@ class DefaultConcretizer(object): return True #changed -# """ Future method for concretizing operating system """ -# if isinstance(arch.platform_os, spack.architecture.OperatingSystem): -# return False -# else: -# arch.arch_os = platform.operating_system('default_os') -# return True - - def _concretize_target(self, spec): if spec.architecture.target is not None: if isinstance(spec.architecture.target,spack.architecture.Target): @@ -258,16 +250,10 @@ class DefaultConcretizer(object): else: spec.add_target_from_string(spec.root.architecture.target) else: - spec.architecture.target = spec.architecture.platform.target('default') + spec.architecture.target = spec.architecture.platform.target('default_target') return True #changed -# if isinstance(arch.target, spack.architecture.Target): -# return False -# else: -# arch.target = platform.target('default') -# return True - def concretize_architecture(self, spec): """If the spec is empty provide the defaults of the platform. If the architecture is not a basestring, then check if either the platform, @@ -283,50 +269,12 @@ class DefaultConcretizer(object): # Set the architecture to all defaults spec.architecture = spack.architecture.Arch() return True - #If there is a target and it is a tuple and has both filled return - #False -# if isinstance(spec.architecture, basestring): -# spec.split_architecture_string(spec.architecture) - - ret = any(( - self._concretize_operating_system(spec), - self._concretize_target(spec))) - - - # Does not look pretty at all!!! -# if spec.root.architecture and \ -# not isinstance(spec.root.architecture, basestring): -# bool_flag = any(( -# self._concretize_platform(spec.root.architecture, platform), -# self._concretize_operating_system(spec.root.architecture, -# platform), -# self._concretize_target(spec.root.target, platform))) -# spec.architecture =spec.root.architecture -# return bool_flag -# else: -# spec.add_architecture_from_string(spec.root.architecture) - + + # Concretize the operating_system and target based of the spec + ret = any((self._concretize_operating_system(spec), + self._concretize_target(spec))) return ret - # if there is no target specified used the defaults - - #if spec.target is not None: - # if isinstance(spec.target,spack.architecture.Target): - # return False - # else: - # spec.add_target_from_string(spec.target) - # return True #changed - - #if spec.root.target: - # if isinstance(spec.root.target,spack.architecture.Target): - # spec.target = spec.root.target - # else: - # spec.add_target_from_string(spec.root.target) - #else: - # platform = spack.architecture.sys_type() - # spec.target = platform.target('default') - - #return True #changed def concretize_variants(self, spec): -- cgit v1.2.3-70-g09d2 From 0ad317213c0f32c125c7043b5e57aa678ba63f8f Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 7 Apr 2016 14:38:04 -0700 Subject: Changed architecture parser so that if user just enters in frontend or backend, then both the os and target will take those names. In the concretize method the frontend target/os and backend target/os will be picked to match each other --- lib/spack/spack/spec.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index fa2e9fd4c8..94d881da28 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -462,11 +462,10 @@ class Spec(object): """Called by the parser to set the architecture.""" if self.architecture: raise DuplicateArchitectureError( "Spec for '%s' cannot have two architectures." % self.name) - platform = spack.architecture.sys_type() if '-' in architecture: os, target = architecture.split('-') - else: - os = None + elif architecture == 'frontend' or architecture == 'backend': + os = architecture target = architecture self.architecture = spack.architecture.Arch(os, target) -- cgit v1.2.3-70-g09d2 From 7b777568ed27f2dc0f15283d0209541b65b47b24 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 7 Apr 2016 14:38:43 -0700 Subject: Added new concretization of architecture tests, test each combination of user input to make sure the correct os and target are chosen --- lib/spack/spack/test/architecture.py | 45 ++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 2274a9901d..1df1e3ffa2 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -6,7 +6,7 @@ import os import platform import spack from spack.architecture import * -import spack.spec +from spack.spec import * from spack.platforms.cray_xc import CrayXc from spack.platforms.linux import Linux from spack.platforms.bgq import Bgq @@ -17,7 +17,7 @@ class ArchitectureTest(unittest.TestCase): def test_dict_functions_for_architecture(self): arch = Arch() arch.platform_os = arch.platform.operating_system('default_os') - arch.target = arch.platform.target('default') + arch.target = arch.platform.target('default_target') d = arch.to_dict() @@ -55,3 +55,44 @@ class ArchitectureTest(unittest.TestCase): my_platform_class = Darwin() self.assertEqual(str(output_platform_class), str(my_platform_class)) + + def setUp(self): + self.platform = sys_type() + + def test_user_front_end_input(self): + """Test when user inputs just frontend that both the frontend target + and frontend operating system match + """ + frontend_os = self.platform.operating_system("frontend") + frontend_target = self.platform.target("frontend") + print frontend_os + print frontend_target + frontend_spec = Spec("zlib=frontend") + frontend_spec.concretize() + self.assertEqual(frontend_os, frontend_spec.architecture.platform_os) + self.assertEqual(frontend_target, frontend_spec.architecture.target) + + def test_user_back_end_input(self): + """Test when user inputs backend that both the backend target and + backend operating system match + """ + backend_os = self.platform.operating_system("backend") + backend_target = self.platform.target("backend") + print backend_os + print backend_target + backend_spec = Spec("zlib=backend") + backend_spec.concretize() + self.assertEqual(backend_os, backend_spec.architecture.platform_os) + self.assertEqual(backend_target, backend_spec.architecture.target) + + def test_user_defaults(self): + default_os = self.platform.operating_system("default_os") + default_target = self.platform.target("default_target") + + default_spec = Spec("zlib") # default is no args + default_spec.concretize() + self.assertEqual(default_os, default_spec.architecture.platform_os) + self.assertEqual(default_target, default_spec.architecture.target) + + def test_user_combination(self): + -- cgit v1.2.3-70-g09d2 From 7d19154e1852ad43af889505e19a36873d0e9c18 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:01:28 -0400 Subject: pkg-config: use the internal glib glib requires pkg-config itself, so on machines without pkg-config, there's a bootstrapping problem. --- var/spack/repos/builtin/packages/pkg-config/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py index 9964c6ce34..a803bc3f9b 100644 --- a/var/spack/repos/builtin/packages/pkg-config/package.py +++ b/var/spack/repos/builtin/packages/pkg-config/package.py @@ -10,7 +10,12 @@ class PkgConfig(Package): parallel = False def install(self, spec, prefix): - configure("--prefix=%s" %prefix, "--enable-shared") + configure("--prefix=%s" %prefix, + "--enable-shared", + "--with-internal-glib") # There's a bootstrapping problem here; + # glib uses pkg-config as well, so + # break the cycle by using the internal + # glib. make() make("install") -- cgit v1.2.3-70-g09d2 From 6c409d6b9238199370512ff8a8d30c6b2ff67769 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:03:05 -0400 Subject: py-matplotlib: depend on pkg-config On OS X, freetype isn't found by default, but pkg-config can. --- var/spack/repos/builtin/packages/py-matplotlib/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 45e77dd631..19194c942e 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -26,6 +26,7 @@ class PyMatplotlib(Package): depends_on('py-pbr') depends_on('py-funcsigs') + depends_on('pkg-config') depends_on('freetype') depends_on('qt', when='+gui') depends_on('bzip2') -- cgit v1.2.3-70-g09d2 From dcd6b1934808e3700a3d1fc71e261087d9e71ae7 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:03:36 -0400 Subject: py-setuptools: sort versions --- var/spack/repos/builtin/packages/py-setuptools/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index c6d9be1add..38158f4d27 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -5,11 +5,11 @@ class PySetuptools(Package): homepage = "https://pypi.python.org/pypi/setuptools" url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz" - version('11.3.1', '01f69212e019a2420c1693fb43593930') - version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') - version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') - version('19.2', '78353b1f80375ca5e088f4b4627ffe03') version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') + version('19.2', '78353b1f80375ca5e088f4b4627ffe03') + version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') + version('16.0', '0ace0b96233516fc5f7c857d086aa3ad') + version('11.3.1', '01f69212e019a2420c1693fb43593930') extends('python') -- cgit v1.2.3-70-g09d2 From 9eaf735bcdba9f3fd8a51219d0eebb61f8b2f166 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 12:03:45 -0400 Subject: py-setuptools: add 20.6.7 --- var/spack/repos/builtin/packages/py-setuptools/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 38158f4d27..bc3420a25e 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -5,6 +5,7 @@ class PySetuptools(Package): homepage = "https://pypi.python.org/pypi/setuptools" url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-11.3.tar.gz" + version('20.6.7', '45d6110f3ec14924e44c33411db64fe6') version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') version('19.2', '78353b1f80375ca5e088f4b4627ffe03') version('18.1', 'f72e87f34fbf07f299f6cb46256a0b06') -- cgit v1.2.3-70-g09d2 From 6ff6c805af2a4626e0611f3798eedd3a6f1b3e06 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 8 Apr 2016 10:28:30 -0700 Subject: Assigned self.front_os, and back_os to self.default. Helps with testing. If we're on a darwin or linux machine, chances are there is no back end or front end operating system, but rather than have those as None, I just assign them the default which is detected via python platform. --- lib/spack/spack/platforms/darwin.py | 4 ++++ lib/spack/spack/platforms/linux.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py index 4c3d38851f..7901f82d06 100644 --- a/lib/spack/spack/platforms/darwin.py +++ b/lib/spack/spack/platforms/darwin.py @@ -12,7 +12,11 @@ class Darwin(Platform): super(Darwin, self).__init__('darwin') self.add_target(self.default, Target(self.default)) mac_os = MacOsx() + self.default_os = mac_os.name + self.front_os = mac_os.name + self.back_os = mac_os.name + self.add_operating_system(mac_os.name, mac_os) @classmethod diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py index 3243a1dcdf..18050ac79e 100644 --- a/lib/spack/spack/platforms/linux.py +++ b/lib/spack/spack/platforms/linux.py @@ -13,6 +13,8 @@ class Linux(Platform): self.add_target(self.default, Target(self.default)) linux_dist = LinuxDistro() self.default_os = linux_dist.name + self.front_os = linux_dist.name + self.back_os = linux_dist.name self.add_operating_system(linux_dist.name, linux_dist) @classmethod -- cgit v1.2.3-70-g09d2 From 0d1a1b7526ce1c129bed352b175f33f2875b8b41 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 8 Apr 2016 10:29:37 -0700 Subject: Changed _set_architecture so if user inputs only the target, then os is None. This prevents the os being referenced before assignment error --- lib/spack/spack/spec.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 94d881da28..28cd6a0274 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -461,12 +461,17 @@ class Spec(object): def _set_architecture(self, architecture): """Called by the parser to set the architecture.""" if self.architecture: raise DuplicateArchitectureError( - "Spec for '%s' cannot have two architectures." % self.name) + "Spec for '%s' cannot have two architectures." % self.name) if '-' in architecture: os, target = architecture.split('-') + elif architecture == 'frontend' or architecture == 'backend': os = architecture target = architecture + else: + os = None + target = architecture + self.architecture = spack.architecture.Arch(os, target) -- cgit v1.2.3-70-g09d2 From 1af88be3712d1b6090a2dde5d7a68405f7372ca7 Mon Sep 17 00:00:00 2001 From: Matthew LeGendre Date: Fri, 8 Apr 2016 11:06:14 -0700 Subject: Spack was no longer using $TMPDIR for its stage area at LLNL. Spack's directory search was unnecessarily putting candidates that contained your username at the end of its search list. --- lib/spack/spack/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index aee11f061f..9108e1d0e3 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -136,9 +136,7 @@ for path in _tmp_candidates: # don't add a second username if it's already unique by user. if not _tmp_user in path: tmp_dirs.append(join_path(path, '%u', 'spack-stage')) - -for path in _tmp_candidates: - if not path in tmp_dirs: + else: tmp_dirs.append(join_path(path, 'spack-stage')) # Whether spack should allow installation of unsafe versions of -- cgit v1.2.3-70-g09d2 From 277efc1dfbb00117db65918ff22928d42e1194e2 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 8 Apr 2016 11:17:56 -0700 Subject: Added test that works on every type of combination the user could possibly enter for arch spec --- lib/spack/spack/test/architecture.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 1df1e3ffa2..1ca3e58831 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -65,8 +65,6 @@ class ArchitectureTest(unittest.TestCase): """ frontend_os = self.platform.operating_system("frontend") frontend_target = self.platform.target("frontend") - print frontend_os - print frontend_target frontend_spec = Spec("zlib=frontend") frontend_spec.concretize() self.assertEqual(frontend_os, frontend_spec.architecture.platform_os) @@ -78,8 +76,6 @@ class ArchitectureTest(unittest.TestCase): """ backend_os = self.platform.operating_system("backend") backend_target = self.platform.target("backend") - print backend_os - print backend_target backend_spec = Spec("zlib=backend") backend_spec.concretize() self.assertEqual(backend_os, backend_spec.architecture.platform_os) @@ -94,5 +90,24 @@ class ArchitectureTest(unittest.TestCase): self.assertEqual(default_os, default_spec.architecture.platform_os) self.assertEqual(default_target, default_spec.architecture.target) - def test_user_combination(self): + def test_user_input_combination(self): + os_list = self.platform.operating_sys.keys() + target_list = self.platform.targets.keys() + additional = ["fe", "be", "frontend", "backend"] + + os_list.extend(additional) + target_list.extend(additional) + combinations = itertools.product(os_list, target_list) + results = [] + for arch in combinations: + o,t = arch + arch_spec = "-".join(arch) + spec = Spec("zlib=%s" % arch_spec) + spec.concretize() + results.append(spec.architecture.platform_os == self.platform.operating_system(o)) + results.append(spec.architecture.target == self.platform.target(t)) + res = all(results) + print res + self.assertTrue(res) + -- cgit v1.2.3-70-g09d2 From 618b3f5f2d149fe3c20f90c0890748c8f3589afb Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 8 Apr 2016 11:18:30 -0700 Subject: Changed default to default_target so the tests can pass --- lib/spack/spack/test/spec_semantics.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 0b310488a9..84d8c0edd8 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -308,7 +308,7 @@ class SpecSematicsTest(MockPackagesTest): def test_constrain_target(self): platform = spack.architecture.sys_type() - target = platform.target('default').name + target = platform.target('default_target').name self.check_constrain('libelf='+target, 'libelf='+target, 'libelf='+target) self.check_constrain('libelf='+target, 'libelf', 'libelf='+target) @@ -339,7 +339,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf', '+debug') self.check_constrain_changed('libelf', '~debug') platform = spack.architecture.sys_type() - self.check_constrain_changed('libelf', '='+platform.target('default').name) + self.check_constrain_changed('libelf', '='+platform.target('default_target').name) def test_constrain_not_changed(self): @@ -351,8 +351,8 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf+debug', '+debug') self.check_constrain_not_changed('libelf~debug', '~debug') platform = spack.architecture.sys_type() - default = platform.target('default').name - self.check_constrain_not_changed('libelf='+default, '='+default) + default_target = platform.target('default_target').name + self.check_constrain_not_changed('libelf='+default_target, '='+default_target) self.check_constrain_not_changed('libelf^foo', 'libelf^foo') self.check_constrain_not_changed('libelf^foo^bar', 'libelf^foo^bar') @@ -365,8 +365,8 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf^foo', 'libelf^foo+debug') self.check_constrain_changed('libelf^foo', 'libelf^foo~debug') platform = spack.architecture.sys_type() - default = platform.target('default').name - self.check_constrain_changed('libelf^foo', 'libelf^foo='+default) + default_target = platform.target('default_target').name + self.check_constrain_changed('libelf^foo', 'libelf^foo='+default_target) def test_constrain_dependency_not_changed(self): @@ -377,6 +377,6 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf^foo+debug', 'libelf^foo+debug') self.check_constrain_not_changed('libelf^foo~debug', 'libelf^foo~debug') platform = spack.architecture.sys_type() - default = platform.target('default').name - self.check_constrain_not_changed('libelf^foo='+default, 'libelf^foo='+default) + default_target = platform.target('default_target').name + self.check_constrain_not_changed('libelf^foo='+default_target, 'libelf^foo='+default_target) -- cgit v1.2.3-70-g09d2 From f461b9972265df09e8ff9ac5c99a3f3d96783883 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 8 Apr 2016 14:31:40 -0400 Subject: Building OpenBLAS requires recent binutils --- var/spack/repos/builtin/packages/julia/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index b3a523bc45..75d13fda8f 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -20,6 +20,7 @@ class Julia(Package): # depends_on("pkg-config") # Combined build-time and run-time dependencies: + depends_on("binutils") depends_on("cmake @2.8:") depends_on("git") depends_on("openssl") -- cgit v1.2.3-70-g09d2 From 3a4aac0213f46ff233b6252be5db7c645501ab34 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 15:08:09 -0400 Subject: paraview: use the right cmake variables --- var/spack/repos/builtin/packages/paraview/package.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index c16054816c..888add3033 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -75,13 +75,13 @@ class Paraview(Package): cmake('..', '-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix, '-DBUILD_TESTING:BOOL=OFF', - '-DVTK_USER_SYSTEM_FREETYPE:BOOL=ON', - '-DVTK_USER_SYSTEM_HDF5:BOOL=ON', - '-DVTK_USER_SYSTEM_JPEG:BOOL=ON', - '-DVTK_USER_SYSTEM_LIBXML2:BOOL=ON', - '-DVTK_USER_SYSTEM_NETCDF:BOOL=ON', - '-DVTK_USER_SYSTEM_TIFF:BOOL=ON', - '-DVTK_USER_SYSTEM_ZLIB:BOOL=ON', + '-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON', + '-DVTK_USE_SYSTEM_HDF5:BOOL=ON', + '-DVTK_USE_SYSTEM_JPEG:BOOL=ON', + '-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON', + '-DVTK_USE_SYSTEM_NETCDF:BOOL=ON', + '-DVTK_USE_SYSTEM_TIFF:BOOL=ON', + '-DVTK_USE_SYSTEM_ZLIB:BOOL=ON', *feature_args) make() make('install') -- cgit v1.2.3-70-g09d2 From 6e56ba9f24df62ad205006a6b7bc13ae067a6623 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 15:08:29 -0400 Subject: paraview: use internal netcdf VTK needs to learn to cope with netcdf being split like this. --- var/spack/repos/builtin/packages/paraview/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 888add3033..13cd076286 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -33,7 +33,8 @@ class Paraview(Package): depends_on('libpng') depends_on('libtiff') depends_on('libxml2') - depends_on('netcdf') + #depends_on('netcdf') + #depends_on('netcdf-cxx') #depends_on('protobuf') # version mismatches? #depends_on('sqlite') # external version not supported depends_on('zlib') @@ -79,7 +80,7 @@ class Paraview(Package): '-DVTK_USE_SYSTEM_HDF5:BOOL=ON', '-DVTK_USE_SYSTEM_JPEG:BOOL=ON', '-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON', - '-DVTK_USE_SYSTEM_NETCDF:BOOL=ON', + '-DVTK_USE_SYSTEM_NETCDF:BOOL=OFF', '-DVTK_USE_SYSTEM_TIFF:BOOL=ON', '-DVTK_USE_SYSTEM_ZLIB:BOOL=ON', *feature_args) -- cgit v1.2.3-70-g09d2 From 20b9f34b5c650eefb23f4118bb52985c468a9098 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 8 Apr 2016 15:09:02 -0400 Subject: paraview: use internal hdf5 Spack's HDF5 is too new. Rather than forcing everything in a ParaView chain to use older HDF5, use the internal one until ParaView is patched properly. --- var/spack/repos/builtin/packages/paraview/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 13cd076286..60f8d3c243 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -27,8 +27,8 @@ class Paraview(Package): depends_on('bzip2') depends_on('freetype') - depends_on('hdf5+mpi', when='+mpi') - depends_on('hdf5~mpi', when='~mpi') + #depends_on('hdf5+mpi', when='+mpi') + #depends_on('hdf5~mpi', when='~mpi') depends_on('jpeg') depends_on('libpng') depends_on('libtiff') @@ -77,7 +77,7 @@ class Paraview(Package): '-DCMAKE_INSTALL_PREFIX:PATH=%s' % prefix, '-DBUILD_TESTING:BOOL=OFF', '-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON', - '-DVTK_USE_SYSTEM_HDF5:BOOL=ON', + '-DVTK_USE_SYSTEM_HDF5:BOOL=OFF', '-DVTK_USE_SYSTEM_JPEG:BOOL=ON', '-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON', '-DVTK_USE_SYSTEM_NETCDF:BOOL=OFF', -- cgit v1.2.3-70-g09d2 From 5bcd1e7ccd9ff6568c06a13998f2d552d1b37b60 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 8 Apr 2016 12:43:08 -0700 Subject: If we already have the name and the platform, then we should probably go ahead and concretize it in the constructor. Else leave it as None and concretize it later. --- lib/spack/spack/architecture.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index ca306b0484..e2c189980a 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -199,8 +199,13 @@ class Arch(object): def __init__(self, platform_os=None, target=None): self.platform = sys_type() + if platform_os: + platform_os = self.platform.operating_system(platform_os) self.platform_os = platform_os - self.target = target + if target: + target = self.platform.target(target) + self.target = target + @property def concrete(self): -- cgit v1.2.3-70-g09d2 From 01a36ab33341e2af91c6e6f5ca58efbeecfb6ec4 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 8 Apr 2016 12:44:27 -0700 Subject: Changed the logic of concretize. We don't have to worry about whether the part of the spec is a string since any string parsed is made into an object via the Arch constructor. Any dependencies will take the root arch spec as well --- lib/spack/spack/concretize.py | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 14edcf1f3d..3422e86ae8 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -220,39 +220,29 @@ class DefaultConcretizer(object): return True # Things changed def _concretize_operating_system(self, spec): - if spec.architecture.platform_os is not None: - if isinstance(spec.architecture.platform_os,spack.architecture.OperatingSystem): - return False - else: - spec.add_operating_system_from_string(spec.architecture.platform_os) - return True #changed + platform = spec.architecture.platform + if spec.architecture.platform_os is not None and isinstance( + spec.architecture.platform_os,spack.architecture.OperatingSystem): + return False + if spec.root.architecture and spec.root.architecture.platform_os: if isinstance(spec.root.architecture.platform_os,spack.architecture.OperatingSystem): spec.architecture.platform_os = spec.root.architecture.platform_os - else: - spec.add_operating_system_from_string(spec.root.architecture.platform_os) else: spec.architecture.platform_os = spec.architecture.platform.operating_system('default_os') - - return True #changed + return True #changed def _concretize_target(self, spec): - if spec.architecture.target is not None: - if isinstance(spec.architecture.target,spack.architecture.Target): - return False - else: - spec.add_target_from_string(spec.architecture.target) - return True #changed - + platform = spec.architecture.platform + if spec.architecture.target is not None and isinstance( + spec.architecture.target, spack.architecture.Target): + return False if spec.root.architecture and spec.root.architecture.target: if isinstance(spec.root.architecture.target,spack.architecture.Target): spec.architecture.target = spec.root.architecture.target - else: - spec.add_target_from_string(spec.root.architecture.target) else: spec.architecture.target = spec.architecture.platform.target('default_target') - - return True #changed + return True #changed def concretize_architecture(self, spec): """If the spec is empty provide the defaults of the platform. If the -- cgit v1.2.3-70-g09d2 From 3a281b239998133c7ed3fe03a54e44d643d0d0bd Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 8 Apr 2016 12:46:44 -0700 Subject: Commented out the add_x_from_string methods since we don't need to worry about it. Also, changed the way architecture is set. Todd wanted to have users be able to input just frontend and/or backend in the architecture spec. This will be able to parse those inputs. --- lib/spack/spack/spec.py | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 28cd6a0274..eee9318550 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -465,7 +465,7 @@ class Spec(object): if '-' in architecture: os, target = architecture.split('-') - elif architecture == 'frontend' or architecture == 'backend': + elif architecture in ['frontend','backend','fe','be']: os = architecture target = architecture else: @@ -1302,28 +1302,17 @@ class Spec(object): except SpecError: return parse_anonymous_spec(spec_like, self.name) - def _is_valid_platform(self, platform, platform_list): - if platform in platform_list: - return True - return False - - def _is_valid_target(self, target, platform): - return target in platform.targets - - def _is_valid_os(self, os_string, platform): - return os_string in platform.operating_sys - - def add_target_from_string(self, target): - if target is None: - self.architecture.target = self.architecture.platform.target('default_target') - else: - self.architecture.target = self.architecture.platform.target(target) - - def add_operating_system_from_string(self, os): - if os is None: - self.architecture.platform_os = self.architecture.platform.operating_system('default_os') - else: - self.architecture.platform_os = self.architecture.platform.operating_system(os) + #def add_target_from_string(self, target): + # if target is None: + # self.architecture.target = self.architecture.platform.target('default_target') + # else: + # self.architecture.target = self.architecture.platform.target(target) + + #def add_operating_system_from_string(self, os): + # if os is None: + # self.architecture.platform_os = self.architecture.platform.operating_system('default_os') + # else: + # self.architecture.platform_os = self.architecture.platform.operating_system(os) def satisfies(self, other, deps=True, strict=False): -- cgit v1.2.3-70-g09d2 From 6cffac79bd39443047d380eb46121a43a256737e Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 9 Apr 2016 11:21:29 +0200 Subject: openmpi : added a few variants --- .../repos/builtin/packages/openmpi/package.py | 53 ++++++++++++++-------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 9a127f1812..1b498eb49c 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -28,10 +28,20 @@ class Openmpi(Package): patch('configure.patch', when="@1.10.0:1.10.1") variant('psm', default=False, description='Build support for the PSM library.') + variant('psm2', default=False, description='Build support for the Intel PSM2 library.') variant('verbs', default=False, description='Build support for OpenFabrics verbs.') + variant('mxm', default=False, description='Build Mellanox Messaging support') - # TODO : variant support for other schedulers is missing + variant('thread_multiple', default=False, description='Enable MPI_THREAD_MULTIPLE support') + + # TODO : variant support for alps, loadleveler is missing variant('tm', default=False, description='Build TM (Torque, PBSPro, and compatible) support') + variant('slurm', default=False, description='Build SLURM scheduler component') + + variant('pmi', default=False, description='Build PMI support, optionally adding DIR to the search path') + variant('sqlite3', default=False, description='Build sqlite3 support') + + # TODO : support for CUDA is missing provides('mpi@:2.2', when='@1.6.5') provides('mpi@:3.0', when='@1.7.5:') @@ -48,27 +58,35 @@ class Openmpi(Package): spack_env.set('OMPI_FC', spack_fc) spack_env.set('OMPI_F77', spack_f77) + @property + def verbs(self): + # Up through version 1.6, this option was previously named --with-openib + if self.spec.satisfies('@:1.6'): + return 'openib' + # In version 1.7, it was renamed to be --with-verbs + elif self.spec.satisfies('@1.7:'): + return 'verbs' def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, "--with-hwloc=%s" % spec['hwloc'].prefix, "--enable-shared", "--enable-static"] - - # Variants - if '+tm' in spec: - config_args.append("--with-tm") # necessary for Torque support - - if '+psm' in spec: - config_args.append("--with-psm") - - if '+verbs' in spec: - # Up through version 1.6, this option was previously named --with-openib - if spec.satisfies('@:1.6'): - config_args.append("--with-openib") - # In version 1.7, it was renamed to be --with-verbs - elif spec.satisfies('@1.7:'): - config_args.append("--with-verbs") + # Variant based arguments + config_args.extend([ + # Schedulers + '--with-tm' if '+tm' in spec else '--without-tm', + '--with-slurm' if '+slurm' in spec else '--without-slurm', + # Fabrics + '--with-psm' if '+psm' in spec else '--without-psm', + '--with-psm2' if '+psm2' in spec else '--without-psm2', + ('--with-%s' % self.verbs) if '+verbs' in spec else ('--without-%s' % self.verbs), + '--with-mxm' if '+mxm' in spec else '--without-mxm', + # Other options + '--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple', + '--with-pmi' if '+pmi' in spec else '--without-pmi', + '--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3' + ]) # TODO: use variants for this, e.g. +lanl, +llnl, etc. # use this for LANL builds, but for LLNL builds, we need: @@ -76,9 +94,6 @@ class Openmpi(Package): if self.version == ver("1.6.5") and '+lanl' in spec: config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") - # TODO: Spack should make it so that you can't actually find - # these compilers if they're "disabled" for the current - # compiler configuration. if not self.compiler.f77 and not self.compiler.fc: config_args.append("--enable-mpi-fortran=no") -- cgit v1.2.3-70-g09d2 From df7e3f8635530574c5190d9501f2fdf1b0aa0aff Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 9 Apr 2016 09:58:48 -0400 Subject: Correct version dependency for OpenBLAS patch --- var/spack/repos/builtin/packages/julia/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 75d13fda8f..25d782266b 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -11,8 +11,8 @@ class Julia(Package): version('0.4.5', '69141ff5aa6cee7c0ec8c85a34aa49a6') version('0.4.3', '8a4a59fd335b05090dd1ebefbbe5aaac') - patch('gc.patch', when='@:0.5') - patch('openblas.patch') + patch('gc.patch') + patch('openblas.patch', when='@0.4:0.4.5') # Build-time dependencies: # depends_on("awk") -- cgit v1.2.3-70-g09d2 From a5a5dbc4081ca13f579dce111394fe77d2c54a53 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sun, 10 Apr 2016 13:21:41 +0200 Subject: tcl module file : added new-lines in autoload (per @glennpj bug report) --- lib/spack/spack/modules.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 747c0d3be5..291dd775c5 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -372,10 +372,10 @@ class TclModule(EnvModule): UnsetEnv: 'unsetenv {name}\n' } - autoload_format = ('if ![ is-loaded {module_file} ] {{' - ' puts stderr "Autoloading {module_file}"' - ' module load {module_file}' - '}}') + autoload_format = ('if ![ is-loaded {module_file} ] {{\n' + ' puts stderr "Autoloading {module_file}"\n' + ' module load {module_file}\n' + '}}\n') prerequisite_format = 'prereq {module_file}\n' -- cgit v1.2.3-70-g09d2 From 0e2b1359e32e2948dc3ef831b83ae34483909fd0 Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 11 Apr 2016 11:01:47 +0200 Subject: modules : fixed bug preventing the creation of modulefiles autoloading only direct dependencies --- lib/spack/spack/config.py | 16 +++++++--------- lib/spack/spack/modules.py | 6 +++--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 6b5b3dfd62..e696a62e96 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -117,22 +117,20 @@ Will make Spack take compilers *only* from the user configuration, and the site configuration will be ignored. """ +import copy import os import re import sys -import copy -import jsonschema -from jsonschema import Draft4Validator, validators -import yaml -from yaml.error import MarkedYAMLError -from ordereddict_backport import OrderedDict +import jsonschema import llnl.util.tty as tty -from llnl.util.filesystem import mkdirp -import copy - import spack +import yaml +from jsonschema import Draft4Validator, validators +from llnl.util.filesystem import mkdirp +from ordereddict_backport import OrderedDict from spack.error import SpackError +from yaml.error import MarkedYAMLError # Hacked yaml for configuration files preserves line numbers. import spack.util.spack_yaml as syaml diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 291dd775c5..8a96d49144 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -114,14 +114,14 @@ def inspect_path(prefix): return env -def dependencies(spec, request='All'): - if request == 'None': +def dependencies(spec, request='all'): + if request == 'none': return [] l = [xx for xx in sorted(spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] - if request == 'Direct': + if request == 'direct': return [xx for ii, xx in l if ii == 1] # FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes' -- cgit v1.2.3-70-g09d2 From 3959ca627046ff7d6519da9c5375a0ae6da50b74 Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 11 Apr 2016 18:10:06 +0200 Subject: modules : added possibility to blacklist or whitelist module files --- lib/spack/spack/cmd/module.py | 1 - lib/spack/spack/config.py | 17 +++++++++++------ lib/spack/spack/modules.py | 32 +++++++++++++++++++++++++++++--- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index a67f5c0c13..f996f4eb84 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -89,7 +89,6 @@ def module_refresh(): shutil.rmtree(cls.path, ignore_errors=False) mkdirp(cls.path) for spec in specs: - tty.debug(" Writing file for %s" % spec) cls(spec).write() diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index e696a62e96..da4e787f18 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -292,12 +292,17 @@ section_schemas = { 'module_type_configuration': { 'type': 'object', 'default': {}, - 'properties': { - 'all': {'$ref': '#/definitions/module_file_configuration'} - }, - 'patternProperties': { - r'\w[\w-]*': {'$ref': '#/definitions/module_file_configuration'} - } + 'oneOf': [ + { + 'properties': { + 'whitelist': {'$ref': '#/definitions/array_of_strings'}, + 'blacklist': {'$ref': '#/definitions/array_of_strings'}, + } + }, + { + 'patternProperties': {r'\w[\w-]*': {'$ref': '#/definitions/module_file_configuration'}} + } + ] } }, 'patternProperties': { diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 8a96d49144..04f43b9605 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -40,17 +40,15 @@ various shell-support files in $SPACK/share/spack/setup-env.*. Each hook in hooks/ implements the logic for writing its specific type of module file. """ +import copy import os import os.path import re -import shutil import textwrap -import copy import llnl.util.tty as tty import spack import spack.config - from llnl.util.filesystem import join_path, mkdirp from spack.build_environment import parent_class_modules, set_module_variables_for_package from spack.environment import * @@ -225,6 +223,30 @@ class EnvModule(object): # Not very descriptive fallback return 'spack installed package' + @property + def blacklisted(self): + configuration = CONFIGURATION.get(self.name, {}) + whitelist_matches = [x for x in configuration.get('whitelist', []) if self.spec.satisfies(x)] + blacklist_matches = [x for x in configuration.get('blacklist', []) if self.spec.satisfies(x)] + if whitelist_matches: + message = '\t%s is whitelisted [matches : ' % self.spec.cshort_spec + for rule in whitelist_matches: + message += '%s ' % rule + message += ' ]' + tty.debug(message) + + if blacklist_matches: + message = '\t%s is blacklisted [matches : ' % self.spec.cshort_spec + for rule in blacklist_matches: + message += '%s ' % rule + message += ' ]' + tty.debug(message) + + if not whitelist_matches and blacklist_matches: + return True + + return False + def write(self): """ Writes out a module file for this object. @@ -233,6 +255,10 @@ class EnvModule(object): - override the header property - provide formats for autoload, prerequisites and environment changes """ + if self.blacklisted: + return + tty.debug("\t%s : writing module file" % self.spec.cshort_spec) + module_dir = os.path.dirname(self.file_name) if not os.path.exists(module_dir): mkdirp(module_dir) -- cgit v1.2.3-70-g09d2 From cb6c6fb3747aafbfb0fe81803eacf2807dde301f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 11 Apr 2016 16:28:30 -0500 Subject: Add elk package --- var/spack/repos/builtin/packages/elk/package.py | 116 +++++++++++++++++++++ var/spack/repos/builtin/packages/libxc/package.py | 18 ++++ .../repos/builtin/packages/openblas/package.py | 6 ++ 3 files changed, 140 insertions(+) create mode 100644 var/spack/repos/builtin/packages/elk/package.py create mode 100644 var/spack/repos/builtin/packages/libxc/package.py diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py new file mode 100644 index 0000000000..28ebb89db3 --- /dev/null +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -0,0 +1,116 @@ +from spack import * +import spack + +class Elk(Package): + '''An all-electron full-potential linearised augmented-plane wave + (FP-LAPW) code with many advanced features.''' + + homepage = 'http://elk.sourceforge.net/' + url = 'https://sourceforge.net/projects/elk/files/elk-3.3.17.tgz' + + version('3.3.17', 'f57f6230d14f3b3b558e5c71f62f0592') + + # Elk provides these libraries, but allows you to specify your own + variant('blas', default=True, description='Build with custom BLAS library') + variant('lapack', default=True, description='Build with custom LAPACK library') + variant('fft', default=True, description='Build with custom FFT library') + + # Elk does not provide these libraries, but allows you to use them + variant('mpi', default=True, description='Enable MPI parallelism') + variant('openmp', default=True, description='Enable OpenMP support') + variant('libxc', default=True, description='Link to Libxc functional library') + + depends_on('blas', when='+blas') + depends_on('lapack', when='+lapack') + depends_on('fftw', when='+fft') + depends_on('mpi', when='+mpi') + depends_on('libxc', when='+libxc') + + # Cannot be built in parallel + parallel = False + + + def configure(self, spec): + # Dictionary of configuration options + config = { + 'MAKE': 'make', + 'F90': join_path(spack.build_env_path, 'f90'), + 'F77': join_path(spack.build_env_path, 'f77'), + 'AR': 'ar', + 'LIB_FFT': 'fftlib.a', + 'SRC_MPI': 'mpi_stub.f90', + 'SRC_OMP': 'omp_stub.f90', + 'SRC_libxc': 'libxcifc_stub.f90', + 'SRC_FFT': 'zfftifc.f90' + } + + # Compiler-specific flags + flags = '' + if self.compiler.name == 'intel': + flags = '-O3 -ip -unroll -no-prec-div -openmp' + elif self.compiler.name == 'gcc': + flags = '-O3 -ffast-math -funroll-loops -fopenmp' + elif self.compiler.name == 'pgi': + flags = '-O3 -mp -lpthread' + elif self.compiler.name == 'g95': + flags = '-O3 -fno-second-underscore' + elif self.compiler.name == 'nag': + flags = '-O4 -kind=byte -dusty -dcfuns' + elif self.compiler.name == 'xl': + flags = '-O3 -qsmp=omp' + config['F90_OPTS'] = flags + config['F77_OPTS'] = flags + + # BLAS/LAPACK support + blas = 'blas.a' + lapack = 'lapack.a' + if '+blas' in spec: + blas = join_path(spec['blas'].prefix.lib, 'libblas.so') + if '+lapack' in spec: + lapack = join_path(spec['lapack'].prefix.lib, 'liblapack.so') + config['LIB_LPK'] = ' '.join([lapack, blas]) # lapack must come before blas + + # FFT support + if '+fft' in spec: + config['LIB_FFT'] = join_path(spec['fftw'].prefix.lib, 'libfftw3.so') + config['SRC_FFT'] = 'zfftifc_fftw.f90' + + # MPI support + if '+mpi' in spec: + config.pop('SRC_MPI') + config['F90'] = join_path(spec['mpi'].prefix.bin, 'mpif90') + config['F77'] = join_path(spec['mpi'].prefix.bin, 'mpif77') + + # OpenMP support + if '+openmp' in spec: + config.pop('SRC_OMP') + + # Libxc support + if '+libxc' in spec: + config['LIB_libxc'] = ' '.join([ + join_path(spec['libxc'].prefix.lib, 'libxcf90.so'), + join_path(spec['libxc'].prefix.lib, 'libxc.so') + ]) + config['SRC_libxc'] = ' '.join([ + 'libxc_funcs.f90', + 'libxc.f90', + 'libxcifc.f90' + ]) + + # Write configuration options to include file + with open('make.inc', 'w') as inc: + for key in config: + inc.write('{0} = {1}\n'.format(key, config[key])) + + + def install(self, spec, prefix): + self.configure(spec) + + make() + make('test') + + mkdirp(prefix.bin) + + install('src/elk', prefix.bin) + install('src/eos/eos', prefix.bin) + install('src/spacegroup/spacegroup', prefix.bin) diff --git a/var/spack/repos/builtin/packages/libxc/package.py b/var/spack/repos/builtin/packages/libxc/package.py new file mode 100644 index 0000000000..010a5918c5 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxc/package.py @@ -0,0 +1,18 @@ +from spack import * + +class Libxc(Package): + """Libxc is a library of exchange-correlation functionals for + density-functional theory.""" + + homepage = "http://www.tddft.org/programs/octopus/wiki/index.php/Libxc" + url = "http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-2.2.2.tar.gz" + + version('2.2.2', 'd9f90a0d6e36df6c1312b6422280f2ec') + + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, + '--enable-shared') + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 9f13d0690b..4522130ccc 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -12,6 +12,7 @@ class Openblas(Package): version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') variant('shared', default=True, description="Build shared libraries as well as static libs.") + variant('openmp', default=True, description="Enable OpenMP support.") # virtual dependency provides('blas') @@ -37,6 +38,11 @@ class Openblas(Package): if spec.satisfies('@0.2.16'): make_defs += ['BUILD_LAPACK_DEPRECATED=1'] + # Add support for OpenMP + # Note: Make sure your compiler supports OpenMP + if '+openmp' in spec: + make_defs += ['USE_OPENMP=1'] + make_args = make_defs + make_targets make(*make_args) -- cgit v1.2.3-70-g09d2 From 41f365112c07dc6e144da92611018ee1fe6bf30b Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 12 Apr 2016 09:13:50 +0200 Subject: modules : added provenance comment in tcl header --- lib/spack/spack/modules.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 04f43b9605..0f921d7bf2 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -45,6 +45,7 @@ import os import os.path import re import textwrap +import datetime import llnl.util.tty as tty import spack @@ -401,7 +402,7 @@ class TclModule(EnvModule): autoload_format = ('if ![ is-loaded {module_file} ] {{\n' ' puts stderr "Autoloading {module_file}"\n' ' module load {module_file}\n' - '}}\n') + '}}\n\n') prerequisite_format = 'prereq {module_file}\n' @@ -420,6 +421,12 @@ class TclModule(EnvModule): def header(self): # TCL Modulefile header header = '#%Module1.0\n' + header += '## Module file created by spack (https://github.com/LLNL/spack)' + header += ' on %s\n' % datetime.datetime.now() + header += '##\n' + header += '## %s\n' % self.spec.short_spec + header += '##\n' + # TODO : category ? # Short description if self.short_description: -- cgit v1.2.3-70-g09d2 From 80678b2188acb30638e33b86a894d133ce4b4796 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 12 Apr 2016 16:54:51 +0200 Subject: fix : proper update of config file (before it was discarding architectures that were not the current one) fixes #774 --- bin/spack | 2 +- lib/spack/spack/cmd/compiler.py | 13 ++++++------- lib/spack/spack/config.py | 10 ++++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/bin/spack b/bin/spack index 31165bba9d..f51cb8a4ec 100755 --- a/bin/spack +++ b/bin/spack @@ -152,7 +152,7 @@ def main(): command = spack.cmd.get_command(args.command) try: return_val = command(parser, args) - except SpackError, e: + except SpackError as e: e.die() except KeyboardInterrupt: sys.stderr.write('\n') diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 3e58e82184..786b3b8eb4 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -22,19 +22,18 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -import sys import argparse +import sys import llnl.util.tty as tty -from llnl.util.tty.color import colorize -from llnl.util.tty.colify import colify -from llnl.util.lang import index_by - import spack.compilers -import spack.spec import spack.config -from spack.util.environment import get_path +import spack.spec +from llnl.util.lang import index_by +from llnl.util.tty.colify import colify +from llnl.util.tty.color import colorize from spack.spec import CompilerSpec +from spack.util.environment import get_path description = "Manage compilers" diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 14e5aaf4fb..336d47cbb7 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -539,14 +539,16 @@ def update_config(section, update_data, scope=None): other yaml-ish structure. """ + validate_section_name(section) # validate section name + scope = validate_scope(scope) # get ConfigScope object from string. + # read in the config to ensure we've got current data - get_config(section) + configuration = get_config(section) - validate_section_name(section) # validate section name - scope = validate_scope(scope) # get ConfigScope object from string. + configuration.update(update_data) # read only the requested section's data. - scope.sections[section] = { section : update_data } + scope.sections[section] = {section: configuration} scope.write_section(section) -- cgit v1.2.3-70-g09d2 From 27280ea8be8e108b8d128ab518d4562ec0368684 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 12 Apr 2016 17:21:54 +0200 Subject: fix : added regression tests --- lib/spack/spack/test/config.py | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index 0562d2d620..3977f0e7d4 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -33,7 +33,7 @@ from spack.test.mock_packages_test import * # Some sample compiler config data a_comps = { - "all": { + "x86_64_E5v2_IntelIB": { "gcc@4.7.3" : { "cc" : "/gcc473", "cxx": "/g++473", @@ -53,7 +53,7 @@ a_comps = { } b_comps = { - "all": { + "x86_64_E5v3": { "icc@10.0" : { "cc" : "/icc100", "cxx": "/icc100", @@ -85,27 +85,24 @@ class ConfigTest(MockPackagesTest): super(ConfigTest, self).tearDown() shutil.rmtree(self.tmp_dir, True) - - def check_config(self, comps, *compiler_names): + def check_config(self, comps, arch, *compiler_names): """Check that named compilers in comps match Spack's config.""" config = spack.config.get_config('compilers') compiler_list = ['cc', 'cxx', 'f77', 'fc'] for key in compiler_names: for c in compiler_list: - expected = comps['all'][key][c] - actual = config['all'][key][c] + expected = comps[arch][key][c] + actual = config[arch][key][c] self.assertEqual(expected, actual) - def test_write_key_in_memory(self): # Write b_comps "on top of" a_comps. spack.config.update_config('compilers', a_comps, 'test_low_priority') spack.config.update_config('compilers', b_comps, 'test_high_priority') # Make sure the config looks how we expect. - self.check_config(a_comps, 'gcc@4.7.3', 'gcc@4.5.0') - self.check_config(b_comps, 'icc@10.0', 'icc@11.1', 'clang@3.3') - + self.check_config(a_comps, 'x86_64_E5v2_IntelIB', 'gcc@4.7.3', 'gcc@4.5.0') + self.check_config(b_comps, 'x86_64_E5v3', 'icc@10.0', 'icc@11.1', 'clang@3.3') def test_write_key_to_disk(self): # Write b_comps "on top of" a_comps. @@ -116,5 +113,17 @@ class ConfigTest(MockPackagesTest): spack.config.clear_config_caches() # Same check again, to ensure consistency. - self.check_config(a_comps, 'gcc@4.7.3', 'gcc@4.5.0') - self.check_config(b_comps, 'icc@10.0', 'icc@11.1', 'clang@3.3') + self.check_config(a_comps, 'x86_64_E5v2_IntelIB', 'gcc@4.7.3', 'gcc@4.5.0') + self.check_config(b_comps, 'x86_64_E5v3', 'icc@10.0', 'icc@11.1', 'clang@3.3') + + def test_write_to_same_priority_file(self): + # Write b_comps in the same file as a_comps. + spack.config.update_config('compilers', a_comps, 'test_low_priority') + spack.config.update_config('compilers', b_comps, 'test_low_priority') + + # Clear caches so we're forced to read from disk. + spack.config.clear_config_caches() + + # Same check again, to ensure consistency. + self.check_config(a_comps, 'x86_64_E5v2_IntelIB', 'gcc@4.7.3', 'gcc@4.5.0') + self.check_config(b_comps, 'x86_64_E5v3', 'icc@10.0', 'icc@11.1', 'clang@3.3') -- cgit v1.2.3-70-g09d2 From 01f2dd03d5fe092ae448ee1a234a197babf38613 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 12 Apr 2016 16:51:27 -0500 Subject: Also install examples directory --- var/spack/repos/builtin/packages/elk/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py index 28ebb89db3..780c41f726 100644 --- a/var/spack/repos/builtin/packages/elk/package.py +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -104,13 +104,18 @@ class Elk(Package): def install(self, spec, prefix): + # Elk only provides an interactive setup script self.configure(spec) make() make('test') + # The Elk Makefile does not provide an install target mkdirp(prefix.bin) install('src/elk', prefix.bin) install('src/eos/eos', prefix.bin) install('src/spacegroup/spacegroup', prefix.bin) + + install_tree('examples', join_path(prefix, 'examples')) + -- cgit v1.2.3-70-g09d2 From abe744c5a099fd988ff3fe5eb1d50cca7a633d74 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 12 Apr 2016 16:53:45 -0500 Subject: Add latest version of PnetCDF --- var/spack/repos/builtin/packages/parallel-netcdf/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py index 62a8f7ca0b..e6f8cf026b 100644 --- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -8,6 +8,7 @@ class ParallelNetcdf(Package): homepage = "https://trac.mcs.anl.gov/projects/parallel-netcdf" url = "http://cucis.ece.northwestern.edu/projects/PnetCDF/Release/parallel-netcdf-1.6.1.tar.gz" + version('1.7.0', '267eab7b6f9dc78c4d0e6def2def3aea4bc7c9f0') version('1.6.1', '62a094eb952f9d1e15f07d56e535052604f1ac34') depends_on("m4") -- cgit v1.2.3-70-g09d2 From 04392babca88089de114864cbe5ad419f6fc212b Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Tue, 12 Apr 2016 15:53:29 -0700 Subject: add setuptools version 20.7.0 --- var/spack/repos/builtin/packages/py-setuptools/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 9338a5e157..2086d0b3fb 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -11,6 +11,7 @@ class PySetuptools(Package): version('19.2', '78353b1f80375ca5e088f4b4627ffe03') version('20.5', 'fadc1e1123ddbe31006e5e43e927362b') version('20.6.7', '45d6110f3ec14924e44c33411db64fe6') + version('20.7.0', '5d12b39bf3e75e80fdce54e44b255615') extends('python') -- cgit v1.2.3-70-g09d2 From c422ce7c1d85e4f934e0ce6e2ffd90d742723a15 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 13 Apr 2016 11:26:22 +0200 Subject: modules : added doc strings, fixed minor style issues, filtered from dependencies blacklisted modules --- lib/spack/spack/config.py | 2 +- lib/spack/spack/modules.py | 85 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 68 insertions(+), 19 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index da4e787f18..cf3b885ae6 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -488,7 +488,7 @@ def _read_config_file(filename, schema): elif not os.path.isfile(filename): raise ConfigFileError( - "Invlaid configuration. %s exists but is not a file." % filename) + "Invalid configuration. %s exists but is not a file." % filename) elif not os.access(filename, os.R_OK): raise ConfigFileError("Config file is not readable: %s" % filename) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 0f921d7bf2..2ec20afa69 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -63,8 +63,9 @@ CONFIGURATION = spack.config.get_config('modules') def print_help(): - """For use by commands to tell user how to activate shell support.""" - + """ + For use by commands to tell user how to activate shell support. + """ tty.msg("This command requires spack's shell integration.", "", "To initialize spack's shell commands, you must run one of", @@ -114,6 +115,20 @@ def inspect_path(prefix): def dependencies(spec, request='all'): + """ + Returns the list of dependent specs for a given spec, according to the given request + + Args: + spec: target spec + request: either 'none', 'direct' or 'all' + + Returns: + empty list if 'none', direct dependency list if 'direct', all dependencies if 'all' + """ + if request not in ('none', 'direct', 'all'): + raise tty.error("Wrong value for argument 'request' : should be one of ('none', 'direct', 'all') " + " [current value is '%s']" % request) + if request == 'none': return [] @@ -132,6 +147,18 @@ def dependencies(spec, request='all'): def parse_config_options(module_generator): + """ + Parse the configuration file and returns a bunch of items that will be needed during module file generation + + Args: + module_generator: module generator for a given spec + + Returns: + autoloads: list of specs to be autoloaded + prerequisites: list of specs to be marked as prerequisite + filters: list of environment variables whose modification is blacklisted in module files + env: list of custom environment modifications to be applied in the module file + """ autoloads, prerequisites, filters = [], [], [] env = EnvironmentModifications() # Get the configuration for this kind of generator @@ -160,15 +187,20 @@ def parse_config_options(module_generator): def update_single(spec, configuration, autoloads, prerequisites, filters, env): + """ + Updates the entries in the arguments according to the configuration + + Args: + spec: [in] target spec + configuration: [in] configuration file for the current type of module file generator + autoloads: [inout] list of dependencies to be automatically loaded + prerequisites: [inout] list of prerequisites + filters: [inout] list of environment variables whose modification is to be blacklisted + env: [inout] list of modifications to the environment + """ # Get list of modules that will be loaded automatically - try: - autoloads.extend(dependencies(spec, configuration['autoload'])) - except KeyError: - pass - try: - prerequisites.extend(dependencies(spec, configuration['prerequisites'])) - except KeyError: - pass + autoloads.extend(dependencies(spec, configuration.get('autoload', 'none'))) + prerequisites.extend(dependencies(spec, configuration.get('prerequisites', 'none'))) # Filter modifications to environment variables try: @@ -188,6 +220,24 @@ def update_single(spec, configuration, autoloads, prerequisites, filters, env): pass +def filter_blacklisted(specs, module_name): + """ + Given a sequence of specs, filters the ones that are blacklisted in the module configuration file. + + Args: + specs: sequence of spec instances + module_name: type of module file objects + + Yields: + non blacklisted specs + """ + for x in specs: + if module_types[module_name](x).blacklisted: + tty.debug('\tFILTER : %s' % x) + continue + yield x + + class EnvModule(object): name = 'env_module' formats = {} @@ -230,14 +280,14 @@ class EnvModule(object): whitelist_matches = [x for x in configuration.get('whitelist', []) if self.spec.satisfies(x)] blacklist_matches = [x for x in configuration.get('blacklist', []) if self.spec.satisfies(x)] if whitelist_matches: - message = '\t%s is whitelisted [matches : ' % self.spec.cshort_spec + message = '\tWHITELIST : %s [matches : ' % self.spec.cshort_spec for rule in whitelist_matches: message += '%s ' % rule message += ' ]' tty.debug(message) if blacklist_matches: - message = '\t%s is blacklisted [matches : ' % self.spec.cshort_spec + message = '\tBLACKLIST : %s [matches : ' % self.spec.cshort_spec for rule in blacklist_matches: message += '%s ' % rule message += ' ]' @@ -258,7 +308,7 @@ class EnvModule(object): """ if self.blacklisted: return - tty.debug("\t%s : writing module file" % self.spec.cshort_spec) + tty.debug("\tWRITE : %s [%s]" % (self.spec.cshort_spec, self.file_name)) module_dir = os.path.dirname(self.file_name) if not os.path.exists(module_dir): @@ -273,7 +323,7 @@ class EnvModule(object): spack_env = EnvironmentModifications() # TODO : the code down below is quite similar to build_environment.setup_package and needs to be # TODO : factored out to a single place - for item in dependencies(self.spec, 'All'): + for item in dependencies(self.spec, 'all'): package = self.spec[item.name].package modules = parent_class_modules(package.__class__) for mod in modules: @@ -292,9 +342,9 @@ class EnvModule(object): # Build up the module file content module_file_content = self.header - for x in autoloads: + for x in filter_blacklisted(autoloads, self.name): module_file_content += self.autoload(x) - for x in prerequisites: + for x in filter_blacklisted(prerequisites, self.name): module_file_content += self.prerequisite(x) for line in self.process_environment_command(filter_environment_blacklist(env, filters)): module_file_content += line @@ -421,8 +471,7 @@ class TclModule(EnvModule): def header(self): # TCL Modulefile header header = '#%Module1.0\n' - header += '## Module file created by spack (https://github.com/LLNL/spack)' - header += ' on %s\n' % datetime.datetime.now() + header += '## Module file created by spack (https://github.com/LLNL/spack) on %s\n' % datetime.datetime.now() header += '##\n' header += '## %s\n' % self.spec.short_spec header += '##\n' -- cgit v1.2.3-70-g09d2 From 1b4c4be151650f28e0e7d796cbfe85d05ea91f49 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 13 Apr 2016 12:44:51 +0200 Subject: modules : category is a single word (as I am not sure how dotkit will react to spaces) --- lib/spack/spack/modules.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 2ec20afa69..2c68c0c170 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -270,9 +270,9 @@ class EnvModule(object): return self.pkg.category # Extensions for extendee in self.pkg.extendees: - return '{extendee} extension'.format(extendee=extendee) + return '{extendee}_extension'.format(extendee=extendee) # Not very descriptive fallback - return 'spack installed package' + return 'spack' @property def blacklisted(self): @@ -404,7 +404,7 @@ class Dotkit(EnvModule): SetEnv: 'dk_setenv {name} {value}\n' } - autoload_format = 'dk_op {module_file}\n' # TODO : Check this line + autoload_format = 'dk_op {module_file}\n' prerequisite_format = None # TODO : does something like prerequisite exist for dotkit? -- cgit v1.2.3-70-g09d2 From 5717cb981e38979727a9340eb118e88166a9f7e3 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 13 Apr 2016 15:03:03 -0500 Subject: fortran2003 option has been removed from HDF5 --- var/spack/repos/builtin/packages/hdf5/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index f26e225b83..cce609eb29 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -101,10 +101,10 @@ class Hdf5(Package): extra_args.append('--enable-cxx') if '+fortran' in spec: - extra_args.extend([ - '--enable-fortran', - '--enable-fortran2003' - ]) + extra_args.append('--enable-fortran') + # '--enable-fortran2003' no longer exists as of version 1.10.0 + if spec.satisfies('@:1.8.16'): + extra_args.append('--enable-fortran2003') if '+mpi' in spec: # The HDF5 configure script warns if cxx and mpi are enabled -- cgit v1.2.3-70-g09d2 From 2cf9ebc62c18414ddafb44bdda2b2487f72a4ec5 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Wed, 13 Apr 2016 15:00:45 -0700 Subject: Fix compile issues with new libpng versions and qt3 builds by using an older version of libpng. In libpng, make older versions available. --- var/spack/repos/builtin/packages/libpng/package.py | 3 +++ var/spack/repos/builtin/packages/qt/package.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py index 73c8c62341..9d5782896e 100644 --- a/var/spack/repos/builtin/packages/libpng/package.py +++ b/var/spack/repos/builtin/packages/libpng/package.py @@ -8,6 +8,9 @@ class Libpng(Package): version('1.6.16', '1a4ad377919ab15b54f6cb6a3ae2622d') version('1.6.15', '829a256f3de9307731d4f52dc071916d') version('1.6.14', '2101b3de1d5f348925990f9aa8405660') + version('1.5.26', '3ca98347a5541a2dad55cd6d07ee60a9') + version('1.4.19', '89bcbc4fc8b31f4a403906cf4f662330') + version('1.2.56', '9508fc59d10a1ffadd9aae35116c19ee') depends_on('zlib') diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 8cb88e6c85..93688fb777 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -29,7 +29,8 @@ class Qt(Package): depends_on("zlib") depends_on("dbus", when='@4:') depends_on("libtiff") - depends_on("libpng") + depends_on("libpng@1.2.56", when='@3') + depends_on("libpng", when='@4:') depends_on("libmng") depends_on("jpeg") @@ -120,6 +121,8 @@ class Qt(Package): @when('@3') def configure(self): + # An user report that this was necessary to link Qt3 on ubuntu + os.environ['LD_LIBRARY_PATH'] = os.getcwd()+'/lib' configure('-prefix', self.prefix, '-v', '-thread', -- cgit v1.2.3-70-g09d2 From f9aafeee1e6a33a76dc1904e97f117194915f4d0 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Wed, 13 Apr 2016 21:58:57 -0700 Subject: Loosen the boost requirement from a specific version that was specified in my initial commit. --- var/spack/repos/builtin/packages/mrnet/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index b8cbb7e8f9..a3abb71285 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -15,13 +15,10 @@ class Mrnet(Package): variant('krellpatch', default=False, description="Build MRNet with krell openspeedshop based patch.") patch('krell-5.0.1.patch', when='@5.0.1+krellpatch') - - variant('lwthreads', default=False, description="Also build the MRNet LW threadsafe libraries") parallel = False - #depends_on("boost") - depends_on("boost@1.53.0") + depends_on("boost") def install(self, spec, prefix): # Build the MRNet LW thread safe libraries when the krelloptions variant is present -- cgit v1.2.3-70-g09d2 From 01fab24c156e82f2886b464a2474fe3474d5312a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 13 Apr 2016 14:02:25 +0200 Subject: binutils depends on flex, bison, and m4 --- var/spack/repos/builtin/packages/binutils/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 897539a439..b8064093d2 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -12,6 +12,10 @@ class Binutils(Package): version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e') version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764') + depends_on('m4') + depends_on('flex') + depends_on('bison') + # Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell variant('krellpatch', default=False, description="build with openspeedshop based patch.") variant('gold', default=True, description="build the gold linker") -- cgit v1.2.3-70-g09d2 From cf1914fc00bd98a1885edc4d4190f9c424b0588b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 14 Apr 2016 10:18:06 -0500 Subject: Also install species directory --- var/spack/repos/builtin/packages/elk/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py index 780c41f726..1d9216fd1a 100644 --- a/var/spack/repos/builtin/packages/elk/package.py +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -118,4 +118,5 @@ class Elk(Package): install('src/spacegroup/spacegroup', prefix.bin) install_tree('examples', join_path(prefix, 'examples')) + install_tree('species', join_path(prefix, 'species')) -- cgit v1.2.3-70-g09d2 From c005b5fe9c72c19db92a5459d8c3657d7343aa0a Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 15 Apr 2016 09:24:44 +0200 Subject: Added coverage badge pointing to LLNL/develop --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1977a4fee9..7797da299c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ============ [![Build Status](https://travis-ci.org/LLNL/spack.png?branch=develop)](https://travis-ci.org/LLNL/spack) +[![Coverage Status](https://coveralls.io/repos/github/LLNL/spack/badge.svg?branch=develop)](https://coveralls.io/github/LLNL/spack?branch=develop) Spack is a package management tool designed to support multiple versions and configurations of software on a wide variety of platforms -- cgit v1.2.3-70-g09d2 From e03e87b79186c21c3db084056363bea4db8dba04 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Fri, 15 Apr 2016 15:57:54 -0400 Subject: 1. Added variants to choose language interfaces. 2. Now produces relocatable code (+fpic) by default --- .../repos/builtin/packages/parallel-netcdf/package.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py index e6f8cf026b..1bbd24781e 100644 --- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -11,11 +11,25 @@ class ParallelNetcdf(Package): version('1.7.0', '267eab7b6f9dc78c4d0e6def2def3aea4bc7c9f0') version('1.6.1', '62a094eb952f9d1e15f07d56e535052604f1ac34') + variant('cxx', default=True, description='Build the C++ Interface') + 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("mpi") + # See: https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL def install(self, spec, prefix): - configure("--prefix=%s" % prefix, - "--with-mpi=%s" % spec['mpi'].prefix) + args = list() + if '+fpic' in spec: + args.extend(['CFLAGS=-fPIC', 'CXXFLAGS=-fPIC', 'FFLAGS=-fPIC']) + if '~cxx' in spec: + args.append('--disable-cxx') + if '~fortran' in spec: + args.append('--disable-fortran') + + args.extend(["--prefix=%s" % prefix, + "--with-mpi=%s" % spec['mpi'].prefix]) + configure(*args) make() make("install") -- cgit v1.2.3-70-g09d2 From a25e33d96ecbd3db690cd8f0bc5119f506310dab Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Apr 2016 00:50:15 -0400 Subject: Create lib directory --- var/spack/repos/builtin/packages/cereal/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/cereal/package.py b/var/spack/repos/builtin/packages/cereal/package.py index a83927456f..6acbf666c8 100644 --- a/var/spack/repos/builtin/packages/cereal/package.py +++ b/var/spack/repos/builtin/packages/cereal/package.py @@ -1,4 +1,5 @@ from spack import * +import os import shutil class Cereal(Package): @@ -30,5 +31,8 @@ class Cereal(Package): # Install shutil.rmtree(join_path(prefix, 'doc'), ignore_errors=True) shutil.rmtree(join_path(prefix, 'include'), ignore_errors=True) + shutil.rmtree(join_path(prefix, 'lib'), ignore_errors=True) shutil.copytree('doc', join_path(prefix, 'doc'), symlinks=True) shutil.copytree('include', join_path(prefix, 'include'), symlinks=True) + # Create empty directory to avoid linker warnings later + os.mkdir(join_path(prefix, 'lib')) -- cgit v1.2.3-70-g09d2 From 523be30974c4630450e779a9814d685716dd312e Mon Sep 17 00:00:00 2001 From: Kelly Thompson Date: Sat, 16 Apr 2016 23:11:19 -0600 Subject: + Add CMake version 3.5.2. (#787) --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 91a4e3b415..2493cf0a13 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -30,6 +30,7 @@ class Cmake(Package): homepage = 'https://www.cmake.org' url = 'https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz' + version('3.5.2', '701386a1b5ec95f8d1075ecf96383e02') version('3.5.1', 'ca051f4a66375c89d1a524e726da0296') version('3.5.0', '33c5d09d4c33d4ffcc63578a6ba8777e') version('3.4.3', '4cb3ff35b2472aae70f542116d616e63') -- cgit v1.2.3-70-g09d2 From fb4f361cd0a8f12c606013b382d7e4fa5706dbfb Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Apr 2016 01:12:52 -0400 Subject: Update to version 4.1.0 (#785) --- var/spack/repos/builtin/packages/jemalloc/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/jemalloc/package.py b/var/spack/repos/builtin/packages/jemalloc/package.py index 8cec9ea75b..9cb0fd1f40 100644 --- a/var/spack/repos/builtin/packages/jemalloc/package.py +++ b/var/spack/repos/builtin/packages/jemalloc/package.py @@ -5,6 +5,7 @@ class Jemalloc(Package): homepage = "http://www.canonware.com/jemalloc/" url = "https://github.com/jemalloc/jemalloc/releases/download/4.0.4/jemalloc-4.0.4.tar.bz2" + version('4.1.0', 'c4e53c947905a533d5899e5cc3da1f94') version('4.0.4', '687c5cc53b9a7ab711ccd680351ff988') variant('stats', default=False, description='Enable heap statistics') @@ -20,5 +21,8 @@ class Jemalloc(Package): configure(*configure_args) + # Don't use -Werror + filter_file(r'-Werror=\S*', '', 'Makefile') + make() make("install") -- cgit v1.2.3-70-g09d2 From 375de085e271f2926ef2381a2e22f40bd5541177 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 17 Apr 2016 01:14:34 -0400 Subject: Make PAPI build on Darwin (#772) * Make PAPI build on Darwin - don't use - run install_name_tool * Use fix_darwin_install_name --- var/spack/repos/builtin/packages/papi/package.py | 31 +++++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index 53d69e28d9..74b3ea9ef9 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -1,5 +1,8 @@ from spack import * +import glob import os +import sys +from llnl.util.filesystem import fix_darwin_install_name class Papi(Package): """PAPI provides the tool designer and application engineer with a @@ -18,17 +21,27 @@ class Papi(Package): version('5.3.0', '367961dd0ab426e5ae367c2713924ffb') def install(self, spec, prefix): - os.chdir("src/") + with working_dir("src"): - configure_args=["--prefix=%s" % prefix] + configure_args=["--prefix=%s" % prefix] - # PAPI uses MPI if MPI is present; since we don't require an - # MPI package, we ensure that all attempts to use MPI fail, so - # that PAPI does not get confused - configure_args.append('MPICC=:') + # PAPI uses MPI if MPI is present; since we don't require + # an MPI package, we ensure that all attempts to use MPI + # fail, so that PAPI does not get confused + configure_args.append('MPICC=:') - configure(*configure_args) + configure(*configure_args) - make() - make("install") + # Don't use + for level in [".", "*", "*/*"]: + files = glob.iglob(join_path(level, "*.[ch]")) + filter_file(r"\", "", *files) + make() + make("install") + + # The shared library is not installed correctly on Darwin + if sys.platform == 'darwin': + os.rename(join_path(prefix.lib, 'libpapi.so'), + join_path(prefix.lib, 'libpapi.dylib')) + fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-70-g09d2 From 63bade7a0c7350681dd29ce877f2a9fad679d67d Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 17 Apr 2016 01:15:07 -0400 Subject: metis: fix OS X install (#764) Without this, the binaries use relative paths for loading which causes them to not be found when running binaries. Not sure why the existing hack wasn't working, but this fixes it the proper way. --- var/spack/repos/builtin/packages/metis/package.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 41e3ebb429..b05f23a3dc 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -136,6 +136,7 @@ class Metis(Package): source_directory = self.stage.source_path options.append('-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=source_directory)) + options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) if '+shared' in spec: options.append('-DSHARED:BOOL=ON') @@ -184,7 +185,3 @@ class Metis(Package): fs = glob.glob(join_path(source_directory,'GKlib',"*.h")) for f in fs: install(f, GKlib_dist) - - # The shared library is not installed correctly on Darwin; correct this - if (sys.platform == 'darwin') and ('+shared' in spec): - fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-70-g09d2 From dd84a575807636159d80809f59962cf799b83fd7 Mon Sep 17 00:00:00 2001 From: Kelly Thompson Date: Sat, 16 Apr 2016 23:15:48 -0600 Subject: + On some systems, Dia also requires intltool. (#768) --- var/spack/repos/builtin/packages/dia/package.py | 1 + var/spack/repos/builtin/packages/intltool/package.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/intltool/package.py diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py index 1cb5910e46..25d5f08205 100644 --- a/var/spack/repos/builtin/packages/dia/package.py +++ b/var/spack/repos/builtin/packages/dia/package.py @@ -7,6 +7,7 @@ class Dia(Package): version('0.97.3', '0e744a0f6a6c4cb6a089e4d955392c3c') + depends_on('intltool') 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/intltool/package.py b/var/spack/repos/builtin/packages/intltool/package.py new file mode 100644 index 0000000000..9b3c095378 --- /dev/null +++ b/var/spack/repos/builtin/packages/intltool/package.py @@ -0,0 +1,19 @@ +from spack import * + +class Intltool(Package): + """intltool is a set of tools to centralize translation of many different file formats using GNU gettext-compatible PO files.""" + homepage = 'https://freedesktop.org/wiki/Software/intltool/' + + version('0.51.0', '12e517cac2b57a0121cda351570f1e63') + + def url_for_version(self, version): + """Handle version-based custom URLs.""" + return 'https://launchpad.net/intltool/trunk/%s/+download/intltool-%s.tar.gz' % (version, version) + + def install(self, spec, prefix): + + # configure, build, install: + options = ['--prefix=%s' % prefix ] + configure(*options) + make() + make('install') -- cgit v1.2.3-70-g09d2 From 00f44d558ab3b3ee4b9d04534a01ad7decbe0d7b Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 12 Apr 2016 15:42:55 +0200 Subject: modules : started working on naming schemes and conflict --- lib/spack/spack/config.py | 9 +++++++- lib/spack/spack/modules.py | 56 ++++++++++++++++++++++++++++------------------ 2 files changed, 42 insertions(+), 23 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index cf3b885ae6..f9a680d109 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -297,6 +297,9 @@ section_schemas = { 'properties': { 'whitelist': {'$ref': '#/definitions/array_of_strings'}, 'blacklist': {'$ref': '#/definitions/array_of_strings'}, + 'naming_scheme': { + 'type': 'string' # Can we be more specific here? + } } }, { @@ -322,7 +325,11 @@ section_schemas = { 'tcl': { 'allOf': [ {'$ref': '#/definitions/module_type_configuration'}, # Base configuration - {} # Specific tcl extensions + { + 'properties': { + 'conflict': {'type': 'string'} + } + } # Specific tcl extensions ] }, 'dotkit': { diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 2c68c0c170..e6e9be1eff 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -41,11 +41,11 @@ various shell-support files in $SPACK/share/spack/setup-env.*. Each hook in hooks/ implements the logic for writing its specific type of module file. """ import copy +import datetime import os import os.path import re import textwrap -import datetime import llnl.util.tty as tty import spack @@ -75,7 +75,7 @@ def print_help(): " . %s/setup-env.sh" % spack.share_path, "", "For csh and tcsh:", - " setenv SPACK_ROOT %s" % spack.prefix, + " setenv SPACK_ROOT %s" % spack.prefix, " source %s/setup-env.csh" % spack.share_path, "") @@ -263,6 +263,34 @@ class EnvModule(object): if self.spec.package.__doc__: self.long_description = re.sub(r'\s+', ' ', self.spec.package.__doc__) + @property + def naming_scheme(self): + try: + naming_scheme = CONFIGURATION[self.name]['naming_scheme'] + except KeyError: + naming_scheme = self.default_naming_format + return naming_scheme + + @property + def tokens(self): + tokens = { + 'name': self.spec.name, + 'version': self.spec.version, + 'compiler': self.spec.compiler, + 'hash': self.spec.dag_hash() + } + return tokens + + @property + def use_name(self): + """ + Subclasses should implement this to return the name the module command uses to refer to the package. + """ + naming_tokens = self.tokens + naming_scheme = self.naming_scheme + name = naming_scheme.format(**naming_tokens) + return name + @property def category(self): # Anything defined at the package level takes precedence @@ -379,12 +407,6 @@ class EnvModule(object): where this module lives.""" raise NotImplementedError() - @property - def use_name(self): - """Subclasses should implement this to return the name the - module command uses to refer to the package.""" - raise NotImplementedError() - def remove(self): mod_file = self.file_name if os.path.exists(mod_file): @@ -408,17 +430,12 @@ class Dotkit(EnvModule): prerequisite_format = None # TODO : does something like prerequisite exist for dotkit? + default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}-{hash}' + @property def file_name(self): return join_path(Dotkit.path, self.spec.architecture, '%s.dk' % self.use_name) - @property - def use_name(self): - return "%s-%s-%s-%s-%s" % (self.spec.name, self.spec.version, - self.spec.compiler.name, - self.spec.compiler.version, - self.spec.dag_hash()) - @property def header(self): # Category @@ -456,17 +473,12 @@ class TclModule(EnvModule): prerequisite_format = 'prereq {module_file}\n' + default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}-{hash}' + @property def file_name(self): return join_path(TclModule.path, self.spec.architecture, self.use_name) - @property - def use_name(self): - return "%s-%s-%s-%s-%s" % (self.spec.name, self.spec.version, - self.spec.compiler.name, - self.spec.compiler.version, - self.spec.dag_hash()) - @property def header(self): # TCL Modulefile header -- cgit v1.2.3-70-g09d2 From c69acfa5c80fc4ea93787c19f9f4a6f3cf833f9c Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 15 Apr 2016 12:21:32 +0200 Subject: naming work correctly --- lib/spack/spack/modules.py | 11 +++++++---- share/spack/setup-env.sh | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index e6e9be1eff..a24d5e5d09 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -276,8 +276,7 @@ class EnvModule(object): tokens = { 'name': self.spec.name, 'version': self.spec.version, - 'compiler': self.spec.compiler, - 'hash': self.spec.dag_hash() + 'compiler': self.spec.compiler } return tokens @@ -289,6 +288,10 @@ class EnvModule(object): naming_tokens = self.tokens naming_scheme = self.naming_scheme name = naming_scheme.format(**naming_tokens) + name += '-' + self.spec.dag_hash() # Always append the hash to make the module file unique + # Not everybody is working on linux... + parts = name.split('/') + name = join_path(*parts) return name @property @@ -430,7 +433,7 @@ class Dotkit(EnvModule): prerequisite_format = None # TODO : does something like prerequisite exist for dotkit? - default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}-{hash}' + default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' @property def file_name(self): @@ -473,7 +476,7 @@ class TclModule(EnvModule): prerequisite_format = 'prereq {module_file}\n' - default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}-{hash}' + default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' @property def file_name(self): diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 764af68400..0c9e5b2409 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -41,7 +41,7 @@ # commands. This allows the user to use packages without knowing all # their installation details. # -# e.g., rather than requring a full spec for libelf, the user can type: +# e.g., rather than requiring a full spec for libelf, the user can type: # # spack use libelf # @@ -110,11 +110,11 @@ function spack { unuse $_sp_module_args $_sp_full_spec fi ;; "load") - if _sp_full_spec=$(command spack $_sp_flags module find dotkit $_sp_spec); then + if _sp_full_spec=$(command spack $_sp_flags module find tcl $_sp_spec); then module load $_sp_module_args $_sp_full_spec fi ;; "unload") - if _sp_full_spec=$(command spack $_sp_flags module find dotkit $_sp_spec); then + if _sp_full_spec=$(command spack $_sp_flags module find tcl $_sp_spec); then module unload $_sp_module_args $_sp_full_spec fi ;; esac -- cgit v1.2.3-70-g09d2 From 18a241fe213618a0390a8071480854a5c06e3681 Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 15 Apr 2016 15:19:02 +0200 Subject: modules : added hook for module specific extensions --- lib/spack/spack/config.py | 7 +--- lib/spack/spack/modules.py | 100 +++++++++++++++++++++------------------------ 2 files changed, 49 insertions(+), 58 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index f9a680d109..8e4cbba96e 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -276,6 +276,7 @@ section_schemas = { }, 'autoload': {'$ref': '#/definitions/dependency_selection'}, 'prerequisites': {'$ref': '#/definitions/dependency_selection'}, + 'conflict': {'type': 'string'}, 'environment': { 'type': 'object', 'default': {}, @@ -325,11 +326,7 @@ section_schemas = { 'tcl': { 'allOf': [ {'$ref': '#/definitions/module_type_configuration'}, # Base configuration - { - 'properties': { - 'conflict': {'type': 'string'} - } - } # Specific tcl extensions + {} # Specific tcl extensions ] }, 'dotkit': { diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index a24d5e5d09..a81132bcac 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -146,6 +146,17 @@ def dependencies(spec, request='all'): return [xx for ii, xx in l if not (xx in seen or seen_add(xx))] +def update_dictionary_extending_lists(target, update): + for key in update: + value = target.get(key, None) + if isinstance(value, list): + target[key].extend(update[key]) + elif isinstance(value, dict): + update_dictionary_extending_lists(target[key], update[key]) + else: + target[key] = update[key] + + def parse_config_options(module_generator): """ Parse the configuration file and returns a bunch of items that will be needed during module file generation @@ -159,19 +170,13 @@ def parse_config_options(module_generator): filters: list of environment variables whose modification is blacklisted in module files env: list of custom environment modifications to be applied in the module file """ - autoloads, prerequisites, filters = [], [], [] - env = EnvironmentModifications() # Get the configuration for this kind of generator - try: - module_configuration = copy.copy(CONFIGURATION[module_generator.name]) - except KeyError: - return autoloads, prerequisites, filters, env - - # Get the defaults for all packages - all_conf = module_configuration.pop('all', {}) - - update_single(module_generator.spec, all_conf, autoloads, prerequisites, filters, env) + module_configuration = copy.copy(CONFIGURATION.get(module_generator.name, {})) + ##### + # Merge all the rules + ##### + module_file_actions = module_configuration.pop('all', {}) for spec, conf in module_configuration.items(): override = False if spec.endswith(':'): @@ -179,45 +184,29 @@ def parse_config_options(module_generator): override = True if module_generator.spec.satisfies(spec): if override: - autoloads, prerequisites, filters = [], [], [] - env = EnvironmentModifications() - update_single(module_generator.spec, conf, autoloads, prerequisites, filters, env) - - return autoloads, prerequisites, filters, env - - -def update_single(spec, configuration, autoloads, prerequisites, filters, env): - """ - Updates the entries in the arguments according to the configuration + module_file_actions = {} + update_dictionary_extending_lists(module_file_actions, conf) + + ##### + # Process the common rules + ##### + + # Automatic loading loads + module_file_actions['autoload'] = dependencies(module_generator.spec, module_file_actions.get('autoload', 'none')) + # Prerequisites + module_file_actions['prerequisites'] = dependencies(module_generator.spec, module_file_actions.get('prerequisites', 'none')) + # Environment modifications + environment_actions = module_file_actions.pop('environment', {}) + env = EnvironmentModifications() + for method, arglist in environment_actions.items(): + for item in arglist: + if method == 'unset': + args = [item] + else: + args = item.split(',') + getattr(env, method)(*args) - Args: - spec: [in] target spec - configuration: [in] configuration file for the current type of module file generator - autoloads: [inout] list of dependencies to be automatically loaded - prerequisites: [inout] list of prerequisites - filters: [inout] list of environment variables whose modification is to be blacklisted - env: [inout] list of modifications to the environment - """ - # Get list of modules that will be loaded automatically - autoloads.extend(dependencies(spec, configuration.get('autoload', 'none'))) - prerequisites.extend(dependencies(spec, configuration.get('prerequisites', 'none'))) - - # Filter modifications to environment variables - try: - filters.extend(configuration['filter']['environment_blacklist']) - except KeyError: - pass - - try: - for method, arglist in configuration['environment'].items(): - for item in arglist: - if method == 'unset': - args = [item] - else: - args = item.split(',') - getattr(env, method)(*args) - except KeyError: - pass + return module_file_actions, env def filter_blacklisted(specs, module_name): @@ -368,17 +357,19 @@ class EnvModule(object): self.spec.package.setup_environment(spack_env, env) # Parse configuration file - autoloads, prerequisites, filters, conf_env = parse_config_options(self) + module_configuration, conf_env = parse_config_options(self) env.extend(conf_env) - + filters = module_configuration.get('filter', {}).get('environment_blacklist',{}) # Build up the module file content module_file_content = self.header - for x in filter_blacklisted(autoloads, self.name): + for x in filter_blacklisted(module_configuration.pop('autoload', []), self.name): module_file_content += self.autoload(x) - for x in filter_blacklisted(prerequisites, self.name): + for x in filter_blacklisted(module_configuration.pop('prerequisites', []), self.name): module_file_content += self.prerequisite(x) for line in self.process_environment_command(filter_environment_blacklist(env, filters)): module_file_content += line + for line in self.module_specific_content(module_configuration): + module_file_content += line # Dump to file with open(self.file_name, 'w') as f: @@ -388,6 +379,9 @@ class EnvModule(object): def header(self): raise NotImplementedError() + def module_specific_content(self, configuration): + return tuple() + def autoload(self, spec): m = TclModule(spec) return self.autoload_format.format(module_file=m.use_name) -- cgit v1.2.3-70-g09d2 From 50b148ca22b8bc9daeb1cb427eadeefd06e84800 Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 18 Apr 2016 13:09:39 +0200 Subject: modules : tcl modules handle 'conflict' directive. This should completely cover the functionality in #498 --- lib/spack/spack/modules.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index a81132bcac..61ecdc10c3 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -497,3 +497,19 @@ class TclModule(EnvModule): header += 'puts stderr "%s"\n' % line header += '}\n\n' return header + + def module_specific_content(self, configuration): + naming_tokens = self.tokens + # Conflict + conflict_format = configuration.get('conflict', '') + if conflict_format: + for naming_dir, conflict_dir in zip(self.naming_scheme.split('/'), conflict_format.split('/')): + if naming_dir != conflict_dir: + message = 'Conflict scheme does not match naming scheme [{spec}]\n\n' + message += 'naming scheme : "{nformat}"\n' + message += 'conflict scheme : "{cformat}"\n' + raise tty.error( + message.format(spec=self.spec, nformat=self.naming_scheme, cformat=conflict_format) + ) + conflict_format = 'conflict ' + conflict_format + yield conflict_format.format(**naming_tokens) -- cgit v1.2.3-70-g09d2 From bce276d57301e97f7d09a902f4caa8a76735e22d Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 18 Apr 2016 17:51:53 +0200 Subject: fix : missing autoload, failing validation --- lib/spack/spack/config.py | 2 +- lib/spack/spack/modules.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 8e4cbba96e..1ac8a01619 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -293,7 +293,7 @@ section_schemas = { 'module_type_configuration': { 'type': 'object', 'default': {}, - 'oneOf': [ + 'anyOf': [ { 'properties': { 'whitelist': {'$ref': '#/definitions/array_of_strings'}, diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 61ecdc10c3..5bf003f9ad 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -171,7 +171,7 @@ def parse_config_options(module_generator): env: list of custom environment modifications to be applied in the module file """ # Get the configuration for this kind of generator - module_configuration = copy.copy(CONFIGURATION.get(module_generator.name, {})) + module_configuration = copy.deepcopy(CONFIGURATION.get(module_generator.name, {})) ##### # Merge all the rules -- cgit v1.2.3-70-g09d2 From 44321c5c2487c62e58f543455569804c95081cfa Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Mon, 18 Apr 2016 16:46:15 -0700 Subject: Update the main Krell Institute and Argo Navis Tech. packages for MPI variant support, get source from github not sourceforge, tested external package usage, and general package clean-up --- .../builtin/packages/cbtf-argonavis/package.py | 90 +++++-- .../repos/builtin/packages/cbtf-krell/package.py | 262 ++++++++++++++---- .../repos/builtin/packages/cbtf-lanl/package.py | 65 +++-- var/spack/repos/builtin/packages/cbtf/package.py | 88 ++++-- .../builtin/packages/openspeedshop/package.py | 300 ++++++++++++++++----- 5 files changed, 631 insertions(+), 174 deletions(-) diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py index 7b07933911..90789a98f2 100644 --- a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py +++ b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -24,43 +24,83 @@ class CbtfArgonavis(Package): homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" # Mirror access template example - #url = "file:/g/g24/jeg/cbtf-argonavis-1.5.tar.gz" - #version('1.5', '1f7f6512f55409ed2135cfceabe26b82') + #url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/cbtf-argonavis-1.6.tar.gz" + #version('1.6', '0fafa0008478405c2c2319450f174ed4') - version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-argonavis/cbtf-argonavis') + 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") + depends_on("boost@1.50.0:") depends_on("papi") + depends_on("mrnet@5.0.1:+lwthreads+krellpatch") depends_on("cbtf") depends_on("cbtf-krell") - depends_on("cuda") + depends_on("cuda@6.0.37") + #depends_on("cuda") parallel = False + def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): + # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + + compile_flags="-O2 -g" + BuildTypeOptions = [] + + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + for word in cmakeOptions[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_CXX_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_C_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'): + cmakeOptions.remove(word) + BuildTypeOptions.extend([ + '-DCMAKE_VERBOSE_MAKEFILE=ON', + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags + ]) + + cmakeOptions.extend(BuildTypeOptions) + + def install(self, spec, prefix): # Look for package installation information in the cbtf and cbtf-krell prefixes cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) - # FIXME, hard coded for testing purposes, we will alter when the external package feature is available - cuda_prefix_path = "/usr/local/cudatoolkit-6.0" - cupti_prefix_path = "/usr/local/cudatoolkit-6.0/extras/CUPTI" - - with working_dir('CUDA'): with working_dir('build', create=True): - cmake('..', - '-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, - '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, - '-DCUDA_INSTALL_PATH=%s' % cuda_prefix_path, - '-DCUDA_ROOT=%s' % cuda_prefix_path, - '-DCUPTI_ROOT=%s' % cupti_prefix_path, - '-DCUDA_DIR=%s' % cuda_prefix_path, - '-DPAPI_ROOT=%s' % spec['papi'].prefix, - '-DCBTF_PREFIX=%s' % spec['cbtf'].prefix, - *std_cmake_args) - make("clean") - make() - make("install") + cmakeOptions = [] + cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DCUDA_DIR=%s' % spec['cuda'].prefix, + '-DCUDA_INSTALL_PATH=%s' % spec['cuda'].prefix, + '-DCUDA_TOOLKIT_ROOT_DIR=%s' % spec['cuda'].prefix, + '-DCUPTI_DIR=%s' % join_path(spec['cuda'].prefix + '/extras/CUPTI'), + '-DCUPTI_ROOT=%s' % join_path(spec['cuda'].prefix + '/extras/CUPTI'), + '-DPAPI_ROOT=%s' % spec['papi'].prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DBoost_DIR=%s' % spec['boost'].prefix, + '-DBOOST_LIBRARYDIR=%s' % spec['boost'].prefix.lib, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DBoost_NO_SYSTEM_PATHS=ON' + ]) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) + + make("clean") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cbtf-krell/package.py b/var/spack/repos/builtin/packages/cbtf-krell/package.py index 9458ac113c..e6050cb4a9 100644 --- a/var/spack/repos/builtin/packages/cbtf-krell/package.py +++ b/var/spack/repos/builtin/packages/cbtf-krell/package.py @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -26,21 +26,30 @@ class CbtfKrell(Package): homepage = "http://sourceforge.net/p/cbtf/wiki/Home/" # optional mirror access template - #url = "file:/g/g24/jeg/cbtf-krell-1.5.tar.gz" - #version('1.5', 'b13f6df6a93c44149d977773dd776d2f') + #url = "file:/home/jeg/cbtf-krell-1.6.tar.gz" + #version('1.6', 'edeb61cd488f16e7b124f77db9ce762d') - version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf-krell/cbtf-krell') + version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf-krell.git') + # MPI variants + variant('openmpi', default=False, description="Build mpi experiment collector for openmpi MPI when this variant is enabled.") + variant('mpt', default=False, description="Build mpi experiment collector for SGI MPT MPI when this variant is enabled.") + variant('mvapich2', default=False, description="Build mpi experiment collector for mvapich2 MPI when this variant is enabled.") + variant('mvapich', default=False, description="Build mpi experiment collector for mvapich MPI when this variant is enabled.") + 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.") # Dependencies for cbtf-krell + depends_on("cmake@3.0.2") # For binutils service depends_on("binutils@2.24+krellpatch") # collectionTool - depends_on("boost@1.50.0") - depends_on("dyninst@8.2.1") - depends_on("mrnet@4.1.0:+lwthreads") + depends_on("boost@1.50.0:") + depends_on("dyninst@8.2.1:") + depends_on("mrnet@5.0.1:+lwthreads+krellpatch") + depends_on("xerces-c@3.1.1:") depends_on("cbtf") @@ -51,66 +60,207 @@ class CbtfKrell(Package): # MPI Installations # These have not worked either for build or execution, commenting out for now - #depends_on("openmpi") - #depends_on("mvapich2@2.0") - #depends_on("mpich") + depends_on("openmpi", when='+openmpi') + depends_on("mpich", when='+mpich') + depends_on("mpich2", when='+mpich2') + depends_on("mvapich2", when='+mvapich2') + depends_on("mvapich", when='+mvapich') + depends_on("mpt", when='+mpt') parallel = False + def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): + # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + + compile_flags="-O2 -g" + BuildTypeOptions = [] + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + for word in cmakeOptions[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_CXX_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_C_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'): + cmakeOptions.remove(word) + BuildTypeOptions.extend([ + '-DCMAKE_VERBOSE_MAKEFILE=ON', + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags + ]) + + cmakeOptions.extend(BuildTypeOptions) + + + + def set_mpi_cmakeOptions(self, spec, cmakeOptions): + # Appends to cmakeOptions the options that will enable the appropriate MPI implementations + + MPIOptions = [] + + # openmpi + if '+openmpi' in spec: + MPIOptions.extend([ + '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix + ]) + # mpich + if '+mpich' in spec: + MPIOptions.extend([ + '-DMPICH_DIR=%s' % spec['mpich'].prefix + ]) + # mpich2 + if '+mpich2' in spec: + MPIOptions.extend([ + '-DMPICH2_DIR=%s' % spec['mpich2'].prefix + ]) + # mvapich + if '+mvapich' in spec: + MPIOptions.extend([ + '-DMVAPICH_DIR=%s' % spec['mvapich'].prefix + ]) + # mvapich2 + if '+mvapich2' in spec: + MPIOptions.extend([ + '-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix + ]) + # mpt + if '+mpt' in spec: + MPIOptions.extend([ + '-DMPT_DIR=%s' % spec['mpt'].prefix + ]) + + cmakeOptions.extend(MPIOptions) + def install(self, spec, prefix): # Add in paths for finding package config files that tell us where to find these packages - cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['dyninst'].prefix) - - # FIXME - hard code path until external package support is available - # Need to change this path and/or add additional paths for MPI experiment support on different platforms - #openmpi_prefix_path = "/opt/openmpi-1.8.2" - #mvapich_prefix_path = "/usr/local/tools/mvapich-gnu" - - # Other possibilities, they will need a -DMVAPICH_DIR=, etc clause in the cmake command to be recognized - # mvapich_prefix_path = "" - # mvapich2_prefix_path = "" - # mpich2_prefix_path = "" - # mpich_prefix_path = "" - # mpt_prefix_path = "" - - # Add in paths for cuda if requested via the cuda variant - # FIXME - hard code path until external package support is available - #if '+cuda' in spec: - # cuda_prefix_path = "/usr/local/cuda-6.0" - # cupti_prefix_path = "/usr/local/cuda-6.0/extras/CUPTI" - #else: - # cuda_prefix_path = "" - # cupti_prefix_path = "" - - #'-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix, - #'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, - #'-DMPICH_DIR=%s' % spec['mpich'].prefix, - #'-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, - #'-DOPENMPI_DIR=%s' % openmpi_prefix_path, - #'-DMVAPICH_DIR=%s' % mvapich_prefix_path, - #'-DLIB_SUFFIX=64', - #'-DCUDA_DIR=%s' % cuda_prefix_path, - #'-DCUPTI_DIR=%s' % cupti_prefix_path, + #cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['dyninst'].prefix) + #'-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path # Build cbtf-krell with cmake with working_dir('build_cbtf_krell', create=True): - cmake('..', - '-DCMAKE_BUILD_TYPE=Debug', - '-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCBTF_DIR=%s' % spec['cbtf'].prefix, - '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, - '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, - '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, - '-DPAPI_DIR=%s' % spec['papi'].prefix, - '-DBOOST_DIR=%s' % spec['boost'].prefix, - '-DMRNET_DIR=%s' % spec['mrnet'].prefix, - '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, - '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, - '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, - *std_cmake_args) + cmakeOptions = [] + cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, + '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + '-DPAPI_DIR=%s' % spec['papi'].prefix, + '-DBOOST_DIR=%s' % spec['boost'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, + '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix + ]) + + + # Add any MPI implementations coming from variant settings + self.set_mpi_cmakeOptions(spec, cmakeOptions) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) make("clean") make() make("install") + + + #if '+cray' in spec: + #if 'cray' in self.spec.architecture: + # if '+runtime' in spec: + # with working_dir('build_cbtf_cray_runtime', create=True): + # python_vers='%d.%d' % spec['python'].version[:2] + # cmake .. \ + # -DCMAKE_BUILD_TYPE=Debug \ + # -DTARGET_OS="cray" \ + # -DRUNTIME_ONLY="true" \ + # -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \ + # -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \ + # -DCBTF_DIR=${CBTF_ROOT} \ + # -DBOOST_ROOT=${BOOST_INSTALL_PREFIX} \ + # -DXERCESC_DIR=${XERCESC_INSTALL_PREFIX} \ + # -DBINUTILS_DIR=${KRELL_ROOT} \ + # -DLIBMONITOR_DIR=${KRELL_ROOT_COMPUTE} \ + # -DLIBUNWIND_DIR=${KRELL_ROOT_COMPUTE} \ + # -DPAPI_DIR=${PAPI_ROOT} \ + # -DDYNINST_DIR=${DYNINST_CN_ROOT} \ + # -DMRNET_DIR=${MRNET_INSTALL_PREFIX} \ + # -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48 + # else: + # with working_dir('build_cbtf_cray_frontend', create=True): + # python_vers='%d.%d' % spec['python'].version[:2] + # cmake .. \ + # -DCMAKE_BUILD_TYPE=Debug \ + # -DCMAKE_INSTALL_PREFIX=${CBTF_KRELL_PREFIX} \ + # -DCMAKE_PREFIX_PATH=${CBTF_ROOT} \ + # -DCBTF_DIR=${CBTF_ROOT} \ + # -DRUNTIME_TARGET_OS="cray" \ + # -DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_RUNTIME_ROOT} \ + # -DCBTF_CN_RUNTIME_DIR=${CBTF_CN_RUNTIME_ROOT} \ + # -DLIBMONITOR_CN_RUNTIME_DIR=${LIBMONITOR_CN_ROOT} \ + # -DLIBUNWIND_CN_RUNTIME_DIR=${LIBUNWIND_CN_ROOT} \ + # -DPAPI_CN_RUNTIME_DIR=${PAPI_CN_ROOT} \ + # -DXERCESC_CN_RUNTIME_DIR=/${XERCESC_CN_ROOT} \ + # -DMRNET_CN_RUNTIME_DIR=${MRNET_CN_ROOT} \ + # -DBOOST_CN_RUNTIME_DIR=${BOOST_CN_ROOT} \ + # -DDYNINST_CN_RUNTIME_DIR=${DYNINST_CN_ROOT} \ + # -DBOOST_ROOT=/${KRELL_ROOT} \ + # -DXERCESC_DIR=/${KRELL_ROOT} \ + # -DBINUTILS_DIR=/${KRELL_ROOT} \ + # -DLIBMONITOR_DIR=${KRELL_ROOT} \ + # -DLIBUNWIND_DIR=${KRELL_ROOT} \ + # -DPAPI_DIR=${PAPI_ROOT} \ + # -DDYNINST_DIR=${KRELL_ROOT} \ + # -DMRNET_DIR=${KRELL_ROOT} \ + # -DMPICH2_DIR=/opt/cray/mpt/7.0.1/gni/mpich2-gnu/48 + # fi +# +# make("clean") +# make() +# make("install") +# +# elif '+mic' in spec: +# if '+runtime' in spec: +# with working_dir('build_cbtf_mic_runtime', create=True): +# python_vers='%d.%d' % spec['python'].version[:2] +# cmake .. \ +# +# else: +# with working_dir('build_cbtf_cray_frontend', create=True): +# python_vers='%d.%d' % spec['python'].version[:2] +# cmake .. \ +# fi +# +# else: +# # Build cbtf-krell with cmake +# with working_dir('build_cbtf_krell', create=True): +# cmake('..', +# '-DCMAKE_BUILD_TYPE=Debug', +# '-DCMAKE_INSTALL_PREFIX=%s' % prefix, +# '-DCBTF_DIR=%s' % spec['cbtf'].prefix, +# '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, +# '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, +# '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, +# '-DPAPI_DIR=%s' % spec['papi'].prefix, +# '-DBOOST_DIR=%s' % spec['boost'].prefix, +# '-DMRNET_DIR=%s' % spec['mrnet'].prefix, +# '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, +# '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, +# '-DOPENMPI_DIR=%s' % openmpi_prefix_path, +# '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, +# *std_cmake_args) +# +# make("clean") +# make() +# make("install") +# +# fi +# diff --git a/var/spack/repos/builtin/packages/cbtf-lanl/package.py b/var/spack/repos/builtin/packages/cbtf-lanl/package.py index 2da9e8a1f7..5ca88601f3 100644 --- a/var/spack/repos/builtin/packages/cbtf-lanl/package.py +++ b/var/spack/repos/builtin/packages/cbtf-lanl/package.py @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -29,32 +29,65 @@ 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") # Dependencies for cbtf-krell - depends_on("boost@1.50") - depends_on("mrnet@4.1.0:+lwthreads") + depends_on("mrnet@5.0.1:+lwthreads+krellpatch") depends_on("xerces-c@3.1.1:") depends_on("cbtf") depends_on("cbtf-krell") parallel = False + def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): + # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + + compile_flags="-O2 -g" + BuildTypeOptions = [] + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + for word in cmakeOptions[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_CXX_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_C_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_VERBOSE_MAKEFILE'): + cmakeOptions.remove(word) + BuildTypeOptions.extend([ + '-DCMAKE_VERBOSE_MAKEFILE=ON', + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags + ]) + + cmakeOptions.extend(BuildTypeOptions) + def install(self, spec, prefix): # Add in paths for finding package config files that tell us where to find these packages cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) with working_dir('build', create=True): - cmake('..', - '-DCBTF_DIR=%s' % spec['cbtf'].prefix, - '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, - '-DMRNET_DIR=%s' % spec['mrnet'].prefix, - '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, - '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, - '-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake'), - *std_cmake_args) - - make("clean") - make() - make("install") + cmakeOptions = [] + cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake') + ]) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) + + make("clean") + make() + make("install") diff --git a/var/spack/repos/builtin/packages/cbtf/package.py b/var/spack/repos/builtin/packages/cbtf/package.py index 52e6a07020..7ce1cd382b 100644 --- a/var/spack/repos/builtin/packages/cbtf/package.py +++ b/var/spack/repos/builtin/packages/cbtf/package.py @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -25,21 +25,44 @@ class Cbtf(Package): homepage = "http://sourceforge.net/p/cbtf/wiki/Home" # Mirror access template example - #url = "file:/g/g24/jeg/cbtf-1.5.tar.gz" - #version('1.6', '1ca88a8834759c4c74452cb97fe7b70a') + #url = "file:/home/jeg/cbtf-1.6.tar.gz" + #version('1.6', 'c1ef4e5aa4e470dffb042abdba0b9987') # Use when the git repository is available - version('1.6', branch='master', git='http://git.code.sf.net/p/cbtf/cbtf') + version('1.6', branch='master', git='https://github.com/OpenSpeedShop/cbtf.git') - depends_on("cmake") - #depends_on("boost@1.42.0:") - depends_on("boost@1.50.0") - depends_on("mrnet@4.1.0+lwthreads") + variant('runtime', default=False, description="build only the runtime libraries and collectors.") + + depends_on("cmake@3.0.2") + depends_on("boost@1.50.0:") + depends_on("mrnet@5.0.1:+lwthreads+krellpatch") depends_on("xerces-c@3.1.1:") - depends_on("libxml2") + # Work around for spack libxml2 package bug, take off python when fixed + depends_on("libxml2+python") parallel = False + def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): + # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + + compile_flags="-O2 -g" + BuildTypeOptions = [] + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + for word in cmakeOptions[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_CXX_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_C_FLAGS'): + cmakeOptions.remove(word) + BuildTypeOptions.extend([ + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags + ]) + + cmakeOptions.extend(BuildTypeOptions) + def install(self, spec, prefix): with working_dir('build', create=True): @@ -48,14 +71,45 @@ class Cbtf(Package): # or BOOST_INCLUDEDIR). Useful when specifying BOOST_ROOT. # Defaults to OFF. - cmake('..', - '--debug-output', - '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, - '-DBOOST_ROOT=%s' % spec['boost'].prefix, - '-DMRNET_DIR=%s' % spec['mrnet'].prefix, - '-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake'), - *std_cmake_args) + if '+runtime' in spec: + # Install message tag include file for use in Intel MIC cbtf-krell build + # FIXME + cmakeOptions = [] + cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake') + ]) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) + + else: + cmakeOptions = [] + cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + '-DCMAKE_MODULE_PATH=%s' % join_path(prefix.share,'KrellInstitute','cmake') + ]) + + # Add in the standard cmake arguments + cmakeOptions.extend(std_cmake_args) + + # Adjust the standard cmake arguments to what we want the build type, etc to be + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + # Invoke cmake + cmake('..', *cmakeOptions) make("clean") make() diff --git a/var/spack/repos/builtin/packages/openspeedshop/package.py b/var/spack/repos/builtin/packages/openspeedshop/package.py index 8c71bcb7c3..bcd77351aa 100644 --- a/var/spack/repos/builtin/packages/openspeedshop/package.py +++ b/var/spack/repos/builtin/packages/openspeedshop/package.py @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2015 Krell Institute. All Rights Reserved. +# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software @@ -28,20 +28,15 @@ class Openspeedshop(Package): as open source code primarily under LGPL. """ - homepage = "http://www.openspeedshop.org" - url = "http://sourceforge.net/projects/openss/files/openss/openspeedshop-2.2/openspeedshop-2.2.tar.gz/download" + url = "https://github.com/OpenSpeedShop" version('2.2', '16cb051179c2038de4e8a845edf1d573') + # Use when the git repository is available + version('2.2', branch='master', git='https://github.com/OpenSpeedShop/openspeedshop.git') - #homepage = "http://www.openspeedshop.org" - #url = "http://sourceforge.net/projects/openss/files/openss/openspeedshop-2.1/openspeedshop-2.1.tar.gz/download" - #version('2.1', 'bdaa57c1a0db9d0c3e0303fd8496c507') - - # optional mirror template - #url = "file:/g/g24/jeg/openspeedshop-2.1.tar.gz" - #version('2.1', '64ee17166519838c7b94a1adc138e94f') - - + # Optional mirror template + #url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/openspeedshop-2.2.tar.gz" + #version('2.2', '643337740dc6c2faca60f42d3620b0e1') parallel = False @@ -51,11 +46,17 @@ class Openspeedshop(Package): variant('frontend', default=False, description="build only the front-end tool using the runtime_dir to point to the target build.") variant('cuda', default=False, description="build with cuda packages included.") variant('ptgf', default=False, description="build with the PTGF based gui package enabled.") - variant('intelmic', default=False, description="build for the Intel MIC platform.") - variant('cray', default=False, description="build for Cray platforms.") - variant('bluegene', default=False, description="build for Cray platforms.") variant('rtfe', default=False, description="build for generic cluster platforms that have different processors on the fe and be nodes.") + # MPI variants + variant('openmpi', default=False, description="Build mpi experiment collector for openmpi MPI when this variant is enabled.") + variant('mpt', default=False, description="Build mpi experiment collector for SGI MPT MPI when this variant is enabled.") + variant('mvapich2', default=False, description="Build mpi experiment collector for mvapich2 MPI when this variant is enabled.") + variant('mvapich', default=False, description="Build mpi experiment collector for mvapich MPI when this variant is enabled.") + 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") # Dependencies for openspeedshop that are common to all the variants of the OpenSpeedShop build depends_on("bison") depends_on("flex") @@ -63,8 +64,8 @@ class Openspeedshop(Package): depends_on("libelf") depends_on("libdwarf") depends_on("sqlite") - depends_on("boost@1.50.0") - depends_on("dyninst@8.2.1") + depends_on("boost@1.50.0:") + depends_on("dyninst@9.1.0") depends_on("python") depends_on("qt@3.3.8b+krellpatch") @@ -72,15 +73,78 @@ class Openspeedshop(Package): depends_on("libunwind", when='+offline') depends_on("papi", when='+offline') depends_on("libmonitor+krellpatch", when='+offline') - #depends_on("openmpi+krelloptions", when='+offline') - #depends_on("openmpi", when='+offline') - #depends_on("mpich", when='+offline') + depends_on("openmpi", when='+offline+openmpi') + depends_on("mpich", when='+offline+mpich') + depends_on("mpich2", when='+offline+mpich2') + depends_on("mvapich2", when='+offline+mvapich2') + depends_on("mvapich", when='+offline+mvapich') + depends_on("mpt", when='+offline+mpt') # Dependencies only for the openspeedshop cbtf package. depends_on("cbtf", when='+cbtf') depends_on("cbtf-krell", when='+cbtf') - depends_on("cbtf-argonavis", when='+cbtf') - depends_on("mrnet@4.1.0:+lwthreads", when='+cbtf') + depends_on("cbtf-argonavis", when='+cbtf+cuda') + depends_on("mrnet@5.0.1:+lwthreads+krellpatch", when='+cbtf') + + def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions): + # Sets build type parameters into cmakeOptions the options that will enable the cbtf-krell built type settings + + compile_flags="-O2 -g" + BuildTypeOptions = [] + # Set CMAKE_BUILD_TYPE to what cbtf-krell wants it to be, not the stdcmakeargs + for word in cmakeOptions[:]: + if word.startswith('-DCMAKE_BUILD_TYPE'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_CXX_FLAGS'): + cmakeOptions.remove(word) + if word.startswith('-DCMAKE_C_FLAGS'): + cmakeOptions.remove(word) + BuildTypeOptions.extend([ + '-DCMAKE_BUILD_TYPE=None', + '-DCMAKE_CXX_FLAGS=%s' % compile_flags, + '-DCMAKE_C_FLAGS=%s' % compile_flags + ]) + + cmakeOptions.extend(BuildTypeOptions) + + def set_mpi_cmakeOptions(self, spec, cmakeOptions): + # Appends to cmakeOptions the options that will enable the appropriate MPI implementations + + MPIOptions = [] + + # openmpi + if '+openmpi' in spec: + MPIOptions.extend([ + '-DOPENMPI_DIR=%s' % spec['openmpi'].prefix + ]) + # mpich + if '+mpich' in spec: + MPIOptions.extend([ + '-DMPICH_DIR=%s' % spec['mpich'].prefix + ]) + # mpich2 + if '+mpich2' in spec: + MPIOptions.extend([ + '-DMPICH2_DIR=%s' % spec['mpich2'].prefix + ]) + # mvapich + if '+mvapich' in spec: + MPIOptions.extend([ + '-DMVAPICH_DIR=%s' % spec['mvapich'].prefix + ]) + # mvapich2 + if '+mvapich2' in spec: + MPIOptions.extend([ + '-DMVAPICH2_DIR=%s' % spec['mvapich2'].prefix + ]) + # mpt + if '+mpt' in spec: + MPIOptions.extend([ + '-DMPT_DIR=%s' % spec['mpt'].prefix + ]) + + cmakeOptions.extend(MPIOptions) + def install(self, spec, prefix): @@ -100,51 +164,118 @@ class Openspeedshop(Package): instrumentor_setting = "offline" if '+runtime' in spec: with working_dir('build_runtime', create=True): - cmake('..', - '-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, - '-DINSTRUMENTOR=%s' % instrumentor_setting, - '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, - '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, - '-DPAPI_DIR=%s' % spec['papi'].prefix, - *std_cmake_args) + + cmakeOptions = [] + cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + '-DINSTRUMENTOR=%s' % instrumentor_setting, + '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, + '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + '-DPAPI_DIR=%s' % spec['papi'].prefix + ]) + + # Add any MPI implementations coming from variant settings + self.set_mpi_cmakeOptions(spec, cmakeOptions) + cmakeOptions.extend(std_cmake_args) + + # Adjust the build options to the favored ones for this build + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + cmake('..', *cmakeOptions) + make("clean") make() make("install") else: cmake_prefix_path = join_path(spec['dyninst'].prefix) with working_dir('build', create=True): + #python_vers=join_path(spec['python'].version[:2]) #'-DOPENMPI_DIR=%s' % openmpi_prefix_path, #'-DMVAPICH_DIR=%s' % mvapich_prefix_path, + #'-DMPICH_DIR=%s' % spec['mpich'].prefix, + #'-DMPICH2_DIR=%s' % spec['mpich2'].prefix, + #'-DBoost_NO_SYSTEM_PATHS=TRUE', + #'-DBOOST_ROOT=%s' % spec['boost'].prefix, + #'-DOPENMPI_DIR=%s' % spec['openmpi'].prefix, + python_vers='%d.%d' % spec['python'].version[:2] - cmake('..', - '-DCMAKE_INSTALL_PREFIX=%s' % prefix, - '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, - '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, - '-DINSTRUMENTOR=%s' % instrumentor_setting, - '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, - '-DLIBELF_DIR=%s' % spec['libelf'].prefix, - '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, - '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, - '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, - '-DPAPI_DIR=%s' % spec['papi'].prefix, - '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix, - '-DQTLIB_DIR=%s' % spec['qt'].prefix, - '-DPYTHON_EXECUTABLE=%s' % join_path(spec['python'].prefix + '/bin/python'), - '-DPYTHON_INCLUDE_DIR=%s' % join_path(spec['python'].prefix.include) + '/python' + python_vers, - '-DPYTHON_LIBRARY=%s' % join_path(spec['python'].prefix.lib) + '/libpython' + python_vers + '.so', - '-DBoost_NO_SYSTEM_PATHS=TRUE', - '-DBOOST_ROOT=%s' % spec['boost'].prefix, - '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, - *std_cmake_args) + + cmakeOptions = [] + cmakeOptions.extend(['-DCMAKE_INSTALL_PREFIX=%s' % prefix, + '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + '-DINSTRUMENTOR=%s' % instrumentor_setting, + '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + '-DLIBELF_DIR=%s' % spec['libelf'].prefix, + '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, + '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix, + '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + '-DPAPI_DIR=%s' % spec['papi'].prefix, + '-DSQLITE3_DIR=%s' % spec['sqlite'].prefix, + '-DQTLIB_DIR=%s' % spec['qt'].prefix, + '-DPYTHON_EXECUTABLE=%s' % join_path(spec['python'].prefix + '/bin/python'), + '-DPYTHON_INCLUDE_DIR=%s' % join_path(spec['python'].prefix.include) + '/python' + python_vers, + '-DPYTHON_LIBRARY=%s' % join_path(spec['python'].prefix.lib) + '/libpython' + python_vers + '.so', + '-DBoost_NO_SYSTEM_PATHS=TRUE', + '-DBOOST_ROOT=%s' % spec['boost'].prefix, + '-DDYNINST_DIR=%s' % spec['dyninst'].prefix + ]) + + # Add any MPI implementations coming from variant settings + self.set_mpi_cmakeOptions(spec, cmakeOptions) + cmakeOptions.extend(std_cmake_args) + + # Adjust the build options to the favored ones for this build + self.adjustBuildTypeParams_cmakeOptions(spec, cmakeOptions) + + cmake('..', *cmakeOptions) + make("clean") make() make("install") elif '+cbtf' in spec: instrumentor_setting = "cbtf" + resolve_symbols = "symtabapi" cmake_prefix_path = join_path(spec['cbtf'].prefix) + ':' + join_path(spec['cbtf-krell'].prefix) + ':' + join_path(spec['dyninst'].prefix) + #runtime_platform_cray = "cray" + #if '+cray' in spec: + # if '+runtime' in spec: + # #-DCBTF_KRELL_CN_RUNTIME_DIR=${CBTF_KRELL_CN_INSTALL_DIR} \ + # with working_dir('build_cbtf_cray_runtime', create=True): + # python_vers='%d.%d' % spec['python'].version[:2] + # cmake('..', + # '-DCMAKE_INSTALL_PREFIX=%s' % prefix, + # '-DCMAKE_LIBRARY_PATH=%s' % prefix.lib64, + # '-DRUNTIME_PLATFORM=%s' % runtime_platform_cray, + # '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path, + # '-DRESOLVE_SYMBOLS=%s' % resolve_symbols, + # '-DINSTRUMENTOR=%s' % instrumentor_setting, + # '-DCBTF_DIR=%s' % spec['cbtf'].prefix, + # '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix, + # '-DCBTF_KRELL_CN_RUNTIME_DIR=%s' % spec['cbtf-krell'].prefix, + # '-DBINUTILS_DIR=%s' % spec['binutils'].prefix, + # '-DLIBELF_DIR=%s' % spec['libelf'].prefix, + # '-DLIBDWARF_DIR=%s' % spec['libdwarf'].prefix, + # '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix, + # '-DPAPI_DIR=%s' % spec['papi'].prefix, + # '-DDYNINST_DIR=%s' % spec['dyninst'].prefix, + # '-DXERCESC_DIR=%s' % spec['xerces-c'].prefix, + # '-DMRNET_DIR=%s' % spec['mrnet'].prefix, + # '-DBoost_NO_SYSTEM_PATHS=TRUE', + # '-DBOOST_ROOT=%s' % spec['boost'].prefix, + # *std_cmake_args) + + # make("clean") + # make() + # make("install") + + + #elif '+mic' in spec: + # comment out else and shift over the default case below until arch detection is in + #else: + if '+runtime' in spec: with working_dir('build_cbtf_runtime', create=True): python_vers='%d.%d' % spec['python'].version[:2] @@ -203,14 +334,63 @@ class Openspeedshop(Package): # tbd - #if '+intelmic' in spec: - # with working_dir('build_intelmic_compute', create=True): - # tbd - # with working_dir('build_intelmic_frontend', create=True): - # tbd - #if '+cray' in spec: - # with working_dir('build_cray_compute', create=True): - # tbd - # with working_dir('build_cray_frontend', create=True): - # tbd + #if '+cbtf' in spec: + # if cray build type detected: + # if '+runtime' in spec: + # with working_dir('build_cray_cbtf_compute', create=True): + # tbd + # else: + # with working_dir('build_cray_cbtf_frontend', create=True): + # tbd + # with working_dir('build_cray_osscbtf_frontend', create=True): + # tbd + # fi + # elif '+intelmic' in spec: + # if '+runtime' in spec: + # with working_dir('build_intelmic_cbtf_compute', create=True): + # tbd + # else: + # with working_dir('build_intelmic_cbtf_frontend', create=True): + # tbd + # with working_dir('build_intelmic_osscbtf_frontend', create=True): + # fi + # else + # with working_dir('build_cluster_cbtf', create=True): + # tbd + # with working_dir('build_cluster osscbtf', create=True): + # tbd + # fi + #elif '+offline' in spec: + # if cray build type detected: + # if '+runtime' in spec: + # with working_dir('build_cray_ossoff_compute', create=True): + # tbd + # else: + # with working_dir('build_cray_ossoff_frontend', create=True): + # tbd + # fi + # elif '+intelmic' in spec: + # if '+runtime' in spec: + # with working_dir('build_intelmic_ossoff_compute', create=True): + # tbd + # else: + # with working_dir('build_intelmic_ossoff_frontend', create=True): + # tbd + # fi + # elif bgq build type detected: + # if '+runtime' in spec: + # with working_dir('build_bgq_ossoff_compute', create=True): + # tbd + # else: + # with working_dir('build_bgq_ossoff_frontend', create=True): + # tbd + # fi + # else + # with working_dir('build_cluster ossoff', create=True): + # tbd + # fi + #fi + + + -- cgit v1.2.3-70-g09d2 From 5deaaa278ce011e2a143dd017a494d97378959c4 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 19 Apr 2016 14:25:12 +0200 Subject: modules : added a few unit tests --- lib/spack/spack/modules.py | 6 +- lib/spack/spack/test/__init__.py | 1 + lib/spack/spack/test/modules.py | 126 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 4 deletions(-) create mode 100644 lib/spack/spack/test/modules.py diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 5bf003f9ad..bcccf2f9b8 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -132,17 +132,15 @@ def dependencies(spec, request='all'): if request == 'none': return [] - l = [xx for xx in - sorted(spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] - if request == 'direct': - return [xx for ii, xx in l if ii == 1] + return [xx for _, xx in spec.dependencies.items()] # FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes' # FIXME : is given. This work around permits to get a unique list of spec anyhow. # FIXME : Possibly we miss a merge step among nodes that refer to the same package. seen = set() seen_add = seen.add + l = [xx for xx in sorted(spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] return [xx for ii, xx in l if not (xx in seen or seen_add(xx))] diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index 175a49428c..b1c91c7903 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -54,6 +54,7 @@ test_names = ['versions', 'svn_fetch', 'hg_fetch', 'mirror', + 'modules', 'url_extrapolate', 'cc', 'link_tree', diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py new file mode 100644 index 0000000000..21afa355e7 --- /dev/null +++ b/lib/spack/spack/test/modules.py @@ -0,0 +1,126 @@ +import collections +from contextlib import contextmanager + +import StringIO + +FILE_REGISTRY = collections.defaultdict(StringIO.StringIO) + +# Monkey-patch open to write module files to a StringIO instance +@contextmanager +def mock_open(filename, mode): + if not mode == 'w': + raise RuntimeError('test.modules : unexpected opening mode for monkey-patched open') + + FILE_REGISTRY[filename] = StringIO.StringIO() + + try: + yield FILE_REGISTRY[filename] + finally: + handle = FILE_REGISTRY[filename] + FILE_REGISTRY[filename] = handle.getvalue() + handle.close() + +import spack.modules + +configuration_autoload_direct = { + 'enable': ['tcl'], + 'tcl': { + 'all': { + 'autoload': 'direct' + } + } +} + +configuration_autoload_all = { + 'enable': ['tcl'], + 'tcl': { + 'all': { + 'autoload': 'all' + } + } +} + +configuration_alter_environment = { + 'enable': ['tcl'], + 'tcl': { + 'all': { + 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']} + }, + '=x86-linux': { + 'environment': {'set': ['FOO,foo'], 'unset': ['BAR']} + } + } +} + +configuration_blacklist = { + 'enable': ['tcl'], + 'tcl': { + 'blacklist': ['callpath'], + 'all': { + 'autoload': 'direct' + } + } +} + +from spack.test.mock_packages_test import MockPackagesTest + + +class TclTests(MockPackagesTest): + def setUp(self): + super(TclTests, self).setUp() + self.configuration_obj = spack.modules.CONFIGURATION + spack.modules.open = mock_open + spack.modules.CONFIGURATION = None # Make sure that a non-mocked configuration will trigger an error + + def tearDown(self): + del spack.modules.open + spack.modules.CONFIGURATION = self.configuration_obj + super(TclTests, self).tearDown() + + def get_modulefile_content(self, spec): + spec.concretize() + generator = spack.modules.TclModule(spec) + generator.write() + content = FILE_REGISTRY[generator.file_name].split('\n') + return content + + def test_simple_case(self): + spack.modules.CONFIGURATION = configuration_autoload_direct + spec = spack.spec.Spec('mpich@3.0.4=x86-linux') + content = self.get_modulefile_content(spec) + self.assertTrue('module-whatis "mpich @3.0.4"' in content ) + self.assertEqual(len([x for x in content if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 1) + + def test_autoload(self): + spack.modules.CONFIGURATION = configuration_autoload_direct + spec = spack.spec.Spec('mpileaks=x86-linux') + content = self.get_modulefile_content(spec) + self.assertEqual(len([x for x in content if 'is-loaded' in x]), 2) + self.assertEqual(len([x for x in content if 'module load ' in x]), 2) + + spack.modules.CONFIGURATION = configuration_autoload_all + spec = spack.spec.Spec('mpileaks=x86-linux') + content = self.get_modulefile_content(spec) + self.assertEqual(len([x for x in content if 'is-loaded' in x]), 5) + self.assertEqual(len([x for x in content if 'module load ' in x]), 5) + + def test_alter_environment(self): + spack.modules.CONFIGURATION = configuration_alter_environment + spec = spack.spec.Spec('mpileaks=x86-linux') + content = self.get_modulefile_content(spec) + self.assertEqual(len([x for x in content if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) + self.assertEqual(len([x for x in content if 'setenv FOO "foo"' in x]), 1) + self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 1) + + spec = spack.spec.Spec('libdwarf=x64-linux') + content = self.get_modulefile_content(spec) + self.assertEqual(len([x for x in content if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) + self.assertEqual(len([x for x in content if 'setenv FOO "foo"' in x]), 0) + self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 0) + + def test_blacklist(self): + spack.modules.CONFIGURATION = configuration_blacklist + spec = spack.spec.Spec('mpileaks=x86-linux') + content = self.get_modulefile_content(spec) + self.assertEqual(len([x for x in content if 'is-loaded' in x]), 1) + self.assertEqual(len([x for x in content if 'module load ' in x]), 1) -- cgit v1.2.3-70-g09d2 From 1acb2a1a09a25a042e30426a70bf96bdb8c489fa Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 19 Apr 2016 16:45:05 -0400 Subject: Add some qthreads patches --- var/spack/repos/builtin/packages/qthreads/ldflags.patch | 11 +++++++++++ var/spack/repos/builtin/packages/qthreads/package.py | 7 ++++++- var/spack/repos/builtin/packages/qthreads/restrict.patch | 12 ++++++++++++ var/spack/repos/builtin/packages/qthreads/trap.patch | 11 +++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/qthreads/ldflags.patch create mode 100644 var/spack/repos/builtin/packages/qthreads/restrict.patch create mode 100644 var/spack/repos/builtin/packages/qthreads/trap.patch diff --git a/var/spack/repos/builtin/packages/qthreads/ldflags.patch b/var/spack/repos/builtin/packages/qthreads/ldflags.patch new file mode 100644 index 0000000000..0c15eab386 --- /dev/null +++ b/var/spack/repos/builtin/packages/qthreads/ldflags.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -40456,7 +40456,7 @@ + hwloc_saved_LDFLAGS="$LDFLAGS" + if test "x$with_hwloc" != x; then + CPPFLAGS="-I$with_hwloc/include $CPPFLAGS" +- LDFLAGS="-L$with_hwloc/lib $CPPFLAGS" ++ LDFLAGS="-L$with_hwloc/lib $LDFLAGS" + fi + + diff --git a/var/spack/repos/builtin/packages/qthreads/package.py b/var/spack/repos/builtin/packages/qthreads/package.py index dacdb71524..5da9340927 100644 --- a/var/spack/repos/builtin/packages/qthreads/package.py +++ b/var/spack/repos/builtin/packages/qthreads/package.py @@ -16,7 +16,12 @@ class Qthreads(Package): version('1.10', '5af8c8bbe88c2a6d45361643780d1671') + patch("ldflags.patch") + patch("restrict.patch") + patch("trap.patch") + def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + configure("--prefix=%s" % prefix, + "--enable-guard-pages") make() make("install") diff --git a/var/spack/repos/builtin/packages/qthreads/restrict.patch b/var/spack/repos/builtin/packages/qthreads/restrict.patch new file mode 100644 index 0000000000..4c95714f6b --- /dev/null +++ b/var/spack/repos/builtin/packages/qthreads/restrict.patch @@ -0,0 +1,12 @@ +--- a/include/qthread/common.h.in ++++ b/include/qthread/common.h.in +@@ -84,7 +84,9 @@ + /* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ ++#ifndef restrict + #undef restrict ++#endif + /* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the diff --git a/var/spack/repos/builtin/packages/qthreads/trap.patch b/var/spack/repos/builtin/packages/qthreads/trap.patch new file mode 100644 index 0000000000..7aa94d82d5 --- /dev/null +++ b/var/spack/repos/builtin/packages/qthreads/trap.patch @@ -0,0 +1,11 @@ +--- a/include/qthread/qthread.hpp ++++ b/include/qthread/qthread.hpp +@@ -236,7 +236,7 @@ + return qthread_incr64((uint64_t *)operand, incr); + + default: +- *(int *)(0) = 0; ++ __builtin_trap(); + } + return T(0); // never hit - keep compiler happy + } -- cgit v1.2.3-70-g09d2 From e92da6a6ba02bdc3c879f9df8be6ee4aac2583d3 Mon Sep 17 00:00:00 2001 From: Adam Lyon Date: Mon, 8 Feb 2016 02:34:24 -0600 Subject: Handle c++11 and c++14 correctly --- lib/spack/spack/compiler.py | 3 +++ lib/spack/spack/compilers/gcc.py | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index d38c0b00b1..20896f9eec 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -97,6 +97,9 @@ class Compiler(object): # argument used to get C++11 options cxx11_flag = "-std=c++11" + # argument used to get C++14 options + cxx14_flag = "-std=c++1y" + def __init__(self, cspec, cc, cxx, f77, fc): def check(exe): diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py index 64214db32d..2e57e44856 100644 --- a/lib/spack/spack/compilers/gcc.py +++ b/lib/spack/spack/compilers/gcc.py @@ -54,9 +54,16 @@ class Gcc(Compiler): if self.version < ver('4.3'): tty.die("Only gcc 4.3 and above support c++11.") elif self.version < ver('4.7'): - return "-std=gnu++0x" + return "-std=c++0x" else: - return "-std=gnu++11" + return "-std=c++11" + + @property + def cxx14_flag(self): + if self.version < ver('4.8'): + tty.die("Only gcc 4.8 and above support c++14.") + else: + return "-std=c++14" @classmethod def fc_version(cls, fc): -- cgit v1.2.3-70-g09d2 From 7c155f74567a9e3d949369260e732daf13310269 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 20 Apr 2016 16:33:59 -0400 Subject: Check the installed HDF5 library for consistency --- var/spack/repos/builtin/packages/hdf5/package.py | 63 ++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index cce609eb29..eb58eeb637 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -24,6 +24,8 @@ ############################################################################## from spack import * +import shutil +import subprocess class Hdf5(Package): @@ -114,14 +116,16 @@ class Hdf5(Package): # this is not actually a problem. extra_args.extend([ "--enable-parallel", - "CC=%s" % spec['mpi'].prefix.bin + "/mpicc", + "CC=%s" % join_path(spec['mpi'].prefix.bin, "mpicc"), ]) if '+cxx' in spec: - extra_args.append("CXX=%s" % spec['mpi'].prefix.bin + "/mpic++") + extra_args.append("CXX=%s" % join_path(spec['mpi'].prefix.bin, + "mpic++")) if '+fortran' in spec: - extra_args.append("FC=%s" % spec['mpi'].prefix.bin + "/mpifort") + extra_args.append("FC=%s" % join_path(spec['mpi'].prefix.bin, + "mpifort")) if '+szip' in spec: extra_args.append("--with-szlib=%s" % spec['szip'].prefix) @@ -138,6 +142,59 @@ class Hdf5(Package): *extra_args) make() make("install") + self.check_install(spec) + + def check_install(self, spec): + "Build and run a small program to test the installed HDF5 library" + print "Checking HDF5 installation..." + checkdir = "spack-check" + with working_dir(checkdir, create=True): + source = r""" +#include +#include +#include +int main(int argc, char **argv) { + unsigned majnum, minnum, relnum; + herr_t herr = H5get_libversion(&majnum, &minnum, &relnum); + assert(!herr); + printf("HDF5 version %d.%d.%d %u.%u.%u\n", H5_VERS_MAJOR, H5_VERS_MINOR, + H5_VERS_RELEASE, majnum, minnum, relnum); + return 0; +} +""" + expected = """\ +HDF5 version {version} {version} +""".format(version=str(spec.version)) + with open("check.c", 'w') as f: + f.write(source) + if '+mpi' in spec: + cc = which(join_path(spec['mpi'].prefix.bin, "mpicc")) + else: + cc = which('cc') + # TODO: Automate these path settings + cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") + cc('-o', "check", "check.o", + # I couldn't make libraries work on Darwin + "-L%s" % join_path(spec.prefix, "lib"), "-lhdf5", + # join_path(spec.prefix, "lib", "libhdf5.a"), + "-lz") + try: + output = subprocess.check_output("./check") + except: + output = "" + success = output == expected + if not success: + print "Produced output does not match expected output." + print "Expected output:" + print '-'*80 + print expected + print '-'*80 + print "Produced output:" + print '-'*80 + print output + print '-'*80 + raise RuntimeError("HDF5 install check failed") + shutil.rmtree(checkdir) def url_for_version(self, version): v = str(version) -- cgit v1.2.3-70-g09d2 From 867e1333d0c5973f51944418ad3509ff1cc4e131 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 20 Apr 2016 17:01:26 -0400 Subject: Remove outdated comment --- var/spack/repos/builtin/packages/hdf5/package.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index eb58eeb637..bef34ff5bd 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -171,12 +171,10 @@ HDF5 version {version} {version} cc = which(join_path(spec['mpi'].prefix.bin, "mpicc")) else: cc = which('cc') - # TODO: Automate these path settings + # TODO: Automate these path and library settings cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") cc('-o', "check", "check.o", - # I couldn't make libraries work on Darwin "-L%s" % join_path(spec.prefix, "lib"), "-lhdf5", - # join_path(spec.prefix, "lib", "libhdf5.a"), "-lz") try: output = subprocess.check_output("./check") -- cgit v1.2.3-70-g09d2 From d5d1e89cbdc64a072096db89c2d78e3e1ddc7700 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Thu, 21 Apr 2016 21:15:54 -0500 Subject: remove use of unknown environment variable in lib/spack/env/cc (#821) --- lib/spack/env/cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 18fd8f7bdb..cb07a2ffea 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -162,7 +162,7 @@ fi # It doesn't work with -rpath. # This variable controls whether they are added. add_rpaths=true -if [[ mode == ld && $OSTYPE == darwin* ]]; then +if [[ $mode == ld && "$SPACK_SHORT_SPEC" =~ "darwin" ]]; then for arg in "$@"; do if [[ $arg == -r ]]; then add_rpaths=false -- cgit v1.2.3-70-g09d2 From ef9347bcfb52e7f80aacb4ecb63d1536b8aaa3c0 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 22 Apr 2016 04:25:17 +0200 Subject: dealii: set DEAL_II_DIR when loading a module (#816) --- var/spack/repos/builtin/packages/dealii/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index b251d50ca1..6810e86868 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -251,3 +251,6 @@ class Dealii(Package): cmake('.') make('release') make('run',parallel=False) + + def setup_environment(self, spack_env, env): + env.set('DEAL_II_DIR', self.prefix) -- cgit v1.2.3-70-g09d2 From a0989ad672bd22afe89ee2c2f50b32003ebb2764 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 22 Apr 2016 04:26:19 +0200 Subject: minor cleanup of environment-modules documentation (#814) * minor cleanup of environment-modules documentation * environment modules: update usage instructions --- lib/spack/docs/basic_usage.rst | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 68f3d07b29..0e603813e1 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -807,17 +807,22 @@ Environment Modules, you can get it with Spack: 1. Install with:: +.. code-block:: sh + spack install environment-modules 2. Activate with:: - MODULES_HOME=`spack location -i environment-modules` - MODULES_VERSION=`ls -1 $MODULES_HOME/Modules | head -1` - ${MODULES_HOME}/Modules/${MODULES_VERSION}/bin/add.modules +Add the following two lines to your ``.bashrc`` profile (or similar): + +.. code-block:: sh + + MODULES_HOME=`spack location -i environment-modules` + source ${MODULES_HOME}/Modules/init/bash + +In case you use a Unix shell other than bash, substitute ``bash`` by +the appropriate file in ``${MODULES_HOME}/Modules/init/``. -This adds to your ``.bashrc`` (or similar) files, enabling Environment -Modules when you log in. It will ask your permission before changing -any files. Spack and Environment Modules ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3-70-g09d2 From 5c4bb69af9cceca0b3c4380357ab6e74e7554067 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 21 Apr 2016 22:29:20 -0400 Subject: xerces-c: update to 3.1.3 (#811) The 3.1.2 tarball seems to have gone missing. Also switch to using bz2 rather than gz to reduce the download size. --- var/spack/repos/builtin/packages/xerces-c/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py index b59ab178ae..e36fb936e0 100644 --- a/var/spack/repos/builtin/packages/xerces-c/package.py +++ b/var/spack/repos/builtin/packages/xerces-c/package.py @@ -24,8 +24,8 @@ class XercesC(Package): """ homepage = "https://xerces.apache.org/xerces-c" - url = "https://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.2.tar.gz" - version('3.1.2', '9eb1048939e88d6a7232c67569b23985') + url = "https://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.3.tar.bz2" + version('3.1.3', '5e333b55cb43e6b025ddf0e5d0f0fb0d') def install(self, spec, prefix): configure("--prefix=%s" % prefix, -- cgit v1.2.3-70-g09d2 From fa02f94ca4bada75cca4248665bbc007412294c5 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 21 Apr 2016 23:10:10 -0700 Subject: Regression test for not adding RPATHs with `ld -r` (#809, #821) - ld -r is only broken with rpaths on OSX; this tests that specific case. - test should still work cross-platform. --- lib/spack/spack/test/cc.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index 0b1aeb2a8f..594cd6efe9 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -219,3 +219,27 @@ class CompilerTest(unittest.TestCase): ' '.join(test_command)) + def test_ld_deps_reentrant(self): + """Make sure ld -r is handled correctly on OS's where it doesn't + support rpaths.""" + os.environ['SPACK_DEPENDENCIES'] = ':'.join([self.dep1]) + + os.environ['SPACK_SHORT_SPEC'] = "foo@1.2=linux-x86_64" + reentrant_test_command = ['-r'] + test_command + self.check_ld('dump-args', reentrant_test_command, + 'ld ' + + '-rpath ' + self.prefix + '/lib ' + + '-rpath ' + self.prefix + '/lib64 ' + + + '-L' + self.dep1 + '/lib ' + + '-rpath ' + self.dep1 + '/lib ' + + + '-r ' + + ' '.join(test_command)) + + os.environ['SPACK_SHORT_SPEC'] = "foo@1.2=darwin-x86_64" + self.check_ld('dump-args', reentrant_test_command, + 'ld ' + + '-L' + self.dep1 + '/lib ' + + '-r ' + + ' '.join(test_command)) -- cgit v1.2.3-70-g09d2 From 67a01ef2ee182697df49f808654cf17f0e164b4a Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 22 Apr 2016 10:50:24 +0200 Subject: tcl : extended conflict to be an array of strings --- lib/spack/spack/config.py | 2 +- lib/spack/spack/modules.py | 30 ++++++++++++++++++------------ lib/spack/spack/test/modules.py | 18 ++++++++++++++++++ 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 1ac8a01619..71cdff09ea 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -276,7 +276,7 @@ section_schemas = { }, 'autoload': {'$ref': '#/definitions/dependency_selection'}, 'prerequisites': {'$ref': '#/definitions/dependency_selection'}, - 'conflict': {'type': 'string'}, + 'conflict': {'$ref': '#/definitions/array_of_strings'}, 'environment': { 'type': 'object', 'default': {}, diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index bcccf2f9b8..57a4a2c754 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -46,6 +46,7 @@ import os import os.path import re import textwrap +import string import llnl.util.tty as tty import spack @@ -499,15 +500,20 @@ class TclModule(EnvModule): def module_specific_content(self, configuration): naming_tokens = self.tokens # Conflict - conflict_format = configuration.get('conflict', '') - if conflict_format: - for naming_dir, conflict_dir in zip(self.naming_scheme.split('/'), conflict_format.split('/')): - if naming_dir != conflict_dir: - message = 'Conflict scheme does not match naming scheme [{spec}]\n\n' - message += 'naming scheme : "{nformat}"\n' - message += 'conflict scheme : "{cformat}"\n' - raise tty.error( - message.format(spec=self.spec, nformat=self.naming_scheme, cformat=conflict_format) - ) - conflict_format = 'conflict ' + conflict_format - yield conflict_format.format(**naming_tokens) + conflict_format = configuration.get('conflict', []) + f = string.Formatter() + for item in conflict_format: + line = 'conflict ' + item + '\n' + if len([x for x in f.parse(line)]) > 1: # We do have placeholder to substitute + for naming_dir, conflict_dir in zip(self.naming_scheme.split('/'), item.split('/')): + if naming_dir != conflict_dir: + message = 'conflict scheme does not match naming scheme [{spec}]\n\n' + message += 'naming scheme : "{nformat}"\n' + message += 'conflict scheme : "{cformat}"\n\n' + message += '** You may want to check your `modules.yaml` configuration file **\n' + tty.error( + message.format(spec=self.spec, nformat=self.naming_scheme, cformat=item) + ) + raise SystemExit('Module generation aborted.') + line = line.format(**naming_tokens) + yield line diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 21afa355e7..704700417b 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -62,6 +62,16 @@ configuration_blacklist = { } } +configuration_conflicts = { + 'enable': ['tcl'], + 'tcl': { + 'naming_scheme': '{name}/{version}-{compiler.name}', + 'all': { + 'conflict': ['{name}', 'intel/14.0.1'] + } + } +} + from spack.test.mock_packages_test import MockPackagesTest @@ -124,3 +134,11 @@ class TclTests(MockPackagesTest): content = self.get_modulefile_content(spec) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 1) self.assertEqual(len([x for x in content if 'module load ' in x]), 1) + + def test_conflicts(self): + spack.modules.CONFIGURATION = configuration_conflicts + spec = spack.spec.Spec('mpileaks=x86-linux') + content = self.get_modulefile_content(spec) + self.assertEqual(len([x for x in content if x.startswith('conflict')]), 2) + self.assertEqual(len([x for x in content if x == 'conflict mpileaks']), 1) + self.assertEqual(len([x for x in content if x == 'conflict intel/14.0.1']), 1) -- cgit v1.2.3-70-g09d2 From e7d2fa7084a63d73fe19607a442e47036a3f864b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 22 Apr 2016 12:30:24 -0500 Subject: Add IOR benchmark package --- var/spack/repos/builtin/packages/ior/package.py | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ior/package.py diff --git a/var/spack/repos/builtin/packages/ior/package.py b/var/spack/repos/builtin/packages/ior/package.py new file mode 100644 index 0000000000..3ede3d7e37 --- /dev/null +++ b/var/spack/repos/builtin/packages/ior/package.py @@ -0,0 +1,38 @@ +from spack import * +import os + +class Ior(Package): + """The IOR software is used for benchmarking parallel file systems + using POSIX, MPI-IO, or HDF5 interfaces.""" + + homepage = "http://www.nersc.gov/users/computational-systems/cori/nersc-8-procurement/trinity-nersc-8-rfp/nersc-8-trinity-benchmarks/ior/" + url = "https://github.com/LLNL/ior/archive/3.0.1.tar.gz" + + version('3.0.1', '71150025e0bb6ea1761150f48b553065') + + variant('hdf5', default=False, description='support IO with HDF5 backend') + variant('ncmpi', default=False, description='support IO with NCMPI backend') + + depends_on('mpi') + depends_on('hdf5+mpi', when='+hdf5') + depends_on('netcdf+mpi', when='+ncmpi') + + + def install(self, spec, prefix): + os.system('./bootstrap') + + config_args = [ + 'MPICC=%s' % spec['mpi'].prefix.bin + '/mpicc', + '--prefix=%s' % prefix, + ] + + if '+hdf5' in spec: + config_args.append('--with-hdf5') + + if '+ncmpi' in spec: + config_args.append('--with-ncmpi') + + configure(*config_args) + + make() + make('install') -- cgit v1.2.3-70-g09d2 From 0cbaecca60d5852ef0fe0d1378c685ff1dc65fd1 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 22 Apr 2016 21:52:11 -0400 Subject: Don't use subprocess module --- var/spack/repos/builtin/packages/hdf5/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index bef34ff5bd..333c63c288 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -25,7 +25,6 @@ from spack import * import shutil -import subprocess class Hdf5(Package): @@ -177,7 +176,8 @@ HDF5 version {version} {version} "-L%s" % join_path(spec.prefix, "lib"), "-lhdf5", "-lz") try: - output = subprocess.check_output("./check") + check = Executable('./check') + output = check(return_output=True) except: output = "" success = output == expected -- cgit v1.2.3-70-g09d2 From 62d175c984c5413fd95185d7bb3280bad69e1e33 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 23 Apr 2016 12:30:34 -0500 Subject: This commit explicitly sets `libdir`. This is necessary because different systems use different defaults. --- var/spack/repos/builtin/packages/R/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 3a76416f27..7c4aa3520c 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -50,9 +50,12 @@ class R(Package): depends_on('tk') def install(self, spec, prefix): + rlibdir = join_path(prefix, 'rlib') options = ['--prefix=%s' % prefix, + '--libdir=%s' % rlibdir, '--enable-R-shlib', - '--enable-BLAS-shlib'] + '--enable-BLAS-shlib', + '--enable-R-framework=no'] if '+external-lapack' in spec: options.extend(['--with-blas', '--with-lapack']) @@ -66,7 +69,7 @@ class R(Package): @property def r_lib_dir(self): - return os.path.join('lib64', 'R', 'library') + return os.path.join('rlib', 'R', 'library') def setup_dependent_environment(self, spack_env, run_env, extension_spec): # Set R_LIBS to include the library dir for the -- cgit v1.2.3-70-g09d2 From d701d2ccf344ff22fee463504dd85e1d0a5bfdc6 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Sat, 23 Apr 2016 12:15:14 -0700 Subject: Updated the Swig package file to include versions for all of the popular Swig releases. (#790) --- var/spack/repos/builtin/packages/swig/package.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index 8d46c4fe46..78a6c6bbae 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -22,6 +22,7 @@ # 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 Swig(Package): @@ -33,14 +34,19 @@ class Swig(Package): code. In addition, SWIG provides a variety of customization features that let you tailor the wrapping process to suit your application.""" + homepage = "http://www.swig.org" - url = "http://prdownloads.sourceforge.net/swig/swig-3.0.2.tar.gz" + url = "http://prdownloads.sourceforge.net/swig/swig-3.0.8.tar.gz" + version('3.0.8', 'c96a1d5ecb13d38604d7e92148c73c97') version('3.0.2', '62f9b0d010cef36a13a010dc530d0d41') + version('2.0.12', 'c3fb0b2d710cc82ed0154b91e43085a4') + version('2.0.2', 'eaf619a4169886923e5f828349504a29') + version('1.3.40', '2df766c9e03e02811b1ab4bba1c7b9cc') depends_on('pcre') def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + configure('--prefix=%s' % prefix) make() - make("install") + make('install') -- cgit v1.2.3-70-g09d2 From 4e062d86b4213595e74510f9b8d91382ed4e1041 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 23 Apr 2016 15:15:32 -0400 Subject: Refine wget's OpenSSL configuration options (#786) --- var/spack/repos/builtin/packages/wget/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/wget/package.py b/var/spack/repos/builtin/packages/wget/package.py index 55728b0515..4b92659478 100644 --- a/var/spack/repos/builtin/packages/wget/package.py +++ b/var/spack/repos/builtin/packages/wget/package.py @@ -17,6 +17,8 @@ class Wget(Package): def install(self, spec, prefix): configure("--prefix=%s" % prefix, - "--with-ssl=openssl") + "--with-ssl=openssl", + "OPENSSL_CFLAGS=-I%s" % spec['openssl'].prefix.include, + "OPENSSL_LIBS=-L%s -lssl -lcrypto -lz" % spec['openssl'].prefix.lib) make() make("install") -- cgit v1.2.3-70-g09d2 From 248248c6b270e2c1707ea29e90de74813ea2debf Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Sat, 23 Apr 2016 15:15:53 -0400 Subject: Added package: NCView (#791) * ncview: Added package * Removed FIXMEs --- var/spack/repos/builtin/packages/ncview/package.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ncview/package.py diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py new file mode 100644 index 0000000000..1aa13e3f03 --- /dev/null +++ b/var/spack/repos/builtin/packages/ncview/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Ncview(Package): + """Simple viewer for NetCDF files.""" + homepage = "http://meteora.ucsd.edu/~pierce/ncview_home_page.html" + url = "ftp://cirrus.ucsd.edu/pub/ncview/ncview-2.1.7.tar.gz" + + version('2.1.7', 'debd6ca61410aac3514e53122ab2ba07') + + depends_on("netcdf") + depends_on("udunits2") + + # OS Dependencies + # Ubuntu: apt-get install libxaw7-dev + # CentOS 7: yum install libXaw-devel + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") -- cgit v1.2.3-70-g09d2 From e32416430c16a51af673a78fb79d47c68464fa98 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 23 Apr 2016 15:18:58 -0400 Subject: Update git (#819) * git: update to 2.8.0 final and add 2.8.1 * git: hard-depend on curl and expat HTTP-based cloning is very prevalent now. --- var/spack/repos/builtin/packages/git/package.py | 32 ++++++------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 388f84aefd..77521fd658 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -7,7 +7,8 @@ class Git(Package): homepage = "http://git-scm.com" url = "https://github.com/git/git/tarball/v2.7.1" - version('2.8.0-rc2', 'c2cf9f2cc70e35f2fafbaf9258f82e4c') + version('2.8.1', '1308448d95afa41a4135903f22262fc8') + version('2.8.0', 'eca687e46e9750121638f258cff8317b') version('2.7.3', 'fa1c008b56618c355a32ba4a678305f6') version('2.7.1', 'bf0706b433a8dedd27a63a72f9a66060') @@ -23,18 +24,10 @@ class Git(Package): #version('2.2.1', 'ff41fdb094eed1ec430aed8ee9b9849c') - # Git compiles with curl support by default on but if your system - # does not have it you will not be able to clone https repos - variant("curl", default=False, description="Add the internal support of curl for https clone") - - # Git compiles with expat support by default on but if your system - # does not have it you will not be able to push https repos - variant("expat", default=False, description="Add the internal support of expat for https push") - depends_on("openssl") depends_on("autoconf") - depends_on("curl", when="+curl") - depends_on("expat", when="+expat") + depends_on("curl") + depends_on("expat") # Also depends_on gettext: apt-get install gettext (Ubuntu) @@ -49,23 +42,12 @@ class Git(Package): "--prefix=%s" % prefix, "--without-pcre", "--with-openssl=%s" % spec['openssl'].prefix, - "--with-zlib=%s" % spec['zlib'].prefix + "--with-zlib=%s" % spec['zlib'].prefix, + "--with-curl=%s" % spec['curl'].prefix, + "--with-expat=%s" % spec['expat'].prefix, ] - if '+curl' in spec: - configure_args.append("--with-curl=%s" % spec['curl'].prefix) - - if '+expat' in spec: - configure_args.append("--with-expat=%s" % spec['expat'].prefix) - which('autoreconf')('-i') configure(*configure_args) make() make("install") - - - - - - - -- cgit v1.2.3-70-g09d2 From 22e4ee560465a633f7dd8e84a2e7088d8dcf547f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 23 Apr 2016 15:29:47 -0500 Subject: Add OSU Micro-Benchmarks package (#822) * Add OSU Micro-Benchmarks package * Add workaround for GCC bug --- .../packages/osu-micro-benchmarks/package.py | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py diff --git a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py new file mode 100644 index 0000000000..01054471a3 --- /dev/null +++ b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py @@ -0,0 +1,38 @@ +from spack import * + +class OsuMicroBenchmarks(Package): + """The Ohio MicroBenchmark suite is a collection of independent MPI + message passing performance microbenchmarks developed and written at + The Ohio State University. It includes traditional benchmarks and + performance measures such as latency, bandwidth and host overhead + and can be used for both traditional and GPU-enhanced nodes.""" + + homepage = "http://mvapich.cse.ohio-state.edu/benchmarks/" + url = "http://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-5.3.tar.gz" + + version('5.3', '42e22b931d451e8bec31a7424e4adfc2') + + variant('cuda', default=False, description="Enable CUDA support") + + depends_on('mpi') + depends_on('cuda', when='+cuda') + + + def install(self, spec, prefix): + config_args = [ + 'CC=%s' % spec['mpi'].prefix.bin + '/mpicc', + 'CXX=%s' % spec['mpi'].prefix.bin + '/mpicxx', + 'LDFLAGS=-lrt', + '--prefix=%s' % prefix + ] + + if '+cuda' in spec: + config_args.extend([ + '--enable-cuda', + '--with-cuda=%s' % spec['cuda'].prefix, + ]) + + configure(*config_args) + + make() + make('install') -- cgit v1.2.3-70-g09d2 From ed16bd133afd4c4da48f9d92e0d8578fd3719c72 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 23 Apr 2016 16:34:51 -0400 Subject: compiler: add "find" subcommand (#818) And make "add" an alias to it. Fixes #713. --- lib/spack/spack/cmd/compiler.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 3e58e82184..a8e9e2a7a5 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -44,10 +44,10 @@ def setup_parser(subparser): scopes = spack.config.config_scopes - # Add - add_parser = sp.add_parser('add', help='Add compilers to the Spack configuration.') - add_parser.add_argument('add_paths', nargs=argparse.REMAINDER) - add_parser.add_argument('--scope', choices=scopes, default=spack.cmd.default_modify_scope, + # Find + find_parser = sp.add_parser('find', aliases=['add'], help='Search the system for compilers to add to the Spack configuration.') + find_parser.add_argument('add_paths', nargs=argparse.REMAINDER) + find_parser.add_argument('--scope', choices=scopes, default=spack.cmd.default_modify_scope, help="Configuration scope to modify.") # Remove @@ -70,7 +70,7 @@ def setup_parser(subparser): help="Configuration scope to read from.") -def compiler_add(args): +def compiler_find(args): """Search either $PATH or a list of paths for compilers and add them to Spack's configuration.""" paths = args.add_paths @@ -136,7 +136,8 @@ def compiler_list(args): def compiler(parser, args): - action = { 'add' : compiler_add, + action = { 'add' : compiler_find, + 'find' : compiler_find, 'remove' : compiler_remove, 'rm' : compiler_remove, 'info' : compiler_info, -- cgit v1.2.3-70-g09d2 From a7ffffc336beff3ba2ef98a82ec16c35d65c7982 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 24 Apr 2016 17:14:33 -0500 Subject: Change homepage, explicitly disable --- var/spack/repos/builtin/packages/ior/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/ior/package.py b/var/spack/repos/builtin/packages/ior/package.py index 3ede3d7e37..c46650a674 100644 --- a/var/spack/repos/builtin/packages/ior/package.py +++ b/var/spack/repos/builtin/packages/ior/package.py @@ -5,7 +5,7 @@ class Ior(Package): """The IOR software is used for benchmarking parallel file systems using POSIX, MPI-IO, or HDF5 interfaces.""" - homepage = "http://www.nersc.gov/users/computational-systems/cori/nersc-8-procurement/trinity-nersc-8-rfp/nersc-8-trinity-benchmarks/ior/" + homepage = "https://github.com/LLNL/ior" url = "https://github.com/LLNL/ior/archive/3.0.1.tar.gz" version('3.0.1', '71150025e0bb6ea1761150f48b553065') @@ -28,9 +28,13 @@ class Ior(Package): if '+hdf5' in spec: config_args.append('--with-hdf5') + else: + config_args.append('--without-hdf5') if '+ncmpi' in spec: config_args.append('--with-ncmpi') + else: + config_args.append('--without-ncmpi') configure(*config_args) -- cgit v1.2.3-70-g09d2 From 797af2e80f0effddeca2b964283705940fa45df8 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 24 Apr 2016 17:39:49 -0500 Subject: Add py-csvkit package This adds the py-csvkit package and needed dependencies for working with csv files. --- .../builtin/packages/py-SQLAlchemy/package.py | 15 ++++++++++++++ .../repos/builtin/packages/py-csvkit/package.py | 23 ++++++++++++++++++++++ var/spack/repos/builtin/packages/py-dbf/package.py | 17 ++++++++++++++++ .../repos/builtin/packages/py-jdcal/package.py | 15 ++++++++++++++ .../repos/builtin/packages/py-openpyxl/package.py | 18 +++++++++++++++++ .../repos/builtin/packages/py-xlrd/package.py | 16 +++++++++++++++ 6 files changed, 104 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-SQLAlchemy/package.py create mode 100644 var/spack/repos/builtin/packages/py-csvkit/package.py create mode 100644 var/spack/repos/builtin/packages/py-dbf/package.py create mode 100644 var/spack/repos/builtin/packages/py-jdcal/package.py create mode 100644 var/spack/repos/builtin/packages/py-openpyxl/package.py create mode 100644 var/spack/repos/builtin/packages/py-xlrd/package.py diff --git a/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py new file mode 100644 index 0000000000..ccb882f749 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PySqlalchemy(Package): + """ + The Python SQL Toolkit and Object Relational Mapper + """ + homepage = 'http://www.sqlalchemy.org/' + url = "https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-1.0.12.tar.gz" + + version('1.0.12', '6d19ef29883bbebdcac6613cf391cac4') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-csvkit/package.py b/var/spack/repos/builtin/packages/py-csvkit/package.py new file mode 100644 index 0000000000..1ab848161d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-csvkit/package.py @@ -0,0 +1,23 @@ +from spack import * + +class PyCsvkit(Package): + """ + A library of utilities for working with CSV, the king of tabular file + formats + """ + homepage = 'http://csvkit.rtfd.org/' + url = "https://pypi.python.org/packages/source/c/csvkit/csvkit-0.9.1.tar.gz" + + version('0.9.1', '48d78920019d18846933ee969502fff6') + + 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') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-dbf/package.py b/var/spack/repos/builtin/packages/py-dbf/package.py new file mode 100644 index 0000000000..75c32b2d61 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-dbf/package.py @@ -0,0 +1,17 @@ +from spack import * + +class PyDbf(Package): + """ + Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro + .dbf files (including memos). + """ + + homepage = 'https://pypi.python.org/pypi/dbf' + url = "https://pypi.python.org/packages/source/d/dbf/dbf-0.96.005.tar.gz" + + version('0.96.005', 'bce1a1ed8b454a30606e7e18dd2f8277') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-jdcal/package.py b/var/spack/repos/builtin/packages/py-jdcal/package.py new file mode 100644 index 0000000000..a2fcbe119c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-jdcal/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyJdcal(Package): + """ + Julian dates from proleptic Gregorian and Julian calendars + """ + homepage = 'http://github.com/phn/jdcal' + url = "https://pypi.python.org/packages/source/j/jdcal/jdcal-1.2.tar.gz" + + version('1.2', 'ab8d5ba300fd1eb01514f363d19b1eb9') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-openpyxl/package.py b/var/spack/repos/builtin/packages/py-openpyxl/package.py new file mode 100644 index 0000000000..5954c4758a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-openpyxl/package.py @@ -0,0 +1,18 @@ +from spack import * + +class PyOpenpyxl(Package): + """ + A Python library to read/write Excel 2007 xlsx/xlsm files + """ + homepage = 'http://openpyxl.readthedocs.org/' + url = "https://pypi.python.org/packages/source/o/openpyxl/openpyxl-2.4.0-a1.tar.gz" + + version('2.4.0-a1', 'e5ca6d23ceccb15115d45cdf26e736fc') + + extends('python') + + depends_on('py-jdcal') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-xlrd/package.py b/var/spack/repos/builtin/packages/py-xlrd/package.py new file mode 100644 index 0000000000..10ca8ce2a7 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-xlrd/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyXlrd(Package): + """ + Library for developers to extract data from Microsoft Excel (tm) + spreadsheet files + """ + homepage = 'http://www.python-excel.org/' + url = "https://pypi.python.org/packages/source/x/xlrd/xlrd-0.9.4.tar.gz" + + version('0.9.4', '911839f534d29fe04525ef8cd88fe865') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 4e671c54ee69d2a335e2b057aada75c2257c3850 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 24 Apr 2016 18:06:51 -0500 Subject: Reformat the description. --- var/spack/repos/builtin/packages/py-SQLAlchemy/package.py | 5 ++--- var/spack/repos/builtin/packages/py-csvkit/package.py | 7 +++---- var/spack/repos/builtin/packages/py-dbf/package.py | 6 ++---- var/spack/repos/builtin/packages/py-jdcal/package.py | 5 ++--- var/spack/repos/builtin/packages/py-openpyxl/package.py | 5 ++--- var/spack/repos/builtin/packages/py-xlrd/package.py | 7 +++---- 6 files changed, 14 insertions(+), 21 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py index ccb882f749..9aecc95c63 100644 --- a/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py +++ b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py @@ -1,9 +1,8 @@ from spack import * class PySqlalchemy(Package): - """ - The Python SQL Toolkit and Object Relational Mapper - """ + """The Python SQL Toolkit and Object Relational Mapper""" + homepage = 'http://www.sqlalchemy.org/' url = "https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-1.0.12.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-csvkit/package.py b/var/spack/repos/builtin/packages/py-csvkit/package.py index 1ab848161d..def30457be 100644 --- a/var/spack/repos/builtin/packages/py-csvkit/package.py +++ b/var/spack/repos/builtin/packages/py-csvkit/package.py @@ -1,10 +1,9 @@ from spack import * class PyCsvkit(Package): - """ - A library of utilities for working with CSV, the king of tabular file - formats - """ + """A library of utilities for working with CSV, the king of tabular file + formats""" + homepage = 'http://csvkit.rtfd.org/' url = "https://pypi.python.org/packages/source/c/csvkit/csvkit-0.9.1.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-dbf/package.py b/var/spack/repos/builtin/packages/py-dbf/package.py index 75c32b2d61..698b221903 100644 --- a/var/spack/repos/builtin/packages/py-dbf/package.py +++ b/var/spack/repos/builtin/packages/py-dbf/package.py @@ -1,10 +1,8 @@ from spack import * class PyDbf(Package): - """ - Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro - .dbf files (including memos). - """ + """Pure python package for reading/writing dBase, FoxPro, and Visual FoxPro + .dbf files (including memos)""" homepage = 'https://pypi.python.org/pypi/dbf' url = "https://pypi.python.org/packages/source/d/dbf/dbf-0.96.005.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-jdcal/package.py b/var/spack/repos/builtin/packages/py-jdcal/package.py index a2fcbe119c..54169b2c21 100644 --- a/var/spack/repos/builtin/packages/py-jdcal/package.py +++ b/var/spack/repos/builtin/packages/py-jdcal/package.py @@ -1,9 +1,8 @@ from spack import * class PyJdcal(Package): - """ - Julian dates from proleptic Gregorian and Julian calendars - """ + """Julian dates from proleptic Gregorian and Julian calendars""" + homepage = 'http://github.com/phn/jdcal' url = "https://pypi.python.org/packages/source/j/jdcal/jdcal-1.2.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-openpyxl/package.py b/var/spack/repos/builtin/packages/py-openpyxl/package.py index 5954c4758a..87ff9f3521 100644 --- a/var/spack/repos/builtin/packages/py-openpyxl/package.py +++ b/var/spack/repos/builtin/packages/py-openpyxl/package.py @@ -1,9 +1,8 @@ from spack import * class PyOpenpyxl(Package): - """ - A Python library to read/write Excel 2007 xlsx/xlsm files - """ + """A Python library to read/write Excel 2007 xlsx/xlsm files""" + homepage = 'http://openpyxl.readthedocs.org/' url = "https://pypi.python.org/packages/source/o/openpyxl/openpyxl-2.4.0-a1.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-xlrd/package.py b/var/spack/repos/builtin/packages/py-xlrd/package.py index 10ca8ce2a7..8f25c06aad 100644 --- a/var/spack/repos/builtin/packages/py-xlrd/package.py +++ b/var/spack/repos/builtin/packages/py-xlrd/package.py @@ -1,10 +1,9 @@ from spack import * class PyXlrd(Package): - """ - Library for developers to extract data from Microsoft Excel (tm) - spreadsheet files - """ + """Library for developers to extract data from Microsoft Excel (tm) + spreadsheet files""" + homepage = 'http://www.python-excel.org/' url = "https://pypi.python.org/packages/source/x/xlrd/xlrd-0.9.4.tar.gz" -- cgit v1.2.3-70-g09d2 From 2b7b7f6d9758d47bb59b59e92cb2c7e3b785ac51 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 24 Apr 2016 18:11:18 -0500 Subject: Reformat description text. --- var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 1 + var/spack/repos/builtin/packages/r-abind/package.py | 5 ++++- var/spack/repos/builtin/packages/r-filehash/package.py | 10 +++++++++- var/spack/repos/builtin/packages/r-magic/package.py | 6 +++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index e2d9bb9594..2d92c1c4d8 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -2,6 +2,7 @@ from spack import * class RBiocgenerics(Package): """S4 generic functions needed by many Bioconductor packages.""" + homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html' url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py index 54d399c432..d06c7e9240 100644 --- a/var/spack/repos/builtin/packages/r-abind/package.py +++ b/var/spack/repos/builtin/packages/r-abind/package.py @@ -1,7 +1,10 @@ from spack import * class RAbind(Package): - """Combine multidimensional arrays into a single array. This is a generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and higher-dimensional arrays. Also provides functions 'adrop', 'asub', and 'afill' for manipulating, extracting and replacing data in arrays.""" + """Combine multidimensional arrays into a single array. This is a + generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and + higher-dimensional arrays. Also provides functions 'adrop', 'asub', and + 'afill' for manipulating, extracting and replacing data in arrays.""" homepage = "https://cran.r-project.org/" url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py index a3b688da10..4911c636b4 100644 --- a/var/spack/repos/builtin/packages/r-filehash/package.py +++ b/var/spack/repos/builtin/packages/r-filehash/package.py @@ -1,7 +1,15 @@ from spack import * class RFilehash(Package): - """Implements a simple key-value style database where character string keys are associated with data values that are stored on the disk. A simple interface is provided for inserting, retrieving, and deleting data from the database. Utilities are provided that allow 'filehash' databases to be treated much like environments and lists are already used in R. These utilities are provided to encourage interactive and exploratory analysis on large datasets. Three different file formats for representing the database are currently available and new formats can easily be incorporated by third parties for use in the 'filehash' framework.""" + """Implements a simple key-value style database where character string keys + are associated with data values that are stored on the disk. A simple + interface is provided for inserting, retrieving, and deleting data from the + database. Utilities are provided that allow 'filehash' databases to be + treated much like environments and lists are already used in R. These + utilities are provided to encourage interactive and exploratory analysis on + large datasets. Three different file formats for representing the database + are currently available and new formats can easily be incorporated by third + parties for use in the 'filehash' framework.""" homepage = 'https://cran.r-project.org/' url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py index 5f25b2a162..e900cdb216 100644 --- a/var/spack/repos/builtin/packages/r-magic/package.py +++ b/var/spack/repos/builtin/packages/r-magic/package.py @@ -1,7 +1,11 @@ from spack import * class RMagic(Package): - """A collection of efficient, vectorized algorithms for the creation and investigation of magic squares and hypercubes, including a variety of functions for the manipulation and analysis of arbitrarily dimensioned arrays.""" + """A collection of efficient, vectorized algorithms for the creation and + investigation of magic squares and hypercubes, including a variety of + functions for the manipulation and analysis of arbitrarily dimensioned + arrays.""" + homepage = "https://cran.r-project.org/" url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" -- cgit v1.2.3-70-g09d2 From b81cb554f505c4075b9df79ab3db08be3d3b9e36 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 25 Apr 2016 09:57:48 +0200 Subject: openblas: a small unit test to make sure Lapack symbols are compiled --- .../repos/builtin/packages/openblas/package.py | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 4522130ccc..252f699652 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -1,6 +1,7 @@ from spack import * import sys import os +import shutil class Openblas(Package): """OpenBLAS: An optimized BLAS library""" @@ -64,6 +65,10 @@ class Openblas(Package): if '+shared' in spec: symlink('libopenblas.%s' % dso_suffix, 'liblapack.%s' % dso_suffix) + # Openblas may pass its own test but still fail to compile Lapack + # symbols. To make sure we get working Blas and Lapack, do a small test. + self.check_install(spec) + def setup_dependent_package(self, module, dspec): # This is WIP for a prototype interface for virtual packages. @@ -76,3 +81,53 @@ class Openblas(Package): if '+shared' in self.spec: self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' % dso_suffix) self.spec.lapack_shared_lib = self.spec.blas_shared_lib + + def check_install(self, spec): + "Build and run a small program to test that we have Lapack symbols" + print "Checking Openblas installation..." + checkdir = "spack-check" + with working_dir(checkdir, create=True): + source = r""" +#include +#include +int main(void) { +int i=0; +double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; +double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; +double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; +cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, + 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); +for (i = 0; i < 8; i++) + printf("%lf ", C[i]); +printf("%lf", C[8]); +return 0; +} +""" + expected = """\ +11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000\ +""" + with open("check.c", 'w') as f: + f.write(source) + cc = which('cc') + # TODO: Automate these path and library settings + cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") + cc('-o', "check", "check.o", + "-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas") + try: + check = Executable('./check') + output = check(return_output=True) + except: + output = "" + success = output == expected + if not success: + print "Produced output does not match expected output." + print "Expected output:" + print '-'*80 + print expected + print '-'*80 + print "Produced output:" + print '-'*80 + print output + print '-'*80 + raise RuntimeError("Openblas install check failed") + shutil.rmtree(checkdir) -- cgit v1.2.3-70-g09d2 From 42be50d10b649a130e64f2a742fa4133ed5534b7 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 25 Apr 2016 13:53:41 +0200 Subject: add a test/output pair --- .../repos/builtin/packages/openblas/test_cblas_dgemm.c | 14 ++++++++++++++ .../builtin/packages/openblas/test_cblas_dgemm.output | 1 + 2 files changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c create mode 100644 var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c new file mode 100644 index 0000000000..37785bf47f --- /dev/null +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c @@ -0,0 +1,14 @@ +#include +#include +int main(void) { +int i=0; +double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; +double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; +double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; +cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, + 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); +for (i = 0; i < 8; i++) + printf("%lf ", C[i]); +printf("%lf", C[8]); +return 0; +} diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output new file mode 100644 index 0000000000..490905aca0 --- /dev/null +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output @@ -0,0 +1 @@ +11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000 \ No newline at end of file -- cgit v1.2.3-70-g09d2 From ff9145f8a5a95808d43db1dbc40414e644448419 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 30 Mar 2016 16:08:09 -0400 Subject: executable: quote arguments This allows command line arguments with spaces to be shown. The quoting madness is because a single quote cannot appear within a single quoted argument on the command line. To do so, you have to stop the single quote argument, double quote the single quote, then open the single quote again: $ echo 'before'"'"'after' before'after Fixes #174 --- lib/spack/spack/util/executable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index fc27b789d0..25819b6fc7 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -144,7 +144,7 @@ class Executable(object): cmd = self.exe + list(args) - cmd_line = ' '.join(cmd) + cmd_line = "'%s'" % "' '".join(map(lambda arg: arg.replace("'", "'\"'\"'"), cmd)) tty.debug(cmd_line) try: -- cgit v1.2.3-70-g09d2 From dd37959899d03fc33d59f725dbad4fe33b579725 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 25 Apr 2016 16:21:19 +0200 Subject: output with new lines --- var/spack/repos/builtin/packages/openblas/package.py | 15 +++++++++++---- .../repos/builtin/packages/openblas/test_cblas_dgemm.c | 5 ++--- .../builtin/packages/openblas/test_cblas_dgemm.output | 10 +++++++++- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 252f699652..61250fb310 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -97,14 +97,21 @@ double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); -for (i = 0; i < 8; i++) - printf("%lf ", C[i]); -printf("%lf", C[8]); +for (i = 0; i < 9; i++) + printf("%f\n", C[i]); return 0; } """ expected = """\ -11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000\ +11.000000 +-9.000000 +5.000000 +-9.000000 +21.000000 +-1.000000 +5.000000 +-1.000000 +3.000000 """ with open("check.c", 'w') as f: f.write(source) diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c index 37785bf47f..634e99d20b 100644 --- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c @@ -7,8 +7,7 @@ double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); -for (i = 0; i < 8; i++) - printf("%lf ", C[i]); -printf("%lf", C[8]); +for (i = 0; i < 9; i++) + printf("%f\n", C[i]); return 0; } diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output index 490905aca0..b8316d7477 100644 --- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output @@ -1 +1,9 @@ -11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000 \ No newline at end of file +11.000000 +-9.000000 +5.000000 +-9.000000 +21.000000 +-1.000000 +5.000000 +-1.000000 +3.000000 -- cgit v1.2.3-70-g09d2 From 1a585a6c748d9445ff691e766efba350259364b5 Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Mon, 25 Apr 2016 22:18:38 -0400 Subject: Added nccmp package --- var/spack/repos/builtin/packages/nccmp/package.py | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/nccmp/package.py diff --git a/var/spack/repos/builtin/packages/nccmp/package.py b/var/spack/repos/builtin/packages/nccmp/package.py new file mode 100644 index 0000000000..458afbb1e8 --- /dev/null +++ b/var/spack/repos/builtin/packages/nccmp/package.py @@ -0,0 +1,30 @@ +from spack import * +import os + +class Nccmp(Package): + """Compare NetCDF Files""" + homepage = "http://nccmp.sourceforge.net/" + url = "http://downloads.sourceforge.net/project/nccmp/nccmp-1.8.2.0.tar.gz" + + version('1.8.2.0', '81e6286d4413825aec4327e61a28a580') + + depends_on('netcdf') + + def install(self, spec, prefix): + # Configure says: F90 and F90FLAGS are replaced by FC and + # FCFLAGS respectively in this configure, please unset + # F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure + # again. + os.environ['FC'] = os.environ['F90'] + del os.environ['F90'] + try: + os.environ['FCFLAGS'] = os.environ['F90FLAGS'] + del os.environ['F90FLAGS'] + except KeyError: # There are no flags + pass + + configure('--prefix=%s' % prefix) + + make() + make("check") + make("install") -- cgit v1.2.3-70-g09d2 From 17b73050868818f62af4f98a65b371f68a4e5e59 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Tue, 19 Apr 2016 21:09:54 +0200 Subject: Added package for Paradiseo. --- .../packages/paradiseo/enable_eoserial.patch | 14 +++++ .../packages/paradiseo/fix_osx_detection.patch | 13 +++++ .../builtin/packages/paradiseo/fix_tests.patch | 13 +++++ .../builtin/packages/paradiseo/fix_tutorials.patch | 13 +++++ .../repos/builtin/packages/paradiseo/package.py | 59 ++++++++++++++++++++++ 5 files changed, 112 insertions(+) create mode 100644 var/spack/repos/builtin/packages/paradiseo/enable_eoserial.patch create mode 100644 var/spack/repos/builtin/packages/paradiseo/fix_osx_detection.patch create mode 100644 var/spack/repos/builtin/packages/paradiseo/fix_tests.patch create mode 100644 var/spack/repos/builtin/packages/paradiseo/fix_tutorials.patch create mode 100644 var/spack/repos/builtin/packages/paradiseo/package.py diff --git a/var/spack/repos/builtin/packages/paradiseo/enable_eoserial.patch b/var/spack/repos/builtin/packages/paradiseo/enable_eoserial.patch new file mode 100644 index 0000000000..8b3ccfeb84 --- /dev/null +++ b/var/spack/repos/builtin/packages/paradiseo/enable_eoserial.patch @@ -0,0 +1,14 @@ +diff --git a/eo/src/CMakeLists.txt b/eo/src/CMakeLists.txt +index b2b445a..d45ddc7 100644 +--- a/eo/src/CMakeLists.txt ++++ b/eo/src/CMakeLists.txt +@@ -47,7 +47,7 @@ install(DIRECTORY do es ga gp other utils + add_subdirectory(es) + add_subdirectory(ga) + add_subdirectory(utils) +-#add_subdirectory(serial) ++add_subdirectory(serial) # Required when including , which is need by + + if(ENABLE_PYEO) + add_subdirectory(pyeo) + \ No newline at end of file diff --git a/var/spack/repos/builtin/packages/paradiseo/fix_osx_detection.patch b/var/spack/repos/builtin/packages/paradiseo/fix_osx_detection.patch new file mode 100644 index 0000000000..27b240f673 --- /dev/null +++ b/var/spack/repos/builtin/packages/paradiseo/fix_osx_detection.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/Config.cmake b/cmake/Config.cmake +index 02593ba..d198ca9 100644 +--- a/cmake/Config.cmake ++++ b/cmake/Config.cmake +@@ -6,7 +6,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + + # detect OS X version. (use '/usr/bin/sw_vers -productVersion' to extract V from '10.V.x'.) + execute_process (COMMAND /usr/bin/sw_vers -productVersion OUTPUT_VARIABLE MACOSX_VERSION_RAW) +- string(REGEX REPLACE "10\\.([0-9]).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}") ++ string(REGEX REPLACE "10\\.([0-9]+).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}") + if(${MACOSX_VERSION} LESS 5) + message(FATAL_ERROR "Unsupported version of OS X : ${MACOSX_VERSION_RAW}") + return() diff --git a/var/spack/repos/builtin/packages/paradiseo/fix_tests.patch b/var/spack/repos/builtin/packages/paradiseo/fix_tests.patch new file mode 100644 index 0000000000..607c5d5262 --- /dev/null +++ b/var/spack/repos/builtin/packages/paradiseo/fix_tests.patch @@ -0,0 +1,13 @@ +diff --git a/moeo/test/t-moeo2DMinHypervolumeArchive.cpp b/moeo/test/t-moeo2DMinHypervolumeArchive.cpp +index 994a9a4..c4ba77b 100644 +--- a/moeo/test/t-moeo2DMinHypervolumeArchive.cpp ++++ b/moeo/test/t-moeo2DMinHypervolumeArchive.cpp +@@ -41,7 +41,7 @@ + #include + #include + +-#include ++#include + + //----------------------------------------------------------------------------- + diff --git a/var/spack/repos/builtin/packages/paradiseo/fix_tutorials.patch b/var/spack/repos/builtin/packages/paradiseo/fix_tutorials.patch new file mode 100644 index 0000000000..14cb5fed74 --- /dev/null +++ b/var/spack/repos/builtin/packages/paradiseo/fix_tutorials.patch @@ -0,0 +1,13 @@ +diff --git a/eo/tutorial/Lesson3/exercise3.1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp +index dc37479..d178941 100644 +--- a/eo/tutorial/Lesson3/exercise3.1.cpp ++++ b/eo/tutorial/Lesson3/exercise3.1.cpp +@@ -289,7 +289,7 @@ void main_function(int argc, char **argv) + checkpoint.add(fdcStat); + + // The Stdout monitor will print parameters to the screen ... +- eoStdoutMonitor monitor(false); ++ eoStdoutMonitor monitor; + + // when called by the checkpoint (i.e. at every generation) + checkpoint.add(monitor); diff --git a/var/spack/repos/builtin/packages/paradiseo/package.py b/var/spack/repos/builtin/packages/paradiseo/package.py new file mode 100644 index 0000000000..c254234b32 --- /dev/null +++ b/var/spack/repos/builtin/packages/paradiseo/package.py @@ -0,0 +1,59 @@ +from spack import * +import sys + +class Paradiseo(Package): + """A C++ white-box object-oriented framework dedicated to the reusable design of metaheuristics.""" + homepage = "http://paradiseo.gforge.inria.fr/" + + # Installing from the development version is a better option at this + # point than using the very old supplied packages + version('head', git='https://gforge.inria.fr/git/paradiseo/paradiseo.git') + # This is a version that the package formula author has tested successfully. + # However, the clone is very large (~1Gb git history). The history in the + # head version has been trimmed significantly. + version('dev-safe', git='https://gforge.inria.fr/git/paradiseo/paradiseo.git', + commit='dbb8fbe9a786efd4d1c26408ac1883442e7643a6') + + variant('mpi', default=True, description='Compile with parallel and distributed metaheuristics module') + variant('smp', default=True, description='Compile with symmetric multi-processing module ') + variant('edo', default=True, description='Compile with (Experimental) EDO module') + #variant('tests', default=False, description='Compile with build tests') + #variant('doc', default=False, description='Compile with documentation') + variant('debug', default=False, description='Builds a debug version of the libraries') + + # Required dependencies + depends_on ("cmake") + depends_on ("eigen") + + # Optional dependencies + depends_on ("mpi", when="+mpi") + depends_on ("doxygen", when='+doc') + + # Patches + patch('enable_eoserial.patch') + patch('fix_osx_detection.patch') + patch('fix_tests.patch') + patch('fix_tutorials.patch') + + def install(self, spec, prefix): + options = [] + options.extend(std_cmake_args) + + options.extend([ + '-DCMAKE_BUILD_TYPE:STRING=%s' % ('Debug' if '+debug' in spec else 'Release'), + '-DINSTALL_TYPE:STRING=MIN', + '-DMPI:BOOL=%s' % ('TRUE' if '+mpi' in spec else 'FALSE'), + '-DSMP:BOOL=%s' % ('TRUE' if '+smp' in spec else 'FALSE'), # Note: This requires a C++11 compatible compiler + '-DEDO:BOOL=%s' % ('TRUE' if '+edo' in spec else 'FALSE'), + '-DENABLE_CMAKE_TESTING:BOOL=%s' % ('TRUE' if '+tests' in spec else 'FALSE') + ]) + + with working_dir('spack-build', create=True): + # Configure + cmake('..', *options) + + # Build, test and install + make("VERBOSE=1") + if '+tests' in spec: + make("test") + make("install") -- cgit v1.2.3-70-g09d2 From 168f9c46ea7f249fba3769cf1429348ca218eeae Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 26 Apr 2016 09:18:39 +0200 Subject: astyle: fix installation of the binary --- var/spack/repos/builtin/packages/astyle/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py index 7260fd74a1..5274fc018f 100644 --- a/var/spack/repos/builtin/packages/astyle/package.py +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -14,4 +14,5 @@ class Astyle(Package): make('-f', join_path(self.stage.source_path,'build','clang','Makefile'), parallel=False) + mkdirp(self.prefix.bin) install(join_path(self.stage.source_path, 'src','bin','astyle'), self.prefix.bin) -- cgit v1.2.3-70-g09d2 From 8a45aa41854fbc1824401662f93e08d078109f6e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 26 Apr 2016 12:52:49 +0200 Subject: p4est: add missing dependencies --- var/spack/repos/builtin/packages/p4est/package.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index 1e2969fe64..017c4e3fbf 100644 --- a/var/spack/repos/builtin/packages/p4est/package.py +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -7,10 +7,15 @@ class P4est(Package): version('1.1', '37ba7f4410958cfb38a2140339dbf64f') - # disable by default to make it work on frontend of clusters - variant('tests', default=False, description='Run small tests') + # build dependencies + depends_on('automake') + depends_on('autoconf') + depends_on('libtool@2.4.2:') + # other dependencies + depends_on('lua') # Needed for the submodule sc depends_on('mpi') + depends_on('zlib') def install(self, spec, prefix): options = ['--enable-mpi', @@ -28,7 +33,5 @@ class P4est(Package): configure('--prefix=%s' % prefix, *options) make() - if '+tests' in self.spec: - make("check") - + make("check") make("install") -- cgit v1.2.3-70-g09d2 From 0ff41206923dc9235b7f7341b514b4e2944d262d Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 26 Apr 2016 13:13:47 +0200 Subject: dealii: add missing dependencies --- var/spack/repos/builtin/packages/dealii/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 6810e86868..674fe3150a 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -50,8 +50,8 @@ class Dealii(Package): depends_on ("trilinos", when='+trilinos+mpi') # developer dependnecies - #depends_on ("numdiff") #FIXME - #depends_on ("astyle") #FIXME + depends_on ("numdiff", when='@dev') + depends_on ("astyle@2.04", when='@dev') def install(self, spec, prefix): options = [] -- cgit v1.2.3-70-g09d2 From 99b52e6e719efcee14cbba0a338c6593aad53422 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 26 Apr 2016 16:41:33 +0200 Subject: test-install : wip to add other information --- lib/spack/spack/cmd/test-install.py | 114 ++++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 51 deletions(-) diff --git a/lib/spack/spack/cmd/test-install.py b/lib/spack/spack/cmd/test-install.py index 656873a2f0..733b58f252 100644 --- a/lib/spack/spack/cmd/test-install.py +++ b/lib/spack/spack/cmd/test-install.py @@ -23,36 +23,39 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import argparse -import xml.etree.ElementTree as ET +import codecs import itertools -import re import os -import codecs +import re +import time +import xml.etree.ElementTree as ET import llnl.util.tty as tty -from llnl.util.filesystem import * - import spack +import spack.cmd +from llnl.util.filesystem import * from spack.build_environment import InstallError from spack.fetch_strategy import FetchError -import spack.cmd description = "Run package installation as a unit test, output formatted results." + def setup_parser(subparser): - subparser.add_argument( - '-j', '--jobs', action='store', type=int, - help="Explicitly set number of make jobs. Default is #cpus.") + subparser.add_argument('-j', + '--jobs', + action='store', + type=int, + help="Explicitly set number of make jobs. Default is #cpus.") - subparser.add_argument( - '-n', '--no-checksum', action='store_true', dest='no_checksum', - help="Do not check packages against checksum") + subparser.add_argument('-n', + '--no-checksum', + action='store_true', + dest='no_checksum', + help="Do not check packages against checksum") - subparser.add_argument( - '-o', '--output', action='store', help="test output goes in this file") + subparser.add_argument('-o', '--output', action='store', help="test output goes in this file") - subparser.add_argument( - 'package', nargs=argparse.REMAINDER, help="spec of package to install") + subparser.add_argument('package', nargs=argparse.REMAINDER, help="spec of package to install") class JunitResultFormat(object): @@ -102,8 +105,7 @@ class BuildId(object): if not isinstance(other, BuildId): return False - return ((self.name, self.version, self.hashId) == - (other.name, other.version, other.hashId)) + return ((self.name, self.version, self.hashId) == (other.name, other.version, other.hashId)) def fetch_log(path): @@ -114,14 +116,13 @@ def fetch_log(path): def failed_dependencies(spec): - return set(childSpec for childSpec in spec.dependencies.itervalues() if not - spack.repo.get(childSpec).installed) + return set(childSpec for childSpec in spec.dependencies.itervalues() if not spack.repo.get(childSpec).installed) -def create_test_output(topSpec, newInstalls, output, getLogFunc=fetch_log): +def create_test_output(top_spec, newInstalls, output, getLogFunc=fetch_log): # Post-order traversal is not strictly required but it makes sense to output # tests for dependencies first. - for spec in topSpec.traverse(order='post'): + for spec in top_spec.traverse(order='post'): if spec not in newInstalls: continue @@ -131,20 +132,17 @@ def create_test_output(topSpec, newInstalls, output, getLogFunc=fetch_log): result = TestResult.SKIPPED dep = iter(failedDeps).next() depBID = BuildId(dep) - errOutput = "Skipped due to failed dependency: {0}".format( - depBID.stringId()) + errOutput = "Skipped due to failed dependency: {0}".format(depBID.stringId()) elif (not package.installed) and (not package.stage.source_path): result = TestResult.FAILED errOutput = "Failure to fetch package resources." elif not package.installed: result = TestResult.FAILED lines = getLogFunc(package.build_log_path) - errMessages = list(line for line in lines if - re.search('error:', line, re.IGNORECASE)) + errMessages = list(line for line in lines if re.search('error:', line, re.IGNORECASE)) errOutput = errMessages if errMessages else lines[-10:] - errOutput = '\n'.join(itertools.chain( - [spec.to_yaml(), "Errors:"], errOutput, - ["Build Log:", package.build_log_path])) + errOutput = '\n'.join(itertools.chain([spec.to_yaml(), "Errors:"], errOutput, ["Build Log:", + package.build_log_path])) else: result = TestResult.PASSED errOutput = None @@ -153,7 +151,16 @@ def create_test_output(topSpec, newInstalls, output, getLogFunc=fetch_log): output.add_test(bId, result, errOutput) +def get_top_spec_or_die(args): + specs = spack.cmd.parse_specs(args.package, concretize=True) + if len(specs) > 1: + tty.die("Only 1 top-level package can be specified") + top_spec = iter(specs).next() + return top_spec + + def test_install(parser, args): + # Check the input if not args.package: tty.die("install requires a package argument") @@ -162,21 +169,13 @@ def test_install(parser, args): tty.die("The -j option must be a positive integer!") if args.no_checksum: - spack.do_checksum = False # TODO: remove this global. + spack.do_checksum = False # TODO: remove this global. - specs = spack.cmd.parse_specs(args.package, concretize=True) - if len(specs) > 1: - tty.die("Only 1 top-level package can be specified") - topSpec = iter(specs).next() - - newInstalls = set() - for spec in topSpec.traverse(): - package = spack.repo.get(spec) - if not package.installed: - newInstalls.add(spec) + # Get the one and only top spec + top_spec = get_top_spec_or_die(args) if not args.output: - bId = BuildId(topSpec) + bId = BuildId(top_spec) outputDir = join_path(os.getcwd(), "test-output") if not os.path.exists(outputDir): os.mkdir(outputDir) @@ -184,20 +183,27 @@ def test_install(parser, args): else: outputFpath = args.output - for spec in topSpec.traverse(order='post'): + new_installs = set() + for spec in top_spec.traverse(order='post'): # Calling do_install for the top-level package would be sufficient but # this attempts to keep going if any package fails (other packages which # are not dependents may succeed) package = spack.repo.get(spec) + + if not package.installed: + new_installs.add(spec) + + duration = 0.0 if (not failed_dependencies(spec)) and (not package.installed): try: - package.do_install( - keep_prefix=False, - keep_stage=True, - ignore_deps=False, - make_jobs=args.jobs, - verbose=True, - fake=False) + start_time = time.time() + package.do_install(keep_prefix=False, + keep_stage=True, + ignore_deps=False, + make_jobs=args.jobs, + verbose=True, + fake=False) + duration = time.time() - start_time except InstallError: pass except FetchError: @@ -205,7 +211,13 @@ def test_install(parser, args): jrf = JunitResultFormat() handled = {} - create_test_output(topSpec, newInstalls, jrf) + create_test_output(top_spec, new_installs, jrf) with open(outputFpath, 'wb') as F: - jrf.write_to(F) + jrf.write_to(F) + + # with JunitTestSuite(filename) as test_suite: + # for spec in top_spec.traverse(order='post'): + # test_case = install_test(spec) + # test_suite.append( test_case ) + # -- cgit v1.2.3-70-g09d2 From f70046e6b713f783288afac3359ccba6bfd8e233 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Tue, 26 Apr 2016 10:00:24 -0700 Subject: MFEM version 3.1 (#749) MFEM is a free, lightweight, scalable C++ library for finite element methods. Includes lapack, hypre, metis, suite-sparse, mpi variants & tests for serial and parallel versions. --- var/spack/repos/builtin/packages/mfem/package.py | 125 +++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mfem/package.py diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py new file mode 100644 index 0000000000..510e09c4e1 --- /dev/null +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -0,0 +1,125 @@ +from spack import * +import glob, string + +class Mfem(Package): + """Free, lightweight, scalable C++ library for finite element methods.""" + + homepage = 'http://www.mfem.org' + url = 'https://github.com/mfem/mfem' + +# version('3.1', git='https://github.com/mfem/mfem.git', +# commit='dbae60fe32e071989b52efaaf59d7d0eb2a3b574') + + version('3.1', '841ea5cf58de6fae4de0f553b0e01ebaab9cd9c67fa821e8a715666ecf18fc57', + url='http://goo.gl/xrScXn', expand=False) + + variant('metis', default=False, description='Activate support for metis') + variant('hypre', default=False, description='Activate support for hypre') + variant('suite-sparse', default=False, + description='Activate support for SuiteSparse') + variant('mpi', default=False, description='Activate support for MPI') + variant('lapack', default=False, description='Activate support for LAPACK') + variant('debug', default=False, description='Build debug version') + + depends_on('blas', when='+lapack') + depends_on('lapack', when='+lapack') + + depends_on('mpi', when='+mpi') + depends_on('metis', when='+mpi') + depends_on('hypre', when='+mpi') + + depends_on('hypre', when='+hypre') + + depends_on('metis@4:', when='+metis') + + depends_on('suite-sparse', when='+suite-sparse') + 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:') + + def check_variants(self, spec): + if '+mpi' in spec and ('+hypre' not in spec or '+metis' not in spec): + raise InstallError('mfem+mpi must be built with +hypre ' + + 'and +metis!') + if '+suite-sparse' in spec and ('+metis' not in spec or + '+lapack' not in spec): + raise InstallError('mfem+suite-sparse must be built with ' + + '+metis and +lapack!') + if 'metis@5:' in spec and '%clang' in spec and ('^cmake %gcc' not in spec): + raise InstallError('To work around CMake bug with clang, must ' + + 'build mfem with mfem[+variants] %clang ' + + '^cmake %gcc to force CMake to build with gcc') + return + + def install(self, spec, prefix): + self.check_variants(spec) + + options = ['PREFIX=%s' % prefix] + + if '+lapack' in spec: + lapack_lib = '-L{0} -llapack -L{1} -lblas'.format( + spec['lapack'].prefix.lib, spec['blas'].prefix.lib) + options.extend(['MFEM_USE_LAPACK=YES', + 'LAPACK_OPT=-I%s' % spec['lapack'].prefix.include, + 'LAPACK_LIB=%s' % lapack_lib]) + + if '+hypre' in spec: + options.extend(['HYPRE_DIR=%s' % spec['hypre'].prefix, + 'HYPRE_OPT=-I%s' % spec['hypre'].prefix.include, + 'HYPRE_LIB=-L%s' % spec['hypre'].prefix.lib + + ' -lHYPRE']) + + if '+metis' in spec: + metis_lib = '-L%s -lmetis' % spec['metis'].prefix.lib + if spec['metis'].satisfies('@5:'): + metis_str = 'MFEM_USE_METIS_5=YES' + else: + metis_str = 'MFEM_USE_METIS_5=NO' + options.extend([metis_str, + 'METIS_DIR=%s' % spec['metis'].prefix, + 'METIS_OPT=-I%s' % spec['metis'].prefix.include, + 'METIS_LIB=%s' % metis_lib]) + + if '+mpi' in spec: options.extend(['MFEM_USE_MPI=YES']) + + if '+suite-sparse' in spec: + ssp = spec['suite-sparse'].prefix + ss_lib = '-L%s' % ssp.lib + ss_lib += (' -lumfpack -lcholmod -lcolamd -lamd -lcamd' + + ' -lccolamd -lsuitesparseconfig') + + no_librt_archs = ['darwin-i686', 'darwin-x86_64'] + no_rt = any(map(lambda a: spec.satisfies('='+a), no_librt_archs)) + if not no_rt: ss_lib += ' -lrt' + ss_lib += (' ' + metis_lib + ' ' + lapack_lib) + + options.extend(['MFEM_USE_SUITESPARSE=YES', + 'SUITESPARSE_DIR=%s' % ssp, + 'SUITESPARSE_OPT=-I%s' % ssp.include, + 'SUITESPARSE_LIB=%s' % ss_lib]) + + if '+debug' in spec: options.extend(['MFEM_DEBUG=YES']) + + # Dirty hack to cope with URL redirect + tgz_file = string.split(self.url,'/')[-1] + tar = which('tar') + tar('xzvf', tgz_file) + cd(glob.glob('mfem*')[0]) + # End dirty hack to cope with URL redirect + + make('config', *options) + make('all') + + # Run a small test before installation + args = ['-m', join_path('data','star.mesh'), '--no-visualization'] + if '+mpi' in spec: + Executable(join_path(spec['mpi'].prefix.bin, + 'mpirun'))('-np', + '4', + join_path('examples','ex1p'), + *args) + else: + Executable(join_path('examples', 'ex1'))(*args) + + make('install') -- cgit v1.2.3-70-g09d2 From 603467785b5ea00a1dac43e64e1565a6bdc732ef Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 26 Apr 2016 13:00:54 -0400 Subject: Compiler find docs (#831) * docs: mention `spack compiler find` * docs: fix some weird wording. --- lib/spack/docs/basic_usage.rst | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 0e603813e1..29791d98c4 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -372,25 +372,32 @@ how this is done is in :ref:`sec-specs`. ``spack compiler add`` ~~~~~~~~~~~~~~~~~~~~~~~ +An alias for ``spack compiler find``. + +.. _spack-compiler-find: + +``spack compiler find`` +~~~~~~~~~~~~~~~~~~~~~~~ + If you do not see a compiler in this list, but you want to use it with -Spack, you can simply run ``spack compiler add`` with the path to +Spack, you can simply run ``spack compiler find`` with the path to where the compiler is installed. For example:: - $ spack compiler add /usr/local/tools/ic-13.0.079 + $ spack compiler find /usr/local/tools/ic-13.0.079 ==> Added 1 new compiler to /Users/gamblin2/.spack/compilers.yaml intel@13.0.079 -Or you can run ``spack compiler add`` with no arguments to force +Or you can run ``spack compiler find`` with no arguments to force auto-detection. This is useful if you do not know where compilers are installed, but you know that new compilers have been added to your ``PATH``. For example, using dotkit, you might do this:: $ module load gcc-4.9.0 - $ spack compiler add + $ spack compiler find ==> Added 1 new compiler to /Users/gamblin2/.spack/compilers.yaml gcc@4.9.0 -This loads the environment module for gcc-4.9.0 to get it into the +This loads the environment module for gcc-4.9.0 to add it to ``PATH``, and then it adds the compiler to Spack. .. _spack-compiler-info: -- cgit v1.2.3-70-g09d2 From 8e227f603d0c158e9f71a0bc0a815d977415908c Mon Sep 17 00:00:00 2001 From: jppelteret Date: Tue, 26 Apr 2016 19:01:09 +0200 Subject: Fix: Add missing dependencies for gmp and eigen (#830) See https://groups.google.com/forum/#!topic/spack/9JMDwafjBUs --- var/spack/repos/builtin/packages/eigen/package.py | 1 + var/spack/repos/builtin/packages/gmp/package.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py index 1501989812..6b38ab0261 100644 --- a/var/spack/repos/builtin/packages/eigen/package.py +++ b/var/spack/repos/builtin/packages/eigen/package.py @@ -45,6 +45,7 @@ class Eigen(Package): # TODO : dependency on googlehash, superlu, adolc missing + depends_on('cmake') depends_on('metis@5:', when='+metis') depends_on('scotch', when='+scotch') depends_on('fftw', when='+fftw') diff --git a/var/spack/repos/builtin/packages/gmp/package.py b/var/spack/repos/builtin/packages/gmp/package.py index fe13de3b95..85e9c237d6 100644 --- a/var/spack/repos/builtin/packages/gmp/package.py +++ b/var/spack/repos/builtin/packages/gmp/package.py @@ -35,6 +35,8 @@ class Gmp(Package): version('6.0.0a', 'b7ff2d88cae7f8085bd5006096eed470') version('6.0.0' , '6ef5869ae735db9995619135bd856b84') + depends_on("m4") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() -- cgit v1.2.3-70-g09d2 From 8ec5e8118643223c00b3106fb4e4f1204821e380 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 26 Apr 2016 10:24:36 -0700 Subject: Update Package : Zoltan (#833) * Added preliminary implementations for the debug and shared variants. * Fixed a few problems with the '+shared' variant of the Zoltan package. Added support for a few more important Zoltan package versions. * Fixed a minor compiler incompatibility issue with the '+shared+mpi' variants. --- var/spack/repos/builtin/packages/zoltan/package.py | 35 +++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py index e20ae81adb..738dfb508b 100644 --- a/var/spack/repos/builtin/packages/zoltan/package.py +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -1,3 +1,4 @@ +import re, os, glob from spack import * class Zoltan(Package): @@ -12,8 +13,13 @@ class Zoltan(Package): base_url = "http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions" version('3.83', '1ff1bc93f91e12f2c533ddb01f2c095f') + version('3.8', '9d8fba8a990896881b85351d4327c4a9') + version('3.6', '9cce794f7241ecd8dbea36c3d7a880f9') version('3.3', '5eb8f00bda634b25ceefa0122bd18d65') + variant('debug', default=False, description='Builds a debug version of the library') + variant('shared', default=True, description='Builds a shared version of the library') + variant('fortran', default=True, description='Enable Fortran support') variant('mpi', default=False, description='Enable MPI support') @@ -24,28 +30,49 @@ class Zoltan(Package): '--enable-f90interface' if '+fortan' in spec else '--disable-f90interface', '--enable-mpi' if '+mpi' in spec else '--disable-mpi', ] + config_cflags = [ + '-O0' if '+debug' in spec else '-O3', + '-g' if '+debug' in spec else '-g0', + ] + + if '+shared' in spec: + config_args.append('--with-ar=$(CXX) -shared $(LDFLAGS) -o') + config_args.append('RANLIB=echo') + config_cflags.append('-fPIC') if '+mpi' in spec: - config_args.append('--with-mpi=%s' % spec['mpi'].prefix) - config_args.append('--with-mpi-compilers=%s' % spec['mpi'].prefix.bin) config_args.append('CC=%s/mpicc' % spec['mpi'].prefix.bin) config_args.append('CXX=%s/mpicxx' % spec['mpi'].prefix.bin) + config_args.append('--with-mpi=%s' % spec['mpi'].prefix) + config_args.append('--with-mpi-compilers=%s' % spec['mpi'].prefix.bin) # NOTE: Early versions of Zoltan come packaged with a few embedded # library packages (e.g. ParMETIS, Scotch), which messes with Spack's # ability to descend directly into the package's source directory. - if spec.satisfies('@:3.3'): + if spec.satisfies('@:3.6'): cd('Zoltan_v%s' % self.version) mkdirp('build') cd('build') config_zoltan = Executable('../configure') - config_zoltan('--prefix=%s' % pwd(), *config_args) + config_zoltan( + '--prefix=%s' % pwd(), + '--with-cflags=%s' % ' '.join(config_cflags), + '--with-cxxflags=%s' % ' '.join(config_cflags), + *config_args) make() make('install') + # NOTE: Unfortunately, Zoltan doesn't provide any configuration options for + # the extension of the output library files, so this script must change these + # extensions as a post-processing step. + if '+shared' in spec: + for libpath in glob.glob('lib/*.a'): + libdir, libname = (os.path.dirname(libpath), os.path.basename(libpath)) + move(libpath, os.path.join(libdir, re.sub(r'\.a$', '.so', libname))) + mkdirp(prefix) move('include', prefix) move('lib', prefix) -- cgit v1.2.3-70-g09d2 From b56bfcea968fb6fb2a81a08804258300178c4b05 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 26 Apr 2016 12:31:48 -0500 Subject: Add the turbomole package. (#826) * Add the turbomole package. This package has three modes of operation that need to be selected independently. This is handled with spack vaiants. Turbomole has a builtin MPI implementation so it does not need to depend on an mpi provider when using the +mpi variant. * Whitespace cleanup. --- .../repos/builtin/packages/turbomole/package.py | 124 +++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 var/spack/repos/builtin/packages/turbomole/package.py diff --git a/var/spack/repos/builtin/packages/turbomole/package.py b/var/spack/repos/builtin/packages/turbomole/package.py new file mode 100644 index 0000000000..acc95e3b10 --- /dev/null +++ b/var/spack/repos/builtin/packages/turbomole/package.py @@ -0,0 +1,124 @@ +from spack import * +import os +import subprocess + +class Turbomole(Package): + """TURBOMOLE: Program Package for ab initio Electronic Structure + Calculations. NB: Requires a license to download.""" + + # NOTE: Turbomole requires purchase of a license to download. Go to the + # NOTE: Turbomole home page, http://www.turbomole-gmbh.com, for details. + # NOTE: Spack will search the current directory for this file. It is + # NOTE: probably best to add this file to a Spack mirror so that it can be + # NOTE: found from anywhere. For information on setting up a Spack mirror + # NOTE: see http://software.llnl.gov/spack/mirrors.html + + homepage = "http://www.turbomole-gmbh.com/" + + version('7.0.2', '92b97e1e52e8dcf02a4d9ac0147c09d6', + url="file://%s/turbolinux702.tar.gz" % os.getcwd()) + + variant('mpi', default=False, description='Set up MPI environment') + variant('smp', default=False, description='Set up SMP environment') + + # Turbomole's install is odd. There are three variants + # - serial + # - parallel, MPI + # - parallel, SMP + # + # Only one of these can be active at a time. MPI and SMP are set as + # variants so there could be up to 3 installs per version. Switching + # between them would be accomplished with `module swap` commands. + + def do_fetch(self, mirror_only=True): + if '+mpi' in self.spec and '+smp' in self.spec: + raise InstallError('Can not have both SMP and MPI enabled in the same build.') + super(Turbomole, self).do_fetch(mirror_only) + + def get_tm_arch(self): + # For python-2.7 we could use `tm_arch = subprocess.check_output()` + # Use the following for compatibility with python 2.6 + if 'TURBOMOLE' in os.getcwd(): + tm_arch = subprocess.Popen(['sh', 'scripts/sysname'], + stdout=subprocess.PIPE).communicate()[0] + return tm_arch.rstrip('\n') + else: + return + + def install(self, spec, prefix): + if spec.satisfies('@:7.0.2'): + calculate_version = 'calculate_2.4_linux64' + molecontrol_version = 'MoleControl_2.5' + + tm_arch=self.get_tm_arch() + + tar = which('tar') + dst = join_path(prefix, 'TURBOMOLE') + + tar('-x', '-z', '-f', 'thermocalc.tar.gz') + with working_dir('thermocalc'): + cmd = 'sh install << Date: Tue, 26 Apr 2016 12:32:14 -0500 Subject: Put f2py of py-numpy in python ignore list. (#827) There are many python packages that depend on py-numpy. Each one of those will have a copy of f2py that will need to be put in the ignore list for activation. Thise PR adds f2py to the ignore list in the python package.py file so that it does not have to be done for each package that depends on py-numpy. This follows the model of what is done for py-setuptools. This PR also removes the f2py ignore expression for python packages that were using it as it is no longer needed in the individual packages. --- var/spack/repos/builtin/packages/py-bottleneck/package.py | 2 +- var/spack/repos/builtin/packages/py-matplotlib/package.py | 2 +- var/spack/repos/builtin/packages/py-numexpr/package.py | 2 +- var/spack/repos/builtin/packages/py-pandas/package.py | 2 +- var/spack/repos/builtin/packages/py-scikit-image/package.py | 2 +- var/spack/repos/builtin/packages/python/package.py | 2 ++ 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-bottleneck/package.py b/var/spack/repos/builtin/packages/py-bottleneck/package.py index 0aa4208b4d..d43308543b 100644 --- a/var/spack/repos/builtin/packages/py-bottleneck/package.py +++ b/var/spack/repos/builtin/packages/py-bottleneck/package.py @@ -7,7 +7,7 @@ class PyBottleneck(Package): version('1.0.0', '380fa6f275bd24f27e7cf0e0d752f5d2') - extends('python', ignore=r'bin/f2py$') + extends('python') depends_on('py-numpy') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 19194c942e..1a190cc5f3 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -12,7 +12,7 @@ class PyMatplotlib(Package): variant('gui', default=False, description='Enable GUI') variant('ipython', default=False, description='Enable ipython support') - extends('python', ignore=r'bin/nosetests.*$|bin/pbr$|bin/f2py$') + extends('python', ignore=r'bin/nosetests.*$|bin/pbr$') depends_on('py-pyside', when='+gui') depends_on('py-ipython', when='+ipython') diff --git a/var/spack/repos/builtin/packages/py-numexpr/package.py b/var/spack/repos/builtin/packages/py-numexpr/package.py index 081a79dec6..0076aa456b 100644 --- a/var/spack/repos/builtin/packages/py-numexpr/package.py +++ b/var/spack/repos/builtin/packages/py-numexpr/package.py @@ -9,7 +9,7 @@ class PyNumexpr(Package): version('2.4.6', '17ac6fafc9ea1ce3eb970b9abccb4fbd') version('2.5', '84f66cced45ba3e30dcf77a937763aaa') - extends('python', ignore=r'bin/f2py$') + extends('python') depends_on('py-numpy') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index 2320b1f92f..59d515eb5e 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -10,7 +10,7 @@ class PyPandas(Package): version('0.16.1', 'fac4f25748f9610a3e00e765474bdea8') version('0.18.0', 'f143762cd7a59815e348adf4308d2cf6') - extends('python', ignore=r'bin/f2py$') + extends('python') depends_on('py-dateutil') depends_on('py-numpy') depends_on('py-setuptools') 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 22ce1f8374..d13339060e 100644 --- a/var/spack/repos/builtin/packages/py-scikit-image/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py @@ -7,7 +7,7 @@ class PyScikitImage(Package): version('0.12.3', '04ea833383e0b6ad5f65da21292c25e1') - extends('python', ignore=r'bin/.*\.py$|bin/f2py$') + extends('python', ignore=r'bin/.*\.py$') depends_on('py-dask') depends_on('py-pillow') diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index f5237c3b57..f7e1d94567 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -151,6 +151,8 @@ class Python(Package): patterns.append(r'setuptools\.pth') patterns.append(r'bin/easy_install[^/]*$') patterns.append(r'setuptools.*egg$') + if ext_pkg.name != 'py-numpy': + patterns.append(r'bin/f2py$') return match_predicate(ignore_arg, patterns) -- cgit v1.2.3-70-g09d2 From 55d339194d59f78b001ad939aae2e67f6ebae5ad Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 26 Apr 2016 15:29:16 -0400 Subject: Update hwloc to 1.11.3 --- var/spack/repos/builtin/packages/hwloc/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index ab7205646e..a461a7482c 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -17,6 +17,7 @@ class Hwloc(Package): list_url = "http://www.open-mpi.org/software/hwloc/" list_depth = 3 + version('1.11.3', 'c1d36a9de6028eac1d18ea4782ef958f') version('1.11.2', 'e4ca55c2a5c5656da4a4e37c8fc51b23') version('1.11.1', 'feb4e416a1b25963ed565d8b42252fdc') version('1.9', '1f9f9155682fe8946a97c08896109508') -- cgit v1.2.3-70-g09d2 From b7c064142e6e4beb960aa979815471c3889ec925 Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Wed, 27 Apr 2016 01:23:53 +0200 Subject: preserve lookup order in PATH when invoking 'spack compiler add' --- lib/spack/spack/compiler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index d38c0b00b1..2f89ec6144 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -202,6 +202,10 @@ class Compiler(object): return None successful = [key for key in parmap(check, checks) if key is not None] + # The 'successful' list is ordered like the input paths. + # Reverse it here so that the dict creation (last insert wins) + # does not spoil the intented precedence. + successful.reverse() return dict(((v, p, s), path) for v, p, s, path in successful) @classmethod -- cgit v1.2.3-70-g09d2 From 12dbd65f4cbf3218155b86b5f9b1281198a2453d Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 27 Apr 2016 13:56:32 +0200 Subject: test-install : first draft that works --- lib/spack/spack/cmd/test-install.py | 249 ++++++++++++++++++------------------ 1 file changed, 125 insertions(+), 124 deletions(-) diff --git a/lib/spack/spack/cmd/test-install.py b/lib/spack/spack/cmd/test-install.py index 733b58f252..c214cd3f66 100644 --- a/lib/spack/spack/cmd/test-install.py +++ b/lib/spack/spack/cmd/test-install.py @@ -24,10 +24,9 @@ ############################################################################## import argparse import codecs -import itertools import os -import re import time +import xml.dom.minidom import xml.etree.ElementTree as ET import llnl.util.tty as tty @@ -58,54 +57,72 @@ def setup_parser(subparser): subparser.add_argument('package', nargs=argparse.REMAINDER, help="spec of package to install") -class JunitResultFormat(object): - def __init__(self): - self.root = ET.Element('testsuite') - self.tests = [] - - def add_test(self, buildId, testResult, buildInfo=None): - self.tests.append((buildId, testResult, buildInfo)) - - def write_to(self, stream): - self.root.set('tests', '{0}'.format(len(self.tests))) - for buildId, testResult, buildInfo in self.tests: - testcase = ET.SubElement(self.root, 'testcase') - testcase.set('classname', buildId.name) - testcase.set('name', buildId.stringId()) - if testResult == TestResult.FAILED: - failure = ET.SubElement(testcase, 'failure') - failure.set('type', "Build Error") - failure.text = buildInfo - elif testResult == TestResult.SKIPPED: - skipped = ET.SubElement(testcase, 'skipped') - skipped.set('type', "Skipped Build") - skipped.text = buildInfo - ET.ElementTree(self.root).write(stream) - - class TestResult(object): PASSED = 0 FAILED = 1 SKIPPED = 2 + ERRORED = 3 -class BuildId(object): - def __init__(self, spec): - self.name = spec.name - self.version = spec.version - self.hashId = spec.dag_hash() - - def stringId(self): - return "-".join(str(x) for x in (self.name, self.version, self.hashId)) - - def __hash__(self): - return hash((self.name, self.version, self.hashId)) - - def __eq__(self, other): - if not isinstance(other, BuildId): - return False +class TestSuite(object): + def __init__(self, filename): + self.filename = filename + self.root = ET.Element('testsuite') + self.tests = [] - return ((self.name, self.version, self.hashId) == (other.name, other.version, other.hashId)) + def __enter__(self): + return self + + def append(self, item): + if not isinstance(item, TestCase): + raise TypeError('only TestCase instances may be appended to a TestSuite instance') + self.tests.append(item) # Append the item to the list of tests + + def __exit__(self, exc_type, exc_val, exc_tb): + # Prepare the header for the entire test suite + number_of_errors = sum(x.result_type == TestResult.ERRORED for x in self.tests) + self.root.set('errors', str(number_of_errors)) + number_of_failures = sum(x.result_type == TestResult.FAILED for x in self.tests) + self.root.set('failures', str(number_of_failures)) + self.root.set('tests', str(len(self.tests))) + + for item in self.tests: + self.root.append(item.element) + + with open(self.filename, 'wb') as file: + xml_string = ET.tostring(self.root) + xml_string = xml.dom.minidom.parseString(xml_string).toprettyxml() + file.write(xml_string) + + +class TestCase(object): + + results = { + TestResult.PASSED: None, + TestResult.SKIPPED: 'skipped', + TestResult.FAILED: 'failure', + TestResult.ERRORED: 'error', + } + + def __init__(self, classname, name, time=None): + self.element = ET.Element('testcase') + self.element.set('classname', str(classname)) + self.element.set('name', str(name)) + if time is not None: + self.element.set('time', str(time)) + self.result_type = None + + def set_result(self, result_type, message=None, error_type=None, text=None): + self.result_type = result_type + result = TestCase.results[self.result_type] + if result is not None: + subelement = ET.SubElement(self.element, result) + if error_type is not None: + subelement.set('type', error_type) + if message is not None: + subelement.set('message', str(message)) + if text is not None: + subelement.text = text def fetch_log(path): @@ -116,39 +133,7 @@ def fetch_log(path): def failed_dependencies(spec): - return set(childSpec for childSpec in spec.dependencies.itervalues() if not spack.repo.get(childSpec).installed) - - -def create_test_output(top_spec, newInstalls, output, getLogFunc=fetch_log): - # Post-order traversal is not strictly required but it makes sense to output - # tests for dependencies first. - for spec in top_spec.traverse(order='post'): - if spec not in newInstalls: - continue - - failedDeps = failed_dependencies(spec) - package = spack.repo.get(spec) - if failedDeps: - result = TestResult.SKIPPED - dep = iter(failedDeps).next() - depBID = BuildId(dep) - errOutput = "Skipped due to failed dependency: {0}".format(depBID.stringId()) - elif (not package.installed) and (not package.stage.source_path): - result = TestResult.FAILED - errOutput = "Failure to fetch package resources." - elif not package.installed: - result = TestResult.FAILED - lines = getLogFunc(package.build_log_path) - errMessages = list(line for line in lines if re.search('error:', line, re.IGNORECASE)) - errOutput = errMessages if errMessages else lines[-10:] - errOutput = '\n'.join(itertools.chain([spec.to_yaml(), "Errors:"], errOutput, ["Build Log:", - package.build_log_path])) - else: - result = TestResult.PASSED - errOutput = None - - bId = BuildId(spec) - output.add_test(bId, result, errOutput) + return set(item for item in spec.dependencies.itervalues() if not spack.repo.get(item).installed) def get_top_spec_or_die(args): @@ -159,6 +144,62 @@ def get_top_spec_or_die(args): return top_spec +def install_single_spec(spec, number_of_jobs): + package = spack.repo.get(spec) + + # If it is already installed, skip the test + if spack.repo.get(spec).installed: + testcase = TestCase(package.name, package.spec.short_spec, time=0.0) + testcase.set_result(TestResult.SKIPPED, message='Skipped [already installed]', error_type='already_installed') + return testcase + + # If it relies on dependencies that did not install, skip + if failed_dependencies(spec): + testcase = TestCase(package.name, package.spec.short_spec, time=0.0) + testcase.set_result(TestResult.SKIPPED, message='Skipped [failed dependencies]', error_type='dep_failed') + return testcase + + # Otherwise try to install the spec + try: + start_time = time.time() + package.do_install(keep_prefix=False, + keep_stage=True, + ignore_deps=False, + make_jobs=number_of_jobs, + verbose=True, + fake=False) + duration = time.time() - start_time + testcase = TestCase(package.name, package.spec.short_spec, duration) + except InstallError: + # An InstallError is considered a failure (the recipe didn't work correctly) + duration = time.time() - start_time + # Try to get the log + lines = fetch_log(package.build_log_path) + text = '\n'.join(lines) + testcase = TestCase(package.name, package.spec.short_spec, duration) + testcase.set_result(TestResult.FAILED, message='Installation failure', text=text) + + except FetchError: + # A FetchError is considered an error (we didn't even start building) + duration = time.time() - start_time + testcase = TestCase(package.name, package.spec.short_spec, duration) + testcase.set_result(TestResult.ERRORED, message='Unable to fetch package') + + return testcase + + +def get_filename(args, top_spec): + if not args.output: + fname = 'test-{x.name}-{x.version}-{hash}.xml'.format(x=top_spec, hash=top_spec.dag_hash()) + output_directory = join_path(os.getcwd(), 'test-output') + if not os.path.exists(output_directory): + os.mkdir(output_directory) + output_filename = join_path(output_directory, fname) + else: + output_filename = args.output + return output_filename + + def test_install(parser, args): # Check the input if not args.package: @@ -173,51 +214,11 @@ def test_install(parser, args): # Get the one and only top spec top_spec = get_top_spec_or_die(args) - - if not args.output: - bId = BuildId(top_spec) - outputDir = join_path(os.getcwd(), "test-output") - if not os.path.exists(outputDir): - os.mkdir(outputDir) - outputFpath = join_path(outputDir, "test-{0}.xml".format(bId.stringId())) - else: - outputFpath = args.output - - new_installs = set() - for spec in top_spec.traverse(order='post'): - # Calling do_install for the top-level package would be sufficient but - # this attempts to keep going if any package fails (other packages which - # are not dependents may succeed) - package = spack.repo.get(spec) - - if not package.installed: - new_installs.add(spec) - - duration = 0.0 - if (not failed_dependencies(spec)) and (not package.installed): - try: - start_time = time.time() - package.do_install(keep_prefix=False, - keep_stage=True, - ignore_deps=False, - make_jobs=args.jobs, - verbose=True, - fake=False) - duration = time.time() - start_time - except InstallError: - pass - except FetchError: - pass - - jrf = JunitResultFormat() - handled = {} - create_test_output(top_spec, new_installs, jrf) - - with open(outputFpath, 'wb') as F: - jrf.write_to(F) - - # with JunitTestSuite(filename) as test_suite: - # for spec in top_spec.traverse(order='post'): - # test_case = install_test(spec) - # test_suite.append( test_case ) - # + # Get the filename of the test + output_filename = get_filename(args, top_spec) + # TEST SUITE + with TestSuite(output_filename) as test_suite: + # Traverse in post order : each spec is a test case + for spec in top_spec.traverse(order='post'): + test_case = install_single_spec(spec, args.jobs) + test_suite.append(test_case) -- cgit v1.2.3-70-g09d2 From 42fab1591d9fc0b140d33d68ef27d3fe401178e4 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 27 Apr 2016 17:19:03 +0200 Subject: test-install : fixed unit tests --- lib/spack/spack/cmd/test-install.py | 3 +- lib/spack/spack/test/__init__.py | 3 +- lib/spack/spack/test/cmd/test_install.py | 191 +++++++++++++++++++++++++++++++ lib/spack/spack/test/unit_install.py | 126 -------------------- 4 files changed, 195 insertions(+), 128 deletions(-) create mode 100644 lib/spack/spack/test/cmd/test_install.py delete mode 100644 lib/spack/spack/test/unit_install.py diff --git a/lib/spack/spack/cmd/test-install.py b/lib/spack/spack/cmd/test-install.py index c214cd3f66..e323969634 100644 --- a/lib/spack/spack/cmd/test-install.py +++ b/lib/spack/spack/cmd/test-install.py @@ -115,7 +115,7 @@ class TestCase(object): def set_result(self, result_type, message=None, error_type=None, text=None): self.result_type = result_type result = TestCase.results[self.result_type] - if result is not None: + if result is not None or result is not TestResult.PASSED: subelement = ET.SubElement(self.element, result) if error_type is not None: subelement.set('type', error_type) @@ -170,6 +170,7 @@ def install_single_spec(spec, number_of_jobs): fake=False) duration = time.time() - start_time testcase = TestCase(package.name, package.spec.short_spec, duration) + testcase.set_result(TestResult.PASSED) except InstallError: # An InstallError is considered a failure (the recipe didn't work correctly) duration = time.time() - start_time diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index 175a49428c..bea41a4adf 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -68,7 +68,8 @@ test_names = ['versions', 'yaml', 'sbang', 'environment', - 'cmd.uninstall'] + 'cmd.uninstall', + 'cmd.test_install'] def list_tests(): diff --git a/lib/spack/spack/test/cmd/test_install.py b/lib/spack/spack/test/cmd/test_install.py new file mode 100644 index 0000000000..1860622ad6 --- /dev/null +++ b/lib/spack/spack/test/cmd/test_install.py @@ -0,0 +1,191 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +import collections +from contextlib import contextmanager + +import StringIO + +FILE_REGISTRY = collections.defaultdict(StringIO.StringIO) + +# Monkey-patch open to write module files to a StringIO instance +@contextmanager +def mock_open(filename, mode): + if not mode == 'wb': + raise RuntimeError('test.test_install : unexpected opening mode for monkey-patched open') + + FILE_REGISTRY[filename] = StringIO.StringIO() + + try: + yield FILE_REGISTRY[filename] + finally: + handle = FILE_REGISTRY[filename] + FILE_REGISTRY[filename] = handle.getvalue() + handle.close() + +import os +import itertools +import unittest + +import spack +import spack.cmd + + +# The use of __import__ is necessary to maintain a name with hyphen (which cannot be an identifier in python) +test_install = __import__("spack.cmd.test-install", fromlist=['test_install']) + + +class MockSpec(object): + def __init__(self, name, version, hashStr=None): + self.dependencies = {} + self.name = name + self.version = version + self.hash = hashStr if hashStr else hash((name, version)) + + def traverse(self, order=None): + for _, spec in self.dependencies.items(): + yield spec + yield self + #allDeps = itertools.chain.from_iterable(i.traverse() for i in self.dependencies.itervalues()) + #return set(itertools.chain([self], allDeps)) + + def dag_hash(self): + return self.hash + + @property + def short_spec(self): + return '-'.join([self.name, str(self.version), str(self.hash)]) + + +class MockPackage(object): + def __init__(self, spec, buildLogPath): + self.name = spec.name + self.spec = spec + self.installed = False + self.build_log_path = buildLogPath + + def do_install(self, *args, **kwargs): + self.installed = True + + +class MockPackageDb(object): + def __init__(self, init=None): + self.specToPkg = {} + if init: + self.specToPkg.update(init) + + def get(self, spec): + return self.specToPkg[spec] + + +def mock_fetch_log(path): + return [] + +specX = MockSpec('X', "1.2.0") +specY = MockSpec('Y', "2.3.8") +specX.dependencies['Y'] = specY +pkgX = MockPackage(specX, 'logX') +pkgY = MockPackage(specY, 'logY') + + +class MockArgs(object): + def __init__(self, package): + self.package = package + self.jobs = None + self.no_checksum = False + self.output = None + + +class TestInstallTest(unittest.TestCase): + """ + Tests test-install where X->Y + """ + + def setUp(self): + super(TestInstallTest, self).setUp() + + # Monkey patch parse specs + def monkey_parse_specs(x, concretize): + if x == 'X': + return [specX] + elif x == 'Y': + return [specY] + return [] + + self.parse_specs = spack.cmd.parse_specs + spack.cmd.parse_specs = monkey_parse_specs + + # Monkey patch os.mkdirp + self.os_mkdir = os.mkdir + os.mkdir = lambda x: True + + # Monkey patch open + test_install.open = mock_open + + # Clean FILE_REGISTRY + FILE_REGISTRY = collections.defaultdict(StringIO.StringIO) + + pkgX.installed = False + pkgY.installed = False + + # Monkey patch pkgDb + self.saved_db = spack.repo + pkgDb = MockPackageDb({specX: pkgX, specY: pkgY}) + spack.repo = pkgDb + + def tearDown(self): + # Remove the monkey patched test_install.open + test_install.open = open + + # Remove the monkey patched os.mkdir + os.mkdir = self.os_mkdir + del self.os_mkdir + + # Remove the monkey patched parse_specs + spack.cmd.parse_specs = self.parse_specs + del self.parse_specs + super(TestInstallTest, self).tearDown() + + spack.repo = self.saved_db + + def test_installing_both(self): + test_install.test_install(None, MockArgs('X') ) + self.assertEqual(len(FILE_REGISTRY), 1) + for _, content in FILE_REGISTRY.items(): + self.assertTrue('tests="2"' in content) + self.assertTrue('failures="0"' in content) + self.assertTrue('errors="0"' in content) + + def test_dependency_already_installed(self): + pkgX.installed = True + pkgY.installed = True + test_install.test_install(None, MockArgs('X')) + self.assertEqual(len(FILE_REGISTRY), 1) + for _, content in FILE_REGISTRY.items(): + self.assertTrue('tests="2"' in content) + self.assertTrue('failures="0"' in content) + self.assertTrue('errors="0"' in content) + self.assertEqual(sum('skipped' in line for line in content.split('\n')), 2) + + #TODO: add test(s) where Y fails to install \ No newline at end of file diff --git a/lib/spack/spack/test/unit_install.py b/lib/spack/spack/test/unit_install.py deleted file mode 100644 index 18615b7efe..0000000000 --- a/lib/spack/spack/test/unit_install.py +++ /dev/null @@ -1,126 +0,0 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## -import itertools -import unittest - -import spack - -test_install = __import__("spack.cmd.test-install", - fromlist=["BuildId", "create_test_output", "TestResult"]) - -class MockOutput(object): - def __init__(self): - self.results = {} - - def add_test(self, buildId, passed=True, buildInfo=None): - self.results[buildId] = passed - - def write_to(self, stream): - pass - -class MockSpec(object): - def __init__(self, name, version, hashStr=None): - self.dependencies = {} - self.name = name - self.version = version - self.hash = hashStr if hashStr else hash((name, version)) - - def traverse(self, order=None): - allDeps = itertools.chain.from_iterable(i.traverse() for i in - self.dependencies.itervalues()) - return set(itertools.chain([self], allDeps)) - - def dag_hash(self): - return self.hash - - def to_yaml(self): - return "<<>>".format(test_install.BuildId(self).stringId()) - -class MockPackage(object): - def __init__(self, buildLogPath): - self.installed = False - self.build_log_path = buildLogPath - -specX = MockSpec("X", "1.2.0") -specY = MockSpec("Y", "2.3.8") -specX.dependencies['Y'] = specY -pkgX = MockPackage('logX') -pkgY = MockPackage('logY') -bIdX = test_install.BuildId(specX) -bIdY = test_install.BuildId(specY) - -class UnitInstallTest(unittest.TestCase): - """Tests test-install where X->Y""" - - def setUp(self): - super(UnitInstallTest, self).setUp() - - pkgX.installed = False - pkgY.installed = False - - self.saved_db = spack.repo - pkgDb = MockPackageDb({specX:pkgX, specY:pkgY}) - spack.repo = pkgDb - - - def tearDown(self): - super(UnitInstallTest, self).tearDown() - - spack.repo = self.saved_db - - def test_installing_both(self): - mo = MockOutput() - - pkgX.installed = True - pkgY.installed = True - test_install.create_test_output(specX, [specX, specY], mo, getLogFunc=mock_fetch_log) - - self.assertEqual(mo.results, - {bIdX:test_install.TestResult.PASSED, - bIdY:test_install.TestResult.PASSED}) - - - def test_dependency_already_installed(self): - mo = MockOutput() - - pkgX.installed = True - pkgY.installed = True - test_install.create_test_output(specX, [specX], mo, getLogFunc=mock_fetch_log) - self.assertEqual(mo.results, {bIdX:test_install.TestResult.PASSED}) - - #TODO: add test(s) where Y fails to install - - -class MockPackageDb(object): - def __init__(self, init=None): - self.specToPkg = {} - if init: - self.specToPkg.update(init) - - def get(self, spec): - return self.specToPkg[spec] - -def mock_fetch_log(path): - return [] -- cgit v1.2.3-70-g09d2 From ec5bb88820e42b2cf4c839cf134e18a167a52255 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 27 Apr 2016 18:06:41 +0200 Subject: test-install : unit tests (hopefully) fixed for real --- lib/spack/spack/test/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index bea41a4adf..3c5edde66b 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -61,7 +61,6 @@ test_names = ['versions', 'optional_deps', 'make_executable', 'configure_guess', - 'unit_install', 'lock', 'database', 'namespace_trie', -- cgit v1.2.3-70-g09d2 From 4846ab70d8c805c6533d90b9345295c4160b4e35 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 27 Apr 2016 18:21:36 +0200 Subject: test-install : python 2.6 compatibility --- lib/spack/spack/test/cmd/test_install.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/spack/spack/test/cmd/test_install.py b/lib/spack/spack/test/cmd/test_install.py index 1860622ad6..2206c7bea1 100644 --- a/lib/spack/spack/test/cmd/test_install.py +++ b/lib/spack/spack/test/cmd/test_install.py @@ -117,6 +117,7 @@ class MockArgs(object): self.output = None +# TODO: add test(s) where Y fails to install class TestInstallTest(unittest.TestCase): """ Tests test-install where X->Y @@ -187,5 +188,3 @@ class TestInstallTest(unittest.TestCase): self.assertTrue('failures="0"' in content) self.assertTrue('errors="0"' in content) self.assertEqual(sum('skipped' in line for line in content.split('\n')), 2) - - #TODO: add test(s) where Y fails to install \ No newline at end of file -- cgit v1.2.3-70-g09d2 From b1ba869b37803ba9cda28ab64b7f0052e8eda11d Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 27 Apr 2016 19:28:13 +0200 Subject: test-install : fixed error in logic exposed by tests --- lib/spack/spack/cmd/test-install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/test-install.py b/lib/spack/spack/cmd/test-install.py index e323969634..3277e15548 100644 --- a/lib/spack/spack/cmd/test-install.py +++ b/lib/spack/spack/cmd/test-install.py @@ -115,7 +115,7 @@ class TestCase(object): def set_result(self, result_type, message=None, error_type=None, text=None): self.result_type = result_type result = TestCase.results[self.result_type] - if result is not None or result is not TestResult.PASSED: + if result is not None and result is not TestResult.PASSED: subelement = ET.SubElement(self.element, result) if error_type is not None: subelement.set('type', error_type) -- cgit v1.2.3-70-g09d2 From b5ebd12fe2708997b63fea1a0f1cac43c3e8e847 Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Wed, 27 Apr 2016 13:42:59 -0400 Subject: Add to sub dirs checked for pkg-config files. This lets me build against the pure-include package Eigen. --- lib/spack/spack/build_environment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index eb72f2a6b4..cd9f647ddf 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -175,8 +175,8 @@ def set_build_environment_variables(pkg, env): # Add any pkgconfig directories to PKG_CONFIG_PATH pkg_config_dirs = [] for p in dep_prefixes: - for libdir in ('lib', 'lib64'): - pcdir = join_path(p, libdir, 'pkgconfig') + for maybe in ('lib', 'lib64', 'share'): + pcdir = join_path(p, maybe, 'pkgconfig') if os.path.isdir(pcdir): pkg_config_dirs.append(pcdir) env.set_path('PKG_CONFIG_PATH', pkg_config_dirs) -- cgit v1.2.3-70-g09d2 From e53571d2f00d2640005a10d69edbad838cb38fef Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 27 Apr 2016 14:46:57 -0400 Subject: fetch_strategy: download to temporary files This supports graceful recovery if spack is killed via a signal (e.g., SIGINT) while downloading a file. Fixes #287. --- lib/spack/spack/fetch_strategy.py | 24 ++++++++++++++++++++++-- lib/spack/spack/stage.py | 12 ++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 4ea87bea7e..ce2c4e30c7 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -157,12 +157,26 @@ class URLFetchStrategy(FetchStrategy): tty.msg("Already downloaded %s" % self.archive_file) return + possible_files = self.stage.expected_archive_files + save_file = None + partial_file = None + if possible_files: + save_file = self.stage.expected_archive_files[0] + partial_file = self.stage.expected_archive_files[0] + '.part' + tty.msg("Trying to fetch from %s" % self.url) - curl_args = ['-O', # save file to disk + if partial_file: + save_args = ['-C', '-', # continue partial downloads + '-o', partial_file] # use a .part file + else: + save_args = ['-O'] + + curl_args = save_args + [ '-f', # fail on >400 errors '-D', '-', # print out HTML headers - '-L', self.url, ] + '-L', # resolve 3xx redirects + self.url, ] if sys.stdout.isatty(): curl_args.append('-#') # status bar when using a tty @@ -178,6 +192,9 @@ class URLFetchStrategy(FetchStrategy): if self.archive_file: os.remove(self.archive_file) + if partial_file and os.path.exists(partial_file): + os.remove(partial_file) + if spack.curl.returncode == 22: # This is a 404. Curl will print the error. raise FailedDownloadError( @@ -209,6 +226,9 @@ class URLFetchStrategy(FetchStrategy): "'spack clean ' to remove the bad archive, then fix", "your internet gateway issue and install again.") + if save_file: + os.rename(partial_file, save_file) + if not self.archive_file: raise FailedDownloadError(self.url) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index d711752c20..84c47ee660 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -210,6 +210,18 @@ class Stage(object): return False + @property + def expected_archive_files(self): + """Possible archive file paths.""" + paths = [] + if isinstance(self.fetcher, fs.URLFetchStrategy): + paths.append(os.path.join(self.path, os.path.basename(self.fetcher.url))) + + if self.mirror_path: + paths.append(os.path.join(self.path, os.path.basename(self.mirror_path))) + + return paths + @property def archive_file(self): """Path to the source archive within this stage directory.""" -- cgit v1.2.3-70-g09d2 From ee6a75c9b5bb072ef852b2fae80e2dc1f3944d53 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Wed, 27 Apr 2016 18:43:16 -0400 Subject: Added missing -lpthread to OpenBLAS check. See: https://github.com/xianyi/OpenBLAS/wiki/faq#static_link --- var/spack/repos/builtin/packages/openblas/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 61250fb310..52edd1a77a 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -119,7 +119,7 @@ return 0; # TODO: Automate these path and library settings cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") cc('-o', "check", "check.o", - "-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas") + "-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas", "-lpthread") try: check = Executable('./check') output = check(return_output=True) -- cgit v1.2.3-70-g09d2 From 62d806d51254c4b063c2e88b616526d1abb1e61e Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Wed, 27 Apr 2016 19:01:41 -0400 Subject: hdf5: Set preferred version, so as to not break NetCDF (for now). --- var/spack/repos/builtin/packages/hdf5/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index cce609eb29..470969832f 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -38,7 +38,7 @@ class Hdf5(Package): list_depth = 3 version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199') - version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618') + version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618', preferred=True) version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') version('1.8.13', 'c03426e9e77d7766944654280b467289') -- cgit v1.2.3-70-g09d2 From 71ca837adad0e8c8149bdfd5be602ac7cc27c9a5 Mon Sep 17 00:00:00 2001 From: Elizabeth F Date: Wed, 27 Apr 2016 20:35:29 -0400 Subject: Add '+fpic' variant. --- var/spack/repos/builtin/packages/openblas/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 52edd1a77a..f5d656f659 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -14,6 +14,7 @@ class Openblas(Package): variant('shared', default=True, description="Build shared libraries as well as static libs.") variant('openmp', default=True, description="Enable OpenMP support.") + variant('fpic', default=True, description="Build position independent code") # virtual dependency provides('blas') @@ -33,6 +34,8 @@ class Openblas(Package): if '+shared' in spec: make_targets += ['shared'] else: + if '+fpic' in spec: + make_defs.extend(['CFLAGS=-fPIC', 'FFLAGS=-fPIC']) make_defs += ['NO_SHARED=1'] # fix missing _dggsvd_ and _sggsvd_ -- cgit v1.2.3-70-g09d2 From 3b84345b7721e9da1c816a492c0d449fd519a1f6 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 28 Apr 2016 11:05:59 -0700 Subject: Changed yaml format for node_dicts to mitigate future incompatibilities --- lib/spack/spack/spec.py | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 2bd5d85c57..7ab8102935 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -760,13 +760,13 @@ class Spec(object): def to_node_dict(self): + 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()) ) d = { - 'variants' : dict( - (name,v.value) for name, v in self.variants.items()), + 'parameters' : params, 'arch' : self.architecture, 'dependencies' : dict((d, self.dependencies[d].dag_hash()) for d in sorted(self.dependencies)), - 'compiler_flags' : dict((name, value) for name, value in self.compiler_flags.items()) } # Older concrete specs do not have a namespace. Omit for @@ -807,11 +807,17 @@ class Spec(object): else: spec.compiler = CompilerSpec.from_dict(node) - for name, value in node['variants'].items(): - spec.variants[name] = VariantSpec(name, value) - - for name, value in node['compiler_flags'].items(): - spec.compiler_flags[name] = value + if 'parameters' in node: + for name, value in node['parameters'].items(): + if name in _valid_compiler_flags: + spec.compiler_flags[name] = value + else: + spec.variants[name] = VariantSpec(name, value) + elif 'variants' in node: + for name, value in node['variants'].items(): + spec.variants[name] = VariantSpec(name, value) + else: + raise SpackRecordError("Did not find a valid format for variants in YAML file") return spec @@ -2436,3 +2442,7 @@ class UnsatisfiableDependencySpecError(UnsatisfiableSpecError): class SpackYAMLError(spack.error.SpackError): def __init__(self, msg, yaml_error): super(SpackYAMLError, self).__init__(msg, str(yaml_error)) + +class SpackRecordError(spack.error.SpackError): + def __init__(self, msg): + super(SpackRecordError, self).__init__(msg) -- cgit v1.2.3-70-g09d2 From 49956faab97e2dea52371755d0fcb9b013567ac7 Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Wed, 24 Feb 2016 12:19:06 +0100 Subject: First try to make file system views of specs. --- lib/spack/spack/cmd/view.py | 108 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 lib/spack/spack/cmd/view.py diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py new file mode 100644 index 0000000000..c7f1c21f67 --- /dev/null +++ b/lib/spack/spack/cmd/view.py @@ -0,0 +1,108 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +import os +import argparse + +import spack +import spack.cmd +import llnl.util.tty as tty + +description = "Produce a single-rooted directory view of a spec." + +def setup_parser(subparser): + setup_parser.parser = subparser + + subparser.add_argument('prefix', nargs=1, + help="Path to top-level directory for the view.") + subparser.add_argument('specs', nargs=argparse.REMAINDER, + help="specs of packages to expose in the view.") + +def assuredir(path): + 'Assure path exists as a directory' + if not os.path.exists(path): + os.makedirs(path) + +def relative_to(prefix, path): + assert 0 == path.find(prefix) + reldir = path[len(prefix):] + if reldir.startswith('/'): + reldir = reldir[1:] + return reldir + +def view_one(prefix, spec): + print spec.name,spec.prefix + + dotspack = os.path.join(prefix, '.spack', spec.name) + + if os.path.exists(os.path.join(dotspack)): + tty.warn("Skipping previously added package %s"%spec.name) + return + + + for dirpath,dirnames,filenames in os.walk(spec.prefix): + if not filenames: + continue # avoid explicitly making empty dirs + + reldir = relative_to(spec.prefix, dirpath) + + # fixme: assumes .spack has no subdirs + if dirpath.endswith('.spack'): + targdir = dotspack + else: + targdir = os.path.join(prefix, reldir) + + assuredir(targdir) + + print '\t%s...'%reldir, + nlinks = 0 + for fname in filenames: + src = os.path.join(dirpath, fname) + dst = os.path.join(targdir, fname) + if os.path.exists(dst): + tty.warn("Skipping existing file for view: %s" % dst) + continue + os.symlink(src,dst) + nlinks += 1 + print nlinks + + +def view(parser, args): + # if not args.specs: + # tty.die("view creation requires at least one spec argument") + + specs = spack.cmd.parse_specs(args.specs, normalize=True, concretize=True) + if not specs: + setup_parser.parser.print_help() + return 1 + + prefix = args.prefix[0] + assuredir(prefix) + + flat = set() + for spec in specs: + flat.update(spec.normalized().traverse()) + + for spec in flat: + view_one(prefix, spec) -- cgit v1.2.3-70-g09d2 From 8cd13d4b3552e6737ed9fc768bbe544024e05b10 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 28 Apr 2016 12:49:21 -0700 Subject: Make arch command print out the platform. --- lib/spack/spack/cmd/arch.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/spack/spack/cmd/arch.py b/lib/spack/spack/cmd/arch.py index db27544ffd..cd0ce2bb2e 100644 --- a/lib/spack/spack/cmd/arch.py +++ b/lib/spack/spack/cmd/arch.py @@ -28,8 +28,4 @@ import spack.architecture as architecture description = "Print the architecture for this machine" def arch(parser, args): - configured_sys_type = architecture.get_sys_type_from_spack_globals() - if not configured_sys_type: - configured_sys_type = "autodetect" - print "Configured sys_type: %s" % configured_sys_type - print "Autodetected default sys_type: %s" % architecture.sys_type() + print architecture.sys_type() -- cgit v1.2.3-70-g09d2 From 4ba73dac34cdb3c3e5256b047449c763e4e38f7a Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 28 Apr 2016 14:01:38 -0700 Subject: Unit tests for cflags PR --- lib/spack/spack/spec.py | 40 ++++++++++++++---------- lib/spack/spack/test/concretize.py | 14 +++++++++ lib/spack/spack/test/optional_deps.py | 7 +++++ lib/spack/spack/test/spec_semantics.py | 57 ++++++++++++++++++++++++++++++++-- lib/spack/spack/test/spec_syntax.py | 7 ++++- 5 files changed, 105 insertions(+), 20 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 7ab8102935..a702030d1c 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -385,18 +385,12 @@ class FlagMap(HashableMap): def satisfies(self, other, strict=False): - #"strict" makes no sense if this works, but it matches how we need it. Maybe - #strict=True - if strict: -# if other.spec and other.spec.concrete: - return all(f in self and set(self[f]) == set(other[f]) + if strict or (self.spec and self.spec._concrete): + return all(f in self and set(self[f]) <= set(other[f]) for f in other) -# else: -# return all(f in self and set(self[f]) >= set(other[f]) -# for f in other) else: - return all(f in self and set(self[f]) == set(other[f]) - for f in other if other[f] != []) + return all(set(self[f]) <= set(other[f]) + for f in other if (other[f] != [] and f in self)) def constrain(self, other): @@ -404,14 +398,16 @@ class FlagMap(HashableMap): Return whether the spec changed. """ - changed = False + if other.spec and other.spec._concrete: + for k in self: + if k not in other: + raise UnsatisfiableCompilerFlagSpecError(self[k], '') - # Others_set removes flags set to '' from the comparison - others_set = (k for k in other if other[k] != []) - for k in others_set: - if k in self and not set(self[k]) >= set(other[k]): - self[k] = list(set(self[k]) | set(other[k])) - changed = True + changed = False + for k in other: + if k in self and not set(self[k]) <= set(other[k]): + raise UnsatisfiableCompilerFlagSpecError( + ' '.join(f for f in self[k]), ' '.join( f for f in other[k])) elif k not in self: self[k] = other[k] changed = True @@ -485,6 +481,7 @@ class Spec(object): self.architecture = other.architecture self.compiler = other.compiler self.compiler_flags = other.compiler_flags + self.compiler_flags.spec = self self.dependencies = other.dependencies self.variants = other.variants self.variants.spec = self @@ -520,6 +517,10 @@ class Spec(object): """Called by the parser to add a variant.""" if name in self.variants: raise DuplicateVariantError( "Cannot specify variant '%s' twice" % name) + if isinstance(value, basestring) and value.upper() == 'TRUE': + value = True + elif isinstance(value, basestring) and value.upper() == 'FALSE': + value = False self.variants[name] = VariantSpec(name, value) @@ -2416,6 +2417,11 @@ class UnsatisfiableVariantSpecError(UnsatisfiableSpecError): super(UnsatisfiableVariantSpecError, self).__init__( provided, required, "variant") +class UnsatisfiableCompilerFlagSpecError(UnsatisfiableSpecError): + """Raised when a spec variant conflicts with package constraints.""" + def __init__(self, provided, required): + super(UnsatisfiableCompilerFlagSpecError, self).__init__( + provided, required, "compiler_flags") class UnsatisfiableArchitectureSpecError(UnsatisfiableSpecError): """Raised when a spec architecture conflicts with package constraints.""" diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index f75d1d2b7c..22b9754f04 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -40,9 +40,18 @@ class ConcretizeTest(MockPackagesTest): cvariant = concrete.variants[name] self.assertEqual(avariant.value, cvariant.value) + if abstract.compiler_flags: + for flag in abstract.compiler_flags: + aflag = abstract.compiler_flags[flag] + cflag = concrete.compiler_flags[flag] + self.assertTrue(set(aflag) <= set(cflag)) + for name in abstract.package.variants: self.assertTrue(name in concrete.variants) + for flag in concrete.compiler_flags.valid_compiler_flags(): + self.assertTrue(flag in concrete.compiler_flags) + if abstract.compiler and abstract.compiler.concrete: self.assertEqual(abstract.compiler, concrete.compiler) @@ -75,9 +84,14 @@ class ConcretizeTest(MockPackagesTest): def test_concretize_variant(self): self.check_concretize('mpich+debug') self.check_concretize('mpich~debug') + self.check_concretize('mpich debug=2') self.check_concretize('mpich') + def test_conretize_compiler_flags(self): + self.check_concretize('mpich cppflags="-O3"') + + def test_concretize_preferred_version(self): spec = self.check_concretize('python') self.assertEqual(spec.versions, ver('2.7.11')) diff --git a/lib/spack/spack/test/optional_deps.py b/lib/spack/spack/test/optional_deps.py index 55f35ea4c9..8debde73d6 100644 --- a/lib/spack/spack/test/optional_deps.py +++ b/lib/spack/spack/test/optional_deps.py @@ -42,6 +42,13 @@ class ConcretizeTest(MockPackagesTest): self.check_normalize('optional-dep-test+a', Spec('optional-dep-test+a', Spec('a'))) + self.check_normalize('optional-dep-test a=true', + Spec('optional-dep-test a=true', Spec('a'))) + + + self.check_normalize('optional-dep-test a=true', + Spec('optional-dep-test+a', Spec('a'))) + self.check_normalize('optional-dep-test@1.1', Spec('optional-dep-test@1.1', Spec('b'))) diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 7875d45f2a..f21dee9f27 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -191,12 +191,20 @@ class SpecSematicsTest(MockPackagesTest): def test_satisfies_matching_variant(self): self.check_satisfies('mpich+foo', 'mpich+foo') self.check_satisfies('mpich~foo', 'mpich~foo') + self.check_satisfies('mpich foo=1', 'mpich foo=1') + + #confirm that synonymous syntax works correctly + self.check_satisfies('mpich+foo', 'mpich foo=True') + self.check_satisfies('mpich foo=true', 'mpich+foo') + self.check_satisfies('mpich~foo', 'mpich foo=FALSE') + self.check_satisfies('mpich foo=False', 'mpich~foo') def test_satisfies_unconstrained_variant(self): # only asked for mpich, no constraints. Either will do. self.check_satisfies('mpich+foo', 'mpich') self.check_satisfies('mpich~foo', 'mpich') + self.check_satisfies('mpich foo=1', 'mpich') def test_unsatisfiable_variants(self): @@ -205,16 +213,44 @@ class SpecSematicsTest(MockPackagesTest): # 'mpich' is not concrete: self.check_satisfies('mpich', 'mpich+foo', False) self.check_satisfies('mpich', 'mpich~foo', False) + self.check_satisfies('mpich', 'mpich foo=1', False) # 'mpich' is concrete: self.check_unsatisfiable('mpich', 'mpich+foo', True) self.check_unsatisfiable('mpich', 'mpich~foo', True) + self.check_unsatisfiable('mpich', 'mpich foo=1', True) def test_unsatisfiable_variant_mismatch(self): # No matchi in specs self.check_unsatisfiable('mpich~foo', 'mpich+foo') self.check_unsatisfiable('mpich+foo', 'mpich~foo') + self.check_unsatisfiable('mpich foo=1', 'mpich foo=2') + + + def test_satisfies_matching_compiler_flag(self): + self.check_satisfies('mpich cppflags="-O3"', 'mpich cppflags="-O3"') + self.check_satisfies('mpich cppflags="-O3 -Wall"', 'mpich cppflags="-O3 -Wall"') + + + def test_satisfies_unconstrained_compiler_flag(self): + # only asked for mpich, no constraints. Any will do. + self.check_satisfies('mpich cppflags="-O3"', 'mpich') + + + def test_unsatisfiable_compiler_flag(self): + # This case is different depending on whether the specs are concrete. + + # 'mpich' is not concrete: + self.check_satisfies('mpich', 'mpich cppflags="-O3"', False) + + # 'mpich' is concrete: + self.check_unsatisfiable('mpich', 'mpich cppflags="-O3"', True) + + + def test_unsatisfiable_compiler_flag_mismatch(self): + # No matchi in specs + self.check_unsatisfiable('mpich cppflags="-O3"', 'mpich cppflags="-O2"') def test_satisfies_virtual(self): @@ -302,18 +338,26 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain('libelf+debug+foo', 'libelf+debug', 'libelf+foo') self.check_constrain('libelf+debug+foo', 'libelf+debug', 'libelf+debug+foo') + self.check_constrain('libelf debug=2 foo=1', 'libelf debug=2', 'libelf foo=1') + self.check_constrain('libelf debug=2 foo=1', 'libelf debug=2', 'libelf debug=2 foo=1') + self.check_constrain('libelf+debug~foo', 'libelf+debug', 'libelf~foo') self.check_constrain('libelf+debug~foo', 'libelf+debug', 'libelf+debug~foo') + def test_constrain_compiler_flags(self): + self.check_constrain('libelf cflags="-O3" cppflags="-Wall"', 'libelf cflags="-O3"', 'libelf cppflags="-Wall"') + self.check_constrain('libelf cflags="-O3" cppflags="-Wall"', 'libelf cflags="-O3"', 'libelf cflags="-O3" cppflags="-Wall"') + + def test_constrain_arch(self): self.check_constrain('libelf arch=bgqos_0', 'libelf arch=bgqos_0', 'libelf arch=bgqos_0') self.check_constrain('libelf arch=bgqos_0', 'libelf', 'libelf arch=bgqos_0') def test_constrain_compiler(self): - self.check_constrain('libelf arch=bgqos_0', 'libelf arch=bgqos_0', 'libelf arch=bgqos_0') - self.check_constrain('libelf arch=bgqos_0', 'libelf', 'libelf arch=bgqos_0') + self.check_constrain('libelf %gcc@4.4.7', 'libelf %gcc@4.4.7', 'libelf %gcc@4.4.7') + self.check_constrain('libelf %gcc@4.4.7', 'libelf', 'libelf %gcc@4.4.7') def test_invalid_constraint(self): @@ -322,6 +366,9 @@ class SpecSematicsTest(MockPackagesTest): self.check_invalid_constraint('libelf+debug', 'libelf~debug') self.check_invalid_constraint('libelf+debug~foo', 'libelf+debug+foo') + self.check_invalid_constraint('libelf debug=2', 'libelf debug=1') + + self.check_invalid_constraint('libelf cppflags="-O3"', 'libelf cppflags="-O2"') self.check_invalid_constraint('libelf arch=bgqos_0', 'libelf arch=x86_54') @@ -333,6 +380,8 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf%gcc', '%gcc@4.5') self.check_constrain_changed('libelf', '+debug') self.check_constrain_changed('libelf', '~debug') + self.check_constrain_changed('libelf', 'debug=2') + self.check_constrain_changed('libelf', 'cppflags="-O3"') self.check_constrain_changed('libelf', ' arch=bgqos_0') @@ -344,6 +393,8 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf%gcc@4.5', '%gcc@4.5') self.check_constrain_not_changed('libelf+debug', '+debug') self.check_constrain_not_changed('libelf~debug', '~debug') + self.check_constrain_not_changed('libelf debug=2', 'debug=2') + self.check_constrain_not_changed('libelf cppflags="-O3"', 'cppflags="-O3"') self.check_constrain_not_changed('libelf arch=bgqos_0', ' arch=bgqos_0') self.check_constrain_not_changed('libelf^foo', 'libelf^foo') self.check_constrain_not_changed('libelf^foo^bar', 'libelf^foo^bar') @@ -356,6 +407,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf^foo%gcc', 'libelf^foo%gcc@4.5') self.check_constrain_changed('libelf^foo', 'libelf^foo+debug') self.check_constrain_changed('libelf^foo', 'libelf^foo~debug') + self.check_constrain_changed('libelf^foo', 'libelf^foo cppflags="-O3"') self.check_constrain_changed('libelf^foo', 'libelf^foo arch=bgqos_0') @@ -366,5 +418,6 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf^foo%gcc@4.5', 'libelf^foo%gcc@4.5') self.check_constrain_not_changed('libelf^foo+debug', 'libelf^foo+debug') self.check_constrain_not_changed('libelf^foo~debug', 'libelf^foo~debug') + self.check_constrain_not_changed('libelf^foo cppflags="-O3"', 'libelf^foo cppflags="-O3"') self.check_constrain_not_changed('libelf^foo arch=bgqos_0', 'libelf^foo arch=bgqos_0') diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index 6e08e30e13..bda218c840 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -104,6 +104,8 @@ class SpecSyntaxTest(unittest.TestCase): def test_full_specs(self): self.check_parse("mvapich_foo^_openmpi@1.2:1.4,1.6%intel@12.1+debug~qt_4^stackwalker@8.1_1e") + self.check_parse("mvapich_foo^_openmpi@1.2:1.4,1.6%intel@12.1 debug=2~qt_4^stackwalker@8.1_1e") + self.check_parse('mvapich_foo^_openmpi@1.2:1.4,1.6%intel@12.1 cppflags="-O3"+debug~qt_4^stackwalker@8.1_1e') def test_canonicalize(self): self.check_parse( @@ -128,7 +130,10 @@ class SpecSyntaxTest(unittest.TestCase): def test_duplicate_variant(self): self.assertRaises(DuplicateVariantError, self.check_parse, "x@1.2+debug+debug") - self.assertRaises(DuplicateVariantError, self.check_parse, "x ^y@1.2+debug+debug") + self.assertRaises(DuplicateVariantError, self.check_parse, "x ^y@1.2+debug debug=true") + self.assertRaises(DuplicateVariantError, self.check_parse, "x ^y@1.2 debug=false debug=true") + self.assertRaises(DuplicateVariantError, self.check_parse, "x ^y@1.2 debug=false~debug") + def test_duplicate_depdendence(self): self.assertRaises(DuplicateDependencyError, self.check_parse, "x ^y ^y") -- cgit v1.2.3-70-g09d2 From 10d8ed4d98314f298c5fd28d726834129510fbd5 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Thu, 28 Apr 2016 15:43:05 -0700 Subject: check that a target directory exists before committing to cd --- share/spack/setup-env.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 764af68400..e3dd1cb4b9 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -1,4 +1,4 @@ -############################################################################## +##################################################################### # Copyright (c) 2013, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # @@ -84,7 +84,10 @@ function spack { if [ "$_sp_arg" = "-h" ]; then command spack cd -h else - cd $(spack location $_sp_arg "$@") + LOC="$(spack location $_sp_arg "$@")" + if [[ "x" -ne "x$LOC" ]] ; then + cd "$LOC" + fi fi return ;; -- cgit v1.2.3-70-g09d2 From 17f696d3b3ee83bcb185f583a465be3aef6c2d5f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 29 Apr 2016 09:05:54 +0200 Subject: glib: add missing dependencies --- var/spack/repos/builtin/packages/glib/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index 67ead5f941..a3fc3f79eb 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -1,4 +1,5 @@ from spack import * +import sys class Glib(Package): """The GLib package contains a low-level libraries useful for @@ -12,6 +13,8 @@ class Glib(Package): depends_on("libffi") depends_on("zlib") + depends_on("pkg-config") + depends_on('gettext', sys.platform=='darwin') def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 176b9febb4ae0c653645cf5253b90019e9fc73f5 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 29 Apr 2016 09:06:15 +0200 Subject: libxcb: add missing dependencies --- var/spack/repos/builtin/packages/libxcb/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index d7d94c4546..b2543be5da 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -13,6 +13,7 @@ class Libxcb(Package): version('1.11.1', '118623c15a96b08622603a71d8789bf3') depends_on("python") depends_on("xcb-proto") + depends_on("pkg-config") # depends_on('pthread') # Ubuntu: apt-get install libpthread-stubs0-dev # depends_on('xau') # Ubuntu: apt-get install libxau-dev -- cgit v1.2.3-70-g09d2 From 3ad71700dd61d41841a581dc4f59f390dfd112b6 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 29 Apr 2016 09:52:49 +0200 Subject: the_silver_searcher: add missing dependency --- var/spack/repos/builtin/packages/the_silver_searcher/package.py | 1 + 1 file changed, 1 insertion(+) 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 e4020b6766..30f06354bf 100644 --- a/var/spack/repos/builtin/packages/the_silver_searcher/package.py +++ b/var/spack/repos/builtin/packages/the_silver_searcher/package.py @@ -9,6 +9,7 @@ class TheSilverSearcher(Package): depends_on('pcre') depends_on('xz') + depends_on('pkg-config') def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 584501a1cc34165671d0d4e9e2ae27d9cae8cdf9 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Fri, 29 Apr 2016 09:33:54 -0700 Subject: switched test to use -d for location check --- share/spack/setup-env.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index e3dd1cb4b9..11a4c0a70c 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -84,10 +84,10 @@ function spack { if [ "$_sp_arg" = "-h" ]; then command spack cd -h else - LOC="$(spack location $_sp_arg "$@")" - if [[ "x" -ne "x$LOC" ]] ; then + LOC="$(spack location $_sp_arg "$@")" + if [[ -d "$LOC" ]] ; then cd "$LOC" - fi + fi fi return ;; -- cgit v1.2.3-70-g09d2 From a2b9a000dcb18868ea9f1c110632a251fbea92f3 Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Fri, 29 Apr 2016 15:08:54 -0400 Subject: Add add removal and status actions in addition to link and add various ways to filter what is done. --- lib/spack/spack/cmd/view.py | 130 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 107 insertions(+), 23 deletions(-) diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index c7f1c21f67..dd698350b2 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -1,3 +1,8 @@ +''' +Produce a file-system "view" of a Spack DAG. + +Concept from Nix, implemented by brett.viren@gmail.com ca 2016. +''' ############################################################################## # Copyright (c) 2013, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. @@ -22,7 +27,9 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## + import os +import re import argparse import spack @@ -34,8 +41,15 @@ description = "Produce a single-rooted directory view of a spec." def setup_parser(subparser): setup_parser.parser = subparser - subparser.add_argument('prefix', nargs=1, - help="Path to top-level directory for the view.") + subparser.add_argument('-e','--exclude', action='append', default=[], + help="exclude any packages which the given re pattern") + subparser.add_argument('-a','--action', default='link', + choices=['link','remove','status'], # names match action_*() functions below + help="what action to perform on the view") + subparser.add_argument('--no-dependencies', action='store_true', default=False, + help="just operate on named packages and do not follow dependencies") + subparser.add_argument('-p','--prefix', required=True, + help="Path to a top-level directory to receive the view.") subparser.add_argument('specs', nargs=argparse.REMAINDER, help="specs of packages to expose in the view.") @@ -45,64 +59,134 @@ def assuredir(path): os.makedirs(path) def relative_to(prefix, path): + 'Return end of `path` relative to `prefix`' assert 0 == path.find(prefix) reldir = path[len(prefix):] if reldir.startswith('/'): reldir = reldir[1:] return reldir -def view_one(prefix, spec): - print spec.name,spec.prefix - + +def transform_path(spec, path, prefix=None): + 'Return the a relative path corresponding to given path spec.prefix' + if os.path.isabs(path): + path = relative_to(spec.prefix, path) + subdirs = path.split(os.path.sep) + if subdirs[0] == '.spack': + lst = ['.spack',spec.name]+subdirs[1:] + path = os.path.join(*lst) + if prefix: + path = os.path.join(prefix, path) + return path + +def action_status(spec, prefix): + 'Check status of view in prefix against spec' dotspack = os.path.join(prefix, '.spack', spec.name) - if os.path.exists(os.path.join(dotspack)): - tty.warn("Skipping previously added package %s"%spec.name) + tty.info("Package added: %s"%spec.name) return + tty.info("Package missing: %s"%spec.name) + return +def action_remove(spec, prefix): + 'Remove any files found in spec from prefix and purge empty directories.' + + if not os.path.exists(prefix): + return + + dotspack = transform_path(spec, '.spack', prefix) + if not os.path.exists(dotspack): + tty.info("Skipping nonexistent package %s"%spec.name) + return for dirpath,dirnames,filenames in os.walk(spec.prefix): if not filenames: - continue # avoid explicitly making empty dirs + continue - reldir = relative_to(spec.prefix, dirpath) + targdir = transform_path(spec, dirpath, prefix) + for fname in filenames: + src = os.path.join(dirpath, fname) + dst = os.path.join(targdir, fname) + if not os.path.exists(dst): + #tty.warn("Skipping nonexistent file for view: %s" % dst) + continue + os.unlink(dst) - # fixme: assumes .spack has no subdirs - if dirpath.endswith('.spack'): - targdir = dotspack - else: - targdir = os.path.join(prefix, reldir) +def action_link(spec, prefix): + 'Symlink all files in `spec` into directory `prefix`.' + + dotspack = transform_path(spec, '.spack', prefix) + if os.path.exists(dotspack): + tty.warn("Skipping previously added package %s"%spec.name) + return + + for dirpath,dirnames,filenames in os.walk(spec.prefix): + if not filenames: + continue # avoid explicitly making empty dirs + + targdir = transform_path(spec, dirpath, prefix) assuredir(targdir) - print '\t%s...'%reldir, - nlinks = 0 for fname in filenames: src = os.path.join(dirpath, fname) dst = os.path.join(targdir, fname) if os.path.exists(dst): + if '.spack' in dst.split(os.path.sep): + continue # silence these tty.warn("Skipping existing file for view: %s" % dst) continue os.symlink(src,dst) - nlinks += 1 - print nlinks - + + + +def purge_empty_directories(path): + 'Ascend up from the leaves accessible from `path` and remove empty directories.' + for dirpath, subdirs, files in os.walk(path, topdown=False): + for sd in subdirs: + sdp = os.path.join(dirpath,sd) + try: + os.rmdir(sdp) + except OSError: + tty.warn("Not removing directory with contents: %s" % sdp) + def view(parser, args): - # if not args.specs: - # tty.die("view creation requires at least one spec argument") + 'The view command.' + to_exclude = [re.compile(e) for e in args.exclude] + def exclude(spec): + for e in to_exclude: + if e.match(spec.name): + return True + return False specs = spack.cmd.parse_specs(args.specs, normalize=True, concretize=True) if not specs: setup_parser.parser.print_help() return 1 - prefix = args.prefix[0] + prefix = args.prefix assuredir(prefix) flat = set() for spec in specs: + if args.no_dependencies: + flat.add(spec) + continue flat.update(spec.normalized().traverse()) + action = args.action.lower() + method = eval('action_' + action) + for spec in flat: - view_one(prefix, spec) + if exclude(spec): + tty.info('Skipping excluded package: "%s"' % spec.name) + continue + if not os.path.exists(spec.prefix): + tty.warn('Skipping unknown package: %s in %s' % (spec.name, spec.prefix)) + continue + tty.info("%s %s" % (action, spec.name)) + method(spec, prefix) + + if action in ['remove']: + purge_empty_directories(prefix) -- cgit v1.2.3-70-g09d2 From 8fc43046ebfaa41410c28ba6d3d27fffed25ee4e Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sat, 30 Apr 2016 12:11:10 +0200 Subject: Add missing dependency for glm --- var/spack/repos/builtin/packages/glm/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/glm/package.py b/var/spack/repos/builtin/packages/glm/package.py index d00c301b4c..ecae89f1e8 100644 --- a/var/spack/repos/builtin/packages/glm/package.py +++ b/var/spack/repos/builtin/packages/glm/package.py @@ -11,6 +11,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") def install(self, spec, prefix): with working_dir('spack-build', create=True): -- cgit v1.2.3-70-g09d2 From a588a1fd84869a593903747372a7a2484b80fd52 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Tue, 19 Apr 2016 13:51:46 -0500 Subject: openmp needs to be an option for clang build --- var/spack/repos/builtin/packages/fftw/package.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index bc129aaf1a..5ca6547c9f 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -42,7 +42,7 @@ class Fftw(Package): variant('float', default=True, description='Produces a single precision version of the library') variant('long_double', default=True, description='Produces a long double precision version of the library') variant('quad', default=False, description='Produces a quad precision version of the library (works only with GCC and libquadmath)') - + variant('openmp', default=True, description="Enable OpenMP support.") variant('mpi', default=False, description='Activate MPI support') depends_on('mpi', when='+mpi') @@ -52,8 +52,9 @@ class Fftw(Package): def install(self, spec, prefix): options = ['--prefix=%s' % prefix, '--enable-shared', - '--enable-threads', - '--enable-openmp'] + '--enable-threads'] + if '+openmp' in spec: + options.append('--enable-openmp') if not self.compiler.f77 or not self.compiler.fc: options.append("--disable-fortran") if '+mpi' in spec: -- cgit v1.2.3-70-g09d2 From f8c14e1d98fd7d0d3df0bf8693b93081bf4b70fc Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 20 Apr 2016 09:41:19 -0500 Subject: Make openmp variant false by default. --- var/spack/repos/builtin/packages/fftw/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index 5ca6547c9f..e48e0dc46a 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -42,7 +42,7 @@ class Fftw(Package): variant('float', default=True, description='Produces a single precision version of the library') variant('long_double', default=True, description='Produces a long double precision version of the library') variant('quad', default=False, description='Produces a quad precision version of the library (works only with GCC and libquadmath)') - variant('openmp', default=True, description="Enable OpenMP support.") + variant('openmp', default=False, description="Enable OpenMP support.") variant('mpi', default=False, description='Activate MPI support') depends_on('mpi', when='+mpi') -- cgit v1.2.3-70-g09d2 From 83108f815ce09fa95e99e0ef747cf3cee50328b2 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Thu, 21 Apr 2016 09:59:37 -0500 Subject: Error out if +openmp used with OS X clang --- var/spack/repos/builtin/packages/fftw/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index e48e0dc46a..eb8f96cbac 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -53,7 +53,11 @@ class Fftw(Package): options = ['--prefix=%s' % prefix, '--enable-shared', '--enable-threads'] - if '+openmp' in spec: + # Add support for OpenMP + if '+openmp' in spec: + # Note: Apple's Clang does not support OpenMP. + if spec.satisfies('%clang'): + raise InstallError("Apple's clang does not support OpenMP") options.append('--enable-openmp') if not self.compiler.f77 or not self.compiler.fc: options.append("--disable-fortran") -- cgit v1.2.3-70-g09d2 From c33ffbae043dbc5b8f0dfe1b1e3d6532af20042e Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sat, 30 Apr 2016 21:58:39 +0200 Subject: Add extra dependencies for Paradiseo. --- var/spack/repos/builtin/packages/paradiseo/package.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/paradiseo/package.py b/var/spack/repos/builtin/packages/paradiseo/package.py index c254234b32..34766099da 100644 --- a/var/spack/repos/builtin/packages/paradiseo/package.py +++ b/var/spack/repos/builtin/packages/paradiseo/package.py @@ -20,15 +20,20 @@ class Paradiseo(Package): #variant('tests', default=False, description='Compile with build tests') #variant('doc', default=False, description='Compile with documentation') variant('debug', default=False, description='Builds a debug version of the libraries') + variant('openmp', default=False, description='Enable OpenMP support') + variant('gnuplot', default=False, description='Enable GnuPlot support') # Required dependencies depends_on ("cmake") - depends_on ("eigen") # Optional dependencies depends_on ("mpi", when="+mpi") depends_on ("doxygen", when='+doc') - + depends_on ("gnuplot", when='+gnuplot') + depends_on ("eigen", when='+edo') + depends_on ("boost~mpi", when='+edo~mpi') + depends_on ("boost+mpi", when='+edo+mpi') + # Patches patch('enable_eoserial.patch') patch('fix_osx_detection.patch') @@ -45,7 +50,9 @@ class Paradiseo(Package): '-DMPI:BOOL=%s' % ('TRUE' if '+mpi' in spec else 'FALSE'), '-DSMP:BOOL=%s' % ('TRUE' if '+smp' in spec else 'FALSE'), # Note: This requires a C++11 compatible compiler '-DEDO:BOOL=%s' % ('TRUE' if '+edo' in spec else 'FALSE'), - '-DENABLE_CMAKE_TESTING:BOOL=%s' % ('TRUE' if '+tests' in spec else 'FALSE') + '-DENABLE_CMAKE_TESTING:BOOL=%s' % ('TRUE' if '+tests' in spec else 'FALSE'), + '-DENABLE_OPENMP:BOOL=%s' % ('TRUE' if '+openmp' in spec else 'FALSE'), + '-DENABLE_GNUPLOT:BOOL=%s' % ('TRUE' if '+gnuplot' in spec else 'FALSE') ]) with working_dir('spack-build', create=True): -- cgit v1.2.3-70-g09d2 From 631e235ef3907916335f965fa179b94455295f31 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sun, 1 May 2016 11:05:51 +0200 Subject: Added Adol-C package --- var/spack/repos/builtin/packages/adol-c/package.py | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 var/spack/repos/builtin/packages/adol-c/package.py diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py new file mode 100644 index 0000000000..a65ec7dd7c --- /dev/null +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -0,0 +1,69 @@ +from spack import * +import sys + +class AdolC(Package): + """A package for the automatic differentiation of first and higher derivatives of vector functions in C and C++ programs by operator overloading.""" + homepage = "https://projects.coin-or.org/ADOL-C" + url = "http://www.coin-or.org/download/source/ADOL-C/ADOL-C-2.6.1.tgz" + + version('head', svn='https://projects.coin-or.org/svn/ADOL-C/trunk/') + version('2.6.1', '1032b28427d6e399af4610e78c0f087b') + + variant('doc', default=True, description='Install documentation') + variant('openmp', default=False, description='Enable OpenMP support') + variant('sparse', default=False, description='Enable sparse drivers') + variant('tests', default=True, description='Build all included examples as a test case') + + def install(self, spec, prefix): + make_args = ['--prefix=%s' % prefix] + + # --with-cflags=FLAGS use CFLAGS=FLAGS (default: -O3 -Wall -ansi) + # --with-cxxflags=FLAGS use CXXFLAGS=FLAGS (default: -O3 -Wall) + + if '+openmp' in spec: + make_args.extend([ + '--with-openmp-flag=-fopenmp' # FIXME: Is this required? -I -L + ]) + + if '+sparse' in spec: + make_args.extend([ + '--enable-sparse' + ]) + + # We can simply use the bundled examples to check + # whether Adol-C works as expected + if '+tests' in spec: + make_args.extend([ + '--enable-docexa', # Documeted examples + '--enable-addexa' # Additional examples + ]) + if '+openmp' in spec: + make_args.extend([ + '--enable-parexa' # Parallel examples + ]) + + configure(*make_args) + make() + make("install") + + # Copy the config.h file, as some packages might require it + source_directory = self.stage.source_path + config_h = join_path(source_directory,'ADOL-C/src/config.h') + install(config_h, join_path(prefix.include,'adolc')) + + # Install documentation to {prefix}/share + if '+doc' in spec: + install_tree('ADOL-C/doc',join_path(prefix.share,'doc')) + + # Install examples to {prefix}/share + if '+tests' in spec: + install_tree('ADOL-C/examples',join_path(prefix.share,'examples')) + + # Run some examples that don't require user input + # TODO: Check that bundled examples produce the correct results + with working_dir(join_path(source_directory,'ADOL-C/examples')): + Executable('tapeless_scalar') + Executable('tapeless_vector') + + with working_dir(join_path(source_directory,'ADOL-C/examples/additional_examples')): + Executable('checkpointing/checkpointing') -- cgit v1.2.3-70-g09d2 From 8c140f4725608510d0d7ecc6195736ca513b02ab Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Sat, 30 Apr 2016 08:46:47 -0400 Subject: Change the action from parameter to subcommand to fit Spack convention. --- lib/spack/spack/cmd/view.py | 58 ++++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index dd698350b2..a82c034398 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -41,17 +41,30 @@ description = "Produce a single-rooted directory view of a spec." def setup_parser(subparser): setup_parser.parser = subparser - subparser.add_argument('-e','--exclude', action='append', default=[], - help="exclude any packages which the given re pattern") - subparser.add_argument('-a','--action', default='link', - choices=['link','remove','status'], # names match action_*() functions below - help="what action to perform on the view") - subparser.add_argument('--no-dependencies', action='store_true', default=False, - help="just operate on named packages and do not follow dependencies") - subparser.add_argument('-p','--prefix', required=True, - help="Path to a top-level directory to receive the view.") - subparser.add_argument('specs', nargs=argparse.REMAINDER, - help="specs of packages to expose in the view.") + sp = subparser.add_subparsers(metavar='ACTION', dest='action') + + # The action parameterizes the command but in keeping with Spack + # patterns we make it a subcommand. + sps = [ + sp.add_parser('link', aliases=['add'], + help='Add packages to the view, create view if needed.'), + sp.add_parser('remove', aliases=['rm'], + help='Remove packages from the view, and view if empty.'), + sp.add_parser('status', aliases=['check'], + help='Check status of packages in the view.') + ] + + # All these options and arguments are common to every action. + for p in sps: + p.add_argument('-e','--exclude', action='append', default=[], + help="exclude any packages which the given re pattern") + p.add_argument('--no-dependencies', action='store_true', default=False, + help="just operate on named packages and do not follow dependencies") + p.add_argument('prefix', nargs=1, + help="Path to a top-level directory to receive the view.") + p.add_argument('specs', nargs=argparse.REMAINDER, + help="specs of packages to expose in the view.") + def assuredir(path): 'Assure path exists as a directory' @@ -151,7 +164,9 @@ def purge_empty_directories(path): tty.warn("Not removing directory with contents: %s" % sdp) -def view(parser, args): + + +def view_action(action, parser, args): 'The view command.' to_exclude = [re.compile(e) for e in args.exclude] def exclude(spec): @@ -162,7 +177,7 @@ def view(parser, args): specs = spack.cmd.parse_specs(args.specs, normalize=True, concretize=True) if not specs: - setup_parser.parser.print_help() + parser.print_help() return 1 prefix = args.prefix @@ -175,9 +190,6 @@ def view(parser, args): continue flat.update(spec.normalized().traverse()) - action = args.action.lower() - method = eval('action_' + action) - for spec in flat: if exclude(spec): tty.info('Skipping excluded package: "%s"' % spec.name) @@ -186,7 +198,19 @@ def view(parser, args): tty.warn('Skipping unknown package: %s in %s' % (spec.name, spec.prefix)) continue tty.info("%s %s" % (action, spec.name)) - method(spec, prefix) + action(spec, prefix) if action in ['remove']: purge_empty_directories(prefix) + + +def view(parser, args): + action = { + 'add': action_link, + 'link': action_link, + 'remove': action_remove, + 'rm': action_remove, + 'status': action_status, + 'check': action_status + }[args.action] + view_action(action, parser, args) -- cgit v1.2.3-70-g09d2 From 346f1022343d608ffabd565636ec8358c90464c8 Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Sun, 1 May 2016 13:54:07 -0400 Subject: Bug fixes, tty tweaks. --- lib/spack/spack/cmd/view.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index a82c034398..1bdaaecadc 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -46,7 +46,7 @@ def setup_parser(subparser): # The action parameterizes the command but in keeping with Spack # patterns we make it a subcommand. sps = [ - sp.add_parser('link', aliases=['add'], + sp.add_parser('add', aliases=['link'], help='Add packages to the view, create view if needed.'), sp.add_parser('remove', aliases=['rm'], help='Remove packages from the view, and view if empty.'), @@ -112,6 +112,7 @@ def action_remove(spec, prefix): tty.info("Skipping nonexistent package %s"%spec.name) return + tty.info("remove %s"%spec.name) for dirpath,dirnames,filenames in os.walk(spec.prefix): if not filenames: continue @@ -125,7 +126,6 @@ def action_remove(spec, prefix): continue os.unlink(dst) - def action_link(spec, prefix): 'Symlink all files in `spec` into directory `prefix`.' @@ -134,6 +134,7 @@ def action_link(spec, prefix): tty.warn("Skipping previously added package %s"%spec.name) return + tty.info("link %s" % spec.name) for dirpath,dirnames,filenames in os.walk(spec.prefix): if not filenames: continue # avoid explicitly making empty dirs @@ -151,8 +152,6 @@ def action_link(spec, prefix): continue os.symlink(src,dst) - - def purge_empty_directories(path): 'Ascend up from the leaves accessible from `path` and remove empty directories.' for dirpath, subdirs, files in os.walk(path, topdown=False): @@ -161,13 +160,14 @@ def purge_empty_directories(path): try: os.rmdir(sdp) except OSError: - tty.warn("Not removing directory with contents: %s" % sdp) + #tty.warn("Not removing directory with contents: %s" % sdp) + pass def view_action(action, parser, args): - 'The view command.' + 'The view command parameterized by the action.' to_exclude = [re.compile(e) for e in args.exclude] def exclude(spec): for e in to_exclude: @@ -180,7 +180,7 @@ def view_action(action, parser, args): parser.print_help() return 1 - prefix = args.prefix + prefix = args.prefix[0] assuredir(prefix) flat = set() @@ -197,14 +197,15 @@ def view_action(action, parser, args): if not os.path.exists(spec.prefix): tty.warn('Skipping unknown package: %s in %s' % (spec.name, spec.prefix)) continue - tty.info("%s %s" % (action, spec.name)) action(spec, prefix) - if action in ['remove']: + if args.action in ['remove','rm']: purge_empty_directories(prefix) + def view(parser, args): + 'The view command.' action = { 'add': action_link, 'link': action_link, -- cgit v1.2.3-70-g09d2 From 26c5bc9d979b95df560bdb7d7a6bd747ef93f83d Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Sun, 1 May 2016 17:10:32 -0400 Subject: A few minimal test packages, fodder for testing 'spack view' command. --- .../repos/builtin.mock/packages/test-a/package.py | 29 +++++++++++++++++++ .../builtin.mock/packages/test-a/test-a-0.0.tar.gz | Bin 0 -> 112 bytes .../repos/builtin.mock/packages/test-b/package.py | 31 ++++++++++++++++++++ .../builtin.mock/packages/test-b/test-b-0.0.tar.gz | Bin 0 -> 112 bytes .../repos/builtin.mock/packages/test-c/package.py | 31 ++++++++++++++++++++ .../builtin.mock/packages/test-c/test-c-0.0.tar.gz | Bin 0 -> 112 bytes .../repos/builtin.mock/packages/test-d/package.py | 32 +++++++++++++++++++++ .../builtin.mock/packages/test-d/test-d-0.0.tar.gz | Bin 0 -> 112 bytes 8 files changed, 123 insertions(+) create mode 100644 var/spack/repos/builtin.mock/packages/test-a/package.py create mode 100644 var/spack/repos/builtin.mock/packages/test-a/test-a-0.0.tar.gz create mode 100644 var/spack/repos/builtin.mock/packages/test-b/package.py create mode 100644 var/spack/repos/builtin.mock/packages/test-b/test-b-0.0.tar.gz create mode 100644 var/spack/repos/builtin.mock/packages/test-c/package.py create mode 100644 var/spack/repos/builtin.mock/packages/test-c/test-c-0.0.tar.gz create mode 100644 var/spack/repos/builtin.mock/packages/test-d/package.py create mode 100644 var/spack/repos/builtin.mock/packages/test-d/test-d-0.0.tar.gz diff --git a/var/spack/repos/builtin.mock/packages/test-a/package.py b/var/spack/repos/builtin.mock/packages/test-a/package.py new file mode 100644 index 0000000000..2f72370580 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/test-a/package.py @@ -0,0 +1,29 @@ +from spack import * + +import os + +mydir = os.path.dirname(__file__) +source = os.path.join(mydir,'test-a-0.0.tar.gz') + +class TestA(Package): + """The test-a package""" + + url = 'file://'+source + + version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') + + variant('nom', default=True, description='Nominal variant') + variant('var', default=False, description='Variant variant') + + def install(self, spec, prefix): + bindir = os.path.join(prefix,'bin') + os.makedirs(bindir) + script = os.path.join(bindir, 'test-a') + with open(script,'w') as fp: + fp.write("""#!/bin/bash +echo 'name: %s' +echo 'prefix: %s' +echo 'spec: %s' + """ % (spec.name, prefix, spec)) + + os.chmod(script, 0555) diff --git a/var/spack/repos/builtin.mock/packages/test-a/test-a-0.0.tar.gz b/var/spack/repos/builtin.mock/packages/test-a/test-a-0.0.tar.gz new file mode 100644 index 0000000000..3588e05765 Binary files /dev/null and b/var/spack/repos/builtin.mock/packages/test-a/test-a-0.0.tar.gz differ diff --git a/var/spack/repos/builtin.mock/packages/test-b/package.py b/var/spack/repos/builtin.mock/packages/test-b/package.py new file mode 100644 index 0000000000..db64b0a556 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/test-b/package.py @@ -0,0 +1,31 @@ +from spack import * + +import os + +mydir = os.path.dirname(__file__) +source = os.path.join(mydir,'test-b-0.0.tar.gz') + +class TestB(Package): + """The test-b package""" + + url = 'file://'+source + + version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') + + variant('nom', default=True, description='Nominal variant') + variant('var', default=False, description='Variant variant') + + depends_on('test-a') + + def install(self, spec, prefix): + bindir = os.path.join(prefix,'bin') + os.makedirs(bindir) + script = os.path.join(bindir, 'test-b') + with open(script,'w') as fp: + fp.write("""#!/bin/bash +echo 'name: %s' +echo 'prefix: %s' +echo 'spec: %s' + """ % (spec.name, prefix, spec)) + + os.chmod(script, 0555) diff --git a/var/spack/repos/builtin.mock/packages/test-b/test-b-0.0.tar.gz b/var/spack/repos/builtin.mock/packages/test-b/test-b-0.0.tar.gz new file mode 100644 index 0000000000..3588e05765 Binary files /dev/null and b/var/spack/repos/builtin.mock/packages/test-b/test-b-0.0.tar.gz differ diff --git a/var/spack/repos/builtin.mock/packages/test-c/package.py b/var/spack/repos/builtin.mock/packages/test-c/package.py new file mode 100644 index 0000000000..0b03037466 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/test-c/package.py @@ -0,0 +1,31 @@ +from spack import * + +import os + +mydir = os.path.dirname(__file__) +source = os.path.join(mydir,'test-c-0.0.tar.gz') + +class TestC(Package): + """The test-c package""" + + url = 'file://'+source + + version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') + + variant('nom', default=True, description='Nominal variant') + variant('var', default=False, description='Variant variant') + + depends_on('test-a+var',when='+var') + + def install(self, spec, prefix): + bindir = os.path.join(prefix,'bin') + os.makedirs(bindir) + script = os.path.join(bindir, 'test-c') + with open(script,'w') as fp: + fp.write("""#!/bin/bash +echo 'name: %s' +echo 'prefix: %s' +echo 'spec: %s' + """ % (spec.name, prefix, spec)) + + os.chmod(script, 0555) diff --git a/var/spack/repos/builtin.mock/packages/test-c/test-c-0.0.tar.gz b/var/spack/repos/builtin.mock/packages/test-c/test-c-0.0.tar.gz new file mode 100644 index 0000000000..3588e05765 Binary files /dev/null and b/var/spack/repos/builtin.mock/packages/test-c/test-c-0.0.tar.gz differ diff --git a/var/spack/repos/builtin.mock/packages/test-d/package.py b/var/spack/repos/builtin.mock/packages/test-d/package.py new file mode 100644 index 0000000000..5cb7dcb2cb --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/test-d/package.py @@ -0,0 +1,32 @@ +from spack import * + +import os + +mydir = os.path.dirname(__file__) +source = os.path.join(mydir,'test-d-0.0.tar.gz') + +class TestD(Package): + """The test-d package""" + + url = 'file://'+source + + version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') + + variant('nom', default=True, description='Nominal variant') + variant('var', default=False, description='Variant variant') + + depends_on('test-b') + depends_on('test-c') + + def install(self, spec, prefix): + bindir = os.path.join(prefix,'bin') + os.makedirs(bindir) + script = os.path.join(bindir, 'test-d') + with open(script,'w') as fp: + fp.write("""#!/bin/bash +echo 'name: %s' +echo 'prefix: %s' +echo 'spec: %s' + """ % (spec.name, prefix, spec)) + + os.chmod(script, 0555) diff --git a/var/spack/repos/builtin.mock/packages/test-d/test-d-0.0.tar.gz b/var/spack/repos/builtin.mock/packages/test-d/test-d-0.0.tar.gz new file mode 100644 index 0000000000..3588e05765 Binary files /dev/null and b/var/spack/repos/builtin.mock/packages/test-d/test-d-0.0.tar.gz differ -- cgit v1.2.3-70-g09d2 From 5ae727668235f8a226cdac9e714d9daa004af64c Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Mon, 2 May 2016 11:01:14 +0200 Subject: Fixes to installation with OpenMP (tested) and execution of test-suite --- .../builtin/packages/adol-c/openmp_exam.patch | 13 +++++++++ var/spack/repos/builtin/packages/adol-c/package.py | 33 ++++++++++++++-------- 2 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 var/spack/repos/builtin/packages/adol-c/openmp_exam.patch diff --git a/var/spack/repos/builtin/packages/adol-c/openmp_exam.patch b/var/spack/repos/builtin/packages/adol-c/openmp_exam.patch new file mode 100644 index 0000000000..8e21c72d92 --- /dev/null +++ b/var/spack/repos/builtin/packages/adol-c/openmp_exam.patch @@ -0,0 +1,13 @@ +diff --git a/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp b/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp +index fc6fc28..14103d2 100644 +--- a/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp ++++ b/ADOL-C/examples/additional_examples/openmp_exam/liborpar.cpp +@@ -27,7 +27,7 @@ using namespace std; + #include + #include + +-#include "adolc.h" ++#include + + #ifdef _OPENMP + #include diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py index a65ec7dd7c..70933542ca 100644 --- a/var/spack/repos/builtin/packages/adol-c/package.py +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -13,6 +13,8 @@ class AdolC(Package): variant('openmp', default=False, description='Enable OpenMP support') variant('sparse', default=False, description='Enable sparse drivers') variant('tests', default=True, description='Build all included examples as a test case') + + patch('openmp_exam.patch') def install(self, spec, prefix): make_args = ['--prefix=%s' % prefix] @@ -21,9 +23,12 @@ class AdolC(Package): # --with-cxxflags=FLAGS use CXXFLAGS=FLAGS (default: -O3 -Wall) if '+openmp' in spec: - make_args.extend([ - '--with-openmp-flag=-fopenmp' # FIXME: Is this required? -I -L - ]) + if spec.satisfies('%gcc'): + make_args.extend([ + '--with-openmp-flag=-fopenmp' # FIXME: Is this required? -I -L + ]) + else: + raise InstallError("OpenMP flags for compilers other than GCC are not implemented.") if '+sparse' in spec: make_args.extend([ @@ -48,22 +53,28 @@ class AdolC(Package): # Copy the config.h file, as some packages might require it source_directory = self.stage.source_path - config_h = join_path(source_directory,'ADOL-C/src/config.h') + config_h = join_path(source_directory,'ADOL-C','src','config.h') install(config_h, join_path(prefix.include,'adolc')) # Install documentation to {prefix}/share if '+doc' in spec: - install_tree('ADOL-C/doc',join_path(prefix.share,'doc')) + install_tree(join_path('ADOL-C','doc'), + join_path(prefix.share,'doc')) # Install examples to {prefix}/share if '+tests' in spec: - install_tree('ADOL-C/examples',join_path(prefix.share,'examples')) + install_tree(join_path('ADOL-C','examples'), + join_path(prefix.share,'examples')) # Run some examples that don't require user input # TODO: Check that bundled examples produce the correct results - with working_dir(join_path(source_directory,'ADOL-C/examples')): - Executable('tapeless_scalar') - Executable('tapeless_vector') + with working_dir(join_path(source_directory,'ADOL-C','examples')): + Executable('./tapeless_scalar')() + Executable('./tapeless_vector')() - with working_dir(join_path(source_directory,'ADOL-C/examples/additional_examples')): - Executable('checkpointing/checkpointing') + with working_dir(join_path(source_directory,'ADOL-C','examples','additional_examples')): + Executable('./checkpointing/checkpointing')() + + if '+openmp' in spec: + with working_dir(join_path(source_directory,'ADOL-C','examples','additional_examples')): + Executable('./checkpointing/checkpointing')() -- cgit v1.2.3-70-g09d2 From e111add17f885866e997e7483a0ac32235d9c497 Mon Sep 17 00:00:00 2001 From: Vishal Boddu Date: Mon, 2 May 2016 14:31:02 +0200 Subject: missing dependencies (m4) added for netcdf and autoconf --- var/spack/repos/builtin/packages/autoconf/package.py | 2 ++ var/spack/repos/builtin/packages/netcdf/package.py | 1 + 2 files changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py index 6412e810a6..b5e29b8a27 100644 --- a/var/spack/repos/builtin/packages/autoconf/package.py +++ b/var/spack/repos/builtin/packages/autoconf/package.py @@ -8,6 +8,8 @@ class Autoconf(Package): version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b') version('2.62', '6c1f3b3734999035d77da5024aab4fbd') + depends_on("m4") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index b60a2c4e9a..a4d9e5213c 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -21,6 +21,7 @@ class Netcdf(Package): depends_on("hdf5+mpi~cxx", when='+mpi') # required for NetCDF-4 support depends_on("hdf5~mpi", when='~mpi') # required for NetCDF-4 support depends_on("zlib") # required for NetCDF-4 support + depends_on("m4") def install(self, spec, prefix): # Environment variables -- cgit v1.2.3-70-g09d2 From b99c8b641a6c370ddbe8cbf78bc8339dbb3d8598 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 20 Apr 2016 10:46:09 -0500 Subject: Add hydra package --- var/spack/repos/builtin/packages/hydra/package.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/hydra/package.py diff --git a/var/spack/repos/builtin/packages/hydra/package.py b/var/spack/repos/builtin/packages/hydra/package.py new file mode 100644 index 0000000000..c1b8868276 --- /dev/null +++ b/var/spack/repos/builtin/packages/hydra/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Hydra(Package): + """Hydra is a process management system for starting parallel jobs. + Hydra is designed to natively work with existing launcher daemons + (such as ssh, rsh, fork), as well as natively integrate with resource + management systems (such as slurm, pbs, sge).""" + + homepage = "http://www.mpich.org" + url = "http://www.mpich.org/static/downloads/3.2/hydra-3.2.tar.gz" + list_url = "http://www.mpich.org/static/downloads/" + list_depth = 2 + + version('3.2', '4d670916695bf7e3a869cc336a881b39') + + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") -- cgit v1.2.3-70-g09d2 From c110865bf258b67d745b31a526dcb9b348fd9893 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 21 Apr 2016 15:53:44 -0500 Subject: Remove OpenMPI dependency on hwloc --- var/spack/repos/builtin/packages/openmpi/package.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 9a127f1812..3cb9b0be21 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -1,7 +1,5 @@ -import os - from spack import * - +import os class Openmpi(Package): """Open MPI is a project combining technologies and resources from @@ -36,7 +34,6 @@ class Openmpi(Package): provides('mpi@:2.2', when='@1.6.5') provides('mpi@:3.0', when='@1.7.5:') - depends_on('hwloc') def url_for_version(self, version): return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) @@ -51,7 +48,6 @@ class Openmpi(Package): def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, - "--with-hwloc=%s" % spec['hwloc'].prefix, "--enable-shared", "--enable-static"] -- cgit v1.2.3-70-g09d2 From 4e2154e58fef151f22c6e77a923c7cc76b18517b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 18 Apr 2016 16:27:07 -0500 Subject: Add argcomplete python package --- var/spack/repos/builtin/packages/py-argcomplete/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-argcomplete/package.py diff --git a/var/spack/repos/builtin/packages/py-argcomplete/package.py b/var/spack/repos/builtin/packages/py-argcomplete/package.py new file mode 100644 index 0000000000..c94ef7238b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-argcomplete/package.py @@ -0,0 +1,14 @@ +from spack import * + +class PyArgcomplete(Package): + """Bash tab completion for argparse.""" + + homepage = "https://pypi.python.org/pypi/argcomplete" + url = "https://pypi.python.org/packages/source/a/argcomplete/argcomplete-1.1.1.tar.gz" + + version('1.1.1', '89a3839096c9f991ad33828e72d21abf') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 9c3d8dae574560f805f430b042b16821fabcf4ed Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 18 Apr 2016 14:54:38 -0500 Subject: Add latest jpeg version --- var/spack/repos/builtin/packages/jpeg/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/jpeg/package.py b/var/spack/repos/builtin/packages/jpeg/package.py index 87820467db..2f15e59ad4 100644 --- a/var/spack/repos/builtin/packages/jpeg/package.py +++ b/var/spack/repos/builtin/packages/jpeg/package.py @@ -1,14 +1,19 @@ from spack import * class Jpeg(Package): - """jpeg library""" + """libjpeg is a widely used free library with functions for handling the + JPEG image data format. It implements a JPEG codec (encoding and decoding) + alongside various utilities for handling JPEG data.""" + homepage = "http://www.ijg.org" - url = "http://www.ijg.org/files/jpegsrc.v9a.tar.gz" + url = "http://www.ijg.org/files/jpegsrc.v9b.tar.gz" + version('9b', '6a9996ce116ec5c52b4870dbcd6d3ddb') version('9a', '3353992aecaee1805ef4109aadd433e7') def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() + make("test") make("install") -- cgit v1.2.3-70-g09d2 From 61e5ee5d6368a829f6dd32bca6ca3f97625177aa Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 31 Mar 2016 14:14:44 -0500 Subject: Prevent use of system GTK+ --- var/spack/repos/builtin/packages/qt/package.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 93688fb777..ac68b5792e 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -101,7 +101,7 @@ class Qt(Package): @property def common_config_args(self): - return [ + config_args = [ '-prefix', self.prefix, '-v', '-opensource', @@ -115,7 +115,16 @@ class Qt(Package): '-no-openvg', '-no-pch', # NIS is deprecated in more recent glibc - '-no-nis'] + '-no-nis' + ] + + if '+gtk' in self.spec: + config_args.append('-gtkstyle') + else: + config_args.append('-no-gtkstyle') + + return config_args + # Don't disable all the database drivers, but should # really get them into spack at some point. @@ -128,8 +137,8 @@ class Qt(Package): '-thread', '-shared', '-release', - '-fast' - ) + '-fast', + *self.common_config_args) @when('@4') def configure(self): -- cgit v1.2.3-70-g09d2 From 17fa1b5007355e0c0453b2f6d0213f81586b1756 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 31 Mar 2016 14:21:34 -0500 Subject: Un-fix version 3 --- var/spack/repos/builtin/packages/qt/package.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index ac68b5792e..1e1d6302f3 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -137,8 +137,7 @@ class Qt(Package): '-thread', '-shared', '-release', - '-fast', - *self.common_config_args) + '-fast') @when('@4') def configure(self): -- cgit v1.2.3-70-g09d2 From cde1d183994363cbb70a72bd180999a0ce151e16 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 30 Apr 2016 17:53:17 +0200 Subject: dealii: add new dependency -- gsl --- var/spack/repos/builtin/packages/dealii/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 674fe3150a..f0e9b8f967 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -12,6 +12,7 @@ class Dealii(Package): variant('mpi', default=True, description='Compile with MPI') variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') variant('doc', default=False, description='Compile with documentation') + variant('gsl' , default=True, description='Compile with GSL') variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') variant('metis', default=True, description='Compile with Metis') variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') @@ -39,6 +40,8 @@ class Dealii(Package): depends_on ("mpi", when="+mpi") depends_on ("arpack-ng+mpi", when='+arpack+mpi') depends_on ("doxygen", when='+doc') + depends_on ("gsl", when='@8.5.0:+gsl') + depends_on ("gsl", when='@dev+gsl') depends_on ("hdf5+mpi~cxx", when='+hdf5+mpi') #FIXME NetCDF declares dependency with ~cxx, why? depends_on ("metis@5:", when='+metis') depends_on ("netcdf+mpi", when="+netcdf+mpi") @@ -100,7 +103,7 @@ class Dealii(Package): ]) # Optional dependencies for which librariy names are the same as CMake variables - for library in ('hdf5', 'p4est','petsc', 'slepc','trilinos','metis'): + for library in ('gsl','hdf5','p4est','petsc','slepc','trilinos','metis'): if library in spec: options.extend([ '-D{library}_DIR={value}'.format(library=library.upper(), value=spec[library].prefix), -- cgit v1.2.3-70-g09d2 From 2eb4248f90650f83b7fca7587d59e8fc16bb5305 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 2 May 2016 18:52:44 +0200 Subject: dealii: fix a bug where P4EST_DIR was unconditionally requested --- var/spack/repos/builtin/packages/dealii/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index f0e9b8f967..df8330384d 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -83,7 +83,6 @@ class Dealii(Package): (join_path(spec['lapack'].prefix.lib,'liblapack.%s' % dsuf), # FIXME don't hardcode names join_path(spec['blas'].prefix.lib,'libblas.%s' % dsuf)), # FIXME don't hardcode names '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, - '-DP4EST_DIR=%s' % spec['p4est'].prefix, '-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix, '-DTBB_DIR=%s' % spec['tbb'].prefix, '-DZLIB_DIR=%s' % spec['zlib'].prefix -- cgit v1.2.3-70-g09d2 From 179d308fe06c30b184f37ae91c5bcf1fc77bb536 Mon Sep 17 00:00:00 2001 From: David Poliakoff Date: Mon, 2 May 2016 14:32:57 -0700 Subject: Added a package for the RAJA system --- var/spack/repos/builtin/packages/raja/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 var/spack/repos/builtin/packages/raja/package.py diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py new file mode 100644 index 0000000000..f807ab71af --- /dev/null +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -0,0 +1,12 @@ +from spack import * + +class Raja(Package): + """RAJA Parallel Framework.""" + homepage = "http://software.llnl.gov/RAJA/" + + version('git', git='https://github.com/LLNL/RAJA.git', branch="master") + + def install(self, spec, prefix): + cmake('.',*std_cmake_args) + make() + make('install') -- cgit v1.2.3-70-g09d2 From afef04bb54c6a9db37f84d6babe077ee2e862c84 Mon Sep 17 00:00:00 2001 From: David Poliakoff Date: Mon, 2 May 2016 15:49:37 -0700 Subject: Added cnmem package` --- var/spack/repos/builtin/packages/cnmem/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cnmem/package.py diff --git a/var/spack/repos/builtin/packages/cnmem/package.py b/var/spack/repos/builtin/packages/cnmem/package.py new file mode 100644 index 0000000000..f65838d195 --- /dev/null +++ b/var/spack/repos/builtin/packages/cnmem/package.py @@ -0,0 +1,12 @@ +from spack import * + +class Cnmem(Package): + """RAJA Parallel Framework.""" + homepage = "https://github.com/NVIDIA/cnmem" + + version('git', git='https://github.com/NVIDIA/cnmem.git', branch="master") + + def install(self, spec, prefix): + cmake('.',*std_cmake_args) + make() + make('install') -- cgit v1.2.3-70-g09d2 From e74cc0df275cb7d7b31f5744f3a72b6b65685613 Mon Sep 17 00:00:00 2001 From: David Poliakoff Date: Mon, 2 May 2016 15:53:43 -0700 Subject: Updated docstring --- var/spack/repos/builtin/packages/cnmem/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cnmem/package.py b/var/spack/repos/builtin/packages/cnmem/package.py index f65838d195..0a83e8fc20 100644 --- a/var/spack/repos/builtin/packages/cnmem/package.py +++ b/var/spack/repos/builtin/packages/cnmem/package.py @@ -1,7 +1,7 @@ from spack import * class Cnmem(Package): - """RAJA Parallel Framework.""" + """CNMem mempool for CUDA devices""" homepage = "https://github.com/NVIDIA/cnmem" version('git', git='https://github.com/NVIDIA/cnmem.git', branch="master") -- cgit v1.2.3-70-g09d2 From 89621faaea762538bbfa26bd54baff49539b8f47 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Mon, 2 May 2016 20:21:03 -0600 Subject: + Add version 5.0 download for SuperLU_DIST. --- var/spack/repos/builtin/packages/superlu-dist/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 5cf5e129b4..b4c0759d7c 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -6,6 +6,7 @@ class SuperluDist(Package): homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/" url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz" + version('5.0.0', '2b53baf1b0ddbd9fcf724992577f0670') version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae') version('4.2', 'ae9fafae161f775fbac6eba11e530a65') version('4.1', '4edee38cc29f687bd0c8eb361096a455') -- cgit v1.2.3-70-g09d2 From 98f8192bde22ad973d126de677566a3f9852a64a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 15:15:55 +0200 Subject: libtool: add a missing dependency --- var/spack/repos/builtin/packages/libtool/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index 82a54953b2..c804f5ab5d 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -8,6 +8,8 @@ class Libtool(Package): version('2.4.6' , 'addf44b646ddb4e3919805aa88fa7c5e') version('2.4.2' , 'd2f3b7d4627e69e13514a40e72a24d50') + depends_on('m4') + def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 0583bc98598d5c868e7ca402cbdf80bb4557c8cf Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 16:20:38 +0200 Subject: p4est: put back +tests variant --- var/spack/repos/builtin/packages/p4est/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index 017c4e3fbf..c059632079 100644 --- a/var/spack/repos/builtin/packages/p4est/package.py +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -7,6 +7,8 @@ class P4est(Package): version('1.1', '37ba7f4410958cfb38a2140339dbf64f') + variant('tests', default=True, description='Run small tests') + # build dependencies depends_on('automake') depends_on('autoconf') @@ -33,5 +35,11 @@ class P4est(Package): configure('--prefix=%s' % prefix, *options) make() - make("check") + # Make tests optional as sometimes mpiexec can't be run with an error: + # mpiexec has detected an attempt to run as root. + # Running at root is *strongly* discouraged as any mistake (e.g., in + # defining TMPDIR) or bug can result in catastrophic damage to the OS + # file system, leaving your system in an unusable state. + if '+tests' in self.spec: + make("check") make("install") -- cgit v1.2.3-70-g09d2 From 40d578be958b7bc0269f2f6f92cc2b6e70a43353 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 3 May 2016 10:38:05 -0400 Subject: Disable OpenBLAS's overriding of our "make -jN" option --- .../repos/builtin/packages/openblas/make.patch | 35 ++++++++++++++++++++++ .../repos/builtin/packages/openblas/package.py | 4 ++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/openblas/make.patch diff --git a/var/spack/repos/builtin/packages/openblas/make.patch b/var/spack/repos/builtin/packages/openblas/make.patch new file mode 100644 index 0000000000..851214211a --- /dev/null +++ b/var/spack/repos/builtin/packages/openblas/make.patch @@ -0,0 +1,35 @@ +diff --git a/Makefile.system b/Makefile.system +index b89f60e..2dbdad0 100644 +--- a/Makefile.system ++++ b/Makefile.system +@@ -139,6 +139,10 @@ NO_PARALLEL_MAKE=0 + endif + GETARCH_FLAGS += -DNO_PARALLEL_MAKE=$(NO_PARALLEL_MAKE) + ++ifdef MAKE_NO_J ++GETARCH_FLAGS += -DMAKE_NO_J=$(MAKE_NO_J) ++endif ++ + ifdef MAKE_NB_JOBS + GETARCH_FLAGS += -DMAKE_NB_JOBS=$(MAKE_NB_JOBS) + endif +diff --git a/getarch.c b/getarch.c +index f9c49e6..dffad70 100644 +--- a/getarch.c ++++ b/getarch.c +@@ -1012,6 +1012,7 @@ int main(int argc, char *argv[]){ + #endif + #endif + ++#ifndef MAKE_NO_J + #ifdef MAKE_NB_JOBS + printf("MAKE += -j %d\n", MAKE_NB_JOBS); + #elif NO_PARALLEL_MAKE==1 +@@ -1021,6 +1022,7 @@ int main(int argc, char *argv[]){ + printf("MAKE += -j %d\n", get_num_cores()); + #endif + #endif ++#endif + + break; + diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 61250fb310..14d4c89b19 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -19,13 +19,15 @@ class Openblas(Package): provides('blas') provides('lapack') + patch('make.patch') def install(self, spec, prefix): # Openblas is picky about compilers. Configure fails with # FC=/abs/path/to/f77, whereas FC=f77 works fine. # To circumvent this, provide basename only: make_defs = ['CC=%s' % os.path.basename(spack_cc), - 'FC=%s' % os.path.basename(spack_f77)] + 'FC=%s' % os.path.basename(spack_f77), + 'MAKE_NO_J=1'] make_targets = ['libs', 'netlib'] -- cgit v1.2.3-70-g09d2 From 51c6867f72e91bb061e8bd021b64fa12706c0f33 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 10:30:35 -0500 Subject: Re-add hwloc as a dependency of openmpi --- var/spack/repos/builtin/packages/openmpi/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 3cb9b0be21..74f0a7bfd1 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -34,6 +34,8 @@ class Openmpi(Package): provides('mpi@:2.2', when='@1.6.5') provides('mpi@:3.0', when='@1.7.5:') + depends_on('hwloc') + def url_for_version(self, version): return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) @@ -48,6 +50,7 @@ class Openmpi(Package): def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, + "--with-hwloc=%s" % spec['hwloc'].prefix, "--enable-shared", "--enable-static"] -- cgit v1.2.3-70-g09d2 From f4260da1c262731f9287db4f972e7eae6399135d Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 3 May 2016 12:05:35 -0600 Subject: Mark SuperLU_DIST version 4.3 as the preferred version since petsc and trilinos are not tested with 5.0. --- var/spack/repos/builtin/packages/superlu-dist/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index b4c0759d7c..3420d9b90a 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -7,7 +7,8 @@ class SuperluDist(Package): url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz" version('5.0.0', '2b53baf1b0ddbd9fcf724992577f0670') - version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae') + # default to version 4.3 since petsc and trilinos are not tested with 5.0. + version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae', preferred=True) version('4.2', 'ae9fafae161f775fbac6eba11e530a65') version('4.1', '4edee38cc29f687bd0c8eb361096a455') version('4.0', 'c0b98b611df227ae050bc1635c6940e0') -- cgit v1.2.3-70-g09d2 From eaa45d8a9a8cd26379ea7bd3bcee99cbab08d9e7 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 13:28:38 -0500 Subject: Remove hdf5 ~cxx constraint on netcdf --- var/spack/repos/builtin/packages/netcdf/package.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index a4d9e5213c..4aad0f6f3c 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -12,16 +12,19 @@ class Netcdf(Package): version('4.4.0', 'cffda0cbd97fdb3a06e9274f7aef438e') version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae') - variant('mpi', default=True, description='Enables MPI parallelism') - variant('hdf4', default=False, description="Enable HDF4 support") + variant('mpi', default=True, description='Enables MPI parallelism') + variant('hdf4', default=False, description='Enable HDF4 support') - # Dependencies: - depends_on("curl") # required for DAP support - depends_on("hdf", when='+hdf4') - depends_on("hdf5+mpi~cxx", when='+mpi') # required for NetCDF-4 support - depends_on("hdf5~mpi", when='~mpi') # required for NetCDF-4 support - depends_on("zlib") # required for NetCDF-4 support depends_on("m4") + depends_on("hdf", when='+hdf4') + + # Required for DAP support + depends_on("curl") + + # Required for NetCDF-4 support + depends_on("zlib") + depends_on("hdf5+mpi", when='+mpi') + depends_on("hdf5~mpi", when='~mpi') def install(self, spec, prefix): # Environment variables @@ -49,7 +52,7 @@ class Netcdf(Package): # /usr/lib/x86_64-linux-gnu/libcurl.so: undefined reference to `SSL_CTX_use_certificate_chain_file@OPENSSL_1.0.0' LIBS.append("-lcurl") CPPFLAGS.append("-I%s" % spec['curl'].prefix.include) - LDFLAGS.append ("-L%s" % spec['curl'].prefix.lib) + LDFLAGS.append( "-L%s" % spec['curl'].prefix.lib) if '+mpi' in spec: config_args.append('--enable-parallel4') -- cgit v1.2.3-70-g09d2 From a3d2d0cd22efef3fa24fce3a92b579d8cc938805 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 15:44:23 -0500 Subject: Add latest OpenSSL versions --- var/spack/repos/builtin/packages/openssl/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 9e3109bfed..d0c95731a2 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -15,10 +15,12 @@ class Openssl(Package): version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') version('1.0.1r', '1abd905e079542ccae948af37e393d28') + version('1.0.1t', '9837746fcf8a6727d46d22ca35953da1') version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a') version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5') version('1.0.2f', 'b3bf73f507172be9292ea2a8c28b659d') version('1.0.2g', 'f3c710c045cdee5fd114feb69feba7aa') + version('1.0.2h', '9392e65072ce4b614c1392eefc1f23d0') depends_on("zlib") parallel = False -- cgit v1.2.3-70-g09d2 From 88fa9084e2846008238a3136933a16d0ab6b413c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 3 May 2016 15:58:14 -0500 Subject: Add latest version of GCC --- var/spack/repos/builtin/packages/gcc/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 6043b62279..8f90757232 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -38,6 +38,7 @@ class Gcc(Package): list_url = 'http://open-source-box.org/gcc/' list_depth = 2 + version('6.1.0', '8fb6cb98b8459f5863328380fbf06bd1') version('5.3.0', 'c9616fd448f980259c31de613e575719') version('5.2.0', 'a51bcfeb3da7dd4c623e27207ed43467') version('4.9.3', '6f831b4d251872736e8e9cc09746f327') -- cgit v1.2.3-70-g09d2 From c3317819cb89abdcd9fe1cb9431436c4e4ef8702 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 4 May 2016 10:37:52 +0200 Subject: mpi: add self.spec.[mpicc|mpicxx|mpifc|mpif77] to avoid hardcoding MPI wrappers names --- lib/spack/docs/packaging_guide.rst | 17 +++++++++++++++++ var/spack/repos/builtin/packages/mpich/package.py | 5 +++++ var/spack/repos/builtin/packages/openmpi/package.py | 5 +++++ 3 files changed, 27 insertions(+) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 519c0da232..34d11308f5 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1831,6 +1831,23 @@ successfully find ``libdwarf.h`` and ``libdwarf.so``, without the packager having to provide ``--with-libdwarf=/path/to/libdwarf`` on the command line. +Message Parsing Interface (MPI) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +It is common for high performance computing software/packages to use ``MPI``. +As a result of conretization, a given package can be built using different +implementations of MPI such as ``Openmpi``, ``MPICH`` or ``IntelMPI``. +In some scenarios to configure a package one have to provide it with appropriate MPI +compiler wrappers such as ``mpicc``, ``mpic++``. +However different implementations of ``MPI`` may have different names for those +wrappers. In order to make package's ``install()`` method indifferent to the +choice ``MPI`` implementation, each package which implements ``MPI`` sets up +``self.spec.mpicc``, ``self.spec.mpicxx``, ``self.spec.mpifc`` and ``self.spec.mpif77`` +to point to ``C``, ``C++``, ``Fortran 90`` and ``Fortran 77`` ``MPI`` wrappers. +Package developers are advised to use these variables, for example ``self.spec['mpi'].mpicc`` +instead of hard-coding ``join_path(self.spec['mpi'].prefix.bin, 'mpicc')`` for +the reasons outlined above. + + Forking ``install()`` ~~~~~~~~~~~~~~~~~~~~~ diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index b317ec6651..aaa6386df7 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -54,6 +54,11 @@ class Mpich(Package): spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') + def setup_dependent_package(self, module, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" # FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers? diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 3cb9b0be21..89a21e869c 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -45,6 +45,11 @@ class Openmpi(Package): spack_env.set('OMPI_FC', spack_fc) spack_env.set('OMPI_F77', spack_f77) + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') + def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, -- cgit v1.2.3-70-g09d2 From f417b1cf904d99b4fb81ab31ec3ddd6da362d286 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 4 May 2016 11:01:52 +0200 Subject: p4est: use mpicc,mpicxx,mpifc,mpif77 compiler variables instead of hardcoding names --- var/spack/repos/builtin/packages/p4est/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index 017c4e3fbf..5b2474a067 100644 --- a/var/spack/repos/builtin/packages/p4est/package.py +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -24,10 +24,10 @@ class P4est(Package): '--without-blas', 'CPPFLAGS=-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL', 'CFLAGS=-O2', - 'CC=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # TODO: use ENV variables or MPI class wrappers - 'CXX=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), - 'FC=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - 'F77=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif77'), + 'CC=%s' % self.spec['mpi'].mpicc, + 'CXX=%s' % self.spec['mpi'].mpicxx, + 'FC=%s' % self.spec['mpi'].mpifc, + 'F77=%s' % self.spec['mpi'].mpif77 ] configure('--prefix=%s' % prefix, *options) -- cgit v1.2.3-70-g09d2 From 7eb463a66e600e7a4d9692610763bfffbe9ac64a Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 4 May 2016 15:05:56 +0200 Subject: only fail when it is apples clang --- var/spack/repos/builtin/packages/fftw/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index eb8f96cbac..008939ece8 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -57,6 +57,8 @@ class Fftw(Package): if '+openmp' in spec: # Note: Apple's Clang does not support OpenMP. if spec.satisfies('%clang'): + ver = '%s' % self.compiler.version + if ver.endswith('-apple'): raise InstallError("Apple's clang does not support OpenMP") options.append('--enable-openmp') if not self.compiler.f77 or not self.compiler.fc: -- cgit v1.2.3-70-g09d2 From 796bf5f85cd22039f6131b15d401ef4a82bf7f86 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 4 May 2016 17:33:19 +0200 Subject: mvapich2: add self.spec.[mpicc|mpicxx|mpifc|mpif77] --- var/spack/repos/builtin/packages/mvapich2/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 3e60b517db..3d4f2d0c68 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -146,6 +146,10 @@ class Mvapich2(Package): spack_env.set('MPICH_F77', spack_f77) spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') def install(self, spec, prefix): # we'll set different configure flags depending on our environment -- cgit v1.2.3-70-g09d2 From bfe009f98d8f468c839ed75f12d881c246dd2ceb Mon Sep 17 00:00:00 2001 From: "Robert.French" Date: Wed, 4 May 2016 15:26:10 +0000 Subject: Subversion uses serf for http repos Add Scons package Add serf package Subversion uses serf for http repos --- var/spack/repos/builtin/packages/scons/package.py | 13 ++++++ var/spack/repos/builtin/packages/serf/package.py | 51 ++++++++++++++++++++++ .../repos/builtin/packages/subversion/package.py | 2 + 3 files changed, 66 insertions(+) create mode 100644 var/spack/repos/builtin/packages/scons/package.py create mode 100644 var/spack/repos/builtin/packages/serf/package.py diff --git a/var/spack/repos/builtin/packages/scons/package.py b/var/spack/repos/builtin/packages/scons/package.py new file mode 100644 index 0000000000..594aeced88 --- /dev/null +++ b/var/spack/repos/builtin/packages/scons/package.py @@ -0,0 +1,13 @@ +from spack import * + +class Scons(Package): + """SCons is a software construction tool""" + homepage = "http://scons.org" + url = "http://downloads.sourceforge.net/project/scons/scons/2.5.0/scons-2.5.0.tar.gz" + + version('2.5.0', '9e00fa0df8f5ca5c5f5975b40e0ed354') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py new file mode 100644 index 0000000000..a5c9057b99 --- /dev/null +++ b/var/spack/repos/builtin/packages/serf/package.py @@ -0,0 +1,51 @@ +############################################################################## +# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + +class Serf(Package): + """Apache Serf - a high performance C-based HTTP client library built upon the Apache Portable Runtime (APR) library""" + homepage = 'https://serf.apache.org/' + url = 'https://archive.apache.org/dist/serf/serf-1.3.8.tar.bz2' + + version('1.3.8', '1d45425ca324336ce2f4ae7d7b4cfbc5567c5446') + + depends_on('apr') + depends_on('apr-util') + depends_on('scons') + depends_on('expat') + depends_on('openssl') + + def install(self, spec, prefix): + scons = which("scons") + + options = ['PREFIX=%s' % prefix] + options.append('APR=%s' % spec['apr'].prefix) + options.append('APU=%s' % spec['apr-util'].prefix) + options.append('OPENSSL=%s' % spec['openssl'].prefix) + options.append('LINKFLAGS=-L%s/lib' % spec['expat'].prefix) + options.append('CPPFLAGS=-I%s/include' % spec['expat'].prefix) + + scons(*options) + scons('install') diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py index 5db1c3eb92..04cde94aad 100644 --- a/var/spack/repos/builtin/packages/subversion/package.py +++ b/var/spack/repos/builtin/packages/subversion/package.py @@ -37,6 +37,7 @@ class Subversion(Package): depends_on('apr-util') depends_on('zlib') depends_on('sqlite') + depends_on('serf') # Optional: We need swig if we want the Perl, Python or Ruby # bindings. @@ -54,6 +55,7 @@ class Subversion(Package): options.append('--with-apr-util=%s' % spec['apr-util'].prefix) options.append('--with-zlib=%s' % spec['zlib'].prefix) options.append('--with-sqlite=%s' % spec['sqlite'].prefix) + options.append('--with-serf=%s' % spec['serf'].prefix) #options.append('--with-swig=%s' % spec['swig'].prefix) configure(*options) -- cgit v1.2.3-70-g09d2 From 67d64b804f5b08bc9e4493efd25ab549333e550e Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 4 May 2016 23:53:10 +0200 Subject: more succinctly --- var/spack/repos/builtin/packages/fftw/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index 008939ece8..4ffc787594 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -57,7 +57,7 @@ class Fftw(Package): if '+openmp' in spec: # Note: Apple's Clang does not support OpenMP. if spec.satisfies('%clang'): - ver = '%s' % self.compiler.version + ver = str(self.compiler.version) if ver.endswith('-apple'): raise InstallError("Apple's clang does not support OpenMP") options.append('--enable-openmp') -- cgit v1.2.3-70-g09d2 From 32f7b06a36e99e2fbfc56147b3c4803fa2946838 Mon Sep 17 00:00:00 2001 From: Dhanannjay 'Djay' Deo Date: Wed, 4 May 2016 18:14:38 -0400 Subject: Add version 2.10.2 --- var/spack/repos/builtin/packages/visit/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index 9b21370fa3..716cd2c101 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -7,6 +7,7 @@ class Visit(Package): url = "http://portal.nersc.gov/project/visit/releases/2.10.1/visit2.10.1.tar.gz" version('2.10.1', '3cbca162fdb0249f17c4456605c4211e') + version('2.10.2', '253de0837a9d69fb689befc98ea4d068') depends_on("vtk@6.1.0~opengl2") depends_on("qt@4.8.6") -- cgit v1.2.3-70-g09d2 From 514a8c737a69f8176ccd5531a87b5042ff847ddc Mon Sep 17 00:00:00 2001 From: Greg Lee Date: Wed, 4 May 2016 16:38:43 -0700 Subject: added git commit for clang support --- var/spack/repos/builtin/packages/mrnet/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index a3abb71285..b52233be4a 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -6,6 +6,7 @@ class Mrnet(Package): url = "ftp://ftp.cs.wisc.edu/paradyn/mrnet/mrnet_5.0.1.tar.gz" list_url = "http://ftp.cs.wisc.edu/paradyn/mrnet" + version('5.0.1-2', git='https://github.com/dyninst/mrnet.git', commit='20b1eacfc6d680d9f6472146d2dfaa0f900cc2e9') version('5.0.1', '17f65738cf1b9f9b95647ff85f69ecdd') version('4.1.0', '5a248298b395b329e2371bf25366115c') version('4.0.0', 'd00301c078cba57ef68613be32ceea2f') -- cgit v1.2.3-70-g09d2 From 27de2a42d9d3b0f572c37a6ce1612b7df9855240 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 4 May 2016 20:27:58 -0400 Subject: Update Flex to 2.6.0 --- var/spack/repos/builtin/packages/flex/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index b065904912..e4795893e0 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -6,6 +6,7 @@ class Flex(Package): homepage = "http://flex.sourceforge.net/" url = "http://download.sourceforge.net/flex/flex-2.5.39.tar.gz" + version('2.6.0', '5724bcffed4ebe39e9b55a9be80859ec') version('2.5.39', 'e133e9ead8ec0a58d81166b461244fde') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 1785de0f3152a7d853425f07c236faf60eb91e0e Mon Sep 17 00:00:00 2001 From: Dhanannjay 'Djay' Deo Date: Wed, 4 May 2016 22:08:01 -0400 Subject: remove hdf5 which is silo actually a silo dependency --- var/spack/repos/builtin/packages/visit/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index 716cd2c101..91ffd4c045 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -12,7 +12,6 @@ class Visit(Package): depends_on("vtk@6.1.0~opengl2") depends_on("qt@4.8.6") depends_on("python") - depends_on("hdf5") # silo seems to need it depends_on("silo+shared") def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 45e77e7739e3e96b776eb0691daa5cfaaa9e26ce Mon Sep 17 00:00:00 2001 From: Dhanannjay 'Djay' Deo Date: Wed, 4 May 2016 22:49:47 -0400 Subject: Correctly extend std_cmake_args --- var/spack/repos/builtin/packages/visit/package.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index 91ffd4c045..14e3b6a0c1 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -18,13 +18,12 @@ class Visit(Package): with working_dir('spack-build', create=True): feature_args = std_cmake_args[:] - feature_args = ["-DVTK_MAJOR_VERSION=6", - "-DVTK_MINOR_VERSION=1", - "-DCMAKE_INSTALL_PREFIX:PATH=%s" % spec.prefix, - "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin, - "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin, - "-DVISIT_SILO_DIR:PATH=%s" % spec['silo'].prefix, - "-DVISIT_HDF5_DIR:PATH=%s" % spec['hdf5'].prefix] + feature_args.extend(["-DVTK_MAJOR_VERSION=6", + "-DVTK_MINOR_VERSION=1", + "-DVISIT_LOC_QMAKE_EXE:FILEPATH=%s/qmake-qt4" % spec['qt'].prefix.bin, + "-DPYTHON_EXECUTABLE:FILEPATH=%s/python" % spec['python'].prefix.bin, + "-DVISIT_SILO_DIR:PATH=%s" % spec['silo'].prefix, + "-DVISIT_HDF5_DIR:PATH=%s" % spec['hdf5'].prefix]) cmake('../src', *feature_args) -- cgit v1.2.3-70-g09d2 From ef202fbe0ca1f23ca7f0ea271d45cee8a0623e4e Mon Sep 17 00:00:00 2001 From: Dhanannjay 'Djay' Deo Date: Wed, 4 May 2016 22:50:15 -0400 Subject: Build static and shared libraries for silo --- var/spack/repos/builtin/packages/silo/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 638a894b7b..7e68663c6e 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -24,7 +24,6 @@ class Silo(Package): '--enable-fortran' if '+fortran' in spec else '--disable-fortran', '--enable-silex' if '+silex' in spec else '--disable-silex', '--enable-shared' if '+shared' in spec else '--disable-shared', - '--disable-static' if '+shared' in spec else '--enable-static', ] if '+silex' in spec: -- cgit v1.2.3-70-g09d2 From 90b7b7ba5c483054a3b6687f84306601d0e62d15 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 4 May 2016 21:42:59 -0700 Subject: Reworked compiler finding/storing/format to allow for multiple compilers with the same spec for different operating systems. TODO: fix config tests. All others up to date --- lib/spack/spack/architecture.py | 96 +++++++++++- lib/spack/spack/build_environment.py | 5 +- lib/spack/spack/cmd/compiler.py | 4 +- lib/spack/spack/compiler.py | 166 +++++--------------- lib/spack/spack/compilers/__init__.py | 234 ++++++++++++++--------------- lib/spack/spack/concretize.py | 8 +- lib/spack/spack/config.py | 35 +++-- lib/spack/spack/operating_systems/cnl.py | 51 ++++++- lib/spack/spack/test/architecture.py | 39 +++-- lib/spack/spack/test/config.py | 95 +++++++++--- lib/spack/spack/test/mock_packages_test.py | 43 +++++- lib/spack/spack/test/spec_dag.py | 2 +- 12 files changed, 456 insertions(+), 322 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index e2c189980a..301495f728 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -22,6 +22,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## +import os from collections import namedtuple import imp import platform as py_platform @@ -32,7 +33,10 @@ from llnl.util.filesystem import join_path import llnl.util.tty as tty import spack +import spack.compilers from spack.util.naming import mod_to_class +from spack.util.environment import get_path +from spack.util.multiproc import parmap import spack.error as serr @@ -143,6 +147,7 @@ class Platform(object): return self.operating_sys.get(name, None) + @classmethod def detect(self): """ Subclass is responsible for implementing this method. @@ -170,10 +175,9 @@ class OperatingSystem(object): find compilers we call find_compilers method for each operating system """ - def __init__(self, name, version, compiler_strategy="PATH"): + def __init__(self, name, version): self.name = name self.version = version - self.compiler_strategy = compiler_strategy def __str__(self): return self.name + self.version @@ -182,13 +186,96 @@ class OperatingSystem(object): return self.__str__() def _cmp_key(self): - return (self.name, self.version, self.compiler_strategy) + return (self.name, self.version) + + + def find_compilers(self, *paths): + """ + Return a list of compilers found in the suppied paths. + This invokes the find() method for each Compiler class, + and appends the compilers detected to a list. + """ + if not paths: + paths = get_path('PATH') + # Make sure path elements exist, and include /bin directories + # under prefixes. + filtered_path = [] + for p in paths: + # Eliminate symlinks and just take the real directories. + p = os.path.realpath(p) + if not os.path.isdir(p): + continue + filtered_path.append(p) + + # Check for a bin directory, add it if it exists + bin = join_path(p, 'bin') + if os.path.isdir(bin): + filtered_path.append(os.path.realpath(bin)) + + # Once the paths are cleaned up, do a search for each type of + # compiler. We can spawn a bunch of parallel searches to reduce + # the overhead of spelunking all these directories. + types = spack.compilers.all_compiler_types() + compiler_lists = parmap(lambda cmp_cls: self.find_compiler(cmp_cls, *filtered_path), types) + + # ensure all the version calls we made are cached in the parent + # process, as well. This speeds up Spack a lot. + clist = reduce(lambda x,y: x+y, compiler_lists) + return clist + + def find_compiler(self, cmp_cls, *path): + """Try to find the given type of compiler in the user's + environment. For each set of compilers found, this returns + compiler objects with the cc, cxx, f77, fc paths and the + version filled in. + + This will search for compilers with the names in cc_names, + cxx_names, etc. and it will group them if they have common + prefixes, suffixes, and versions. e.g., gcc-mp-4.7 would + be grouped with g++-mp-4.7 and gfortran-mp-4.7. + """ + dicts = parmap( + lambda t: cmp_cls._find_matches_in_path(*t), + [(cmp_cls.cc_names, cmp_cls.cc_version) + tuple(path), + (cmp_cls.cxx_names, cmp_cls.cxx_version) + tuple(path), + (cmp_cls.f77_names, cmp_cls.f77_version) + tuple(path), + (cmp_cls.fc_names, cmp_cls.fc_version) + tuple(path)]) + + all_keys = set() + for d in dicts: + all_keys.update(d) + + compilers = {} + for k in all_keys: + ver, pre, suf = k + + # Skip compilers with unknown version. + if ver == 'unknown': + continue + + paths = tuple(pn[k] if k in pn else None for pn in dicts) + spec = spack.spec.CompilerSpec(cmp_cls.name, ver) + + if ver in compilers: + prev = compilers[ver] + + # prefer the one with more compilers. + prev_paths = [prev.cc, prev.cxx, prev.f77, prev.fc] + newcount = len([p for p in paths if p is not None]) + prevcount = len([p for p in prev_paths if p is not None]) + + # Don't add if it's not an improvement over prev compiler. + if newcount <= prevcount: + continue + + compilers[ver] = cmp_cls(spec, self, paths) + + return list(compilers.values()) def to_dict(self): d = {} d['name'] = self.name d['version'] = self.version - d['compiler_strategy'] = self.compiler_strategy return d @@ -261,7 +348,6 @@ def _operating_system_from_dict(os_dict): operating_system = OperatingSystem.__new__(OperatingSystem) operating_system.name = os_dict['name'] operating_system.version = os_dict['version'] - operating_system.compiler_strategy = os_dict['compiler_strategy'] return operating_system def arch_from_dict(d): diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 12a529d070..82d0792e26 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -169,9 +169,8 @@ def set_compiler_environment_variables(pkg): os.environ['SPACK_COMPILER_SPEC'] = str(pkg.spec.compiler) - if compiler.strategy == 'MODULES': - for mod in compiler.modules: - load_module(mod) + for mod in compiler.modules: + load_module(mod) def set_build_environment_variables(pkg): """This ensures a clean install environment when we build packages. diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index a7de61e1e5..e3d311b6b8 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -80,7 +80,7 @@ def compiler_add(args): if not paths: paths = get_path('PATH') - compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) + compilers = [c for c in spack.compilers.find_compilers(*paths) if c.spec not in spack.compilers.all_compilers(scope=args.scope)] if compilers: @@ -125,6 +125,8 @@ def compiler_info(args): print "\tcxx = %s" % c.cxx print "\tf77 = %s" % c.f77 print "\tfc = %s" % c.fc + print "\tmodules = %s" % c.modules + print "\toperating system = %s" % c.operating_system def compiler_list(args): diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index c285c8a29d..8b973d8190 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -106,14 +106,14 @@ class Compiler(object): PrgEnv_compiler = None - def __init__(self, cspec, strategy, paths, modules=None): + def __init__(self, cspec, operating_system, paths, modules=[], alias=None): def check(exe): if exe is None: return None _verify_executables(exe) return exe - self.strategy = strategy + self.operating_system = operating_system self.cc = check(paths[0]) self.cxx = check(paths[1]) @@ -126,62 +126,33 @@ class Compiler(object): self.spec = cspec self.modules = modules - + self.alias = alias @property def version(self): return self.spec.version - # - # Compiler classes have methods for querying the version of - # specific compiler executables. This is used when discovering compilers. - # - # Compiler *instances* are just data objects, and can only be - # constructed from an actual set of executables. - # - - @classmethod - def default_version(cls, cc): - """Override just this to override all compiler version functions.""" - return dumpversion(cc) - - @classmethod - def cc_version(cls, cc): - return cls.default_version(cc) - - @classmethod - def cxx_version(cls, cxx): - return cls.default_version(cxx) - - @classmethod - def f77_version(cls, f77): - return cls.default_version(f77) - - @classmethod - def fc_version(cls, fc): - return cls.default_version(fc) - @classmethod def _find_matches_in_path(cls, compiler_names, detect_version, *path): """Finds compilers in the paths supplied. - - Looks for all combinations of ``compiler_names`` with the - ``prefixes`` and ``suffixes`` defined for this compiler - class. If any compilers match the compiler_names, - prefixes, or suffixes, uses ``detect_version`` to figure - out what version the compiler is. - - This returns a dict with compilers grouped by (prefix, - suffix, version) tuples. This can be further organized by - find(). - """ + + Looks for all combinations of ``compiler_names`` with the + ``prefixes`` and ``suffixes`` defined for this compiler + class. If any compilers match the compiler_names, + prefixes, or suffixes, uses ``detect_version`` to figure + out what version the compiler is. + + This returns a dict with compilers grouped by (prefix, + suffix, version) tuples. This can be further organized by + find(). + """ if not path: path = get_path('PATH') - + prefixes = [''] + cls.prefixes suffixes = [''] + cls.suffixes - + checks = [] for directory in path: if not (os.path.isdir(directory) and @@ -219,89 +190,34 @@ class Compiler(object): successful = [key for key in parmap(check, checks) if key is not None] return dict(((v, p, s), path) for v, p, s, path in successful) - @classmethod - def find(cls, *path): - compilers = [] - platform = spack.architecture.sys_type() - strategies = [o.compiler_strategy for o in platform.operating_sys.values()] - if 'PATH' in strategies: - compilers.extend(cls.find_in_path(*path)) - if 'MODULES' in strategies: - compilers.extend(cls.find_in_modules()) - return compilers - + # + # Compiler classes have methods for querying the version of + # specific compiler executables. This is used when discovering compilers. + # + # Compiler *instances* are just data objects, and can only be + # constructed from an actual set of executables. + # @classmethod - def find_in_path(cls, *path): - """Try to find this type of compiler in the user's - environment. For each set of compilers found, this returns - compiler objects with the cc, cxx, f77, fc paths and the - version filled in. - - This will search for compilers with the names in cc_names, - cxx_names, etc. and it will group them if they have common - prefixes, suffixes, and versions. e.g., gcc-mp-4.7 would - be grouped with g++-mp-4.7 and gfortran-mp-4.7. - """ - dicts = parmap( - lambda t: cls._find_matches_in_path(*t), - [(cls.cc_names, cls.cc_version) + tuple(path), - (cls.cxx_names, cls.cxx_version) + tuple(path), - (cls.f77_names, cls.f77_version) + tuple(path), - (cls.fc_names, cls.fc_version) + tuple(path)]) - - all_keys = set() - for d in dicts: - all_keys.update(d) - - compilers = {} - for k in all_keys: - ver, pre, suf = k - - # Skip compilers with unknown version. - if ver == 'unknown': - continue - - paths = tuple(pn[k] if k in pn else None for pn in dicts) - spec = spack.spec.CompilerSpec(cls.name, ver) - - if ver in compilers: - prev = compilers[ver] - - # prefer the one with more compilers. - prev_paths = [prev.cc, prev.cxx, prev.f77, prev.fc] - newcount = len([p for p in paths if p is not None]) - prevcount = len([p for p in prev_paths if p is not None]) - - # Don't add if it's not an improvement over prev compiler. - if newcount <= prevcount: - continue - - compilers[ver] = cls(spec, 'PATH', paths) - - return list(compilers.values()) + def default_version(cls, cc): + """Override just this to override all compiler version functions.""" + return dumpversion(cc) + @classmethod + def cc_version(cls, cc): + return cls.default_version(cc) @classmethod - def find_in_modules(cls): - compilers = [] - if cls.PrgEnv: - if not cls.PrgEnv_compiler: - tty.die('Must supply PrgEnv_compiler with PrgEnv') - - modulecmd = which('modulecmd') - modulecmd.add_default_arg('python') - - output = modulecmd('avail', cls.PrgEnv_compiler, output=str, error=str) - matches = re.findall(r'(%s)/([\d\.]+[\d])' % cls.PrgEnv_compiler, output) - for name, version in matches: - v = version - comp = cls(spack.spec.CompilerSpec(name + '@' + v), 'MODULES', - ['cc', 'CC', 'ftn'], [cls.PrgEnv, name +'/' + v]) + def cxx_version(cls, cxx): + return cls.default_version(cxx) - compilers.append(comp) + @classmethod + def f77_version(cls, f77): + return cls.default_version(f77) - return compilers + @classmethod + def fc_version(cls, fc): + return cls.default_version(fc) def __repr__(self): @@ -311,12 +227,8 @@ class Compiler(object): def __str__(self): """Return a string represntation of the compiler toolchain.""" - if self.strategy is 'MODULES': - return "%s(%s)" % ( - self.name, '\n '.join((str(s) for s in (self.strategy, self.cc, self.cxx, self.f77, self.fc, self.modules)))) - else: - return "%s(%s)" % ( - self.name, '\n '.join((str(s) for s in (self.strategy, self.cc, self.cxx, self.f77, self.fc)))) + return "%s(%s)" % ( + self.name, '\n '.join((str(s) for s in (self.cc, self.cxx, self.f77, self.fc, self.modules, str(self.operating_system))))) class CompilerAccessError(spack.error.SpackError): diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index caf438e232..8ef6e976ba 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -29,6 +29,10 @@ import imp import os import platform import copy +import hashlib +import base64 +import yaml +import sys from llnl.util.lang import memoized, list_modules from llnl.util.filesystem import join_path @@ -46,8 +50,8 @@ from spack.util.naming import mod_to_class from spack.util.environment import get_path _imported_compilers_module = 'spack.compilers' -_required_instance_vars = ['cc', 'cxx', 'f77', 'fc'] -_optional_instance_vars = ['modules', 'strategy'] +_path_instance_vars = ['cc', 'cxx', 'f77', 'fc'] +_other_instance_vars = ['modules', 'operating_system'] _default_order = [] # TODO: customize order in config file @@ -67,93 +71,85 @@ def _auto_compiler_spec(function): def _to_dict(compiler): """Return a dict version of compiler suitable to insert in YAML.""" + d = {} + d['spec'] = str(compiler.spec) + d['paths'] = dict( (attr, getattr(compiler, attr, None)) for attr in _path_instance_vars ) + d['operating_system'] = compiler.operating_system.to_dict() + d['modules'] = compiler.modules + + if not compiler.alias: + yaml_text = yaml.dump( + d, default_flow_style=True, width=sys.maxint) + sha = hashlib.sha1(yaml_text) + compiler.alias = base64.b32encode(sha.digest()).lower()[:8] return { - str(compiler.spec) : dict( - (attr, getattr(compiler, attr, None)) - for attr in _required_instance_vars + _optional_instance_vars) + compiler.alias: d } -def get_compiler_config(arch=None, scope=None): +def get_compiler_config(scope=None): """Return the compiler configuration for the specified architecture. """ - # Check whether we're on a front-end (native) architecture. - my_arch = spack.architecture.Arch() - if arch is None: - arch = my_arch - if isinstance(arch, basestring) and arch == 'all': - name = 'all' - else: - name = arch.platform.name - def init_compiler_config(): """Compiler search used when Spack has no compilers.""" - config[name] = {} - compilers = find_compilers(*get_path('PATH')) + config = {} + compilers = find_compilers() for compiler in compilers: - config[name].update(_to_dict(compiler)) + config.update(_to_dict(compiler)) spack.config.update_config('compilers', config, scope=scope) config = spack.config.get_config('compilers', scope=scope) # Update the configuration if there are currently no compilers # configured. Avoid updating automatically if there ARE site # compilers configured but no user ones. - if (isinstance(arch, basestring) or arch == my_arch) and arch not in config: - if scope is None: - # We know no compilers were configured in any scope. +# if (isinstance(arch, basestring) or arch == my_arch) and arch not in config: + if scope is None: + # We know no compilers were configured in any scope. + init_compiler_config() + elif scope == 'user': + # Check the site config and update the user config if + # nothing is configured at the site level. + site_config = spack.config.get_config('compilers', scope='site') + if not site_config: init_compiler_config() - elif scope == 'user': - # Check the site config and update the user config if - # nothing is configured at the site level. - site_config = spack.config.get_config('compilers', scope='site') - if not site_config: - init_compiler_config() - return config[name] if name in config else {} + return config -def add_compilers_to_config(compilers, arch=None, scope=None): +def add_compilers_to_config(compilers, scope=None): """Add compilers to the config for the specified architecture. Arguments: - compilers: a list of Compiler objects. - - arch: arch to add compilers for. - scope: configuration scope to modify. """ - if arch is None: - arch = spack.architecture.Arch() - - compiler_config = get_compiler_config(arch, scope) + compiler_config = get_compiler_config(scope) for compiler in compilers: - compiler_config[str(compiler.spec)] = dict( - (c, getattr(compiler, c, "None")) - for c in _required_instance_vars + _optional_instance_vars) + compiler_config = _to_dict(compiler) - update = { arch.platform.name : compiler_config } - spack.config.update_config('compilers', update, scope) + spack.config.update_config('compilers', compiler_config, scope) @_auto_compiler_spec -def remove_compiler_from_config(compiler_spec, arch=None, scope=None): +def remove_compiler_from_config(compiler_spec, scope=None): """Remove compilers from the config, by spec. Arguments: - compiler_specs: a list of CompilerSpec objects. - - arch: arch to add compilers for. - scope: configuration scope to modify. """ - if arch is None: - arch = spack.architecture.Arch() - - compiler_config = get_compiler_config(arch, scope) - del compiler_config[str(compiler_spec)] - update = { arch : compiler_config } + compiler_config = get_compiler_config(scope) + matches = [(a,c) for (a,c) in compiler_config.items() if c['spec'] == compiler_spec] + if len(matches) == 1: + del compiler_config[matches[0][0]] + else: + CompilerSpecInsufficientlySpecificError(compiler_spec) - spack.config.update_config('compilers', update, scope) + spack.config.update_config('compilers', compiler_config, scope) _cache_config_file = {} -def all_compilers_config(arch=None, scope=None): +def all_compilers_config(scope=None): """Return a set of specs for all the compiler versions currently available to build with. These are instances of CompilerSpec. """ @@ -161,20 +157,16 @@ def all_compilers_config(arch=None, scope=None): global _cache_config_file #Create a cache of the config file so we don't load all the time. if not _cache_config_file: - arch_config = get_compiler_config(arch, scope) - # Merge 'all' compilers with arch-specific ones. - # Arch-specific compilers have higher precedence. - _cache_config_file = get_compiler_config('all', scope=scope) - _cache_config_file = spack.config._merge_yaml(_cache_config_file, arch_config) + _cache_config_file = get_compiler_config(scope) return _cache_config_file else: return _cache_config_file -def all_compilers(arch=None, scope=None): +def all_compilers(scope=None): # Return compiler specs from the merged config. - return [spack.spec.CompilerSpec(s) - for s in all_compilers_config(arch, scope)] + return [spack.spec.CompilerSpec(s['spec']) + for s in all_compilers_config(scope).values()] def default_compiler(): @@ -189,37 +181,19 @@ def default_compiler(): return sorted(versions)[-1] -def find_compilers(*path): +def find_compilers(): """Return a list of compilers found in the suppied paths. - This invokes the find() method for each Compiler class, - and appends the compilers detected to a list. + This invokes the find_compilers() method for each operating + system associated with the host platform, and appends + the compilers detected to a list. """ - # Make sure path elements exist, and include /bin directories - # under prefixes. - filtered_path = [] - for p in path: - # Eliminate symlinks and just take the real directories. - p = os.path.realpath(p) - if not os.path.isdir(p): - continue - filtered_path.append(p) - - # Check for a bin directory, add it if it exists - bin = join_path(p, 'bin') - if os.path.isdir(bin): - filtered_path.append(os.path.realpath(bin)) - - # Once the paths are cleaned up, do a search for each type of - # compiler. We can spawn a bunch of parallel searches to reduce - # the overhead of spelunking all these directories. - types = all_compiler_types() - compiler_lists = parmap(lambda cls: cls.find(*filtered_path), types) - - # ensure all the version calls we made are cached in the parent - # process, as well. This speeds up Spack a lot. - clist = reduce(lambda x,y: x+y, compiler_lists) - return clist + # Find compilers for each operating system class + oss = all_os_classes() + compiler_lists = [] + for os in oss: + compiler_lists.extend(os.find_compilers()) + return compiler_lists def supported_compilers(): """Return a set of names of compilers supported by Spack. @@ -237,47 +211,60 @@ def supported(compiler_spec): @_auto_compiler_spec -def find(compiler_spec, arch=None, scope=None): +def find(compiler_spec, scope=None): """Return specs of available compilers that match the supplied compiler spec. Return an list if nothing found.""" - return [c for c in all_compilers(arch, scope) if c.satisfies(compiler_spec)] + return [c for c in all_compilers(scope) if c.satisfies(compiler_spec)] @_auto_compiler_spec -def compilers_for_spec(compiler_spec, arch=None, scope=None): +def compilers_for_spec(compiler_spec, scope=None): """This gets all compilers that satisfy the supplied CompilerSpec. Returns an empty list if none are found. """ - config = all_compilers_config(arch, scope) - - def get_compiler(cspec): - items = config[str(cspec)] - - if not all(n in items for n in _required_instance_vars): - raise InvalidCompilerConfigurationError(cspec) - - cls = class_for_compiler_name(cspec.name) - - strategy = items['strategy'] - if not strategy: - raise InvalidCompilerConfigurationError(cspec) - - compiler_paths = [] - for c in _required_instance_vars: - compiler_path = items[c] - if compiler_path != "None": - compiler_paths.append(compiler_path) + config = all_compilers_config(scope) + + def get_compilers(cspec): + compilers = [] + + for aka, cmp in config.items(): + if cmp['spec'] != str(cspec): + continue + items = cmp + alias = aka + + if not ('paths' in items and all(n in items['paths'] for n in _path_instance_vars)): + raise InvalidCompilerConfigurationError(cspec) + + cls = class_for_compiler_name(cspec.name) + + compiler_paths = [] + for c in _path_instance_vars: + compiler_path = items['paths'][c] + if compiler_path != "None": + compiler_paths.append(compiler_path) + else: + compiler_paths.append(None) + + mods = items.get('modules') + if mods == 'None': + mods = [] + + if 'operating_system' in items: + operating_system = spack.architecture._operating_system_from_dict( items['operating_system'] ) else: - compiler_paths.append(None) + operating_system = None - if 'modules' not in items: - items['modules'] = None - mods = items['modules'] + compilers.append(cls(cspec, operating_system, compiler_paths, mods, alias)) - return cls(cspec, strategy, compiler_paths, mods) + return compilers - matches = find(compiler_spec, arch, scope) - return [get_compiler(cspec) for cspec in matches] + matches = set(find(compiler_spec, scope)) + compilers = [] + for cspec in matches: + compilers.extend(get_compilers(cspec)) + return compilers +# return [get_compilers(cspec) for cspec in matches] @_auto_compiler_spec @@ -285,8 +272,9 @@ def compiler_for_spec(compiler_spec, operating_system): """Get the compiler that satisfies compiler_spec. compiler_spec must be concrete.""" assert(compiler_spec.concrete) + compilers = [c for c in compilers_for_spec(compiler_spec) - if c.strategy == operating_system.compiler_strategy] + if c.operating_system == operating_system] if len(compilers) < 1: raise NoCompilerForSpecError(compiler_spec, operating_system) if len(compilers) > 1: @@ -308,8 +296,20 @@ def class_for_compiler_name(compiler_name): return cls +def all_os_classes(): + """ + Return the list of classes for all operating systems available on + this platform + """ + classes = [] + + platform = spack.architecture.sys_type() + for os_class in platform.operating_sys.values(): + classes.append(os_class) + + return classes + def all_compiler_types(): -# return [class_for_compiler_name(c) for c in ['gcc']] return [class_for_compiler_name(c) for c in supported_compilers()] @@ -318,7 +318,7 @@ class InvalidCompilerConfigurationError(spack.error.SpackError): super(InvalidCompilerConfigurationError, self).__init__( "Invalid configuration for [compiler \"%s\"]: " % compiler_spec, "Compiler configuration must contain entries for all compilers: %s" - % _required_instance_vars) + % _path_instance_vars) class NoCompilersError(spack.error.SpackError): diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 3422e86ae8..58ea83ac4a 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -301,15 +301,11 @@ class DefaultConcretizer(object): # Should think whether this can be more efficient def _proper_compiler_style(cspec, architecture): compilers = spack.compilers.compilers_for_spec(cspec) - filter(lambda c: c.strategy == architecture.platform_os.compiler_strategy, compilers) -#if architecture.platform_os.compiler_strategy == 'PATH': - # filter(lambda c: not c.modules, compilers) - #if architecture.platform_os.compiler_strategy == 'MODULES': - # filter(lambda c: c.modules, compilers) + filter(lambda c: c.operating_system == architecture.platform_os, compilers) return compilers - all_compilers = spack.compilers.all_compilers(spec.architecture) + all_compilers = spack.compilers.all_compilers() if (spec.compiler and spec.compiler.concrete and diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index f978ed12b0..49f2b90bfc 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -151,17 +151,16 @@ section_schemas = { 'default': {}, 'additionalProperties': False, 'patternProperties': { - r'\w[\w-]*': { # architecture + r'\w[\w-]*': { # alias 'type': 'object', 'additionalProperties': False, - 'patternProperties': { - r'\w[\w-]*@\w[\w-]*': { # compiler spec + 'required': ['paths', 'spec', 'modules', 'operating_system'], + 'properties': { + 'paths': { 'type': 'object', - 'additionalProperties': False, 'required': ['cc', 'cxx', 'f77', 'fc'], - 'properties': { - 'strategy': { 'anyOf': [ {'type' : 'string' }, - {'type' : 'null' }]}, + 'additionalProperties': False, + 'properties': { 'cc': { 'anyOf': [ {'type' : 'string' }, {'type' : 'null' }]}, 'cxx': { 'anyOf': [ {'type' : 'string' }, @@ -169,13 +168,21 @@ section_schemas = { 'f77': { 'anyOf': [ {'type' : 'string' }, {'type' : 'null' }]}, 'fc': { 'anyOf': [ {'type' : 'string' }, - {'type' : 'null' }]}, - 'modules': { 'anyOf': [ {'type' : 'string'}, - {'type' : 'null' }, - {'type': 'array'}, - ]} - },},},},},},},}, - + {'type' : 'null' }]}}}, + 'spec': { 'type': 'string'},#r'\w[\w-]*@\w[\w-]*' + 'operating_system': { + 'type': 'object', + 'required': ['name', 'version'], + 'additionalProperties': False, + 'properties': { + 'name': {'type': 'string'}, + 'version': {'type': 'string'} + }}, + 'modules': { 'anyOf': [ {'type' : 'string'}, + {'type' : 'null' }, + {'type': 'array'}, + ]} + },},},},},}, 'mirrors': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack mirror configuration file schema', diff --git a/lib/spack/spack/operating_systems/cnl.py b/lib/spack/spack/operating_systems/cnl.py index 9a0bf6c194..c160a60be8 100644 --- a/lib/spack/spack/operating_systems/cnl.py +++ b/lib/spack/spack/operating_systems/cnl.py @@ -1,4 +1,11 @@ +import re +import os + from spack.architecture import OperatingSystem +from spack.util.executable import * +import spack.spec +from spack.util.multiproc import parmap +import spack.compilers class Cnl(OperatingSystem): """ Compute Node Linux (CNL) is the operating system used for the Cray XC @@ -10,4 +17,46 @@ class Cnl(OperatingSystem): def __init__(self): name = 'CNL' version = '10' - super(Cnl, self).__init__(name, version, "MODULES") + super(Cnl, self).__init__(name, version) + + + def find_compilers(self, *paths): + types = spack.compilers.all_compiler_types() + compiler_lists = parmap(lambda cmp_cls: self.find_compiler(cmp_cls, *paths), types) + + # ensure all the version calls we made are cached in the parent + # process, as well. This speeds up Spack a lot. + clist = reduce(lambda x,y: x+y, compiler_lists) + return clist + + + def find_compiler(self, cmp_cls, *paths): + compilers = [] + if cmp_cls.PrgEnv: + if not cmp_cls.PrgEnv_compiler: + tty.die('Must supply PrgEnv_compiler with PrgEnv') + + modulecmd = which('modulecmd') + modulecmd.add_default_arg('python') + + # Save the environment variable to restore later + old_modulepath = os.environ['MODULEPATH'] + # if given any explicit paths, search them for module files too + if paths: + module_paths = ':' + ':'.join(p for p in paths) + os.environ['MODULEPATH'] = module_paths + + output = modulecmd('avail', cmp_cls.PrgEnv_compiler, output=str, error=str) + matches = re.findall(r'(%s)/([\d\.]+[\d])' % cmp_cls.PrgEnv_compiler, output) + for name, version in matches: + v = version + comp = cmp_cls(spack.spec.CompilerSpec(name + '@' + v), self, + ['cc', 'CC', 'ftn'], [cmp_cls.PrgEnv, name +'/' + v]) + + compilers.append(comp) + + # Restore modulepath environment variable + if paths: + os.environ['MODULEPATH'] = old_modulepath + + return compilers diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 1ca3e58831..4cba2da9a5 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -12,8 +12,18 @@ from spack.platforms.linux import Linux from spack.platforms.bgq import Bgq from spack.platforms.darwin import Darwin -class ArchitectureTest(unittest.TestCase): +from spack.test.mock_packages_test import * +#class ArchitectureTest(unittest.TestCase): +class ArchitectureTest(MockPackagesTest): + + def setUp(self): + super(ArchitectureTest, self).setUp() + self.platform = sys_type() + + def tearDown(self): + super(ArchitectureTest, self).tearDown() + def test_dict_functions_for_architecture(self): arch = Arch() arch.platform_os = arch.platform.operating_system('default_os') @@ -34,13 +44,13 @@ class ArchitectureTest(unittest.TestCase): self.assertTrue( isinstance(new_arch.target, Target) ) - def test_platform_class_and_compiler_strategies(self): - a = CrayXc() - t = a.operating_system('default_os') - self.assertEquals(t.compiler_strategy, 'MODULES') - b = Linux() - s = b.operating_system('default_os') - self.assertEquals(s.compiler_strategy, 'PATH') +# def test_platform_class_and_compiler_strategies(self): +# a = CrayXc() +# t = a.operating_system('default_os') +# self.assertEquals(t.compiler_strategy, 'MODULES') +# b = Linux() +# s = b.operating_system('default_os') +# self.assertEquals(s.compiler_strategy, 'PATH') def test_sys_type(self): output_platform_class = sys_type() @@ -56,16 +66,13 @@ class ArchitectureTest(unittest.TestCase): self.assertEqual(str(output_platform_class), str(my_platform_class)) - def setUp(self): - self.platform = sys_type() - def test_user_front_end_input(self): """Test when user inputs just frontend that both the frontend target and frontend operating system match """ frontend_os = self.platform.operating_system("frontend") frontend_target = self.platform.target("frontend") - frontend_spec = Spec("zlib=frontend") + frontend_spec = Spec("libelf=frontend") frontend_spec.concretize() self.assertEqual(frontend_os, frontend_spec.architecture.platform_os) self.assertEqual(frontend_target, frontend_spec.architecture.target) @@ -76,7 +83,7 @@ class ArchitectureTest(unittest.TestCase): """ backend_os = self.platform.operating_system("backend") backend_target = self.platform.target("backend") - backend_spec = Spec("zlib=backend") + backend_spec = Spec("libelf=backend") backend_spec.concretize() self.assertEqual(backend_os, backend_spec.architecture.platform_os) self.assertEqual(backend_target, backend_spec.architecture.target) @@ -85,7 +92,7 @@ class ArchitectureTest(unittest.TestCase): default_os = self.platform.operating_system("default_os") default_target = self.platform.target("default_target") - default_spec = Spec("zlib") # default is no args + default_spec = Spec("libelf") # default is no args default_spec.concretize() self.assertEqual(default_os, default_spec.architecture.platform_os) self.assertEqual(default_target, default_spec.architecture.target) @@ -103,11 +110,11 @@ class ArchitectureTest(unittest.TestCase): for arch in combinations: o,t = arch arch_spec = "-".join(arch) - spec = Spec("zlib=%s" % arch_spec) + spec = Spec("libelf=%s" % arch_spec) spec.concretize() results.append(spec.architecture.platform_os == self.platform.operating_system(o)) results.append(spec.architecture.target == self.platform.target(t)) res = all(results) - print res + self.assertTrue(res) diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index 0562d2d620..2a8d642584 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -33,43 +33,91 @@ from spack.test.mock_packages_test import * # Some sample compiler config data a_comps = { - "all": { - "gcc@4.7.3" : { + 'gcc473': { + 'paths': { "cc" : "/gcc473", "cxx": "/g++473", "f77": None, - "fc" : None }, - "gcc@4.5.0" : { + "fc" : None + }, + 'modules': None, + 'spec': 'gcc@4.7.3', + 'operating_system': { + 'name': 'CNL', + 'version': '10' + } + }, + 'gcc450': { + 'paths': { "cc" : "/gcc450", "cxx": "/g++450", - "f77": "/gfortran", - "fc" : "/gfortran" }, - "clang@3.3" : { + "f77": 'gfortran', + "fc" : 'gfortran' + }, + 'modules': None, + 'spec': 'gcc@4.5.0', + 'operating_system': { + 'name': 'CNL', + 'version': '10' + } + }, + 'clang33': { + 'paths': { "cc" : "", "cxx": "", - "f77": "", - "fc" : "" } - } + "f77": '', + "fc" : '' }, + 'modules': None, + 'spec': 'clang@3.3', + 'operating_system': { + 'name': 'CNL', + 'version': '10' + } + } } b_comps = { - "all": { - "icc@10.0" : { + 'icc100': { + 'paths': { "cc" : "/icc100", - "cxx": "/icc100", + "cxx": "/icp100", "f77": None, - "fc" : None }, - "icc@11.1" : { + "fc" : None + }, + 'modules': None, + 'spec': 'icc@10.0', + 'operating_system': { + 'name': 'CNL', + 'version': '10' + } + }, + 'icc111': { + 'paths': { "cc" : "/icc111", "cxx": "/icp111", - "f77": "/ifort", - "fc" : "/ifort" }, - "clang@3.3" : { - "cc" : "/clang", - "cxx": "/clang++", - "f77": None, - "fc" : None} - } + "f77": 'ifort', + "fc" : 'ifort' + }, + 'modules': None, + 'spec': 'icc@11.1', + 'operating_system': { + 'name': 'CNL', + 'version': '10' + } + }, + 'clang33': { + 'paths': { + "cc" : "", + "cxx": "", + "f77": '', + "fc" : '' }, + 'modules': None, + 'spec': 'clang@3.3', + 'operating_system': { + 'name': 'CNL', + 'version': '10' + } + } } class ConfigTest(MockPackagesTest): @@ -96,7 +144,6 @@ class ConfigTest(MockPackagesTest): actual = config['all'][key][c] self.assertEqual(expected, actual) - def test_write_key_in_memory(self): # Write b_comps "on top of" a_comps. spack.config.update_config('compilers', a_comps, 'test_low_priority') diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 8f04076f19..612008ac58 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -36,21 +36,50 @@ from spack.spec import Spec mock_compiler_config = """\ compilers: - all: - clang@3.3: + clang3.3CNL: + spec: clang@3.3 + operating_system: + name: CNL + version: '10' + paths: + cc: /path/to/clang + cxx: /path/to/clang++ + f77: None + fc: None + modules: 'None' + clang3.3RHL: + spec: clang@3.3 + operating_system: + name: redhat + version: '6.7' + paths: cc: /path/to/clang cxx: /path/to/clang++ f77: None fc: None - strategy: PATH - modules: None - gcc@4.5.0: + modules: 'None' + gcc4.5.0CNL: + paths: + cc: /path/to/gcc + cxx: /path/to/g++ + f77: /path/to/gfortran + fc: /path/to/gfortran + operating_system: + name: CNL + version: '10' + spec: gcc@4.5.0 + modules: 'None' + gcc4.5.0RHL: + paths: cc: /path/to/gcc cxx: /path/to/g++ f77: /path/to/gfortran fc: /path/to/gfortran - strategy: PATH - modules: None + operating_system: + name: RHL + version: '6.7' + spec: gcc@4.5.0 + modules: 'None' """ mock_packages_config = """\ diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index eee65c5c09..4ed7de9c7d 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -243,7 +243,7 @@ class SpecDagTest(MockPackagesTest): if len(platform.targets) > 1: first = platform.targets.values()[0].name second = platform.targets.values()[1].name - set_pkg_dep('mpileaks', 'mpich='+first) + self.set_pkg_dep('mpileaks', 'mpich='+first) spec = Spec('mpileaks ^mpich='+ second +' ^callpath ^dyninst ^libelf ^libdwarf') self.assertRaises(spack.spec.UnsatisfiableTargetSpecError, spec.normalize) -- cgit v1.2.3-70-g09d2 From b12fb7ebc845313d404e4448c145cda4e00517f3 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 5 May 2016 10:24:32 +0200 Subject: mpi: move mpicc/mpicxx/mpifc/mpif77 to setup_dependent_package() --- var/spack/repos/builtin/packages/mpich/package.py | 2 +- var/spack/repos/builtin/packages/mvapich2/package.py | 2 ++ var/spack/repos/builtin/packages/openmpi/package.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index aaa6386df7..4b84f44bd7 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -54,12 +54,12 @@ class Mpich(Package): spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + def setup_dependent_package(self, module, dep_spec): self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') - def setup_dependent_package(self, module, dep_spec): """For dependencies, make mpicc's use spack wrapper.""" # FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers? module.mpicc = join_path(self.prefix.bin, 'mpicc') diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 3d4f2d0c68..c68a04d251 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -146,6 +146,8 @@ class Mvapich2(Package): spack_env.set('MPICH_F77', spack_f77) spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) + + def setup_dependent_package(self, module, dep_spec): self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 89a21e869c..92a5018886 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -45,6 +45,7 @@ class Openmpi(Package): spack_env.set('OMPI_FC', spack_fc) spack_env.set('OMPI_F77', spack_f77) + def setup_dependent_package(self, module, dep_spec): self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') -- cgit v1.2.3-70-g09d2 From c3bc4d6195a7f84525f117acfb68e2df5149d1ff Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 5 May 2016 10:28:04 +0200 Subject: mpich: remove module.mpicc as no formula is using it and it is a duplicate of self.spec.mpicc --- var/spack/repos/builtin/packages/mpich/package.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 4b84f44bd7..5d68f20351 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -60,10 +60,6 @@ class Mpich(Package): self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') - """For dependencies, make mpicc's use spack wrapper.""" - # FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers? - module.mpicc = join_path(self.prefix.bin, 'mpicc') - def install(self, spec, prefix): config_args = ["--prefix=" + prefix, "--enable-shared"] -- cgit v1.2.3-70-g09d2 From 2cdfe14e5a8cbdefd3533d3bb0b0ac09fa9e4fa6 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 10:47:39 +0200 Subject: compilers: make sure cxx11_flag() is defined for all compilers --- lib/spack/spack/compilers/clang.py | 11 +++++++++++ lib/spack/spack/compilers/nag.py | 6 ++++++ lib/spack/spack/compilers/pgi.py | 7 ++++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index e406d86a24..8a60ebcaed 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -47,6 +47,17 @@ class Clang(Compiler): 'f77' : 'f77', 'fc' : 'f90' } + @property + def cxx11_flag(self): + if ver.endswith('-apple'): + # FIXME: figure out from which version Apple's clang supports c++11 + return "-std=c++11" + else: + if self.version < ver('3.3'): + tty.die("Only Clang 3.3 and above support c++11.") + else: + return "-std=c++11" + @classmethod def default_version(self, comp): """The '--version' option works for clang compilers. diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py index 527a05a090..1df6b1c591 100644 --- a/lib/spack/spack/compilers/nag.py +++ b/lib/spack/spack/compilers/nag.py @@ -20,6 +20,12 @@ class Nag(Compiler): 'f77' : 'nag/nagfor', 'fc' : 'nag/nagfor' } + @property + def cxx11_flag(self): + tty.die("cxx11_flag() is not implemented for nag. Consider creating a pull-request.") + return "-std=c++11" + + @classmethod def default_version(self, comp): """The '-V' option works for nag compilers. diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py index c6a1078bd9..ebf644404b 100644 --- a/lib/spack/spack/compilers/pgi.py +++ b/lib/spack/spack/compilers/pgi.py @@ -43,6 +43,12 @@ class Pgi(Compiler): 'f77' : 'pgi/pgfortran', 'fc' : 'pgi/pgfortran' } + @property + def cxx11_flag(self): + tty.die("cxx11_flag() is not implemented for pgi. Consider creating a pull-request.") + return "-std=c++11" + + @classmethod def default_version(cls, comp): """The '-V' option works for all the PGI compilers. @@ -54,4 +60,3 @@ class Pgi(Compiler): """ return get_compiler_version( comp, '-V', r'pg[^ ]* ([^ ]+) \d\d\d?-bit target') - -- cgit v1.2.3-70-g09d2 From 9776dc0433fee264ae1fd2cbff9b16fd499fdb1a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 10:49:04 +0200 Subject: compilers: add openmp_flag() method --- lib/spack/spack/compilers/clang.py | 8 ++++++++ lib/spack/spack/compilers/gcc.py | 4 ++++ lib/spack/spack/compilers/intel.py | 6 ++++-- lib/spack/spack/compilers/nag.py | 4 ++++ lib/spack/spack/compilers/pgi.py | 4 ++++ lib/spack/spack/compilers/xl.py | 4 ++++ 6 files changed, 28 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index 8a60ebcaed..44de77af4f 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -47,6 +47,14 @@ class Clang(Compiler): 'f77' : 'f77', 'fc' : 'f90' } + @property + def openmp_flag(self): + ver = '%s' % self.version + if ver.endswith('-apple'): + tty.die("Clang from Apple does not support Openmp yet.") + else: + return "-fopenmp" + @property def cxx11_flag(self): if ver.endswith('-apple'): diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py index 2e57e44856..91c498ac82 100644 --- a/lib/spack/spack/compilers/gcc.py +++ b/lib/spack/spack/compilers/gcc.py @@ -49,6 +49,10 @@ class Gcc(Compiler): 'f77' : 'gcc/gfortran', 'fc' : 'gcc/gfortran' } + @property + def openmp_flag(self): + return "-fopenmp" + @property def cxx11_flag(self): if self.version < ver('4.3'): diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py index 69e9764790..f04a6aa899 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -43,6 +43,10 @@ class Intel(Compiler): 'f77' : 'intel/ifort', 'fc' : 'intel/ifort' } + @property + def openmp_flag(self): + return "-openmp" + @property def cxx11_flag(self): if self.version < ver('11.1'): @@ -68,5 +72,3 @@ class Intel(Compiler): """ return get_compiler_version( comp, '--version', r'\((?:IFORT|ICC)\) ([^ ]+)') - - diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py index 1df6b1c591..61486f22bd 100644 --- a/lib/spack/spack/compilers/nag.py +++ b/lib/spack/spack/compilers/nag.py @@ -20,6 +20,10 @@ class Nag(Compiler): 'f77' : 'nag/nagfor', 'fc' : 'nag/nagfor' } + @property + def openmp_flag(self): + return "-openmp" + @property def cxx11_flag(self): tty.die("cxx11_flag() is not implemented for nag. Consider creating a pull-request.") diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py index ebf644404b..299b9a7016 100644 --- a/lib/spack/spack/compilers/pgi.py +++ b/lib/spack/spack/compilers/pgi.py @@ -43,6 +43,10 @@ class Pgi(Compiler): 'f77' : 'pgi/pgfortran', 'fc' : 'pgi/pgfortran' } + @property + def openmp_flag(self): + return "-mp" + @property def cxx11_flag(self): tty.die("cxx11_flag() is not implemented for pgi. Consider creating a pull-request.") diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py index c1d55109a3..657309fe06 100644 --- a/lib/spack/spack/compilers/xl.py +++ b/lib/spack/spack/compilers/xl.py @@ -44,6 +44,10 @@ class Xl(Compiler): 'f77' : 'xl/xlf', 'fc' : 'xl/xlf90' } + @property + def openmp_flag(self): + return "-qsmp=omp" + @property def cxx11_flag(self): if self.version < ver('13.1'): -- cgit v1.2.3-70-g09d2 From c078deaab1d62d881bbed8efece779ca01c504c7 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 11:08:44 +0200 Subject: compilers: add missing import statements --- lib/spack/spack/compilers/clang.py | 2 ++ lib/spack/spack/compilers/intel.py | 2 ++ lib/spack/spack/compilers/nag.py | 1 + lib/spack/spack/compilers/pgi.py | 1 + lib/spack/spack/compilers/xl.py | 1 + 5 files changed, 7 insertions(+) diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index 44de77af4f..799b92b20d 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -26,6 +26,8 @@ import re import spack.compiler as cpr from spack.compiler import * from spack.util.executable import * +import llnl.util.tty as tty +from spack.version import ver class Clang(Compiler): # Subclasses use possible names of C compiler diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py index f04a6aa899..bc13db5dc7 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -23,6 +23,8 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack.compiler import * +import llnl.util.tty as tty +from spack.version import ver class Intel(Compiler): # Subclasses use possible names of C compiler diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py index 61486f22bd..729aed0caf 100644 --- a/lib/spack/spack/compilers/nag.py +++ b/lib/spack/spack/compilers/nag.py @@ -1,4 +1,5 @@ from spack.compiler import * +import llnl.util.tty as tty class Nag(Compiler): # Subclasses use possible names of C compiler diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py index 299b9a7016..5ab4a9d109 100644 --- a/lib/spack/spack/compilers/pgi.py +++ b/lib/spack/spack/compilers/pgi.py @@ -23,6 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack.compiler import * +import llnl.util.tty as tty class Pgi(Compiler): # Subclasses use possible names of C compiler diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py index 657309fe06..fd78abd091 100644 --- a/lib/spack/spack/compilers/xl.py +++ b/lib/spack/spack/compilers/xl.py @@ -24,6 +24,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack.compiler import * +import llnl.util.tty as tty class Xl(Compiler): # Subclasses use possible names of C compiler -- cgit v1.2.3-70-g09d2 From 3cd3052c564451f375977522e23a458edd25611a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 11:26:03 +0200 Subject: compilers: minor fixes to Clang::cxx11_flag() and Clang::openmp_flag() --- lib/spack/spack/compilers/clang.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index 799b92b20d..1f0eda3220 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -51,15 +51,16 @@ class Clang(Compiler): @property def openmp_flag(self): - ver = '%s' % self.version - if ver.endswith('-apple'): + ver_string = '%s' % self.version + if ver_string.endswith('-apple'): tty.die("Clang from Apple does not support Openmp yet.") else: return "-fopenmp" @property def cxx11_flag(self): - if ver.endswith('-apple'): + ver_string = '%s' % self.version + if ver_string.endswith('-apple'): # FIXME: figure out from which version Apple's clang supports c++11 return "-std=c++11" else: -- cgit v1.2.3-70-g09d2 From 592045cd5453f3214737de04ce489126287f52dc Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 11:28:49 +0200 Subject: compilers: make Intel::openmp_flag() return -openmp and -qopenmp based on the compiler version --- lib/spack/spack/compilers/intel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py index bc13db5dc7..9b1cf07c36 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -47,7 +47,10 @@ class Intel(Compiler): @property def openmp_flag(self): - return "-openmp" + if self.version < ver('16.0'): + return "-openmp" + else: + return "-qopenmp" @property def cxx11_flag(self): -- cgit v1.2.3-70-g09d2 From 07fd0ccc9aeb1fb47ce6bbb1353a5c5fe7cf7e9a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 12:13:31 +0200 Subject: compiler: add Clang.is_apple property which checks if Clang is from Apple or not using version --- lib/spack/spack/compilers/clang.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index 1f0eda3220..a6c9a69505 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -50,17 +50,23 @@ class Clang(Compiler): 'fc' : 'f90' } @property - def openmp_flag(self): + def is_apple(self): ver_string = '%s' % self.version if ver_string.endswith('-apple'): + return True + else: + return False + + @property + def openmp_flag(self): + if self.is_apple: tty.die("Clang from Apple does not support Openmp yet.") else: return "-fopenmp" @property def cxx11_flag(self): - ver_string = '%s' % self.version - if ver_string.endswith('-apple'): + if self.is_apple: # FIXME: figure out from which version Apple's clang supports c++11 return "-std=c++11" else: -- cgit v1.2.3-70-g09d2 From f2f1c49c90de5c1b620d7bdb7cd5ff85173fcb22 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 15:21:33 +0200 Subject: compilers: one more missing import statement --- lib/spack/spack/compilers/xl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py index fd78abd091..61a2e730dc 100644 --- a/lib/spack/spack/compilers/xl.py +++ b/lib/spack/spack/compilers/xl.py @@ -25,6 +25,7 @@ ############################################################################## from spack.compiler import * import llnl.util.tty as tty +from spack.version import ver class Xl(Compiler): # Subclasses use possible names of C compiler -- cgit v1.2.3-70-g09d2 From 6a418cfb8d60a26d1195aeb74b2d54ae9cb38616 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 17:09:49 +0200 Subject: compiler: simplify Clang.is_apple --- lib/spack/spack/compilers/clang.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index a6c9a69505..8c646905c7 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -51,11 +51,8 @@ class Clang(Compiler): @property def is_apple(self): - ver_string = '%s' % self.version - if ver_string.endswith('-apple'): - return True - else: - return False + ver_string = str(self.version) + return ver_string.endswith('-apple') @property def openmp_flag(self): -- cgit v1.2.3-70-g09d2 From d5a760776a47552aab7b8575e7ad9ac9eaba9384 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 17:26:43 +0200 Subject: compiler: add default implementation of openmp_flag() and css11_flag() --- lib/spack/spack/compiler.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 20896f9eec..a707b2e3aa 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -120,6 +120,20 @@ class Compiler(object): def version(self): return self.spec.version + # default implementation of OpenMP linking flag. + # Override in derived classes if needed + @property + def openmp_flag(self): + return "-fopenmp" + + + # default implementation of c++11 linking flag. + # raise an error to force derived classes implement it when used + @property + def cxx11_flag(self): + return "-std=c++11" + + # # Compiler classes have methods for querying the version of # specific compiler executables. This is used when discovering compilers. -- cgit v1.2.3-70-g09d2 From e28ca3922feaba84f5bc2e1b8bf6ababe964ace3 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 17:27:46 +0200 Subject: compiler: cleanup Nag.cxx11_flag and Pgi.cxx11_flag --- lib/spack/spack/compilers/nag.py | 5 ----- lib/spack/spack/compilers/pgi.py | 1 - 2 files changed, 6 deletions(-) diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py index 729aed0caf..bbc291d7b6 100644 --- a/lib/spack/spack/compilers/nag.py +++ b/lib/spack/spack/compilers/nag.py @@ -25,11 +25,6 @@ class Nag(Compiler): def openmp_flag(self): return "-openmp" - @property - def cxx11_flag(self): - tty.die("cxx11_flag() is not implemented for nag. Consider creating a pull-request.") - return "-std=c++11" - @classmethod def default_version(self, comp): diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py index 5ab4a9d109..94c6b8365c 100644 --- a/lib/spack/spack/compilers/pgi.py +++ b/lib/spack/spack/compilers/pgi.py @@ -50,7 +50,6 @@ class Pgi(Compiler): @property def cxx11_flag(self): - tty.die("cxx11_flag() is not implemented for pgi. Consider creating a pull-request.") return "-std=c++11" -- cgit v1.2.3-70-g09d2 From 30b65d3114e20506fb2d36c0aa7f34babf3c4f72 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 17:29:37 +0200 Subject: fix comment in Compiler class --- lib/spack/spack/compiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index a707b2e3aa..1f1cf97ce9 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -120,15 +120,15 @@ class Compiler(object): def version(self): return self.spec.version - # default implementation of OpenMP linking flag. + # Default implementation of OpenMP linking flag. # Override in derived classes if needed @property def openmp_flag(self): return "-fopenmp" - # default implementation of c++11 linking flag. - # raise an error to force derived classes implement it when used + # Default implementation of c++11 linking flag. + # Override in derived classes if needed @property def cxx11_flag(self): return "-std=c++11" -- cgit v1.2.3-70-g09d2 From 473a5542bed01e2f70370ddd5ceb70ac41fe178e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 18:04:08 +0200 Subject: compiler: make default openmp_flag() and cxx11_flag() die when these properties are not implemented in a derived class --- lib/spack/spack/compiler.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 1f1cf97ce9..622eed6c10 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -120,19 +120,20 @@ class Compiler(object): def version(self): return self.spec.version - # Default implementation of OpenMP linking flag. - # Override in derived classes if needed + # This property should be overridden in the compiler subclass if + # OpenMP is supported by that compiler @property def openmp_flag(self): - return "-fopenmp" + # If it is not overridden, assume it is not supported and warn the user + tty.die("The compiler you have chosen does not currently support OpenMP. If you think it should, please edit the compiler subclass and submit a pull request or issue.") - # Default implementation of c++11 linking flag. - # Override in derived classes if needed + # This property should be overridden in the compiler subclass if + # C++11 is supported by that compiler @property def cxx11_flag(self): - return "-std=c++11" - + # If it is not overridden, assume it is not supported and warn the user + tty.die("The compiler you have chosen does not currently support C++11. If you think it should, please edit the compiler subclass and submit a pull request or issue.") # # Compiler classes have methods for querying the version of -- cgit v1.2.3-70-g09d2 From ddcb97f9531c65bfc370177dfd2090c9e82a4cb3 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 19:04:42 +0200 Subject: add a temporary Nag.cxx11_flag property --- lib/spack/spack/compilers/nag.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py index bbc291d7b6..e9038c1039 100644 --- a/lib/spack/spack/compilers/nag.py +++ b/lib/spack/spack/compilers/nag.py @@ -25,6 +25,11 @@ class Nag(Compiler): def openmp_flag(self): return "-openmp" + @property + def cxx11_flag(self): + # NAG does not have a C++ compiler + # However, it can be mixed with a compiler that does support it + return "-std=c++11" @classmethod def default_version(self, comp): -- cgit v1.2.3-70-g09d2 From c6fb6bde40798903dcdd5d503c32368068a0f8e4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 3 May 2016 19:07:16 +0200 Subject: remove cxx11_flag from Compiler as it is now substituted by a property with the same name --- lib/spack/spack/compiler.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 622eed6c10..42529777bc 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -94,9 +94,6 @@ class Compiler(object): # Names of generic arguments used by this compiler arg_rpath = '-Wl,-rpath,%s' - # argument used to get C++11 options - cxx11_flag = "-std=c++11" - # argument used to get C++14 options cxx14_flag = "-std=c++1y" -- cgit v1.2.3-70-g09d2 From f84f04591be44ba6c1aa5bef50d5efa872cfb1c9 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 5 May 2016 10:48:31 +0200 Subject: substitute cxx14_flag by a property with the same name to be overridden in derived classes --- lib/spack/spack/compiler.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 42529777bc..a28d7302aa 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -94,9 +94,6 @@ class Compiler(object): # Names of generic arguments used by this compiler arg_rpath = '-Wl,-rpath,%s' - # argument used to get C++14 options - cxx14_flag = "-std=c++1y" - def __init__(self, cspec, cc, cxx, f77, fc): def check(exe): @@ -132,6 +129,14 @@ class Compiler(object): # If it is not overridden, assume it is not supported and warn the user tty.die("The compiler you have chosen does not currently support C++11. If you think it should, please edit the compiler subclass and submit a pull request or issue.") + # This property should be overridden in the compiler subclass if + # C++14 is supported by that compiler + @property + def cxx14_flag(self): + # If it is not overridden, assume it is not supported and warn the user + tty.die("The compiler you have chosen does not currently support C++14. If you think it should, please edit the compiler subclass and submit a pull request or issue.") + + # # Compiler classes have methods for querying the version of # specific compiler executables. This is used when discovering compilers. -- cgit v1.2.3-70-g09d2 From c37ea9aff548bfdf106aa141b8d6e6adec2ffd01 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 5 May 2016 11:56:58 +0200 Subject: document usage of compiler flags properties --- lib/spack/docs/packaging_guide.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 34d11308f5..31c676d4f5 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1831,6 +1831,25 @@ successfully find ``libdwarf.h`` and ``libdwarf.so``, without the packager having to provide ``--with-libdwarf=/path/to/libdwarf`` on the command line. +Compiler flags +~~~~~~~~~~~~~~ +In rare circumstances such as compiling and running small unit tests, a package +developer may need to know what are the appropriate compiler flags to enable +features like ``OpenMP``, ``c++11``, ``c++14`` and alike. To that end the +compiler classes in ``spack`` implement the following _properties_ : +``openmp_flag``, ``cxx11_flag``, ``cxx14_flag``, which can be accessed in a +package by ``self.compiler.cxx11_flag`` and alike. Note that the implementation +is such that if a given compiler version does not support this feature, an +error will be produced. Therefore package developers can also use these properties +to assert that a compiler supports the requested feature. This is handy when a +package supports additional variants like + +.. code-block:: python + + variant('openmp', default=True, description="Enable OpenMP support.") + + + Message Parsing Interface (MPI) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It is common for high performance computing software/packages to use ``MPI``. -- cgit v1.2.3-70-g09d2 From 18d2b28c498026828aab4fc2ece62b2e062d74c2 Mon Sep 17 00:00:00 2001 From: "Robert D. French" Date: Thu, 5 May 2016 10:38:35 -0400 Subject: Build and install BBCP Build and install BBCP Use correct destination for install --- var/spack/repos/builtin/packages/bbcp/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/bbcp/package.py diff --git a/var/spack/repos/builtin/packages/bbcp/package.py b/var/spack/repos/builtin/packages/bbcp/package.py new file mode 100644 index 0000000000..e9baa5ccf4 --- /dev/null +++ b/var/spack/repos/builtin/packages/bbcp/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Bbcp(Package): + """Securely and quickly copy data from source to target""" + homepage = "http://www.slac.stanford.edu/~abh/bbcp/" + + version('git', git='http://www.slac.stanford.edu/~abh/bbcp/bbcp.git', branch="master") + + def install(self, spec, prefix): + cd("src") + make() + # BBCP wants to build the executable in a directory whose name depends on the system type + makesname = Executable("../MakeSname") + bbcp_executable_path = "../bin/%s/bbcp" % makesname(output=str).rstrip("\n") + destination_path = "%s/bin/" % prefix + mkdirp(destination_path) + install(bbcp_executable_path, destination_path) -- cgit v1.2.3-70-g09d2 From 1203a14563ff8589a65def3bd99dc6a9cc399e92 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 5 May 2016 14:01:21 -0500 Subject: Remove tutorial comments --- var/spack/repos/builtin/packages/xerces-c/package.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py index e36fb936e0..bd02ddcd4b 100644 --- a/var/spack/repos/builtin/packages/xerces-c/package.py +++ b/var/spack/repos/builtin/packages/xerces-c/package.py @@ -1,19 +1,3 @@ -# FIXME: -# This is a template package file for Spack. We've conveniently -# put "FIXME" labels next to all the things you'll want to change. -# -# Once you've edited all the FIXME's, delete this whole message, -# save this file, and test out your package like this: -# -# spack install xerces-c -# -# You can always get back here to change things with: -# -# spack edit xerces-c -# -# See the spack documentation for more information on building -# packages. -# from spack import * class XercesC(Package): -- cgit v1.2.3-70-g09d2 From d45b2c794763ebdc6f660257c67319a20aa0fcab Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 5 May 2016 15:36:48 -0700 Subject: Fixed openssl to work with new syntax --- var/spack/repos/builtin/packages/openssl/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index d0c95731a2..ad64f32b76 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -11,7 +11,7 @@ class Openssl(Package): Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library.""" homepage = "http://www.openssl.org" - url = "http://www.openssl.org/source/openssl-1.0.1h.tar.gz" + url = "https://www.openssl.org/source/openssl-1.0.1h.tar.gz" version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') version('1.0.1r', '1abd905e079542ccae948af37e393d28') @@ -76,7 +76,7 @@ class Openssl(Package): # in the environment, then this will override what is set in the # Makefile, leading to build errors. env.pop('APPS', None) - if spec.satisfies("=darwin-x86_64") or spec.satisfies("=ppc64"): + if spec.satisfies("arch=darwin-x86_64") or spec.satisfies("arch=ppc64"): # This needs to be done for all 64-bit architectures (except Linux, # where it happens automatically?) env['KERNEL_BITS'] = '64' -- cgit v1.2.3-70-g09d2 From 44f089508b7b3077cad846d2f198013b089dedf0 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 5 May 2016 15:40:22 -0700 Subject: Changed other packages to fit new syntax --- var/spack/repos/builtin/packages/boost/package.py | 2 +- var/spack/repos/builtin/packages/libpciaccess/package.py | 2 +- var/spack/repos/builtin/packages/lua/package.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 12bc9508c3..605abd942e 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -103,7 +103,7 @@ class Boost(Package): dots, underscores) def determine_toolset(self, spec): - if spec.satisfies("=darwin-x86_64"): + if spec.satisfies("arch=darwin-x86_64"): return 'darwin' toolsets = {'g++': 'gcc', diff --git a/var/spack/repos/builtin/packages/libpciaccess/package.py b/var/spack/repos/builtin/packages/libpciaccess/package.py index 0c0847d323..3a58c2360c 100644 --- a/var/spack/repos/builtin/packages/libpciaccess/package.py +++ b/var/spack/repos/builtin/packages/libpciaccess/package.py @@ -13,7 +13,7 @@ class Libpciaccess(Package): def install(self, spec, prefix): # libpciaccess does not support OS X - if spec.satisfies('=darwin-x86_64'): + if spec.satisfies('arch=darwin-x86_64'): # create a dummy directory mkdir(prefix.lib) return diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index ca8cfc5365..2a0389ff68 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -22,7 +22,7 @@ class Lua(Package): depends_on('readline') def install(self, spec, prefix): - if spec.satisfies("=darwin-i686") or spec.satisfies("=darwin-x86_64"): + if spec.satisfies("arch=darwin-i686") or spec.satisfies("arch=darwin-x86_64"): target = 'macosx' else: target = 'linux' -- cgit v1.2.3-70-g09d2 From 11b62114bb69add79e5a86232562b24e42171717 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 5 May 2016 16:58:00 -0700 Subject: versioning the database --- lib/spack/spack/database.py | 7 +++++-- var/spack/repos/builtin/packages/ghostscript/package.py | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index 089d29325e..5941e1570f 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -60,7 +60,7 @@ from spack.repository import UnknownPackageError _db_dirname = '.spack-db' # DB version. This is stuck in the DB file to track changes in format. -_db_version = Version('0.9') +_db_version = Version('0.9.1') # Default timeout for spack database locks is 5 min. _db_lock_timeout = 60 @@ -250,8 +250,10 @@ class Database(object): # TODO: better version checking semantics. version = Version(db['version']) - if version != _db_version: + if version > _db_version: raise InvalidDatabaseVersionError(_db_version, version) + elif version < _db_version: + self.reindex(spack.install_layout) # Iterate through database and check each record. installs = db['installs'] @@ -343,6 +345,7 @@ class Database(object): temp_file = self._index_path + ( '.%s.%s.temp' % (socket.getfqdn(), os.getpid())) + # Write a temporary database file them move it into place try: with open(temp_file, 'w') as f: diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py index 0ab49d425f..1e6993bbd2 100644 --- a/var/spack/repos/builtin/packages/ghostscript/package.py +++ b/var/spack/repos/builtin/packages/ghostscript/package.py @@ -3,9 +3,10 @@ from spack import * class Ghostscript(Package): """an interpreter for the PostScript language and for PDF. """ homepage = "http://ghostscript.com/" - url = "http://downloads.ghostscript.com/public/ghostscript-9.16.tar.gz" + url = "http://downloads.ghostscript.com/public/old-gs-releases/ghostpdl-9.16.tar.gz" - version('9.16', '829319325bbdb83f5c81379a8f86f38f') +# version('9.16', '829319325bbdb83f5c81379a8f86f38f') + version('9.16', '818c87e31f7562aaa97397d3d0cc20a1') parallel = False -- cgit v1.2.3-70-g09d2 From 3fc1344865ef4456b75d92e0724050370a2e482b Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 5 May 2016 17:11:09 -0700 Subject: temp --- lib/spack/spack/spec.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index a702030d1c..1d79ae6430 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -817,6 +817,8 @@ class Spec(object): elif 'variants' in node: for name, value in node['variants'].items(): spec.variants[name] = VariantSpec(name, value) + for name in FlagMap.valid_compiler_flags(): + spec.compiler_flags[name] = [] else: raise SpackRecordError("Did not find a valid format for variants in YAML file") -- cgit v1.2.3-70-g09d2 From 1bb7bfaf7f8a2b8725d226f1ea2931c82178a7e9 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 5 May 2016 17:38:51 -0700 Subject: Versioning the database -- automatic reindex --- lib/spack/spack/database.py | 6 +++++- lib/spack/spack/spec.py | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index 5941e1570f..25f4f69a89 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -248,15 +248,18 @@ class Database(object): check('installs' in db, "No 'installs' in YAML DB.") check('version' in db, "No 'version' in YAML DB.") + + installs = db['installs'] + # TODO: better version checking semantics. version = Version(db['version']) if version > _db_version: raise InvalidDatabaseVersionError(_db_version, version) elif version < _db_version: self.reindex(spack.install_layout) + installs = dict((k, v.to_dict()) for k, v in self._data.items()) # Iterate through database and check each record. - installs = db['installs'] data = {} for hash_key, rec in installs.items(): try: @@ -293,6 +296,7 @@ class Database(object): """ with self.write_transaction(): + print "reindex" old_data = self._data try: self._data = {} diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 1d79ae6430..7faefabf00 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -817,8 +817,8 @@ class Spec(object): elif 'variants' in node: for name, value in node['variants'].items(): spec.variants[name] = VariantSpec(name, value) - for name in FlagMap.valid_compiler_flags(): - spec.compiler_flags[name] = [] +# for name in FlagMap.valid_compiler_flags(): +# spec.compiler_flags[name] = [] else: raise SpackRecordError("Did not find a valid format for variants in YAML file") -- cgit v1.2.3-70-g09d2 From 9a39ccea8faf6eb126bcc3c28a3f0ac696681f04 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 5 May 2016 17:49:30 -0700 Subject: Every old spec has empty compiler flags --- lib/spack/spack/spec.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 7faefabf00..0ccef6a5e5 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -756,13 +756,15 @@ class Spec(object): """ yaml_text = yaml.dump( self.to_node_dict(), default_flow_style=True, width=sys.maxint) + print yaml_text sha = hashlib.sha1(yaml_text) return base64.b32encode(sha.digest()).lower()[:length] def to_node_dict(self): 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()) ) + params.update( dict( (name, []) for name in FlagMap.valid_compiler_flags() ) ) + params.update( dict( (name, value) for name, value in self.compiler_flags.items()) ) #override d = { 'parameters' : params, 'arch' : self.architecture, @@ -817,8 +819,8 @@ class Spec(object): elif 'variants' in node: for name, value in node['variants'].items(): spec.variants[name] = VariantSpec(name, value) -# for name in FlagMap.valid_compiler_flags(): -# spec.compiler_flags[name] = [] + for name in FlagMap.valid_compiler_flags(): + spec.compiler_flags[name] = [] else: raise SpackRecordError("Did not find a valid format for variants in YAML file") -- cgit v1.2.3-70-g09d2 From db80c5e97e7fc95b08e4a38cb88ec598c2939e2c Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 5 May 2016 21:11:54 -0400 Subject: Disable -Werror This leads to problems if new compiler versions report new kinds of warnings. --- var/spack/repos/builtin/packages/binutils/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index b8064093d2..158d722046 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -29,6 +29,7 @@ class Binutils(Package): configure_args = [ '--prefix=%s' % prefix, '--disable-dependency-tracking', + '--disable-werror', '--enable-interwork', '--enable-multilib', '--enable-shared', -- cgit v1.2.3-70-g09d2 From 2f821b9e9b7ff1c2cceae2b55a7049309e6ae9c3 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 5 May 2016 18:13:56 -0700 Subject: temp --- lib/spack/spack/spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 0ccef6a5e5..8ff8281d5e 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -756,7 +756,7 @@ class Spec(object): """ yaml_text = yaml.dump( self.to_node_dict(), default_flow_style=True, width=sys.maxint) - print yaml_text +# print yaml_text sha = hashlib.sha1(yaml_text) return base64.b32encode(sha.digest()).lower()[:length] -- cgit v1.2.3-70-g09d2 From addcde4f358061053b013374bcf7400ef28acd4f Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 6 May 2016 12:05:27 -0700 Subject: Made spec hashes immutable once concrete --- lib/spack/spack/spec.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 8ff8281d5e..b71c1d680c 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -486,6 +486,7 @@ class Spec(object): self.variants = other.variants self.variants.spec = self self.namespace = other.namespace + self.hash = other.hash # Specs are by default not assumed to be normal, but in some # cases we've read them from a file want to assume normal. @@ -754,12 +755,16 @@ class Spec(object): """ Return a hash of the entire spec DAG, including connectivity. """ - yaml_text = yaml.dump( - self.to_node_dict(), default_flow_style=True, width=sys.maxint) -# print yaml_text - sha = hashlib.sha1(yaml_text) - return base64.b32encode(sha.digest()).lower()[:length] - + if self.hash: + return self.hash + else: + yaml_text = yaml.dump( + self.to_node_dict(), default_flow_style=True, width=sys.maxint) + sha = hashlib.sha1(yaml_text) + b32_hash = base64.b32encode(sha.digest()).lower()[:length] + if self._concrete: + self.hash = b32_hash + return b32_hash def to_node_dict(self): params = dict( (name, v.value) for name, v in self.variants.items() ) @@ -2128,6 +2133,7 @@ class SpecParser(spack.parse.Parser): spec.dependents = DependencyMap() spec.dependencies = DependencyMap() spec.namespace = spec_namespace + spec.hash = None spec._normal = False spec._concrete = False -- cgit v1.2.3-70-g09d2 From 9f37e4c907782ae44121a8d1c988a463df80f621 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 6 May 2016 12:05:51 -0700 Subject: Made spec hashes immutable once concrete -- improved --- lib/spack/spack/spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index b71c1d680c..b604420140 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -762,7 +762,7 @@ class Spec(object): self.to_node_dict(), default_flow_style=True, width=sys.maxint) sha = hashlib.sha1(yaml_text) b32_hash = base64.b32encode(sha.digest()).lower()[:length] - if self._concrete: + if self.concrete: self.hash = b32_hash return b32_hash -- cgit v1.2.3-70-g09d2 From bc087cfefbfa4d11e726d61fea1b85e6bace9f77 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 6 May 2016 12:28:46 -0700 Subject: Fixed database to account for hashes when reading install records --- lib/spack/spack/database.py | 4 ++++ lib/spack/spack/spec.py | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index 25f4f69a89..9b7c944bc9 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -203,6 +203,10 @@ class Database(object): spec_dict = installs[hash_key]['spec'] + # Install records don't include hash with spec, so we add it in here + # to ensure it is read properly. + spec_dict['hash'] = hash_key + # Build spec from dict first. spec = Spec.from_node_dict(spec_dict) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index b604420140..93befbec33 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -755,7 +755,8 @@ class Spec(object): """ Return a hash of the entire spec DAG, including connectivity. """ - if self.hash: + print self, "++" + if getattr(self, 'hash', None): return self.hash else: yaml_text = yaml.dump( @@ -787,6 +788,7 @@ class Spec(object): else: d['compiler'] = None d.update(self.versions.to_dict()) + return { self.name : d } @@ -810,6 +812,9 @@ class Spec(object): spec.versions = VersionList.from_dict(node) spec.architecture = node['arch'] + if 'hash' in node: + spec.hash = node['hash'] + if node['compiler'] is None: spec.compiler = None else: @@ -2121,6 +2126,8 @@ class SpecParser(spack.parse.Parser): if spec_name != '': self.check_identifier(spec_name) + print spec_name, "++" + # This will init the spec without calling __init__. spec = Spec.__new__(Spec) spec.name = spec_name -- cgit v1.2.3-70-g09d2 From 06b9433351541e9f84d85d3014d7016abbf5edc9 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 6 May 2016 12:35:43 -0700 Subject: Fixed previous commit --- lib/spack/spack/database.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index 9b7c944bc9..a7d7f0035e 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -205,7 +205,8 @@ class Database(object): # Install records don't include hash with spec, so we add it in here # to ensure it is read properly. - spec_dict['hash'] = hash_key + for name in spec_dict: + spec_dict[name]['hash'] = hash_key # Build spec from dict first. spec = Spec.from_node_dict(spec_dict) -- cgit v1.2.3-70-g09d2 From 9f212e72014e6397215bf7695695c59c710b516d Mon Sep 17 00:00:00 2001 From: "Tanzima Z. Islam" Date: Fri, 6 May 2016 13:50:34 -0700 Subject: Adding a new package file for Kripke --- var/spack/repos/builtin/packages/kripke/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/kripke/package.py diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py new file mode 100644 index 0000000000..68ccc4cb6c --- /dev/null +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -0,0 +1,16 @@ +from spack import * + +class Kripke(Package): + """Kripke is a simple, scalable, 3D Sn deterministic particle transport code.""" + + homepage = "https://codesign.llnl.gov/kripke.php" + url = "" + #version('master', git='https://lc.llnl.gov/stash/scm/kripke/kripke.git') + version('master', git='https://lc.llnl.gov/stash/scm/~islam3/kripke.git') + + def install(self, spec, prefix): + with working_dir('build', create=True): + cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', '-DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain/chaos_5_x86_64_ib-ic15.cmake', '-DENABLE_OPENMP=1', '..', *std_cmake_args) + make() + make("install") + -- cgit v1.2.3-70-g09d2 From 7bf724b1d3c92073543e8e3e72cfbf788531d401 Mon Sep 17 00:00:00 2001 From: "Cecilia W. Castillo" Date: Fri, 6 May 2016 14:14:13 -0700 Subject: add support for crypto version 5.6.1 --- var/spack/repos/builtin/packages/cryptopp/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cryptopp/package.py b/var/spack/repos/builtin/packages/cryptopp/package.py index bc83cb2b65..c2778e14da 100644 --- a/var/spack/repos/builtin/packages/cryptopp/package.py +++ b/var/spack/repos/builtin/packages/cryptopp/package.py @@ -13,6 +13,7 @@ class Cryptopp(Package): version('5.6.3', '3c5b70e2ec98b7a24988734446242d07') version('5.6.2', '7ed022585698df48e65ce9218f6c6a67') + version('5.6.1', '96cbeba0907562b077e26bcffb483828') def install(self, spec, prefix): make() -- cgit v1.2.3-70-g09d2 From c82db2116b6a1945f21d636d2981427a3bb957fe Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Fri, 6 May 2016 17:13:09 -0400 Subject: nco: Added new package --- var/spack/repos/builtin/packages/antlr/package.py | 47 +++++++++++++++++++++++ var/spack/repos/builtin/packages/nco/package.py | 30 +++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 var/spack/repos/builtin/packages/antlr/package.py create mode 100644 var/spack/repos/builtin/packages/nco/package.py diff --git a/var/spack/repos/builtin/packages/antlr/package.py b/var/spack/repos/builtin/packages/antlr/package.py new file mode 100644 index 0000000000..c7c7e3e850 --- /dev/null +++ b/var/spack/repos/builtin/packages/antlr/package.py @@ -0,0 +1,47 @@ +from spack import * + +class Antlr(Package): + + homepage = "http://www.antlr.org" + url = "https://github.com/antlr/antlr/tarball/v2.7.7" + + # NOTE: This requires that a system Java be available. + # Spack does not yet know how to install Java compilers + + # Notes from http://nco.sourceforge.net/#bld + # The first steps to build (i.e., compile, for the most part) NCO from + # source code are to install the pre-requisites: ANTLR version 2.7.7 + # (like this one not version 3.x or 4.x!) (required for ncap2)... ANTLR + # binaries from major distributions are pre-built with the source patch + # necessary to allow NCO to link to ANTLR... The ANTLR source file + # CharScanner.hpp must include this line: #include or else + # ncap2 will not compile (this tarball is already patched). + version('2.7.7', '914865e853fe8e1e61a9f23d045cb4ab', + # Patched version as described above + url='http://dust.ess.uci.edu/tmp/antlr-2.7.7.tar.gz') + # Unpatched version + # url='http://dust.ess.uci.edu/nco/antlr-2.7.7.tar.gz') + + variant('cxx', default=False, description='Enable ANTLR for C++') + variant('java', default=False, description='Enable ANTLR for Java') + variant('python', default=False, description='Enable ANTLR for Python') + variant('csharp', default=False, description='Enable ANTLR for Csharp') + + + def install(self, spec, prefix): + # Check for future enabling of variants + for v in ('+java', '+python', '+csharp'): + if v in spec: + raise Error('Illegal variant %s; for now, Spack only knows how to build antlr or antlr+cxx') + + config_args = [ + '--prefix=%s' % prefix, + '--%s-cxx' % ('enable' if '+cxx' in spec else 'disable'), + '--%s-java' % ('enable' if '+java' in spec else 'disable'), + '--%s-python' % ('enable' if '+python' in spec else 'disable'), + '--%s-csharp' % ('enable' if '+csharp' in spec else 'disable')] + + # which('autoreconf')('-iv') + configure(*config_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py new file mode 100644 index 0000000000..3a9aeaa656 --- /dev/null +++ b/var/spack/repos/builtin/packages/nco/package.py @@ -0,0 +1,30 @@ +from spack import * +import os + +class Nco(Package): + """The NCO toolkit manipulates and analyzes data stored in + netCDF-accessible formats""" + + homepage = "https://sourceforge.net/projects/nco" + url = "https://github.com/nco/nco/archive/4.5.5.tar.gz" + + version('4.5.5', '9f1f1cb149ad6407c5a03c20122223ce') + + # See "Compilation Requirements" at: + # http://nco.sourceforge.net/#bld + + depends_on('netcdf') + depends_on('antlr@2.7.7+cxx') # (required for ncap2) + depends_on('gsl') # (desirable for ncap2) + depends_on('udunits2') # (allows dimensional unit transformations) + # depends_on('opendap') # (enables network transparency), + + def install(self, spec, prefix): + opts = [ + '--prefix=%s' % prefix, + '--disable-openmp', # TODO: Make this a variant + '--disable-dap', # TODO: Make this a variant + '--disable-esmf'] + configure(*opts) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 86449790fe66f07239cd552f1ce579bf341bd1f4 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Fri, 6 May 2016 15:15:40 -0700 Subject: add pmi support and process managers to the MPIs --- var/spack/repos/builtin/packages/mpich/package.py | 4 ++++ var/spack/repos/builtin/packages/openmpi/package.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 5d68f20351..2179086fe5 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -43,6 +43,8 @@ class Mpich(Package): version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') variant('verbs', default=False, description='Build support for OpenFabrics verbs.') + variant('pmi', default=True, description='Build with PMI support') + variant('hydra', default=True, description='Build the hydra process manager') provides('mpi@:3.0', when='@3:') provides('mpi@:1.3', when='@1:') @@ -62,6 +64,8 @@ class Mpich(Package): def install(self, spec, prefix): config_args = ["--prefix=" + prefix, + "--with-pmi=" + ("yes" if '+pmi' in spec else 'no'), + "--with-pm=" + ('hydra' if '+hydra' in spec else 'no'), "--enable-shared"] # Variants diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 776fb6eeaa..d0dd2d657f 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -26,6 +26,7 @@ class Openmpi(Package): patch('configure.patch', when="@1.10.0:1.10.1") variant('psm', default=False, description='Build support for the PSM library.') + variant('pmi', default=True, description='Build support for PMI-based launchers') variant('verbs', default=False, description='Build support for OpenFabrics verbs.') # TODO : variant support for other schedulers is missing @@ -67,6 +68,9 @@ class Openmpi(Package): if '+psm' in spec: config_args.append("--with-psm") + if '+pmi' in spec: + config_args.append("--with-pmi") #TODO: let user specify directory when possible + if '+verbs' in spec: # Up through version 1.6, this option was previously named --with-openib if spec.satisfies('@:1.6'): -- cgit v1.2.3-70-g09d2 From 22afc6dadd81db12262571bddad6256c2900db64 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Fri, 6 May 2016 15:33:26 -0700 Subject: pile of dependencies for neovim, including luajit and libuv --- var/spack/repos/builtin/packages/LuaJIT/package.py | 15 +++++++++++++++ .../repos/builtin/packages/libtermkey/package.py | 17 +++++++++++++++++ var/spack/repos/builtin/packages/libuv/package.py | 21 +++++++++++++++++++++ .../repos/builtin/packages/libvterm/package.py | 12 ++++++++++++ .../repos/builtin/packages/msgpack-c/package.py | 14 ++++++++++++++ .../repos/builtin/packages/unibilium/package.py | 12 ++++++++++++ 6 files changed, 91 insertions(+) create mode 100644 var/spack/repos/builtin/packages/LuaJIT/package.py create mode 100644 var/spack/repos/builtin/packages/libtermkey/package.py create mode 100644 var/spack/repos/builtin/packages/libuv/package.py create mode 100644 var/spack/repos/builtin/packages/libvterm/package.py create mode 100644 var/spack/repos/builtin/packages/msgpack-c/package.py create mode 100644 var/spack/repos/builtin/packages/unibilium/package.py diff --git a/var/spack/repos/builtin/packages/LuaJIT/package.py b/var/spack/repos/builtin/packages/LuaJIT/package.py new file mode 100644 index 0000000000..7b2a269212 --- /dev/null +++ b/var/spack/repos/builtin/packages/LuaJIT/package.py @@ -0,0 +1,15 @@ +import os +from spack import * + +class Luajit(Package): + """Flast flexible JITed lua""" + homepage = "http://www.luajit.org" + url = "http://luajit.org/download/LuaJIT-2.0.4.tar.gz" + + version('2.0.4', 'dd9c38307f2223a504cbfb96e477eca0') + + def install(self, spec, prefix): + # Linking with the C++ compiler is a dirty hack to deal with the fact + # that unwinding symbols are not included by libc, this is necessary + # on some platforms for the final link stage to work + make("install", "PREFIX=" + prefix, "TARGET_LD=" + os.environ['CXX']) diff --git a/var/spack/repos/builtin/packages/libtermkey/package.py b/var/spack/repos/builtin/packages/libtermkey/package.py new file mode 100644 index 0000000000..7f25edaf76 --- /dev/null +++ b/var/spack/repos/builtin/packages/libtermkey/package.py @@ -0,0 +1,17 @@ +from spack import * + +class Libtermkey(Package): + """Easy keyboard entry processing for terminal programs""" + homepage = "http://www.leonerd.org.uk/code/libtermkey/" + url = "http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.18.tar.gz" + + version('0.18' , '3be2e3e5a851a49cc5e8567ac108b520') + version('0.17' , '20edb99e0d95ec1690fe90e6a555ae6d') + version('0.16' , '7a24b675aaeb142d30db28e7554987d4') + version('0.15b', '27689756e6c86c56ae454f2ac259bc3d') + version('0.14' , 'e08ce30f440f9715c459060e0e048978') + + + def install(self, spec, prefix): + make() + make("install", "PREFIX=" + prefix) diff --git a/var/spack/repos/builtin/packages/libuv/package.py b/var/spack/repos/builtin/packages/libuv/package.py new file mode 100644 index 0000000000..eace94d1a6 --- /dev/null +++ b/var/spack/repos/builtin/packages/libuv/package.py @@ -0,0 +1,21 @@ +from spack import * + +class Libuv(Package): + """Multi-platform library with a focus on asynchronous IO""" + homepage = "http://libuv.org" + url = "https://github.com/libuv/libuv/archive/v1.9.0.tar.gz" + + version('1.9.0', '14737f9c76123a19a290dabb7d1cd04c') + + depends_on('automake') + depends_on('autoconf') + depends_on('libtool') + + def install(self, spec, prefix): + bash = which("bash") + bash('autogen.sh') + configure('--prefix=%s' % prefix) + + make() + make("check") + make("install") diff --git a/var/spack/repos/builtin/packages/libvterm/package.py b/var/spack/repos/builtin/packages/libvterm/package.py new file mode 100644 index 0000000000..3212f6550d --- /dev/null +++ b/var/spack/repos/builtin/packages/libvterm/package.py @@ -0,0 +1,12 @@ +from spack import * + +class Libvterm(Package): + """An abstract library implementation of a terminal emulator""" + homepage = "http://www.leonerd.org.uk/code/libvterm/" + url = "http://www.leonerd.org.uk/code/libvterm/libvterm-0+bzr681.tar.gz" + + version('681', '7a4325a7350b7092245c04e8ee185ac3') + + def install(self, spec, prefix): + make() + make("install", "PREFIX=" + prefix) diff --git a/var/spack/repos/builtin/packages/msgpack-c/package.py b/var/spack/repos/builtin/packages/msgpack-c/package.py new file mode 100644 index 0000000000..a363bc89be --- /dev/null +++ b/var/spack/repos/builtin/packages/msgpack-c/package.py @@ -0,0 +1,14 @@ +from spack import * + +class MsgpackC(Package): + """A small, fast binary interchange format convertible to/from JSON""" + homepage = "http://www.msgpack.org" + url = "https://github.com/msgpack/msgpack-c/archive/cpp-1.4.1.tar.gz" + + version('1.4.1', 'e2fd3a7419b9bc49e5017fdbefab87e0') + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/unibilium/package.py b/var/spack/repos/builtin/packages/unibilium/package.py new file mode 100644 index 0000000000..ef5de56f79 --- /dev/null +++ b/var/spack/repos/builtin/packages/unibilium/package.py @@ -0,0 +1,12 @@ +from spack import * + +class Unibilium(Package): + """A terminfo parsing library""" + homepage = "https://github.com/mauke/unibilium" + url = "https://github.com/mauke/unibilium/archive/v1.2.0.tar.gz" + + version('1.2.0', '9b1c97839a880a373da6c097443b43c4') + + def install(self, spec, prefix): + make("PREFIX="+prefix) + make("install", "PREFIX="+prefix) -- cgit v1.2.3-70-g09d2 From 1523ebe9f7ba8f35170c7dfd2fae7b7d4f381686 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 6 May 2016 18:03:43 -0700 Subject: Working properly to display but not reuse old specs from yaml --- lib/spack/spack/spec.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 93befbec33..2b33ff3d36 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -755,8 +755,7 @@ class Spec(object): """ Return a hash of the entire spec DAG, including connectivity. """ - print self, "++" - if getattr(self, 'hash', None): + if self.hash: return self.hash else: yaml_text = yaml.dump( @@ -769,8 +768,7 @@ class Spec(object): def to_node_dict(self): params = dict( (name, v.value) for name, v in self.variants.items() ) - params.update( dict( (name, []) for name in FlagMap.valid_compiler_flags() ) ) - params.update( dict( (name, value) for name, value in self.compiler_flags.items()) ) #override + params.update( dict( (name, value) for name, value in self.compiler_flags.items()) ) d = { 'parameters' : params, 'arch' : self.architecture, @@ -1646,6 +1644,7 @@ class Spec(object): self.variants.spec = self self.external = other.external self.namespace = other.namespace + self.hash = other.hash # If we copy dependencies, preserve DAG structure in the new spec if kwargs.get('deps', True): @@ -1771,7 +1770,8 @@ class Spec(object): self.variants, self.architecture, self.compiler, - self.compiler_flags) + self.compiler_flags, + self.dag_hash()) def eq_node(self, other): @@ -2126,8 +2126,6 @@ class SpecParser(spack.parse.Parser): if spec_name != '': self.check_identifier(spec_name) - print spec_name, "++" - # This will init the spec without calling __init__. spec = Spec.__new__(Spec) spec.name = spec_name -- cgit v1.2.3-70-g09d2 From d3920564579e8ab01a7a9b96c8589d5b3608548b Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 6 May 2016 18:05:30 -0700 Subject: Cleaning up print statements for debugging --- lib/spack/spack/database.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index a7d7f0035e..ad4df980cd 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -301,7 +301,6 @@ class Database(object): """ with self.write_transaction(): - print "reindex" old_data = self._data try: self._data = {} -- cgit v1.2.3-70-g09d2 From 2d1430da130e33fdd8d8345ce9b4cbe3dbdc2871 Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Sat, 7 May 2016 18:24:24 -0400 Subject: Address all coments in @trws's latest comment in PR #869. I addressed them by factoring the code better to follow the visitor pattern. This will allow actions to be easily added in the future. These may not even be file sytsem views. One could add actions to generate shell init scripts, JSON DAG-dumpers, GraphViz DOT file generators, etc (yes, some of these are alread in there - just to give the idea). Also added is a top-level test $ source share/spack/setup-env.sh $ ./share/spack/examples/test_view.sh Read the top of that script first. --- lib/spack/spack/cmd/view.py | 280 +++++++++++++-------- share/spack/examples/test_view.sh | 31 +++ .../repos/builtin.mock/packages/test-a/package.py | 1 + .../repos/builtin.mock/packages/test-b/package.py | 1 + .../repos/builtin.mock/packages/test-c/package.py | 1 + .../repos/builtin.mock/packages/test-d/package.py | 1 + 6 files changed, 212 insertions(+), 103 deletions(-) create mode 100755 share/spack/examples/test_view.sh diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index 1bdaaecadc..31937b39a2 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -1,8 +1,3 @@ -''' -Produce a file-system "view" of a Spack DAG. - -Concept from Nix, implemented by brett.viren@gmail.com ca 2016. -''' ############################################################################## # Copyright (c) 2013, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. @@ -27,6 +22,45 @@ Concept from Nix, implemented by brett.viren@gmail.com ca 2016. # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## +'''Produce a "view" of a Spack DAG. + +A "view" is the product of applying a function on a set of package specs. + +This set consists of: + +- specs resolved from the package names given by the user (the seeds) +- all depenencies of the seeds unless user specifies `--no-depenencies` +- less any specs with names matching the regular expressions given by `--exclude` + +The `view` command provides a number of functions (the "actions"): + +- symlink :: a file system view which is a directory hierarchy that is + the union of the hierarchies of the installed packages in the DAG + where installed files are referenced via symlinks. + +- hardlink :: like the symlink view but hardlinks are used + +- statlink :: a view producing a status report of a symlink or + hardlink view. + + +The file system view concept is imspired by Nix, implemented by +brett.viren@gmail.com ca 2016. + +''' +# Implementation notes: +# +# This is implemented as a visitor pattern on the set of package specs. +# +# The command line ACTION maps to a visitor_*() function which takes +# the set of package specs and any args which may be specific to the +# ACTION. +# +# To add a new view: +# 1. add a new cmd line args sub parser ACTION +# 2. add any action-specific options/arguments, most likely a list of specs. +# 3. add a visitor_MYACTION() function +# 4. add any visitor_MYALIAS assignments to match any command line aliases import os import re @@ -38,33 +72,48 @@ import llnl.util.tty as tty description = "Produce a single-rooted directory view of a spec." -def setup_parser(subparser): - setup_parser.parser = subparser +def setup_parser(sp): + setup_parser.parser = sp + + sp.add_argument('-v','--verbose', action='store_true', default=False, + help="Display verbose output.") + sp.add_argument('-e','--exclude', action='append', default=[], + help="Exclude packages with names matching the given regex pattern.") + sp.add_argument('-d', '--dependencies', choices=['true','false','yes','no'], + default='true', + help="Follow dependencies.") - sp = subparser.add_subparsers(metavar='ACTION', dest='action') + + ssp = sp.add_subparsers(metavar='ACTION', dest='action') # The action parameterizes the command but in keeping with Spack # patterns we make it a subcommand. - sps = [ - sp.add_parser('add', aliases=['link'], - help='Add packages to the view, create view if needed.'), - sp.add_parser('remove', aliases=['rm'], - help='Remove packages from the view, and view if empty.'), - sp.add_parser('status', aliases=['check'], - help='Check status of packages in the view.') + file_system_view_actions = [ + ssp.add_parser('symlink', aliases=['add','soft'], + help='Add package files to a filesystem view via symbolic links.'), + ssp.add_parser('hardlink', aliases=['hard'], + help='Add packages files to a filesystem via via hard links.'), + ssp.add_parser('remove', aliases=['rm'], + help='Remove packages from a filesystem view.'), + ssp.add_parser('statlink', aliases=['status','check'], + help='Check status of packages in a filesystem view.') ] - # All these options and arguments are common to every action. - for p in sps: - p.add_argument('-e','--exclude', action='append', default=[], - help="exclude any packages which the given re pattern") - p.add_argument('--no-dependencies', action='store_true', default=False, - help="just operate on named packages and do not follow dependencies") - p.add_argument('prefix', nargs=1, - help="Path to a top-level directory to receive the view.") - p.add_argument('specs', nargs=argparse.REMAINDER, - help="specs of packages to expose in the view.") + for act in file_system_view_actions: + act.add_argument('path', nargs=1, + help="Path to file system view directory.") + act.add_argument('specs', metavar='spec', nargs='+', + help="Seed specs of the packages to view.") + ## Other VIEW ACTIONS might be added here. + ## Some ideas are the following (and some are redundant with existing cmds) + ## A JSON view that dumps a DAG to a JSON file + ## A DOT view that dumps to a GraphViz file + ## A SHELL INIT view that dumps bash/csh script setting up to use packages in the view + return + + +### Util functions def assuredir(path): 'Assure path exists as a directory' @@ -79,7 +128,6 @@ def relative_to(prefix, path): reldir = reldir[1:] return reldir - def transform_path(spec, path, prefix=None): 'Return the a relative path corresponding to given path spec.prefix' if os.path.isabs(path): @@ -92,54 +140,87 @@ def transform_path(spec, path, prefix=None): path = os.path.join(prefix, path) return path -def action_status(spec, prefix): - 'Check status of view in prefix against spec' - dotspack = os.path.join(prefix, '.spack', spec.name) +def purge_empty_directories(path): + 'Ascend up from the leaves accessible from `path` and remove empty directories.' + for dirpath, subdirs, files in os.walk(path, topdown=False): + for sd in subdirs: + sdp = os.path.join(dirpath,sd) + try: + os.rmdir(sdp) + except OSError: + pass + +def filter_exclude(specs, exclude): + 'Filter specs given sequence of exclude regex' + to_exclude = [re.compile(e) for e in exclude] + def exclude(spec): + for e in to_exclude: + if e.match(spec.name): + return True + return False + return [s for s in specs if not exclude(s)] + +def flatten(seeds, descend=True): + 'Normalize and flattend seed specs and descend hiearchy' + flat = set() + for spec in seeds: + if not descend: + flat.add(spec) + continue + flat.update(spec.normalized().traverse()) + return flat + + +### Action-specific helpers + +def check_one(spec, path, verbose=False): + 'Check status of view in path against spec' + dotspack = os.path.join(path, '.spack', spec.name) if os.path.exists(os.path.join(dotspack)): - tty.info("Package added: %s"%spec.name) + tty.info('Package in view: "%s"'%spec.name) return - tty.info("Package missing: %s"%spec.name) + tty.info('Package not in view: "%s"'%spec.name) return -def action_remove(spec, prefix): - 'Remove any files found in spec from prefix and purge empty directories.' +def remove_one(spec, path, verbose=False): + 'Remove any files found in `spec` from `path` and purge empty directories.' - if not os.path.exists(prefix): - return + if not os.path.exists(path): + return # done, short circuit - dotspack = transform_path(spec, '.spack', prefix) + dotspack = transform_path(spec, '.spack', path) if not os.path.exists(dotspack): - tty.info("Skipping nonexistent package %s"%spec.name) + if verbose: + tty.info('Skipping nonexistent package: "%s"'%spec.name) return - tty.info("remove %s"%spec.name) + if verbose: + tty.info('Removing package: "%s"'%spec.name) for dirpath,dirnames,filenames in os.walk(spec.prefix): if not filenames: continue - - targdir = transform_path(spec, dirpath, prefix) + targdir = transform_path(spec, dirpath, path) for fname in filenames: - src = os.path.join(dirpath, fname) dst = os.path.join(targdir, fname) if not os.path.exists(dst): - #tty.warn("Skipping nonexistent file for view: %s" % dst) continue os.unlink(dst) -def action_link(spec, prefix): - 'Symlink all files in `spec` into directory `prefix`.' +def link_one(spec, path, link = os.symlink, verbose=False): + 'Link all files in `spec` into directory `path`.' - dotspack = transform_path(spec, '.spack', prefix) + dotspack = transform_path(spec, '.spack', path) if os.path.exists(dotspack): - tty.warn("Skipping previously added package %s"%spec.name) + tty.warn('Skipping existing package: "%s"'%spec.name) return - tty.info("link %s" % spec.name) + if verbose: + tty.info('Linking package: "%s"' % spec.name) for dirpath,dirnames,filenames in os.walk(spec.prefix): if not filenames: continue # avoid explicitly making empty dirs - targdir = transform_path(spec, dirpath, prefix) + targdir = transform_path(spec, dirpath, path) assuredir(targdir) for fname in filenames: @@ -148,70 +229,63 @@ def action_link(spec, prefix): if os.path.exists(dst): if '.spack' in dst.split(os.path.sep): continue # silence these - tty.warn("Skipping existing file for view: %s" % dst) + tty.warn("Skipping existing file: %s" % dst) continue - os.symlink(src,dst) - -def purge_empty_directories(path): - 'Ascend up from the leaves accessible from `path` and remove empty directories.' - for dirpath, subdirs, files in os.walk(path, topdown=False): - for sd in subdirs: - sdp = os.path.join(dirpath,sd) - try: - os.rmdir(sdp) - except OSError: - #tty.warn("Not removing directory with contents: %s" % sdp) - pass - - + link(src,dst) -def view_action(action, parser, args): - 'The view command parameterized by the action.' - to_exclude = [re.compile(e) for e in args.exclude] - def exclude(spec): - for e in to_exclude: - if e.match(spec.name): - return True - return False - - specs = spack.cmd.parse_specs(args.specs, normalize=True, concretize=True) - if not specs: - parser.print_help() - return 1 +### The canonically named visitor_* functions and their alias maps. +### One for each action. - prefix = args.prefix[0] - assuredir(prefix) +def visitor_symlink(specs, args): + 'Symlink all files found in specs' + path = args.path[0] + assuredir(path) + for spec in specs: + link_one(spec, path, verbose=args.verbose) +visitor_add = visitor_symlink +visitor_soft = visitor_symlink + +def visitor_hardlink(specs, args): + 'Hardlink all files found in specs' + path = args.path[0] + assuredir(path) + for spec in specs: + link_one(spec, path, os.link, verbose=args.verbose) +visitor_hard = visitor_hardlink - flat = set() +def visitor_remove(specs, args): + 'Remove all files and directories found in specs from args.path' + path = args.path[0] for spec in specs: - if args.no_dependencies: - flat.add(spec) - continue - flat.update(spec.normalized().traverse()) + remove_one(spec, path, verbose=args.verbose) + purge_empty_directories(path) +visitor_rm = visitor_remove - for spec in flat: - if exclude(spec): - tty.info('Skipping excluded package: "%s"' % spec.name) - continue - if not os.path.exists(spec.prefix): - tty.warn('Skipping unknown package: %s in %s' % (spec.name, spec.prefix)) - continue - action(spec, prefix) +def visitor_statlink(specs, args): + 'Give status of view in args.path relative to specs' + path = args.path[0] + for spec in specs: + check_one(spec, path, verbose=args.verbose) +visitor_status = visitor_statlink +visitor_check = visitor_statlink - if args.action in ['remove','rm']: - purge_empty_directories(prefix) +# Finally, the actual "view" command. There should be no need to +# modify anything below when new actions are added. def view(parser, args): - 'The view command.' - action = { - 'add': action_link, - 'link': action_link, - 'remove': action_remove, - 'rm': action_remove, - 'status': action_status, - 'check': action_status - }[args.action] - view_action(action, parser, args) + 'Produce a view of a set of packages.' + + # Process common args + seeds = [spack.cmd.disambiguate_spec(s) for s in args.specs] + specs = flatten(seeds, args.dependencies.lower() in ['yes','true']) + specs = filter_exclude(specs, args.exclude) + + # Execute the visitation. + try: + visitor = globals()['visitor_' + args.action] + except KeyError: + tty.error('Unknown action: "%s"' % args.action) + visitor(specs, args) diff --git a/share/spack/examples/test_view.sh b/share/spack/examples/test_view.sh new file mode 100755 index 0000000000..b3e7102192 --- /dev/null +++ b/share/spack/examples/test_view.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# This will install a few bogus/test packages in order to test the +# `spack view` command. It assumes you have "spack" in your path. + +# It makes sub-directories in your CWD and installs and uninstalls +# Spack packages named test-*. + +set -x +set -e + +view="spack -m view -v" +for variant in +nom ~nom+var +nom+var +do + spack -m uninstall -f -a -y test-d + spack -m install test-d$variant + testdir=test_view + rm -rf $testdir + echo "hardlink may fail if Spack install area and CWD are not same FS" + for action in symlink hardlink + do + $view --dependencies=no $action $testdir test-d + $view -e test-a -e test-b $action $testdir test-d + $view $action $testdir test-d + $view status $testdir test-d + $view -d false remove $testdir test-a + $view remove $testdir test-d + rmdir $testdir # should not fail + done +done +echo "Warnings about skipping existing in the above are okay" diff --git a/var/spack/repos/builtin.mock/packages/test-a/package.py b/var/spack/repos/builtin.mock/packages/test-a/package.py index 2f72370580..ff45344b7a 100644 --- a/var/spack/repos/builtin.mock/packages/test-a/package.py +++ b/var/spack/repos/builtin.mock/packages/test-a/package.py @@ -9,6 +9,7 @@ class TestA(Package): """The test-a package""" url = 'file://'+source + homepage = "http://www.example.com/" version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') diff --git a/var/spack/repos/builtin.mock/packages/test-b/package.py b/var/spack/repos/builtin.mock/packages/test-b/package.py index db64b0a556..f6d30bb85f 100644 --- a/var/spack/repos/builtin.mock/packages/test-b/package.py +++ b/var/spack/repos/builtin.mock/packages/test-b/package.py @@ -9,6 +9,7 @@ class TestB(Package): """The test-b package""" url = 'file://'+source + homepage = "http://www.example.com/" version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') diff --git a/var/spack/repos/builtin.mock/packages/test-c/package.py b/var/spack/repos/builtin.mock/packages/test-c/package.py index 0b03037466..641e46ee50 100644 --- a/var/spack/repos/builtin.mock/packages/test-c/package.py +++ b/var/spack/repos/builtin.mock/packages/test-c/package.py @@ -9,6 +9,7 @@ class TestC(Package): """The test-c package""" url = 'file://'+source + homepage = "http://www.example.com/" version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') diff --git a/var/spack/repos/builtin.mock/packages/test-d/package.py b/var/spack/repos/builtin.mock/packages/test-d/package.py index 5cb7dcb2cb..b46c680edd 100644 --- a/var/spack/repos/builtin.mock/packages/test-d/package.py +++ b/var/spack/repos/builtin.mock/packages/test-d/package.py @@ -9,6 +9,7 @@ class TestD(Package): """The test-d package""" url = 'file://'+source + homepage = "http://www.example.com/" version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') -- cgit v1.2.3-70-g09d2 From f1900f6a7b080a6b45392d356749e2a98de46398 Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Sun, 8 May 2016 10:25:21 -0400 Subject: Add a 'print' view allowing genreation of arbitrary strings based on format using package/spec parameters. --- lib/spack/spack/cmd/view.py | 64 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index 31937b39a2..b504dfd2b1 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -38,11 +38,12 @@ The `view` command provides a number of functions (the "actions"): the union of the hierarchies of the installed packages in the DAG where installed files are referenced via symlinks. -- hardlink :: like the symlink view but hardlinks are used +- hardlink :: like the symlink view but hardlinks are used. - statlink :: a view producing a status report of a symlink or hardlink view. +- format :: a view printing one string per spec following a given format. The file system view concept is imspired by Nix, implemented by brett.viren@gmail.com ca 2016. @@ -64,6 +65,7 @@ brett.viren@gmail.com ca 2016. import os import re +import sys import argparse import spack @@ -86,6 +88,9 @@ def setup_parser(sp): ssp = sp.add_subparsers(metavar='ACTION', dest='action') + specs_opts = dict(metavar='spec', nargs='+', + help="Seed specs of the packages to view.") + # The action parameterizes the command but in keeping with Spack # patterns we make it a subcommand. file_system_view_actions = [ @@ -102,9 +107,15 @@ def setup_parser(sp): for act in file_system_view_actions: act.add_argument('path', nargs=1, help="Path to file system view directory.") - act.add_argument('specs', metavar='spec', nargs='+', - help="Seed specs of the packages to view.") + act.add_argument('specs', **specs_opts) + # The formatted print action. + act = ssp.add_parser('print', + help="Print a string to stdout based on given format") + act.add_argument('format', nargs=1, + help="Format describing per-package printout.") + act.add_argument('specs', **specs_opts) + ## Other VIEW ACTIONS might be added here. ## Some ideas are the following (and some are redundant with existing cmds) ## A JSON view that dumps a DAG to a JSON file @@ -170,6 +181,39 @@ def flatten(seeds, descend=True): flat.update(spec.normalized().traverse()) return flat +def spec2dict(spec): + 'Convert info in a spec into a simple dictionary.' + + # Expclitly convert instead of just returning spec.__dict__ as + # some things need processing or are properties. + # + pkg = spec.package + ret = dict(name = spec.name, + short = spec.short_spec, + cshort = spec.cshort_spec, # color + root = spec.root, + prefix = spec.prefix, + version = spec.version, + variants = spec.variants, + namespace = spec.namespace, + compiler = spec.compiler, + architecture = spec.architecture, + dependencies = ','.join(spec.dependencies.keys()), + dependents = ','.join(spec.dependents.keys()), + external = spec.external or "False", + hash = spec.dag_hash(), + + # package related: + url = pkg.url, + stage = pkg.stage.path, + installed = pkg.installed, + installed_dependents = ','.join([s.name for s in pkg.installed_dependents]), + build_log = pkg.build_log_path, + rpath = ':'.join(pkg.rpath), + + # ... + ) + return ret ### Action-specific helpers @@ -270,6 +314,20 @@ def visitor_statlink(specs, args): visitor_status = visitor_statlink visitor_check = visitor_statlink +def visitor_print(specs, args): + 'Print a string for each spec using args.format.' + fmt = args.format[0] + for spec in specs: + kwds = spec2dict(spec) + try: + string = fmt.format(**kwds) + except KeyError: + tty.error("Format error, use keywords: %s" % (', '.join(kwds.keys()), )) + raise + # argparser escapes these + string = string.replace(r'\n', '\n').replace(r'\t', '\t') + sys.stdout.write(string) + # Finally, the actual "view" command. There should be no need to # modify anything below when new actions are added. -- cgit v1.2.3-70-g09d2 From 72b91758c9537009de967cfe560c2a510b9c2795 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 20 Apr 2016 10:06:49 +0200 Subject: openblas: raise an error when using +openmp with clang; set +openmp to false by default --- var/spack/repos/builtin/packages/openblas/package.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 99649da9ca..14f0395c4b 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -8,13 +8,14 @@ class Openblas(Package): homepage = "http://www.openblas.net" url = "http://github.com/xianyi/OpenBLAS/archive/v0.2.15.tar.gz" + version('0.2.18', '805e7f660877d588ea7e3792cda2ee65') version('0.2.17', '664a12807f2a2a7cda4781e3ab2ae0e1') version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc') version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') - variant('shared', default=True, description="Build shared libraries as well as static libs.") - variant('openmp', default=True, description="Enable OpenMP support.") - variant('fpic', default=True, description="Build position independent code") + variant('shared', default=True, description="Build shared libraries as well as static libs.") + variant('openmp', default=False, description="Enable OpenMP support.") + variant('fpic', default=True, description="Build position independent code") # virtual dependency provides('blas') @@ -45,8 +46,13 @@ class Openblas(Package): make_defs += ['BUILD_LAPACK_DEPRECATED=1'] # Add support for OpenMP - # Note: Make sure your compiler supports OpenMP if '+openmp' in spec: + # Note: Apple's most recent Clang 7.3.0 still does not support OpenMP. + # What is worse, Openblas (as of 0.2.18) hardcoded that OpenMP cannot + # be used with any (!) compiler named clang, bummer. + if spec.satisfies('%clang'): + raise InstallError('OpenBLAS does not support OpenMP with clang!') + make_defs += ['USE_OPENMP=1'] make_args = make_defs + make_targets -- cgit v1.2.3-70-g09d2 From 95c7f4fba3477240c03019414923537b1da1a364 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sun, 8 May 2016 16:53:31 +0200 Subject: Fixes #915 --- var/spack/repos/builtin/packages/gmsh/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py index 9d759303cb..eb2981bba2 100644 --- a/var/spack/repos/builtin/packages/gmsh/package.py +++ b/var/spack/repos/builtin/packages/gmsh/package.py @@ -62,6 +62,9 @@ class Gmsh(Package): build_directory = join_path(self.stage.path, 'spack-build') source_directory = self.stage.source_path + + # Prevent GMsh from using its own strange directory structure on OSX + options.append('-DENABLE_OS_SPECIFIC_INSTALL=OFF') if '+shared' in spec: options.extend(['-DENABLE_BUILD_SHARED:BOOL=ON', -- cgit v1.2.3-70-g09d2 From 7151fd8836629d81ea350d003a7dda619c6fa1d0 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 9 May 2016 03:37:27 -0700 Subject: Restore `cc` from mainline; clean up some cflags stuff. --- lib/spack/env/cc | 58 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index cbfdb25d76..f3660272b8 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -50,9 +50,10 @@ SPACK_SHORT_SPEC" # The compiler input variables are checked for sanity later: # SPACK_CC, SPACK_CXX, SPACK_F77, SPACK_FC -# The default compiler flags are passed from the config files: -# SPACK_CFLAGS, SPACK_CXXFLAGS, SPACK_FFLAGS, SPACK_LDFLAGS, SPACK_LDLIBS -# Debug flag is optional; set to true for debug logging: +# The default compiler flags are passed from these variables: +# SPACK_CFLAGS, SPACK_CXXFLAGS, SPACK_FCFLAGS, SPACK_FFLAGS, +# SPACK_LDFLAGS, SPACK_LDLIBS +# Debug env var is optional; set to true for debug logging: # SPACK_DEBUG # Test command is used to unit test the compiler script. # SPACK_TEST_COMMAND @@ -91,24 +92,24 @@ case "$command" in cpp) mode=cpp ;; - cc|gcc|c89|c99|clang|xlc|icc|pgcc) - command=("$SPACK_CC") + cc|c89|c99|gcc|clang|icc|pgcc|xlc) + command="$SPACK_CC" language="C" lang_flags=C ;; - c++|CC|g++|clang++|xlC) - command=("$SPACK_CXX") + c++|CC|g++|clang++|icpc|pgc++|xlc++) + command="$SPACK_CXX" language="C++" lang_flags=CXX ;; - f77|xlf) - command=("$SPACK_F77") - language="Fortran 77" - lang_flags=F - ;; - fc|f90|f95|xlf90|gfortran|ifort|pgfortrn|nagfor) + f90|fc|f95|gfortran|ifort|pgfortran|xlf90|nagfor) command="$SPACK_FC" language="Fortran 90" + lang_flags=FC + ;; + f77|gfortran|ifort|pgfortran|xlf|nagfor) + command="$SPACK_F77" + language="Fortran 77" lang_flags=F ;; ld) @@ -119,8 +120,10 @@ case "$command" in ;; esac -# Check for vcheck mode -if [ -z "$mode" ]; then +# If any of the arguments below are present, then the mode is vcheck. +# In vcheck mode, nothing is added in terms of extra search paths or +# libraries. +if [[ -z $mode ]]; then for arg in "$@"; do if [[ $arg == -v || $arg == -V || $arg == --version || $arg == -dumpversion ]]; then mode=vcheck @@ -129,7 +132,7 @@ if [ -z "$mode" ]; then done fi -# Finish setting the mode +# Finish setting up the mode. if [[ -z $mode ]]; then mode=ccld for arg in "$@"; do @@ -179,35 +182,35 @@ fi input_command="$@" args=("$@") -# Prepend cppflags, cflags, cxxflags, fflags, and ldflags +# Prepend cppflags, cflags, cxxflags, fcflags, fflags, and ldflags + +# Add cppflags case "$mode" in cppas|cc|ccld) - # Add cppflags args=(${SPACK_CPPFLAGS[@]} "${args[@]}") ;; - *) - ;; esac + +# Add compile flags. case "$mode" in cc|ccld) - # Add c, cxx, and f flags + # Add c, cxx, fc, and f flags case $lang_flags in C) args=(${SPACK_CFLAGS[@]} "${args[@]}") ;; CXX) args=(${SPACK_CXXFLAGS[@]} "${args[@]}") ;; + FC) + args=(${SPACK_FCFLAGS[@]} "${args[@]}") ;; F) args=(${SPACK_FFLAGS[@]} "${args[@]}") ;; esac ;; - *) - ;; esac + +# Add ldflags case "$mode" in ld|ccld) - # Add ldflags args=(${SPACK_CPPFLAGS[@]} "${args[@]}") ;; - *) - ;; esac # Read spack dependencies from the path environment variable @@ -254,8 +257,6 @@ fi case "$mode" in ld|ccld) args=("${args[@]}" ${SPACK_LDLIBS[@]}) ;; - *) - ;; esac # @@ -287,7 +288,6 @@ for dir in "${env_path[@]}"; do done export PATH -#ifdef NEW full_command=("$command" "${args[@]}") # In test command mode, write out full command for Spack tests. -- cgit v1.2.3-70-g09d2 From 0c853ac3ea04437fd5245680bc536d4dcec3a815 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 9 May 2016 03:39:08 -0700 Subject: Make _hash private to discourage access; fix dag_hash length handling. --- lib/spack/spack/spec.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 2b33ff3d36..fa669b90c5 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -73,8 +73,8 @@ Here is the EBNF grammar for a spec:: spec = id [ options ] options = { @version-list | +variant | -variant | ~variant | %compiler | arch=architecture | [ flag ]=value} - flag = { cflags | cxxflags | fflags | cppflags | ldflags | - ldlibs } + flag = { cflags | cxxflags | fcflags | fflags | cppflags | + ldflags | ldlibs } variant = id architecture = id compiler = id [ version-list ] @@ -112,8 +112,8 @@ import spack import spack.parse import spack.error import spack.compilers as compilers -import spack.compiler as Compiler +# TODO: move display_specs to some other location. from spack.cmd.find import display_specs from spack.version import * from spack.util.string import * @@ -377,7 +377,9 @@ class VariantMap(HashableMap): return ''.join(str(self[key]) for key in sorted_keys) -_valid_compiler_flags = ['cflags', 'cxxflags', 'fflags', 'ldflags', 'ldlibs', 'cppflags'] +_valid_compiler_flags = [ + 'cflags', 'cxxflags', 'fcflags', 'fflags', 'ldflags', 'ldlibs', 'cppflags'] + class FlagMap(HashableMap): def __init__(self, spec): super(FlagMap, self).__init__() @@ -486,7 +488,7 @@ class Spec(object): self.variants = other.variants self.variants.spec = self self.namespace = other.namespace - self.hash = other.hash + self._hash = other._hash # Specs are by default not assumed to be normal, but in some # cases we've read them from a file want to assume normal. @@ -755,15 +757,15 @@ class Spec(object): """ Return a hash of the entire spec DAG, including connectivity. """ - if self.hash: - return self.hash + if self._hash: + return self._hash[:length] else: yaml_text = yaml.dump( self.to_node_dict(), default_flow_style=True, width=sys.maxint) sha = hashlib.sha1(yaml_text) b32_hash = base64.b32encode(sha.digest()).lower()[:length] if self.concrete: - self.hash = b32_hash + self._hash = b32_hash return b32_hash def to_node_dict(self): @@ -811,7 +813,7 @@ class Spec(object): spec.architecture = node['arch'] if 'hash' in node: - spec.hash = node['hash'] + spec._hash = node['hash'] if node['compiler'] is None: spec.compiler = None @@ -1644,7 +1646,7 @@ class Spec(object): self.variants.spec = self self.external = other.external self.namespace = other.namespace - self.hash = other.hash + self._hash = other._hash # If we copy dependencies, preserve DAG structure in the new spec if kwargs.get('deps', True): @@ -2047,6 +2049,7 @@ class SpecParser(spack.parse.Parser): try: while self.next: + # TODO: clean this parsing up a bit if self.previous: specs.append(self.previous.value) if self.accept(ID): @@ -2138,7 +2141,7 @@ class SpecParser(spack.parse.Parser): spec.dependents = DependencyMap() spec.dependencies = DependencyMap() spec.namespace = spec_namespace - spec.hash = None + spec._hash = None spec._normal = False spec._concrete = False -- cgit v1.2.3-70-g09d2 From 73107d6b0f24851222f59b27766742b7a8348672 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 9 May 2016 03:40:34 -0700 Subject: cleanup --- lib/spack/spack/build_environment.py | 18 +++++++++--------- lib/spack/spack/cmd/find.py | 4 ++-- lib/spack/spack/compilers/__init__.py | 1 - lib/spack/spack/concretize.py | 19 ++----------------- lib/spack/spack/database.py | 1 - 5 files changed, 13 insertions(+), 30 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index e456f11292..2c9feca8ae 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -32,11 +32,11 @@ import sys import shutil import multiprocessing import platform -from llnl.util.filesystem import * -import spack import llnl.util.tty as tty from llnl.util.filesystem import * + +import spack from spack.environment import EnvironmentModifications, validate import spack.compilers as compilers import spack.compiler as Compiler @@ -99,16 +99,16 @@ def set_compiler_environment_variables(pkg, env): flags = pkg.spec.compiler_flags # Set compiler variables used by CMake and autotools - assert all(key in pkg.compiler.link_paths for key in ('cc', 'cxx', 'f77', 'fc')) + assert all(key in compiler.link_paths for key in ('cc', 'cxx', 'f77', 'fc')) # Populate an object with the list of environment modifications # and return it # TODO : add additional kwargs for better diagnostics, like requestor, ttyout, ttyerr, etc. link_dir = spack.build_env_path - env.set('CC', join_path(link_dir, pkg.compiler.link_paths['cc'])) - env.set('CXX', join_path(link_dir, pkg.compiler.link_paths['cxx'])) - env.set('F77', join_path(link_dir, pkg.compiler.link_paths['f77'])) - env.set('FC', join_path(link_dir, pkg.compiler.link_paths['fc'])) + env.set('CC', join_path(link_dir, compiler.link_paths['cc'])) + env.set('CXX', join_path(link_dir, compiler.link_paths['cxx'])) + env.set('F77', join_path(link_dir, compiler.link_paths['f77'])) + env.set('FC', join_path(link_dir, compiler.link_paths['fc'])) # Set SPACK compiler variables so that our wrapper knows what to call if compiler.cc: @@ -119,11 +119,11 @@ def set_compiler_environment_variables(pkg, env): env.set('SPACK_F77', compiler.f77) if compiler.fc: env.set('SPACK_FC', compiler.fc) - # Add every valid compiler flag to the environment, prefaced by "SPACK_" + # Add every valid compiler flag to the environment, prefixed with "SPACK_" for flag in spack.spec.FlagMap.valid_compiler_flags(): # Concreteness guarantees key safety here if flags[flag] != []: - env.set('SPACK_'+flag.upper(), ' '.join(f for f in flags[flag])) + env.set('SPACK_' + flag.upper(), ' '.join(f for f in flags[flag])) env.set('SPACK_COMPILER_SPEC', str(pkg.spec.compiler)) return env diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index ef582a1680..b0e719c2db 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -93,10 +93,10 @@ def display_specs(specs, **kwargs): hlen = None nfmt = '.' if namespace else '_' - format_string = '$%s$@$+' %nfmt + format_string = '$%s$@$+' % nfmt flags = kwargs.get('show_flags', False) if flags: - format_string = '$.$@$%+$+' if nfmt == '.' else '$_$@$%+$+' + format_string = '$%s$@$%%+$+' % nfmt # Make a dict with specs keyed by architecture and compiler. index = index_by(specs, ('architecture', 'compiler')) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index d625949ceb..ca296d433f 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -39,7 +39,6 @@ import spack.config import spack.architecture from spack.util.multiproc import parmap -import spack.compiler as Comp from spack.compiler import Compiler from spack.util.executable import which from spack.util.naming import mod_to_class diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 6c0fda2d59..507052fe34 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -43,7 +43,6 @@ from functools import partial from spec import DependencyMap from itertools import chain from spack.config import * -import spack.compiler as Compiler class DefaultConcretizer(object): @@ -279,8 +278,6 @@ class DefaultConcretizer(object): """ ret = False for flag in spack.spec.FlagMap.valid_compiler_flags(): -# if flag in spec.compiler_flags: -# continue try: nearest = next(p for p in spec.traverse(direction='parents') if ((p.compiler == spec.compiler and p is not spec) @@ -317,7 +314,8 @@ class DefaultConcretizer(object): if compiler.flags[flag] != []: ret = True else: - if (sorted(spec.compiler_flags[flag]) != sorted(compiler.flags[flag])) and (not set(spec.compiler_flags[flag]) >= set(compiler.flags[flag])): + if ((sorted(spec.compiler_flags[flag]) != sorted(compiler.flags[flag])) and + (not set(spec.compiler_flags[flag]) >= set(compiler.flags[flag]))): ret = True spec.compiler_flags[flag] = list(set(spec.compiler_flags[flag]) | set(compiler.flags[flag])) @@ -325,19 +323,6 @@ class DefaultConcretizer(object): return ret -# def choose_provider(self, spec, providers): -# """This is invoked for virtual specs. Given a spec with a virtual name, -# say "mpi", and a list of specs of possible providers of that spec, -# select a provider and return it. -# """ -# assert(spec.virtual) -# assert(providers) -# index = spack.spec.index_specs(providers) -# first_key = sorted(index.keys())[0] -# latest_version = sorted(index[first_key])[-1] -# return latest_version - - def find_spec(spec, condition): """Searches the dag from spec in an intelligent order and looks for a spec that matches a condition""" diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index ad4df980cd..dd3893514c 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -353,7 +353,6 @@ class Database(object): temp_file = self._index_path + ( '.%s.%s.temp' % (socket.getfqdn(), os.getpid())) - # Write a temporary database file them move it into place try: with open(temp_file, 'w') as f: -- cgit v1.2.3-70-g09d2 From 6e07f46df89ef272357a2aa42bfaf4c4d60e0dfe Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Mon, 9 May 2016 14:02:41 +0200 Subject: add missing m4 dependency to bison --- var/spack/repos/builtin/packages/bison/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py index 7c526fb958..9a2ddcbf96 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -10,6 +10,8 @@ class Bison(Package): version('3.0.4', 'a586e11cd4aff49c3ff6d3b6a4c9ccf8') + depends_on("m4") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 970196d825237b96fdf27ecdbeb07bcf49580fff Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Mon, 9 May 2016 14:23:07 +0200 Subject: GMsh: Fix binary linking against its own libraries GMsh binary now links against full path name of libraries. This fixes problems, such as `dyld: Library not loaded: libGmsh.2.11.dylib`, when running the executable. --- var/spack/repos/builtin/packages/gmsh/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py index eb2981bba2..5f659c56df 100644 --- a/var/spack/repos/builtin/packages/gmsh/package.py +++ b/var/spack/repos/builtin/packages/gmsh/package.py @@ -62,7 +62,9 @@ class Gmsh(Package): build_directory = join_path(self.stage.path, 'spack-build') source_directory = self.stage.source_path - + + options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) + # Prevent GMsh from using its own strange directory structure on OSX options.append('-DENABLE_OS_SPECIFIC_INSTALL=OFF') -- cgit v1.2.3-70-g09d2 From 7a2d65967ce60efef1a5cce4969f3607915427f5 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 9 May 2016 22:04:34 +0200 Subject: wrap tty.die to 80 chars --- lib/spack/spack/compiler.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index a28d7302aa..b53c17494c 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -119,7 +119,9 @@ class Compiler(object): @property def openmp_flag(self): # If it is not overridden, assume it is not supported and warn the user - tty.die("The compiler you have chosen does not currently support OpenMP. If you think it should, please edit the compiler subclass and submit a pull request or issue.") + tty.die("The compiler you have chosen does not currently support OpenMP.", + "If you think it should, please edit the compiler subclass and", + "submit a pull request or issue.") # This property should be overridden in the compiler subclass if @@ -127,14 +129,20 @@ class Compiler(object): @property def cxx11_flag(self): # If it is not overridden, assume it is not supported and warn the user - tty.die("The compiler you have chosen does not currently support C++11. If you think it should, please edit the compiler subclass and submit a pull request or issue.") + tty.die("The compiler you have chosen does not currently support C++11.", + "If you think it should, please edit the compiler subclass and", + "submit a pull request or issue.") + # This property should be overridden in the compiler subclass if # C++14 is supported by that compiler @property def cxx14_flag(self): # If it is not overridden, assume it is not supported and warn the user - tty.die("The compiler you have chosen does not currently support C++14. If you think it should, please edit the compiler subclass and submit a pull request or issue.") + tty.die("The compiler you have chosen does not currently support C++14.", + "If you think it should, please edit the compiler subclass and", + "submit a pull request or issue.") + # -- cgit v1.2.3-70-g09d2 From 3948b082ad7f5eecc3b1078a2944f226a9a7ae87 Mon Sep 17 00:00:00 2001 From: Ben Couturier Date: Mon, 9 May 2016 22:32:46 +0200 Subject: Added gdb 7.11 --- var/spack/repos/builtin/packages/gdb/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py index b346fe80c2..0e9e8fc099 100644 --- a/var/spack/repos/builtin/packages/gdb/package.py +++ b/var/spack/repos/builtin/packages/gdb/package.py @@ -34,6 +34,7 @@ class Gdb(Package): homepage = "https://www.gnu.org/software/gdb" url = "http://ftp.gnu.org/gnu/gdb/gdb-7.10.tar.gz" + version('7.11', 'f585059252836a981ea5db9a5f8ce97f') version('7.10.1', 'b93a2721393e5fa226375b42d567d90b') version('7.10', 'fa6827ad0fd2be1daa418abb11a54d86') version('7.9.1', 'f3b97de919a9dba84490b2e076ec4cb0') -- cgit v1.2.3-70-g09d2 From 7e6be184bc51060a3df79e35991a6018149e439f Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Fri, 22 Apr 2016 14:50:19 -0700 Subject: Updated and fixed the Scotch package. - Fixed a bug that was causing shared library usage to fail when linking with another application. - Updated the repository URL to allow for more general version downloading. - Added installation support for version 5.1.10b. - Cleaned up the installation file to make it a bit easier to follow and modify. --- var/spack/repos/builtin/packages/scotch/package.py | 118 +++++++++++---------- 1 file changed, 61 insertions(+), 57 deletions(-) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 8229ed8686..6f8c8d2706 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -4,85 +4,90 @@ import os class Scotch(Package): """Scotch is a software package for graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering.""" + homepage = "http://www.labri.fr/perso/pelegrin/scotch/" - url = "http://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz" + url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.3.tar.gz" list_url = "http://gforge.inria.fr/frs/?group_id=248" version('6.0.3', '10b0cc0f184de2de99859eafaca83cfc') + version('5.1.10b', '9b8622b39c141ecaca4a46298486fd99') variant('mpi', default=False, description='Activate the compilation of PT-Scotch') variant('compression', default=True, description='Activate the posibility to use compressed files') variant('esmumps', default=False, description='Activate the compilation of the lib esmumps needed by mumps') variant('shared', default=True, description='Build shared libraries') - depends_on('mpi', when='+mpi') - depends_on('zlib', when='+compression') depends_on('flex') depends_on('bison') + depends_on('mpi', when='+mpi') + depends_on('zlib', when='+compression') - def compiler_specifics(self, makefile_inc, defines): - if self.compiler.name == 'gcc': - defines.append('-Drestrict=__restrict') - elif self.compiler.name == 'intel': - defines.append('-restrict') + def validate(self, spec): + # NOTE : Scotch v6.0.0 and older have separate tar files for their esmumps- + # compatible versions. In any normal circumstance, it would be better just + # to use these tar files since they're more comprehensive, but they + # unfortunately have very strange URLs that are non-uniform. For the time + # being, I'm going to just use the '~esmumps' URLs that are uniform for + # the sake of simplicity. + if spec.satisfies('@:6.0.0') and '+esmumps' in spec: + raise RuntimeError('The "+esmumps" variant is only supported for Scotch v6.0.1+.') - makefile_inc.append('CCS = $(CC)') + def patch(self): + makefile_inc = [] + cflags = [ + '-O3', + '-DCOMMON_RANDOM_FIXED_SEED', + '-DSCOTCH_DETERMINISTIC', + '-DSCOTCH_RENAME', + '-DIDXSIZE64' + ] - if '+mpi' in self.spec: + ## Library Build Type ## + + if '+shared' in self.spec: makefile_inc.extend([ - 'CCP = %s' % os.path.join(self.spec['mpi'].prefix.bin, 'mpicc'), - 'CCD = $(CCP)' - ]) + 'LIB = .so', + 'CLIBFLAGS = -shared -fPIC', + 'RANLIB = echo', + 'AR = $(CC)', + 'ARFLAGS = -shared $(LDFLAGS) -o' + ]) + cflags.append('-fPIC') else: makefile_inc.extend([ - 'CCP = mpicc', # It is set but not used - 'CCD = $(CCS)' - ]) + 'LIB = .a', + 'CLIBFLAGS = ', + 'RANLIB = ranlib', + 'AR = ar', + 'ARFLAGS = -ruv ' + ]) + ## Compiler-Specific Options ## + if self.compiler.name == 'gcc': + cflags.append('-Drestrict=__restrict') + elif self.compiler.name == 'intel': + cflags.append('-restrict') - def library_build_type(self, makefile_inc, defines): - makefile_inc.extend([ - 'LIB = .a', - 'CLIBFLAGS = ', - 'RANLIB = ranlib', - 'AR = ar', - 'ARFLAGS = -ruv ' - ]) + makefile_inc.append('CCS = $(CC)') + makefile_inc.append('CCP = %s' % + (os.path.join(self.spec['mpi'].prefix.bin, 'mpicc') if '+mpi' in self.spec else 'mpicc')) + makefile_inc.append('CCD = $(CCS)') - @when('+shared') - def library_build_type(self, makefile_inc, defines): - makefile_inc.extend([ - 'LIB = .so', - 'CLIBFLAGS = -shared -fPIC', - 'RANLIB = echo', - 'AR = $(CC)', - 'ARFLAGS = -shared $(LDFLAGS) -o' - ]) + ## Extra Features ## - def extra_features(self, makefile_inc, defines): ldflags = [] - + if '+compression' in self.spec: - defines.append('-DCOMMON_FILE_COMPRESS_GZ') + cflags.append('-DCOMMON_FILE_COMPRESS_GZ') ldflags.append('-L%s -lz' % (self.spec['zlib'].prefix.lib)) - defines.append('-DCOMMON_PTHREAD') + cflags.append('-DCOMMON_PTHREAD') ldflags.append('-lm -lrt -pthread') - - makefile_inc.append('LDFLAGS = %s' % ' '.join(ldflags)) - def patch(self): - makefile_inc = [] - defines = [ - '-DCOMMON_RANDOM_FIXED_SEED', - '-DSCOTCH_DETERMINISTIC', - '-DSCOTCH_RENAME', - '-DIDXSIZE64' ] + makefile_inc.append('LDFLAGS = %s' % ' '.join(ldflags)) - self.library_build_type(makefile_inc, defines) - self.compiler_specifics(makefile_inc, defines) - self.extra_features(makefile_inc, defines) + ## General Features ## makefile_inc.extend([ 'EXE =', @@ -93,18 +98,19 @@ class Scotch(Package): 'MKDIR = mkdir', 'MV = mv', 'CP = cp', - 'CFLAGS = -O3 %s' % (' '.join(defines)), + 'CFLAGS = %s' % ' '.join(cflags), 'LEX = %s -Pscotchyy -olex.yy.c' % os.path.join(self.spec['flex'].prefix.bin , 'flex'), 'YACC = %s -pscotchyy -y -b y' % os.path.join(self.spec['bison'].prefix.bin, 'bison'), - 'prefix = %s' % self.prefix, - '' + 'prefix = %s' % self.prefix ]) with working_dir('src'): with open('Makefile.inc', 'w') as fh: fh.write('\n'.join(makefile_inc)) - + def install(self, spec, prefix): + self.validate(spec) + targets = ['scotch'] if '+mpi' in self.spec: targets.append('ptscotch') @@ -115,12 +121,10 @@ class Scotch(Package): targets.append('ptesmumps') with working_dir('src'): - for app in targets: - make(app, parallel=(not app=='ptesmumps')) + for target in targets: + make(target, parallel=(target!='ptesmumps')) - install_tree('bin', prefix.bin) install_tree('lib', prefix.lib) install_tree('include', prefix.include) install_tree('man/man1', prefix.share_man1) - -- cgit v1.2.3-70-g09d2 From 88d2f6b83a46edb407397193fe5294d1303070a0 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Fri, 29 Apr 2016 11:44:38 -0700 Subject: Enabled the '+esmumps' variant for 'scotch@:6.0.0'. Added support for 'scotch@6.0.0'. --- .../repos/builtin/packages/scotch/Makefile.esmumps | 5 ++ var/spack/repos/builtin/packages/scotch/package.py | 58 +++++++++++++++++----- 2 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 var/spack/repos/builtin/packages/scotch/Makefile.esmumps diff --git a/var/spack/repos/builtin/packages/scotch/Makefile.esmumps b/var/spack/repos/builtin/packages/scotch/Makefile.esmumps new file mode 100644 index 0000000000..4bfc760197 --- /dev/null +++ b/var/spack/repos/builtin/packages/scotch/Makefile.esmumps @@ -0,0 +1,5 @@ +esmumps : scotch + (cd esmumps ; $(MAKE) scotch && $(MAKE) install) + +ptesmumps : ptscotch + (cd esmumps ; $(MAKE) ptscotch && $(MAKE) ptinstall) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 6f8c8d2706..5820e826de 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -1,16 +1,18 @@ from spack import * -import os +import os, re class Scotch(Package): """Scotch is a software package for graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering.""" homepage = "http://www.labri.fr/perso/pelegrin/scotch/" - url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.3.tar.gz" + url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.3.tar.gz" + base_url = "http://gforge.inria.fr/frs/download.php/latestfile/298" list_url = "http://gforge.inria.fr/frs/?group_id=248" version('6.0.3', '10b0cc0f184de2de99859eafaca83cfc') - version('5.1.10b', '9b8622b39c141ecaca4a46298486fd99') + version('6.0.0', 'c50d6187462ba801f9a82133ee666e8e') + version('5.1.10b', 'f587201d6cf5cf63527182fbfba70753') variant('mpi', default=False, description='Activate the compilation of PT-Scotch') variant('compression', default=True, description='Activate the posibility to use compressed files') @@ -22,17 +24,47 @@ class Scotch(Package): depends_on('mpi', when='+mpi') depends_on('zlib', when='+compression') - def validate(self, spec): - # NOTE : Scotch v6.0.0 and older have separate tar files for their esmumps- - # compatible versions. In any normal circumstance, it would be better just - # to use these tar files since they're more comprehensive, but they - # unfortunately have very strange URLs that are non-uniform. For the time - # being, I'm going to just use the '~esmumps' URLs that are uniform for - # the sake of simplicity. - if spec.satisfies('@:6.0.0') and '+esmumps' in spec: - raise RuntimeError('The "+esmumps" variant is only supported for Scotch v6.0.1+.') + # NOTE: Versions of Scotch up to version 6.0.0 don't include support for + # building with 'esmumps' in their default packages. In order to enable + # support for this feature, we must grab the 'esmumps' enabled archives + # from the Scotch hosting site. These alternative archives include a strict + # superset of the behavior in their default counterparts, so we choose to + # always grab these versions for older Scotch versions for simplicity. + @when('@:6.0.0') + def url_for_version(self, version): + return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version) + + @when('@6.0.1:') + def url_for_version(self, version): + return super(Scotch, self).url_for_version(version) + + # NOTE: Several of the 'esmumps' enabled Scotch releases up to version 6.0.0 + # have broken build scripts that don't properly build 'esmumps' as a separate + # target, so we need a patch procedure to remove 'esmumps' from existing targets + # and to add it as a standalone target. + @when('@:6.0.0') + def patch(self): + makefile_path = os.path.join('src', 'Makefile') + with open(makefile_path, 'r') as makefile: + esmumps_enabled = any(re.search(r'^esmumps(\s*):(.*)$', line) for line in makefile.readlines()) + + if not esmumps_enabled: + mff = FileFilter(makefile_path) + mff.filter(r'^.*((esmumps)|(ptesmumps)).*(install).*$', '') + makefile_esmumps_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Makefile.esmumps') + with open(makefile_path, 'a') as makefile: + makefile.write('\ninclude %s\n' % makefile_esmumps_path) + + @when('@6.0.1:') def patch(self): + pass + + # NOTE: Configuration of Scotch is achieved by writing a 'Makefile.inc' file + # that contains all of the configuration variables and their desired values + # for the installation. This function writes this file based on the given + # installation variants. + def configure(self): makefile_inc = [] cflags = [ '-O3', @@ -109,7 +141,7 @@ class Scotch(Package): fh.write('\n'.join(makefile_inc)) def install(self, spec, prefix): - self.validate(spec) + self.configure() targets = ['scotch'] if '+mpi' in self.spec: -- cgit v1.2.3-70-g09d2 From ceab445b9fe371d50703c599ec2cf742f6199f41 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Mon, 9 May 2016 14:39:42 -0700 Subject: Integrated improvements from PR #893 to remove hardcoded MPI path. --- var/spack/repos/builtin/packages/scotch/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 5820e826de..8fad74b24f 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -103,7 +103,7 @@ class Scotch(Package): makefile_inc.append('CCS = $(CC)') makefile_inc.append('CCP = %s' % - (os.path.join(self.spec['mpi'].prefix.bin, 'mpicc') if '+mpi' in self.spec else 'mpicc')) + (self.spec['mpi'].mpicc if '+mpi' in self.spec else 'mpicc')) makefile_inc.append('CCD = $(CCS)') ## Extra Features ## -- cgit v1.2.3-70-g09d2 From 4473311bdbddb6abe2f1ad9748536db89f79081d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 5 May 2016 10:50:07 -0500 Subject: Allow compilers to specify their own rpath linking flags --- lib/spack/env/cc | 39 +++++++++++++++++++++++++----------- lib/spack/spack/build_environment.py | 14 +++++++++---- lib/spack/spack/compiler.py | 18 +++++++++++++++-- lib/spack/spack/compilers/nag.py | 11 ++++++++++ lib/spack/spack/test/cc.py | 5 +++++ 5 files changed, 69 insertions(+), 18 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index cb07a2ffea..4564e84bd2 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -38,15 +38,20 @@ # -Wl,-rpath arguments for dependency /lib directories. # -# This is the list of environment variables that need to be set before +# This is an array of environment variables that need to be set before # the script runs. They are set by routines in spack.build_environment # as part of spack.package.Package.do_install(). -parameters=" -SPACK_PREFIX -SPACK_ENV_PATH -SPACK_DEBUG_LOG_DIR -SPACK_COMPILER_SPEC -SPACK_SHORT_SPEC" +parameters=( + SPACK_PREFIX + SPACK_ENV_PATH + SPACK_DEBUG_LOG_DIR + SPACK_COMPILER_SPEC + SPACK_CC_RPATH_ARG + SPACK_CXX_RPATH_ARG + SPACK_F77_RPATH_ARG + SPACK_FC_RPATH_ARG + SPACK_SHORT_SPEC +) # The compiler input variables are checked for sanity later: # SPACK_CC, SPACK_CXX, SPACK_F77, SPACK_FC @@ -64,7 +69,7 @@ function die { exit 1 } -for param in $parameters; do +for param in ${parameters[@]}; do if [[ -z ${!param} ]]; then die "Spack compiler must be run from Spack! Input '$param' is missing." fi @@ -85,6 +90,7 @@ done # ccld compile & link command=$(basename "$0") +comp="CC" case "$command" in cpp) mode=cpp @@ -92,18 +98,22 @@ case "$command" in cc|c89|c99|gcc|clang|icc|pgcc|xlc) command="$SPACK_CC" language="C" + comp="CC" ;; c++|CC|g++|clang++|icpc|pgc++|xlc++) command="$SPACK_CXX" language="C++" + comp="CXX" ;; f90|fc|f95|gfortran|ifort|pgfortran|xlf90|nagfor) command="$SPACK_FC" language="Fortran 90" + comp="FC" ;; f77|gfortran|ifort|pgfortran|xlf|nagfor) command="$SPACK_F77" language="Fortran 77" + comp="F77" ;; ld) mode=ld @@ -142,6 +152,9 @@ if [[ -z $mode ]]; then done fi +# Set up rpath variable according to language. +eval rpath=\$SPACK_${comp}_RPATH_ARG + # Dump the version and exit if we're in testing mode. if [[ $SPACK_TEST_COMMAND == dump-mode ]]; then echo "$mode" @@ -188,7 +201,7 @@ for dep in "${deps[@]}"; do # Prepend lib and RPATH directories if [[ -d $dep/lib ]]; then if [[ $mode == ccld ]]; then - $add_rpaths && args=("-Wl,-rpath,$dep/lib" "${args[@]}") + $add_rpaths && args=("$rpath$dep/lib" "${args[@]}") args=("-L$dep/lib" "${args[@]}") elif [[ $mode == ld ]]; then $add_rpaths && args=("-rpath" "$dep/lib" "${args[@]}") @@ -199,7 +212,7 @@ for dep in "${deps[@]}"; do # Prepend lib64 and RPATH directories if [[ -d $dep/lib64 ]]; then if [[ $mode == ccld ]]; then - $add_rpaths && args=("-Wl,-rpath,$dep/lib64" "${args[@]}") + $add_rpaths && args=("$rpath$dep/lib64" "${args[@]}") args=("-L$dep/lib64" "${args[@]}") elif [[ $mode == ld ]]; then $add_rpaths && args=("-rpath" "$dep/lib64" "${args[@]}") @@ -210,9 +223,11 @@ done # Include all -L's and prefix/whatever dirs in rpath if [[ $mode == ccld ]]; then - $add_rpaths && args=("-Wl,-rpath,$SPACK_PREFIX/lib" "-Wl,-rpath,$SPACK_PREFIX/lib64" "${args[@]}") + $add_rpaths && args=("$rpath$SPACK_PREFIX/lib64" "${args[@]}") + $add_rpaths && args=("$rpath$SPACK_PREFIX/lib" "${args[@]}") elif [[ $mode == ld ]]; then - $add_rpaths && args=("-rpath" "$SPACK_PREFIX/lib" "-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") + $add_rpaths && args=("-rpath" "$SPACK_PREFIX/lib64" "${args[@]}") + $add_rpaths && args=("-rpath" "$SPACK_PREFIX/lib" "${args[@]}") fi # diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index eb72f2a6b4..411425549a 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -98,21 +98,27 @@ def set_compiler_environment_variables(pkg, env): # and return it # TODO : add additional kwargs for better diagnostics, like requestor, ttyout, ttyerr, etc. link_dir = spack.build_env_path - env.set('CC', join_path(link_dir, pkg.compiler.link_paths['cc'])) + env.set('CC', join_path(link_dir, pkg.compiler.link_paths['cc'])) env.set('CXX', join_path(link_dir, pkg.compiler.link_paths['cxx'])) env.set('F77', join_path(link_dir, pkg.compiler.link_paths['f77'])) - env.set('FC', join_path(link_dir, pkg.compiler.link_paths['fc'])) + env.set('FC', join_path(link_dir, pkg.compiler.link_paths['fc'])) # Set SPACK compiler variables so that our wrapper knows what to call compiler = pkg.compiler if compiler.cc: - env.set('SPACK_CC', compiler.cc) + env.set('SPACK_CC', compiler.cc) if compiler.cxx: env.set('SPACK_CXX', compiler.cxx) if compiler.f77: env.set('SPACK_F77', compiler.f77) if compiler.fc: - env.set('SPACK_FC', compiler.fc) + env.set('SPACK_FC', compiler.fc) + + # Set SPACK compiler rpath flags so that our wrapper knows what to use + env.set('SPACK_CC_RPATH_ARG', compiler.cc_rpath_arg) + env.set('SPACK_CXX_RPATH_ARG', compiler.cxx_rpath_arg) + env.set('SPACK_F77_RPATH_ARG', compiler.f77_rpath_arg) + env.set('SPACK_FC_RPATH_ARG', compiler.fc_rpath_arg) env.set('SPACK_COMPILER_SPEC', str(pkg.spec.compiler)) return env diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index b53c17494c..8c197520b5 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -91,8 +91,22 @@ class Compiler(object): # version suffix for gcc. suffixes = [r'-.*'] - # Names of generic arguments used by this compiler - arg_rpath = '-Wl,-rpath,%s' + # Flags used by this compiler to set an rpath + @property + def cc_rpath_arg(self): + return '-Wl,-rpath,' + + @property + def cxx_rpath_arg(self): + return '-Wl,-rpath,' + + @property + def f77_rpath_arg(self): + return '-Wl,-rpath,' + + @property + def fc_rpath_arg(self): + return '-Wl,-rpath,' def __init__(self, cspec, cc, cxx, f77, fc): diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py index e9038c1039..49b77eae6b 100644 --- a/lib/spack/spack/compilers/nag.py +++ b/lib/spack/spack/compilers/nag.py @@ -31,6 +31,17 @@ class Nag(Compiler): # However, it can be mixed with a compiler that does support it return "-std=c++11" + # Unlike other compilers, the NAG compiler passes options to GCC, which + # then passes them to the linker. Therefore, we need to doubly wrap the + # options with '-Wl,-Wl,,' + @property + def f77_rpath_arg(self): + return '-Wl,-Wl,,-rpath,' + + @property + def fc_rpath_arg(self): + return '-Wl,-Wl,,-rpath,' + @classmethod def default_version(self, comp): """The '-V' option works for nag compilers. diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index 594cd6efe9..cdac319088 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -67,6 +67,11 @@ class CompilerTest(unittest.TestCase): os.environ['SPACK_COMPILER_SPEC'] = "gcc@4.4.7" os.environ['SPACK_SHORT_SPEC'] = "foo@1.2" + os.environ['SPACK_CC_RPATH_ARG'] = "-Wl,-rpath" + os.environ['SPACK_CXX_RPATH_ARG'] = "-Wl,-rpath" + os.environ['SPACK_F77_RPATH_ARG'] = "-Wl,-rpath" + os.environ['SPACK_FC_RPATH_ARG'] = "-Wl,-rpath" + # Make some fake dependencies self.tmp_deps = tempfile.mkdtemp() self.dep1 = join_path(self.tmp_deps, 'dep1') -- cgit v1.2.3-70-g09d2 From b211829fb137994fbd7467c713fd026bc29cef3f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 5 May 2016 13:54:10 -0500 Subject: Testing typo --- lib/spack/spack/test/cc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index cdac319088..35392d9d6d 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -67,10 +67,10 @@ class CompilerTest(unittest.TestCase): os.environ['SPACK_COMPILER_SPEC'] = "gcc@4.4.7" os.environ['SPACK_SHORT_SPEC'] = "foo@1.2" - os.environ['SPACK_CC_RPATH_ARG'] = "-Wl,-rpath" - os.environ['SPACK_CXX_RPATH_ARG'] = "-Wl,-rpath" - os.environ['SPACK_F77_RPATH_ARG'] = "-Wl,-rpath" - os.environ['SPACK_FC_RPATH_ARG'] = "-Wl,-rpath" + os.environ['SPACK_CC_RPATH_ARG'] = "-Wl,-rpath," + os.environ['SPACK_CXX_RPATH_ARG'] = "-Wl,-rpath," + os.environ['SPACK_F77_RPATH_ARG'] = "-Wl,-rpath," + os.environ['SPACK_FC_RPATH_ARG'] = "-Wl,-rpath," # Make some fake dependencies self.tmp_deps = tempfile.mkdtemp() -- cgit v1.2.3-70-g09d2 From 58733eb26a734fd00cac40ca2ff7422ccf7669fa Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 6 May 2016 09:57:59 -0500 Subject: Comment change --- lib/spack/spack/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 8c197520b5..976d96825c 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -91,7 +91,7 @@ class Compiler(object): # version suffix for gcc. suffixes = [r'-.*'] - # Flags used by this compiler to set an rpath + # Default flags used by a compiler to set an rpath @property def cc_rpath_arg(self): return '-Wl,-rpath,' -- cgit v1.2.3-70-g09d2 From 6665a996e62e2097b68392afaa45d01305bcc399 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 9 May 2016 14:08:11 -0500 Subject: Add documentation for rpath_flag handling --- lib/spack/docs/packaging_guide.rst | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 31c676d4f5..1b7941ab24 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1803,15 +1803,15 @@ Compile-time library search paths * ``-L$dep_prefix/lib`` * ``-L$dep_prefix/lib64`` Runtime library search paths (RPATHs) - * ``-Wl,-rpath,$dep_prefix/lib`` - * ``-Wl,-rpath,$dep_prefix/lib64`` + * ``$rpath_flag$dep_prefix/lib`` + * ``$rpath_flag$dep_prefix/lib64`` Include search paths * ``-I$dep_prefix/include`` An example of this would be the ``libdwarf`` build, which has one dependency: ``libelf``. Every call to ``cc`` in the ``libdwarf`` build will have ``-I$LIBELF_PREFIX/include``, -``-L$LIBELF_PREFIX/lib``, and ``-Wl,-rpath,$LIBELF_PREFIX/lib`` +``-L$LIBELF_PREFIX/lib``, and ``$rpath_flag$LIBELF_PREFIX/lib`` inserted on the command line. This is done transparently to the project's build system, which will just think it's using a system where ``libelf`` is readily available. Because of this, you **do @@ -1831,6 +1831,14 @@ successfully find ``libdwarf.h`` and ``libdwarf.so``, without the packager having to provide ``--with-libdwarf=/path/to/libdwarf`` on the command line. +.. note:: + + For most compilers, ``$rpath_flag`` is ``-Wl,-rpath,``. However, NAG + passes its flags to GCC instead of passing them directly to the linker. + Therefore, its ``$rpath_flag`` is doubly wrapped: ``-Wl,-Wl,,-rpath,``. + ``$rpath_flag`` can be overriden on a compiler specific basis in + ``lib/spack/spack/compilers/$compiler.py``. + Compiler flags ~~~~~~~~~~~~~~ In rare circumstances such as compiling and running small unit tests, a package @@ -1848,8 +1856,6 @@ package supports additional variants like variant('openmp', default=True, description="Enable OpenMP support.") - - Message Parsing Interface (MPI) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It is common for high performance computing software/packages to use ``MPI``. -- cgit v1.2.3-70-g09d2 From 045e5bd4585fdf556651b9c71a0ca7428a27563c Mon Sep 17 00:00:00 2001 From: "Tanzima Z. Islam" Date: Mon, 9 May 2016 16:22:07 -0700 Subject: Adding a new package: Kripke from the public tar ball --- var/spack/repos/builtin/packages/kripke/package.py | 38 ++++++++++++++++------ 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py index 68ccc4cb6c..b6f4e4fd73 100644 --- a/var/spack/repos/builtin/packages/kripke/package.py +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -1,16 +1,34 @@ +# FIXME: +# This is a template package file for Spack. We've conveniently +# put "FIXME" labels next to all the things you'll want to change. +# +# Once you've edited all the FIXME's, delete this whole message, +# save this file, and test out your package like this: +# +# spack install kripke +# +# You can always get back here to change things with: +# +# spack edit kripke +# +# See the spack documentation for more information on building +# packages. +# from spack import * class Kripke(Package): - """Kripke is a simple, scalable, 3D Sn deterministic particle transport code.""" - + """Kripke is a simple, scalable, 3D Sn deterministic particle transport proxy/mini app.""" homepage = "https://codesign.llnl.gov/kripke.php" - url = "" - #version('master', git='https://lc.llnl.gov/stash/scm/kripke/kripke.git') - version('master', git='https://lc.llnl.gov/stash/scm/~islam3/kripke.git') + url = "https://codesign.llnl.gov/downloads/kripke-openmp-1.1.tar.gz" - def install(self, spec, prefix): - with working_dir('build', create=True): - cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', '-DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain/chaos_5_x86_64_ib-ic15.cmake', '-DENABLE_OPENMP=1', '..', *std_cmake_args) - make() - make("install") + version('1.1', '7fe6f2b26ed983a6ce5495ab701f85bf') + #depends_on("mvapich2@1.9:") + + def install(self, spec, prefix): + with working_dir('build', create=True): + cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', '-DENABLE_OPENMP=1', '-DENABLE_MPI=1', '..', *std_cmake_args) + make() + #Kripke does not provide an install, so creating one here. + mkdirp(prefix.bin) + install('kripke', prefix.bin) -- cgit v1.2.3-70-g09d2 From 222c84d9be10fce410093c479daa2877fc344b3a Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Mon, 9 May 2016 16:22:17 -0700 Subject: Changed anonymous specs to have name=None instead of empty string --- lib/spack/spack/cmd/find.py | 2 +- lib/spack/spack/spec.py | 65 ++++++++++++++++++++++++--------------------- lib/spack/spack/virtual.py | 2 +- 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index b0e719c2db..9c766de16d 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -161,7 +161,7 @@ def find(parser, args): # Filter out specs that don't exist. query_specs = spack.cmd.parse_specs(args.query_specs) query_specs, nonexisting = partition_list( - query_specs, lambda s: spack.repo.exists(s.name) or s.name == "") + query_specs, lambda s: spack.repo.exists(s.name) or not s.name) if nonexisting: msg = "No such package%s: " % ('s' if len(nonexisting) > 1 else '') diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index fa669b90c5..4159d18b74 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -566,7 +566,7 @@ class Spec(object): # @property def fullname(self): - return '%s.%s' % (self.namespace, self.name) if self.namespace else self.name + return '%s.%s' % (self.namespace, self.name) if self.namespace else (self.name if self.name else '') @property @@ -616,7 +616,7 @@ class Spec(object): @staticmethod def is_virtual(name): """Test if a name is virtual without requiring a Spec.""" - return name != '' and not spack.repo.exists(name) + return (not name is None) and ( not spack.repo.exists(name) ) @property @@ -1044,7 +1044,7 @@ class Spec(object): with requirements of its pacakges. See flatten() and normalize() for more details on this. """ - if self.name == "": + if not self.name: raise SpecError("Attempting to concretize anonymous spec") if self._concrete: @@ -1313,7 +1313,7 @@ class Spec(object): TODO: normalize should probably implement some form of cycle detection, to ensure that the spec is actually a DAG. """ - if self.name == "": + if not self.name: raise SpecError("Attempting to normalize anonymous spec") if self._normal and not force: @@ -1360,7 +1360,7 @@ class Spec(object): """ for spec in self.traverse(): # Don't get a package for a virtual name. - if not spec.virtual and spec.name != '': + if (not spec.virtual) and spec.name: spack.repo.get(spec.fullname) # validate compiler in addition to the package name. @@ -1381,7 +1381,7 @@ class Spec(object): """ other = self._autospec(other) - if not (self.name == other.name or self.name == "" or other.name == ""): + if not (self.name == other.name or (not self.name) or (not other.name) ): raise UnsatisfiableSpecNameError(self.name, other.name) if other.namespace is not None: @@ -1485,7 +1485,7 @@ class Spec(object): try: spec = spack.spec.Spec(spec_like) - if spec.name == "": + if not spec.name: raise SpecError("anonymous package -- this will always be handled") return spec except SpecError: @@ -1518,7 +1518,7 @@ class Spec(object): return False # Otherwise, first thing we care about is whether the name matches - if self.name != other.name and self.name != "" and other.name != "": + if self.name != other.name and (not self.name) and (not other.name): return False # namespaces either match, or other doesn't require one. @@ -1540,7 +1540,7 @@ class Spec(object): return False var_strict = strict - if self.name == "" or other.name == "": + if (not self.name) or (not other.name): var_strict = True if not self.variants.satisfies(other.variants, strict=var_strict): return False @@ -1559,7 +1559,7 @@ class Spec(object): # If we need to descend into dependencies, do it, otherwise we're done. if deps: deps_strict = strict - if self.name == "" or other.name == "": + if not (self.name and other.name): deps_strict=True return self.satisfies_dependencies(other, strict=deps_strict) else: @@ -1872,7 +1872,8 @@ class Spec(object): fmt += 's' if c == '_': - out.write(fmt % self.name) + if name = self.name if self.name else '' + out.write(fmt % name) elif c == '.': out.write(fmt % self.fullname) elif c == '@': @@ -1923,6 +1924,7 @@ class Spec(object): named_str += c continue; if named_str == 'PACKAGE': + name = self.name if self.name else '' write(fmt % self.name, '@') if named_str == 'VERSION': if self.versions and self.versions != _any_version: @@ -2034,7 +2036,6 @@ class SpecLexer(spack.parse.Lexer): # This is more liberal than identifier_re (see above). # Checked by check_identifier() for better error messages. (r'([\"\'])(?:(?=(\\?))\2.)*?\1',lambda scanner, val: self.token(QT, val)), -# (r'([\"\'])([^\1]+?)(\1)',lambda scanner, val: self.token(QT, val)), (r'\w[\w.-]*', lambda scanner, val: self.token(ID, val)), (r'\s+', lambda scanner, val: None)]) @@ -2051,12 +2052,12 @@ class SpecParser(spack.parse.Parser): while self.next: # TODO: clean this parsing up a bit if self.previous: - specs.append(self.previous.value) + specs.append(self.spec(self.previous.value)) if self.accept(ID): self.previous = self.token if self.accept(EQ): if not specs: - specs.append(self.spec('')) + specs.append(self.spec(None)) if self.accept(QT): self.token.value = self.token.value[1:-1] else: @@ -2071,7 +2072,7 @@ class SpecParser(spack.parse.Parser): elif self.accept(DEP): if not specs: self.previous = self.token - specs.append(self.spec('')) + specs.append(self.spec(None)) self.previous = None if self.accept(HASH): specs[-1]._add_dependency(self.spec_by_hash()) @@ -2082,7 +2083,7 @@ class SpecParser(spack.parse.Parser): else: # Attempt to construct an anonymous spec, but check that the first token is valid # TODO: Is this check even necessary, or will it all be Lex errors now? - specs.append(self.spec('',True)) + specs.append(self.spec(None,True)) except spack.parse.ParseError, e: raise SpecParseError(e) @@ -2107,14 +2108,7 @@ class SpecParser(spack.parse.Parser): tty.die("%s does not match any installed packages." %self.token.value) if len(matches) != 1: - tty.error("%s matches multiple installed packages:" %self.token.value) - print - display_specs(matches, long=True) - print - print "You can either:" - print " a) Use a more specific hash, or" - print " b) Specify the package by name." - sys.exit(1) + raise AmbiguousHashError("Multiple packages specify hash %s." % self.token.value, *matches) return matches[0] @@ -2122,12 +2116,15 @@ class SpecParser(spack.parse.Parser): def spec(self, name, check_valid_token = False): """Parse a spec out of the input. If a spec is supplied, then initialize and return it instead of creating a new one.""" - spec_namespace, dot, spec_name = name.rpartition('.') - if not spec_namespace: - spec_namespace = None - - if spec_name != '': + if name: + spec_namespace, dot, spec_name = name.rpartition('.') + if not spec_namespace: + spec_namespace = None self.check_identifier(spec_name) + else: + spec_name = None + + # This will init the spec without calling __init__. spec = Spec.__new__(Spec) @@ -2155,6 +2152,8 @@ class SpecParser(spack.parse.Parser): spec.add_dependency(self.spec_by_hash()) else: self.expect(ID) + if self.accept(EQ): + raise SpecParseError(spack.parse.ParseError("","","Expected dependency received anonymous spec")) spec.add_dependency(self.spec(self.token.value)) while self.next: @@ -2294,7 +2293,7 @@ def parse_anonymous_spec(spec_like, pkg_name): try: anon_spec = Spec(spec_like) if anon_spec.name != pkg_name: - raise SpecParseError(spack.parse.ParseError("","","anon spec created without proper name")) + raise SpecParseError(spack.parse.ParseError("","","Expected anonymous spec for package %s but found spec for package %s" % (pkg_name, anon_spec_name) )) except SpecParseError: anon_spec = Spec(pkg_name + ' ' + spec_like) if anon_spec.name != pkg_name: raise ValueError( @@ -2470,3 +2469,9 @@ class SpackYAMLError(spack.error.SpackError): class SpackRecordError(spack.error.SpackError): def __init__(self, msg): super(SpackRecordError, self).__init__(msg) + +class AmbiguousHashError(SpecError): + def __init__(self, msg, *specs): + super(AmbiguousHashError, self).__init__(msg) + for spec in specs: + print ' ', spec.format('$.$@$%@+$+$=$#') diff --git a/lib/spack/spack/virtual.py b/lib/spack/spack/virtual.py index 3a005c35d2..5ddfb94366 100644 --- a/lib/spack/spack/virtual.py +++ b/lib/spack/spack/virtual.py @@ -67,7 +67,7 @@ class ProviderIndex(object): if type(spec) != spack.spec.Spec: spec = spack.spec.Spec(spec) - if spec.name == "": + if not spec.name: # Empty specs do not have a package return -- cgit v1.2.3-70-g09d2 From a7026da45c1f0eefd3d4e8bcf8a2d28cccab4666 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Mon, 9 May 2016 16:24:26 -0700 Subject: cleanup --- lib/spack/spack/spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 4159d18b74..0c6a49dd4c 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1872,7 +1872,7 @@ class Spec(object): fmt += 's' if c == '_': - if name = self.name if self.name else '' + name = self.name if self.name else '' out.write(fmt % name) elif c == '.': out.write(fmt % self.fullname) -- cgit v1.2.3-70-g09d2 From 23ec6c6bb031d48e64be07acd199b957ada774e8 Mon Sep 17 00:00:00 2001 From: "Tanzima Z. Islam" Date: Mon, 9 May 2016 16:34:27 -0700 Subject: Removed FIXME comments --- var/spack/repos/builtin/packages/kripke/package.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py index b6f4e4fd73..f7cc96053a 100644 --- a/var/spack/repos/builtin/packages/kripke/package.py +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -1,19 +1,3 @@ -# FIXME: -# This is a template package file for Spack. We've conveniently -# put "FIXME" labels next to all the things you'll want to change. -# -# Once you've edited all the FIXME's, delete this whole message, -# save this file, and test out your package like this: -# -# spack install kripke -# -# You can always get back here to change things with: -# -# spack edit kripke -# -# See the spack documentation for more information on building -# packages. -# from spack import * class Kripke(Package): -- cgit v1.2.3-70-g09d2 From c6ac709d70adf9d6ecf5b840411bf5e3e4ba1523 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Mon, 9 May 2016 17:06:21 -0700 Subject: WIP fixing all the things that broke when I changed the anonymous spec names --- lib/spack/spack/spec.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 0c6a49dd4c..547f006e7a 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -2122,6 +2122,7 @@ class SpecParser(spack.parse.Parser): spec_namespace = None self.check_identifier(spec_name) else: + spec_namespace = None spec_name = None @@ -2293,7 +2294,8 @@ def parse_anonymous_spec(spec_like, pkg_name): try: anon_spec = Spec(spec_like) if anon_spec.name != pkg_name: - raise SpecParseError(spack.parse.ParseError("","","Expected anonymous spec for package %s but found spec for package %s" % (pkg_name, anon_spec_name) )) + print anon_spec.name, pkg_name + raise SpecParseError(spack.parse.ParseError("","","Expected anonymous spec for package %s but found spec for package %s" % (pkg_name, anon_spec.name) )) except SpecParseError: anon_spec = Spec(pkg_name + ' ' + spec_like) if anon_spec.name != pkg_name: raise ValueError( -- cgit v1.2.3-70-g09d2 From 2e0ee5404d839a69c626407436c6cb059a51d9fd Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 9 May 2016 17:14:25 -0700 Subject: clean up Kripke package and dependencies. --- var/spack/repos/builtin/packages/kripke/package.py | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py index f7cc96053a..345b8af4d0 100644 --- a/var/spack/repos/builtin/packages/kripke/package.py +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -1,18 +1,28 @@ from spack import * class Kripke(Package): - """Kripke is a simple, scalable, 3D Sn deterministic particle transport proxy/mini app.""" + """Kripke is a simple, scalable, 3D Sn deterministic particle + transport proxy/mini app. + """ homepage = "https://codesign.llnl.gov/kripke.php" url = "https://codesign.llnl.gov/downloads/kripke-openmp-1.1.tar.gz" version('1.1', '7fe6f2b26ed983a6ce5495ab701f85bf') - #depends_on("mvapich2@1.9:") + variant('mpi', default=True, description='Enable MPI support') + + depends_on('mpi', when="+mpi") def install(self, spec, prefix): with working_dir('build', create=True): - cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', '-DENABLE_OPENMP=1', '-DENABLE_MPI=1', '..', *std_cmake_args) - make() - #Kripke does not provide an install, so creating one here. - mkdirp(prefix.bin) - install('kripke', prefix.bin) + cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', + '-DENABLE_OPENMP=1', + '-DENABLE_MPI=1', + '..', + *std_cmake_args) + make() + + # Kripke does not provide install target, so we have to copy + # things into place. + mkdirp(prefix.bin) + install('kripke', prefix.bin) -- cgit v1.2.3-70-g09d2 From b063ab42bff9a3382a6c79663d41d13a0c028c50 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 27 Apr 2016 11:57:48 +0200 Subject: openblas: fix and cleanup the unit test --- .../repos/builtin/packages/openblas/package.py | 68 +++++++++------------- .../builtin/packages/openblas/test_cblas_dgemm.c | 54 ++++++++++++++--- .../packages/openblas/test_cblas_dgemm.output | 3 + 3 files changed, 74 insertions(+), 51 deletions(-) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 99649da9ca..72b0b65a2f 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -88,48 +88,33 @@ class Openblas(Package): self.spec.lapack_shared_lib = self.spec.blas_shared_lib def check_install(self, spec): - "Build and run a small program to test that we have Lapack symbols" + # TODO: Pull this out to the framework function which recieves a pair of xyz.c and xyz.output print "Checking Openblas installation..." - checkdir = "spack-check" - with working_dir(checkdir, create=True): - source = r""" -#include -#include -int main(void) { -int i=0; -double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; -double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; -double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; -cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, - 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); -for (i = 0; i < 9; i++) - printf("%f\n", C[i]); -return 0; -} -""" - expected = """\ -11.000000 --9.000000 -5.000000 --9.000000 -21.000000 --1.000000 -5.000000 --1.000000 -3.000000 -""" - with open("check.c", 'w') as f: - f.write(source) - cc = which('cc') - # TODO: Automate these path and library settings - cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") - cc('-o', "check", "check.o", - "-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas", "-lpthread") - try: - check = Executable('./check') - output = check(return_output=True) - except: - output = "" + source_file = join_path(os.path.dirname(self.module.__file__), + 'test_cblas_dgemm.c') + output_file = join_path(os.path.dirname(self.module.__file__), + 'test_cblas_dgemm.output') + + with open(output_file, 'r') as f: + expected = f.read() + + cc = which('cc') + cc('-c', "-I%s" % join_path(spec.prefix, "include"), source_file) + link_flags = ["-L%s" % join_path(spec.prefix, "lib"), + "-llapack", + "-lblas", + "-lpthread" + ] + if '+openmp' in spec: + link_flags.extend([self.compiler.openmp_flag]) + cc('-o', "check", "test_cblas_dgemm.o", + *link_flags) + + try: + check = Executable('./check') + output = check(return_output=True) + except: + output = "" success = output == expected if not success: print "Produced output does not match expected output." @@ -142,4 +127,3 @@ return 0; print output print '-'*80 raise RuntimeError("Openblas install check failed") - shutil.rmtree(checkdir) diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c index 634e99d20b..3813a23b69 100644 --- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c @@ -1,13 +1,49 @@ #include #include + +double m[] = { + 3, 1, 3, + 1, 5, 9, + 2, 6, 5 +}; + +double x[] = { + -1, 3, -3 +}; + +#ifdef __cplusplus +extern "C" { +#endif + + void dgesv_(int *n, int *nrhs, double *a, int *lda, + int *ipivot, double *b, int *ldb, int *info); + +#ifdef __cplusplus +} +#endif + int main(void) { -int i=0; -double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; -double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; -double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; -cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, - 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); -for (i = 0; i < 9; i++) - printf("%f\n", C[i]); -return 0; + int i; + // blas: + double A[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0}; + double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5}; + cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, + 3, 3, 2, 1, A, 3, B, 3, 2, C, 3); + for (i = 0; i < 9; i++) + printf("%f\n", C[i]); + + // lapack: + int ipiv[3]; + int j; + int info; + int n = 1; + int nrhs = 1; + int lda = 3; + int ldb = 3; + dgesv_(&n,&nrhs, &m[0], &lda, ipiv, &x[0], &ldb, &info); + for (i=0; i<3; ++i) + printf("%5.1f %3d\n", x[i], ipiv[i]); + + return 0; } diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output index b8316d7477..9c235e314f 100644 --- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output @@ -7,3 +7,6 @@ 5.000000 -1.000000 3.000000 + -0.3 1 + 3.0 1499101120 + -3.0 32767 -- cgit v1.2.3-70-g09d2 From 474048ae8ba5118ad995d271523241c80ab7c3e5 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 10 May 2016 09:02:16 +0200 Subject: openmpi : fixes #920, added sqlite as a dependency The default for the variant `pmi` has been set to `False` `sqlite` is now a dependency if `+sqlite3` --- var/spack/repos/builtin/packages/openmpi/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 042f072226..c656f78dab 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -29,7 +29,7 @@ class Openmpi(Package): variant('psm', default=False, description='Build support for the PSM library.') variant('psm2', default=False, description='Build support for the Intel PSM2 library.') - variant('pmi', default=True, description='Build support for PMI-based launchers') + variant('pmi', default=False, description='Build support for PMI-based launchers') variant('verbs', default=False, description='Build support for OpenFabrics verbs.') variant('mxm', default=False, description='Build Mellanox Messaging support') @@ -47,6 +47,7 @@ class Openmpi(Package): provides('mpi@:3.0', when='@1.7.5:') depends_on('hwloc') + depends_on('sqlite', when='+sqlite3') def url_for_version(self, version): return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) -- cgit v1.2.3-70-g09d2 From e3115aa505b8fc68893e4ebeaf5e5f152507e693 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 10 May 2016 00:31:06 -0700 Subject: Kripke variants. --- var/spack/repos/builtin/packages/kripke/package.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py index 345b8af4d0..7d067ea44d 100644 --- a/var/spack/repos/builtin/packages/kripke/package.py +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -9,15 +9,19 @@ class Kripke(Package): version('1.1', '7fe6f2b26ed983a6ce5495ab701f85bf') - variant('mpi', default=True, description='Enable MPI support') + variant('mpi', default=True, description='Build with MPI.') + variant('openmp', default=True, description='Build with OpenMP enabled.') depends_on('mpi', when="+mpi") def install(self, spec, prefix): with working_dir('build', create=True): + def enabled(variant): + return (1 if variant in spec else 0) + cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', - '-DENABLE_OPENMP=1', - '-DENABLE_MPI=1', + '-DENABLE_OPENMP=%d' % enabled('+openmp'), + '-DENABLE_MPI=%d' % enabled('+mpi'), '..', *std_cmake_args) make() -- cgit v1.2.3-70-g09d2 From 81cb520b470511509446246c72be4ae6220e088e Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 9 May 2016 15:18:57 -0700 Subject: Make Travis badge use SVG. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7797da299c..1f7bcc5c61 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![image](share/spack/logo/spack-logo-text-64.png "Spack") ============ -[![Build Status](https://travis-ci.org/LLNL/spack.png?branch=develop)](https://travis-ci.org/LLNL/spack) +[![Build Status](https://travis-ci.org/LLNL/spack.svg?branch=develop)](https://travis-ci.org/LLNL/spack) [![Coverage Status](https://coveralls.io/repos/github/LLNL/spack/badge.svg?branch=develop)](https://coveralls.io/github/LLNL/spack?branch=develop) Spack is a package management tool designed to support multiple -- cgit v1.2.3-70-g09d2 From d3ade02c161822589e4647056293da2b8313d70c Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 9 May 2016 15:19:17 -0700 Subject: Make .style.yapf use 80 chars. --- .style.yapf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.style.yapf b/.style.yapf index b4a1f688b8..4741fb4f3b 100644 --- a/.style.yapf +++ b/.style.yapf @@ -1,3 +1,3 @@ [style] based_on_style = pep8 -column_limit = 120 \ No newline at end of file +column_limit = 80 -- cgit v1.2.3-70-g09d2 From e60f25f20944517ce064e2091f9e680d9c46eda4 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 10 May 2016 00:31:43 -0700 Subject: Move args to .coveragerc --- .coveragerc | 7 +++++++ .travis.yml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.coveragerc b/.coveragerc index 37410a3677..a1271a94fc 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,6 +1,13 @@ +# -*- conf -*- # .coveragerc to control coverage.py [run] branch = True +source = lib +omit = + lib/spack/spack/test/* + lib/spack/env/* + lib/spack/docs/* + lib/spack/external/* [report] # Regexes for lines to exclude from consideration diff --git a/.travis.yml b/.travis.yml index 30dfebf783..4ff4d5f483 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,9 +24,9 @@ script: - spack config get compilers - spack install -v libdwarf # Run unit tests with code coverage - - coverage run --source=lib --omit=lib/spack/spack/test/*,lib/spack/env/*,lib/spack/docs/*,lib/spack/external/* bin/spack test + - coverage run bin/spack test # Checks if the file that have been changed are flake8 conformant - - CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py/g'` + - CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py$/'` - if [[ ${CHANGED_PYTHON_FILES} ]] ; then flake8 --format pylint --config flake8.ini ${CHANGED_PYTHON_FILES} ; fi -- cgit v1.2.3-70-g09d2 From 0f427ed334f8a58e888872d60419709cfd6f41c3 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 10 May 2016 01:07:17 -0700 Subject: Tweak nccmp to be more spack-compatible. - Spack doesn't set F90, but it confuses the nccmp build. Just remove it from the environment. - TODO: should build environment unset this variable? --- var/spack/repos/builtin/packages/nccmp/package.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/nccmp/package.py b/var/spack/repos/builtin/packages/nccmp/package.py index 458afbb1e8..72e86831c6 100644 --- a/var/spack/repos/builtin/packages/nccmp/package.py +++ b/var/spack/repos/builtin/packages/nccmp/package.py @@ -1,5 +1,4 @@ from spack import * -import os class Nccmp(Package): """Compare NetCDF Files""" @@ -15,16 +14,10 @@ class Nccmp(Package): # FCFLAGS respectively in this configure, please unset # F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure # again. - os.environ['FC'] = os.environ['F90'] - del os.environ['F90'] - try: - os.environ['FCFLAGS'] = os.environ['F90FLAGS'] - del os.environ['F90FLAGS'] - except KeyError: # There are no flags - pass + env.pop('F90', None) + env.pop('F90FLAGS', None) configure('--prefix=%s' % prefix) - make() make("check") make("install") -- cgit v1.2.3-70-g09d2 From 8f4efeea973a7d2190b660acc27df882341c95dc Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 10 May 2016 02:33:22 -0700 Subject: Max line length of 79 chars. --- .style.yapf | 2 +- flake8.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.style.yapf b/.style.yapf index 4741fb4f3b..a4b3f65252 100644 --- a/.style.yapf +++ b/.style.yapf @@ -1,3 +1,3 @@ [style] based_on_style = pep8 -column_limit = 80 +column_limit = 79 diff --git a/flake8.ini b/flake8.ini index 757c71705e..15fc1b87b7 100644 --- a/flake8.ini +++ b/flake8.ini @@ -1,3 +1,3 @@ [flake8] ignore = W391,F403 -max-line-length = 120 \ No newline at end of file +max-line-length = 79 -- cgit v1.2.3-70-g09d2 From aca5941a0e670e6bcc5873ecf08ce33bfe569955 Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Tue, 10 May 2016 11:48:18 +0200 Subject: Add a few more python packages py-Genshi py-astroid py-jinja2 py-logilab-common py-markupsafe py-mistune py-prettytable py-py2neo py-storm --- .../repos/builtin/packages/py-Genshi/package.py | 16 ++++++++++++++ .../repos/builtin/packages/py-astroid/package.py | 20 +++++++++++++++++ .../repos/builtin/packages/py-jinja2/package.py | 25 ++++++++++++++++++++++ .../builtin/packages/py-logilab-common/package.py | 16 ++++++++++++++ .../builtin/packages/py-markupsafe/package.py | 25 ++++++++++++++++++++++ .../repos/builtin/packages/py-mistune/package.py | 20 +++++++++++++++++ .../builtin/packages/py-prettytable/package.py | 18 ++++++++++++++++ .../repos/builtin/packages/py-py2neo/package.py | 20 +++++++++++++++++ .../repos/builtin/packages/py-storm/package.py | 15 +++++++++++++ 9 files changed, 175 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-Genshi/package.py create mode 100644 var/spack/repos/builtin/packages/py-astroid/package.py create mode 100644 var/spack/repos/builtin/packages/py-jinja2/package.py create mode 100644 var/spack/repos/builtin/packages/py-logilab-common/package.py create mode 100644 var/spack/repos/builtin/packages/py-markupsafe/package.py create mode 100644 var/spack/repos/builtin/packages/py-mistune/package.py create mode 100644 var/spack/repos/builtin/packages/py-prettytable/package.py create mode 100644 var/spack/repos/builtin/packages/py-py2neo/package.py create mode 100644 var/spack/repos/builtin/packages/py-storm/package.py diff --git a/var/spack/repos/builtin/packages/py-Genshi/package.py b/var/spack/repos/builtin/packages/py-Genshi/package.py new file mode 100644 index 0000000000..6feb4a5bcf --- /dev/null +++ b/var/spack/repos/builtin/packages/py-Genshi/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyGenshi(Package): + """Python toolkit for generation of output for the web""" + homepage = "https://genshi.edgewall.org/" + url = "http://ftp.edgewall.com/pub/genshi/Genshi-0.7.tar.gz" + + version('0.7' , '54e64dd69da3ec961f86e686e0848a82') + version('0.6.1', '372c368c8931110b0a521fa6091742d7') + version('0.6' , '604e8b23b4697655d36a69c2d8ef7187') + + extends("python") + depends_on("py-setuptools") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-astroid/package.py b/var/spack/repos/builtin/packages/py-astroid/package.py new file mode 100644 index 0000000000..0c7971b27c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-astroid/package.py @@ -0,0 +1,20 @@ +from spack import * + +class PyAstroid(Package): + homepage = "https://www.astroid.org/" + url = "https://github.com/PyCQA/astroid/archive/astroid-1.4.5.tar.gz" + + version('1.4.5', '7adfc55809908297ef430efe4ea20ac3') + version('1.4.4', '8ae6f63f6a2b260bb7f647dafccbc796') + version('1.4.3', '4647159de7d4d0c4b1de23ecbfb8e246') + version('1.4.2', '677f7965840f375af51b0e86403bee6a') + version('1.4.1', 'ed70bfed5e4b25be4292e7fe72da2c02') + + extends('python') + depends_on('py-logilab-common') + depends_on('py-setuptools') + depends_on('py-six') + + 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 new file mode 100644 index 0000000000..bf1fcb74d2 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-jinja2/package.py @@ -0,0 +1,25 @@ +from spack import * + +class PyJinja2(Package): + """ + Jinja2 is a template engine written in pure Python. It provides + a Django inspired non-XML syntax but supports inline expressions + and an optional sandboxed environment. + """ + + homepage = "http://jinja.pocoo.org/" + url = "https://github.com/pallets/jinja/archive/2.8.tar.gz" + + version('2.8' , '4114200650d7630594e3bc70af23f59e') + version('2.7.3', '55b87bdc8e585b8b5b86734eefce2621') + version('2.7.2', '8e8f226809ae6363009b9296e30adf30') + version('2.7.1', '69b6675553c81b1087f95cae7f2179bb') + version('2.7' , 'ec70433f325051dcedacbb2465028a35') + + extends("python") + depends_on("py-setuptools") + depends_on("py-markupsafe") + + 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 new file mode 100644 index 0000000000..2cbe7abcef --- /dev/null +++ b/var/spack/repos/builtin/packages/py-logilab-common/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyLogilabCommon(Package): + """Common modules used by Logilab projects""" + homepage = "https://www.logilab.org/project/logilab-common" + url = "https://pypi.python.org/packages/a7/31/1650d23e44794d46935d82b86e73454cc83b814cbe1365260ccce8a2f4c6/logilab-common-1.2.0.tar.gz" + + version('1.2.0', 'f7b51351b7bfe052746fa04c03253c0b') + + extends("python") + depends_on("py-setuptools") + depends_on("py-six") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) + diff --git a/var/spack/repos/builtin/packages/py-markupsafe/package.py b/var/spack/repos/builtin/packages/py-markupsafe/package.py new file mode 100644 index 0000000000..78cbdd7a99 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-markupsafe/package.py @@ -0,0 +1,25 @@ +from spack import * + +class PyMarkupsafe(Package): + """ + MarkupSafe is a library for Python that implements a unicode + string that is aware of HTML escaping rules and can be used + to implement automatic string escaping. It is used by Jinja 2, + the Mako templating engine, the Pylons web framework and many more. + """ + + homepage = "http://www.pocoo.org/projects/markupsafe/" + url = "https://github.com/pallets/markupsafe/archive/0.23.tar.gz" + + version('0.23', '1a0dadc95169832367c9dcf142155cde') + version('0.22', '7a2ac7427b58def567628d06dc328396') + version('0.21', 'aebcd93ee05269773c8b80bb6c86fc2f') + version('0.20', '0c1fef97c8fd6a986d708f08d7f84a02') + version('0.19', '64b05361adb92c11839fc470e308c593') + + extends("python") + depends_on("py-setuptools") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) + diff --git a/var/spack/repos/builtin/packages/py-mistune/package.py b/var/spack/repos/builtin/packages/py-mistune/package.py new file mode 100644 index 0000000000..4a9d5b5eb4 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-mistune/package.py @@ -0,0 +1,20 @@ +from spack import * + +class PyMistune(Package): + """ + Python markdown parser + """ + homepage = "http://mistune.readthedocs.org/en/latest/" + url = "https://github.com/lepture/mistune/archive/v0.7.1.tar.gz" + + version('0.7.1', '0d9c29700c670790c5b2471070d32ec2') + version('0.7' , '77750ae8b8d0d584894224a7e0c0523a') + version('0.6' , 'd4f3d4f28a69e715f82b591d5dacf9a6') + version('0.5.1', '1c6cfce28a4aa90cf125217cd6c6fe6c') + version('0.5' , '997736554f1f95eea78c66ae339b5722') + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-prettytable/package.py b/var/spack/repos/builtin/packages/py-prettytable/package.py new file mode 100644 index 0000000000..2f7577d8c4 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-prettytable/package.py @@ -0,0 +1,18 @@ +from spack import * + +class PyPrettytable(Package): + """ + PrettyTable is a simple Python library designed to make + it quick and easy to represent tabular data in visually + appealing ASCII tables + """ + homepage = "https://code.google.com/archive/p/prettytable/" + url = "https://pypi.python.org/packages/e0/a1/36203205f77ccf98f3c6cf17cf068c972e6458d7e58509ca66da949ca347/prettytable-0.7.2.tar.gz" + + version('0.7.2', 'a6b80afeef286ce66733d54a0296b13b') + + extends("python") + depends_on("py-setuptools") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-py2neo/package.py b/var/spack/repos/builtin/packages/py-py2neo/package.py new file mode 100644 index 0000000000..c9cfdade2c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-py2neo/package.py @@ -0,0 +1,20 @@ +from spack import * + +class PyPy2neo(Package): + """FIXME: put a proper description of your package here.""" + # FIXME: add a proper url for your package's homepage here. + homepage = "http://www.example.com" + url = "https://github.com/nigelsmall/py2neo/archive/py2neo-2.0.8.tar.gz" + + version('2.0.8', 'e3ec5172a9e006515ef4155688a05a55') + version('2.0.7', '4cfbc5b7dfd7757f3d2e324805faa639') + version('2.0.6', '53e4cdb1a95fbae501c66e541d5f4929') + version('2.0.5', '143b1f9c0aa22faf170c1b9f84c7343b') + version('2.0.4', 'b3f7efd3344dc3f66db4eda11e5899f7') + + depends_on("py-setuptools") + extends("python") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) + diff --git a/var/spack/repos/builtin/packages/py-storm/package.py b/var/spack/repos/builtin/packages/py-storm/package.py new file mode 100644 index 0000000000..d504b231d4 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-storm/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyStorm(Package): + """Storm is an object-relational mapper (ORM) for Python""" + homepage = "https://storm.canonical.com/" + url = "https://launchpad.net/storm/trunk/0.20/+download/storm-0.20.tar.gz" + + version('0.20', '8628503141f0f06c0749d607ac09b9c7') + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) + -- cgit v1.2.3-70-g09d2 From 1a563c2b31315e741fc050c46d203c11e079ec5f Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 10 May 2016 03:06:55 -0700 Subject: Ignore "multiple spaces before operator" error. --- flake8.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake8.ini b/flake8.ini index 15fc1b87b7..f8bff04355 100644 --- a/flake8.ini +++ b/flake8.ini @@ -1,3 +1,3 @@ [flake8] -ignore = W391,F403 +ignore = W391,F403,E221 max-line-length = 79 -- cgit v1.2.3-70-g09d2 From ad42579f0896a295cbbfb8daf7f02917ef35bc0e Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Tue, 10 May 2016 13:17:36 +0200 Subject: addressing coding style rules --- var/spack/repos/builtin/packages/py-Genshi/package.py | 8 +++++--- var/spack/repos/builtin/packages/py-astroid/package.py | 4 +++- var/spack/repos/builtin/packages/py-jinja2/package.py | 12 +++++++----- .../repos/builtin/packages/py-logilab-common/package.py | 4 +++- var/spack/repos/builtin/packages/py-markupsafe/package.py | 10 ++++++---- var/spack/repos/builtin/packages/py-mistune/package.py | 10 ++++++---- var/spack/repos/builtin/packages/py-prettytable/package.py | 8 +++++--- var/spack/repos/builtin/packages/py-py2neo/package.py | 4 +++- var/spack/repos/builtin/packages/py-storm/package.py | 5 +++-- 9 files changed, 41 insertions(+), 24 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-Genshi/package.py b/var/spack/repos/builtin/packages/py-Genshi/package.py index 6feb4a5bcf..7e0629200e 100644 --- a/var/spack/repos/builtin/packages/py-Genshi/package.py +++ b/var/spack/repos/builtin/packages/py-Genshi/package.py @@ -1,13 +1,15 @@ -from spack import * +from spack import version, extends, depends_on, python +from spack import Package + class PyGenshi(Package): """Python toolkit for generation of output for the web""" homepage = "https://genshi.edgewall.org/" url = "http://ftp.edgewall.com/pub/genshi/Genshi-0.7.tar.gz" - version('0.7' , '54e64dd69da3ec961f86e686e0848a82') + version('0.7', '54e64dd69da3ec961f86e686e0848a82') version('0.6.1', '372c368c8931110b0a521fa6091742d7') - version('0.6' , '604e8b23b4697655d36a69c2d8ef7187') + version('0.6', '604e8b23b4697655d36a69c2d8ef7187') extends("python") depends_on("py-setuptools") diff --git a/var/spack/repos/builtin/packages/py-astroid/package.py b/var/spack/repos/builtin/packages/py-astroid/package.py index 0c7971b27c..a8420d86c4 100644 --- a/var/spack/repos/builtin/packages/py-astroid/package.py +++ b/var/spack/repos/builtin/packages/py-astroid/package.py @@ -1,4 +1,6 @@ -from spack import * +from spack import depends_on, extends, python, version +from spack import Package + class PyAstroid(Package): homepage = "https://www.astroid.org/" diff --git a/var/spack/repos/builtin/packages/py-jinja2/package.py b/var/spack/repos/builtin/packages/py-jinja2/package.py index bf1fcb74d2..a745877786 100644 --- a/var/spack/repos/builtin/packages/py-jinja2/package.py +++ b/var/spack/repos/builtin/packages/py-jinja2/package.py @@ -1,25 +1,27 @@ -from spack import * +from spack import depends_on, extends, python, version +from spack import Package + class PyJinja2(Package): """ Jinja2 is a template engine written in pure Python. It provides - a Django inspired non-XML syntax but supports inline expressions + a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. """ homepage = "http://jinja.pocoo.org/" url = "https://github.com/pallets/jinja/archive/2.8.tar.gz" - version('2.8' , '4114200650d7630594e3bc70af23f59e') + version('2.8', '4114200650d7630594e3bc70af23f59e') version('2.7.3', '55b87bdc8e585b8b5b86734eefce2621') version('2.7.2', '8e8f226809ae6363009b9296e30adf30') version('2.7.1', '69b6675553c81b1087f95cae7f2179bb') - version('2.7' , 'ec70433f325051dcedacbb2465028a35') + version('2.7', 'ec70433f325051dcedacbb2465028a35') extends("python") depends_on("py-setuptools") depends_on("py-markupsafe") - + 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 2cbe7abcef..5b3c6e26cc 100644 --- a/var/spack/repos/builtin/packages/py-logilab-common/package.py +++ b/var/spack/repos/builtin/packages/py-logilab-common/package.py @@ -1,4 +1,6 @@ -from spack import * +from spack import depends_on, extends, python, version +from spack import Package + class PyLogilabCommon(Package): """Common modules used by Logilab projects""" diff --git a/var/spack/repos/builtin/packages/py-markupsafe/package.py b/var/spack/repos/builtin/packages/py-markupsafe/package.py index 78cbdd7a99..ac55e5ae28 100644 --- a/var/spack/repos/builtin/packages/py-markupsafe/package.py +++ b/var/spack/repos/builtin/packages/py-markupsafe/package.py @@ -1,13 +1,15 @@ -from spack import * +from spack import depends_on, extends, python, version +from spack import Package + class PyMarkupsafe(Package): """ - MarkupSafe is a library for Python that implements a unicode - string that is aware of HTML escaping rules and can be used + MarkupSafe is a library for Python that implements a unicode + string that is aware of HTML escaping rules and can be used to implement automatic string escaping. It is used by Jinja 2, the Mako templating engine, the Pylons web framework and many more. """ - + homepage = "http://www.pocoo.org/projects/markupsafe/" url = "https://github.com/pallets/markupsafe/archive/0.23.tar.gz" diff --git a/var/spack/repos/builtin/packages/py-mistune/package.py b/var/spack/repos/builtin/packages/py-mistune/package.py index 4a9d5b5eb4..aacd921d7b 100644 --- a/var/spack/repos/builtin/packages/py-mistune/package.py +++ b/var/spack/repos/builtin/packages/py-mistune/package.py @@ -1,4 +1,6 @@ -from spack import * +from spack import depends_on, extends, python, version +from spack import Package + class PyMistune(Package): """ @@ -8,10 +10,10 @@ class PyMistune(Package): url = "https://github.com/lepture/mistune/archive/v0.7.1.tar.gz" version('0.7.1', '0d9c29700c670790c5b2471070d32ec2') - version('0.7' , '77750ae8b8d0d584894224a7e0c0523a') - version('0.6' , 'd4f3d4f28a69e715f82b591d5dacf9a6') + version('0.7', '77750ae8b8d0d584894224a7e0c0523a') + version('0.6', 'd4f3d4f28a69e715f82b591d5dacf9a6') version('0.5.1', '1c6cfce28a4aa90cf125217cd6c6fe6c') - version('0.5' , '997736554f1f95eea78c66ae339b5722') + version('0.5', '997736554f1f95eea78c66ae339b5722') extends('python') depends_on('py-setuptools') diff --git a/var/spack/repos/builtin/packages/py-prettytable/package.py b/var/spack/repos/builtin/packages/py-prettytable/package.py index 2f7577d8c4..1adfba3d1b 100644 --- a/var/spack/repos/builtin/packages/py-prettytable/package.py +++ b/var/spack/repos/builtin/packages/py-prettytable/package.py @@ -1,9 +1,11 @@ -from spack import * +from spack import depends_on, extends, python, version +from Spack import Package + class PyPrettytable(Package): """ PrettyTable is a simple Python library designed to make - it quick and easy to represent tabular data in visually + it quick and easy to represent tabular data in visually appealing ASCII tables """ homepage = "https://code.google.com/archive/p/prettytable/" @@ -13,6 +15,6 @@ class PyPrettytable(Package): extends("python") depends_on("py-setuptools") - + def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-py2neo/package.py b/var/spack/repos/builtin/packages/py-py2neo/package.py index c9cfdade2c..1697bdb0ee 100644 --- a/var/spack/repos/builtin/packages/py-py2neo/package.py +++ b/var/spack/repos/builtin/packages/py-py2neo/package.py @@ -1,4 +1,6 @@ -from spack import * +from spack import depends_on, extends, python, version +from spack import Package + class PyPy2neo(Package): """FIXME: put a proper description of your package here.""" diff --git a/var/spack/repos/builtin/packages/py-storm/package.py b/var/spack/repos/builtin/packages/py-storm/package.py index d504b231d4..1953f285c4 100644 --- a/var/spack/repos/builtin/packages/py-storm/package.py +++ b/var/spack/repos/builtin/packages/py-storm/package.py @@ -1,4 +1,6 @@ -from spack import * +from spack import depends_on, extends, python, version +from spack import Package + class PyStorm(Package): """Storm is an object-relational mapper (ORM) for Python""" @@ -12,4 +14,3 @@ class PyStorm(Package): def install(self, spec, prefix): python('setup.py', 'install', '--prefix=%s' % prefix) - -- cgit v1.2.3-70-g09d2 From f8f71b1c2c456210b64a90eb5b21484a8265cfa6 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 10 May 2016 13:37:03 +0200 Subject: modules : prefix_inspections moved to modules.yaml --- etc/spack/modules.yaml | 10 ++++++++++ lib/spack/spack/config.py | 8 ++++++++ lib/spack/spack/modules.py | 18 +++--------------- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/etc/spack/modules.yaml b/etc/spack/modules.yaml index aa2a2c3fe2..8f8f88e908 100644 --- a/etc/spack/modules.yaml +++ b/etc/spack/modules.yaml @@ -5,4 +5,14 @@ # although users can override these settings in their ~/.spack/modules.yaml. # ------------------------------------------------------------------------- modules: + prefix_inspections: { + bin: ['PATH'], + man: ['MANPATH'], + lib: ['LIBRARY_PATH', 'LD_LIBRARY_PATH'], + lib64: ['LIBRARY_PATH', 'LD_LIBRARY_PATH'], + include: ['CPATH'], + lib/pkgconfig: ['PKGCONFIG'], + lib64/pkgconfig: ['PKGCONFIG'], + '': ['CMAKE_PREFIX_PATH'] + } enable: ['tcl', 'dotkit'] diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 64809462f9..d008a513e7 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -315,6 +315,14 @@ section_schemas = { 'default': {}, 'additionalProperties': False, 'properties': { + 'prefix_inspections': { + 'type': 'object', + 'patternProperties': { + r'\w[\w-]*': { # path to be inspected for existence (relative to prefix) + '$ref': '#/definitions/array_of_strings' + } + } + }, 'enable': { 'type': 'array', 'default': [], diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 57a4a2c754..f1c0bd87de 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -94,24 +94,12 @@ def inspect_path(prefix): """ env = EnvironmentModifications() # Inspect the prefix to check for the existence of common directories - prefix_inspections = { - 'bin': ('PATH',), - 'man': ('MANPATH',), - 'lib': ('LIBRARY_PATH', 'LD_LIBRARY_PATH'), - 'lib64': ('LIBRARY_PATH', 'LD_LIBRARY_PATH'), - 'include': ('CPATH',) - } - for attribute, variables in prefix_inspections.items(): - expected = getattr(prefix, attribute) + prefix_inspections = CONFIGURATION.get('prefix_inspections', {}) + for relative_path, variables in prefix_inspections.items(): + expected = join_path(prefix, relative_path) if os.path.isdir(expected): for variable in variables: env.prepend_path(variable, expected) - # PKGCONFIG - for expected in (join_path(prefix.lib, 'pkgconfig'), join_path(prefix.lib64, 'pkgconfig')): - if os.path.isdir(expected): - env.prepend_path('PKG_CONFIG_PATH', expected) - # CMake related variables - env.prepend_path('CMAKE_PREFIX_PATH', prefix) return env -- cgit v1.2.3-70-g09d2 From cd9cdd641062c5e4254feccd2f358cf8c7bbef01 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 10 May 2016 13:37:57 +0200 Subject: astyle: compile with spack_cxx --- var/spack/repos/builtin/packages/astyle/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py index 5274fc018f..c8e8c3cbec 100644 --- a/var/spack/repos/builtin/packages/astyle/package.py +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -11,8 +11,13 @@ class Astyle(Package): def install(self, spec, prefix): with working_dir('src'): + # unfortunately we need to edit the makefile in place to set compiler: + make_file = join_path(self.stage.source_path,'build','gcc','Makefile') + filter_file(r'^CXX\s*=.*', 'CXX=%s' % spack_cxx, make_file) + make('-f', - join_path(self.stage.source_path,'build','clang','Makefile'), + make_file, parallel=False) + mkdirp(self.prefix.bin) install(join_path(self.stage.source_path, 'src','bin','astyle'), self.prefix.bin) -- cgit v1.2.3-70-g09d2 From f5fb77157360a29215486fbaa70dd4995017e5ff Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Tue, 10 May 2016 14:52:14 +0200 Subject: fixing imports; configure commands aren't available at import time yet --- var/spack/repos/builtin/packages/py-Genshi/package.py | 2 +- var/spack/repos/builtin/packages/py-astroid/package.py | 2 +- var/spack/repos/builtin/packages/py-jinja2/package.py | 2 +- var/spack/repos/builtin/packages/py-logilab-common/package.py | 2 +- var/spack/repos/builtin/packages/py-markupsafe/package.py | 2 +- var/spack/repos/builtin/packages/py-mistune/package.py | 2 +- var/spack/repos/builtin/packages/py-prettytable/package.py | 4 ++-- var/spack/repos/builtin/packages/py-py2neo/package.py | 2 +- var/spack/repos/builtin/packages/py-storm/package.py | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-Genshi/package.py b/var/spack/repos/builtin/packages/py-Genshi/package.py index 7e0629200e..d485c89429 100644 --- a/var/spack/repos/builtin/packages/py-Genshi/package.py +++ b/var/spack/repos/builtin/packages/py-Genshi/package.py @@ -1,4 +1,4 @@ -from spack import version, extends, depends_on, python +from spack import version, extends, depends_on from spack import Package diff --git a/var/spack/repos/builtin/packages/py-astroid/package.py b/var/spack/repos/builtin/packages/py-astroid/package.py index a8420d86c4..1ecb5eecee 100644 --- a/var/spack/repos/builtin/packages/py-astroid/package.py +++ b/var/spack/repos/builtin/packages/py-astroid/package.py @@ -1,4 +1,4 @@ -from spack import depends_on, extends, python, version +from spack import depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-jinja2/package.py b/var/spack/repos/builtin/packages/py-jinja2/package.py index a745877786..5d92cdd49a 100644 --- a/var/spack/repos/builtin/packages/py-jinja2/package.py +++ b/var/spack/repos/builtin/packages/py-jinja2/package.py @@ -1,4 +1,4 @@ -from spack import depends_on, extends, python, version +from spack import depends_on, extends, version from spack import Package 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 5b3c6e26cc..a47c4ac0ec 100644 --- a/var/spack/repos/builtin/packages/py-logilab-common/package.py +++ b/var/spack/repos/builtin/packages/py-logilab-common/package.py @@ -1,4 +1,4 @@ -from spack import depends_on, extends, python, version +from spack import depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-markupsafe/package.py b/var/spack/repos/builtin/packages/py-markupsafe/package.py index ac55e5ae28..0a0c3a724a 100644 --- a/var/spack/repos/builtin/packages/py-markupsafe/package.py +++ b/var/spack/repos/builtin/packages/py-markupsafe/package.py @@ -1,4 +1,4 @@ -from spack import depends_on, extends, python, version +from spack import depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-mistune/package.py b/var/spack/repos/builtin/packages/py-mistune/package.py index aacd921d7b..44a114b173 100644 --- a/var/spack/repos/builtin/packages/py-mistune/package.py +++ b/var/spack/repos/builtin/packages/py-mistune/package.py @@ -1,4 +1,4 @@ -from spack import depends_on, extends, python, version +from spack import depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-prettytable/package.py b/var/spack/repos/builtin/packages/py-prettytable/package.py index 1adfba3d1b..27fab7c046 100644 --- a/var/spack/repos/builtin/packages/py-prettytable/package.py +++ b/var/spack/repos/builtin/packages/py-prettytable/package.py @@ -1,5 +1,5 @@ -from spack import depends_on, extends, python, version -from Spack import Package +from spack import depends_on, extends, version +from spack import Package class PyPrettytable(Package): diff --git a/var/spack/repos/builtin/packages/py-py2neo/package.py b/var/spack/repos/builtin/packages/py-py2neo/package.py index 1697bdb0ee..d30b823a87 100644 --- a/var/spack/repos/builtin/packages/py-py2neo/package.py +++ b/var/spack/repos/builtin/packages/py-py2neo/package.py @@ -1,4 +1,4 @@ -from spack import depends_on, extends, python, version +from spack import depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-storm/package.py b/var/spack/repos/builtin/packages/py-storm/package.py index 1953f285c4..abc121d30b 100644 --- a/var/spack/repos/builtin/packages/py-storm/package.py +++ b/var/spack/repos/builtin/packages/py-storm/package.py @@ -1,4 +1,4 @@ -from spack import depends_on, extends, python, version +from spack import depends_on, extends, version from spack import Package -- cgit v1.2.3-70-g09d2 From 0b7c673205049565a95707fd55d2c086dd601b35 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 10 May 2016 15:48:37 +0200 Subject: modules : changed syntax for environment modifications --- lib/spack/spack/config.py | 14 +++++++++++--- lib/spack/spack/modules.py | 22 +++++++++++++++++----- lib/spack/spack/test/modules.py | 3 +-- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index d008a513e7..6ddf07776b 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -251,6 +251,14 @@ section_schemas = { 'type': 'string' } }, + 'dictionary_of_strings': { + 'type': 'object', + 'patternProperties': { + r'\w[\w-]*': { # key + 'type': 'string' + } + } + }, 'dependency_selection': { 'type': 'string', 'enum': ['none', 'direct', 'all'] @@ -282,10 +290,10 @@ section_schemas = { 'default': {}, 'additionalProperties': False, 'properties': { - 'set': {'$ref': '#/definitions/array_of_strings'}, + 'set': {'$ref': '#/definitions/dictionary_of_strings'}, 'unset': {'$ref': '#/definitions/array_of_strings'}, - 'prepend_path': {'$ref': '#/definitions/array_of_strings'}, - 'append_path': {'$ref': '#/definitions/array_of_strings'} + 'prepend_path': {'$ref': '#/definitions/dictionary_of_strings'}, + 'append_path': {'$ref': '#/definitions/dictionary_of_strings'} } } } diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index f1c0bd87de..19bd1993a7 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -185,14 +185,26 @@ def parse_config_options(module_generator): # Environment modifications environment_actions = module_file_actions.pop('environment', {}) env = EnvironmentModifications() + + def process_arglist(arglist): + if method == 'unset': + for x in arglist: + yield (x,) + else: + for x in arglist.iteritems(): + yield x + for method, arglist in environment_actions.items(): - for item in arglist: - if method == 'unset': - args = [item] - else: - args = item.split(',') + for args in process_arglist(arglist): getattr(env, method)(*args) + # for item in arglist: + # if method == 'unset': + # args = [item] + # else: + # args = item.split(',') + # getattr(env, method)(*args) + return module_file_actions, env diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 704700417b..b8b0d6fc6a 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -47,7 +47,7 @@ configuration_alter_environment = { 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']} }, '=x86-linux': { - 'environment': {'set': ['FOO,foo'], 'unset': ['BAR']} + 'environment': {'set': {'FOO': 'foo'}, 'unset': ['BAR']} } } } @@ -99,7 +99,6 @@ class TclTests(MockPackagesTest): spec = spack.spec.Spec('mpich@3.0.4=x86-linux') content = self.get_modulefile_content(spec) self.assertTrue('module-whatis "mpich @3.0.4"' in content ) - self.assertEqual(len([x for x in content if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 1) def test_autoload(self): spack.modules.CONFIGURATION = configuration_autoload_direct -- cgit v1.2.3-70-g09d2 From c3f3f26632ff0450683c99bebcce3acfad8a5ebc Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 10 May 2016 16:16:50 +0200 Subject: modules : added warning if a user tries to add prerequisite with dotkit --- lib/spack/spack/modules.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 19bd1993a7..ffed469b20 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -382,11 +382,11 @@ class EnvModule(object): return tuple() def autoload(self, spec): - m = TclModule(spec) + m = type(self)(spec) return self.autoload_format.format(module_file=m.use_name) def prerequisite(self, spec): - m = TclModule(spec) + m = type(self)(spec) return self.prerequisite_format.format(module_file=m.use_name) def process_environment_command(self, env): @@ -449,6 +449,11 @@ class Dotkit(EnvModule): header += '#h %s\n' % line return header + def prerequisite(self, spec): + tty.warn('prerequisites: not supported by dotkit module files') + tty.warn('\tYou may want to check ~/.spack/modules.yaml') + return '' + class TclModule(EnvModule): name = 'tcl' -- cgit v1.2.3-70-g09d2 From 71e49e289a849b8aaa4f0d9a195d07569051ca88 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 10 May 2016 17:19:22 +0200 Subject: flake8 : fixed all issues? --- lib/spack/spack/cmd/module.py | 16 +-- lib/spack/spack/config.py | 204 ++++++++++++++++++++++++--------------- lib/spack/spack/environment.py | 51 ++++++---- lib/spack/spack/modules.py | 202 ++++++++++++++++++++++---------------- lib/spack/spack/test/__init__.py | 69 ++++--------- lib/spack/spack/test/modules.py | 42 +++++--- 6 files changed, 330 insertions(+), 254 deletions(-) diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index f996f4eb84..cfe59c8d98 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -32,18 +32,21 @@ from llnl.util.filesystem import mkdirp from spack.modules import module_types from spack.util.string import * -description ="Manipulate modules and dotkits." +description = "Manipulate modules and dotkits." def setup_parser(subparser): sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='module_command') - refresh_parser = sp.add_parser('refresh', help='Regenerate all module files.') + sp.add_parser('refresh', help='Regenerate all module files.') find_parser = sp.add_parser('find', help='Find module files for packages.') - find_parser.add_argument( - 'module_type', help="Type of module to find file for. [" + '|'.join(module_types) + "]") - find_parser.add_argument('spec', nargs='+', help='spec to find a module file for.') + find_parser.add_argument('module_type', + help="Type of module to find file for. [" + + '|'.join(module_types) + "]") + find_parser.add_argument('spec', + nargs='+', + help='spec to find a module file for.') def module_find(mtype, spec_array): @@ -53,7 +56,8 @@ def module_find(mtype, spec_array): should type to use that package's module. """ if mtype not in module_types: - tty.die("Invalid module type: '%s'. Options are %s" % (mtype, comma_or(module_types))) + tty.die("Invalid module type: '%s'. Options are %s" % + (mtype, comma_or(module_types))) specs = spack.cmd.parse_specs(spec_array) if len(specs) > 1: diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 6ddf07776b..684a420b3b 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -134,8 +134,6 @@ from yaml.error import MarkedYAMLError # Hacked yaml for configuration files preserves line numbers. import spack.util.spack_yaml as syaml - - """Dict from section names -> schema for that section.""" section_schemas = { 'compilers': { @@ -149,25 +147,31 @@ section_schemas = { 'default': {}, 'additionalProperties': False, 'patternProperties': { - r'\w[\w-]*': { # architecture + r'\w[\w-]*': { # architecture 'type': 'object', 'additionalProperties': False, 'patternProperties': { - r'\w[\w-]*@\w[\w-]*': { # compiler spec + r'\w[\w-]*@\w[\w-]*': { # compiler spec 'type': 'object', 'additionalProperties': False, 'required': ['cc', 'cxx', 'f77', 'fc'], 'properties': { - 'cc': { 'anyOf': [ {'type' : 'string' }, - {'type' : 'null' }]}, - 'cxx': { 'anyOf': [ {'type' : 'string' }, - {'type' : 'null' }]}, - 'f77': { 'anyOf': [ {'type' : 'string' }, - {'type' : 'null' }]}, - 'fc': { 'anyOf': [ {'type' : 'string' }, - {'type' : 'null' }]}, - },},},},},},},}, - + 'cc': {'anyOf': [{'type': 'string'}, + {'type': 'null'}]}, + 'cxx': {'anyOf': [{'type': 'string'}, + {'type': 'null'}]}, + 'f77': {'anyOf': [{'type': 'string'}, + {'type': 'null'}]}, + 'fc': {'anyOf': [{'type': 'string'}, + {'type': 'null'}]}, + }, + }, + }, + }, + }, + }, + }, + }, 'mirrors': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack mirror configuration file schema', @@ -180,8 +184,12 @@ section_schemas = { 'additionalProperties': False, 'patternProperties': { r'\w[\w-]*': { - 'type': 'string'},},},},}, - + 'type': 'string' + }, + }, + }, + }, + }, 'repos': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack repository configuration file schema', @@ -192,8 +200,11 @@ section_schemas = { 'type': 'array', 'default': [], 'items': { - 'type': 'string'},},},}, - + 'type': 'string' + }, + }, + }, + }, 'packages': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack package configuration file schema', @@ -205,39 +216,48 @@ section_schemas = { 'default': {}, 'additionalProperties': False, 'patternProperties': { - r'\w[\w-]*': { # package name + r'\w[\w-]*': { # package name 'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': { 'version': { - 'type' : 'array', - 'default' : [], - 'items' : { 'anyOf' : [ { 'type' : 'string' }, - { 'type' : 'number'}]}}, #version strings + 'type': 'array', + 'default': [], + 'items': {'anyOf': [{'type': 'string'}, + {'type': 'number'}]} + }, # version strings 'compiler': { - 'type' : 'array', - 'default' : [], - 'items' : { 'type' : 'string' } }, #compiler specs + 'type': 'array', + 'default': [], + 'items': {'type': 'string'} + }, # compiler specs 'buildable': { - 'type': 'boolean', + 'type': 'boolean', 'default': True, - }, + }, 'providers': { - 'type': 'object', + 'type': 'object', 'default': {}, 'additionalProperties': False, 'patternProperties': { r'\w[\w-]*': { - 'type' : 'array', - 'default' : [], - 'items' : { 'type' : 'string' },},},}, + 'type': 'array', + 'default': [], + 'items': {'type': 'string'}, + }, + }, + }, 'paths': { - 'type' : 'object', - 'default' : {}, + 'type': 'object', + 'default': {}, } - },},},},},}, - + }, + }, + }, + }, + }, + }, 'modules': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack module file configuration file schema', @@ -283,17 +303,22 @@ section_schemas = { } }, 'autoload': {'$ref': '#/definitions/dependency_selection'}, - 'prerequisites': {'$ref': '#/definitions/dependency_selection'}, + 'prerequisites': + {'$ref': '#/definitions/dependency_selection'}, 'conflict': {'$ref': '#/definitions/array_of_strings'}, 'environment': { 'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': { - 'set': {'$ref': '#/definitions/dictionary_of_strings'}, - 'unset': {'$ref': '#/definitions/array_of_strings'}, - 'prepend_path': {'$ref': '#/definitions/dictionary_of_strings'}, - 'append_path': {'$ref': '#/definitions/dictionary_of_strings'} + 'set': + {'$ref': '#/definitions/dictionary_of_strings'}, + 'unset': + {'$ref': '#/definitions/array_of_strings'}, + 'prepend_path': + {'$ref': '#/definitions/dictionary_of_strings'}, + 'append_path': + {'$ref': '#/definitions/dictionary_of_strings'} } } } @@ -304,15 +329,20 @@ section_schemas = { 'anyOf': [ { 'properties': { - 'whitelist': {'$ref': '#/definitions/array_of_strings'}, - 'blacklist': {'$ref': '#/definitions/array_of_strings'}, + 'whitelist': + {'$ref': '#/definitions/array_of_strings'}, + 'blacklist': + {'$ref': '#/definitions/array_of_strings'}, 'naming_scheme': { - 'type': 'string' # Can we be more specific here? + 'type': + 'string' # Can we be more specific here? } } }, { - 'patternProperties': {r'\w[\w-]*': {'$ref': '#/definitions/module_file_configuration'}} + 'patternProperties': + {r'\w[\w-]*': + {'$ref': '#/definitions/module_file_configuration'}} } ] } @@ -326,7 +356,8 @@ section_schemas = { 'prefix_inspections': { 'type': 'object', 'patternProperties': { - r'\w[\w-]*': { # path to be inspected for existence (relative to prefix) + r'\w[\w-]*': + { # path to be inspected (relative to prefix) '$ref': '#/definitions/array_of_strings' } } @@ -341,13 +372,15 @@ section_schemas = { }, 'tcl': { 'allOf': [ - {'$ref': '#/definitions/module_type_configuration'}, # Base configuration + {'$ref': '#/definitions/module_type_configuration' + }, # Base configuration {} # Specific tcl extensions ] }, 'dotkit': { 'allOf': [ - {'$ref': '#/definitions/module_type_configuration'}, # Base configuration + {'$ref': '#/definitions/module_type_configuration' + }, # Base configuration {} # Specific dotkit extensions ] }, @@ -356,7 +389,6 @@ section_schemas = { }, }, } - """OrderedDict of config scopes keyed by name. Later scopes will override earlier scopes. """ @@ -366,12 +398,13 @@ config_scopes = OrderedDict() def validate_section_name(section): """Raise a ValueError if the section is not a valid section.""" if section not in section_schemas: - raise ValueError("Invalid config section: '%s'. Options are %s" - % (section, section_schemas)) + raise ValueError("Invalid config section: '%s'. Options are %s" % + (section, section_schemas)) def extend_with_default(validator_class): - """Add support for the 'default' attribute for properties and patternProperties. + """Add support for the 'default' attribute for + properties and patternProperties jsonschema does not handle this out of the box -- it only validates. This allows us to set default values for configs @@ -380,13 +413,15 @@ def extend_with_default(validator_class): """ validate_properties = validator_class.VALIDATORS["properties"] - validate_pattern_properties = validator_class.VALIDATORS["patternProperties"] + validate_pattern_properties = validator_class.VALIDATORS[ + "patternProperties"] def set_defaults(validator, properties, instance, schema): for property, subschema in properties.iteritems(): if "default" in subschema: instance.setdefault(property, subschema["default"]) - for err in validate_properties(validator, properties, instance, schema): + for err in validate_properties(validator, properties, instance, + schema): yield err def set_pp_defaults(validator, properties, instance, schema): @@ -397,17 +432,19 @@ def extend_with_default(validator_class): if re.match(property, key) and val is None: instance[key] = subschema["default"] - for err in validate_pattern_properties(validator, properties, instance, schema): + for err in validate_pattern_properties(validator, properties, instance, + schema): yield err return validators.extend(validator_class, { - "properties" : set_defaults, - "patternProperties" : set_pp_defaults + "properties": set_defaults, + "patternProperties": set_pp_defaults }) DefaultSettingValidator = extend_with_default(Draft4Validator) + def validate_section(data, schema): """Validate data read in from a Spack YAML file. @@ -429,9 +466,9 @@ class ConfigScope(object): """ def __init__(self, name, path): - self.name = name # scope name. - self.path = path # path to directory containing configs. - self.sections = {} # sections read from config files. + self.name = name # scope name. + self.path = path # path to directory containing configs. + self.sections = {} # sections read from config files. # Register in a dict of all ConfigScopes # TODO: make this cleaner. Mocking up for testing is brittle. @@ -442,16 +479,14 @@ class ConfigScope(object): validate_section_name(section) return os.path.join(self.path, "%s.yaml" % section) - def get_section(self, section): - if not section in self.sections: - path = self.get_section_filename(section) + if section not in self.sections: + path = self.get_section_filename(section) schema = section_schemas[section] - data = _read_config_file(path, schema) + data = _read_config_file(path, schema) self.sections[section] = data return self.sections[section] - def write_section(self, section): filename = self.get_section_filename(section) data = self.get_section(section) @@ -463,8 +498,8 @@ class ConfigScope(object): except jsonschema.ValidationError as e: raise ConfigSanityError(e, data) except (yaml.YAMLError, IOError) as e: - raise ConfigFileError("Error writing to config file: '%s'" % str(e)) - + raise ConfigFileError("Error writing to config file: '%s'" % + str(e)) def clear(self): """Empty cached config information.""" @@ -496,8 +531,8 @@ def validate_scope(scope): return config_scopes[scope] else: - raise ValueError("Invalid config scope: '%s'. Must be one of %s" - % (scope, config_scopes.keys())) + raise ValueError("Invalid config scope: '%s'. Must be one of %s" % + (scope, config_scopes.keys())) def _read_config_file(filename, schema): @@ -523,12 +558,12 @@ def _read_config_file(filename, schema): return data except MarkedYAMLError as e: - raise ConfigFileError( - "Error parsing yaml%s: %s" % (str(e.context_mark), e.problem)) + raise ConfigFileError("Error parsing yaml%s: %s" % + (str(e.context_mark), e.problem)) except IOError as e: - raise ConfigFileError( - "Error reading configuration file %s: %s" % (filename, str(e))) + raise ConfigFileError("Error reading configuration file %s: %s" % + (filename, str(e))) def clear_config_caches(): @@ -551,6 +586,7 @@ def _merge_yaml(dest, source): parent instead of merging. """ + def they_are(t): return isinstance(dest, t) and isinstance(source, t) @@ -571,7 +607,7 @@ def _merge_yaml(dest, source): # Source dict is merged into dest. elif they_are(dict): for sk, sv in source.iteritems(): - if not sk in dest: + if sk not in dest: dest[sk] = copy.copy(sv) else: dest[sk] = _merge_yaml(dest[sk], source[sk]) @@ -653,7 +689,7 @@ def print_section(section): data = syaml.syaml_dict() data[section] = get_config(section) syaml.dump(data, stream=sys.stdout, default_flow_style=False) - except (yaml.YAMLError, IOError) as e: + except (yaml.YAMLError, IOError): raise ConfigError("Error reading configuration: %s" % section) @@ -683,15 +719,22 @@ def is_spec_buildable(spec): """Return true if the spec pkgspec is configured as buildable""" allpkgs = get_config('packages') name = spec.name - if not spec.name in allpkgs: + if name not in allpkgs: return True - if not 'buildable' in allpkgs[spec.name]: + if 'buildable' not in allpkgs[name]: return True return allpkgs[spec.name]['buildable'] -class ConfigError(SpackError): pass -class ConfigFileError(ConfigError): pass +class ConfigError(SpackError): + + pass + + +class ConfigFileError(ConfigError): + + pass + def get_path(path, data): if path: @@ -699,8 +742,10 @@ def get_path(path, data): else: return data + class ConfigFormatError(ConfigError): """Raised when a configuration format does not match its schema.""" + def __init__(self, validation_error, data): # Try to get line number from erroneous instance and its parent instance_mark = getattr(validation_error.instance, '_start_mark', None) @@ -733,5 +778,6 @@ class ConfigFormatError(ConfigError): message = '%s: %s' % (location, validation_error.message) super(ConfigError, self).__init__(message) + class ConfigSanityError(ConfigFormatError): """Same as ConfigFormatError, raised when config is written by Spack.""" diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 92ab4e6bea..9748b4033a 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -26,7 +26,8 @@ class SetEnv(NameValueModifier): class UnsetEnv(NameModifier): def execute(self): - os.environ.pop(self.name, None) # Avoid throwing if the variable was not set + # Avoid throwing if the variable was not set + os.environ.pop(self.name, None) class SetPath(NameValueModifier): @@ -55,7 +56,9 @@ class RemovePath(NameValueModifier): def execute(self): environment_value = os.environ.get(self.name, '') directories = environment_value.split(':') if environment_value else [] - directories = [os.path.normpath(x) for x in directories if x != os.path.normpath(self.value)] + directories = [os.path.normpath(x) + for x in directories + if x != os.path.normpath(self.value)] os.environ[self.name] = ':'.join(directories) @@ -63,7 +66,8 @@ class EnvironmentModifications(object): """ Keeps track of requests to modify the current environment. - Each call to a method to modify the environment stores the extra information on the caller in the request: + Each call to a method to modify the environment stores the extra + information on the caller in the request: - 'filename' : filename of the module where the caller is defined - 'lineno': line number where the request occurred - 'context' : line of code that issued the request that failed @@ -71,10 +75,10 @@ class EnvironmentModifications(object): def __init__(self, other=None): """ - Initializes a new instance, copying commands from other if it is not None + Initializes a new instance, copying commands from other if not None Args: - other: another instance of EnvironmentModifications from which (optional) + other: another instance of EnvironmentModifications """ self.env_modifications = [] if other is not None: @@ -93,7 +97,7 @@ class EnvironmentModifications(object): @staticmethod def _check_other(other): if not isinstance(other, EnvironmentModifications): - raise TypeError('other must be an instance of EnvironmentModifications') + raise TypeError('not an instance of EnvironmentModifications') def _get_outside_caller_attributes(self): stack = inspect.stack() @@ -101,12 +105,10 @@ class EnvironmentModifications(object): _, filename, lineno, _, context, index = stack[2] context = context[index].strip() except Exception: - filename, lineno, context = 'unknown file', 'unknown line', 'unknown context' - args = { - 'filename': filename, - 'lineno': lineno, - 'context': context - } + filename = 'unknown file' + lineno = 'unknown line' + context = 'unknown context' + args = {'filename': filename, 'lineno': lineno, 'context': context} return args def set(self, name, value, **kwargs): @@ -170,7 +172,7 @@ class EnvironmentModifications(object): def remove_path(self, name, path, **kwargs): """ - Stores in the current object a request to remove a path from a path list + Stores in the current object a request to remove a path from a list Args: name: name of the path list in the environment @@ -185,7 +187,8 @@ class EnvironmentModifications(object): Returns a dict of the modifications grouped by variable name Returns: - dict mapping the environment variable name to the modifications to be done on it + dict mapping the environment variable name to the modifications + to be done on it """ modifications = collections.defaultdict(list) for item in self: @@ -203,7 +206,8 @@ class EnvironmentModifications(object): Applies the modifications and clears the list """ modifications = self.group_by_name() - # Apply the modifications to the environment variables one variable at a time + # Apply the modifications to the environment variables one variable + # at a time for name, actions in sorted(modifications.items()): for x in actions: x.execute() @@ -224,13 +228,17 @@ def concatenate_paths(paths): def set_or_unset_not_first(variable, changes, errstream): """ - Check if we are going to set or unset something after other modifications have already been requested + Check if we are going to set or unset something after other modifications + have already been requested """ - indexes = [ii for ii, item in enumerate(changes) if ii != 0 and type(item) in [SetEnv, UnsetEnv]] + indexes = [ii + for ii, item in enumerate(changes) + if ii != 0 and type(item) in [SetEnv, UnsetEnv]] if indexes: good = '\t \t{context} at {filename}:{lineno}' nogood = '\t--->\t{context} at {filename}:{lineno}' - errstream('Suspicious requests to set or unset the variable \'{var}\' found'.format(var=variable)) + message = 'Suspicious requests to set or unset the variable \'{var}\' found' # NOQA: ignore=E501 + errstream(message.format(var=variable)) for ii, item in enumerate(changes): print_format = nogood if ii in indexes else good errstream(print_format.format(**item.args)) @@ -238,8 +246,8 @@ def set_or_unset_not_first(variable, changes, errstream): def validate(env, errstream): """ - Validates the environment modifications to check for the presence of suspicious patterns. Prompts a warning for - everything that was found + Validates the environment modifications to check for the presence of + suspicious patterns. Prompts a warning for everything that was found Current checks: - set or unset variables after other changes on the same variable @@ -254,7 +262,8 @@ def validate(env, errstream): def filter_environment_blacklist(env, variables): """ - Generator that filters out any change to environment variables present in the input list + Generator that filters out any change to environment variables present in + the input list Args: env: list of environment modifications diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index ffed469b20..0dc6f06f55 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -23,36 +23,34 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## """ -This module contains code for creating environment modules, which can include dotkits, tcl modules, lmod, and others. +This module contains code for creating environment modules, which can include +dotkits, tcl modules, lmod, and others. -The various types of modules are installed by post-install hooks and removed after an uninstall by post-uninstall hooks. -This class consolidates the logic for creating an abstract description of the information that module systems need. -Currently that includes a number of directories to be appended to paths in the user's environment: +The various types of modules are installed by post-install hooks and removed +after an uninstall by post-uninstall hooks. This class consolidates the logic +for creating an abstract description of the information that module systems +need. - * /bin directories to be appended to PATH - * /lib* directories for LD_LIBRARY_PATH - * /include directories for CPATH - * /man* and /share/man* directories for MANPATH - * the package prefix for CMAKE_PREFIX_PATH +This module also includes logic for coming up with unique names for the module +files so that they can be found by the various shell-support files in +$SPACK/share/spack/setup-env.*. -This module also includes logic for coming up with unique names for the module files so that they can be found by the -various shell-support files in $SPACK/share/spack/setup-env.*. - -Each hook in hooks/ implements the logic for writing its specific type of module file. +Each hook implements the logic for writing its specific type of module. """ import copy import datetime import os import os.path import re -import textwrap import string +import textwrap import llnl.util.tty as tty import spack import spack.config from llnl.util.filesystem import join_path, mkdirp -from spack.build_environment import parent_class_modules, set_module_variables_for_package +from spack.build_environment import parent_class_modules +from spack.build_environment import set_module_variables_for_package from spack.environment import * __all__ = ['EnvModule', 'Dotkit', 'TclModule'] @@ -67,30 +65,26 @@ def print_help(): """ For use by commands to tell user how to activate shell support. """ - tty.msg("This command requires spack's shell integration.", - "", + tty.msg("This command requires spack's shell integration.", "", "To initialize spack's shell commands, you must run one of", "the commands below. Choose the right command for your shell.", - "", - "For bash and zsh:", - " . %s/setup-env.sh" % spack.share_path, - "", - "For csh and tcsh:", - " setenv SPACK_ROOT %s" % spack.prefix, - " source %s/setup-env.csh" % spack.share_path, - "") + "", "For bash and zsh:", + " . %s/setup-env.sh" % spack.share_path, "", + "For csh and tcsh:", " setenv SPACK_ROOT %s" % spack.prefix, + " source %s/setup-env.csh" % spack.share_path, "") def inspect_path(prefix): """ - Inspects the prefix of an installation to search for common layouts. Issues a request to modify the environment - accordingly when an item is found. + Inspects the prefix of an installation to search for common layouts. + Issues a request to modify the environment when an item is found. Args: prefix: prefix of the installation Returns: - instance of EnvironmentModifications containing the requested modifications + instance of EnvironmentModifications containing the requested + modifications """ env = EnvironmentModifications() # Inspect the prefix to check for the existence of common directories @@ -105,18 +99,22 @@ def inspect_path(prefix): def dependencies(spec, request='all'): """ - Returns the list of dependent specs for a given spec, according to the given request + Returns the list of dependent specs for a given spec, according to the + given request Args: spec: target spec request: either 'none', 'direct' or 'all' Returns: - empty list if 'none', direct dependency list if 'direct', all dependencies if 'all' + empty list if 'none', direct dependency list if 'direct', all + dependencies if 'all' """ if request not in ('none', 'direct', 'all'): - raise tty.error("Wrong value for argument 'request' : should be one of ('none', 'direct', 'all') " - " [current value is '%s']" % request) + message = "Wrong value for argument 'request' : " + message += "should be one of ('none', 'direct', 'all')" + message += " [current value is '{0}']" + raise tty.error(message.format(request)) if request == 'none': return [] @@ -124,12 +122,19 @@ def dependencies(spec, request='all'): if request == 'direct': return [xx for _, xx in spec.dependencies.items()] - # FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes' - # FIXME : is given. This work around permits to get a unique list of spec anyhow. - # FIXME : Possibly we miss a merge step among nodes that refer to the same package. + # FIXME : during module file creation nodes seem to be visited + # FIXME : multiple times even if cover='nodes' is given. This work around + # FIXME : permits to get a unique list of spec anyhow. Maybe we miss a + # FIXME : merge step among nodes that refer to the same package? seen = set() seen_add = seen.add - l = [xx for xx in sorted(spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] + l = [xx + for xx in sorted( + spec.traverse(order='post', + depth=True, + cover='nodes', + root=False), + reverse=True)] return [xx for ii, xx in l if not (xx in seen or seen_add(xx))] @@ -146,7 +151,8 @@ def update_dictionary_extending_lists(target, update): def parse_config_options(module_generator): """ - Parse the configuration file and returns a bunch of items that will be needed during module file generation + Parse the configuration file and returns a bunch of items that will be + needed during module file generation Args: module_generator: module generator for a given spec @@ -154,11 +160,14 @@ def parse_config_options(module_generator): Returns: autoloads: list of specs to be autoloaded prerequisites: list of specs to be marked as prerequisite - filters: list of environment variables whose modification is blacklisted in module files - env: list of custom environment modifications to be applied in the module file + filters: list of environment variables whose modification is + blacklisted in module files + env: list of custom environment modifications to be applied in the + module file """ # Get the configuration for this kind of generator - module_configuration = copy.deepcopy(CONFIGURATION.get(module_generator.name, {})) + module_configuration = copy.deepcopy(CONFIGURATION.get( + module_generator.name, {})) ##### # Merge all the rules @@ -179,9 +188,12 @@ def parse_config_options(module_generator): ##### # Automatic loading loads - module_file_actions['autoload'] = dependencies(module_generator.spec, module_file_actions.get('autoload', 'none')) + module_file_actions['autoload'] = dependencies( + module_generator.spec, module_file_actions.get('autoload', 'none')) # Prerequisites - module_file_actions['prerequisites'] = dependencies(module_generator.spec, module_file_actions.get('prerequisites', 'none')) + module_file_actions['prerequisites'] = dependencies( + module_generator.spec, module_file_actions.get('prerequisites', + 'none')) # Environment modifications environment_actions = module_file_actions.pop('environment', {}) env = EnvironmentModifications() @@ -189,7 +201,7 @@ def parse_config_options(module_generator): def process_arglist(arglist): if method == 'unset': for x in arglist: - yield (x,) + yield (x, ) else: for x in arglist.iteritems(): yield x @@ -198,19 +210,20 @@ def parse_config_options(module_generator): for args in process_arglist(arglist): getattr(env, method)(*args) - # for item in arglist: - # if method == 'unset': - # args = [item] - # else: - # args = item.split(',') - # getattr(env, method)(*args) + # for item in arglist: + # if method == 'unset': + # args = [item] + # else: + # args = item.split(',') + # getattr(env, method)(*args) return module_file_actions, env def filter_blacklisted(specs, module_name): """ - Given a sequence of specs, filters the ones that are blacklisted in the module configuration file. + Given a sequence of specs, filters the ones that are blacklisted in the + module configuration file. Args: specs: sequence of spec instances @@ -233,7 +246,8 @@ class EnvModule(object): class __metaclass__(type): def __init__(cls, name, bases, dict): type.__init__(cls, name, bases, dict) - if cls.name != 'env_module' and cls.name in CONFIGURATION['enable']: + if cls.name != 'env_module' and cls.name in CONFIGURATION[ + 'enable']: module_types[cls.name] = cls def __init__(self, spec=None): @@ -249,7 +263,8 @@ class EnvModule(object): # long description is the docstring with reduced whitespace. self.long_description = None if self.spec.package.__doc__: - self.long_description = re.sub(r'\s+', ' ', self.spec.package.__doc__) + self.long_description = re.sub(r'\s+', ' ', + self.spec.package.__doc__) @property def naming_scheme(self): @@ -271,12 +286,14 @@ class EnvModule(object): @property def use_name(self): """ - Subclasses should implement this to return the name the module command uses to refer to the package. + Subclasses should implement this to return the name the module command + uses to refer to the package. """ naming_tokens = self.tokens naming_scheme = self.naming_scheme name = naming_scheme.format(**naming_tokens) - name += '-' + self.spec.dag_hash() # Always append the hash to make the module file unique + name += '-' + self.spec.dag_hash( + ) # Always append the hash to make the module file unique # Not everybody is working on linux... parts = name.split('/') name = join_path(*parts) @@ -296,8 +313,12 @@ class EnvModule(object): @property def blacklisted(self): configuration = CONFIGURATION.get(self.name, {}) - whitelist_matches = [x for x in configuration.get('whitelist', []) if self.spec.satisfies(x)] - blacklist_matches = [x for x in configuration.get('blacklist', []) if self.spec.satisfies(x)] + whitelist_matches = [x + for x in configuration.get('whitelist', []) + if self.spec.satisfies(x)] + blacklist_matches = [x + for x in configuration.get('blacklist', []) + if self.spec.satisfies(x)] if whitelist_matches: message = '\tWHITELIST : %s [matches : ' % self.spec.cshort_spec for rule in whitelist_matches: @@ -327,7 +348,8 @@ class EnvModule(object): """ if self.blacklisted: return - tty.debug("\tWRITE : %s [%s]" % (self.spec.cshort_spec, self.file_name)) + tty.debug("\tWRITE : %s [%s]" % + (self.spec.cshort_spec, self.file_name)) module_dir = os.path.dirname(self.file_name) if not os.path.exists(module_dir): @@ -337,11 +359,12 @@ class EnvModule(object): # installation prefix env = inspect_path(self.spec.prefix) - # Let the extendee/dependency modify their extensions/dependencies before asking for - # package-specific modifications + # Let the extendee/dependency modify their extensions/dependencies + # before asking for package-specific modifications spack_env = EnvironmentModifications() - # TODO : the code down below is quite similar to build_environment.setup_package and needs to be - # TODO : factored out to a single place + # TODO : the code down below is quite similar to + # TODO : build_environment.setup_package and needs to be factored out + # TODO : to a single place for item in dependencies(self.spec, 'all'): package = self.spec[item.name].package modules = parent_class_modules(package.__class__) @@ -358,14 +381,18 @@ class EnvModule(object): # Parse configuration file module_configuration, conf_env = parse_config_options(self) env.extend(conf_env) - filters = module_configuration.get('filter', {}).get('environment_blacklist',{}) + filters = module_configuration.get('filter', {}).get( + 'environment_blacklist', {}) # Build up the module file content module_file_content = self.header - for x in filter_blacklisted(module_configuration.pop('autoload', []), self.name): + for x in filter_blacklisted( + module_configuration.pop('autoload', []), self.name): module_file_content += self.autoload(x) - for x in filter_blacklisted(module_configuration.pop('prerequisites', []), self.name): + for x in filter_blacklisted( + module_configuration.pop('prerequisites', []), self.name): module_file_content += self.prerequisite(x) - for line in self.process_environment_command(filter_environment_blacklist(env, filters)): + for line in self.process_environment_command( + filter_environment_blacklist(env, filters)): module_file_content += line for line in self.module_specific_content(module_configuration): module_file_content += line @@ -392,10 +419,13 @@ class EnvModule(object): def process_environment_command(self, env): for command in env: try: - yield self.environment_modifications_formats[type(command)].format(**command.args) + yield self.environment_modifications_formats[type( + command)].format(**command.args) except KeyError: - tty.warn('Cannot handle command of type {command} : skipping request'.format(command=type(command))) - tty.warn('{context} at {filename}:{lineno}'.format(**command.args)) + message = 'Cannot handle command of type {command} : skipping request' # NOQA: ignore=E501 + tty.warn(message.format(command=type(command))) + context = '{context} at {filename}:{lineno}' + tty.warn(context.format(**command.args)) @property def file_name(self): @@ -408,9 +438,12 @@ class EnvModule(object): if os.path.exists(mod_file): try: os.remove(mod_file) # Remove the module file - os.removedirs(os.path.dirname(mod_file)) # Remove all the empty directories from the leaf up + os.removedirs( + os.path.dirname(mod_file) + ) # Remove all the empty directories from the leaf up except OSError: - pass # removedirs throws OSError on first non-empty directory found + # removedirs throws OSError on first non-empty directory found + pass class Dotkit(EnvModule): @@ -424,13 +457,12 @@ class Dotkit(EnvModule): autoload_format = 'dk_op {module_file}\n' - prerequisite_format = None # TODO : does something like prerequisite exist for dotkit? - - default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' + default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' # NOQA: ignore=E501 @property def file_name(self): - return join_path(Dotkit.path, self.spec.architecture, '%s.dk' % self.use_name) + return join_path(Dotkit.path, self.spec.architecture, + '%s.dk' % self.use_name) @property def header(self): @@ -474,7 +506,7 @@ class TclModule(EnvModule): prerequisite_format = 'prereq {module_file}\n' - default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' + default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' # NOQA: ignore=E501 @property def file_name(self): @@ -482,9 +514,10 @@ class TclModule(EnvModule): @property def header(self): + timestamp = datetime.datetime.now() # TCL Modulefile header header = '#%Module1.0\n' - header += '## Module file created by spack (https://github.com/LLNL/spack) on %s\n' % datetime.datetime.now() + header += '## Module file created by spack (https://github.com/LLNL/spack) on %s\n' % timestamp # NOQA: ignore=E501 header += '##\n' header += '## %s\n' % self.spec.short_spec header += '##\n' @@ -509,16 +542,19 @@ class TclModule(EnvModule): f = string.Formatter() for item in conflict_format: line = 'conflict ' + item + '\n' - if len([x for x in f.parse(line)]) > 1: # We do have placeholder to substitute - for naming_dir, conflict_dir in zip(self.naming_scheme.split('/'), item.split('/')): + if len([x for x in f.parse(line) + ]) > 1: # We do have placeholder to substitute + for naming_dir, conflict_dir in zip( + self.naming_scheme.split('/'), item.split('/')): if naming_dir != conflict_dir: - message = 'conflict scheme does not match naming scheme [{spec}]\n\n' + message = 'conflict scheme does not match naming' + message += ' [{spec}]\n\n' message += 'naming scheme : "{nformat}"\n' message += 'conflict scheme : "{cformat}"\n\n' - message += '** You may want to check your `modules.yaml` configuration file **\n' - tty.error( - message.format(spec=self.spec, nformat=self.naming_scheme, cformat=item) - ) + message += '** You may want to check your `modules.yaml` configuration file **\n' # NOQA: ignore=E501 + tty.error(message.format(spec=self.spec, + nformat=self.naming_scheme, + cformat=item)) raise SystemExit('Module generation aborted.') line = line.format(**naming_tokens) yield line diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index 05f58ab7b1..395ca0c87a 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -23,53 +23,23 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import sys -import unittest -import nose -from spack.test.tally_plugin import Tally -from llnl.util.filesystem import join_path import llnl.util.tty as tty -from llnl.util.tty.colify import colify - +import nose import spack - +from llnl.util.filesystem import join_path +from llnl.util.tty.colify import colify +from spack.test.tally_plugin import Tally """Names of tests to be included in Spack's test suite""" -test_names = ['versions', - 'url_parse', - 'url_substitution', - 'packages', - 'stage', - 'spec_syntax', - 'spec_semantics', - 'spec_dag', - 'concretize', - 'multimethod', - 'install', - 'package_sanity', - 'config', - 'directory_layout', - 'pattern', - 'python_version', - 'git_fetch', - 'svn_fetch', - 'hg_fetch', - 'mirror', - 'modules', - 'url_extrapolate', - 'cc', - 'link_tree', - 'spec_yaml', - 'optional_deps', - 'make_executable', - 'configure_guess', - 'lock', - 'database', - 'namespace_trie', - 'yaml', - 'sbang', - 'environment', - 'cmd.uninstall', - 'cmd.test_install'] +test_names = ['versions', 'url_parse', 'url_substitution', 'packages', 'stage', + 'spec_syntax', 'spec_semantics', 'spec_dag', 'concretize', + 'multimethod', 'install', 'package_sanity', 'config', + 'directory_layout', 'pattern', 'python_version', 'git_fetch', + 'svn_fetch', 'hg_fetch', 'mirror', 'modules', 'url_extrapolate', + 'cc', 'link_tree', 'spec_yaml', 'optional_deps', + 'make_executable', 'configure_guess', 'lock', 'database', + 'namespace_trie', 'yaml', 'sbang', 'environment', + 'cmd.uninstall', 'cmd.test_install'] def list_tests(): @@ -80,7 +50,6 @@ def list_tests(): def run(names, outputDir, verbose=False): """Run tests with the supplied names. Names should be a list. If it's empty, run ALL of Spack's tests.""" - verbosity = 1 if not verbose else 2 if not names: names = test_names @@ -95,7 +64,7 @@ def run(names, outputDir, verbose=False): tally = Tally() for test in names: module = 'spack.test.' + test - print module + print(module) tty.msg("Running test: %s" % test) @@ -105,15 +74,13 @@ def run(names, outputDir, verbose=False): xmlOutputFname = "unittests-{0}.xml".format(test) xmlOutputPath = join_path(outputDir, xmlOutputFname) runOpts += ["--with-xunit", - "--xunit-file={0}".format(xmlOutputPath)] + "--xunit-file={0}".format(xmlOutputPath)] argv = [""] + runOpts + [module] - result = nose.run(argv=argv, addplugins=[tally]) + nose.run(argv=argv, addplugins=[tally]) succeeded = not tally.failCount and not tally.errorCount - tty.msg("Tests Complete.", - "%5d tests run" % tally.numberOfTestsRun, - "%5d failures" % tally.failCount, - "%5d errors" % tally.errorCount) + tty.msg("Tests Complete.", "%5d tests run" % tally.numberOfTestsRun, + "%5d failures" % tally.failCount, "%5d errors" % tally.errorCount) if succeeded: tty.info("OK", format='g') diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index b8b0d6fc6a..f0ff778a10 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -2,14 +2,18 @@ import collections from contextlib import contextmanager import StringIO +import spack.modules +from spack.test.mock_packages_test import MockPackagesTest FILE_REGISTRY = collections.defaultdict(StringIO.StringIO) + # Monkey-patch open to write module files to a StringIO instance @contextmanager def mock_open(filename, mode): if not mode == 'w': - raise RuntimeError('test.modules : unexpected opening mode for monkey-patched open') + message = 'test.modules : unexpected opening mode [mock_open]' + raise RuntimeError(message) FILE_REGISTRY[filename] = StringIO.StringIO() @@ -20,7 +24,6 @@ def mock_open(filename, mode): FILE_REGISTRY[filename] = handle.getvalue() handle.close() -import spack.modules configuration_autoload_direct = { 'enable': ['tcl'], @@ -47,7 +50,8 @@ configuration_alter_environment = { 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']} }, '=x86-linux': { - 'environment': {'set': {'FOO': 'foo'}, 'unset': ['BAR']} + 'environment': {'set': {'FOO': 'foo'}, + 'unset': ['BAR']} } } } @@ -72,15 +76,14 @@ configuration_conflicts = { } } -from spack.test.mock_packages_test import MockPackagesTest - class TclTests(MockPackagesTest): def setUp(self): super(TclTests, self).setUp() self.configuration_obj = spack.modules.CONFIGURATION spack.modules.open = mock_open - spack.modules.CONFIGURATION = None # Make sure that a non-mocked configuration will trigger an error + # Make sure that a non-mocked configuration will trigger an error + spack.modules.CONFIGURATION = None def tearDown(self): del spack.modules.open @@ -98,7 +101,7 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_autoload_direct spec = spack.spec.Spec('mpich@3.0.4=x86-linux') content = self.get_modulefile_content(spec) - self.assertTrue('module-whatis "mpich @3.0.4"' in content ) + self.assertTrue('module-whatis "mpich @3.0.4"' in content) def test_autoload(self): spack.modules.CONFIGURATION = configuration_autoload_direct @@ -117,14 +120,22 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_alter_environment spec = spack.spec.Spec('mpileaks=x86-linux') content = self.get_modulefile_content(spec) - self.assertEqual(len([x for x in content if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) - self.assertEqual(len([x for x in content if 'setenv FOO "foo"' in x]), 1) + self.assertEqual( + len([x + for x in content + if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) + self.assertEqual( + len([x for x in content if 'setenv FOO "foo"' in x]), 1) self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 1) spec = spack.spec.Spec('libdwarf=x64-linux') content = self.get_modulefile_content(spec) - self.assertEqual(len([x for x in content if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) - self.assertEqual(len([x for x in content if 'setenv FOO "foo"' in x]), 0) + self.assertEqual( + len([x + for x in content + if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) + self.assertEqual( + len([x for x in content if 'setenv FOO "foo"' in x]), 0) self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 0) def test_blacklist(self): @@ -138,6 +149,9 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_conflicts spec = spack.spec.Spec('mpileaks=x86-linux') content = self.get_modulefile_content(spec) - self.assertEqual(len([x for x in content if x.startswith('conflict')]), 2) - self.assertEqual(len([x for x in content if x == 'conflict mpileaks']), 1) - self.assertEqual(len([x for x in content if x == 'conflict intel/14.0.1']), 1) + self.assertEqual( + len([x for x in content if x.startswith('conflict')]), 2) + self.assertEqual( + len([x for x in content if x == 'conflict mpileaks']), 1) + self.assertEqual( + len([x for x in content if x == 'conflict intel/14.0.1']), 1) -- cgit v1.2.3-70-g09d2 From fa44cd5cefae8890ece95b9870e24058dcd0a10f Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Tue, 10 May 2016 17:30:44 +0200 Subject: renaming py-Genshi into py-genshi --- var/spack/repos/builtin/packages/py-Genshi/package.py | 18 ------------------ var/spack/repos/builtin/packages/py-genshi/package.py | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/py-Genshi/package.py create mode 100644 var/spack/repos/builtin/packages/py-genshi/package.py diff --git a/var/spack/repos/builtin/packages/py-Genshi/package.py b/var/spack/repos/builtin/packages/py-Genshi/package.py deleted file mode 100644 index d485c89429..0000000000 --- a/var/spack/repos/builtin/packages/py-Genshi/package.py +++ /dev/null @@ -1,18 +0,0 @@ -from spack import version, extends, depends_on -from spack import Package - - -class PyGenshi(Package): - """Python toolkit for generation of output for the web""" - homepage = "https://genshi.edgewall.org/" - url = "http://ftp.edgewall.com/pub/genshi/Genshi-0.7.tar.gz" - - version('0.7', '54e64dd69da3ec961f86e686e0848a82') - version('0.6.1', '372c368c8931110b0a521fa6091742d7') - version('0.6', '604e8b23b4697655d36a69c2d8ef7187') - - extends("python") - depends_on("py-setuptools") - - def install(self, spec, prefix): - python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-genshi/package.py b/var/spack/repos/builtin/packages/py-genshi/package.py new file mode 100644 index 0000000000..d485c89429 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-genshi/package.py @@ -0,0 +1,18 @@ +from spack import version, extends, depends_on +from spack import Package + + +class PyGenshi(Package): + """Python toolkit for generation of output for the web""" + homepage = "https://genshi.edgewall.org/" + url = "http://ftp.edgewall.com/pub/genshi/Genshi-0.7.tar.gz" + + version('0.7', '54e64dd69da3ec961f86e686e0848a82') + version('0.6.1', '372c368c8931110b0a521fa6091742d7') + version('0.6', '604e8b23b4697655d36a69c2d8ef7187') + + extends("python") + depends_on("py-setuptools") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From c90ecc6847c034f648d49c813e4a633bf16322fb Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 10 May 2016 08:58:30 -0700 Subject: Add F821 to ignore list. - Consider removing this once names like `cmake` and `configure` are moved to a sensible namespace. --- flake8.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake8.ini b/flake8.ini index f8bff04355..32ced73dd7 100644 --- a/flake8.ini +++ b/flake8.ini @@ -1,3 +1,3 @@ [flake8] -ignore = W391,F403,E221 +ignore = W391,F403,E221,F821 max-line-length = 79 -- cgit v1.2.3-70-g09d2 From c8d88607425866413c0d3c931e760c89c01a00fd Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 10 May 2016 17:46:11 +0200 Subject: astyle: fix formatting --- var/spack/repos/builtin/packages/astyle/package.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py index c8e8c3cbec..57083bb947 100644 --- a/var/spack/repos/builtin/packages/astyle/package.py +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -1,8 +1,11 @@ from spack import * -import os + class Astyle(Package): - """A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, Objective-C, C#, and Java Source Code.""" + """ + A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, + Objective-C, C#, and Java Source Code. + """ homepage = "http://astyle.sourceforge.net/" url = "http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz" @@ -11,13 +14,15 @@ class Astyle(Package): def install(self, spec, prefix): with working_dir('src'): - # unfortunately we need to edit the makefile in place to set compiler: - make_file = join_path(self.stage.source_path,'build','gcc','Makefile') - filter_file(r'^CXX\s*=.*', 'CXX=%s' % spack_cxx, make_file) + # we need to edit the makefile in place to set compiler: + make_file = join_path(self.stage.source_path, + 'build', 'gcc', 'Makefile') + filter_file(r'^CXX\s*=.*', 'CXX=%s'.format(spack_cxx), make_file) make('-f', - make_file, - parallel=False) + make_file, + parallel=False) mkdirp(self.prefix.bin) - install(join_path(self.stage.source_path, 'src','bin','astyle'), self.prefix.bin) + install(join_path(self.stage.source_path, 'src', 'bin', 'astyle'), + self.prefix.bin) -- cgit v1.2.3-70-g09d2 From 979b53cab605d250dfe23edaacc6b0d2ff88d978 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 10 May 2016 18:33:07 +0200 Subject: qa : modifying 2 packages and a framework file just for the sake of it --- lib/spack/spack/architecture.py | 1 + var/spack/repos/builtin/packages/ImageMagick/package.py | 4 +++- var/spack/repos/builtin/packages/Mitos/package.py | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 2701fab90c..eec7636d00 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -44,6 +44,7 @@ class NoSysTypeError(serr.SpackError): "Could not determine sys_type for this machine.") + def get_sys_type_from_spack_globals(): """Return the SYS_TYPE from spack globals, or None if it isn't set.""" if not hasattr(spack, "sys_type"): diff --git a/var/spack/repos/builtin/packages/ImageMagick/package.py b/var/spack/repos/builtin/packages/ImageMagick/package.py index 753ea80ca6..d0a820b5fc 100644 --- a/var/spack/repos/builtin/packages/ImageMagick/package.py +++ b/var/spack/repos/builtin/packages/ImageMagick/package.py @@ -23,8 +23,10 @@ class Imagemagick(Package): version('6.8.9-10', 'aa050bf9785e571c956c111377bbf57c', url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download") - depends_on('libtool') + + depends_on('jpeg') + depends_on('libtool') 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 ea131872dd..073c473b93 100644 --- a/var/spack/repos/builtin/packages/Mitos/package.py +++ b/var/spack/repos/builtin/packages/Mitos/package.py @@ -19,6 +19,8 @@ class Mitos(Package): depends_on('hwloc') depends_on('mpi') + + def install(self, spec, prefix): with working_dir('spack-build', create=True): cmake('..', *std_cmake_args) -- cgit v1.2.3-70-g09d2 From 190c437980ecb7e1710643b05278cfd4f4b77b1b Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 10 May 2016 18:38:30 +0200 Subject: qa : copied flake8 configuration, updated travis.yml --- .travis.yml | 2 +- flake8-framework.ini | 3 +++ flake8-packages.ini | 3 +++ flake8.ini | 3 --- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 flake8-framework.ini create mode 100644 flake8-packages.ini delete mode 100644 flake8.ini diff --git a/.travis.yml b/.travis.yml index 4ff4d5f483..96138813e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ script: - coverage run bin/spack test # Checks if the file that have been changed are flake8 conformant - CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py$/'` - - if [[ ${CHANGED_PYTHON_FILES} ]] ; then flake8 --format pylint --config flake8.ini ${CHANGED_PYTHON_FILES} ; fi + - if [[ ${CHANGED_PYTHON_FILES} ]] ; then flake8 --format pylint --config flake8-framework.ini ${CHANGED_PYTHON_FILES} ; fi after_success: diff --git a/flake8-framework.ini b/flake8-framework.ini new file mode 100644 index 0000000000..32ced73dd7 --- /dev/null +++ b/flake8-framework.ini @@ -0,0 +1,3 @@ +[flake8] +ignore = W391,F403,E221,F821 +max-line-length = 79 diff --git a/flake8-packages.ini b/flake8-packages.ini new file mode 100644 index 0000000000..32ced73dd7 --- /dev/null +++ b/flake8-packages.ini @@ -0,0 +1,3 @@ +[flake8] +ignore = W391,F403,E221,F821 +max-line-length = 79 diff --git a/flake8.ini b/flake8.ini deleted file mode 100644 index 32ced73dd7..0000000000 --- a/flake8.ini +++ /dev/null @@ -1,3 +0,0 @@ -[flake8] -ignore = W391,F403,E221,F821 -max-line-length = 79 -- cgit v1.2.3-70-g09d2 From 3f20014f335f50e6bac8f8ced7a36fae00537c61 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 10 May 2016 18:45:11 +0200 Subject: qa : differentiate framework from packages --- .travis.yml | 7 +++++-- flake8-framework.ini | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96138813e2..c41692c08e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,9 +25,12 @@ script: - spack install -v libdwarf # Run unit tests with code coverage - coverage run bin/spack test - # Checks if the file that have been changed are flake8 conformant - - CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py$/'` + # Checks if the file that have been changed are flake8 conformant [framework] + - CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py$/' | perl -ne 'print if not /var/' ` - if [[ ${CHANGED_PYTHON_FILES} ]] ; then flake8 --format pylint --config flake8-framework.ini ${CHANGED_PYTHON_FILES} ; fi + # Checks if the file that have been changed are flake8 conformant [packages] + - CHANGED_PACKAGES=`git diff develop... --name-only | perl -ne 'print if /\.py$/' | perl -ne 'print if /var/' ` + - if [[ ${CHANGED_PACKAGES} ]] ; then flake8 --format pylint --config flake8-packages.ini ${CHANGED_PACKAGES} ; fi after_success: diff --git a/flake8-framework.ini b/flake8-framework.ini index 32ced73dd7..f8bff04355 100644 --- a/flake8-framework.ini +++ b/flake8-framework.ini @@ -1,3 +1,3 @@ [flake8] -ignore = W391,F403,E221,F821 +ignore = W391,F403,E221 max-line-length = 79 -- cgit v1.2.3-70-g09d2 From 7d74e209f365ba135acd9dfe738737bcf37d4b79 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 10 May 2016 19:20:26 +0200 Subject: qa : this should still fail due to F821 --- lib/spack/spack/architecture.py | 15 +++++++-------- var/spack/repos/builtin/packages/ImageMagick/package.py | 14 +++++++------- var/spack/repos/builtin/packages/Mitos/package.py | 9 +++------ 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index eec7636d00..62c25c8003 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -34,15 +34,14 @@ import spack.error as serr class InvalidSysTypeError(serr.SpackError): def __init__(self, sys_type): - super(InvalidSysTypeError, self).__init__( - "Invalid sys_type value for Spack: " + sys_type) + super(InvalidSysTypeError, + self).__init__("Invalid sys_type value for Spack: " + sys_type) class NoSysTypeError(serr.SpackError): def __init__(self): - super(NoSysTypeError, self).__init__( - "Could not determine sys_type for this machine.") - + super(NoSysTypeError, + self).__init__("Could not determine sys_type for this machine.") def get_sys_type_from_spack_globals(): @@ -70,15 +69,15 @@ def get_sys_type_from_platform(): @memoized def sys_type(): """Returns a SysType for the current machine.""" - methods = [get_sys_type_from_spack_globals, - get_sys_type_from_environment, + methods = [get_sys_type_from_spack_globals, get_sys_type_from_environment, get_sys_type_from_platform] # search for a method that doesn't return None sys_type = None for method in methods: sys_type = method() - if sys_type: break + if sys_type: + break # Couldn't determine the sys_type for this machine. if sys_type is None: diff --git a/var/spack/repos/builtin/packages/ImageMagick/package.py b/var/spack/repos/builtin/packages/ImageMagick/package.py index d0a820b5fc..7a3d12e364 100644 --- a/var/spack/repos/builtin/packages/ImageMagick/package.py +++ b/var/spack/repos/builtin/packages/ImageMagick/package.py @@ -1,10 +1,11 @@ from spack import * + class Imagemagick(Package): """ImageMagick is a image processing library""" homepage = "http://www.imagemagic.org" - #------------------------------------------------------------------------- + # ------------------------------------------------------------------------- # ImageMagick does not keep around anything but *-10 versions, so # this URL may change. If you want the bleeding edge, you can # uncomment it and see if it works but you may need to try to @@ -17,13 +18,13 @@ class Imagemagick(Package): # version('6.9.0-6', 'c1bce7396c22995b8bdb56b7797b4a1b', # url="http://www.imagemagick.org/download/ImageMagick-6.9.0-6.tar.bz2") - #------------------------------------------------------------------------- + # ------------------------------------------------------------------------- # *-10 versions are archived, so these versions should fetch reliably. # ------------------------------------------------------------------------- - version('6.8.9-10', 'aa050bf9785e571c956c111377bbf57c', - url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download") - - + version( + '6.8.9-10', + 'aa050bf9785e571c956c111377bbf57c', + url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download") # NOQA: ignore=E501 depends_on('jpeg') depends_on('libtool') @@ -34,6 +35,5 @@ class Imagemagick(Package): def install(self, spec, prefix): configure("--prefix=%s" % prefix) - make() make("install") diff --git a/var/spack/repos/builtin/packages/Mitos/package.py b/var/spack/repos/builtin/packages/Mitos/package.py index 073c473b93..ec1d56a5c7 100644 --- a/var/spack/repos/builtin/packages/Mitos/package.py +++ b/var/spack/repos/builtin/packages/Mitos/package.py @@ -1,26 +1,23 @@ from spack import * + class Mitos(Package): """Mitos is a library and a tool for collecting sampled memory performance data to view with MemAxes""" homepage = "https://github.com/llnl/Mitos" - url = "https://github.com/llnl/Mitos" + url = "https://github.com/llnl/Mitos" version('0.9.2', git='https://github.com/llnl/Mitos.git', commit='8cb143a2e8c00353ff531a781a9ca0992b0aaa3d') - version('0.9.1', - git='https://github.com/llnl/Mitos.git', - tag='v0.9.1') + version('0.9.1', git='https://github.com/llnl/Mitos.git', tag='v0.9.1') depends_on('dyninst@8.2.1:') depends_on('hwloc') depends_on('mpi') - - def install(self, spec, prefix): with working_dir('spack-build', create=True): cmake('..', *std_cmake_args) -- cgit v1.2.3-70-g09d2 From 4cb91d6f7b6680140e0011da1f7965c430920067 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Tue, 10 May 2016 19:46:24 +0200 Subject: Added documentation on lockf/flock. --- lib/spack/docs/basic_usage.rst | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 29791d98c4..58e67e4550 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -1246,6 +1246,38 @@ several variants: spack deactivate -a python +A word of warning +----------------------- + +If you run `spack find` and you get an error similar to the following: + +.. code-block:: sh + + $ ./spack find + Traceback (most recent call last): + File "./spack", line 176, 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)) + File "./spack/lib/spack/spack/database.py", line 551, in query + with self.read_transaction(): + File "./spack/lib/spack/spack/database.py", line 598, in __enter__ + if self._enter() and self._acquire_fn: + File "./spack/lib/spack/spack/database.py", line 608, in _enter + return self._db.lock.acquire_read(self._timeout) + File "./spack/lib/spack/llnl/util/lock.py", line 103, in acquire_read + self._lock(fcntl.LOCK_SH, timeout) # can raise LockError. + File "./spack/lib/spack/llnl/util/lock.py", line 64, in _lock + fcntl.lockf(self._fd, op | fcntl.LOCK_NB) + IOError: [Errno 38] Function not implemented + + +it most likely means that you are trying to run spack in a shared +network filesystem without support for lockf/flock. Currently this is not +supported, and you should ask your system administrator to enable lockf/flock. + Getting Help ----------------------- -- cgit v1.2.3-70-g09d2 From 98faee1d5c24ddacaeb1bc630ff8c31ba0d74f9b Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 10 May 2016 11:19:17 -0700 Subject: Minor tweaks to `flock` docs. --- lib/spack/docs/basic_usage.rst | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 58e67e4550..f08a2bb675 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -1246,13 +1246,30 @@ several variants: spack deactivate -a python -A word of warning ------------------------ +Filesystem requirements +-------------------------- -If you run `spack find` and you get an error similar to the following: +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 +filesystem might look like this: .. code-block:: sh - + + $ mount -l | grep lscratch + pilsner-mds1-lnet0@o2ib100:/lsd on /p/lscratchd type lustre (rw,nosuid,noauto,_netdev,lazystatfs,flock) + porter-mds1-lnet0@o2ib100:/lse on /p/lscratche type lustre (rw,nosuid,noauto,_netdev,lazystatfs,flock) + +Note the ``flock`` option on both Lustre mounts. If you do not see +this or a similar option for your filesystem, you may need ot ask your +system administrator to enable ``flock``. + +This issue typically manifests with the error below: + +.. code-block:: sh + $ ./spack find Traceback (most recent call last): File "./spack", line 176, in @@ -1273,11 +1290,7 @@ If you run `spack find` and you get an error similar to the following: fcntl.lockf(self._fd, op | fcntl.LOCK_NB) IOError: [Errno 38] Function not implemented - -it most likely means that you are trying to run spack in a shared -network filesystem without support for lockf/flock. Currently this is not -supported, and you should ask your system administrator to enable lockf/flock. - +A nicer error message is TBD in future versions of Spack. Getting Help ----------------------- -- cgit v1.2.3-70-g09d2 From 5d477bc956e0033bd2816d48df1f4096856bc5fe Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Tue, 10 May 2016 23:19:30 +0200 Subject: fix setting config for list parameters --- lib/spack/spack/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 336d47cbb7..06954f535b 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -545,7 +545,10 @@ def update_config(section, update_data, scope=None): # read in the config to ensure we've got current data configuration = get_config(section) - configuration.update(update_data) + if isinstance(update_data, list): + configuration = update_data + else: + configuration.extend(update_data) # read only the requested section's data. scope.sections[section] = {section: configuration} -- cgit v1.2.3-70-g09d2 From 6e462abb4d208584cb5f984f2f4c177bcec37dd4 Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Tue, 10 May 2016 23:31:29 +0200 Subject: hmm... test before commit --- lib/spack/spack/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 06954f535b..3bdefd3a6c 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -548,7 +548,7 @@ def update_config(section, update_data, scope=None): if isinstance(update_data, list): configuration = update_data else: - configuration.extend(update_data) + configuration.update(update_data) # read only the requested section's data. scope.sections[section] = {section: configuration} -- cgit v1.2.3-70-g09d2 From 05b6c3f8cfd065dcf4173613a64ed94fa1815d31 Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Wed, 11 May 2016 00:14:24 +0200 Subject: add test for list parameters --- lib/spack/spack/test/config.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index 3977f0e7d4..ed0797a541 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -72,6 +72,10 @@ b_comps = { } } +# Some Sample repo data +repos_low = [ "/some/path" ] +repos_high = [ "/some/other/path" ] + class ConfigTest(MockPackagesTest): def setUp(self): @@ -95,6 +99,12 @@ class ConfigTest(MockPackagesTest): actual = config[arch][key][c] self.assertEqual(expected, actual) + def test_write_list_in_memory(self): + spack.config.update_config('repos', repos_low, 'test_low_priority') + spack.config.update_config('repos', repos_high, 'test_high_priority') + config = spack.config.get_config('repos') + self.assertEqual(config, repos_high+repos_low) + def test_write_key_in_memory(self): # Write b_comps "on top of" a_comps. spack.config.update_config('compilers', a_comps, 'test_low_priority') -- cgit v1.2.3-70-g09d2 From c1e6b5218438988d7dc2da5ca577fe5a8752d6e1 Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Wed, 11 May 2016 00:28:12 +0200 Subject: first round of coding rules --- lib/spack/spack/config.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 3bdefd3a6c..9da5d7aaf0 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -129,7 +129,6 @@ from ordereddict_backport import OrderedDict import llnl.util.tty as tty from llnl.util.filesystem import mkdirp -import copy import spack from spack.error import SpackError @@ -306,13 +305,14 @@ def extend_with_default(validator_class): yield err return validators.extend(validator_class, { - "properties" : set_defaults, - "patternProperties" : set_pp_defaults + "properties": set_defaults, + "patternProperties": set_pp_defaults }) DefaultSettingValidator = extend_with_default(Draft4Validator) + def validate_section(data, schema): """Validate data read in from a Spack YAML file. @@ -347,16 +347,14 @@ class ConfigScope(object): validate_section_name(section) return os.path.join(self.path, "%s.yaml" % section) - def get_section(self, section): - if not section in self.sections: + if section not in self.sections: path = self.get_section_filename(section) schema = section_schemas[section] data = _read_config_file(path, schema) self.sections[section] = data return self.sections[section] - def write_section(self, section): filename = self.get_section_filename(section) data = self.get_section(section) @@ -370,7 +368,6 @@ class ConfigScope(object): except (yaml.YAMLError, IOError) as e: raise ConfigFileError("Error writing to config file: '%s'" % str(e)) - def clear(self): """Empty cached config information.""" self.sections = {} @@ -476,7 +473,7 @@ def _merge_yaml(dest, source): # Source dict is merged into dest. elif they_are(dict): for sk, sv in source.iteritems(): - if not sk in dest: + if sk not in dest: dest[sk] = copy.copy(sv) else: dest[sk] = _merge_yaml(dest[sk], source[sk]) @@ -590,16 +587,20 @@ def spec_externals(spec): def is_spec_buildable(spec): """Return true if the spec pkgspec is configured as buildable""" allpkgs = get_config('packages') - name = spec.name - if not spec.name in allpkgs: + if spec.name not in allpkgs: return True - if not 'buildable' in allpkgs[spec.name]: + if 'buildable' not in allpkgs[spec.name]: return True return allpkgs[spec.name]['buildable'] -class ConfigError(SpackError): pass -class ConfigFileError(ConfigError): pass +class ConfigError(SpackError): + pass + + +class ConfigFileError(ConfigError): + pass + def get_path(path, data): if path: @@ -607,6 +608,7 @@ def get_path(path, data): else: return data + class ConfigFormatError(ConfigError): """Raised when a configuration format does not match its schema.""" def __init__(self, validation_error, data): @@ -641,5 +643,6 @@ class ConfigFormatError(ConfigError): message = '%s: %s' % (location, validation_error.message) super(ConfigError, self).__init__(message) + class ConfigSanityError(ConfigFormatError): """Same as ConfigFormatError, raised when config is written by Spack.""" -- cgit v1.2.3-70-g09d2 From 2aa4387ebac307285c1b2c90bc6527b82fe83839 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 10 May 2016 23:45:41 -0700 Subject: Update code style checking. - Exempt overlong URL lines from checks. - Omit some of the more painful PEP items. --- .style.yapf | 3 --- .travis.yml | 24 ++++++++++++++++++------ flake8-framework.ini | 3 --- flake8-packages.ini | 3 --- share/spack/qa/flake8-framework | 10 ++++++++++ share/spack/qa/flake8-packages | 11 +++++++++++ 6 files changed, 39 insertions(+), 15 deletions(-) delete mode 100644 .style.yapf delete mode 100644 flake8-framework.ini delete mode 100644 flake8-packages.ini create mode 100644 share/spack/qa/flake8-framework create mode 100644 share/spack/qa/flake8-packages diff --git a/.style.yapf b/.style.yapf deleted file mode 100644 index a4b3f65252..0000000000 --- a/.style.yapf +++ /dev/null @@ -1,3 +0,0 @@ -[style] -based_on_style = pep8 -column_limit = 79 diff --git a/.travis.yml b/.travis.yml index c41692c08e..9acba991c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,23 +15,35 @@ before_install: # Need this for the git tests to succeed. - git config --global user.email "spack@example.com" - git config --global user.name "Test User" + # Need this to be able to compute the list of changed files - git fetch origin develop:develop script: + # Regular spack setup and tests - . share/spack/setup-env.sh - spack compilers - spack config get compilers - spack install -v libdwarf + # Run unit tests with code coverage - coverage run bin/spack test - # Checks if the file that have been changed are flake8 conformant [framework] - - CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py$/' | perl -ne 'print if not /var/' ` - - if [[ ${CHANGED_PYTHON_FILES} ]] ; then flake8 --format pylint --config flake8-framework.ini ${CHANGED_PYTHON_FILES} ; fi - # Checks if the file that have been changed are flake8 conformant [packages] - - CHANGED_PACKAGES=`git diff develop... --name-only | perl -ne 'print if /\.py$/' | perl -ne 'print if /var/' ` - - if [[ ${CHANGED_PACKAGES} ]] ; then flake8 --format pylint --config flake8-packages.ini ${CHANGED_PACKAGES} ; fi + # Check if changed files are flake8 conformant [framework] + - changed=$(git diff --name-only develop... | grep '.py$' | grep -v ^var/) + - [[ $changed ]] && \ + flake8 --format pylint --config share/spack/qa/flake8-framework $changed + + # Check if changed files are flake8 conformant [packages] + - changed=$(git diff --name-only develop... | grep '.py$' | grep ^var/) + + # Exempt url lines in changed packages from overlong errors. + - for file in $changed; do \ + [[ file = *package.py ]] && \ + perl -i~ -pe 's/^(\s*url\s*=.*)$/\1 # NOQA/' $file; \ + done + - [[ $changed ]] && \ + flake8 --format pylint --config share/spack/qa/flake8-packages $changed after_success: - coveralls diff --git a/flake8-framework.ini b/flake8-framework.ini deleted file mode 100644 index f8bff04355..0000000000 --- a/flake8-framework.ini +++ /dev/null @@ -1,3 +0,0 @@ -[flake8] -ignore = W391,F403,E221 -max-line-length = 79 diff --git a/flake8-packages.ini b/flake8-packages.ini deleted file mode 100644 index 32ced73dd7..0000000000 --- a/flake8-packages.ini +++ /dev/null @@ -1,3 +0,0 @@ -[flake8] -ignore = W391,F403,E221,F821 -max-line-length = 79 diff --git a/share/spack/qa/flake8-framework b/share/spack/qa/flake8-framework new file mode 100644 index 0000000000..b1ad00b80f --- /dev/null +++ b/share/spack/qa/flake8-framework @@ -0,0 +1,10 @@ +# -*- conf -*- +[flake8] +# Descriptions of ignored checks: +# +# E221: multiple spaces before operator +# E241: multiple spaces after ‘,’ +# F403: disable wildcard import +# +ignore = E221,E241,F403 +max-line-length = 79 diff --git a/share/spack/qa/flake8-packages b/share/spack/qa/flake8-packages new file mode 100644 index 0000000000..0e5be249fb --- /dev/null +++ b/share/spack/qa/flake8-packages @@ -0,0 +1,11 @@ +# -*- conf -*- +[flake8] +# Descriptions of ignored checks: +# +# E221: multiple spaces before operator +# E241: multiple spaces after ‘,’ +# F403: disable wildcard import +# F821: undefined name (needed for build commands) +# +ignore = E221,E241,F403,F821 +max-line-length = 79 -- cgit v1.2.3-70-g09d2 From d7847ff7685a52670a9d01cf39bd44eff1a57684 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 11 May 2016 01:16:41 -0700 Subject: Use just one flake8 file; mark package.py files to avoid E501 w/url. --- .flake8 | 12 ++++++++++++ share/spack/qa/flake8-framework | 10 ---------- share/spack/qa/flake8-packages | 11 ----------- var/spack/repos/builtin/packages/ImageMagick/package.py | 2 +- 4 files changed, 13 insertions(+), 22 deletions(-) create mode 100644 .flake8 delete mode 100644 share/spack/qa/flake8-framework delete mode 100644 share/spack/qa/flake8-packages diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000000..ab1e14b66e --- /dev/null +++ b/.flake8 @@ -0,0 +1,12 @@ +# -*- conf -*- +[flake8] +# Descriptions of ignored checks: +# +# E221: multiple spaces before operator +# E241: multiple spaces after ‘,’ +# F403: disable wildcard import +# F821: undefined name (needed for build commands) +# F999: Undefined undefined name (needed for build commands) +# +ignore = E221,E241,F403,F821,F999 +max-line-length = 79 diff --git a/share/spack/qa/flake8-framework b/share/spack/qa/flake8-framework deleted file mode 100644 index b1ad00b80f..0000000000 --- a/share/spack/qa/flake8-framework +++ /dev/null @@ -1,10 +0,0 @@ -# -*- conf -*- -[flake8] -# Descriptions of ignored checks: -# -# E221: multiple spaces before operator -# E241: multiple spaces after ‘,’ -# F403: disable wildcard import -# -ignore = E221,E241,F403 -max-line-length = 79 diff --git a/share/spack/qa/flake8-packages b/share/spack/qa/flake8-packages deleted file mode 100644 index 0e5be249fb..0000000000 --- a/share/spack/qa/flake8-packages +++ /dev/null @@ -1,11 +0,0 @@ -# -*- conf -*- -[flake8] -# Descriptions of ignored checks: -# -# E221: multiple spaces before operator -# E241: multiple spaces after ‘,’ -# F403: disable wildcard import -# F821: undefined name (needed for build commands) -# -ignore = E221,E241,F403,F821 -max-line-length = 79 diff --git a/var/spack/repos/builtin/packages/ImageMagick/package.py b/var/spack/repos/builtin/packages/ImageMagick/package.py index 7a3d12e364..3a86d9fb7c 100644 --- a/var/spack/repos/builtin/packages/ImageMagick/package.py +++ b/var/spack/repos/builtin/packages/ImageMagick/package.py @@ -24,7 +24,7 @@ class Imagemagick(Package): version( '6.8.9-10', 'aa050bf9785e571c956c111377bbf57c', - url="http://sourceforge.net/projects/imagemagick/files/old-sources/6.x/6.8/ImageMagick-6.8.9-10.tar.gz/download") # NOQA: ignore=E501 + 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') -- cgit v1.2.3-70-g09d2 From f15837505420e878e7b5ec2139686985deb54401 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 11 May 2016 01:17:52 -0700 Subject: .travis.yml uses a script now. - user can run the same script. --- .travis.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9acba991c7..904143a00f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,21 +29,8 @@ script: # Run unit tests with code coverage - coverage run bin/spack test - # Check if changed files are flake8 conformant [framework] - - changed=$(git diff --name-only develop... | grep '.py$' | grep -v ^var/) - - [[ $changed ]] && \ - flake8 --format pylint --config share/spack/qa/flake8-framework $changed - - # Check if changed files are flake8 conformant [packages] - - changed=$(git diff --name-only develop... | grep '.py$' | grep ^var/) - - # Exempt url lines in changed packages from overlong errors. - - for file in $changed; do \ - [[ file = *package.py ]] && \ - perl -i~ -pe 's/^(\s*url\s*=.*)$/\1 # NOQA/' $file; \ - done - - [[ $changed ]] && \ - flake8 --format pylint --config share/spack/qa/flake8-packages $changed + # Run flake8 code style checks. + - share/spack/qa/run-flake8 after_success: - coveralls -- cgit v1.2.3-70-g09d2 From c512b37a4e26bb639893d06c9f2df30fb6dd6892 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 11 May 2016 01:25:40 -0700 Subject: format .flake8 more nicely. --- .flake8 | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.flake8 b/.flake8 index ab1e14b66e..a1e2fcc1f8 100644 --- a/.flake8 +++ b/.flake8 @@ -1,12 +1,20 @@ # -*- conf -*- -[flake8] -# Descriptions of ignored checks: +# flake8 settings for Spack. +# +# Below we describe which flake8 checks Spack ignores and what the +# rationale is. +# +# Let people line things up nicely: +# - E221: multiple spaces before operator +# - E241: multiple spaces after ‘,’ # -# E221: multiple spaces before operator -# E241: multiple spaces after ‘,’ -# F403: disable wildcard import -# F821: undefined name (needed for build commands) -# F999: Undefined undefined name (needed for build commands) +# Spack allows wildcard imports: +# - F403: disable wildcard import # +# These are required to get the package.py files to test clean. +# - F821: undefined name (needed for cmake, configure, etc.) +# - F999: name name be undefined or undefined from star imports. +# +[flake8] ignore = E221,E241,F403,F821,F999 max-line-length = 79 -- cgit v1.2.3-70-g09d2 From 78d25ad337e2faaa8cfd589607801acb78aec4d9 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 11 May 2016 02:01:24 -0700 Subject: Add run-flake8 script. - was missing the obvious. --- share/spack/qa/run-flake8 | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 share/spack/qa/run-flake8 diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8 new file mode 100755 index 0000000000..722c7fcba6 --- /dev/null +++ b/share/spack/qa/run-flake8 @@ -0,0 +1,55 @@ +#!/bin/bash +# +# This script runs source code style checks on Spack. +# +# It should be executed from the top-level directory of the repo, +# e.g.: +# +# share/spack/qa/run-flake8 +# +# To run it, you'll need to have the Python flake8 installed locally. +# +PYTHONPATH=./lib/spack:$PYTHONPATH + +flake8="$(which flake8)" +if [[ ! $flake8 ]]; then + echo "ERROR: flake8 is required to run this script." + exit 1 +fi + +# Check if changed files are flake8 conformant [framework] +changed=$(git diff --name-only develop... | grep '.py$') + +# Exempt url lines in changed packages from overlong line errors. +for file in $changed; do + if [[ $file = *package.py ]]; then + perl -i~ -pe 's/^(\s*url\s*=.*)$/\1 # NOQA: ignore=E501/' $file; + fi +done + +return_code=0 +if [[ $changed ]]; then + echo ======================================================= + echo flake8: running flake8 code checks on spack. + echo + echo Modified files: + echo $changed | perl -pe 's/^/ /;s/ +/\n /g' + echo ======================================================= + if flake8 --format pylint $changed; then + echo "Flake8 checks were clean." + else + echo "Flake8 found errors." + return_code=1 + fi +else + echo No core framework files modified. +fi + +# Restore original package files after modifying them. +for file in $changed; do + if [[ $file = *package.py ]]; then + mv "${file}~" "${file}" + fi +done + +exit $return_code -- cgit v1.2.3-70-g09d2 From 6d6eb0f2d1e1f5f4fd340f8e5f3a5159be7e7f40 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 11 May 2016 02:32:13 -0700 Subject: Remove config.py from flake checking for now. --- lib/spack/spack/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 9da5d7aaf0..21e08ff666 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -1,3 +1,4 @@ +# flake8: noqa ############################################################################## # Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. -- cgit v1.2.3-70-g09d2 From 3d3a520a7d79f40f167f2856c5787ef94739eedc Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 11 May 2016 02:59:08 -0700 Subject: update readme for flake8 checking --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 1f7bcc5c61..fe00e2af27 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,11 @@ a [pull request](https://help.github.com/articles/using-pull-requests/). When you send your request, make ``develop`` the destination branch on the [Spack repository](https://github.com/LLNL/spack). +Your contribution will need to pass all the tests run by the `spack test` +command, as well as the formatting checks in `share/spack/qa/run-flake8`. +You should run both of these before submitting your pull request, to +ensure that the online checks succeed. + Spack is using a rough approximation of the [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) branching model. The ``develop`` branch contains the latest -- cgit v1.2.3-70-g09d2 From 0b7b25487f326b1ff6e0d04b41e1753398262b58 Mon Sep 17 00:00:00 2001 From: Benedikt Hegner Date: Wed, 11 May 2016 13:29:27 +0200 Subject: improve error message for wrong config section names --- lib/spack/spack/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 21e08ff666..9488e49ab9 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -269,10 +269,10 @@ config_scopes = OrderedDict() def validate_section_name(section): - """Raise a ValueError if the section is not a valid section.""" + """Exit if the section is not a valid section.""" if section not in section_schemas: - raise ValueError("Invalid config section: '%s'. Options are %s" - % (section, section_schemas)) + tty.die("Invalid config section: '%s'. Options are: %s" + % (section, " ".join(section_schemas.keys()))) def extend_with_default(validator_class): -- cgit v1.2.3-70-g09d2 From 809ded74c99ac6883bc5b5e4c7a2da887131360c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 11 May 2016 15:02:14 +0200 Subject: add functions for simple unit tests; refactor openblas to use them --- lib/spack/spack/package_test.py | 64 ++++++++++++++++++++++ .../repos/builtin/packages/openblas/package.py | 39 +++---------- 2 files changed, 72 insertions(+), 31 deletions(-) create mode 100644 lib/spack/spack/package_test.py diff --git a/lib/spack/spack/package_test.py b/lib/spack/spack/package_test.py new file mode 100644 index 0000000000..4b021684ee --- /dev/null +++ b/lib/spack/spack/package_test.py @@ -0,0 +1,64 @@ +############################################################################## +# Copyright (c) 2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +import os + +def compile_c_and_execute(source_file,include_flags, link_flags): + """Compile C @p source_file with @p include_flags and @p link_flags, + run and return the output. + """ + cc = which('cc') + flags = include_flags + flags.extend([source_file]) + cc('-c', *flags) + name = os.path.splitext(os.path.basename(source_file))[0] + cc('-o', "check", "%s.o" % name, + *link_flags) + + check = Executable('./check') + return check(return_output=True) + + +def compare_output(current_output, blessed_output): + """Compare blessed and current output of executables.""" + if not (current_output == blessed_output): + print "Produced output does not match expected output." + print "Expected output:" + print '-'*80 + print blessed_output + print '-'*80 + print "Produced output:" + print '-'*80 + print current_output + print '-'*80 + raise RuntimeError("Ouput check failed. See spack_output.log for details") + + +def compare_output_file(current_output, blessed_output_file): + """Same as above, but when the blessed output is given as a file.""" + with open(blessed_output_file, 'r') as f: + blessed_output = f.read() + + compare_output(current_output,blessed_output) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index d147533491..47b30181a8 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -1,4 +1,5 @@ from spack import * +from spack.package_test import * import sys import os import shutil @@ -94,42 +95,18 @@ class Openblas(Package): self.spec.lapack_shared_lib = self.spec.blas_shared_lib def check_install(self, spec): - # TODO: Pull this out to the framework function which recieves a pair of xyz.c and xyz.output - print "Checking Openblas installation..." source_file = join_path(os.path.dirname(self.module.__file__), 'test_cblas_dgemm.c') - output_file = join_path(os.path.dirname(self.module.__file__), - 'test_cblas_dgemm.output') + blessed_file = join_path(os.path.dirname(self.module.__file__), + 'test_cblas_dgemm.output') - with open(output_file, 'r') as f: - expected = f.read() - - cc = which('cc') - cc('-c', "-I%s" % join_path(spec.prefix, "include"), source_file) + include_flags = ["-I%s" % join_path(spec.prefix, "include")] link_flags = ["-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas", - "-lpthread" - ] + "-lpthread"] if '+openmp' in spec: link_flags.extend([self.compiler.openmp_flag]) - cc('-o', "check", "test_cblas_dgemm.o", - *link_flags) - - try: - check = Executable('./check') - output = check(return_output=True) - except: - output = "" - success = output == expected - if not success: - print "Produced output does not match expected output." - print "Expected output:" - print '-'*80 - print expected - print '-'*80 - print "Produced output:" - print '-'*80 - print output - print '-'*80 - raise RuntimeError("Openblas install check failed") + + output = compile_c_and_execute(source_file,include_flags,link_flags) + compare_output_file(output,blessed_file) -- cgit v1.2.3-70-g09d2 From 361b6290341e1248b3c5a5c3895b03610cb7ae3f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 11 May 2016 15:09:48 +0200 Subject: openblas: make unit test more robust by outputing only the solution vector from dgesv --- var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c | 2 +- var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c index 3813a23b69..2cb90fb883 100644 --- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.c @@ -43,7 +43,7 @@ int main(void) { int ldb = 3; dgesv_(&n,&nrhs, &m[0], &lda, ipiv, &x[0], &ldb, &info); for (i=0; i<3; ++i) - printf("%5.1f %3d\n", x[i], ipiv[i]); + printf("%5.1f\n", x[i]); return 0; } diff --git a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output index 9c235e314f..01404462c4 100644 --- a/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output +++ b/var/spack/repos/builtin/packages/openblas/test_cblas_dgemm.output @@ -7,6 +7,6 @@ 5.000000 -1.000000 3.000000 - -0.3 1 - 3.0 1499101120 - -3.0 32767 + -0.3 + 3.0 + -3.0 -- cgit v1.2.3-70-g09d2 From b215b19cae1eaf665dfbec4e20c36497c57dd182 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 11 May 2016 15:42:48 +0200 Subject: modules : added docs --- lib/spack/docs/basic_usage.rst | 272 ++++++++++++++++++++++++++++++++++++----- lib/spack/spack/package.py | 2 +- 2 files changed, 242 insertions(+), 32 deletions(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 29791d98c4..ce79ee0929 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -788,7 +788,7 @@ versions are now filtered out. .. _shell-support: -Environment modules +Integration with module systems ------------------------------- .. note:: @@ -798,42 +798,50 @@ Environment modules interface and/or generated module names may change in future versions. -Spack provides some limited integration with environment module -systems to make it easier to use the packages it provides. +Spack provides some integration with +`Environment Modules `_ +and `Dotkit `_ to make +it easier to use the packages it installed. + Installing Environment Modules -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order to use Spack's generated environment modules, you must have installed the *Environment Modules* package. On many Linux -distributions, this can be installed from the vendor's repository. -For example: ```yum install environment-modules`` -(Fedora/RHEL/CentOS). If your Linux distribution does not have -Environment Modules, you can get it with Spack: +distributions, this can be installed from the vendor's repository: + +.. code-block:: sh -1. Install with:: + yum install environment-modules # (Fedora/RHEL/CentOS) + apt-get install environment-modules # (Ubuntu/Debian) + +If your Linux distribution does not have +Environment Modules, you can get it with Spack: .. code-block:: sh spack install environment-modules -2. Activate with:: -Add the following two lines to your ``.bashrc`` profile (or similar): +In this case to activate it automatically you need to add the following two +lines to your ``.bashrc`` profile (or similar): .. code-block:: sh MODULES_HOME=`spack location -i environment-modules` source ${MODULES_HOME}/Modules/init/bash -In case you use a Unix shell other than bash, substitute ``bash`` by -the appropriate file in ``${MODULES_HOME}/Modules/init/``. +If you use a Unix shell other than ``bash``, modify the commands above +accordingly and source the appropriate file in +``${MODULES_HOME}/Modules/init/``. -Spack and Environment Modules -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. TODO : Add a similar section on how to install dotkit ? +Spack and module systems +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can enable shell support by sourcing some files in the ``/share/spack`` directory. @@ -841,7 +849,7 @@ For ``bash`` or ``ksh``, run: .. code-block:: sh - . $SPACK_ROOT/share/spack/setup-env.sh + . ${SPACK_ROOT}/share/spack/setup-env.sh For ``csh`` and ``tcsh`` run: @@ -853,17 +861,19 @@ For ``csh`` and ``tcsh`` run: You can put the above code in your ``.bashrc`` or ``.cshrc``, and Spack's shell support will be available on the command line. -When you install a package with Spack, it automatically generates an -environment module that lets you add the package to your environment. +When you install a package with Spack, it automatically generates a module file +that lets you add the package to your environment. -Currently, Spack supports the generation of `TCL Modules +Currently, Spack supports the generation of `Environment Modules `_ and `Dotkit `_. Generated module files for each of these systems can be found in these directories: - * ``$SPACK_ROOT/share/spack/modules`` - * ``$SPACK_ROOT/share/spack/dotkit`` +.. code-block:: sh + + ${SPACK_ROOT}/share/spack/modules + ${SPACK_ROOT}/share/spack/dotkit The directories are automatically added to your ``MODULEPATH`` and ``DK_NODE`` environment variables when you enable Spack's `shell @@ -919,8 +929,7 @@ of installed packages. The names here should look familiar, they're the same ones from ``spack find``. You *can* use the names here directly. For example, -you could type either of these commands to load the callpath module -(assuming dotkit and modules are installed): +you could type either of these commands to load the callpath module: .. code-block:: sh @@ -935,7 +944,7 @@ easy to type. Luckily, Spack has its own interface for using modules and dotkits. You can use the same spec syntax you're used to: ========================= ========================== - Modules Dotkit + Environment Modules Dotkit ========================= ========================== ``spack load `` ``spack use `` ``spack unload `` ``spack unuse `` @@ -1002,15 +1011,216 @@ used ``gcc``. You could therefore just type: To identify just the one built with the Intel compiler. +Module files generation and customization +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Environment Modules and Dotkit files are generated when packages are installed, +and are placed in the following directories under the Spack root: + +.. code-block:: sh + + ${SPACK_ROOT}/share/spack/modules + ${SPACK_ROOT}/share/spack/dotkit + +The content that gets written in each module file can be customized in two ways: + + 1. overriding part of the ``spack.Package`` API within a ``package.py`` + 2. writing dedicated configuration files + +Override ``Package`` API +^^^^^^^^^^^^^^^^^^^^^^^^ +There are currently two methods in ``spack.Package`` that may affect the content +of module files: + +.. code-block:: python + + def setup_environment(self, spack_env, run_env): + """Set up the compile and runtime environments for a package.""" + pass + +.. code-block:: python + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + """Set up the environment of packages that depend on this one""" + pass + +As briefly stated in the comments, the first method lets you customize the +module file content for the package you are currently writing, the second +allows for modifications to your dependees module file. In both cases one +needs to fill ``run_env`` with the desired list of environment modifications. + +Example : ``builtin/packages/python/package.py`` +"""""""""""""""""""""""""""""""""""""""""""""""" + +The ``python`` package that comes with the ``builtin`` Spack repository +overrides ``setup_dependent_environment`` in the following way: + +.. code-block:: python + + def setup_dependent_environment(self, spack_env, run_env, extension_spec): + # ... + if extension_spec.package.extends(self.spec): + run_env.prepend_path('PYTHONPATH', os.path.join(extension_spec.prefix, self.site_packages_dir)) + +to insert the appropriate ``PYTHONPATH`` modifications in the module +files of python packages. + +Configuration files +^^^^^^^^^^^^^^^^^^^ + +Another way of modifying the content of module files is writing a +``modules.yaml`` configuration file. Following usual Spack conventions, this +file can be placed either at *site* or *user* scope. + +The default site configuration reads: + + .. literalinclude:: ../../../etc/spack/modules.yaml + :language: yaml + +It basically inspects the installation prefixes for the +existence of a few folders and, if they exist, it prepends a path to a given +list of environment variables. + +For each module system that can be enabled a finer configuration is possible: + +.. code-block:: yaml + + modules: + tcl: + # contains environment modules specific customizations + dotkit: + # contains dotkit specific customizations -Regenerating Module files -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The structure under the ``tcl`` and ``dotkit`` keys is almost equal, and will +be showcased in the following by some examples. -Module and dotkit files are generated when packages are installed, and -are placed in the following directories under the Spack root: +Select module files by spec constraints +""""""""""""""""""""""""""""""""""""""" +Using spec syntax it's possible to have different customizations for different +groups of module files. - * ``$SPACK_ROOT/share/spack/modules`` - * ``$SPACK_ROOT/share/spack/dotkit`` +Considering : + +.. code-block:: yaml + + modules: + tcl: + all: # Default addition for every package + environment: + set: + BAR: 'bar' + ^openmpi:: # A double ':' overrides previous rules + environment: + set: + BAR: 'baz' + zlib: + environment: + prepend_path: + LD_LIBRARY_PATH: 'foo' + zlib%gcc@4.8: + environment: + unset: + - FOOBAR + +what will happen is that: + + - every module file will set ``BAR=bar`` + - unless the associated spec satisfies ``^openmpi`` in which case ``BAR=baz`` + - any spec that satisfies ``zlib`` will additionally prepend ``foo`` to ``LD_LIBRARY_PATH`` + - any spec that satisfies ``zlib%gcc@4.8`` will additionally unset ``FOOBAR`` + +.. note:: + Order does matter + The modifications associated with the ``all`` keyword are always evaluated + first, no matter where they appear in the configuration file. All the other + spec constraints are instead evaluated top to bottom. + +Filter modifications out of module files +"""""""""""""""""""""""""""""""""""""""" + +Modifications to certain environment variables in module files are generated by +default. Suppose you would like to avoid having ``CPATH`` and ``LIBRARY_PATH`` +modified by your dotkit modules. Then : + +.. code-block:: yaml + + modules: + dotkit: + all: + filter: + environment_blacklist: ['CPATH', 'LIBRARY_PATH'] # Exclude changes to any of these variables + +will generate dotkit module files that will not contain modifications to either +``CPATH`` or ``LIBRARY_PATH`` and environment module files that instead will +contain those modifications. + +Autoload dependencies +""""""""""""""""""""" + +The following lines in ``modules.yaml``: + +.. code-block:: yaml + + modules: + tcl: + all: + autoload: 'direct' + +will produce environment module files that will automatically load their direct +dependencies. + +.. note:: + Allowed values for ``autoload`` statements + Allowed values for ``autoload`` statements are either ``none``, ``direct`` + or ``all``. In ``tcl`` configuration it is possible to use the option + ``prerequisites`` that accepts the same values and will add ``prereq`` + statements instead of automatically loading other modules. + +Blacklist or whitelist the generation of specific module files +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Sometimes it is desirable not to generate module files, a common use case being +not providing the users with software built using the system compiler. + +A configuration file like: + +.. code-block:: yaml + + modules: + tcl: + whitelist: ['gcc', 'llvm'] # Whitelist will have precedence over blacklist + blacklist: ['%gcc@4.4.7'] # Assuming gcc@4.4.7 is the system compiler + +will skip module file generation for anything that satisfies ``%gcc@4.4.7``, +with the exception of specs that satisfy ``gcc`` or ``llvm``. + +Customize the naming scheme and insert conflicts +"""""""""""""""""""""""""""""""""""""""""""""""" + +A configuration file like: + +.. code-block:: yaml + + modules: + tcl: + naming_scheme: '{name}/{version}-{compiler.name}-{compiler.version}' + all: + conflict: ['{name}', 'intel/14.0.1'] + +will create module files that will conflict with ``intel/14.0.1`` and with the +base directory of the same module, effectively preventing the possibility to +load two or more versions of the same software at the same time. + +.. note:: + Tokens available for the naming scheme + currently only the tokens shown in the example are available to construct + the naming scheme + +.. note:: + The ``conflict`` option is ``tcl`` specific + +Regenerating module files +^^^^^^^^^^^^^^^^^^^^^^^^^ Sometimes you may need to regenerate the modules files. For example, if newer, fancier module support is added to Spack at some later date, @@ -1020,7 +1230,7 @@ new features. .. _spack-module: ``spack module refresh`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +"""""""""""""""""""""""" Running ``spack module refresh`` will remove the ``share/spack/modules`` and ``share/spack/dotkit`` directories, then diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 4065553131..3626a574c8 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1006,7 +1006,7 @@ class Package(object): fromlist=[self.__class__.__name__]) def setup_environment(self, spack_env, run_env): - """Set up the compile and runtime environemnts for a package. + """Set up the compile and runtime environments for a package. `spack_env` and `run_env` are `EnvironmentModifications` objects. Package authors can call methods on them to alter -- cgit v1.2.3-70-g09d2 From 22bb0562fea525afb329d5710970785189d3af63 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 11 May 2016 16:09:47 +0200 Subject: Revert "flake8 : fixed all issues?" This reverts commit 71e49e289a849b8aaa4f0d9a195d07569051ca88. --- lib/spack/spack/cmd/module.py | 16 ++- lib/spack/spack/config.py | 204 +++++++++++++++------------------------ lib/spack/spack/environment.py | 51 ++++------ lib/spack/spack/modules.py | 202 ++++++++++++++++---------------------- lib/spack/spack/test/__init__.py | 69 +++++++++---- lib/spack/spack/test/modules.py | 42 +++----- 6 files changed, 254 insertions(+), 330 deletions(-) diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index cfe59c8d98..f996f4eb84 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -32,21 +32,18 @@ from llnl.util.filesystem import mkdirp from spack.modules import module_types from spack.util.string import * -description = "Manipulate modules and dotkits." +description ="Manipulate modules and dotkits." def setup_parser(subparser): sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='module_command') - sp.add_parser('refresh', help='Regenerate all module files.') + refresh_parser = sp.add_parser('refresh', help='Regenerate all module files.') find_parser = sp.add_parser('find', help='Find module files for packages.') - find_parser.add_argument('module_type', - help="Type of module to find file for. [" + - '|'.join(module_types) + "]") - find_parser.add_argument('spec', - nargs='+', - help='spec to find a module file for.') + find_parser.add_argument( + 'module_type', help="Type of module to find file for. [" + '|'.join(module_types) + "]") + find_parser.add_argument('spec', nargs='+', help='spec to find a module file for.') def module_find(mtype, spec_array): @@ -56,8 +53,7 @@ def module_find(mtype, spec_array): should type to use that package's module. """ if mtype not in module_types: - tty.die("Invalid module type: '%s'. Options are %s" % - (mtype, comma_or(module_types))) + tty.die("Invalid module type: '%s'. Options are %s" % (mtype, comma_or(module_types))) specs = spack.cmd.parse_specs(spec_array) if len(specs) > 1: diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 684a420b3b..6ddf07776b 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -134,6 +134,8 @@ from yaml.error import MarkedYAMLError # Hacked yaml for configuration files preserves line numbers. import spack.util.spack_yaml as syaml + + """Dict from section names -> schema for that section.""" section_schemas = { 'compilers': { @@ -147,31 +149,25 @@ section_schemas = { 'default': {}, 'additionalProperties': False, 'patternProperties': { - r'\w[\w-]*': { # architecture + r'\w[\w-]*': { # architecture 'type': 'object', 'additionalProperties': False, 'patternProperties': { - r'\w[\w-]*@\w[\w-]*': { # compiler spec + r'\w[\w-]*@\w[\w-]*': { # compiler spec 'type': 'object', 'additionalProperties': False, 'required': ['cc', 'cxx', 'f77', 'fc'], 'properties': { - 'cc': {'anyOf': [{'type': 'string'}, - {'type': 'null'}]}, - 'cxx': {'anyOf': [{'type': 'string'}, - {'type': 'null'}]}, - 'f77': {'anyOf': [{'type': 'string'}, - {'type': 'null'}]}, - 'fc': {'anyOf': [{'type': 'string'}, - {'type': 'null'}]}, - }, - }, - }, - }, - }, - }, - }, - }, + 'cc': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'cxx': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'f77': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'fc': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + },},},},},},},}, + 'mirrors': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack mirror configuration file schema', @@ -184,12 +180,8 @@ section_schemas = { 'additionalProperties': False, 'patternProperties': { r'\w[\w-]*': { - 'type': 'string' - }, - }, - }, - }, - }, + 'type': 'string'},},},},}, + 'repos': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack repository configuration file schema', @@ -200,11 +192,8 @@ section_schemas = { 'type': 'array', 'default': [], 'items': { - 'type': 'string' - }, - }, - }, - }, + 'type': 'string'},},},}, + 'packages': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack package configuration file schema', @@ -216,48 +205,39 @@ section_schemas = { 'default': {}, 'additionalProperties': False, 'patternProperties': { - r'\w[\w-]*': { # package name + r'\w[\w-]*': { # package name 'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': { 'version': { - 'type': 'array', - 'default': [], - 'items': {'anyOf': [{'type': 'string'}, - {'type': 'number'}]} - }, # version strings + 'type' : 'array', + 'default' : [], + 'items' : { 'anyOf' : [ { 'type' : 'string' }, + { 'type' : 'number'}]}}, #version strings 'compiler': { - 'type': 'array', - 'default': [], - 'items': {'type': 'string'} - }, # compiler specs + 'type' : 'array', + 'default' : [], + 'items' : { 'type' : 'string' } }, #compiler specs 'buildable': { - 'type': 'boolean', + 'type': 'boolean', 'default': True, - }, + }, 'providers': { - 'type': 'object', + 'type': 'object', 'default': {}, 'additionalProperties': False, 'patternProperties': { r'\w[\w-]*': { - 'type': 'array', - 'default': [], - 'items': {'type': 'string'}, - }, - }, - }, + 'type' : 'array', + 'default' : [], + 'items' : { 'type' : 'string' },},},}, 'paths': { - 'type': 'object', - 'default': {}, + 'type' : 'object', + 'default' : {}, } - }, - }, - }, - }, - }, - }, + },},},},},}, + 'modules': { '$schema': 'http://json-schema.org/schema#', 'title': 'Spack module file configuration file schema', @@ -303,22 +283,17 @@ section_schemas = { } }, 'autoload': {'$ref': '#/definitions/dependency_selection'}, - 'prerequisites': - {'$ref': '#/definitions/dependency_selection'}, + 'prerequisites': {'$ref': '#/definitions/dependency_selection'}, 'conflict': {'$ref': '#/definitions/array_of_strings'}, 'environment': { 'type': 'object', 'default': {}, 'additionalProperties': False, 'properties': { - 'set': - {'$ref': '#/definitions/dictionary_of_strings'}, - 'unset': - {'$ref': '#/definitions/array_of_strings'}, - 'prepend_path': - {'$ref': '#/definitions/dictionary_of_strings'}, - 'append_path': - {'$ref': '#/definitions/dictionary_of_strings'} + 'set': {'$ref': '#/definitions/dictionary_of_strings'}, + 'unset': {'$ref': '#/definitions/array_of_strings'}, + 'prepend_path': {'$ref': '#/definitions/dictionary_of_strings'}, + 'append_path': {'$ref': '#/definitions/dictionary_of_strings'} } } } @@ -329,20 +304,15 @@ section_schemas = { 'anyOf': [ { 'properties': { - 'whitelist': - {'$ref': '#/definitions/array_of_strings'}, - 'blacklist': - {'$ref': '#/definitions/array_of_strings'}, + 'whitelist': {'$ref': '#/definitions/array_of_strings'}, + 'blacklist': {'$ref': '#/definitions/array_of_strings'}, 'naming_scheme': { - 'type': - 'string' # Can we be more specific here? + 'type': 'string' # Can we be more specific here? } } }, { - 'patternProperties': - {r'\w[\w-]*': - {'$ref': '#/definitions/module_file_configuration'}} + 'patternProperties': {r'\w[\w-]*': {'$ref': '#/definitions/module_file_configuration'}} } ] } @@ -356,8 +326,7 @@ section_schemas = { 'prefix_inspections': { 'type': 'object', 'patternProperties': { - r'\w[\w-]*': - { # path to be inspected (relative to prefix) + r'\w[\w-]*': { # path to be inspected for existence (relative to prefix) '$ref': '#/definitions/array_of_strings' } } @@ -372,15 +341,13 @@ section_schemas = { }, 'tcl': { 'allOf': [ - {'$ref': '#/definitions/module_type_configuration' - }, # Base configuration + {'$ref': '#/definitions/module_type_configuration'}, # Base configuration {} # Specific tcl extensions ] }, 'dotkit': { 'allOf': [ - {'$ref': '#/definitions/module_type_configuration' - }, # Base configuration + {'$ref': '#/definitions/module_type_configuration'}, # Base configuration {} # Specific dotkit extensions ] }, @@ -389,6 +356,7 @@ section_schemas = { }, }, } + """OrderedDict of config scopes keyed by name. Later scopes will override earlier scopes. """ @@ -398,13 +366,12 @@ config_scopes = OrderedDict() def validate_section_name(section): """Raise a ValueError if the section is not a valid section.""" if section not in section_schemas: - raise ValueError("Invalid config section: '%s'. Options are %s" % - (section, section_schemas)) + raise ValueError("Invalid config section: '%s'. Options are %s" + % (section, section_schemas)) def extend_with_default(validator_class): - """Add support for the 'default' attribute for - properties and patternProperties + """Add support for the 'default' attribute for properties and patternProperties. jsonschema does not handle this out of the box -- it only validates. This allows us to set default values for configs @@ -413,15 +380,13 @@ def extend_with_default(validator_class): """ validate_properties = validator_class.VALIDATORS["properties"] - validate_pattern_properties = validator_class.VALIDATORS[ - "patternProperties"] + validate_pattern_properties = validator_class.VALIDATORS["patternProperties"] def set_defaults(validator, properties, instance, schema): for property, subschema in properties.iteritems(): if "default" in subschema: instance.setdefault(property, subschema["default"]) - for err in validate_properties(validator, properties, instance, - schema): + for err in validate_properties(validator, properties, instance, schema): yield err def set_pp_defaults(validator, properties, instance, schema): @@ -432,19 +397,17 @@ def extend_with_default(validator_class): if re.match(property, key) and val is None: instance[key] = subschema["default"] - for err in validate_pattern_properties(validator, properties, instance, - schema): + for err in validate_pattern_properties(validator, properties, instance, schema): yield err return validators.extend(validator_class, { - "properties": set_defaults, - "patternProperties": set_pp_defaults + "properties" : set_defaults, + "patternProperties" : set_pp_defaults }) DefaultSettingValidator = extend_with_default(Draft4Validator) - def validate_section(data, schema): """Validate data read in from a Spack YAML file. @@ -466,9 +429,9 @@ class ConfigScope(object): """ def __init__(self, name, path): - self.name = name # scope name. - self.path = path # path to directory containing configs. - self.sections = {} # sections read from config files. + self.name = name # scope name. + self.path = path # path to directory containing configs. + self.sections = {} # sections read from config files. # Register in a dict of all ConfigScopes # TODO: make this cleaner. Mocking up for testing is brittle. @@ -479,14 +442,16 @@ class ConfigScope(object): validate_section_name(section) return os.path.join(self.path, "%s.yaml" % section) + def get_section(self, section): - if section not in self.sections: - path = self.get_section_filename(section) + if not section in self.sections: + path = self.get_section_filename(section) schema = section_schemas[section] - data = _read_config_file(path, schema) + data = _read_config_file(path, schema) self.sections[section] = data return self.sections[section] + def write_section(self, section): filename = self.get_section_filename(section) data = self.get_section(section) @@ -498,8 +463,8 @@ class ConfigScope(object): except jsonschema.ValidationError as e: raise ConfigSanityError(e, data) except (yaml.YAMLError, IOError) as e: - raise ConfigFileError("Error writing to config file: '%s'" % - str(e)) + raise ConfigFileError("Error writing to config file: '%s'" % str(e)) + def clear(self): """Empty cached config information.""" @@ -531,8 +496,8 @@ def validate_scope(scope): return config_scopes[scope] else: - raise ValueError("Invalid config scope: '%s'. Must be one of %s" % - (scope, config_scopes.keys())) + raise ValueError("Invalid config scope: '%s'. Must be one of %s" + % (scope, config_scopes.keys())) def _read_config_file(filename, schema): @@ -558,12 +523,12 @@ def _read_config_file(filename, schema): return data except MarkedYAMLError as e: - raise ConfigFileError("Error parsing yaml%s: %s" % - (str(e.context_mark), e.problem)) + raise ConfigFileError( + "Error parsing yaml%s: %s" % (str(e.context_mark), e.problem)) except IOError as e: - raise ConfigFileError("Error reading configuration file %s: %s" % - (filename, str(e))) + raise ConfigFileError( + "Error reading configuration file %s: %s" % (filename, str(e))) def clear_config_caches(): @@ -586,7 +551,6 @@ def _merge_yaml(dest, source): parent instead of merging. """ - def they_are(t): return isinstance(dest, t) and isinstance(source, t) @@ -607,7 +571,7 @@ def _merge_yaml(dest, source): # Source dict is merged into dest. elif they_are(dict): for sk, sv in source.iteritems(): - if sk not in dest: + if not sk in dest: dest[sk] = copy.copy(sv) else: dest[sk] = _merge_yaml(dest[sk], source[sk]) @@ -689,7 +653,7 @@ def print_section(section): data = syaml.syaml_dict() data[section] = get_config(section) syaml.dump(data, stream=sys.stdout, default_flow_style=False) - except (yaml.YAMLError, IOError): + except (yaml.YAMLError, IOError) as e: raise ConfigError("Error reading configuration: %s" % section) @@ -719,22 +683,15 @@ def is_spec_buildable(spec): """Return true if the spec pkgspec is configured as buildable""" allpkgs = get_config('packages') name = spec.name - if name not in allpkgs: + if not spec.name in allpkgs: return True - if 'buildable' not in allpkgs[name]: + if not 'buildable' in allpkgs[spec.name]: return True return allpkgs[spec.name]['buildable'] -class ConfigError(SpackError): - - pass - - -class ConfigFileError(ConfigError): - - pass - +class ConfigError(SpackError): pass +class ConfigFileError(ConfigError): pass def get_path(path, data): if path: @@ -742,10 +699,8 @@ def get_path(path, data): else: return data - class ConfigFormatError(ConfigError): """Raised when a configuration format does not match its schema.""" - def __init__(self, validation_error, data): # Try to get line number from erroneous instance and its parent instance_mark = getattr(validation_error.instance, '_start_mark', None) @@ -778,6 +733,5 @@ class ConfigFormatError(ConfigError): message = '%s: %s' % (location, validation_error.message) super(ConfigError, self).__init__(message) - class ConfigSanityError(ConfigFormatError): """Same as ConfigFormatError, raised when config is written by Spack.""" diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 9748b4033a..92ab4e6bea 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -26,8 +26,7 @@ class SetEnv(NameValueModifier): class UnsetEnv(NameModifier): def execute(self): - # Avoid throwing if the variable was not set - os.environ.pop(self.name, None) + os.environ.pop(self.name, None) # Avoid throwing if the variable was not set class SetPath(NameValueModifier): @@ -56,9 +55,7 @@ class RemovePath(NameValueModifier): def execute(self): environment_value = os.environ.get(self.name, '') directories = environment_value.split(':') if environment_value else [] - directories = [os.path.normpath(x) - for x in directories - if x != os.path.normpath(self.value)] + directories = [os.path.normpath(x) for x in directories if x != os.path.normpath(self.value)] os.environ[self.name] = ':'.join(directories) @@ -66,8 +63,7 @@ class EnvironmentModifications(object): """ Keeps track of requests to modify the current environment. - Each call to a method to modify the environment stores the extra - information on the caller in the request: + Each call to a method to modify the environment stores the extra information on the caller in the request: - 'filename' : filename of the module where the caller is defined - 'lineno': line number where the request occurred - 'context' : line of code that issued the request that failed @@ -75,10 +71,10 @@ class EnvironmentModifications(object): def __init__(self, other=None): """ - Initializes a new instance, copying commands from other if not None + Initializes a new instance, copying commands from other if it is not None Args: - other: another instance of EnvironmentModifications + other: another instance of EnvironmentModifications from which (optional) """ self.env_modifications = [] if other is not None: @@ -97,7 +93,7 @@ class EnvironmentModifications(object): @staticmethod def _check_other(other): if not isinstance(other, EnvironmentModifications): - raise TypeError('not an instance of EnvironmentModifications') + raise TypeError('other must be an instance of EnvironmentModifications') def _get_outside_caller_attributes(self): stack = inspect.stack() @@ -105,10 +101,12 @@ class EnvironmentModifications(object): _, filename, lineno, _, context, index = stack[2] context = context[index].strip() except Exception: - filename = 'unknown file' - lineno = 'unknown line' - context = 'unknown context' - args = {'filename': filename, 'lineno': lineno, 'context': context} + filename, lineno, context = 'unknown file', 'unknown line', 'unknown context' + args = { + 'filename': filename, + 'lineno': lineno, + 'context': context + } return args def set(self, name, value, **kwargs): @@ -172,7 +170,7 @@ class EnvironmentModifications(object): def remove_path(self, name, path, **kwargs): """ - Stores in the current object a request to remove a path from a list + Stores in the current object a request to remove a path from a path list Args: name: name of the path list in the environment @@ -187,8 +185,7 @@ class EnvironmentModifications(object): Returns a dict of the modifications grouped by variable name Returns: - dict mapping the environment variable name to the modifications - to be done on it + dict mapping the environment variable name to the modifications to be done on it """ modifications = collections.defaultdict(list) for item in self: @@ -206,8 +203,7 @@ class EnvironmentModifications(object): Applies the modifications and clears the list """ modifications = self.group_by_name() - # Apply the modifications to the environment variables one variable - # at a time + # Apply the modifications to the environment variables one variable at a time for name, actions in sorted(modifications.items()): for x in actions: x.execute() @@ -228,17 +224,13 @@ def concatenate_paths(paths): def set_or_unset_not_first(variable, changes, errstream): """ - Check if we are going to set or unset something after other modifications - have already been requested + Check if we are going to set or unset something after other modifications have already been requested """ - indexes = [ii - for ii, item in enumerate(changes) - if ii != 0 and type(item) in [SetEnv, UnsetEnv]] + indexes = [ii for ii, item in enumerate(changes) if ii != 0 and type(item) in [SetEnv, UnsetEnv]] if indexes: good = '\t \t{context} at {filename}:{lineno}' nogood = '\t--->\t{context} at {filename}:{lineno}' - message = 'Suspicious requests to set or unset the variable \'{var}\' found' # NOQA: ignore=E501 - errstream(message.format(var=variable)) + errstream('Suspicious requests to set or unset the variable \'{var}\' found'.format(var=variable)) for ii, item in enumerate(changes): print_format = nogood if ii in indexes else good errstream(print_format.format(**item.args)) @@ -246,8 +238,8 @@ def set_or_unset_not_first(variable, changes, errstream): def validate(env, errstream): """ - Validates the environment modifications to check for the presence of - suspicious patterns. Prompts a warning for everything that was found + Validates the environment modifications to check for the presence of suspicious patterns. Prompts a warning for + everything that was found Current checks: - set or unset variables after other changes on the same variable @@ -262,8 +254,7 @@ def validate(env, errstream): def filter_environment_blacklist(env, variables): """ - Generator that filters out any change to environment variables present in - the input list + Generator that filters out any change to environment variables present in the input list Args: env: list of environment modifications diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 0dc6f06f55..ffed469b20 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -23,34 +23,36 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## """ -This module contains code for creating environment modules, which can include -dotkits, tcl modules, lmod, and others. +This module contains code for creating environment modules, which can include dotkits, tcl modules, lmod, and others. -The various types of modules are installed by post-install hooks and removed -after an uninstall by post-uninstall hooks. This class consolidates the logic -for creating an abstract description of the information that module systems -need. +The various types of modules are installed by post-install hooks and removed after an uninstall by post-uninstall hooks. +This class consolidates the logic for creating an abstract description of the information that module systems need. +Currently that includes a number of directories to be appended to paths in the user's environment: -This module also includes logic for coming up with unique names for the module -files so that they can be found by the various shell-support files in -$SPACK/share/spack/setup-env.*. + * /bin directories to be appended to PATH + * /lib* directories for LD_LIBRARY_PATH + * /include directories for CPATH + * /man* and /share/man* directories for MANPATH + * the package prefix for CMAKE_PREFIX_PATH -Each hook implements the logic for writing its specific type of module. +This module also includes logic for coming up with unique names for the module files so that they can be found by the +various shell-support files in $SPACK/share/spack/setup-env.*. + +Each hook in hooks/ implements the logic for writing its specific type of module file. """ import copy import datetime import os import os.path import re -import string import textwrap +import string import llnl.util.tty as tty import spack import spack.config from llnl.util.filesystem import join_path, mkdirp -from spack.build_environment import parent_class_modules -from spack.build_environment import set_module_variables_for_package +from spack.build_environment import parent_class_modules, set_module_variables_for_package from spack.environment import * __all__ = ['EnvModule', 'Dotkit', 'TclModule'] @@ -65,26 +67,30 @@ def print_help(): """ For use by commands to tell user how to activate shell support. """ - tty.msg("This command requires spack's shell integration.", "", + tty.msg("This command requires spack's shell integration.", + "", "To initialize spack's shell commands, you must run one of", "the commands below. Choose the right command for your shell.", - "", "For bash and zsh:", - " . %s/setup-env.sh" % spack.share_path, "", - "For csh and tcsh:", " setenv SPACK_ROOT %s" % spack.prefix, - " source %s/setup-env.csh" % spack.share_path, "") + "", + "For bash and zsh:", + " . %s/setup-env.sh" % spack.share_path, + "", + "For csh and tcsh:", + " setenv SPACK_ROOT %s" % spack.prefix, + " source %s/setup-env.csh" % spack.share_path, + "") def inspect_path(prefix): """ - Inspects the prefix of an installation to search for common layouts. - Issues a request to modify the environment when an item is found. + Inspects the prefix of an installation to search for common layouts. Issues a request to modify the environment + accordingly when an item is found. Args: prefix: prefix of the installation Returns: - instance of EnvironmentModifications containing the requested - modifications + instance of EnvironmentModifications containing the requested modifications """ env = EnvironmentModifications() # Inspect the prefix to check for the existence of common directories @@ -99,22 +105,18 @@ def inspect_path(prefix): def dependencies(spec, request='all'): """ - Returns the list of dependent specs for a given spec, according to the - given request + Returns the list of dependent specs for a given spec, according to the given request Args: spec: target spec request: either 'none', 'direct' or 'all' Returns: - empty list if 'none', direct dependency list if 'direct', all - dependencies if 'all' + empty list if 'none', direct dependency list if 'direct', all dependencies if 'all' """ if request not in ('none', 'direct', 'all'): - message = "Wrong value for argument 'request' : " - message += "should be one of ('none', 'direct', 'all')" - message += " [current value is '{0}']" - raise tty.error(message.format(request)) + raise tty.error("Wrong value for argument 'request' : should be one of ('none', 'direct', 'all') " + " [current value is '%s']" % request) if request == 'none': return [] @@ -122,19 +124,12 @@ def dependencies(spec, request='all'): if request == 'direct': return [xx for _, xx in spec.dependencies.items()] - # FIXME : during module file creation nodes seem to be visited - # FIXME : multiple times even if cover='nodes' is given. This work around - # FIXME : permits to get a unique list of spec anyhow. Maybe we miss a - # FIXME : merge step among nodes that refer to the same package? + # FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes' + # FIXME : is given. This work around permits to get a unique list of spec anyhow. + # FIXME : Possibly we miss a merge step among nodes that refer to the same package. seen = set() seen_add = seen.add - l = [xx - for xx in sorted( - spec.traverse(order='post', - depth=True, - cover='nodes', - root=False), - reverse=True)] + l = [xx for xx in sorted(spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] return [xx for ii, xx in l if not (xx in seen or seen_add(xx))] @@ -151,8 +146,7 @@ def update_dictionary_extending_lists(target, update): def parse_config_options(module_generator): """ - Parse the configuration file and returns a bunch of items that will be - needed during module file generation + Parse the configuration file and returns a bunch of items that will be needed during module file generation Args: module_generator: module generator for a given spec @@ -160,14 +154,11 @@ def parse_config_options(module_generator): Returns: autoloads: list of specs to be autoloaded prerequisites: list of specs to be marked as prerequisite - filters: list of environment variables whose modification is - blacklisted in module files - env: list of custom environment modifications to be applied in the - module file + filters: list of environment variables whose modification is blacklisted in module files + env: list of custom environment modifications to be applied in the module file """ # Get the configuration for this kind of generator - module_configuration = copy.deepcopy(CONFIGURATION.get( - module_generator.name, {})) + module_configuration = copy.deepcopy(CONFIGURATION.get(module_generator.name, {})) ##### # Merge all the rules @@ -188,12 +179,9 @@ def parse_config_options(module_generator): ##### # Automatic loading loads - module_file_actions['autoload'] = dependencies( - module_generator.spec, module_file_actions.get('autoload', 'none')) + module_file_actions['autoload'] = dependencies(module_generator.spec, module_file_actions.get('autoload', 'none')) # Prerequisites - module_file_actions['prerequisites'] = dependencies( - module_generator.spec, module_file_actions.get('prerequisites', - 'none')) + module_file_actions['prerequisites'] = dependencies(module_generator.spec, module_file_actions.get('prerequisites', 'none')) # Environment modifications environment_actions = module_file_actions.pop('environment', {}) env = EnvironmentModifications() @@ -201,7 +189,7 @@ def parse_config_options(module_generator): def process_arglist(arglist): if method == 'unset': for x in arglist: - yield (x, ) + yield (x,) else: for x in arglist.iteritems(): yield x @@ -210,20 +198,19 @@ def parse_config_options(module_generator): for args in process_arglist(arglist): getattr(env, method)(*args) - # for item in arglist: - # if method == 'unset': - # args = [item] - # else: - # args = item.split(',') - # getattr(env, method)(*args) + # for item in arglist: + # if method == 'unset': + # args = [item] + # else: + # args = item.split(',') + # getattr(env, method)(*args) return module_file_actions, env def filter_blacklisted(specs, module_name): """ - Given a sequence of specs, filters the ones that are blacklisted in the - module configuration file. + Given a sequence of specs, filters the ones that are blacklisted in the module configuration file. Args: specs: sequence of spec instances @@ -246,8 +233,7 @@ class EnvModule(object): class __metaclass__(type): def __init__(cls, name, bases, dict): type.__init__(cls, name, bases, dict) - if cls.name != 'env_module' and cls.name in CONFIGURATION[ - 'enable']: + if cls.name != 'env_module' and cls.name in CONFIGURATION['enable']: module_types[cls.name] = cls def __init__(self, spec=None): @@ -263,8 +249,7 @@ class EnvModule(object): # long description is the docstring with reduced whitespace. self.long_description = None if self.spec.package.__doc__: - self.long_description = re.sub(r'\s+', ' ', - self.spec.package.__doc__) + self.long_description = re.sub(r'\s+', ' ', self.spec.package.__doc__) @property def naming_scheme(self): @@ -286,14 +271,12 @@ class EnvModule(object): @property def use_name(self): """ - Subclasses should implement this to return the name the module command - uses to refer to the package. + Subclasses should implement this to return the name the module command uses to refer to the package. """ naming_tokens = self.tokens naming_scheme = self.naming_scheme name = naming_scheme.format(**naming_tokens) - name += '-' + self.spec.dag_hash( - ) # Always append the hash to make the module file unique + name += '-' + self.spec.dag_hash() # Always append the hash to make the module file unique # Not everybody is working on linux... parts = name.split('/') name = join_path(*parts) @@ -313,12 +296,8 @@ class EnvModule(object): @property def blacklisted(self): configuration = CONFIGURATION.get(self.name, {}) - whitelist_matches = [x - for x in configuration.get('whitelist', []) - if self.spec.satisfies(x)] - blacklist_matches = [x - for x in configuration.get('blacklist', []) - if self.spec.satisfies(x)] + whitelist_matches = [x for x in configuration.get('whitelist', []) if self.spec.satisfies(x)] + blacklist_matches = [x for x in configuration.get('blacklist', []) if self.spec.satisfies(x)] if whitelist_matches: message = '\tWHITELIST : %s [matches : ' % self.spec.cshort_spec for rule in whitelist_matches: @@ -348,8 +327,7 @@ class EnvModule(object): """ if self.blacklisted: return - tty.debug("\tWRITE : %s [%s]" % - (self.spec.cshort_spec, self.file_name)) + tty.debug("\tWRITE : %s [%s]" % (self.spec.cshort_spec, self.file_name)) module_dir = os.path.dirname(self.file_name) if not os.path.exists(module_dir): @@ -359,12 +337,11 @@ class EnvModule(object): # installation prefix env = inspect_path(self.spec.prefix) - # Let the extendee/dependency modify their extensions/dependencies - # before asking for package-specific modifications + # Let the extendee/dependency modify their extensions/dependencies before asking for + # package-specific modifications spack_env = EnvironmentModifications() - # TODO : the code down below is quite similar to - # TODO : build_environment.setup_package and needs to be factored out - # TODO : to a single place + # TODO : the code down below is quite similar to build_environment.setup_package and needs to be + # TODO : factored out to a single place for item in dependencies(self.spec, 'all'): package = self.spec[item.name].package modules = parent_class_modules(package.__class__) @@ -381,18 +358,14 @@ class EnvModule(object): # Parse configuration file module_configuration, conf_env = parse_config_options(self) env.extend(conf_env) - filters = module_configuration.get('filter', {}).get( - 'environment_blacklist', {}) + filters = module_configuration.get('filter', {}).get('environment_blacklist',{}) # Build up the module file content module_file_content = self.header - for x in filter_blacklisted( - module_configuration.pop('autoload', []), self.name): + for x in filter_blacklisted(module_configuration.pop('autoload', []), self.name): module_file_content += self.autoload(x) - for x in filter_blacklisted( - module_configuration.pop('prerequisites', []), self.name): + for x in filter_blacklisted(module_configuration.pop('prerequisites', []), self.name): module_file_content += self.prerequisite(x) - for line in self.process_environment_command( - filter_environment_blacklist(env, filters)): + for line in self.process_environment_command(filter_environment_blacklist(env, filters)): module_file_content += line for line in self.module_specific_content(module_configuration): module_file_content += line @@ -419,13 +392,10 @@ class EnvModule(object): def process_environment_command(self, env): for command in env: try: - yield self.environment_modifications_formats[type( - command)].format(**command.args) + yield self.environment_modifications_formats[type(command)].format(**command.args) except KeyError: - message = 'Cannot handle command of type {command} : skipping request' # NOQA: ignore=E501 - tty.warn(message.format(command=type(command))) - context = '{context} at {filename}:{lineno}' - tty.warn(context.format(**command.args)) + tty.warn('Cannot handle command of type {command} : skipping request'.format(command=type(command))) + tty.warn('{context} at {filename}:{lineno}'.format(**command.args)) @property def file_name(self): @@ -438,12 +408,9 @@ class EnvModule(object): if os.path.exists(mod_file): try: os.remove(mod_file) # Remove the module file - os.removedirs( - os.path.dirname(mod_file) - ) # Remove all the empty directories from the leaf up + os.removedirs(os.path.dirname(mod_file)) # Remove all the empty directories from the leaf up except OSError: - # removedirs throws OSError on first non-empty directory found - pass + pass # removedirs throws OSError on first non-empty directory found class Dotkit(EnvModule): @@ -457,12 +424,13 @@ class Dotkit(EnvModule): autoload_format = 'dk_op {module_file}\n' - default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' # NOQA: ignore=E501 + prerequisite_format = None # TODO : does something like prerequisite exist for dotkit? + + default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' @property def file_name(self): - return join_path(Dotkit.path, self.spec.architecture, - '%s.dk' % self.use_name) + return join_path(Dotkit.path, self.spec.architecture, '%s.dk' % self.use_name) @property def header(self): @@ -506,7 +474,7 @@ class TclModule(EnvModule): prerequisite_format = 'prereq {module_file}\n' - default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' # NOQA: ignore=E501 + default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' @property def file_name(self): @@ -514,10 +482,9 @@ class TclModule(EnvModule): @property def header(self): - timestamp = datetime.datetime.now() # TCL Modulefile header header = '#%Module1.0\n' - header += '## Module file created by spack (https://github.com/LLNL/spack) on %s\n' % timestamp # NOQA: ignore=E501 + header += '## Module file created by spack (https://github.com/LLNL/spack) on %s\n' % datetime.datetime.now() header += '##\n' header += '## %s\n' % self.spec.short_spec header += '##\n' @@ -542,19 +509,16 @@ class TclModule(EnvModule): f = string.Formatter() for item in conflict_format: line = 'conflict ' + item + '\n' - if len([x for x in f.parse(line) - ]) > 1: # We do have placeholder to substitute - for naming_dir, conflict_dir in zip( - self.naming_scheme.split('/'), item.split('/')): + if len([x for x in f.parse(line)]) > 1: # We do have placeholder to substitute + for naming_dir, conflict_dir in zip(self.naming_scheme.split('/'), item.split('/')): if naming_dir != conflict_dir: - message = 'conflict scheme does not match naming' - message += ' [{spec}]\n\n' + message = 'conflict scheme does not match naming scheme [{spec}]\n\n' message += 'naming scheme : "{nformat}"\n' message += 'conflict scheme : "{cformat}"\n\n' - message += '** You may want to check your `modules.yaml` configuration file **\n' # NOQA: ignore=E501 - tty.error(message.format(spec=self.spec, - nformat=self.naming_scheme, - cformat=item)) + message += '** You may want to check your `modules.yaml` configuration file **\n' + tty.error( + message.format(spec=self.spec, nformat=self.naming_scheme, cformat=item) + ) raise SystemExit('Module generation aborted.') line = line.format(**naming_tokens) yield line diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index 395ca0c87a..05f58ab7b1 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -23,23 +23,53 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import sys - -import llnl.util.tty as tty +import unittest import nose -import spack + +from spack.test.tally_plugin import Tally from llnl.util.filesystem import join_path +import llnl.util.tty as tty from llnl.util.tty.colify import colify -from spack.test.tally_plugin import Tally + +import spack + """Names of tests to be included in Spack's test suite""" -test_names = ['versions', 'url_parse', 'url_substitution', 'packages', 'stage', - 'spec_syntax', 'spec_semantics', 'spec_dag', 'concretize', - 'multimethod', 'install', 'package_sanity', 'config', - 'directory_layout', 'pattern', 'python_version', 'git_fetch', - 'svn_fetch', 'hg_fetch', 'mirror', 'modules', 'url_extrapolate', - 'cc', 'link_tree', 'spec_yaml', 'optional_deps', - 'make_executable', 'configure_guess', 'lock', 'database', - 'namespace_trie', 'yaml', 'sbang', 'environment', - 'cmd.uninstall', 'cmd.test_install'] +test_names = ['versions', + 'url_parse', + 'url_substitution', + 'packages', + 'stage', + 'spec_syntax', + 'spec_semantics', + 'spec_dag', + 'concretize', + 'multimethod', + 'install', + 'package_sanity', + 'config', + 'directory_layout', + 'pattern', + 'python_version', + 'git_fetch', + 'svn_fetch', + 'hg_fetch', + 'mirror', + 'modules', + 'url_extrapolate', + 'cc', + 'link_tree', + 'spec_yaml', + 'optional_deps', + 'make_executable', + 'configure_guess', + 'lock', + 'database', + 'namespace_trie', + 'yaml', + 'sbang', + 'environment', + 'cmd.uninstall', + 'cmd.test_install'] def list_tests(): @@ -50,6 +80,7 @@ def list_tests(): def run(names, outputDir, verbose=False): """Run tests with the supplied names. Names should be a list. If it's empty, run ALL of Spack's tests.""" + verbosity = 1 if not verbose else 2 if not names: names = test_names @@ -64,7 +95,7 @@ def run(names, outputDir, verbose=False): tally = Tally() for test in names: module = 'spack.test.' + test - print(module) + print module tty.msg("Running test: %s" % test) @@ -74,13 +105,15 @@ def run(names, outputDir, verbose=False): xmlOutputFname = "unittests-{0}.xml".format(test) xmlOutputPath = join_path(outputDir, xmlOutputFname) runOpts += ["--with-xunit", - "--xunit-file={0}".format(xmlOutputPath)] + "--xunit-file={0}".format(xmlOutputPath)] argv = [""] + runOpts + [module] - nose.run(argv=argv, addplugins=[tally]) + result = nose.run(argv=argv, addplugins=[tally]) succeeded = not tally.failCount and not tally.errorCount - tty.msg("Tests Complete.", "%5d tests run" % tally.numberOfTestsRun, - "%5d failures" % tally.failCount, "%5d errors" % tally.errorCount) + tty.msg("Tests Complete.", + "%5d tests run" % tally.numberOfTestsRun, + "%5d failures" % tally.failCount, + "%5d errors" % tally.errorCount) if succeeded: tty.info("OK", format='g') diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index f0ff778a10..b8b0d6fc6a 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -2,18 +2,14 @@ import collections from contextlib import contextmanager import StringIO -import spack.modules -from spack.test.mock_packages_test import MockPackagesTest FILE_REGISTRY = collections.defaultdict(StringIO.StringIO) - # Monkey-patch open to write module files to a StringIO instance @contextmanager def mock_open(filename, mode): if not mode == 'w': - message = 'test.modules : unexpected opening mode [mock_open]' - raise RuntimeError(message) + raise RuntimeError('test.modules : unexpected opening mode for monkey-patched open') FILE_REGISTRY[filename] = StringIO.StringIO() @@ -24,6 +20,7 @@ def mock_open(filename, mode): FILE_REGISTRY[filename] = handle.getvalue() handle.close() +import spack.modules configuration_autoload_direct = { 'enable': ['tcl'], @@ -50,8 +47,7 @@ configuration_alter_environment = { 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']} }, '=x86-linux': { - 'environment': {'set': {'FOO': 'foo'}, - 'unset': ['BAR']} + 'environment': {'set': {'FOO': 'foo'}, 'unset': ['BAR']} } } } @@ -76,14 +72,15 @@ configuration_conflicts = { } } +from spack.test.mock_packages_test import MockPackagesTest + class TclTests(MockPackagesTest): def setUp(self): super(TclTests, self).setUp() self.configuration_obj = spack.modules.CONFIGURATION spack.modules.open = mock_open - # Make sure that a non-mocked configuration will trigger an error - spack.modules.CONFIGURATION = None + spack.modules.CONFIGURATION = None # Make sure that a non-mocked configuration will trigger an error def tearDown(self): del spack.modules.open @@ -101,7 +98,7 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_autoload_direct spec = spack.spec.Spec('mpich@3.0.4=x86-linux') content = self.get_modulefile_content(spec) - self.assertTrue('module-whatis "mpich @3.0.4"' in content) + self.assertTrue('module-whatis "mpich @3.0.4"' in content ) def test_autoload(self): spack.modules.CONFIGURATION = configuration_autoload_direct @@ -120,22 +117,14 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_alter_environment spec = spack.spec.Spec('mpileaks=x86-linux') content = self.get_modulefile_content(spec) - self.assertEqual( - len([x - for x in content - if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) - self.assertEqual( - len([x for x in content if 'setenv FOO "foo"' in x]), 1) + self.assertEqual(len([x for x in content if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) + self.assertEqual(len([x for x in content if 'setenv FOO "foo"' in x]), 1) self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 1) spec = spack.spec.Spec('libdwarf=x64-linux') content = self.get_modulefile_content(spec) - self.assertEqual( - len([x - for x in content - if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) - self.assertEqual( - len([x for x in content if 'setenv FOO "foo"' in x]), 0) + self.assertEqual(len([x for x in content if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) + self.assertEqual(len([x for x in content if 'setenv FOO "foo"' in x]), 0) self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 0) def test_blacklist(self): @@ -149,9 +138,6 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_conflicts spec = spack.spec.Spec('mpileaks=x86-linux') content = self.get_modulefile_content(spec) - self.assertEqual( - len([x for x in content if x.startswith('conflict')]), 2) - self.assertEqual( - len([x for x in content if x == 'conflict mpileaks']), 1) - self.assertEqual( - len([x for x in content if x == 'conflict intel/14.0.1']), 1) + self.assertEqual(len([x for x in content if x.startswith('conflict')]), 2) + self.assertEqual(len([x for x in content if x == 'conflict mpileaks']), 1) + self.assertEqual(len([x for x in content if x == 'conflict intel/14.0.1']), 1) -- cgit v1.2.3-70-g09d2 From eba264fcd0701b2172dc39d2616cb2f90b4d8578 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 11 May 2016 15:45:57 +0200 Subject: fix formatting --- lib/spack/spack/package_test.py | 16 +++++----- .../repos/builtin/packages/openblas/package.py | 34 ++++++++++++---------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/lib/spack/spack/package_test.py b/lib/spack/spack/package_test.py index 4b021684ee..9c15e3f5d0 100644 --- a/lib/spack/spack/package_test.py +++ b/lib/spack/spack/package_test.py @@ -25,7 +25,8 @@ from spack import * import os -def compile_c_and_execute(source_file,include_flags, link_flags): + +def compile_c_and_execute(source_file, include_flags, link_flags): """Compile C @p source_file with @p include_flags and @p link_flags, run and return the output. """ @@ -46,14 +47,15 @@ def compare_output(current_output, blessed_output): if not (current_output == blessed_output): print "Produced output does not match expected output." print "Expected output:" - print '-'*80 + print '-' * 80 print blessed_output - print '-'*80 + print '-' * 80 print "Produced output:" - print '-'*80 + print '-' * 80 print current_output - print '-'*80 - raise RuntimeError("Ouput check failed. See spack_output.log for details") + print '-' * 80 + raise RuntimeError("Ouput check failed.", + "See spack_output.log for details") def compare_output_file(current_output, blessed_output_file): @@ -61,4 +63,4 @@ def compare_output_file(current_output, blessed_output_file): with open(blessed_output_file, 'r') as f: blessed_output = f.read() - compare_output(current_output,blessed_output) + compare_output(current_output, blessed_output) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 47b30181a8..cd8e3755ce 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -1,8 +1,7 @@ from spack import * from spack.package_test import * -import sys import os -import shutil + class Openblas(Package): """OpenBLAS: An optimized BLAS library""" @@ -14,9 +13,9 @@ class Openblas(Package): version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc') version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') - variant('shared', default=True, description="Build shared libraries as well as static libs.") + variant('shared', default=True, description="Build shared libraries as well as static libs.") # NOQA: ignore=E501 variant('openmp', default=False, description="Enable OpenMP support.") - variant('fpic', default=True, description="Build position independent code") + variant('fpic', default=True, description="Build position independent code") # NOQA: ignore=E501 # virtual dependency provides('blas') @@ -48,11 +47,11 @@ class Openblas(Package): # Add support for OpenMP if '+openmp' in spec: - # Note: Apple's most recent Clang 7.3.0 still does not support OpenMP. - # What is worse, Openblas (as of 0.2.18) hardcoded that OpenMP cannot + # Openblas (as of 0.2.18) hardcoded that OpenMP cannot # be used with any (!) compiler named clang, bummer. if spec.satisfies('%clang'): - raise InstallError('OpenBLAS does not support OpenMP with clang!') + raise InstallError('OpenBLAS does not support ', + 'OpenMP with clang!') make_defs += ['USE_OPENMP=1'] @@ -69,29 +68,34 @@ class Openblas(Package): symlink('libopenblas.a', 'blas.a') symlink('libopenblas.a', 'libblas.a') if '+shared' in spec: - symlink('libopenblas.%s' % dso_suffix, 'libblas.%s' % dso_suffix) + symlink('libopenblas.%s' % dso_suffix, + 'libblas.%s' % dso_suffix) # Lapack virtual package should provide liblapack.a with working_dir(prefix.lib): symlink('libopenblas.a', 'liblapack.a') if '+shared' in spec: - symlink('libopenblas.%s' % dso_suffix, 'liblapack.%s' % dso_suffix) + symlink('libopenblas.%s' % dso_suffix, + 'liblapack.%s' % dso_suffix) # Openblas may pass its own test but still fail to compile Lapack - # symbols. To make sure we get working Blas and Lapack, do a small test. + # symbols. To make sure we get working Blas and Lapack, do a small + # test. self.check_install(spec) - def setup_dependent_package(self, module, dspec): # This is WIP for a prototype interface for virtual packages. # We can update this as more builds start depending on BLAS/LAPACK. - libdir = find_library_path('libopenblas.a', self.prefix.lib64, self.prefix.lib) + libdir = find_library_path('libopenblas.a', + self.prefix.lib64, + self.prefix.lib) self.spec.blas_static_lib = join_path(libdir, 'libopenblas.a') self.spec.lapack_static_lib = self.spec.blas_static_lib if '+shared' in self.spec: - self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' % dso_suffix) + self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' % + dso_suffix) self.spec.lapack_shared_lib = self.spec.blas_shared_lib def check_install(self, spec): @@ -108,5 +112,5 @@ class Openblas(Package): if '+openmp' in spec: link_flags.extend([self.compiler.openmp_flag]) - output = compile_c_and_execute(source_file,include_flags,link_flags) - compare_output_file(output,blessed_file) + output = compile_c_and_execute(source_file, include_flags, link_flags) + compare_output_file(output, blessed_file) -- cgit v1.2.3-70-g09d2 From bb4b6c8ee24aa81af6b6ee3a62692a624d52d65a Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 11 May 2016 17:02:36 +0200 Subject: flake 8 : fixed checks --- lib/spack/spack/cmd/module.py | 16 +- lib/spack/spack/environment.py | 58 ++++--- lib/spack/spack/modules.py | 196 ++++++++++++---------- lib/spack/spack/package.py | 353 +++++++++++++++++++++------------------ lib/spack/spack/test/__init__.py | 70 ++------ lib/spack/spack/test/modules.py | 42 +++-- 6 files changed, 391 insertions(+), 344 deletions(-) diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index f996f4eb84..cfe59c8d98 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -32,18 +32,21 @@ from llnl.util.filesystem import mkdirp from spack.modules import module_types from spack.util.string import * -description ="Manipulate modules and dotkits." +description = "Manipulate modules and dotkits." def setup_parser(subparser): sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='module_command') - refresh_parser = sp.add_parser('refresh', help='Regenerate all module files.') + sp.add_parser('refresh', help='Regenerate all module files.') find_parser = sp.add_parser('find', help='Find module files for packages.') - find_parser.add_argument( - 'module_type', help="Type of module to find file for. [" + '|'.join(module_types) + "]") - find_parser.add_argument('spec', nargs='+', help='spec to find a module file for.') + find_parser.add_argument('module_type', + help="Type of module to find file for. [" + + '|'.join(module_types) + "]") + find_parser.add_argument('spec', + nargs='+', + help='spec to find a module file for.') def module_find(mtype, spec_array): @@ -53,7 +56,8 @@ def module_find(mtype, spec_array): should type to use that package's module. """ if mtype not in module_types: - tty.die("Invalid module type: '%s'. Options are %s" % (mtype, comma_or(module_types))) + tty.die("Invalid module type: '%s'. Options are %s" % + (mtype, comma_or(module_types))) specs = spack.cmd.parse_specs(spec_array) if len(specs) > 1: diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 92ab4e6bea..3fbe2531c1 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -1,7 +1,7 @@ -import os -import os.path import collections import inspect +import os +import os.path class NameModifier(object): @@ -26,7 +26,8 @@ class SetEnv(NameValueModifier): class UnsetEnv(NameModifier): def execute(self): - os.environ.pop(self.name, None) # Avoid throwing if the variable was not set + # Avoid throwing if the variable was not set + os.environ.pop(self.name, None) class SetPath(NameValueModifier): @@ -55,7 +56,9 @@ class RemovePath(NameValueModifier): def execute(self): environment_value = os.environ.get(self.name, '') directories = environment_value.split(':') if environment_value else [] - directories = [os.path.normpath(x) for x in directories if x != os.path.normpath(self.value)] + directories = [os.path.normpath(x) + for x in directories + if x != os.path.normpath(self.value)] os.environ[self.name] = ':'.join(directories) @@ -63,7 +66,8 @@ class EnvironmentModifications(object): """ Keeps track of requests to modify the current environment. - Each call to a method to modify the environment stores the extra information on the caller in the request: + Each call to a method to modify the environment stores the extra + information on the caller in the request: - 'filename' : filename of the module where the caller is defined - 'lineno': line number where the request occurred - 'context' : line of code that issued the request that failed @@ -71,10 +75,10 @@ class EnvironmentModifications(object): def __init__(self, other=None): """ - Initializes a new instance, copying commands from other if it is not None + Initializes a new instance, copying commands from other if not None Args: - other: another instance of EnvironmentModifications from which (optional) + other: another instance of EnvironmentModifications (optional) """ self.env_modifications = [] if other is not None: @@ -93,7 +97,8 @@ class EnvironmentModifications(object): @staticmethod def _check_other(other): if not isinstance(other, EnvironmentModifications): - raise TypeError('other must be an instance of EnvironmentModifications') + raise TypeError( + 'other must be an instance of EnvironmentModifications') def _get_outside_caller_attributes(self): stack = inspect.stack() @@ -101,12 +106,10 @@ class EnvironmentModifications(object): _, filename, lineno, _, context, index = stack[2] context = context[index].strip() except Exception: - filename, lineno, context = 'unknown file', 'unknown line', 'unknown context' - args = { - 'filename': filename, - 'lineno': lineno, - 'context': context - } + filename = 'unknown file' + lineno = 'unknown line' + context = 'unknown context' + args = {'filename': filename, 'lineno': lineno, 'context': context} return args def set(self, name, value, **kwargs): @@ -170,7 +173,8 @@ class EnvironmentModifications(object): def remove_path(self, name, path, **kwargs): """ - Stores in the current object a request to remove a path from a path list + Stores in the current object a request to remove a path from a path + list Args: name: name of the path list in the environment @@ -185,7 +189,8 @@ class EnvironmentModifications(object): Returns a dict of the modifications grouped by variable name Returns: - dict mapping the environment variable name to the modifications to be done on it + dict mapping the environment variable name to the modifications to + be done on it """ modifications = collections.defaultdict(list) for item in self: @@ -203,7 +208,7 @@ class EnvironmentModifications(object): Applies the modifications and clears the list """ modifications = self.group_by_name() - # Apply the modifications to the environment variables one variable at a time + # Apply modifications one variable at a time for name, actions in sorted(modifications.items()): for x in actions: x.execute() @@ -224,13 +229,19 @@ def concatenate_paths(paths): def set_or_unset_not_first(variable, changes, errstream): """ - Check if we are going to set or unset something after other modifications have already been requested + Check if we are going to set or unset something after other modifications + have already been requested """ - indexes = [ii for ii, item in enumerate(changes) if ii != 0 and type(item) in [SetEnv, UnsetEnv]] + indexes = [ii + for ii, item in enumerate(changes) + if ii != 0 and type(item) in [SetEnv, UnsetEnv]] if indexes: good = '\t \t{context} at {filename}:{lineno}' nogood = '\t--->\t{context} at {filename}:{lineno}' - errstream('Suspicious requests to set or unset the variable \'{var}\' found'.format(var=variable)) + message = 'Suspicious requests to set or unset the variable \'{var}\' found' # NOQA: ignore=E501 + errstream( + message.format( + var=variable)) for ii, item in enumerate(changes): print_format = nogood if ii in indexes else good errstream(print_format.format(**item.args)) @@ -238,8 +249,8 @@ def set_or_unset_not_first(variable, changes, errstream): def validate(env, errstream): """ - Validates the environment modifications to check for the presence of suspicious patterns. Prompts a warning for - everything that was found + Validates the environment modifications to check for the presence of + suspicious patterns. Prompts a warning for everything that was found Current checks: - set or unset variables after other changes on the same variable @@ -254,7 +265,8 @@ def validate(env, errstream): def filter_environment_blacklist(env, variables): """ - Generator that filters out any change to environment variables present in the input list + Generator that filters out any change to environment variables present in + the input list Args: env: list of environment modifications diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index ffed469b20..53f054094a 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -23,36 +23,35 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## """ -This module contains code for creating environment modules, which can include dotkits, tcl modules, lmod, and others. +This module contains code for creating environment modules, which can include +dotkits, tcl modules, lmod, and others. -The various types of modules are installed by post-install hooks and removed after an uninstall by post-uninstall hooks. -This class consolidates the logic for creating an abstract description of the information that module systems need. -Currently that includes a number of directories to be appended to paths in the user's environment: +The various types of modules are installed by post-install hooks and removed +after an uninstall by post-uninstall hooks. This class consolidates the logic +for creating an abstract description of the information that module systems +need. - * /bin directories to be appended to PATH - * /lib* directories for LD_LIBRARY_PATH - * /include directories for CPATH - * /man* and /share/man* directories for MANPATH - * the package prefix for CMAKE_PREFIX_PATH +This module also includes logic for coming up with unique names for the module +files so that they can be found by the various shell-support files in +$SPACK/share/spack/setup-env.*. -This module also includes logic for coming up with unique names for the module files so that they can be found by the -various shell-support files in $SPACK/share/spack/setup-env.*. - -Each hook in hooks/ implements the logic for writing its specific type of module file. +Each hook in hooks/ implements the logic for writing its specific type of +module file. """ import copy import datetime import os import os.path import re -import textwrap import string +import textwrap import llnl.util.tty as tty import spack import spack.config from llnl.util.filesystem import join_path, mkdirp -from spack.build_environment import parent_class_modules, set_module_variables_for_package +from spack.build_environment import parent_class_modules +from spack.build_environment import set_module_variables_for_package from spack.environment import * __all__ = ['EnvModule', 'Dotkit', 'TclModule'] @@ -67,30 +66,26 @@ def print_help(): """ For use by commands to tell user how to activate shell support. """ - tty.msg("This command requires spack's shell integration.", - "", + tty.msg("This command requires spack's shell integration.", "", "To initialize spack's shell commands, you must run one of", "the commands below. Choose the right command for your shell.", - "", - "For bash and zsh:", - " . %s/setup-env.sh" % spack.share_path, - "", - "For csh and tcsh:", - " setenv SPACK_ROOT %s" % spack.prefix, - " source %s/setup-env.csh" % spack.share_path, - "") + "", "For bash and zsh:", + " . %s/setup-env.sh" % spack.share_path, "", + "For csh and tcsh:", " setenv SPACK_ROOT %s" % spack.prefix, + " source %s/setup-env.csh" % spack.share_path, "") def inspect_path(prefix): """ - Inspects the prefix of an installation to search for common layouts. Issues a request to modify the environment - accordingly when an item is found. + Inspects the prefix of an installation to search for common layouts. Issues + a request to modify the environment accordingly when an item is found. Args: prefix: prefix of the installation Returns: - instance of EnvironmentModifications containing the requested modifications + instance of EnvironmentModifications containing the requested + modifications """ env = EnvironmentModifications() # Inspect the prefix to check for the existence of common directories @@ -105,18 +100,21 @@ def inspect_path(prefix): def dependencies(spec, request='all'): """ - Returns the list of dependent specs for a given spec, according to the given request + Returns the list of dependent specs for a given spec, according to the + given request Args: spec: target spec request: either 'none', 'direct' or 'all' Returns: - empty list if 'none', direct dependency list if 'direct', all dependencies if 'all' + empty list if 'none', direct dependency list if 'direct', all + dependencies if 'all' """ if request not in ('none', 'direct', 'all'): - raise tty.error("Wrong value for argument 'request' : should be one of ('none', 'direct', 'all') " - " [current value is '%s']" % request) + message = "Wrong value for argument 'request' : " + message += "should be one of ('none', 'direct', 'all')" + raise tty.error(message + " [current value is '%s']" % request) if request == 'none': return [] @@ -124,12 +122,19 @@ def dependencies(spec, request='all'): if request == 'direct': return [xx for _, xx in spec.dependencies.items()] - # FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes' - # FIXME : is given. This work around permits to get a unique list of spec anyhow. - # FIXME : Possibly we miss a merge step among nodes that refer to the same package. + # FIXME : during module file creation nodes seem to be visited multiple + # FIXME : times even if cover='nodes' is given. This work around permits + # FIXME : to get a unique list of spec anyhow. Do we miss a merge + # FIXME : step among nodes that refer to the same package? seen = set() seen_add = seen.add - l = [xx for xx in sorted(spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] + l = [xx + for xx in sorted( + spec.traverse(order='post', + depth=True, + cover='nodes', + root=False), + reverse=True)] return [xx for ii, xx in l if not (xx in seen or seen_add(xx))] @@ -146,7 +151,8 @@ def update_dictionary_extending_lists(target, update): def parse_config_options(module_generator): """ - Parse the configuration file and returns a bunch of items that will be needed during module file generation + Parse the configuration file and returns a bunch of items that will be + needed during module file generation Args: module_generator: module generator for a given spec @@ -154,11 +160,14 @@ def parse_config_options(module_generator): Returns: autoloads: list of specs to be autoloaded prerequisites: list of specs to be marked as prerequisite - filters: list of environment variables whose modification is blacklisted in module files - env: list of custom environment modifications to be applied in the module file + filters: list of environment variables whose modification is + blacklisted in module files + env: list of custom environment modifications to be applied in the + module file """ # Get the configuration for this kind of generator - module_configuration = copy.deepcopy(CONFIGURATION.get(module_generator.name, {})) + module_configuration = copy.deepcopy(CONFIGURATION.get( + module_generator.name, {})) ##### # Merge all the rules @@ -179,9 +188,12 @@ def parse_config_options(module_generator): ##### # Automatic loading loads - module_file_actions['autoload'] = dependencies(module_generator.spec, module_file_actions.get('autoload', 'none')) + module_file_actions['autoload'] = dependencies( + module_generator.spec, module_file_actions.get('autoload', 'none')) # Prerequisites - module_file_actions['prerequisites'] = dependencies(module_generator.spec, module_file_actions.get('prerequisites', 'none')) + module_file_actions['prerequisites'] = dependencies( + module_generator.spec, module_file_actions.get('prerequisites', + 'none')) # Environment modifications environment_actions = module_file_actions.pop('environment', {}) env = EnvironmentModifications() @@ -189,7 +201,7 @@ def parse_config_options(module_generator): def process_arglist(arglist): if method == 'unset': for x in arglist: - yield (x,) + yield (x, ) else: for x in arglist.iteritems(): yield x @@ -198,19 +210,13 @@ def parse_config_options(module_generator): for args in process_arglist(arglist): getattr(env, method)(*args) - # for item in arglist: - # if method == 'unset': - # args = [item] - # else: - # args = item.split(',') - # getattr(env, method)(*args) - return module_file_actions, env def filter_blacklisted(specs, module_name): """ - Given a sequence of specs, filters the ones that are blacklisted in the module configuration file. + Given a sequence of specs, filters the ones that are blacklisted in the + module configuration file. Args: specs: sequence of spec instances @@ -233,7 +239,8 @@ class EnvModule(object): class __metaclass__(type): def __init__(cls, name, bases, dict): type.__init__(cls, name, bases, dict) - if cls.name != 'env_module' and cls.name in CONFIGURATION['enable']: + if cls.name != 'env_module' and cls.name in CONFIGURATION[ + 'enable']: module_types[cls.name] = cls def __init__(self, spec=None): @@ -249,7 +256,8 @@ class EnvModule(object): # long description is the docstring with reduced whitespace. self.long_description = None if self.spec.package.__doc__: - self.long_description = re.sub(r'\s+', ' ', self.spec.package.__doc__) + self.long_description = re.sub(r'\s+', ' ', + self.spec.package.__doc__) @property def naming_scheme(self): @@ -271,12 +279,14 @@ class EnvModule(object): @property def use_name(self): """ - Subclasses should implement this to return the name the module command uses to refer to the package. + Subclasses should implement this to return the name the module command + uses to refer to the package. """ naming_tokens = self.tokens naming_scheme = self.naming_scheme name = naming_scheme.format(**naming_tokens) - name += '-' + self.spec.dag_hash() # Always append the hash to make the module file unique + name += '-' + self.spec.dag_hash( + ) # Always append the hash to make the module file unique # Not everybody is working on linux... parts = name.split('/') name = join_path(*parts) @@ -296,8 +306,12 @@ class EnvModule(object): @property def blacklisted(self): configuration = CONFIGURATION.get(self.name, {}) - whitelist_matches = [x for x in configuration.get('whitelist', []) if self.spec.satisfies(x)] - blacklist_matches = [x for x in configuration.get('blacklist', []) if self.spec.satisfies(x)] + whitelist_matches = [x + for x in configuration.get('whitelist', []) + if self.spec.satisfies(x)] + blacklist_matches = [x + for x in configuration.get('blacklist', []) + if self.spec.satisfies(x)] if whitelist_matches: message = '\tWHITELIST : %s [matches : ' % self.spec.cshort_spec for rule in whitelist_matches: @@ -327,7 +341,8 @@ class EnvModule(object): """ if self.blacklisted: return - tty.debug("\tWRITE : %s [%s]" % (self.spec.cshort_spec, self.file_name)) + tty.debug("\tWRITE : %s [%s]" % + (self.spec.cshort_spec, self.file_name)) module_dir = os.path.dirname(self.file_name) if not os.path.exists(module_dir): @@ -337,11 +352,12 @@ class EnvModule(object): # installation prefix env = inspect_path(self.spec.prefix) - # Let the extendee/dependency modify their extensions/dependencies before asking for - # package-specific modifications + # Let the extendee/dependency modify their extensions/dependencies + # before asking for package-specific modifications spack_env = EnvironmentModifications() - # TODO : the code down below is quite similar to build_environment.setup_package and needs to be - # TODO : factored out to a single place + # TODO : the code down below is quite similar to + # TODO : build_environment.setup_package and needs to be factored out + # TODO : to a single place for item in dependencies(self.spec, 'all'): package = self.spec[item.name].package modules = parent_class_modules(package.__class__) @@ -358,14 +374,18 @@ class EnvModule(object): # Parse configuration file module_configuration, conf_env = parse_config_options(self) env.extend(conf_env) - filters = module_configuration.get('filter', {}).get('environment_blacklist',{}) + filters = module_configuration.get('filter', {}).get( + 'environment_blacklist', {}) # Build up the module file content module_file_content = self.header - for x in filter_blacklisted(module_configuration.pop('autoload', []), self.name): + for x in filter_blacklisted( + module_configuration.pop('autoload', []), self.name): module_file_content += self.autoload(x) - for x in filter_blacklisted(module_configuration.pop('prerequisites', []), self.name): + for x in filter_blacklisted( + module_configuration.pop('prerequisites', []), self.name): module_file_content += self.prerequisite(x) - for line in self.process_environment_command(filter_environment_blacklist(env, filters)): + for line in self.process_environment_command( + filter_environment_blacklist(env, filters)): module_file_content += line for line in self.module_specific_content(module_configuration): module_file_content += line @@ -392,10 +412,13 @@ class EnvModule(object): def process_environment_command(self, env): for command in env: try: - yield self.environment_modifications_formats[type(command)].format(**command.args) + yield self.environment_modifications_formats[type( + command)].format(**command.args) except KeyError: - tty.warn('Cannot handle command of type {command} : skipping request'.format(command=type(command))) - tty.warn('{context} at {filename}:{lineno}'.format(**command.args)) + message = 'Cannot handle command of type {command} : skipping request' # NOQA: ignore=E501 + details = '{context} at {filename}:{lineno}' + tty.warn(message.format(command=type(command))) + tty.warn(details.format(**command.args)) @property def file_name(self): @@ -408,9 +431,12 @@ class EnvModule(object): if os.path.exists(mod_file): try: os.remove(mod_file) # Remove the module file - os.removedirs(os.path.dirname(mod_file)) # Remove all the empty directories from the leaf up + os.removedirs( + os.path.dirname(mod_file) + ) # Remove all the empty directories from the leaf up except OSError: - pass # removedirs throws OSError on first non-empty directory found + # removedirs throws OSError on first non-empty directory found + pass class Dotkit(EnvModule): @@ -424,13 +450,12 @@ class Dotkit(EnvModule): autoload_format = 'dk_op {module_file}\n' - prerequisite_format = None # TODO : does something like prerequisite exist for dotkit? - - default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' + default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' # NOQA: ignore=E501 @property def file_name(self): - return join_path(Dotkit.path, self.spec.architecture, '%s.dk' % self.use_name) + return join_path(Dotkit.path, self.spec.architecture, + '%s.dk' % self.use_name) @property def header(self): @@ -474,7 +499,7 @@ class TclModule(EnvModule): prerequisite_format = 'prereq {module_file}\n' - default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' + default_naming_format = '{name}-{version}-{compiler.name}-{compiler.version}' # NOQA: ignore=E501 @property def file_name(self): @@ -482,9 +507,10 @@ class TclModule(EnvModule): @property def header(self): + timestamp = datetime.datetime.now() # TCL Modulefile header header = '#%Module1.0\n' - header += '## Module file created by spack (https://github.com/LLNL/spack) on %s\n' % datetime.datetime.now() + header += '## Module file created by spack (https://github.com/LLNL/spack) on %s\n' % timestamp # NOQA: ignore=E501 header += '##\n' header += '## %s\n' % self.spec.short_spec header += '##\n' @@ -509,16 +535,18 @@ class TclModule(EnvModule): f = string.Formatter() for item in conflict_format: line = 'conflict ' + item + '\n' - if len([x for x in f.parse(line)]) > 1: # We do have placeholder to substitute - for naming_dir, conflict_dir in zip(self.naming_scheme.split('/'), item.split('/')): + if len([x for x in f.parse(line) + ]) > 1: # We do have placeholder to substitute + for naming_dir, conflict_dir in zip( + self.naming_scheme.split('/'), item.split('/')): if naming_dir != conflict_dir: - message = 'conflict scheme does not match naming scheme [{spec}]\n\n' + message = 'conflict scheme does not match naming scheme [{spec}]\n\n' # NOQA: ignore=E501 message += 'naming scheme : "{nformat}"\n' message += 'conflict scheme : "{cformat}"\n\n' - message += '** You may want to check your `modules.yaml` configuration file **\n' - tty.error( - message.format(spec=self.spec, nformat=self.naming_scheme, cformat=item) - ) + message += '** You may want to check your `modules.yaml` configuration file **\n' # NOQA: ignore=E501 + tty.error(message.format(spec=self.spec, + nformat=self.naming_scheme, + cformat=item)) raise SystemExit('Module generation aborted.') line = line.format(**naming_tokens) yield line diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 3626a574c8..8e6cf32954 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -37,7 +37,6 @@ import os import re import textwrap import time -import glob import llnl.util.tty as tty import spack @@ -62,7 +61,6 @@ from spack.util.environment import dump_environment from spack.util.executable import ProcessError from spack.version import * from urlparse import urlparse - """Allowed URL schemes for spack packages.""" _ALLOWED_URL_SCHEMES = ["http", "https", "ftp", "file", "git"] @@ -305,26 +303,21 @@ class Package(object): # """By default we build in parallel. Subclasses can override this.""" parallel = True - """# jobs to use for parallel make. If set, overrides default of ncpus.""" make_jobs = None - - """Most packages are NOT extendable. Set to True if you want extensions.""" + """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 not exist after install, or if they exist but are not files, sanity checks fail. """ sanity_check_is_file = [] - """List of prefix-relative directory paths (or a single path). If these do not exist after install, or if they exist but are not directories, sanity checks will fail. """ sanity_check_is_dir = [] - def __init__(self, spec): # this determines how the package should be built. self.spec = spec @@ -336,23 +329,24 @@ class Package(object): self.name = self.name[self.name.rindex('.') + 1:] # Allow custom staging paths for packages - self.path=None + self.path = None # Sanity check attributes required by Spack directives. spack.directives.ensure_dicts(type(self)) # Check versions in the versions dict. for v in self.versions: - assert(isinstance(v, Version)) + assert (isinstance(v, Version)) # Check version descriptors for v in sorted(self.versions): - assert(isinstance(self.versions[v], dict)) + assert (isinstance(self.versions[v], dict)) # Version-ize the keys in versions dict try: - self.versions = dict((Version(v), h) for v,h in self.versions.items()) - except ValueError, e: + self.versions = dict((Version(v), h) + for v, h in self.versions.items()) + except ValueError as e: raise ValueError("In package %s: %s" % (self.name, e.message)) # stage used to build this package. @@ -366,9 +360,9 @@ class Package(object): # This makes self.url behave sanely. if self.spec.versions.concrete: # TODO: this is a really roundabout way of determining the type - # TODO: of fetch to do. figure out a more sane fetch strategy/package - # TODO: init order (right now it's conflated with stage, package, and - # TODO: the tests make assumptions) + # TODO: of fetch to do. figure out a more sane fetch + # TODO: strategy/package init order (right now it's conflated with + # TODO: stage, package, and the tests make assumptions) f = fs.for_package_version(self, self.version) if isinstance(f, fs.URLFetchStrategy): self.url = self.url_for_version(self.spec.version) @@ -387,14 +381,12 @@ class Package(object): if self.is_extension: spack.repo.get(self.extendee_spec)._check_extendable() - @property def version(self): if not self.spec.versions.concrete: raise ValueError("Can only get of package with concrete version.") return self.spec.versions[0] - @memoized def version_urls(self): """Return a list of URLs for different versions of this @@ -407,7 +399,6 @@ class Package(object): version_urls[v] = args['url'] return version_urls - def nearest_url(self, version): """Finds the URL for the next lowest version with a URL. If there is no lower version with a URL, uses the @@ -424,10 +415,11 @@ class Package(object): url = version_urls[v] return url - # TODO: move this out of here and into some URL extrapolation module? def url_for_version(self, version): - """Returns a URL that you can download a new version of this package from.""" + """ + Returns a URL that you can download a new version of this package from. + """ if not isinstance(version, Version): version = Version(version) @@ -441,14 +433,17 @@ class Package(object): return version_urls[version] # If we have no idea, try to substitute the version. - return spack.url.substitute_version(self.nearest_url(version), - self.url_version(version)) + return spack.url.substitute_version( + self.nearest_url(version), self.url_version(version)) def _make_resource_stage(self, root_stage, fetcher, resource): resource_stage_folder = self._resource_stage(resource) resource_mirror = join_path(self.name, os.path.basename(fetcher.url)) - stage = ResourceStage(resource.fetcher, root=root_stage, resource=resource, - name=resource_stage_folder, mirror_path=resource_mirror, + stage = ResourceStage(resource.fetcher, + root=root_stage, + resource=resource, + name=resource_stage_folder, + mirror_path=resource_mirror, path=self.path) return stage @@ -474,7 +469,8 @@ class Package(object): else: # Construct resource stage resource = resources[ii - 1] # ii == 0 is root! - stage = self._make_resource_stage(composite_stage[0], fetcher, resource) + stage = self._make_resource_stage(composite_stage[0], fetcher, + resource) # Append the item to the composite composite_stage.append(stage) @@ -492,13 +488,11 @@ class Package(object): self._stage = self._make_stage() return self._stage - @stage.setter def stage(self, stage): """Allow a stage object to be set to override the default.""" self._stage = stage - def _make_fetcher(self): # Construct a composite fetcher that always contains at least # one element (the root package). In case there are resources @@ -515,7 +509,8 @@ class Package(object): @property def fetcher(self): if not self.spec.versions.concrete: - raise ValueError("Can only get a fetcher for a package with concrete versions.") + raise ValueError( + "Can only get a fetcher for a package with concrete versions.") if not self._fetcher: self._fetcher = self._make_fetcher() return self._fetcher @@ -524,10 +519,11 @@ class Package(object): def fetcher(self, f): self._fetcher = f - @property def extendee_spec(self): - """Spec of the extendee of this package, or None if it is not an extension.""" + """ + Spec of the extendee of this package, or None if it is not an extension + """ if not self.extendees: return None @@ -549,10 +545,11 @@ class Package(object): spec, kwargs = self.extendees[name] return spec - @property def extendee_args(self): - """Spec of the extendee of this package, or None if it is not an extension.""" + """ + Spec of the extendee of this package, or None if it is not an extension + """ if not self.extendees: return None @@ -560,7 +557,6 @@ class Package(object): name = next(iter(self.extendees)) return self.extendees[name][1] - @property def is_extension(self): # if it is concrete, it's only an extension if it actually @@ -571,22 +567,20 @@ class Package(object): # If not, then it's an extension if it *could* be an extension return bool(self.extendees) - def extends(self, spec): - if not spec.name in self.extendees: + if spec.name not in self.extendees: return False s = self.extendee_spec return s and s.satisfies(spec) - @property def activated(self): if not self.is_extension: - raise ValueError("is_extension called on package that is not an extension.") + raise ValueError( + "is_extension called on package that is not an extension.") exts = spack.install_layout.extension_map(self.extendee_spec) return (self.name in exts) and (exts[self.name] == self.spec) - def preorder_traversal(self, visited=None, **kwargs): """This does a preorder traversal of the package's dependence DAG.""" virtual = kwargs.get("virtual", False) @@ -605,36 +599,35 @@ class Package(object): spec = self.dependencies[name] # 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 but we might - # want to reinvestigate if we start using a lot of complicated virtual - # dependencies + # 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 + # but we might want to reinvestigate if we start using a lot of + # complicated virtual dependencies # TODO: reinvestigate this. if spec.virtual: if virtual: yield spec continue - for pkg in spack.repo.get(name).preorder_traversal(visited, **kwargs): + for pkg in spack.repo.get(name).preorder_traversal(visited, + **kwargs): yield pkg - def provides(self, vpkg_name): - """True if this package provides a virtual package with the specified name.""" + """ + True if this package provides a virtual package with the specified name + """ return any(s.name == vpkg_name for s in self.provided) - def virtual_dependencies(self, visited=None): for spec in sorted(set(self.preorder_traversal(virtual=True))): yield spec - @property def installed(self): return os.path.isdir(self.prefix) - @property def installed_dependents(self): """Return a list of the specs of all installed packages that depend @@ -651,60 +644,62 @@ class Package(object): dependents.append(spec) return dependents - @property def prefix(self): """Get the prefix into which this package should be installed.""" return self.spec.prefix - @property def compiler(self): - """Get the spack.compiler.Compiler object used to build this package.""" + """Get the spack.compiler.Compiler object used to build this package""" if not self.spec.concrete: raise ValueError("Can only get a compiler for a concrete package.") return spack.compilers.compiler_for_spec(self.spec.compiler) - def url_version(self, version): - """Given a version, this returns a string that should be substituted into the - package's URL to download that version. - By default, this just returns the version string. Subclasses may need to - override this, e.g. for boost versions where you need to ensure that there - are _'s in the download URL. """ - return str(version) + Given a version, this returns a string that should be substituted + into the package's URL to download that version. + By default, this just returns the version string. Subclasses may need + to override this, e.g. for boost versions where you need to ensure that + there are _'s in the download URL. + """ + return str(version) def remove_prefix(self): - """Removes the prefix for a package along with any empty parent directories.""" + """ + Removes the prefix for a package along with any empty parent + directories + """ spack.install_layout.remove_install_directory(self.spec) - def do_fetch(self, mirror_only=False): - """Creates a stage directory and downloads the tarball for this package. - Working directory will be set to the stage directory. + """ + Creates a stage directory and downloads the tarball for this package. + Working directory will be set to the stage directory. """ if not self.spec.concrete: raise ValueError("Can only fetch concrete packages.") start_time = time.time() - if spack.do_checksum and not self.version in self.versions: - tty.warn("There is no checksum on file to fetch %s safely." - % self.spec.format('$_$@')) + if spack.do_checksum and self.version not in self.versions: + tty.warn("There is no checksum on file to fetch %s safely." % + self.spec.format('$_$@')) # Ask the user whether to skip the checksum if we're # interactive, but just fail if non-interactive. - checksum_msg = "Add a checksum or use --no-checksum to skip this check." + checksum_msg = "Add a checksum or use --no-checksum to skip this check." # NOQA: ignore=E501 ignore_checksum = False if sys.stdout.isatty(): - ignore_checksum = tty.get_yes_or_no(" Fetch anyway?", default=False) + ignore_checksum = tty.get_yes_or_no(" Fetch anyway?", + default=False) if ignore_checksum: tty.msg("Fetching with no checksum.", checksum_msg) if not ignore_checksum: - raise FetchError( - "Will not fetch %s" % self.spec.format('$_$@'), checksum_msg) + raise FetchError("Will not fetch %s" % + self.spec.format('$_$@'), checksum_msg) self.stage.fetch(mirror_only) @@ -723,7 +718,6 @@ class Package(object): self.stage.expand_archive() self.stage.chdir_to_source() - def do_patch(self): """Calls do_stage(), then applied patches to the expanded tarball if they haven't been applied already.""" @@ -743,10 +737,10 @@ class Package(object): # Construct paths to special files in the archive dir used to # keep track of whether patches were successfully applied. - archive_dir = self.stage.source_path - good_file = join_path(archive_dir, '.spack_patched') + archive_dir = self.stage.source_path + good_file = join_path(archive_dir, '.spack_patched') no_patches_file = join_path(archive_dir, '.spack_no_patches') - bad_file = join_path(archive_dir, '.spack_patch_failed') + bad_file = join_path(archive_dir, '.spack_patch_failed') # If we encounter an archive that failed to patch, restage it # so that we can apply all the patches again. @@ -801,13 +795,11 @@ class Package(object): else: touch(no_patches_file) - @property def namespace(self): namespace, dot, module = self.__module__.rpartition('.') return namespace - def do_fake_install(self): """Make a fake install directory contaiing a 'fake' file in bin.""" mkdirp(self.prefix.bin) @@ -815,15 +807,15 @@ class Package(object): mkdirp(self.prefix.lib) mkdirp(self.prefix.man1) - def _get_needed_resources(self): resources = [] # Select the resources that are needed for this build for when_spec, resource_list in self.resources.items(): if when_spec in self.spec: resources.extend(resource_list) - # Sorts the resources by the length of the string representing their destination. Since any nested resource - # must contain another resource's name in its path, it seems that should work + # Sorts the resources by the length of the string representing their + # destination. Since any nested resource must contain another + # resource's name in its path, it seems that should work resources = sorted(resources, key=lambda res: len(res.destination)) return resources @@ -832,10 +824,14 @@ class Package(object): resource_stage_folder = '-'.join(pieces) return resource_stage_folder - def do_install(self, - keep_prefix=False, keep_stage=False, ignore_deps=False, - skip_patch=False, verbose=False, make_jobs=None, fake=False): + keep_prefix=False, + keep_stage=False, + ignore_deps=False, + skip_patch=False, + verbose=False, + make_jobs=None, + fake=False): """Called by commands to install a package and its dependencies. Package implementations should override install() to describe @@ -846,18 +842,20 @@ class Package(object): keep_stage -- By default, stage is destroyed only if there are no exceptions during build. Set to True to keep the stage even with exceptions. - ignore_deps -- Do not install dependencies before installing this package. + ignore_deps -- Don't install dependencies before installing this + package fake -- Don't really build -- install fake stub files instead. skip_patch -- Skip patch stage of build if True. verbose -- Display verbose build output (by default, suppresses it) - make_jobs -- Number of make jobs to use for install. Default is ncpus. + make_jobs -- Number of make jobs to use for install. Default is ncpus """ if not self.spec.concrete: raise ValueError("Can only install concrete packages.") # No installation needed if package is external if self.spec.external: - tty.msg("%s is externally installed in %s" % (self.name, self.spec.external)) + tty.msg("%s is externally installed in %s" % + (self.name, self.spec.external)) return # Ensure package is not already installed @@ -869,9 +867,13 @@ class Package(object): # First, install dependencies recursively. if not ignore_deps: - self.do_install_dependencies( - keep_prefix=keep_prefix, keep_stage=keep_stage, ignore_deps=ignore_deps, - fake=fake, skip_patch=skip_patch, verbose=verbose, make_jobs=make_jobs) + self.do_install_dependencies(keep_prefix=keep_prefix, + keep_stage=keep_stage, + ignore_deps=ignore_deps, + fake=fake, + skip_patch=skip_patch, + verbose=verbose, + make_jobs=make_jobs) # Set parallelism before starting build. self.make_jobs = make_jobs @@ -899,35 +901,41 @@ class Package(object): self.do_fake_install() else: # Do the real install in the source directory. - self.stage.chdir_to_source() + self.stage.chdir_to_source() - # Save the build environment in a file before building. - env_path = join_path(os.getcwd(), 'spack-build.env') + # Save the build environment in a file before building. + env_path = join_path(os.getcwd(), 'spack-build.env') - try: - # Redirect I/O to a build log (and optionally to the terminal) + try: + # Redirect I/O to a build log (and optionally to + # the terminal) log_path = join_path(os.getcwd(), 'spack-build.out') log_file = open(log_path, 'w') - with log_output(log_file, verbose, sys.stdout.isatty(), True): + with log_output(log_file, verbose, sys.stdout.isatty(), + True): dump_environment(env_path) self.install(self.spec, self.prefix) - except ProcessError as e: - # Annotate ProcessErrors with the location of the build log. - e.build_log = log_path - raise e + except ProcessError as e: + # Annotate ProcessErrors with the location of + # the build log + e.build_log = log_path + raise e - # Ensure that something was actually installed. - self.sanity_check_prefix() + # Ensure that something was actually installed. + self.sanity_check_prefix() - # Copy provenance into the install directory on success - log_install_path = spack.install_layout.build_log_path(self.spec) - env_install_path = spack.install_layout.build_env_path(self.spec) - packages_dir = spack.install_layout.build_packages_path(self.spec) + # Copy provenance into the install directory on success + log_install_path = spack.install_layout.build_log_path( + self.spec) + env_install_path = spack.install_layout.build_env_path( + self.spec) + packages_dir = spack.install_layout.build_packages_path( + self.spec) - install(log_path, log_install_path) - install(env_path, env_install_path) - dump_packages(self.spec, packages_dir) + install(log_path, log_install_path) + install(env_path, env_install_path) + dump_packages(self.spec, packages_dir) # Run post install hooks before build stage is removed. spack.hooks.post_install(self) @@ -937,8 +945,9 @@ class Package(object): build_time = self._total_time - self._fetch_time tty.msg("Successfully installed %s" % self.name, - "Fetch: %s. Build: %s. Total: %s." - % (_hms(self._fetch_time), _hms(build_time), _hms(self._total_time))) + "Fetch: %s. Build: %s. Total: %s." % + (_hms(self._fetch_time), _hms(build_time), + _hms(self._total_time))) print_pkg(self.prefix) try: @@ -953,16 +962,17 @@ class Package(object): tty.warn("Keeping install prefix in place despite error.", "Spack will think this package is installed. " + "Manually remove this directory to fix:", - self.prefix, wrap=True) + self.prefix, + wrap=True) raise # note: PARENT of the build process adds the new package to # the database, so that we don't need to re-read from file. spack.installed_db.add(self.spec, self.prefix) - def sanity_check_prefix(self): """This function checks whether install succeeded.""" + def check_paths(path_list, filetype, predicate): if isinstance(path_list, basestring): path_list = [path_list] @@ -970,8 +980,9 @@ class Package(object): for path in path_list: abs_path = os.path.join(self.prefix, path) if not predicate(abs_path): - raise InstallError("Install failed for %s. No such %s in prefix: %s" - % (self.name, filetype, path)) + raise InstallError( + "Install failed for %s. No such %s in prefix: %s" % + (self.name, filetype, path)) check_paths(self.sanity_check_is_file, 'file', os.path.isfile) check_paths(self.sanity_check_is_dir, 'directory', os.path.isdir) @@ -982,13 +993,11 @@ class Package(object): raise InstallError( "Install failed for %s. Nothing was installed!" % self.name) - def do_install_dependencies(self, **kwargs): # Pass along paths of dependencies here for dep in self.spec.dependencies.values(): dep.package.do_install(**kwargs) - @property def build_log_path(self): if self.installed: @@ -996,7 +1005,6 @@ class Package(object): else: return join_path(self.stage.source_path, 'spack-build.out') - @property def module(self): """Use this to add variables to the class's module's scope. @@ -1037,7 +1045,6 @@ class Package(object): """ pass - def setup_dependent_environment(self, spack_env, run_env, dependent_spec): """Set up the environment of packages that depend on this one. @@ -1077,7 +1084,6 @@ class Package(object): """ self.setup_environment(spack_env, run_env) - def setup_dependent_package(self, module, dependent_spec): """Set up Python module-scope variables for dependent packages. @@ -1123,8 +1129,11 @@ class Package(object): pass def install(self, spec, prefix): - """Package implementations override this with their own build configuration.""" - raise InstallError("Package %s provides no install method!" % self.name) + """ + Package implementations override this with their own configuration + """ + raise InstallError("Package %s provides no install method!" % + self.name) def do_uninstall(self, force=False): if not self.installed: @@ -1146,12 +1155,10 @@ class Package(object): # Once everything else is done, run post install hooks spack.hooks.post_uninstall(self) - def _check_extendable(self): if not self.extendable: raise ValueError("Package %s is not extendable!" % self.name) - def _sanity_check_extension(self): if not self.is_extension: raise ActivationError("This package is not an extension.") @@ -1160,12 +1167,13 @@ class Package(object): extendee_package._check_extendable() if not extendee_package.installed: - raise ActivationError("Can only (de)activate extensions for installed packages.") + raise ActivationError( + "Can only (de)activate extensions for installed packages.") if not self.installed: raise ActivationError("Extensions must first be installed.") - if not self.extendee_spec.name in self.extendees: - raise ActivationError("%s does not extend %s!" % (self.name, self.extendee.name)) - + if self.extendee_spec.name not in self.extendees: + raise ActivationError("%s does not extend %s!" % + (self.name, self.extendee.name)) def do_activate(self, force=False): """Called on an etension to invoke the extendee's activate method. @@ -1175,8 +1183,8 @@ class Package(object): """ self._sanity_check_extension() - spack.install_layout.check_extension_conflict( - self.extendee_spec, self.spec) + spack.install_layout.check_extension_conflict(self.extendee_spec, + self.spec) # Activate any package dependencies that are also extensions. if not force: @@ -1188,9 +1196,8 @@ class Package(object): self.extendee_spec.package.activate(self, **self.extendee_args) spack.install_layout.add_extension(self.extendee_spec, self.spec) - tty.msg("Activated extension %s for %s" - % (self.spec.short_spec, self.extendee_spec.format("$_$@$+$%@"))) - + tty.msg("Activated extension %s for %s" % + (self.spec.short_spec, self.extendee_spec.format("$_$@$+$%@"))) def activate(self, extension, **kwargs): """Symlinks all files from the extension into extendee's install dir. @@ -1201,6 +1208,7 @@ class Package(object): always executed. """ + def ignore(filename): return (filename in spack.install_layout.hidden_file_paths or kwargs.get('ignore', lambda f: False)(filename)) @@ -1212,7 +1220,6 @@ class Package(object): tree.merge(self.prefix, ignore=ignore) - def do_deactivate(self, **kwargs): """Called on the extension to invoke extendee's deactivate() method.""" self._sanity_check_extension() @@ -1230,7 +1237,7 @@ class Package(object): for dep in aspec.traverse(): if self.spec == dep: raise ActivationError( - "Cannot deactivate %s beacuse %s is activated and depends on it." + "Cannot deactivate %s because %s is activated and depends on it." # NOQA: ignore=E501 % (self.spec.short_spec, aspec.short_spec)) self.extendee_spec.package.deactivate(self, **self.extendee_args) @@ -1238,11 +1245,11 @@ class Package(object): # redundant activation check -- makes SURE the spec is not # still activated even if something was wrong above. if self.activated: - spack.install_layout.remove_extension(self.extendee_spec, self.spec) - - tty.msg("Deactivated extension %s for %s" - % (self.spec.short_spec, self.extendee_spec.format("$_$@$+$%@"))) + spack.install_layout.remove_extension(self.extendee_spec, + self.spec) + tty.msg("Deactivated extension %s for %s" % + (self.spec.short_spec, self.extendee_spec.format("$_$@$+$%@"))) def deactivate(self, extension, **kwargs): """Unlinks all files from extension out of this package's install dir. @@ -1253,6 +1260,7 @@ class Package(object): always executed. """ + def ignore(filename): return (filename in spack.install_layout.hidden_file_paths or kwargs.get('ignore', lambda f: False)(filename)) @@ -1260,17 +1268,14 @@ class Package(object): tree = LinkTree(extension.prefix) tree.unmerge(self.prefix, ignore=ignore) - def do_restage(self): """Reverts expanded/checked out source to a pristine state.""" self.stage.restage() - def do_clean(self): """Removes the package's build stage and source tarball.""" self.stage.destroy() - def format_doc(self, **kwargs): """Wrap doc string at 72 characters and format nicely""" indent = kwargs.get('indent', 0) @@ -1285,7 +1290,6 @@ class Package(object): results.write((" " * indent) + line + "\n") return results.getvalue() - @property def all_urls(self): urls = [] @@ -1297,7 +1301,6 @@ class Package(object): urls.append(args['url']) return urls - def fetch_remote_versions(self): """Try to find remote versions of this package using the list_url and any other URLs described in the package file.""" @@ -1306,26 +1309,30 @@ class Package(object): try: return spack.util.web.find_versions_of_archive( - *self.all_urls, list_url=self.list_url, list_depth=self.list_depth) + *self.all_urls, + list_url=self.list_url, + list_depth=self.list_depth) except spack.error.NoNetworkConnectionError as e: - tty.die("Package.fetch_versions couldn't connect to:", - e.url, e.message) - + tty.die("Package.fetch_versions couldn't connect to:", e.url, + e.message) @property 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) + rpaths.extend(d.prefix.lib + for d in self.spec.traverse(root=False) 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 self.spec.traverse(root=False) if os.path.isdir(d.prefix.lib64)) return rpaths - @property def rpath_args(self): - """Get the rpath args as a string, with -Wl,-rpath, for each element.""" + """ + Get the rpath args as a string, with -Wl,-rpath, for each element + """ return " ".join("-Wl,-rpath,%s" % p for p in self.rpath) @@ -1333,6 +1340,7 @@ def install_dependency_symlinks(pkg, spec, prefix): """Execute a dummy install and flatten dependencies""" flatten_dependencies(spec, prefix) + def flatten_dependencies(spec, flat_dir): """Make each dependency of spec present in dir via symlink.""" for dep in spec.traverse(root=False): @@ -1341,13 +1349,13 @@ def flatten_dependencies(spec, flat_dir): dep_path = spack.install_layout.path_for_spec(dep) dep_files = LinkTree(dep_path) - os.mkdir(flat_dir+'/'+name) + os.mkdir(flat_dir + '/' + name) - conflict = dep_files.find_conflict(flat_dir+'/'+name) + conflict = dep_files.find_conflict(flat_dir + '/' + name) if conflict: raise DependencyConflictError(conflict) - dep_files.merge(flat_dir+'/'+name) + dep_files.merge(flat_dir + '/' + name) def validate_package_url(url_string): @@ -1388,9 +1396,11 @@ def dump_packages(spec, path): # Create a source repo and get the pkg directory out of it. try: source_repo = spack.repository.Repo(source_repo_root) - source_pkg_dir = source_repo.dirname_for_package_name(node.name) - except RepoError as e: - tty.warn("Warning: Couldn't copy in provenance for %s" % node.name) + source_pkg_dir = source_repo.dirname_for_package_name( + node.name) + except RepoError: + tty.warn("Warning: Couldn't copy in provenance for %s" % + node.name) # Create a destination repository dest_repo_root = join_path(path, node.namespace) @@ -1410,7 +1420,7 @@ def print_pkg(message): """Outputs a message with a package icon.""" from llnl.util.tty.color import cwrite cwrite('@*g{[+]} ') - print message + print(message) def _hms(seconds): @@ -1419,20 +1429,25 @@ def _hms(seconds): h, m = divmod(m, 60) parts = [] - if h: parts.append("%dh" % h) - if m: parts.append("%dm" % m) - if s: parts.append("%.2fs" % s) + if h: + parts.append("%dh" % h) + if m: + parts.append("%dm" % m) + if s: + parts.append("%.2fs" % s) return ' '.join(parts) class FetchError(spack.error.SpackError): """Raised when something goes wrong during fetch.""" + def __init__(self, message, long_msg=None): super(FetchError, self).__init__(message, long_msg) class InstallError(spack.error.SpackError): """Raised when something goes wrong during install or uninstall.""" + def __init__(self, message, long_msg=None): super(InstallError, self).__init__(message, long_msg) @@ -1443,21 +1458,24 @@ class ExternalPackageError(InstallError): class PackageStillNeededError(InstallError): """Raised when package is still needed by another on uninstall.""" + def __init__(self, spec, dependents): - super(PackageStillNeededError, self).__init__( - "Cannot uninstall %s" % spec) + super(PackageStillNeededError, self).__init__("Cannot uninstall %s" % + spec) self.spec = spec self.dependents = dependents class PackageError(spack.error.SpackError): """Raised when something is wrong with a package definition.""" + def __init__(self, message, long_msg=None): super(PackageError, self).__init__(message, long_msg) class PackageVersionError(PackageError): """Raised when a version URL cannot automatically be determined.""" + def __init__(self, version): super(PackageVersionError, self).__init__( "Cannot determine a URL automatically for version %s" % version, @@ -1466,6 +1484,7 @@ class PackageVersionError(PackageError): class VersionFetchError(PackageError): """Raised when a version URL cannot automatically be determined.""" + def __init__(self, cls): super(VersionFetchError, self).__init__( "Cannot fetch versions for package %s " % cls.__name__ + @@ -1474,12 +1493,15 @@ class VersionFetchError(PackageError): class NoURLError(PackageError): """Raised when someone tries to build a URL for a package with no URLs.""" + def __init__(self, cls): super(NoURLError, self).__init__( "Package %s has no version with a URL." % cls.__name__) -class ExtensionError(PackageError): pass +class ExtensionError(PackageError): + + pass class ExtensionConflictError(ExtensionError): @@ -1495,7 +1517,8 @@ class ActivationError(ExtensionError): class DependencyConflictError(spack.error.SpackError): """Raised when the dependencies cannot be flattened as asked for.""" + def __init__(self, conflict): super(DependencyConflictError, self).__init__( - "%s conflicts with another file in the flattened directory." %( + "%s conflicts with another file in the flattened directory." % ( conflict)) diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index 05f58ab7b1..10eaac1344 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -23,53 +23,23 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import sys -import unittest -import nose -from spack.test.tally_plugin import Tally -from llnl.util.filesystem import join_path import llnl.util.tty as tty -from llnl.util.tty.colify import colify - +import nose import spack - +from llnl.util.filesystem import join_path +from llnl.util.tty.colify import colify +from spack.test.tally_plugin import Tally """Names of tests to be included in Spack's test suite""" -test_names = ['versions', - 'url_parse', - 'url_substitution', - 'packages', - 'stage', - 'spec_syntax', - 'spec_semantics', - 'spec_dag', - 'concretize', - 'multimethod', - 'install', - 'package_sanity', - 'config', - 'directory_layout', - 'pattern', - 'python_version', - 'git_fetch', - 'svn_fetch', - 'hg_fetch', - 'mirror', - 'modules', - 'url_extrapolate', - 'cc', - 'link_tree', - 'spec_yaml', - 'optional_deps', - 'make_executable', - 'configure_guess', - 'lock', - 'database', - 'namespace_trie', - 'yaml', - 'sbang', - 'environment', - 'cmd.uninstall', - 'cmd.test_install'] +test_names = ['versions', 'url_parse', 'url_substitution', 'packages', 'stage', + 'spec_syntax', 'spec_semantics', 'spec_dag', 'concretize', + 'multimethod', 'install', 'package_sanity', 'config', + 'directory_layout', 'pattern', 'python_version', 'git_fetch', + 'svn_fetch', 'hg_fetch', 'mirror', 'modules', 'url_extrapolate', + 'cc', 'link_tree', 'spec_yaml', 'optional_deps', + 'make_executable', 'configure_guess', 'lock', 'database', + 'namespace_trie', 'yaml', 'sbang', 'environment', + 'cmd.uninstall', 'cmd.test_install'] def list_tests(): @@ -80,8 +50,6 @@ def list_tests(): def run(names, outputDir, verbose=False): """Run tests with the supplied names. Names should be a list. If it's empty, run ALL of Spack's tests.""" - verbosity = 1 if not verbose else 2 - if not names: names = test_names else: @@ -95,7 +63,7 @@ def run(names, outputDir, verbose=False): tally = Tally() for test in names: module = 'spack.test.' + test - print module + print(module) tty.msg("Running test: %s" % test) @@ -105,15 +73,13 @@ def run(names, outputDir, verbose=False): xmlOutputFname = "unittests-{0}.xml".format(test) xmlOutputPath = join_path(outputDir, xmlOutputFname) runOpts += ["--with-xunit", - "--xunit-file={0}".format(xmlOutputPath)] + "--xunit-file={0}".format(xmlOutputPath)] argv = [""] + runOpts + [module] - result = nose.run(argv=argv, addplugins=[tally]) + nose.run(argv=argv, addplugins=[tally]) succeeded = not tally.failCount and not tally.errorCount - tty.msg("Tests Complete.", - "%5d tests run" % tally.numberOfTestsRun, - "%5d failures" % tally.failCount, - "%5d errors" % tally.errorCount) + tty.msg("Tests Complete.", "%5d tests run" % tally.numberOfTestsRun, + "%5d failures" % tally.failCount, "%5d errors" % tally.errorCount) if succeeded: tty.info("OK", format='g') diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index b8b0d6fc6a..c65d663250 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -2,14 +2,18 @@ import collections from contextlib import contextmanager import StringIO +import spack.modules +from spack.test.mock_packages_test import MockPackagesTest FILE_REGISTRY = collections.defaultdict(StringIO.StringIO) + # Monkey-patch open to write module files to a StringIO instance @contextmanager def mock_open(filename, mode): if not mode == 'w': - raise RuntimeError('test.modules : unexpected opening mode for monkey-patched open') + raise RuntimeError( + 'test.modules : unexpected opening mode for monkey-patched open') FILE_REGISTRY[filename] = StringIO.StringIO() @@ -20,7 +24,6 @@ def mock_open(filename, mode): FILE_REGISTRY[filename] = handle.getvalue() handle.close() -import spack.modules configuration_autoload_direct = { 'enable': ['tcl'], @@ -47,7 +50,8 @@ configuration_alter_environment = { 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']} }, '=x86-linux': { - 'environment': {'set': {'FOO': 'foo'}, 'unset': ['BAR']} + 'environment': {'set': {'FOO': 'foo'}, + 'unset': ['BAR']} } } } @@ -72,15 +76,14 @@ configuration_conflicts = { } } -from spack.test.mock_packages_test import MockPackagesTest - class TclTests(MockPackagesTest): def setUp(self): super(TclTests, self).setUp() self.configuration_obj = spack.modules.CONFIGURATION spack.modules.open = mock_open - spack.modules.CONFIGURATION = None # Make sure that a non-mocked configuration will trigger an error + # Make sure that a non-mocked configuration will trigger an error + spack.modules.CONFIGURATION = None def tearDown(self): del spack.modules.open @@ -98,7 +101,7 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_autoload_direct spec = spack.spec.Spec('mpich@3.0.4=x86-linux') content = self.get_modulefile_content(spec) - self.assertTrue('module-whatis "mpich @3.0.4"' in content ) + self.assertTrue('module-whatis "mpich @3.0.4"' in content) def test_autoload(self): spack.modules.CONFIGURATION = configuration_autoload_direct @@ -117,14 +120,22 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_alter_environment spec = spack.spec.Spec('mpileaks=x86-linux') content = self.get_modulefile_content(spec) - self.assertEqual(len([x for x in content if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) - self.assertEqual(len([x for x in content if 'setenv FOO "foo"' in x]), 1) + self.assertEqual( + len([x + for x in content + if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) + self.assertEqual( + len([x for x in content if 'setenv FOO "foo"' in x]), 1) self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 1) spec = spack.spec.Spec('libdwarf=x64-linux') content = self.get_modulefile_content(spec) - self.assertEqual(len([x for x in content if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) - self.assertEqual(len([x for x in content if 'setenv FOO "foo"' in x]), 0) + self.assertEqual( + len([x + for x in content + if x.startswith('prepend-path CMAKE_PREFIX_PATH')]), 0) + self.assertEqual( + len([x for x in content if 'setenv FOO "foo"' in x]), 0) self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 0) def test_blacklist(self): @@ -138,6 +149,9 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_conflicts spec = spack.spec.Spec('mpileaks=x86-linux') content = self.get_modulefile_content(spec) - self.assertEqual(len([x for x in content if x.startswith('conflict')]), 2) - self.assertEqual(len([x for x in content if x == 'conflict mpileaks']), 1) - self.assertEqual(len([x for x in content if x == 'conflict intel/14.0.1']), 1) + self.assertEqual( + len([x for x in content if x.startswith('conflict')]), 2) + self.assertEqual( + len([x for x in content if x == 'conflict mpileaks']), 1) + self.assertEqual( + len([x for x in content if x == 'conflict intel/14.0.1']), 1) -- cgit v1.2.3-70-g09d2 From 0216fa2a00f3e438ec2cb3182c8b347f1038ae10 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 11 May 2016 09:05:24 -0700 Subject: Simplify /etc/spack/modules.yaml formatting. --- etc/spack/modules.yaml | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/etc/spack/modules.yaml b/etc/spack/modules.yaml index 8f8f88e908..99be5e7b6d 100644 --- a/etc/spack/modules.yaml +++ b/etc/spack/modules.yaml @@ -5,14 +5,25 @@ # although users can override these settings in their ~/.spack/modules.yaml. # ------------------------------------------------------------------------- modules: - prefix_inspections: { - bin: ['PATH'], - man: ['MANPATH'], - lib: ['LIBRARY_PATH', 'LD_LIBRARY_PATH'], - lib64: ['LIBRARY_PATH', 'LD_LIBRARY_PATH'], - include: ['CPATH'], - lib/pkgconfig: ['PKGCONFIG'], - lib64/pkgconfig: ['PKGCONFIG'], - '': ['CMAKE_PREFIX_PATH'] - } - enable: ['tcl', 'dotkit'] + enable: + - tcl + - dotkit + prefix_inspections: + bin: + - PATH + man: + - MANPATH + lib: + - LIBRARY_PATH + - LD_LIBRARY_PATH + lib64: + - LIBRARY_PATH + - LD_LIBRARY_PATH + include: + - CPATH + lib/pkgconfig: + - PKGCONFIG + lib64/pkgconfig: + - PKGCONFIG + '': + - CMAKE_PREFIX_PATH -- cgit v1.2.3-70-g09d2 From 2fb128fb341294f1f3848fbff55d30a6e123f8dd Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 16 Mar 2016 13:35:55 -0500 Subject: Add PGI Compiler Package --- var/spack/repos/builtin/packages/pgi/package.py | 97 +++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 var/spack/repos/builtin/packages/pgi/package.py diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py new file mode 100644 index 0000000000..44512b23af --- /dev/null +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -0,0 +1,97 @@ +from spack import * +import spack +import llnl.util.tty as tty +import os + +class Pgi(Package): + """PGI optimizing multi-core x64 compilers for Linux, MacOS & Windows + with support for debugging and profiling of local MPI processes. + + Note: The PGI compilers are licensed software. You will need to create + an account on the PGI homepage and download PGI yourself. Once the download + finishes, rename the file (which may contain information such as the + architecture) to the format: pgi-.tar.gz. Spack will search your + current directory for a file of this format. Alternatively, add this + file to a mirror so that Spack can find it. For instructions on how to + set up a mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "http://www.pgroup.com/" + url = "file://%s/pgi-16.3.tar.gz" % os.getcwd() + + version('16.3', '618cb7ddbc57d4e4ed1f21a0ab25f427') + + variant('network', default=True, description="Perform a network install") + variant('single', default=False, description="Perform a single system install") + variant('nvidia', default=False, description="Enable installation of optional NVIDIA components, such as CUDA") + variant('amd', default=False, description="Enable installation of optional AMD components") + variant('java', default=False, description="Enable installation of Java Runtime Environment") + variant('mpi', default=False, description="Enable installation of Open MPI") + + + def set_up_license(self, prefix): + license_path = "%s/license.dat" % prefix + + with open(license_path, "w") as license: + license.write("""\ +# The PGI compilers require a license to use. There are two ways to set this up. +# +# 1. (Recommended) Store your license key in this license.dat file. Example: +# +# SERVER 0123456789ab 27000 +# DAEMON pgroupd +# PACKAGE PGI2015- pgroupd A13AB920D570 \\ +# <...> +# 6167 7015 3F05 9C37 2315 ACDF 1B73 DAA9 FBAE" +# +# 2. Use the environment variable PGROUPD_LICENSE_FILE or LM_LICENSE_FILE. +# +# If you choose to store your license in a non-standard location, you may +# set either one of these variables to a full pathname to the license +# file, or port@host if you store your license keys on a dedicated +# license server. You will likely want to set this variable in a module +# file so that it gets loaded every time someone wants to use PGI. +# +# For further information on how to acquire a license, please refer to: +# http://www.pgroup.com/doc/pgiinstall.pdf +# +# You may enter your license below. + +""") + + spack.editor(license_path) + tty.message("Set up license file %s" % license_path) + + + def install(self, spec, prefix): + # Enable the silent installation feature + os.environ['PGI_SILENT'] = "true" + os.environ['PGI_ACCEPT_EULA'] = "accept" + os.environ['PGI_INSTALL_DIR'] = "%s" % prefix + + if '+network' in spec and '~single' in spec: + os.environ['PGI_INSTALL_TYPE'] = "network" + os.environ['PGI_INSTALL_LOCAL_DIR'] = "%s/%s/share_objects" % (prefix, self.version) + elif '+single' in spec and '~network' in spec: + os.environ['PGI_INSTALL_TYPE'] = "single" + else: + msg = 'You must choose either a network install or a single system install.\n' + msg += 'You cannot choose both.' + raise RuntimeError(msg) + + if '+nvidia' in spec: + os.environ['PGI_INSTALL_NVIDIA'] = "true" + + if '+amd' in spec: + os.environ['PGI_INSTALL_AMD'] = "true" + + if '+java' in spec: + os.environ['PGI_INSTALL_JAVA'] = "true" + + if '+mpi' in spec: + os.environ['PGI_INSTALL_MPI'] = "true" + + # Run install script + os.system("./install") + + # Prompt user to set up license file + self.set_up_license(prefix) -- cgit v1.2.3-70-g09d2 From 82ce798f41951741e552086534c60af5e3e3c464 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 16 Mar 2016 13:49:33 -0500 Subject: Bug fix --- var/spack/repos/builtin/packages/pgi/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 44512b23af..66aef571f1 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -58,8 +58,8 @@ class Pgi(Package): """) - spack.editor(license_path) - tty.message("Set up license file %s" % license_path) + #spack.editor(license_path) + tty.msg("Set up license file %s" % license_path) def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 240c0643f214006ecf0321e3466fa3d5db7eb092 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 1 Apr 2016 12:23:08 -0500 Subject: Add NAG Fortran compiler package --- var/spack/repos/builtin/packages/nag/package.py | 26 ++++++++++++++ var/spack/repos/builtin/packages/pgi/package.py | 45 ++++--------------------- 2 files changed, 32 insertions(+), 39 deletions(-) create mode 100644 var/spack/repos/builtin/packages/nag/package.py diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py new file mode 100644 index 0000000000..840b79c66b --- /dev/null +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -0,0 +1,26 @@ +from spack import * +import os + +class Nag(Package): + """The NAG Fortran Compiler.""" + homepage = "http://www.nag.com/nagware/np.asp" + + version('6.1', '1e29d9d435b7ccc2842a320150b28ba4', + url='http://www.nag.com/downloads/impl/npl6a61na_amd64.tgz') + + # Licensing + license_required = True + license_files = ['lib/nag.key', + 'lib/nag.licence', + 'lib/nagware.licence'] + license_vars = ['NAG_KUSARI_FILE'] + license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' + + def install(self, spec, prefix): + # Set installation directories + os.environ['INSTALL_TO_BINDIR'] = prefix.bin + os.environ['INSTALL_TO_LIBDIR'] = prefix.lib + os.environ['INSTALL_TO_MANDIR'] = prefix + '/share/man/man' + + # Run install script + os.system('./INSTALLU.sh') diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 66aef571f1..649c7dbee2 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -1,6 +1,4 @@ from spack import * -import spack -import llnl.util.tty as tty import os class Pgi(Package): @@ -27,46 +25,18 @@ class Pgi(Package): variant('java', default=False, description="Enable installation of Java Runtime Environment") variant('mpi', default=False, description="Enable installation of Open MPI") - - def set_up_license(self, prefix): - license_path = "%s/license.dat" % prefix - - with open(license_path, "w") as license: - license.write("""\ -# The PGI compilers require a license to use. There are two ways to set this up. -# -# 1. (Recommended) Store your license key in this license.dat file. Example: -# -# SERVER 0123456789ab 27000 -# DAEMON pgroupd -# PACKAGE PGI2015- pgroupd A13AB920D570 \\ -# <...> -# 6167 7015 3F05 9C37 2315 ACDF 1B73 DAA9 FBAE" -# -# 2. Use the environment variable PGROUPD_LICENSE_FILE or LM_LICENSE_FILE. -# -# If you choose to store your license in a non-standard location, you may -# set either one of these variables to a full pathname to the license -# file, or port@host if you store your license keys on a dedicated -# license server. You will likely want to set this variable in a module -# file so that it gets loaded every time someone wants to use PGI. -# -# For further information on how to acquire a license, please refer to: -# http://www.pgroup.com/doc/pgiinstall.pdf -# -# You may enter your license below. - -""") - - #spack.editor(license_path) - tty.msg("Set up license file %s" % license_path) + # Licensing + license_required = True + license_files = ['license.dat'] + license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] + license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' def install(self, spec, prefix): # Enable the silent installation feature os.environ['PGI_SILENT'] = "true" os.environ['PGI_ACCEPT_EULA'] = "accept" - os.environ['PGI_INSTALL_DIR'] = "%s" % prefix + os.environ['PGI_INSTALL_DIR'] = prefix if '+network' in spec and '~single' in spec: os.environ['PGI_INSTALL_TYPE'] = "network" @@ -92,6 +62,3 @@ class Pgi(Package): # Run install script os.system("./install") - - # Prompt user to set up license file - self.set_up_license(prefix) -- cgit v1.2.3-70-g09d2 From 8cba8d6d1d37a30eab470d3288b5ad4601d496b6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 4 Apr 2016 11:30:13 -0500 Subject: Add default global variables for licensing information --- lib/spack/spack/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 8e6cf32954..6c7f550e00 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -374,6 +374,19 @@ class Package(object): if not hasattr(self, 'list_depth'): self.list_depth = 1 + # Set default licensing information + if not hasattr(self, 'license_required'): + self.license_required = False + + if not hasattr(self, 'license_files'): + self.license_files = [] + + if not hasattr(self, 'license_vars'): + self.license_vars = [] + + if not hasattr(self, 'license_url'): + self.license_url = None + # Set up some internal variables for timing. self._fetch_time = 0.0 self._total_time = 0.0 -- cgit v1.2.3-70-g09d2 From 1b997f10a8f650810bb2363e8adb73794dfc740b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 4 Apr 2016 15:12:27 -0500 Subject: Add set_up_license function --- lib/spack/spack/package.py | 77 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 6c7f550e00..ff757296f3 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -957,6 +957,10 @@ class Package(object): self._total_time = time.time() - start_time build_time = self._total_time - self._fetch_time + # Set up license information + if self.license_required: + self.set_up_license() + tty.msg("Successfully installed %s" % self.name, "Fetch: %s. Build: %s. Total: %s." % (_hms(self._fetch_time), _hms(build_time), @@ -1006,6 +1010,79 @@ class Package(object): raise InstallError( "Install failed for %s. Nothing was installed!" % self.name) + + def set_up_license(self): + """Prompt the user, letting them know that a license is required.""" + # If the license can be stored in a file, create one + if self.license_files: + # Use the first file listed in license_files + license_path = self.prefix + '/' + self.license_files[0] + self.write_license_file(license_path) + # Open up file in user's favorite $EDITOR for editing + spack.editor(license_path) + tty.msg("Added license file %s" % license_path) + + # If not a file, what about an environment variable? + elif self.license_vars: + tty.warn("A license is required to use %s. Please set %s to the " + "full pathname to the license file, or port@host if you" + " store your license keys on a dedicated license server" % + (self.name, ' or '.join(self.license_vars))) + + # If not a file or variable, suggest a website for further info + elif self.license_url: + tty.warn("A license is required to use %s. See %s for details" % + (self.name, self.license_url)) + + # If all else fails, you're on your own + else: + tty.warn("A license is required to use %s" % self.name) + + + def write_license_file(self, license_path): + # Use the first file listed in license_files + license = open(license_path, 'w') + + license.write("""\ +# A license is required to use %s. +# +# The recommended solution is to store your license key in this file. +# By default, %s searches the following file(s) for a license key +# (relative to the installation prefix): +# +#\t%s +# +""" % (self.name, self.name, self.name, '\n#\t'.join(self.license_files))) + + if self.license_vars: + license.write("""\ +# Alternatively, use one of the following environment variable(s): +# +#\t%s +# +# If you choose to store your license in a non-standard location, you may +# set one of these variable(s) to the full pathname to the license file, or +# port@host if you store your license keys on a dedicated license server. +# You will likely want to set this variable in a module file so that it +# gets loaded every time someone tries to use %s. +# +""" % ('\n#\t'.join(self.license_vars), self.name)) + + if self.license_url: + license.write("""\ +# For further information on how to acquire a license, please refer to: +#\t%s +# +""" % self.license_url) + + license.write("""\ +# You may enter your license below. + +""") + + license.close() + + def do_install_dependencies(self, **kwargs): # Pass along paths of dependencies here for dep in self.spec.dependencies.values(): -- cgit v1.2.3-70-g09d2 From 5cb45c253eec4377d3da33863fbbdd2c16def6d9 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 4 Apr 2016 15:20:56 -0500 Subject: Bug fix --- lib/spack/spack/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index ff757296f3..7648a2f863 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1052,7 +1052,7 @@ class Package(object): # #\t%s # -""" % (self.name, self.name, self.name, '\n#\t'.join(self.license_files))) +""" % (self.name, self.name, '\n#\t'.join(self.license_files))) if self.license_vars: license.write("""\ -- cgit v1.2.3-70-g09d2 From b63d11d5b0dece2c4e063b3ac5dc4658ab585fd9 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 4 Apr 2016 15:25:53 -0500 Subject: Formatting consistency --- lib/spack/spack/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 7648a2f863..6d425c3dc7 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1071,6 +1071,7 @@ class Package(object): if self.license_url: license.write("""\ # For further information on how to acquire a license, please refer to: +# #\t%s # """ % self.license_url) -- cgit v1.2.3-70-g09d2 From 6906911e85f5df504ef0a039ac510822eafc3643 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 5 Apr 2016 11:00:55 -0500 Subject: Allow license files to use different symbols for comments --- lib/spack/spack/package.py | 72 +++++++++++++++---------- var/spack/repos/builtin/packages/nag/package.py | 13 ++++- var/spack/repos/builtin/packages/pgi/package.py | 1 + 3 files changed, 56 insertions(+), 30 deletions(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 6d425c3dc7..322cf502a6 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -378,6 +378,9 @@ class Package(object): if not hasattr(self, 'license_required'): self.license_required = False + if not hasattr(self, 'license_comment'): + self.license_comment = '#' + if not hasattr(self, 'license_files'): self.license_files = [] @@ -1040,46 +1043,59 @@ class Package(object): def write_license_file(self, license_path): - # Use the first file listed in license_files + """Writes empty license file. + + Comments give suggestions on alternative methods of installing + a license.""" + + comment = self.license_comment license = open(license_path, 'w') license.write("""\ -# A license is required to use %s. -# -# The recommended solution is to store your license key in this file. -# By default, %s searches the following file(s) for a license key -# (relative to the installation prefix): -# -#\t%s -# -""" % (self.name, self.name, '\n#\t'.join(self.license_files))) +{0} A license is required to use {1}. +{0} +{0} The recommended solution is to store your license key in this file. +{0} By default, {1} searches the following file(s) for a license key +{0} (relative to the installation prefix): +{0} +""".format(comment, self.name)) + + for filename in self.license_files: + license.write("{0}\t{1}\n".format(comment, filename)) + + license.write("{0}\n".format(comment)) if self.license_vars: license.write("""\ -# Alternatively, use one of the following environment variable(s): -# -#\t%s -# -# If you choose to store your license in a non-standard location, you may -# set one of these variable(s) to the full pathname to the license file, or -# port@host if you store your license keys on a dedicated license server. -# You will likely want to set this variable in a module file so that it -# gets loaded every time someone tries to use %s. -# -""" % ('\n#\t'.join(self.license_vars), self.name)) +{0} Alternatively, use one of the following environment variable(s): +{0} +""".format(comment)) + + for var in self.license_vars: + license.write("{0}\t{1}\n".format(comment, var)) + + license.write("""\ +{0} +{0} If you choose to store your license in a non-standard location, you may +{0} set one of these variable(s) to the full pathname to the license file, or +{0} port@host if you store your license keys on a dedicated license server. +{0} You will likely want to set this variable in a module file so that it +{0} gets loaded every time someone tries to use {1}. +{0} +""".format(comment, self.name)) if self.license_url: license.write("""\ -# For further information on how to acquire a license, please refer to: -# -#\t%s -# -""" % self.license_url) +{0} For further information on how to acquire a license, please refer to: +{0} +{0}\t{1} +{0} +""".format(comment, self.license_url)) license.write("""\ -# You may enter your license below. +{0} You may enter your license below. -""") +""".format(comment)) license.close() diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py index 840b79c66b..c6c33ecad5 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -5,17 +5,26 @@ class Nag(Package): """The NAG Fortran Compiler.""" homepage = "http://www.nag.com/nagware/np.asp" - version('6.1', '1e29d9d435b7ccc2842a320150b28ba4', - url='http://www.nag.com/downloads/impl/npl6a61na_amd64.tgz') + version('6.1', '1e29d9d435b7ccc2842a320150b28ba4') + version('6.0', '3fa1e7f7b51ef8a23e6c687cdcad9f96') # Licensing license_required = True + license_comment = '!' license_files = ['lib/nag.key', 'lib/nag.licence', 'lib/nagware.licence'] license_vars = ['NAG_KUSARI_FILE'] license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' + + def url_for_version(self, version): + # TODO: url and checksum are architecture dependent + # TODO: We currently only support x86_64 + return 'http://www.nag.com/downloads/impl/npl6a%sna_amd64.tgz' % \ + str(version).replace('.', '') + + def install(self, spec, prefix): # Set installation directories os.environ['INSTALL_TO_BINDIR'] = prefix.bin diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 649c7dbee2..095569a2a9 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -27,6 +27,7 @@ class Pgi(Package): # Licensing license_required = True + license_comment = '#' license_files = ['license.dat'] license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' -- cgit v1.2.3-70-g09d2 From 2a11cb8b7606721d0cbe2763eca680dcef328acd Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 15 Apr 2016 15:04:16 -0500 Subject: Use global licenses with local symlinks --- lib/spack/spack/package.py | 65 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 322cf502a6..3feec90ddb 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -898,6 +898,11 @@ class Package(object): def build_process(): """Forked for each build. Has its own process and python module space set up by build_environment.fork().""" + + # Set up a global license if one is required + if self.license_required: + self.set_up_license() + start_time = time.time() if not fake: if not skip_patch: @@ -960,9 +965,9 @@ class Package(object): self._total_time = time.time() - start_time build_time = self._total_time - self._fetch_time - # Set up license information - if self.license_required: - self.set_up_license() + # Symlink local license to global license if one is required + if self.license_required and self.license_files: + self.symlink_license() tty.msg("Successfully installed %s" % self.name, "Fetch: %s. Build: %s. Total: %s." % @@ -1014,16 +1019,38 @@ class Package(object): "Install failed for %s. Nothing was installed!" % self.name) + def global_license_file(self): + """Returns the path where a global license file should be stored.""" + if not self.license_files: + return + spack_root = ancestor(__file__, 4) + global_license_dir = join_path(spack_root, 'etc', 'spack', 'licenses') + return join_path(global_license_dir, self.name, + os.path.basename(self.license_files[0])) + + + def local_license_symlink(self): + """Returns the path where a local license file is searched for.""" + if not self.license_files: + return + return join_path(self.prefix, self.license_files[0]) + + def set_up_license(self): """Prompt the user, letting them know that a license is required.""" + # If the license can be stored in a file, create one if self.license_files: - # Use the first file listed in license_files - license_path = self.prefix + '/' + self.license_files[0] - self.write_license_file(license_path) - # Open up file in user's favorite $EDITOR for editing - spack.editor(license_path) - tty.msg("Added license file %s" % license_path) + license_path = self.global_license_file() + if not os.path.exists(license_path): + # Create a new license file + self.write_license_file(license_path) + # Open up file in user's favorite $EDITOR for editing + spack.editor(license_path) + tty.msg("Added global license file %s" % license_path) + else: + # Use already existing license file + tty.msg("Found already existing license %s" % license_path) # If not a file, what about an environment variable? elif self.license_vars: @@ -1045,12 +1072,17 @@ class Package(object): def write_license_file(self, license_path): """Writes empty license file. - Comments give suggestions on alternative methods of installing - a license.""" + Comments give suggestions on alternative methods of + installing a license.""" comment = self.license_comment + + # Global license directory may not already exist + if not os.path.exists(os.path.dirname(license_path)): + os.makedirs(os.path.dirname(license_path)) license = open(license_path, 'w') + # License files license.write("""\ {0} A license is required to use {1}. {0} @@ -1065,6 +1097,7 @@ class Package(object): license.write("{0}\n".format(comment)) + # Environment variables if self.license_vars: license.write("""\ {0} Alternatively, use one of the following environment variable(s): @@ -1084,6 +1117,7 @@ class Package(object): {0} """.format(comment, self.name)) + # Documentation if self.license_url: license.write("""\ {0} For further information on how to acquire a license, please refer to: @@ -1100,6 +1134,15 @@ class Package(object): license.close() + def symlink_license(self): + """Create a local symlink that points to the global license file.""" + target = self.global_license_file() + link_name = self.local_license_symlink() + if os.path.exists(target): + os.symlink(target, link_name) + tty.msg("Added local symlink %s to global license file" % link_name) + + def do_install_dependencies(self, **kwargs): # Pass along paths of dependencies here for dep in self.spec.dependencies.values(): -- cgit v1.2.3-70-g09d2 From 8bcb812529eb62f1afad089dda02ea6cf6eb01cf Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 19 Apr 2016 12:28:50 -0500 Subject: Allow multiple license symlinks --- lib/spack/spack/package.py | 26 ++++++++++--------------- var/spack/repos/builtin/packages/nag/package.py | 4 +--- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 3feec90ddb..504e1fc3bb 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1029,13 +1029,6 @@ class Package(object): os.path.basename(self.license_files[0])) - def local_license_symlink(self): - """Returns the path where a local license file is searched for.""" - if not self.license_files: - return - return join_path(self.prefix, self.license_files[0]) - - def set_up_license(self): """Prompt the user, letting them know that a license is required.""" @@ -1086,9 +1079,9 @@ class Package(object): license.write("""\ {0} A license is required to use {1}. {0} -{0} The recommended solution is to store your license key in this file. -{0} By default, {1} searches the following file(s) for a license key -{0} (relative to the installation prefix): +{0} The recommended solution is to store your license key in this global +{0} license file. After installation, the following symlink(s) will be +{0} added to point to this file (relative to the installation prefix): {0} """.format(comment, self.name)) @@ -1135,12 +1128,13 @@ class Package(object): def symlink_license(self): - """Create a local symlink that points to the global license file.""" - target = self.global_license_file() - link_name = self.local_license_symlink() - if os.path.exists(target): - os.symlink(target, link_name) - tty.msg("Added local symlink %s to global license file" % link_name) + """Create local symlinks that point to the global license file.""" + target = self.global_license_file() + for filename in self.license_files: + link_name = join_path(self.prefix, filename) + if os.path.exists(target): + os.symlink(target, link_name) + tty.msg("Added local symlink %s to global license file" % link_name) def do_install_dependencies(self, **kwargs): diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py index c6c33ecad5..d6ffe35171 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -11,9 +11,7 @@ class Nag(Package): # Licensing license_required = True license_comment = '!' - license_files = ['lib/nag.key', - 'lib/nag.licence', - 'lib/nagware.licence'] + license_files = ['lib/nag.key'] license_vars = ['NAG_KUSARI_FILE'] license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' -- cgit v1.2.3-70-g09d2 From 8ea5e946a227f96272ceb6c7aa635993ddbfc9d6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 20 Apr 2016 13:10:11 -0500 Subject: Add Allinea packages --- .../builtin/packages/allinea-forge/package.py | 29 ++++++++++++++++++++++ .../builtin/packages/allinea-reports/package.py | 28 +++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 var/spack/repos/builtin/packages/allinea-forge/package.py create mode 100644 var/spack/repos/builtin/packages/allinea-reports/package.py diff --git a/var/spack/repos/builtin/packages/allinea-forge/package.py b/var/spack/repos/builtin/packages/allinea-forge/package.py new file mode 100644 index 0000000000..1f757039a6 --- /dev/null +++ b/var/spack/repos/builtin/packages/allinea-forge/package.py @@ -0,0 +1,29 @@ +from spack import * + +class AllineaForge(Package): + """Allinea Forge is the complete toolsuite for software development - with + everything needed to debug, profile, optimize, edit and build C, C++ and + Fortran applications on Linux for high performance - from single threads + through to complex parallel HPC codes with MPI, OpenMP, threads or CUDA.""" + + homepage = "http://www.allinea.com/products/develop-allinea-forge" + + version('6.0.4', 'df7f769975048477a36f208d0cd57d7e') + + # Licensing + license_required = True + license_comment = '#' + license_files = ['licences/Licence'] + license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] + license_url = 'http://www.allinea.com/user-guide/forge/Installation.html' + + + def url_for_version(self, version): + # TODO: add support for other architectures/distributions + url = "http://content.allinea.com/downloads/" + return url + "allinea-forge-%s-Redhat-6.0-x86_64.tar" % version + + + def install(self, spec, prefix): + textinstall = which('textinstall.sh') + textinstall('--accept-licence', prefix) diff --git a/var/spack/repos/builtin/packages/allinea-reports/package.py b/var/spack/repos/builtin/packages/allinea-reports/package.py new file mode 100644 index 0000000000..526d51c688 --- /dev/null +++ b/var/spack/repos/builtin/packages/allinea-reports/package.py @@ -0,0 +1,28 @@ +from spack import * + +class AllineaReports(Package): + """Allinea Performance Reports are the most effective way to characterize + and understand the performance of HPC application runs. One single-page HTML + report elegantly answers a range of vital questions for any HPC site""" + + homepage = "http://www.allinea.com/products/allinea-performance-reports" + + version('6.0.4', '3f13b08a32682737bc05246fbb2fcc77') + + # Licensing + license_required = True + license_comment = '#' + license_files = ['licences/Licence'] + license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] + license_url = 'http://www.allinea.com/user-guide/reports/Installation.html' + + + def url_for_version(self, version): + # TODO: add support for other architectures/distributions + url = "http://content.allinea.com/downloads/" + return url + "allinea-reports-%s-Redhat-6.0-x86_64.tar" % version + + + def install(self, spec, prefix): + textinstall = which('textinstall.sh') + textinstall('--accept-licence', prefix) -- cgit v1.2.3-70-g09d2 From 19f4b27fd2b6986e236738de394738a9935c2abf Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 9 May 2016 11:30:31 -0500 Subject: Add documentation for packaging of licensed software --- lib/spack/docs/packaging_guide.rst | 121 +++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 1b7941ab24..65ff08d5c8 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -703,6 +703,127 @@ Fetching a revision Subversion branches are handled as part of the directory structure, so you can check out a branch or tag by changing the ``url``. + +.. _license: + +Licensed software +------------------------------------------ + +In order to install licensed software, Spack needs to know a few more +details about a package. The following class attributes should be defined. + +``license_required`` +~~~~~~~~~~~~~~~~~~~~~ + +Boolean. If set to ``True``, this software requires a license. If set to +``False``, all of the following attributes will be ignored. Defaults to +``False``. + +``license_comment`` +~~~~~~~~~~~~~~~~~~~~~ + +String. Contains the symbol used by the license manager to denote a comment. +Defaults to ``#``. + +``license_files`` +~~~~~~~~~~~~~~~~~~~~~ + +List of strings. These are files that the software searches for when +looking for a license. All file paths must be relative to the installation +directory. More complex packages like Intel may require multiple +licenses for individual components. Defaults to the empty list. + +``license_vars`` +~~~~~~~~~~~~~~~~~~~~~ + +List of strings. Environment variables that can be set to tell the software +where to look for a license if it is not in the usual location. Defaults +to the empty list. + +``license_url`` +~~~~~~~~~~~~~~~~~~~~~ + +String. A URL pointing to license setup instructions for the software. +Defaults to the empty string. + +For example, let's take a look at the package for the PGI compilers. + +.. code-block:: python + + # Licensing + license_required = True + license_comment = '#' + license_files = ['license.dat'] + license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] + license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' + +As you can see, PGI requires a license. Its license manager, FlexNet, uses +the ``#`` symbol to denote a comment. It expects the license file to be +named ``license.dat`` and to be located directly in the installation prefix. +If you would like the installation file to be located elsewhere, simply set +``PGROUPD_LICENSE_FILE`` or ``LM_LICENSE_FILE`` after installation. For +further instructions on installation and licensing, see the URL provided. + +Let's walk through a sample PGI installation to see exactly what Spack is +and isn't capable of. Since PGI does not provide a download URL, it must +be downloaded manually. It can either be added to a mirror or located in +the current directory when ``spack install pgi`` is run. See :ref:`mirrors` +for instructions on setting up a mirror. + +After running ``spack install pgi``, the first thing that will happen is +Spack will create a global license file located at +``$SPACK_ROOT/etc/spack/licenses/pgi/license.dat``. It will then open up the +file using the editor set in ``$EDITOR``, or vi if unset. It will look like +this: + +.. code-block:: + + # A license is required to use pgi. + # + # The recommended solution is to store your license key in this global + # license file. After installation, the following symlink(s) will be + # added to point to this file (relative to the installation prefix): + # + # license.dat + # + # Alternatively, use one of the following environment variable(s): + # + # PGROUPD_LICENSE_FILE + # LM_LICENSE_FILE + # + # If you choose to store your license in a non-standard location, you may + # set one of these variable(s) to the full pathname to the license file, or + # port@host if you store your license keys on a dedicated license server. + # You will likely want to set this variable in a module file so that it + # gets loaded every time someone tries to use pgi. + # + # For further information on how to acquire a license, please refer to: + # + # http://www.pgroup.com/doc/pgiinstall.pdf + # + # You may enter your license below. + +You can add your license directly to this file, or tell FlexNet to use a +license stored on a separate license server. Here is an example that +points to a license server called licman1: + +.. code-block:: + + SERVER licman1.mcs.anl.gov 00163eb7fba5 27200 + USE_SERVER + +If your package requires the license to install, you can reference the +location of this global license using ``Package.global_license_file()``. +After installation, symlinks for all of the files given in +``license_files`` will be created, pointing to this global license. +If you install a different version or variant of the package, Spack +will automatically detect and reuse the already existing global license. + +If the software you are trying to package doesn't rely on license files, +Spack will print a warning message, letting the user know that they +need to set an environment variable or pointing them to installation +documentation. + .. _patching: Patches -- cgit v1.2.3-70-g09d2 From ee7ec4fa66aed5bcbdb97fddf2303b3debab5c4e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 10 May 2016 15:43:24 -0500 Subject: Move all licensing support to pre/post_install hooks --- lib/spack/docs/packaging_guide.rst | 2 +- lib/spack/spack/hooks/licensing.py | 135 ++++++++++++++++++++++++++++++++++++ lib/spack/spack/package.py | 137 +++---------------------------------- 3 files changed, 147 insertions(+), 127 deletions(-) create mode 100644 lib/spack/spack/hooks/licensing.py diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 65ff08d5c8..650e0ee3b2 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -813,7 +813,7 @@ points to a license server called licman1: USE_SERVER If your package requires the license to install, you can reference the -location of this global license using ``Package.global_license_file()``. +location of this global license using ``self.global_license_file``. After installation, symlinks for all of the files given in ``license_files`` will be created, pointing to this global license. If you install a different version or variant of the package, Spack diff --git a/lib/spack/spack/hooks/licensing.py b/lib/spack/spack/hooks/licensing.py new file mode 100644 index 0000000000..56f7b6daa5 --- /dev/null +++ b/lib/spack/spack/hooks/licensing.py @@ -0,0 +1,135 @@ +import os + +import spack +import llnl.util.tty as tty +from llnl.util.filesystem import join_path + + +def pre_install(pkg): + """This hook handles global license setup for licensed software.""" + if pkg.license_required: + set_up_license(pkg) + + +def set_up_license(pkg): + """Prompt the user, letting them know that a license is required. + + For packages that rely on license files, a global license file is + created and opened for editing. + + For packages that rely on environment variables to point to a + license, a warning message is printed. + + For all other packages, documentation on how to set up a license + is printed.""" + + # If the license can be stored in a file, create one + if pkg.license_files: + license_path = pkg.global_license_file + if not os.path.exists(license_path): + # Create a new license file + write_license_file(pkg, license_path) + # Open up file in user's favorite $EDITOR for editing + spack.editor(license_path) + tty.msg("Added global license file %s" % license_path) + else: + # Use already existing license file + tty.msg("Found already existing license %s" % license_path) + + # If not a file, what about an environment variable? + elif pkg.license_vars: + tty.warn("A license is required to use %s. Please set %s to the " + "full pathname to the license file, or port@host if you" + " store your license keys on a dedicated license server" % + (pkg.name, ' or '.join(pkg.license_vars))) + + # If not a file or variable, suggest a website for further info + elif pkg.license_url: + tty.warn("A license is required to use %s. See %s for details" % + (pkg.name, pkg.license_url)) + + # If all else fails, you're on your own + else: + tty.warn("A license is required to use %s" % pkg.name) + + +def write_license_file(pkg, license_path): + """Writes empty license file. + + Comments give suggestions on alternative methods of + installing a license.""" + + comment = pkg.license_comment + + # Global license directory may not already exist + if not os.path.exists(os.path.dirname(license_path)): + os.makedirs(os.path.dirname(license_path)) + license = open(license_path, 'w') + + # License files + license.write("""\ +{0} A license is required to use {1}. +{0} +{0} The recommended solution is to store your license key in this global +{0} license file. After installation, the following symlink(s) will be +{0} added to point to this file (relative to the installation prefix): +{0} +""".format(comment, pkg.name)) + + for filename in pkg.license_files: + license.write("{0}\t{1}\n".format(comment, filename)) + + license.write("{0}\n".format(comment)) + + # Environment variables + if pkg.license_vars: + license.write("""\ +{0} Alternatively, use one of the following environment variable(s): +{0} +""".format(comment)) + + for var in pkg.license_vars: + license.write("{0}\t{1}\n".format(comment, var)) + + license.write("""\ +{0} +{0} If you choose to store your license in a non-standard location, you may +{0} set one of these variable(s) to the full pathname to the license file, or +{0} port@host if you store your license keys on a dedicated license server. +{0} You will likely want to set this variable in a module file so that it +{0} gets loaded every time someone tries to use {1}. +{0} +""".format(comment, pkg.name)) + + # Documentation + if pkg.license_url: + license.write("""\ +{0} For further information on how to acquire a license, please refer to: +{0} +{0}\t{1} +{0} +""".format(comment, pkg.license_url)) + + license.write("""\ +{0} You may enter your license below. + +""".format(comment)) + + license.close() + + +def post_install(pkg): + """This hook symlinks local licenses to the global license for + licensed software.""" + if pkg.license_required: + symlink_license(pkg) + + +def symlink_license(pkg): + """Create local symlinks that point to the global license file.""" + target = pkg.global_license_file + for filename in pkg.license_files: + link_name = join_path(pkg.prefix, filename) + if os.path.exists(target): + os.symlink(target, link_name) + tty.msg("Added local symlink %s to global license file" % link_name) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 504e1fc3bb..17d92fdf79 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -397,6 +397,17 @@ class Package(object): if self.is_extension: spack.repo.get(self.extendee_spec)._check_extendable() + @property + def global_license_file(self): + """Returns the path where a global license file should be stored.""" + if not self.license_files: + return + spack_root = ancestor(__file__, 4) + global_license_dir = join_path(spack_root, 'etc', 'spack', 'licenses') + return join_path(global_license_dir, self.name, + os.path.basename(self.license_files[0])) + + @property def version(self): if not self.spec.versions.concrete: @@ -899,10 +910,6 @@ class Package(object): """Forked for each build. Has its own process and python module space set up by build_environment.fork().""" - # Set up a global license if one is required - if self.license_required: - self.set_up_license() - start_time = time.time() if not fake: if not skip_patch: @@ -965,10 +972,6 @@ class Package(object): self._total_time = time.time() - start_time build_time = self._total_time - self._fetch_time - # Symlink local license to global license if one is required - if self.license_required and self.license_files: - self.symlink_license() - tty.msg("Successfully installed %s" % self.name, "Fetch: %s. Build: %s. Total: %s." % (_hms(self._fetch_time), _hms(build_time), @@ -1019,124 +1022,6 @@ class Package(object): "Install failed for %s. Nothing was installed!" % self.name) - def global_license_file(self): - """Returns the path where a global license file should be stored.""" - if not self.license_files: - return - spack_root = ancestor(__file__, 4) - global_license_dir = join_path(spack_root, 'etc', 'spack', 'licenses') - return join_path(global_license_dir, self.name, - os.path.basename(self.license_files[0])) - - - def set_up_license(self): - """Prompt the user, letting them know that a license is required.""" - - # If the license can be stored in a file, create one - if self.license_files: - license_path = self.global_license_file() - if not os.path.exists(license_path): - # Create a new license file - self.write_license_file(license_path) - # Open up file in user's favorite $EDITOR for editing - spack.editor(license_path) - tty.msg("Added global license file %s" % license_path) - else: - # Use already existing license file - tty.msg("Found already existing license %s" % license_path) - - # If not a file, what about an environment variable? - elif self.license_vars: - tty.warn("A license is required to use %s. Please set %s to the " - "full pathname to the license file, or port@host if you" - " store your license keys on a dedicated license server" % - (self.name, ' or '.join(self.license_vars))) - - # If not a file or variable, suggest a website for further info - elif self.license_url: - tty.warn("A license is required to use %s. See %s for details" % - (self.name, self.license_url)) - - # If all else fails, you're on your own - else: - tty.warn("A license is required to use %s" % self.name) - - - def write_license_file(self, license_path): - """Writes empty license file. - - Comments give suggestions on alternative methods of - installing a license.""" - - comment = self.license_comment - - # Global license directory may not already exist - if not os.path.exists(os.path.dirname(license_path)): - os.makedirs(os.path.dirname(license_path)) - license = open(license_path, 'w') - - # License files - license.write("""\ -{0} A license is required to use {1}. -{0} -{0} The recommended solution is to store your license key in this global -{0} license file. After installation, the following symlink(s) will be -{0} added to point to this file (relative to the installation prefix): -{0} -""".format(comment, self.name)) - - for filename in self.license_files: - license.write("{0}\t{1}\n".format(comment, filename)) - - license.write("{0}\n".format(comment)) - - # Environment variables - if self.license_vars: - license.write("""\ -{0} Alternatively, use one of the following environment variable(s): -{0} -""".format(comment)) - - for var in self.license_vars: - license.write("{0}\t{1}\n".format(comment, var)) - - license.write("""\ -{0} -{0} If you choose to store your license in a non-standard location, you may -{0} set one of these variable(s) to the full pathname to the license file, or -{0} port@host if you store your license keys on a dedicated license server. -{0} You will likely want to set this variable in a module file so that it -{0} gets loaded every time someone tries to use {1}. -{0} -""".format(comment, self.name)) - - # Documentation - if self.license_url: - license.write("""\ -{0} For further information on how to acquire a license, please refer to: -{0} -{0}\t{1} -{0} -""".format(comment, self.license_url)) - - license.write("""\ -{0} You may enter your license below. - -""".format(comment)) - - license.close() - - - def symlink_license(self): - """Create local symlinks that point to the global license file.""" - target = self.global_license_file() - for filename in self.license_files: - link_name = join_path(self.prefix, filename) - if os.path.exists(target): - os.symlink(target, link_name) - tty.msg("Added local symlink %s to global license file" % link_name) - - def do_install_dependencies(self, **kwargs): # Pass along paths of dependencies here for dep in self.spec.dependencies.values(): -- cgit v1.2.3-70-g09d2 From 5879f8207fe005a485c09a3d8802493455ba16ac Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 10 May 2016 16:40:46 -0500 Subject: Flake8 formatting changes --- lib/spack/spack/hooks/licensing.py | 6 +++-- .../builtin/packages/allinea-forge/package.py | 3 +-- .../builtin/packages/allinea-reports/package.py | 8 +++---- var/spack/repos/builtin/packages/nag/package.py | 5 ++-- var/spack/repos/builtin/packages/pgi/package.py | 27 ++++++++++++++-------- 5 files changed, 28 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/hooks/licensing.py b/lib/spack/spack/hooks/licensing.py index 56f7b6daa5..99521c8356 100644 --- a/lib/spack/spack/hooks/licensing.py +++ b/lib/spack/spack/hooks/licensing.py @@ -46,7 +46,7 @@ def set_up_license(pkg): # If not a file or variable, suggest a website for further info elif pkg.license_url: tty.warn("A license is required to use %s. See %s for details" % - (pkg.name, pkg.license_url)) + (pkg.name, pkg.license_url)) # If all else fails, you're on your own else: @@ -132,4 +132,6 @@ def symlink_license(pkg): link_name = join_path(pkg.prefix, filename) if os.path.exists(target): os.symlink(target, link_name) - tty.msg("Added local symlink %s to global license file" % link_name) + tty.msg("Added local symlink %s to global license file" % + link_name) + diff --git a/var/spack/repos/builtin/packages/allinea-forge/package.py b/var/spack/repos/builtin/packages/allinea-forge/package.py index 1f757039a6..fa88b450be 100644 --- a/var/spack/repos/builtin/packages/allinea-forge/package.py +++ b/var/spack/repos/builtin/packages/allinea-forge/package.py @@ -1,5 +1,6 @@ from spack import * + class AllineaForge(Package): """Allinea Forge is the complete toolsuite for software development - with everything needed to debug, profile, optimize, edit and build C, C++ and @@ -17,13 +18,11 @@ class AllineaForge(Package): license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] license_url = 'http://www.allinea.com/user-guide/forge/Installation.html' - def url_for_version(self, version): # TODO: add support for other architectures/distributions url = "http://content.allinea.com/downloads/" return url + "allinea-forge-%s-Redhat-6.0-x86_64.tar" % version - def install(self, spec, prefix): textinstall = which('textinstall.sh') textinstall('--accept-licence', prefix) diff --git a/var/spack/repos/builtin/packages/allinea-reports/package.py b/var/spack/repos/builtin/packages/allinea-reports/package.py index 526d51c688..0099e6e64c 100644 --- a/var/spack/repos/builtin/packages/allinea-reports/package.py +++ b/var/spack/repos/builtin/packages/allinea-reports/package.py @@ -1,9 +1,11 @@ from spack import * + class AllineaReports(Package): """Allinea Performance Reports are the most effective way to characterize - and understand the performance of HPC application runs. One single-page HTML - report elegantly answers a range of vital questions for any HPC site""" + and understand the performance of HPC application runs. One single-page + HTML report elegantly answers a range of vital questions for any HPC site + """ homepage = "http://www.allinea.com/products/allinea-performance-reports" @@ -16,13 +18,11 @@ class AllineaReports(Package): license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] license_url = 'http://www.allinea.com/user-guide/reports/Installation.html' - def url_for_version(self, version): # TODO: add support for other architectures/distributions url = "http://content.allinea.com/downloads/" return url + "allinea-reports-%s-Redhat-6.0-x86_64.tar" % version - def install(self, spec, prefix): textinstall = which('textinstall.sh') textinstall('--accept-licence', prefix) diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py index d6ffe35171..df7344d37a 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -1,6 +1,7 @@ from spack import * import os + class Nag(Package): """The NAG Fortran Compiler.""" homepage = "http://www.nag.com/nagware/np.asp" @@ -15,13 +16,11 @@ class Nag(Package): license_vars = ['NAG_KUSARI_FILE'] license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' - def url_for_version(self, version): # TODO: url and checksum are architecture dependent # TODO: We currently only support x86_64 return 'http://www.nag.com/downloads/impl/npl6a%sna_amd64.tgz' % \ - str(version).replace('.', '') - + str(version).replace('.', '') def install(self, spec, prefix): # Set installation directories diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 095569a2a9..8a067a43f1 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -1,6 +1,7 @@ from spack import * import os + class Pgi(Package): """PGI optimizing multi-core x64 compilers for Linux, MacOS & Windows with support for debugging and profiling of local MPI processes. @@ -18,12 +19,18 @@ class Pgi(Package): version('16.3', '618cb7ddbc57d4e4ed1f21a0ab25f427') - variant('network', default=True, description="Perform a network install") - variant('single', default=False, description="Perform a single system install") - variant('nvidia', default=False, description="Enable installation of optional NVIDIA components, such as CUDA") - variant('amd', default=False, description="Enable installation of optional AMD components") - variant('java', default=False, description="Enable installation of Java Runtime Environment") - variant('mpi', default=False, description="Enable installation of Open MPI") + variant('network', default=True, + description="Perform a network install") + variant('single', default=False, + description="Perform a single system install") + variant('nvidia', default=False, + description="Enable installation of optional NVIDIA components") + variant('amd', default=False, + description="Enable installation of optional AMD components") + variant('java', default=False, + description="Enable installation of Java Runtime Environment") + variant('mpi', default=False, + description="Enable installation of Open MPI") # Licensing license_required = True @@ -32,7 +39,6 @@ class Pgi(Package): license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' - def install(self, spec, prefix): # Enable the silent installation feature os.environ['PGI_SILENT'] = "true" @@ -41,12 +47,13 @@ class Pgi(Package): if '+network' in spec and '~single' in spec: os.environ['PGI_INSTALL_TYPE'] = "network" - os.environ['PGI_INSTALL_LOCAL_DIR'] = "%s/%s/share_objects" % (prefix, self.version) + os.environ['PGI_INSTALL_LOCAL_DIR'] = "%s/%s/share_objects" % \ + (prefix, self.version) elif '+single' in spec and '~network' in spec: os.environ['PGI_INSTALL_TYPE'] = "single" else: - msg = 'You must choose either a network install or a single system install.\n' - msg += 'You cannot choose both.' + msg = 'You must choose either a network install or a single ' + msg += 'system install.\nYou cannot choose both.' raise RuntimeError(msg) if '+nvidia' in spec: -- cgit v1.2.3-70-g09d2 From c043275f1b83e54ad00355fdae255aa11a2d03e1 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 11 May 2016 11:46:41 -0500 Subject: Final flake8 changes --- lib/spack/spack/hooks/licensing.py | 1 - lib/spack/spack/package.py | 8 ++------ .../builtin/packages/allinea-forge/package.py | 8 ++++---- .../builtin/packages/allinea-reports/package.py | 8 ++++---- var/spack/repos/builtin/packages/nag/package.py | 8 ++++---- var/spack/repos/builtin/packages/pgi/package.py | 22 +++++++++++----------- 6 files changed, 25 insertions(+), 30 deletions(-) diff --git a/lib/spack/spack/hooks/licensing.py b/lib/spack/spack/hooks/licensing.py index 99521c8356..31f15cc3e9 100644 --- a/lib/spack/spack/hooks/licensing.py +++ b/lib/spack/spack/hooks/licensing.py @@ -134,4 +134,3 @@ def symlink_license(pkg): os.symlink(target, link_name) tty.msg("Added local symlink %s to global license file" % link_name) - diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 17d92fdf79..8f8eb6db64 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -407,7 +407,6 @@ class Package(object): return join_path(global_license_dir, self.name, os.path.basename(self.license_files[0])) - @property def version(self): if not self.spec.versions.concrete: @@ -1021,7 +1020,6 @@ class Package(object): raise InstallError( "Install failed for %s. Nothing was installed!" % self.name) - def do_install_dependencies(self, **kwargs): # Pass along paths of dependencies here for dep in self.spec.dependencies.values(): @@ -1349,11 +1347,9 @@ 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) + rpaths.extend(d.prefix.lib for d in self.spec.traverse(root=False) 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 self.spec.traverse(root=False) if os.path.isdir(d.prefix.lib64)) return rpaths diff --git a/var/spack/repos/builtin/packages/allinea-forge/package.py b/var/spack/repos/builtin/packages/allinea-forge/package.py index fa88b450be..e5bd62dd70 100644 --- a/var/spack/repos/builtin/packages/allinea-forge/package.py +++ b/var/spack/repos/builtin/packages/allinea-forge/package.py @@ -13,10 +13,10 @@ class AllineaForge(Package): # Licensing license_required = True - license_comment = '#' - license_files = ['licences/Licence'] - license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] - license_url = 'http://www.allinea.com/user-guide/forge/Installation.html' + license_comment = '#' + license_files = ['licences/Licence'] + license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] + license_url = 'http://www.allinea.com/user-guide/forge/Installation.html' def url_for_version(self, version): # TODO: add support for other architectures/distributions diff --git a/var/spack/repos/builtin/packages/allinea-reports/package.py b/var/spack/repos/builtin/packages/allinea-reports/package.py index 0099e6e64c..7b11e681f5 100644 --- a/var/spack/repos/builtin/packages/allinea-reports/package.py +++ b/var/spack/repos/builtin/packages/allinea-reports/package.py @@ -13,10 +13,10 @@ class AllineaReports(Package): # Licensing license_required = True - license_comment = '#' - license_files = ['licences/Licence'] - license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] - license_url = 'http://www.allinea.com/user-guide/reports/Installation.html' + license_comment = '#' + license_files = ['licences/Licence'] + license_vars = ['ALLINEA_LICENCE_FILE', 'ALLINEA_LICENSE_FILE'] + license_url = 'http://www.allinea.com/user-guide/reports/Installation.html' def url_for_version(self, version): # TODO: add support for other architectures/distributions diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py index df7344d37a..af893d3db0 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -11,10 +11,10 @@ class Nag(Package): # Licensing license_required = True - license_comment = '!' - license_files = ['lib/nag.key'] - license_vars = ['NAG_KUSARI_FILE'] - license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' + license_comment = '!' + license_files = ['lib/nag.key'] + license_vars = ['NAG_KUSARI_FILE'] + license_url = 'http://www.nag.com/doc/inun/np61/lin-mac/klicence.txt' def url_for_version(self, version): # TODO: url and checksum are architecture dependent diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 8a067a43f1..8dc6453469 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -15,29 +15,29 @@ class Pgi(Package): set up a mirror, see http://software.llnl.gov/spack/mirrors.html""" homepage = "http://www.pgroup.com/" - url = "file://%s/pgi-16.3.tar.gz" % os.getcwd() + url = "file://%s/pgi-16.3.tar.gz" % os.getcwd() version('16.3', '618cb7ddbc57d4e4ed1f21a0ab25f427') variant('network', default=True, - description="Perform a network install") + description="Perform a network install") variant('single', default=False, - description="Perform a single system install") + description="Perform a single system install") variant('nvidia', default=False, - description="Enable installation of optional NVIDIA components") + description="Enable installation of optional NVIDIA components") variant('amd', default=False, - description="Enable installation of optional AMD components") + description="Enable installation of optional AMD components") variant('java', default=False, - description="Enable installation of Java Runtime Environment") + description="Enable installation of Java Runtime Environment") variant('mpi', default=False, - description="Enable installation of Open MPI") + description="Enable installation of Open MPI") # Licensing license_required = True - license_comment = '#' - license_files = ['license.dat'] - license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] - license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' + license_comment = '#' + license_files = ['license.dat'] + license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] + license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' def install(self, spec, prefix): # Enable the silent installation feature -- cgit v1.2.3-70-g09d2 From 0b5836cfce4e701ec9487654fca0eabc905d9092 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 May 2016 10:51:52 -0700 Subject: Fixed flipped conditional in satisfies --- lib/spack/spack/spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 547f006e7a..f94aa3ca4a 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1518,7 +1518,7 @@ class Spec(object): return False # Otherwise, first thing we care about is whether the name matches - if self.name != other.name and (not self.name) and (not other.name): + if self.name != other.name and self.name and other.name: return False # namespaces either match, or other doesn't require one. -- cgit v1.2.3-70-g09d2 From e200a41d3d7e9be8fe3a76a9a41ffb0c11a4c1cc Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 11 May 2016 12:34:33 -0600 Subject: New package MOAB. --- var/spack/repos/builtin/packages/moab/package.py | 60 ++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 var/spack/repos/builtin/packages/moab/package.py diff --git a/var/spack/repos/builtin/packages/moab/package.py b/var/spack/repos/builtin/packages/moab/package.py new file mode 100644 index 0000000000..d1de19e8da --- /dev/null +++ b/var/spack/repos/builtin/packages/moab/package.py @@ -0,0 +1,60 @@ +# MOAB + +from spack import * + +class Moab(Package): + """MOAB is a component for representing and evaluating mesh data. MOAB can store structured and unstructured mesh, consisting of elements in the finite element 'zoo.' The functional interface to MOAB is simple yet powerful, allowing the representation of many types of metadata commonly found on the mesh. MOAB is optimized for efficiency in space and time, based on access to mesh in chunks rather than through individual entities, while also versatile enough to support individual entity access.""" + homepage = "https://bitbucket.org/fathomteam/moab" + url = "http://ftp.mcs.anl.gov/pub/fathom/moab-4.6.3.tar.gz" + + version('4.9.1', 'bcb8bee3e58c076c7f31884db119088e') + version('4.9.0', '40695d0a159040683cfa05586ad4a7c2') + version('4.8.2', '1dddd10f162fce3cfffaedc48f6f467d') + + variant('netcdf', default=False, description='Required to enable the ExodusII reader/writer.') + variant('shared', default=True, description='Enables the build of shared libraries') + + # There are many possible variants for MOAB. Here are examples for + # two of them: + # + # variant('vtk', default=False, description='Enable VTK support') + # variant('cgns', default=False, description='Enable CGNS support') + # depends_on('cgns', when='+cgns') + # depends_on('vtk', when='+vtk') + + depends_on('mpi') + depends_on('hdf5+mpi') + depends_on('netcdf+mpi',when='+netcdf') + depends_on('parmetis') + depends_on('trilinos') # looking for zoltan. + + def install(self, spec, prefix): + + options = ['--prefix=%s' % prefix, + '--enable-optimize', + '--enable-tools', + '--with-pic', + '--with-mpi=%s' % spec['mpi'].prefix, + '--with-hdf5=%s' % spec['hdf5'].prefix, + '--with-parmetis=%s' % spec['parmetis'].prefix, + '--with-zoltan=%s' % spec['trilinos'].prefix, + '--disable-vtkMOABReader', + '--without-vtk', + 'CXX=%s' % spec['mpi'].mpicxx, + 'CC=%s' % spec['mpi'].mpicc, + 'FC=%s' % spec['mpi'].mpifc ] + + if '+shared' in spec: + options.append('--enable-shared') + if '+netcdf' in spec: + options.append('--with-netcdf=%s' % spec['netcdf'].prefix ) + + configure(*options) + make() + make("install") + + # CXX= + # CC= + # FC= + # F77= + # MPIEXEC=`which mpirun` -- cgit v1.2.3-70-g09d2 From 9482ce1fce59056ca01ca09ea0a21bcfd871028b Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 11 May 2016 12:39:20 -0600 Subject: Remove some extraneous comments. --- var/spack/repos/builtin/packages/moab/package.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/moab/package.py b/var/spack/repos/builtin/packages/moab/package.py index d1de19e8da..0beab29df2 100644 --- a/var/spack/repos/builtin/packages/moab/package.py +++ b/var/spack/repos/builtin/packages/moab/package.py @@ -52,9 +52,3 @@ class Moab(Package): configure(*options) make() make("install") - - # CXX= - # CC= - # FC= - # F77= - # MPIEXEC=`which mpirun` -- cgit v1.2.3-70-g09d2 From 8bec127a1d8b2be4403daddfcc31a1eb4a75cb8f Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 11 May 2016 14:00:44 -0600 Subject: Attempt to fix formatting issues (flake8). --- var/spack/repos/builtin/packages/moab/package.py | 58 ++++++++++++++---------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/var/spack/repos/builtin/packages/moab/package.py b/var/spack/repos/builtin/packages/moab/package.py index 0beab29df2..6bd7e5afdf 100644 --- a/var/spack/repos/builtin/packages/moab/package.py +++ b/var/spack/repos/builtin/packages/moab/package.py @@ -1,9 +1,15 @@ -# MOAB - from spack import * + class Moab(Package): - """MOAB is a component for representing and evaluating mesh data. MOAB can store structured and unstructured mesh, consisting of elements in the finite element 'zoo.' The functional interface to MOAB is simple yet powerful, allowing the representation of many types of metadata commonly found on the mesh. MOAB is optimized for efficiency in space and time, based on access to mesh in chunks rather than through individual entities, while also versatile enough to support individual entity access.""" + """MOAB is a component for representing and evaluating mesh + data. MOAB can store structured and unstructured mesh, consisting + of elements in the finite element 'zoo.' The functional interface + to MOAB is simple yet powerful, allowing the representation of + many types of metadata commonly found on the mesh. MOAB is + optimized for efficiency in space and time, based on access to + mesh in chunks rather than through individual entities, while also + versatile enough to support individual entity access.""" homepage = "https://bitbucket.org/fathomteam/moab" url = "http://ftp.mcs.anl.gov/pub/fathom/moab-4.6.3.tar.gz" @@ -11,8 +17,10 @@ class Moab(Package): version('4.9.0', '40695d0a159040683cfa05586ad4a7c2') version('4.8.2', '1dddd10f162fce3cfffaedc48f6f467d') - variant('netcdf', default=False, description='Required to enable the ExodusII reader/writer.') - variant('shared', default=True, description='Enables the build of shared libraries') + variant('netcdf', default=False, + description='Required to enable the ExodusII reader/writer.') + variant('shared', default=True, + description='Enables the build of shared libraries') # There are many possible variants for MOAB. Here are examples for # two of them: @@ -24,31 +32,33 @@ class Moab(Package): depends_on('mpi') depends_on('hdf5+mpi') - depends_on('netcdf+mpi',when='+netcdf') + depends_on('netcdf+mpi', when='+netcdf') depends_on('parmetis') - depends_on('trilinos') # looking for zoltan. + depends_on('trilinos') # looking for zoltan. def install(self, spec, prefix): - options = ['--prefix=%s' % prefix, - '--enable-optimize', - '--enable-tools', - '--with-pic', - '--with-mpi=%s' % spec['mpi'].prefix, - '--with-hdf5=%s' % spec['hdf5'].prefix, - '--with-parmetis=%s' % spec['parmetis'].prefix, - '--with-zoltan=%s' % spec['trilinos'].prefix, - '--disable-vtkMOABReader', - '--without-vtk', - 'CXX=%s' % spec['mpi'].mpicxx, - 'CC=%s' % spec['mpi'].mpicc, - 'FC=%s' % spec['mpi'].mpifc ] + options = [ + '--prefix=%s' % prefix, + '--enable-optimize', + '--enable-tools', + '--with-pic', + '--with-mpi=%s' % spec['mpi'].prefix, + '--with-hdf5=%s' % spec['hdf5'].prefix, + '--with-parmetis=%s' % spec['parmetis'].prefix, + '--with-zoltan=%s' % spec['trilinos'].prefix, + '--disable-vtkMOABReader', + '--without-vtk', + 'CXX=%s' % spec['mpi'].mpicxx, + 'CC=%s' % spec['mpi'].mpicc, + 'FC=%s' % spec['mpi'].mpifc + ] if '+shared' in spec: - options.append('--enable-shared') + options.append( '--enable-shared' ) if '+netcdf' in spec: - options.append('--with-netcdf=%s' % spec['netcdf'].prefix ) + options.append( '--with-netcdf=%s' % spec['netcdf'].prefix ) - configure(*options) + configure( *options ) make() - make("install") + make( "install" ) -- cgit v1.2.3-70-g09d2 From 566fec401521b32a0759977fc43116d8ef07b6fb Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 May 2016 14:56:41 -0700 Subject: Fixed variants in new format and removed print statements from debugging --- lib/spack/env/cc | 27 ++++++++++------- lib/spack/spack/spec.py | 2 +- lib/spack/spack/test/cc.py | 72 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 12 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index f3660272b8..0359dd8a11 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -105,7 +105,7 @@ case "$command" in f90|fc|f95|gfortran|ifort|pgfortran|xlf90|nagfor) command="$SPACK_FC" language="Fortran 90" - lang_flags=FC + lang_flags=F ;; f77|gfortran|ifort|pgfortran|xlf|nagfor) command="$SPACK_F77" @@ -184,13 +184,13 @@ args=("$@") # Prepend cppflags, cflags, cxxflags, fcflags, fflags, and ldflags -# Add cppflags +# Add ldflags case "$mode" in - cppas|cc|ccld) - args=(${SPACK_CPPFLAGS[@]} "${args[@]}") ;; + ld|ccld) + args=(${SPACK_LDFLAGS[@]} "${args[@]}") ;; esac -# Add compile flags. +# Add compiler flags. case "$mode" in cc|ccld) # Add c, cxx, fc, and f flags @@ -199,20 +199,25 @@ case "$mode" in args=(${SPACK_CFLAGS[@]} "${args[@]}") ;; CXX) args=(${SPACK_CXXFLAGS[@]} "${args[@]}") ;; - FC) - args=(${SPACK_FCFLAGS[@]} "${args[@]}") ;; - F) - args=(${SPACK_FFLAGS[@]} "${args[@]}") ;; esac ;; esac -# Add ldflags +# Add cppflags case "$mode" in - ld|ccld) + cpp|as|cc|ccld) args=(${SPACK_CPPFLAGS[@]} "${args[@]}") ;; esac +case "$mode" in cc|ccld) + # Add fortran flags + case $lang_flags in + F) + args=(${SPACK_FFLAGS[@]} "${args[@]}") ;; + esac + ;; +esac + # Read spack dependencies from the path environment variable IFS=':' read -ra deps <<< "$SPACK_DEPENDENCIES" for dep in "${deps[@]}"; do diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index f94aa3ca4a..18dcc4a837 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -378,7 +378,7 @@ class VariantMap(HashableMap): _valid_compiler_flags = [ - 'cflags', 'cxxflags', 'fcflags', 'fflags', 'ldflags', 'ldlibs', 'cppflags'] + 'cflags', 'cxxflags', 'fflags', 'ldflags', 'ldlibs', 'cppflags'] class FlagMap(HashableMap): def __init__(self, spec): diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index 594cd6efe9..946d267c06 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -56,11 +56,16 @@ class CompilerTest(unittest.TestCase): self.cc = Executable(join_path(spack.build_env_path, "cc")) self.ld = Executable(join_path(spack.build_env_path, "ld")) self.cpp = Executable(join_path(spack.build_env_path, "cpp")) + self.cxx = Executable(join_path(spack.build_env_path, "c++")) + self.fc = Executable(join_path(spack.build_env_path, "fc")) self.realcc = "/bin/mycc" self.prefix = "/spack-test-prefix" os.environ['SPACK_CC'] = self.realcc + os.environ['SPACK_CXX'] = self.realcc + os.environ['SPACK_FC'] = self.realcc + os.environ['SPACK_PREFIX'] = self.prefix os.environ['SPACK_ENV_PATH']="test" os.environ['SPACK_DEBUG_LOG_DIR'] = "." @@ -97,6 +102,15 @@ class CompilerTest(unittest.TestCase): self.assertEqual(self.cc(*args, output=str).strip(), expected) + def check_cxx(self, command, args, expected): + os.environ['SPACK_TEST_COMMAND'] = command + self.assertEqual(self.cxx(*args, output=str).strip(), expected) + + def check_fc(self, command, args, expected): + os.environ['SPACK_TEST_COMMAND'] = command + self.assertEqual(self.fc(*args, output=str).strip(), expected) + + def check_ld(self, command, args, expected): os.environ['SPACK_TEST_COMMAND'] = command self.assertEqual(self.ld(*args, output=str).strip(), expected) @@ -137,6 +151,64 @@ class CompilerTest(unittest.TestCase): self.check_ld('dump-mode', ['foo.o', 'bar.o', 'baz.o', '-o', 'foo', '-Wl,-rpath,foo'], "ld") + def test_flags(self): + os.environ['SPACK_LDFLAGS'] = '-L foo' + os.environ['SPACK_LDLIBS'] = '-lfoo' + os.environ['SPACK_CPPFLAGS'] = '-g -O1' + os.environ['SPACK_CFLAGS'] = '-Wall' + os.environ['SPACK_CXXFLAGS'] = '-Werror' + os.environ['SPACK_FFLAGS'] = '-w' + + # Test ldflags added properly in ld mode + self.check_ld('dump-args', test_command, + "ld " + + '-rpath ' + self.prefix + '/lib ' + + '-rpath ' + self.prefix + '/lib64 ' + + '-L foo ' + + ' '.join(test_command) + ' ' + + '-lfoo') + + # Test cppflags added properly in cpp mode + self.check_cpp('dump-args', test_command, + "cpp " + + '-g -O1 ' + + ' '.join(test_command)) + + # Test ldflags, cppflags, and language specific flags are added in proper order + self.check_cc('dump-args', test_command, + self.realcc + ' ' + + '-Wl,-rpath,' + self.prefix + '/lib ' + + '-Wl,-rpath,' + self.prefix + '/lib64 ' + + '-g -O1 ' + + '-Wall ' + + '-L foo ' + + ' '.join(test_command) + ' ' + + '-lfoo') + + self.check_cxx('dump-args', test_command, + self.realcc + ' ' + + '-Wl,-rpath,' + self.prefix + '/lib ' + + '-Wl,-rpath,' + self.prefix + '/lib64 ' + + '-g -O1 ' + + '-Werror ' + + '-L foo ' + + ' '.join(test_command) + ' ' + + '-lfoo') + + self.check_fc('dump-args', test_command, + self.realcc + ' ' + + '-Wl,-rpath,' + self.prefix + '/lib ' + + '-Wl,-rpath,' + self.prefix + '/lib64 ' + + '-w ' + + '-g -O1 ' + + '-L foo ' + + ' '.join(test_command) + ' ' + + '-lfoo') + + os.environ['SPACK_LDFLAGS']='' + os.environ['SPACK_LDLIBS']='' + + def test_dep_rpath(self): """Ensure RPATHs for root package are added.""" self.check_cc('dump-args', test_command, -- cgit v1.2.3-70-g09d2 From c5a19b57f7965f24413e789924086cf4bcb126d8 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Wed, 11 May 2016 16:32:49 -0600 Subject: Clean up formatting. --- var/spack/repos/builtin/packages/moab/package.py | 11 +++++------ var/spack/repos/builtin/packages/py-flake8/package.py | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-flake8/package.py diff --git a/var/spack/repos/builtin/packages/moab/package.py b/var/spack/repos/builtin/packages/moab/package.py index 6bd7e5afdf..5fa9e8e746 100644 --- a/var/spack/repos/builtin/packages/moab/package.py +++ b/var/spack/repos/builtin/packages/moab/package.py @@ -51,14 +51,13 @@ class Moab(Package): '--without-vtk', 'CXX=%s' % spec['mpi'].mpicxx, 'CC=%s' % spec['mpi'].mpicc, - 'FC=%s' % spec['mpi'].mpifc - ] + 'FC=%s' % spec['mpi'].mpifc] if '+shared' in spec: - options.append( '--enable-shared' ) + options.append('--enable-shared') if '+netcdf' in spec: - options.append( '--with-netcdf=%s' % spec['netcdf'].prefix ) + options.append('--with-netcdf=%s' % spec['netcdf'].prefix) - configure( *options ) + configure(*options) make() - make( "install" ) + make('install') diff --git a/var/spack/repos/builtin/packages/py-flake8/package.py b/var/spack/repos/builtin/packages/py-flake8/package.py new file mode 100644 index 0000000000..e7a1665bdd --- /dev/null +++ b/var/spack/repos/builtin/packages/py-flake8/package.py @@ -0,0 +1,16 @@ +from spack import * + + +class PyFlake8(Package): + """Flake8 is a wrapper around PyFlakes, pep8 and Ned Batchelder's + McCabe script.""" + homepage = "http://flake8.readthedocs.io/en/latest/" + url = "https://pypi.python.org/packages/source/f/flake8/flake8-2.5.4.tar.gz" + + version('2.5.4', 'a4585b3569b95c3f66acb8294a7f06ef') + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 45bf93405a275a80023595f9e8776b3bc1092cc2 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 11 May 2016 16:23:13 -0700 Subject: Changed spec syntax for new parts from modules feature --- lib/spack/spack/modules.py | 2 +- lib/spack/spack/multimethod.py | 4 ++-- lib/spack/spack/spec.py | 1 - lib/spack/spack/test/modules.py | 16 ++++++++-------- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 53f054094a..1a73f45b04 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -168,7 +168,7 @@ def parse_config_options(module_generator): # Get the configuration for this kind of generator module_configuration = copy.deepcopy(CONFIGURATION.get( module_generator.name, {})) - + print module_configuration ##### # Merge all the rules ##### diff --git a/lib/spack/spack/multimethod.py b/lib/spack/spack/multimethod.py index 3cd17e796a..28ec905b18 100644 --- a/lib/spack/spack/multimethod.py +++ b/lib/spack/spack/multimethod.py @@ -146,12 +146,12 @@ class when(object): def install(self, prefix): # Do default install - @when('=chaos_5_x86_64_ib') + @when('arch=chaos_5_x86_64_ib') 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('=bgqos_0") + @when('arch=bgqos_0") def install(self, prefix): # This will be executed if the package's sys_type is bgqos_0 diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 18dcc4a837..678207ac40 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -2294,7 +2294,6 @@ def parse_anonymous_spec(spec_like, pkg_name): try: anon_spec = Spec(spec_like) if anon_spec.name != pkg_name: - print anon_spec.name, pkg_name raise SpecParseError(spack.parse.ParseError("","","Expected anonymous spec for package %s but found spec for package %s" % (pkg_name, anon_spec.name) )) except SpecParseError: anon_spec = Spec(pkg_name + ' ' + spec_like) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index c65d663250..a33c86aca2 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -49,7 +49,7 @@ configuration_alter_environment = { 'all': { 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']} }, - '=x86-linux': { + 'arch=x86-linux': { 'environment': {'set': {'FOO': 'foo'}, 'unset': ['BAR']} } @@ -99,26 +99,26 @@ class TclTests(MockPackagesTest): def test_simple_case(self): spack.modules.CONFIGURATION = configuration_autoload_direct - spec = spack.spec.Spec('mpich@3.0.4=x86-linux') + spec = spack.spec.Spec('mpich@3.0.4 arch=x86-linux') content = self.get_modulefile_content(spec) self.assertTrue('module-whatis "mpich @3.0.4"' in content) def test_autoload(self): spack.modules.CONFIGURATION = configuration_autoload_direct - spec = spack.spec.Spec('mpileaks=x86-linux') + spec = spack.spec.Spec('mpileaks arch=x86-linux') content = self.get_modulefile_content(spec) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 2) self.assertEqual(len([x for x in content if 'module load ' in x]), 2) spack.modules.CONFIGURATION = configuration_autoload_all - spec = spack.spec.Spec('mpileaks=x86-linux') + spec = spack.spec.Spec('mpileaks arch=x86-linux') content = self.get_modulefile_content(spec) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 5) self.assertEqual(len([x for x in content if 'module load ' in x]), 5) def test_alter_environment(self): spack.modules.CONFIGURATION = configuration_alter_environment - spec = spack.spec.Spec('mpileaks=x86-linux') + spec = spack.spec.Spec('mpileaks arch=x86-linux') content = self.get_modulefile_content(spec) self.assertEqual( len([x @@ -128,7 +128,7 @@ class TclTests(MockPackagesTest): len([x for x in content if 'setenv FOO "foo"' in x]), 1) self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 1) - spec = spack.spec.Spec('libdwarf=x64-linux') + spec = spack.spec.Spec('libdwarf arch=x64-linux') content = self.get_modulefile_content(spec) self.assertEqual( len([x @@ -140,14 +140,14 @@ class TclTests(MockPackagesTest): def test_blacklist(self): spack.modules.CONFIGURATION = configuration_blacklist - spec = spack.spec.Spec('mpileaks=x86-linux') + spec = spack.spec.Spec('mpileaks arch=x86-linux') content = self.get_modulefile_content(spec) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 1) self.assertEqual(len([x for x in content if 'module load ' in x]), 1) def test_conflicts(self): spack.modules.CONFIGURATION = configuration_conflicts - spec = spack.spec.Spec('mpileaks=x86-linux') + spec = spack.spec.Spec('mpileaks arch=x86-linux') content = self.get_modulefile_content(spec) self.assertEqual( len([x for x in content if x.startswith('conflict')]), 2) -- cgit v1.2.3-70-g09d2 From e7ced54369583a72fc865834e4f7c209fb06f1c8 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 11 May 2016 21:22:25 -0700 Subject: Correct LLNL LGPL license template for clarity. --- LICENSE | 64 ++++++++++++---------- bin/sbang | 24 ++++++++ bin/spack | 16 +++--- bin/spack-python | 16 +++--- lib/spack/env/cc | 16 +++--- lib/spack/external/nose/LICENSE | 22 ++++---- lib/spack/llnl/__init__.py | 24 ++++++++ lib/spack/llnl/util/__init__.py | 24 ++++++++ lib/spack/llnl/util/filesystem.py | 16 +++--- lib/spack/llnl/util/lang.py | 16 +++--- lib/spack/llnl/util/link_tree.py | 16 +++--- lib/spack/llnl/util/lock.py | 16 +++--- lib/spack/llnl/util/tty/__init__.py | 16 +++--- lib/spack/llnl/util/tty/colify.py | 16 +++--- lib/spack/llnl/util/tty/color.py | 16 +++--- lib/spack/llnl/util/tty/log.py | 16 +++--- lib/spack/spack/__init__.py | 16 +++--- lib/spack/spack/abi.py | 18 +++--- lib/spack/spack/architecture.py | 16 +++--- lib/spack/spack/build_environment.py | 24 ++++++++ lib/spack/spack/cmd/__init__.py | 16 +++--- lib/spack/spack/cmd/activate.py | 16 +++--- lib/spack/spack/cmd/arch.py | 16 +++--- lib/spack/spack/cmd/bootstrap.py | 16 +++--- lib/spack/spack/cmd/cd.py | 16 +++--- lib/spack/spack/cmd/checksum.py | 16 +++--- lib/spack/spack/cmd/clean.py | 16 +++--- lib/spack/spack/cmd/compiler.py | 16 +++--- lib/spack/spack/cmd/compilers.py | 16 +++--- lib/spack/spack/cmd/config.py | 16 +++--- lib/spack/spack/cmd/create.py | 16 +++--- lib/spack/spack/cmd/deactivate.py | 16 +++--- lib/spack/spack/cmd/dependents.py | 16 +++--- lib/spack/spack/cmd/diy.py | 16 +++--- lib/spack/spack/cmd/doc.py | 16 +++--- lib/spack/spack/cmd/edit.py | 16 +++--- lib/spack/spack/cmd/env.py | 16 +++--- lib/spack/spack/cmd/extensions.py | 16 +++--- lib/spack/spack/cmd/fetch.py | 16 +++--- lib/spack/spack/cmd/find.py | 16 +++--- lib/spack/spack/cmd/graph.py | 16 +++--- lib/spack/spack/cmd/help.py | 16 +++--- lib/spack/spack/cmd/info.py | 16 +++--- lib/spack/spack/cmd/install.py | 16 +++--- lib/spack/spack/cmd/list.py | 16 +++--- lib/spack/spack/cmd/load.py | 16 +++--- lib/spack/spack/cmd/location.py | 16 +++--- lib/spack/spack/cmd/md5.py | 16 +++--- lib/spack/spack/cmd/mirror.py | 16 +++--- lib/spack/spack/cmd/module.py | 16 +++--- lib/spack/spack/cmd/package-list.py | 16 +++--- lib/spack/spack/cmd/patch.py | 16 +++--- lib/spack/spack/cmd/pkg.py | 16 +++--- lib/spack/spack/cmd/providers.py | 16 +++--- lib/spack/spack/cmd/purge.py | 16 +++--- lib/spack/spack/cmd/python.py | 16 +++--- lib/spack/spack/cmd/reindex.py | 16 +++--- lib/spack/spack/cmd/repo.py | 18 +++--- lib/spack/spack/cmd/restage.py | 16 +++--- lib/spack/spack/cmd/spec.py | 16 +++--- lib/spack/spack/cmd/stage.py | 16 +++--- lib/spack/spack/cmd/test-install.py | 16 +++--- lib/spack/spack/cmd/test.py | 16 +++--- lib/spack/spack/cmd/uninstall.py | 16 +++--- lib/spack/spack/cmd/unload.py | 16 +++--- lib/spack/spack/cmd/unuse.py | 16 +++--- lib/spack/spack/cmd/url-parse.py | 16 +++--- lib/spack/spack/cmd/urls.py | 16 +++--- lib/spack/spack/cmd/use.py | 16 +++--- lib/spack/spack/cmd/versions.py | 16 +++--- lib/spack/spack/compiler.py | 16 +++--- lib/spack/spack/compilers/__init__.py | 16 +++--- lib/spack/spack/compilers/clang.py | 16 +++--- lib/spack/spack/compilers/gcc.py | 16 +++--- lib/spack/spack/compilers/intel.py | 16 +++--- lib/spack/spack/compilers/nag.py | 24 ++++++++ lib/spack/spack/compilers/pgi.py | 16 +++--- lib/spack/spack/compilers/xl.py | 17 +++--- lib/spack/spack/concretize.py | 16 +++--- lib/spack/spack/config.py | 16 +++--- lib/spack/spack/database.py | 16 +++--- lib/spack/spack/directives.py | 16 +++--- lib/spack/spack/directory_layout.py | 16 +++--- lib/spack/spack/environment.py | 24 ++++++++ lib/spack/spack/error.py | 16 +++--- lib/spack/spack/fetch_strategy.py | 16 +++--- lib/spack/spack/graph.py | 16 +++--- lib/spack/spack/hooks/__init__.py | 16 +++--- lib/spack/spack/hooks/dotkit.py | 16 +++--- lib/spack/spack/hooks/extensions.py | 16 +++--- lib/spack/spack/hooks/licensing.py | 24 ++++++++ lib/spack/spack/hooks/sbang.py | 16 +++--- lib/spack/spack/hooks/tclmodule.py | 16 +++--- lib/spack/spack/mirror.py | 16 +++--- lib/spack/spack/modules.py | 16 +++--- lib/spack/spack/multimethod.py | 16 +++--- lib/spack/spack/package.py | 16 +++--- lib/spack/spack/package_test.py | 16 +++--- lib/spack/spack/parse.py | 16 +++--- lib/spack/spack/patch.py | 16 +++--- lib/spack/spack/preferred_packages.py | 18 +++--- lib/spack/spack/repository.py | 18 +++--- lib/spack/spack/resource.py | 18 +++--- lib/spack/spack/spec.py | 16 +++--- lib/spack/spack/stage.py | 16 +++--- lib/spack/spack/test/__init__.py | 16 +++--- lib/spack/spack/test/cc.py | 16 +++--- lib/spack/spack/test/cmd/__init__.py | 24 ++++++++ lib/spack/spack/test/cmd/test_install.py | 16 +++--- lib/spack/spack/test/cmd/uninstall.py | 24 ++++++++ lib/spack/spack/test/concretize.py | 16 +++--- lib/spack/spack/test/config.py | 16 +++--- lib/spack/spack/test/configure_guess.py | 16 +++--- lib/spack/spack/test/database.py | 16 +++--- lib/spack/spack/test/directory_layout.py | 16 +++--- lib/spack/spack/test/environment.py | 24 ++++++++ lib/spack/spack/test/git_fetch.py | 16 +++--- lib/spack/spack/test/hg_fetch.py | 16 +++--- lib/spack/spack/test/install.py | 16 +++--- lib/spack/spack/test/link_tree.py | 16 +++--- lib/spack/spack/test/lock.py | 16 +++--- lib/spack/spack/test/make_executable.py | 16 +++--- lib/spack/spack/test/mirror.py | 16 +++--- lib/spack/spack/test/mock_database.py | 24 ++++++++ lib/spack/spack/test/mock_packages_test.py | 16 +++--- lib/spack/spack/test/mock_repo.py | 16 +++--- lib/spack/spack/test/modules.py | 24 ++++++++ lib/spack/spack/test/multimethod.py | 16 +++--- lib/spack/spack/test/namespace_trie.py | 18 +++--- lib/spack/spack/test/optional_deps.py | 16 +++--- lib/spack/spack/test/package_sanity.py | 16 +++--- lib/spack/spack/test/packages.py | 16 +++--- lib/spack/spack/test/pattern.py | 16 +++--- lib/spack/spack/test/python_version.py | 16 +++--- lib/spack/spack/test/sbang.py | 16 +++--- lib/spack/spack/test/spec_dag.py | 16 +++--- lib/spack/spack/test/spec_semantics.py | 16 +++--- lib/spack/spack/test/spec_syntax.py | 16 +++--- lib/spack/spack/test/spec_yaml.py | 16 +++--- lib/spack/spack/test/stage.py | 16 +++--- lib/spack/spack/test/svn_fetch.py | 16 +++--- lib/spack/spack/test/tally_plugin.py | 18 +++--- lib/spack/spack/test/url_extrapolate.py | 16 +++--- lib/spack/spack/test/url_parse.py | 16 +++--- lib/spack/spack/test/url_substitution.py | 16 +++--- lib/spack/spack/test/versions.py | 16 +++--- lib/spack/spack/test/yaml.py | 16 +++--- lib/spack/spack/url.py | 16 +++--- lib/spack/spack/util/__init__.py | 16 +++--- lib/spack/spack/util/compression.py | 16 +++--- lib/spack/spack/util/crypto.py | 16 +++--- lib/spack/spack/util/debug.py | 16 +++--- lib/spack/spack/util/environment.py | 16 +++--- lib/spack/spack/util/executable.py | 16 +++--- lib/spack/spack/util/multiproc.py | 16 +++--- lib/spack/spack/util/naming.py | 24 ++++++++ lib/spack/spack/util/pattern.py | 16 +++--- lib/spack/spack/util/prefix.py | 16 +++--- lib/spack/spack/util/spack_yaml.py | 16 +++--- lib/spack/spack/util/string.py | 16 +++--- lib/spack/spack/util/web.py | 16 +++--- lib/spack/spack/variant.py | 16 +++--- lib/spack/spack/version.py | 16 +++--- lib/spack/spack/virtual.py | 16 +++--- share/spack/setup-env.csh | 16 +++--- share/spack/setup-env.sh | 20 +++---- var/spack/repos/builtin.mock/packages/a/package.py | 24 ++++++++ var/spack/repos/builtin.mock/packages/b/package.py | 24 ++++++++ var/spack/repos/builtin.mock/packages/c/package.py | 24 ++++++++ .../builtin.mock/packages/callpath/package.py | 16 +++--- .../builtin.mock/packages/cmake-client/package.py | 16 +++--- .../repos/builtin.mock/packages/cmake/package.py | 16 +++--- .../builtin.mock/packages/direct_mpich/package.py | 16 +++--- .../repos/builtin.mock/packages/dyninst/package.py | 16 +++--- var/spack/repos/builtin.mock/packages/e/package.py | 24 ++++++++ .../packages/externalprereq/package.py | 18 +++--- .../builtin.mock/packages/externaltest/package.py | 18 +++--- .../builtin.mock/packages/externaltool/package.py | 18 +++--- .../packages/externalvirtual/package.py | 18 +++--- .../repos/builtin.mock/packages/fake/package.py | 16 +++--- .../builtin.mock/packages/git-test/package.py | 24 ++++++++ .../repos/builtin.mock/packages/hg-test/package.py | 24 ++++++++ .../repos/builtin.mock/packages/hypre/package.py | 16 +++--- .../packages/indirect_mpich/package.py | 16 +++--- .../builtin.mock/packages/libdwarf/package.py | 16 +++--- .../repos/builtin.mock/packages/libelf/package.py | 16 +++--- .../repos/builtin.mock/packages/mpich/package.py | 16 +++--- .../repos/builtin.mock/packages/mpich2/package.py | 16 +++--- .../builtin.mock/packages/mpileaks/package.py | 16 +++--- .../builtin.mock/packages/multimethod/package.py | 16 +++--- .../builtin.mock/packages/netlib-blas/package.py | 16 +++--- .../builtin.mock/packages/netlib-lapack/package.py | 16 +++--- .../packages/openblas-with-lapack/package.py | 16 +++--- .../builtin.mock/packages/openblas/package.py | 16 +++--- .../packages/optional-dep-test-2/package.py | 24 ++++++++ .../packages/optional-dep-test-3/package.py | 24 ++++++++ .../packages/optional-dep-test/package.py | 24 ++++++++ .../repos/builtin.mock/packages/python/package.py | 16 +++--- .../builtin.mock/packages/svn-test/package.py | 24 ++++++++ .../trivial_install_test_package/package.py | 16 +++--- .../repos/builtin.mock/packages/zmpi/package.py | 16 +++--- .../repos/builtin/packages/ImageMagick/package.py | 24 ++++++++ var/spack/repos/builtin/packages/LuaJIT/package.py | 24 ++++++++ var/spack/repos/builtin/packages/Mitos/package.py | 24 ++++++++ var/spack/repos/builtin/packages/R/package.py | 24 ++++++++ var/spack/repos/builtin/packages/SAMRAI/package.py | 24 ++++++++ .../builtin/packages/activeharmony/package.py | 24 ++++++++ .../repos/builtin/packages/adept-utils/package.py | 16 +++--- var/spack/repos/builtin/packages/adol-c/package.py | 24 ++++++++ .../builtin/packages/allinea-forge/package.py | 24 ++++++++ .../builtin/packages/allinea-reports/package.py | 24 ++++++++ var/spack/repos/builtin/packages/antlr/package.py | 24 ++++++++ var/spack/repos/builtin/packages/apex/package.py | 24 ++++++++ .../repos/builtin/packages/apr-util/package.py | 16 +++--- var/spack/repos/builtin/packages/apr/package.py | 16 +++--- .../repos/builtin/packages/arpack-ng/package.py | 24 ++++++++ var/spack/repos/builtin/packages/arpack/package.py | 24 ++++++++ .../repos/builtin/packages/asciidoc/package.py | 24 ++++++++ var/spack/repos/builtin/packages/astyle/package.py | 24 ++++++++ var/spack/repos/builtin/packages/atk/package.py | 24 ++++++++ var/spack/repos/builtin/packages/atlas/package.py | 24 ++++++++ var/spack/repos/builtin/packages/atop/package.py | 24 ++++++++ .../repos/builtin/packages/autoconf/package.py | 24 ++++++++ .../repos/builtin/packages/automaded/package.py | 16 +++--- .../repos/builtin/packages/automake/package.py | 24 ++++++++ var/spack/repos/builtin/packages/bash/package.py | 24 ++++++++ var/spack/repos/builtin/packages/bbcp/package.py | 24 ++++++++ var/spack/repos/builtin/packages/bear/package.py | 24 ++++++++ .../repos/builtin/packages/bib2xhtml/package.py | 24 ++++++++ .../repos/builtin/packages/binutils/package.py | 24 ++++++++ var/spack/repos/builtin/packages/bison/package.py | 24 ++++++++ var/spack/repos/builtin/packages/blitz/package.py | 24 ++++++++ var/spack/repos/builtin/packages/boost/package.py | 24 ++++++++ .../repos/builtin/packages/bowtie2/package.py | 24 ++++++++ var/spack/repos/builtin/packages/boxlib/package.py | 24 ++++++++ var/spack/repos/builtin/packages/bzip2/package.py | 24 ++++++++ var/spack/repos/builtin/packages/cairo/package.py | 24 ++++++++ .../repos/builtin/packages/caliper/package.py | 24 ++++++++ .../repos/builtin/packages/callpath/package.py | 16 +++--- var/spack/repos/builtin/packages/cblas/package.py | 24 ++++++++ .../builtin/packages/cbtf-argonavis/package.py | 24 ++++++++ .../repos/builtin/packages/cbtf-krell/package.py | 24 ++++++++ .../repos/builtin/packages/cbtf-lanl/package.py | 24 ++++++++ var/spack/repos/builtin/packages/cbtf/package.py | 24 ++++++++ var/spack/repos/builtin/packages/cereal/package.py | 24 ++++++++ .../repos/builtin/packages/cfitsio/package.py | 24 ++++++++ var/spack/repos/builtin/packages/cgal/package.py | 16 +++--- var/spack/repos/builtin/packages/cgm/package.py | 24 ++++++++ .../repos/builtin/packages/cityhash/package.py | 24 ++++++++ .../repos/builtin/packages/cleverleaf/package.py | 24 ++++++++ var/spack/repos/builtin/packages/cloog/package.py | 24 ++++++++ var/spack/repos/builtin/packages/cmake/package.py | 16 +++--- var/spack/repos/builtin/packages/cmocka/package.py | 24 ++++++++ var/spack/repos/builtin/packages/cnmem/package.py | 24 ++++++++ .../repos/builtin/packages/coreutils/package.py | 24 ++++++++ .../repos/builtin/packages/cppcheck/package.py | 24 ++++++++ var/spack/repos/builtin/packages/cram/package.py | 24 ++++++++ .../repos/builtin/packages/cryptopp/package.py | 24 ++++++++ var/spack/repos/builtin/packages/cscope/package.py | 24 ++++++++ var/spack/repos/builtin/packages/cube/package.py | 16 +++--- var/spack/repos/builtin/packages/cuda/package.py | 24 ++++++++ var/spack/repos/builtin/packages/curl/package.py | 24 ++++++++ var/spack/repos/builtin/packages/czmq/package.py | 24 ++++++++ var/spack/repos/builtin/packages/dakota/package.py | 24 ++++++++ .../repos/builtin/packages/damselfly/package.py | 24 ++++++++ var/spack/repos/builtin/packages/dbus/package.py | 24 ++++++++ var/spack/repos/builtin/packages/dealii/package.py | 24 ++++++++ var/spack/repos/builtin/packages/dia/package.py | 24 ++++++++ .../repos/builtin/packages/docbook-xml/package.py | 24 ++++++++ .../repos/builtin/packages/doxygen/package.py | 24 ++++++++ .../repos/builtin/packages/dri2proto/package.py | 24 ++++++++ var/spack/repos/builtin/packages/dtcmp/package.py | 24 ++++++++ .../repos/builtin/packages/dyninst/package.py | 16 +++--- var/spack/repos/builtin/packages/eigen/package.py | 16 +++--- .../repos/builtin/packages/elfutils/package.py | 24 ++++++++ var/spack/repos/builtin/packages/elk/package.py | 24 ++++++++ var/spack/repos/builtin/packages/elpa/package.py | 16 +++--- var/spack/repos/builtin/packages/emacs/package.py | 24 ++++++++ .../packages/environment-modules/package.py | 24 ++++++++ .../repos/builtin/packages/espresso/package.py | 24 ++++++++ .../repos/builtin/packages/exodusii/package.py | 24 ++++++++ var/spack/repos/builtin/packages/expat/package.py | 24 ++++++++ var/spack/repos/builtin/packages/extrae/package.py | 24 ++++++++ .../builtin/packages/exuberant-ctags/package.py | 24 ++++++++ var/spack/repos/builtin/packages/fftw/package.py | 16 +++--- var/spack/repos/builtin/packages/fish/package.py | 24 ++++++++ var/spack/repos/builtin/packages/flex/package.py | 24 ++++++++ var/spack/repos/builtin/packages/fltk/package.py | 16 +++--- var/spack/repos/builtin/packages/flux/package.py | 24 ++++++++ .../repos/builtin/packages/fontconfig/package.py | 24 ++++++++ .../repos/builtin/packages/freetype/package.py | 24 ++++++++ var/spack/repos/builtin/packages/gasnet/package.py | 24 ++++++++ var/spack/repos/builtin/packages/gcc/package.py | 16 +++--- var/spack/repos/builtin/packages/gdal/package.py | 24 ++++++++ var/spack/repos/builtin/packages/gdb/package.py | 18 +++--- .../repos/builtin/packages/gdk-pixbuf/package.py | 24 ++++++++ var/spack/repos/builtin/packages/geos/package.py | 24 ++++++++ .../repos/builtin/packages/gettext/package.py | 24 ++++++++ var/spack/repos/builtin/packages/gflags/package.py | 24 ++++++++ .../repos/builtin/packages/ghostscript/package.py | 24 ++++++++ var/spack/repos/builtin/packages/git/package.py | 24 ++++++++ var/spack/repos/builtin/packages/gl2ps/package.py | 24 ++++++++ var/spack/repos/builtin/packages/glib/package.py | 24 ++++++++ var/spack/repos/builtin/packages/glm/package.py | 24 ++++++++ var/spack/repos/builtin/packages/global/package.py | 24 ++++++++ var/spack/repos/builtin/packages/glog/package.py | 24 ++++++++ var/spack/repos/builtin/packages/glpk/package.py | 16 +++--- var/spack/repos/builtin/packages/gmp/package.py | 16 +++--- var/spack/repos/builtin/packages/gmsh/package.py | 16 +++--- .../repos/builtin/packages/gnuplot/package.py | 16 +++--- var/spack/repos/builtin/packages/gnutls/package.py | 24 ++++++++ .../repos/builtin/packages/googletest/package.py | 24 ++++++++ var/spack/repos/builtin/packages/gperf/package.py | 24 ++++++++ .../repos/builtin/packages/gperftools/package.py | 16 +++--- .../repos/builtin/packages/graphlib/package.py | 24 ++++++++ .../repos/builtin/packages/graphviz/package.py | 24 ++++++++ .../repos/builtin/packages/gromacs/package.py | 24 ++++++++ var/spack/repos/builtin/packages/gsl/package.py | 16 +++--- .../repos/builtin/packages/gtkplus/package.py | 24 ++++++++ .../repos/builtin/packages/harfbuzz/package.py | 24 ++++++++ var/spack/repos/builtin/packages/hdf/package.py | 24 ++++++++ var/spack/repos/builtin/packages/hdf5/package.py | 16 +++--- .../repos/builtin/packages/hoomd-blue/package.py | 24 ++++++++ var/spack/repos/builtin/packages/hpx5/package.py | 24 ++++++++ var/spack/repos/builtin/packages/hwloc/package.py | 24 ++++++++ var/spack/repos/builtin/packages/hydra/package.py | 24 ++++++++ var/spack/repos/builtin/packages/hypre/package.py | 24 ++++++++ var/spack/repos/builtin/packages/icu/package.py | 24 ++++++++ var/spack/repos/builtin/packages/icu4c/package.py | 24 ++++++++ .../repos/builtin/packages/intltool/package.py | 24 ++++++++ var/spack/repos/builtin/packages/ior/package.py | 24 ++++++++ var/spack/repos/builtin/packages/ipopt/package.py | 24 ++++++++ var/spack/repos/builtin/packages/isl/package.py | 24 ++++++++ var/spack/repos/builtin/packages/jdk/package.py | 24 ++++++++ .../repos/builtin/packages/jemalloc/package.py | 24 ++++++++ var/spack/repos/builtin/packages/jpeg/package.py | 24 ++++++++ var/spack/repos/builtin/packages/judy/package.py | 24 ++++++++ var/spack/repos/builtin/packages/julia/package.py | 24 ++++++++ var/spack/repos/builtin/packages/kealib/package.py | 24 ++++++++ var/spack/repos/builtin/packages/kripke/package.py | 24 ++++++++ .../repos/builtin/packages/launchmon/package.py | 16 +++--- var/spack/repos/builtin/packages/lcms/package.py | 24 ++++++++ .../repos/builtin/packages/leveldb/package.py | 24 ++++++++ var/spack/repos/builtin/packages/libNBC/package.py | 16 +++--- .../repos/builtin/packages/libarchive/package.py | 24 ++++++++ .../repos/builtin/packages/libcerf/package.py | 16 +++--- .../repos/builtin/packages/libcircle/package.py | 24 ++++++++ var/spack/repos/builtin/packages/libdrm/package.py | 24 ++++++++ .../repos/builtin/packages/libdwarf/package.py | 16 +++--- .../repos/builtin/packages/libedit/package.py | 24 ++++++++ var/spack/repos/builtin/packages/libelf/package.py | 16 +++--- .../repos/builtin/packages/libevent/package.py | 24 ++++++++ var/spack/repos/builtin/packages/libffi/package.py | 24 ++++++++ .../repos/builtin/packages/libgcrypt/package.py | 24 ++++++++ var/spack/repos/builtin/packages/libgd/package.py | 16 +++--- .../repos/builtin/packages/libgpg-error/package.py | 24 ++++++++ .../builtin/packages/libjpeg-turbo/package.py | 24 ++++++++ .../repos/builtin/packages/libjson-c/package.py | 24 ++++++++ var/spack/repos/builtin/packages/libmng/package.py | 24 ++++++++ .../repos/builtin/packages/libmonitor/package.py | 16 +++--- .../repos/builtin/packages/libpciaccess/package.py | 24 ++++++++ var/spack/repos/builtin/packages/libpng/package.py | 24 ++++++++ .../repos/builtin/packages/libsigsegv/package.py | 24 ++++++++ .../repos/builtin/packages/libsodium/package.py | 24 ++++++++ .../repos/builtin/packages/libtermkey/package.py | 24 ++++++++ .../repos/builtin/packages/libtiff/package.py | 24 ++++++++ .../repos/builtin/packages/libtool/package.py | 24 ++++++++ .../repos/builtin/packages/libunwind/package.py | 16 +++--- .../repos/builtin/packages/libuuid/package.py | 24 ++++++++ var/spack/repos/builtin/packages/libuv/package.py | 24 ++++++++ .../repos/builtin/packages/libvterm/package.py | 24 ++++++++ var/spack/repos/builtin/packages/libxc/package.py | 24 ++++++++ var/spack/repos/builtin/packages/libxcb/package.py | 24 ++++++++ .../repos/builtin/packages/libxml2/package.py | 24 ++++++++ .../repos/builtin/packages/libxshmfence/package.py | 24 ++++++++ .../repos/builtin/packages/libxslt/package.py | 24 ++++++++ .../repos/builtin/packages/llvm-lld/package.py | 16 +++--- var/spack/repos/builtin/packages/llvm/package.py | 16 +++--- var/spack/repos/builtin/packages/lmdb/package.py | 24 ++++++++ var/spack/repos/builtin/packages/lmod/package.py | 24 ++++++++ var/spack/repos/builtin/packages/lua/package.py | 24 ++++++++ var/spack/repos/builtin/packages/lwgrp/package.py | 24 ++++++++ var/spack/repos/builtin/packages/lwm2/package.py | 24 ++++++++ var/spack/repos/builtin/packages/m4/package.py | 24 ++++++++ var/spack/repos/builtin/packages/matio/package.py | 24 ++++++++ .../repos/builtin/packages/mbedtls/package.py | 24 ++++++++ .../repos/builtin/packages/memaxes/package.py | 24 ++++++++ var/spack/repos/builtin/packages/mesa/package.py | 24 ++++++++ var/spack/repos/builtin/packages/metis/package.py | 16 +++--- var/spack/repos/builtin/packages/mfem/package.py | 24 ++++++++ var/spack/repos/builtin/packages/moab/package.py | 24 ++++++++ var/spack/repos/builtin/packages/mpc/package.py | 16 +++--- var/spack/repos/builtin/packages/mpe2/package.py | 24 ++++++++ var/spack/repos/builtin/packages/mpfr/package.py | 16 +++--- .../repos/builtin/packages/mpibash/package.py | 24 ++++++++ var/spack/repos/builtin/packages/mpich/package.py | 16 +++--- .../repos/builtin/packages/mpileaks/package.py | 16 +++--- var/spack/repos/builtin/packages/mrnet/package.py | 24 ++++++++ .../repos/builtin/packages/msgpack-c/package.py | 24 ++++++++ var/spack/repos/builtin/packages/mumps/package.py | 24 ++++++++ var/spack/repos/builtin/packages/munge/package.py | 24 ++++++++ .../repos/builtin/packages/muparser/package.py | 24 ++++++++ var/spack/repos/builtin/packages/muster/package.py | 24 ++++++++ .../repos/builtin/packages/mvapich2/package.py | 24 ++++++++ var/spack/repos/builtin/packages/nag/package.py | 24 ++++++++ var/spack/repos/builtin/packages/nasm/package.py | 24 ++++++++ var/spack/repos/builtin/packages/nccmp/package.py | 24 ++++++++ var/spack/repos/builtin/packages/ncdu/package.py | 24 ++++++++ var/spack/repos/builtin/packages/nco/package.py | 24 ++++++++ .../repos/builtin/packages/ncurses/package.py | 24 ++++++++ var/spack/repos/builtin/packages/ncview/package.py | 24 ++++++++ var/spack/repos/builtin/packages/ndiff/package.py | 24 ++++++++ .../repos/builtin/packages/netcdf-cxx/package.py | 24 ++++++++ .../repos/builtin/packages/netcdf-cxx4/package.py | 24 ++++++++ .../builtin/packages/netcdf-fortran/package.py | 24 ++++++++ var/spack/repos/builtin/packages/netcdf/package.py | 24 ++++++++ .../repos/builtin/packages/netgauge/package.py | 16 +++--- .../builtin/packages/netlib-lapack/package.py | 24 ++++++++ .../builtin/packages/netlib-scalapack/package.py | 24 ++++++++ var/spack/repos/builtin/packages/nettle/package.py | 24 ++++++++ var/spack/repos/builtin/packages/ninja/package.py | 24 ++++++++ .../repos/builtin/packages/numdiff/package.py | 16 +++--- var/spack/repos/builtin/packages/oce/package.py | 24 ++++++++ var/spack/repos/builtin/packages/octave/package.py | 24 ++++++++ var/spack/repos/builtin/packages/ompss/package.py | 24 ++++++++ .../repos/builtin/packages/ompt-openmp/package.py | 24 ++++++++ var/spack/repos/builtin/packages/opari2/package.py | 16 +++--- .../repos/builtin/packages/openblas/package.py | 24 ++++++++ var/spack/repos/builtin/packages/opencv/package.py | 24 ++++++++ .../repos/builtin/packages/openjpeg/package.py | 24 ++++++++ .../repos/builtin/packages/openmpi/package.py | 24 ++++++++ .../builtin/packages/openspeedshop/package.py | 24 ++++++++ .../repos/builtin/packages/openssl/package.py | 24 ++++++++ .../packages/osu-micro-benchmarks/package.py | 24 ++++++++ var/spack/repos/builtin/packages/otf/package.py | 24 ++++++++ var/spack/repos/builtin/packages/otf2/package.py | 16 +++--- var/spack/repos/builtin/packages/p4est/package.py | 24 ++++++++ var/spack/repos/builtin/packages/pango/package.py | 24 ++++++++ var/spack/repos/builtin/packages/papi/package.py | 24 ++++++++ .../repos/builtin/packages/paradiseo/package.py | 24 ++++++++ .../builtin/packages/parallel-netcdf/package.py | 24 ++++++++ .../repos/builtin/packages/paraver/package.py | 24 ++++++++ .../repos/builtin/packages/paraview/package.py | 24 ++++++++ .../repos/builtin/packages/parmetis/package.py | 16 +++--- .../repos/builtin/packages/parpack/package.py | 24 ++++++++ .../repos/builtin/packages/patchelf/package.py | 24 ++++++++ var/spack/repos/builtin/packages/pcre/package.py | 24 ++++++++ var/spack/repos/builtin/packages/pcre2/package.py | 24 ++++++++ var/spack/repos/builtin/packages/pdt/package.py | 16 +++--- var/spack/repos/builtin/packages/petsc/package.py | 24 ++++++++ var/spack/repos/builtin/packages/pgi/package.py | 24 ++++++++ var/spack/repos/builtin/packages/pidx/package.py | 24 ++++++++ var/spack/repos/builtin/packages/pixman/package.py | 24 ++++++++ .../repos/builtin/packages/pkg-config/package.py | 24 ++++++++ .../builtin/packages/pmgr_collective/package.py | 16 +++--- .../repos/builtin/packages/postgresql/package.py | 24 ++++++++ var/spack/repos/builtin/packages/ppl/package.py | 24 ++++++++ var/spack/repos/builtin/packages/proj/package.py | 24 ++++++++ .../repos/builtin/packages/protobuf/package.py | 24 ++++++++ .../builtin/packages/py-SQLAlchemy/package.py | 24 ++++++++ .../builtin/packages/py-argcomplete/package.py | 24 ++++++++ .../repos/builtin/packages/py-astroid/package.py | 24 ++++++++ .../repos/builtin/packages/py-astropy/package.py | 24 ++++++++ .../repos/builtin/packages/py-basemap/package.py | 24 ++++++++ .../repos/builtin/packages/py-biopython/package.py | 24 ++++++++ .../repos/builtin/packages/py-blessings/package.py | 24 ++++++++ .../builtin/packages/py-bottleneck/package.py | 24 ++++++++ .../repos/builtin/packages/py-cffi/package.py | 24 ++++++++ .../repos/builtin/packages/py-coverage/package.py | 24 ++++++++ .../repos/builtin/packages/py-csvkit/package.py | 24 ++++++++ .../repos/builtin/packages/py-cython/package.py | 24 ++++++++ .../repos/builtin/packages/py-dask/package.py | 24 ++++++++ .../repos/builtin/packages/py-dateutil/package.py | 24 ++++++++ var/spack/repos/builtin/packages/py-dbf/package.py | 24 ++++++++ .../repos/builtin/packages/py-decorator/package.py | 24 ++++++++ .../repos/builtin/packages/py-epydoc/package.py | 24 ++++++++ .../repos/builtin/packages/py-flake8/package.py | 24 ++++++++ .../repos/builtin/packages/py-funcsigs/package.py | 24 ++++++++ .../repos/builtin/packages/py-genders/package.py | 24 ++++++++ .../repos/builtin/packages/py-genshi/package.py | 24 ++++++++ .../repos/builtin/packages/py-gnuplot/package.py | 24 ++++++++ .../repos/builtin/packages/py-h5py/package.py | 24 ++++++++ .../repos/builtin/packages/py-ipython/package.py | 24 ++++++++ .../repos/builtin/packages/py-jdcal/package.py | 24 ++++++++ .../repos/builtin/packages/py-jinja2/package.py | 24 ++++++++ .../repos/builtin/packages/py-lockfile/package.py | 24 ++++++++ .../builtin/packages/py-logilab-common/package.py | 24 ++++++++ .../repos/builtin/packages/py-mako/package.py | 24 ++++++++ .../builtin/packages/py-markupsafe/package.py | 24 ++++++++ .../builtin/packages/py-matplotlib/package.py | 24 ++++++++ .../repos/builtin/packages/py-mistune/package.py | 24 ++++++++ .../repos/builtin/packages/py-mock/package.py | 24 ++++++++ .../repos/builtin/packages/py-mpi4py/package.py | 24 ++++++++ .../repos/builtin/packages/py-mpmath/package.py | 24 ++++++++ var/spack/repos/builtin/packages/py-mx/package.py | 24 ++++++++ .../repos/builtin/packages/py-mysqldb1/package.py | 24 ++++++++ .../repos/builtin/packages/py-netcdf/package.py | 24 ++++++++ .../repos/builtin/packages/py-networkx/package.py | 24 ++++++++ .../repos/builtin/packages/py-nose/package.py | 24 ++++++++ .../repos/builtin/packages/py-numexpr/package.py | 24 ++++++++ .../repos/builtin/packages/py-numpy/package.py | 24 ++++++++ .../repos/builtin/packages/py-openpyxl/package.py | 24 ++++++++ .../repos/builtin/packages/py-pandas/package.py | 24 ++++++++ var/spack/repos/builtin/packages/py-pbr/package.py | 24 ++++++++ .../builtin/packages/py-periodictable/package.py | 24 ++++++++ .../repos/builtin/packages/py-pexpect/package.py | 24 ++++++++ .../repos/builtin/packages/py-phonopy/package.py | 24 ++++++++ var/spack/repos/builtin/packages/py-pil/package.py | 24 ++++++++ .../repos/builtin/packages/py-pillow/package.py | 24 ++++++++ var/spack/repos/builtin/packages/py-pmw/package.py | 24 ++++++++ .../builtin/packages/py-prettytable/package.py | 24 ++++++++ .../repos/builtin/packages/py-py2neo/package.py | 24 ++++++++ .../repos/builtin/packages/py-pychecker/package.py | 24 ++++++++ .../repos/builtin/packages/py-pycparser/package.py | 24 ++++++++ .../builtin/packages/py-pyelftools/package.py | 24 ++++++++ .../repos/builtin/packages/py-pygments/package.py | 24 ++++++++ .../repos/builtin/packages/py-pylint/package.py | 24 ++++++++ .../repos/builtin/packages/py-pypar/package.py | 24 ++++++++ .../repos/builtin/packages/py-pyparsing/package.py | 24 ++++++++ .../repos/builtin/packages/py-pyqt/package.py | 24 ++++++++ .../repos/builtin/packages/py-pyside/package.py | 24 ++++++++ .../repos/builtin/packages/py-pytables/package.py | 24 ++++++++ .../builtin/packages/py-python-daemon/package.py | 24 ++++++++ .../repos/builtin/packages/py-pytz/package.py | 24 ++++++++ .../repos/builtin/packages/py-pyyaml/package.py | 24 ++++++++ .../repos/builtin/packages/py-rpy2/package.py | 24 ++++++++ .../packages/py-scientificpython/package.py | 24 ++++++++ .../builtin/packages/py-scikit-image/package.py | 24 ++++++++ .../builtin/packages/py-scikit-learn/package.py | 24 ++++++++ .../repos/builtin/packages/py-scipy/package.py | 24 ++++++++ .../builtin/packages/py-setuptools/package.py | 24 ++++++++ .../repos/builtin/packages/py-shiboken/package.py | 24 ++++++++ var/spack/repos/builtin/packages/py-sip/package.py | 24 ++++++++ var/spack/repos/builtin/packages/py-six/package.py | 24 ++++++++ .../repos/builtin/packages/py-sphinx/package.py | 24 ++++++++ .../repos/builtin/packages/py-storm/package.py | 24 ++++++++ .../repos/builtin/packages/py-sympy/package.py | 24 ++++++++ .../repos/builtin/packages/py-tappy/package.py | 24 ++++++++ .../repos/builtin/packages/py-tuiview/package.py | 24 ++++++++ .../repos/builtin/packages/py-twisted/package.py | 24 ++++++++ .../repos/builtin/packages/py-urwid/package.py | 24 ++++++++ .../builtin/packages/py-virtualenv/package.py | 24 ++++++++ .../repos/builtin/packages/py-wheel/package.py | 24 ++++++++ .../repos/builtin/packages/py-xlrd/package.py | 24 ++++++++ .../repos/builtin/packages/py-yapf/package.py | 24 ++++++++ var/spack/repos/builtin/packages/python/package.py | 24 ++++++++ var/spack/repos/builtin/packages/qhull/package.py | 24 ++++++++ .../repos/builtin/packages/qrupdate/package.py | 24 ++++++++ var/spack/repos/builtin/packages/qt/package.py | 24 ++++++++ .../repos/builtin/packages/qthreads/package.py | 24 ++++++++ .../builtin/packages/r-BiocGenerics/package.py | 24 ++++++++ .../repos/builtin/packages/r-abind/package.py | 24 ++++++++ .../repos/builtin/packages/r-filehash/package.py | 24 ++++++++ .../repos/builtin/packages/r-magic/package.py | 24 ++++++++ var/spack/repos/builtin/packages/raja/package.py | 24 ++++++++ var/spack/repos/builtin/packages/ravel/package.py | 24 ++++++++ .../repos/builtin/packages/readline/package.py | 24 ++++++++ var/spack/repos/builtin/packages/rose/package.py | 24 ++++++++ var/spack/repos/builtin/packages/rsync/package.py | 24 ++++++++ var/spack/repos/builtin/packages/ruby/package.py | 24 ++++++++ .../repos/builtin/packages/samtools/package.py | 24 ++++++++ .../repos/builtin/packages/scalasca/package.py | 16 +++--- var/spack/repos/builtin/packages/scons/package.py | 24 ++++++++ var/spack/repos/builtin/packages/scorep/package.py | 16 +++--- var/spack/repos/builtin/packages/scotch/package.py | 24 ++++++++ var/spack/repos/builtin/packages/scr/package.py | 16 +++--- var/spack/repos/builtin/packages/serf/package.py | 16 +++--- var/spack/repos/builtin/packages/silo/package.py | 24 ++++++++ var/spack/repos/builtin/packages/slepc/package.py | 24 ++++++++ var/spack/repos/builtin/packages/snappy/package.py | 24 ++++++++ .../repos/builtin/packages/sparsehash/package.py | 24 ++++++++ .../repos/builtin/packages/spindle/package.py | 16 +++--- var/spack/repos/builtin/packages/spot/package.py | 24 ++++++++ var/spack/repos/builtin/packages/sqlite/package.py | 16 +++--- var/spack/repos/builtin/packages/stat/package.py | 24 ++++++++ .../repos/builtin/packages/subversion/package.py | 16 +++--- .../repos/builtin/packages/suite-sparse/package.py | 24 ++++++++ .../repos/builtin/packages/sundials/package.py | 16 +++--- .../repos/builtin/packages/superlu-dist/package.py | 24 ++++++++ var/spack/repos/builtin/packages/swig/package.py | 16 +++--- var/spack/repos/builtin/packages/szip/package.py | 24 ++++++++ var/spack/repos/builtin/packages/tar/package.py | 24 ++++++++ var/spack/repos/builtin/packages/task/package.py | 24 ++++++++ var/spack/repos/builtin/packages/taskd/package.py | 24 ++++++++ var/spack/repos/builtin/packages/tau/package.py | 16 +++--- var/spack/repos/builtin/packages/tbb/package.py | 24 ++++++++ var/spack/repos/builtin/packages/tcl/package.py | 24 ++++++++ var/spack/repos/builtin/packages/tetgen/package.py | 24 ++++++++ .../repos/builtin/packages/texinfo/package.py | 18 +++--- .../packages/the_silver_searcher/package.py | 24 ++++++++ var/spack/repos/builtin/packages/thrift/package.py | 24 ++++++++ var/spack/repos/builtin/packages/tk/package.py | 24 ++++++++ var/spack/repos/builtin/packages/tmux/package.py | 24 ++++++++ .../repos/builtin/packages/tmuxinator/package.py | 24 ++++++++ .../repos/builtin/packages/triangle/package.py | 24 ++++++++ .../repos/builtin/packages/trilinos/package.py | 24 ++++++++ .../repos/builtin/packages/turbomole/package.py | 24 ++++++++ .../repos/builtin/packages/udunits2/package.py | 24 ++++++++ .../repos/builtin/packages/uncrustify/package.py | 24 ++++++++ .../repos/builtin/packages/unibilium/package.py | 24 ++++++++ .../repos/builtin/packages/util-linux/package.py | 24 ++++++++ .../repos/builtin/packages/valgrind/package.py | 16 +++--- var/spack/repos/builtin/packages/vim/package.py | 24 ++++++++ var/spack/repos/builtin/packages/visit/package.py | 24 ++++++++ var/spack/repos/builtin/packages/vtk/package.py | 24 ++++++++ var/spack/repos/builtin/packages/wget/package.py | 24 ++++++++ var/spack/repos/builtin/packages/wx/package.py | 24 ++++++++ .../repos/builtin/packages/wxpropgrid/package.py | 24 ++++++++ .../repos/builtin/packages/xcb-proto/package.py | 24 ++++++++ .../repos/builtin/packages/xerces-c/package.py | 24 ++++++++ var/spack/repos/builtin/packages/xz/package.py | 24 ++++++++ var/spack/repos/builtin/packages/yasm/package.py | 24 ++++++++ var/spack/repos/builtin/packages/zeromq/package.py | 24 ++++++++ var/spack/repos/builtin/packages/zfp/package.py | 24 ++++++++ var/spack/repos/builtin/packages/zlib/package.py | 24 ++++++++ var/spack/repos/builtin/packages/zoltan/package.py | 24 ++++++++ var/spack/repos/builtin/packages/zsh/package.py | 24 ++++++++ 617 files changed, 11108 insertions(+), 1913 deletions(-) diff --git a/LICENSE b/LICENSE index bb7ef91b3c..d7d101a3ac 100644 --- a/LICENSE +++ b/LICENSE @@ -1,56 +1,62 @@ -Copyright (c) 2013-2014, Lawrence Livermore National Security, LLC. +######################################################################## +GNU LESSER GENERAL PUBLIC LICENSE (Lesser GPL) +Version 2.1, February 1999 +######################################################################## +Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory. This file is part of Spack. -Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. LLNL-CODE-647188 For details, see https://github.com/llnl/spack This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License (as published by -the Free Software Foundation) version 2.1 dated February 1999. +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 General Public License for more details. +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 +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 -OUR NOTICE AND TERMS AND CONDITIONS OF THE GNU GENERAL PUBLIC LICENSE +######################################################################## +LLNL NOTICE AND TERMS AND CONDITIONS OF THE GNU LGPL -Our Preamble Notice +LLNL Preamble Notice -A. This notice is required to be provided under our contract with the -U.S. Department of Energy (DOE). This work was produced at the -Lawrence Livermore National Laboratory under Contract -No. DE-AC52-07NA27344 with the DOE. +A. This notice is required to be provided under LLNL's contract with + the U.S. Department of Energy (DOE). This work was produced at the + Lawrence Livermore National Laboratory under Contract + No. DE-AC52-07NA27344 with the DOE. B. Neither the United States Government nor Lawrence Livermore -National Security, LLC nor any of their employees, makes any warranty, -express or implied, or assumes any liability or responsibility for the -accuracy, completeness, or usefulness of any information, apparatus, -product, or process disclosed, or represents that its use would not -infringe privately-owned rights. + National Security, LLC nor any of their employees, makes any + warranty, express or implied, or assumes any liability or + responsibility for the accuracy, completeness, or usefulness of any + information, apparatus, product, or process disclosed, or + represents that its use would not infringe privately-owned rights. C. Also, reference herein to any specific commercial products, -process, or services by trade name, trademark, manufacturer or -otherwise does not necessarily constitute or imply its endorsement, -recommendation, or favoring by the United States Government or -Lawrence Livermore National Security, LLC. The views and opinions of -authors expressed herein do not necessarily state or reflect those of -the United States Government or Lawrence Livermore National Security, -LLC, and shall not be used for advertising or product endorsement -purposes. + process, or services by trade name, trademark, manufacturer or + otherwise does not necessarily constitute or imply its endorsement, + recommendation, or favoring by the United States Government or + Lawrence Livermore National Security, LLC. The views and opinions + of authors expressed herein do not necessarily state or reflect + those of the United States Government or Lawrence Livermore + National Security, LLC, and shall not be used for advertising or + product endorsement purposes. The precise terms and conditions for copying, distribution and modification follows. -GNU Lesser GPL terms and Conditions for Copying, Distribution, and -Modification +######################################################################## +GNU LESSER GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or diff --git a/bin/sbang b/bin/sbang index ebfbe2e7a1..f6b6d35e8a 100755 --- a/bin/sbang +++ b/bin/sbang @@ -1,4 +1,28 @@ #!/bin/bash +############################################################################## +# 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 +############################################################################## # # `sbang`: Run scripts with long shebang lines. # diff --git a/bin/spack b/bin/spack index f51cb8a4ec..3544feb10a 100755 --- a/bin/spack +++ b/bin/spack @@ -1,27 +1,27 @@ #!/usr/bin/env python ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import sys if not sys.version_info[:2] >= (2,6): diff --git a/bin/spack-python b/bin/spack-python index e0745e8c58..96bc367866 100755 --- a/bin/spack-python +++ b/bin/spack-python @@ -1,27 +1,27 @@ #!/bin/sh ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## # # spack-python diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 4564e84bd2..b9b79f83a3 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -1,27 +1,27 @@ #!/bin/bash ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## # # Spack compiler wrapper script. diff --git a/lib/spack/external/nose/LICENSE b/lib/spack/external/nose/LICENSE index 8add30ad59..9f6e791624 100644 --- a/lib/spack/external/nose/LICENSE +++ b/lib/spack/external/nose/LICENSE @@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. - + Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a @@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. - + GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an @@ -158,7 +158,7 @@ Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 @@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. - + Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. @@ -267,7 +267,7 @@ Library will still fall under Section 6.) distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work @@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined @@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. - + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or @@ -422,7 +422,7 @@ conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is @@ -456,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest @@ -500,5 +500,3 @@ necessary. Here is a sample; alter the names: Ty Coon, President of Vice That's all there is to it! - - diff --git a/lib/spack/llnl/__init__.py b/lib/spack/llnl/__init__.py index e69de29bb2..ed1ec23bca 100644 --- a/lib/spack/llnl/__init__.py +++ b/lib/spack/llnl/__init__.py @@ -0,0 +1,24 @@ +############################################################################## +# 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 +############################################################################## diff --git a/lib/spack/llnl/util/__init__.py b/lib/spack/llnl/util/__init__.py index e69de29bb2..ed1ec23bca 100644 --- a/lib/spack/llnl/util/__init__.py +++ b/lib/spack/llnl/util/__init__.py @@ -0,0 +1,24 @@ +############################################################################## +# 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 +############################################################################## diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 70d46a7f77..6661a80f27 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## __all__ = ['set_install_permissions', 'install', 'install_tree', 'traverse_tree', 'expand_user', 'working_dir', 'touch', 'touchp', 'mkdirp', diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py index 3b4e2c8352..63eb08d803 100644 --- a/lib/spack/llnl/util/lang.py +++ b/lib/spack/llnl/util/lang.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import re diff --git a/lib/spack/llnl/util/link_tree.py b/lib/spack/llnl/util/link_tree.py index 6ae8aff75c..b6d8796084 100644 --- a/lib/spack/llnl/util/link_tree.py +++ b/lib/spack/llnl/util/link_tree.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """LinkTree class for setting up trees of symbolic links.""" __all__ = ['LinkTree'] diff --git a/lib/spack/llnl/util/lock.py b/lib/spack/llnl/util/lock.py index a7a9bf6b19..479a1b0167 100644 --- a/lib/spack/llnl/util/lock.py +++ b/lib/spack/llnl/util/lock.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import fcntl diff --git a/lib/spack/llnl/util/tty/__init__.py b/lib/spack/llnl/util/tty/__init__.py index 3ecd3a4ac2..c638b113fd 100644 --- a/lib/spack/llnl/util/tty/__init__.py +++ b/lib/spack/llnl/util/tty/__init__.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import sys import os diff --git a/lib/spack/llnl/util/tty/colify.py b/lib/spack/llnl/util/tty/colify.py index 47c3cc4f8f..429ba45882 100644 --- a/lib/spack/llnl/util/tty/colify.py +++ b/lib/spack/llnl/util/tty/colify.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ Routines for printing columnar output. See colify() for more information. diff --git a/lib/spack/llnl/util/tty/color.py b/lib/spack/llnl/util/tty/color.py index 167a99d3c2..0abcb09b97 100644 --- a/lib/spack/llnl/util/tty/color.py +++ b/lib/spack/llnl/util/tty/color.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ This file implements an expression syntax, similar to printf, for adding diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py index 22f1087e53..ca82da7b17 100644 --- a/lib/spack/llnl/util/tty/log.py +++ b/lib/spack/llnl/util/tty/log.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """Utility classes for logging the output of blocks of code. """ diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 9108e1d0e3..164340bf0f 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import sys diff --git a/lib/spack/spack/abi.py b/lib/spack/spack/abi.py index 7e565bcbf9..91d1d2003d 100644 --- a/lib/spack/spack/abi.py +++ b/lib/spack/spack/abi.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://scalability-llnl.github.io/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 62c25c8003..b14cb2bea2 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import re diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 8961886049..5ce4cb1ce1 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## """ This module contains all routines related to setting up the package build environment. All of this is set up by package.py just before diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py index 6c635a1e6c..672999159c 100644 --- a/lib/spack/spack/cmd/__init__.py +++ b/lib/spack/spack/cmd/__init__.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import re diff --git a/lib/spack/spack/cmd/activate.py b/lib/spack/spack/cmd/activate.py index bcd01f2a28..9867fa8835 100644 --- a/lib/spack/spack/cmd/activate.py +++ b/lib/spack/spack/cmd/activate.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/arch.py b/lib/spack/spack/cmd/arch.py index db27544ffd..dc96dd0faa 100644 --- a/lib/spack/spack/cmd/arch.py +++ b/lib/spack/spack/cmd/arch.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import spack import spack.architecture as architecture diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py index bdbd623b39..bec11439b5 100644 --- a/lib/spack/spack/cmd/bootstrap.py +++ b/lib/spack/spack/cmd/bootstrap.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os from subprocess import check_call diff --git a/lib/spack/spack/cmd/cd.py b/lib/spack/spack/cmd/cd.py index 16cbe6555a..aa45f67ae1 100644 --- a/lib/spack/spack/cmd/cd.py +++ b/lib/spack/spack/cmd/cd.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import spack.cmd.location import spack.modules diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py index 518d2703dc..95bd4771ed 100644 --- a/lib/spack/spack/cmd/checksum.py +++ b/lib/spack/spack/cmd/checksum.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import hashlib diff --git a/lib/spack/spack/cmd/clean.py b/lib/spack/spack/cmd/clean.py index 6e7179122c..514c5874ef 100644 --- a/lib/spack/spack/cmd/clean.py +++ b/lib/spack/spack/cmd/clean.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2014, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index d3f8779d32..dc7731a290 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import sys diff --git a/lib/spack/spack/cmd/compilers.py b/lib/spack/spack/cmd/compilers.py index 7e09016f2d..9fbc2bb952 100644 --- a/lib/spack/spack/cmd/compilers.py +++ b/lib/spack/spack/cmd/compilers.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import llnl.util.tty as tty from llnl.util.tty.colify import colify diff --git a/lib/spack/spack/cmd/config.py b/lib/spack/spack/cmd/config.py index 5e6d4e4d7d..d6f56c270d 100644 --- a/lib/spack/spack/cmd/config.py +++ b/lib/spack/spack/cmd/config.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import sys import argparse diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index e3a31806ab..7071af2686 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import string import os diff --git a/lib/spack/spack/cmd/deactivate.py b/lib/spack/spack/cmd/deactivate.py index d6b23d6a08..990309ee48 100644 --- a/lib/spack/spack/cmd/deactivate.py +++ b/lib/spack/spack/cmd/deactivate.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/dependents.py b/lib/spack/spack/cmd/dependents.py index de76098d2f..78eb6847b8 100644 --- a/lib/spack/spack/cmd/dependents.py +++ b/lib/spack/spack/cmd/dependents.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse diff --git a/lib/spack/spack/cmd/diy.py b/lib/spack/spack/cmd/diy.py index 45f13e4463..39faf59a17 100644 --- a/lib/spack/spack/cmd/diy.py +++ b/lib/spack/spack/cmd/diy.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import sys import os diff --git a/lib/spack/spack/cmd/doc.py b/lib/spack/spack/cmd/doc.py index 29cadec94f..b3d0737d13 100644 --- a/lib/spack/spack/cmd/doc.py +++ b/lib/spack/spack/cmd/doc.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## description = "Run pydoc from within spack." diff --git a/lib/spack/spack/cmd/edit.py b/lib/spack/spack/cmd/edit.py index a20e40df9b..49ab83867a 100644 --- a/lib/spack/spack/cmd/edit.py +++ b/lib/spack/spack/cmd/edit.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import string diff --git a/lib/spack/spack/cmd/env.py b/lib/spack/spack/cmd/env.py index 525e955a00..85d111e91e 100644 --- a/lib/spack/spack/cmd/env.py +++ b/lib/spack/spack/cmd/env.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import argparse diff --git a/lib/spack/spack/cmd/extensions.py b/lib/spack/spack/cmd/extensions.py index ccb0fe4e1f..11659e0c96 100644 --- a/lib/spack/spack/cmd/extensions.py +++ b/lib/spack/spack/cmd/extensions.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import sys import argparse diff --git a/lib/spack/spack/cmd/fetch.py b/lib/spack/spack/cmd/fetch.py index adad545cae..e40caaa234 100644 --- a/lib/spack/spack/cmd/fetch.py +++ b/lib/spack/spack/cmd/fetch.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 714f1d514b..a99012a275 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import sys import collections diff --git a/lib/spack/spack/cmd/graph.py b/lib/spack/spack/cmd/graph.py index 586a852351..da65121836 100644 --- a/lib/spack/spack/cmd/graph.py +++ b/lib/spack/spack/cmd/graph.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse diff --git a/lib/spack/spack/cmd/help.py b/lib/spack/spack/cmd/help.py index 841a0d5bcb..1d23161839 100644 --- a/lib/spack/spack/cmd/help.py +++ b/lib/spack/spack/cmd/help.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import sys diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index c93db55c63..64d0d20e24 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import textwrap from llnl.util.tty.colify import * diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py index 1fef750c80..fef21f15ba 100644 --- a/lib/spack/spack/cmd/install.py +++ b/lib/spack/spack/cmd/install.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index 7c50ccb9cd..1e3699cee0 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import sys import llnl.util.tty as tty diff --git a/lib/spack/spack/cmd/load.py b/lib/spack/spack/cmd/load.py index 30d86c3b01..54cf01eb43 100644 --- a/lib/spack/spack/cmd/load.py +++ b/lib/spack/spack/cmd/load.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by David Beckingsale, david@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import spack.modules diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py index 307ee8982d..b0dbb1a550 100644 --- a/lib/spack/spack/cmd/location.py +++ b/lib/spack/spack/cmd/location.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import sys diff --git a/lib/spack/spack/cmd/md5.py b/lib/spack/spack/cmd/md5.py index f99fc0f8c2..3ba3c71562 100644 --- a/lib/spack/spack/cmd/md5.py +++ b/lib/spack/spack/cmd/md5.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2014, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import hashlib diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py index fcd15a6a90..d5f7abe212 100644 --- a/lib/spack/spack/cmd/mirror.py +++ b/lib/spack/spack/cmd/mirror.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import sys diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index cfe59c8d98..5292d42225 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import shutil diff --git a/lib/spack/spack/cmd/package-list.py b/lib/spack/spack/cmd/package-list.py index 5e37d5c16b..6c5c4ae8c6 100644 --- a/lib/spack/spack/cmd/package-list.py +++ b/lib/spack/spack/cmd/package-list.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import re import cgi diff --git a/lib/spack/spack/cmd/patch.py b/lib/spack/spack/cmd/patch.py index b04b402738..a5507e42cf 100644 --- a/lib/spack/spack/cmd/patch.py +++ b/lib/spack/spack/cmd/patch.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse diff --git a/lib/spack/spack/cmd/pkg.py b/lib/spack/spack/cmd/pkg.py index 20a3fc5fc2..a24c2759fe 100644 --- a/lib/spack/spack/cmd/pkg.py +++ b/lib/spack/spack/cmd/pkg.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os diff --git a/lib/spack/spack/cmd/providers.py b/lib/spack/spack/cmd/providers.py index 49d6ac192a..e9007486d2 100644 --- a/lib/spack/spack/cmd/providers.py +++ b/lib/spack/spack/cmd/providers.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import argparse diff --git a/lib/spack/spack/cmd/purge.py b/lib/spack/spack/cmd/purge.py index d5d7513c46..7b33ef7f69 100644 --- a/lib/spack/spack/cmd/purge.py +++ b/lib/spack/spack/cmd/purge.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import spack.stage as stage diff --git a/lib/spack/spack/cmd/python.py b/lib/spack/spack/cmd/python.py index 5325e8fd9a..59423271b9 100644 --- a/lib/spack/spack/cmd/python.py +++ b/lib/spack/spack/cmd/python.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import sys diff --git a/lib/spack/spack/cmd/reindex.py b/lib/spack/spack/cmd/reindex.py index 2b30ef8814..93eba7a0f1 100644 --- a/lib/spack/spack/cmd/reindex.py +++ b/lib/spack/spack/cmd/reindex.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import spack diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py index 87c782000f..399237b169 100644 --- a/lib/spack/spack/cmd/repo.py +++ b/lib/spack/spack/cmd/repo.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://software.llnl.gov/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import re diff --git a/lib/spack/spack/cmd/restage.py b/lib/spack/spack/cmd/restage.py index 540c2ef2a5..325d30662f 100644 --- a/lib/spack/spack/cmd/restage.py +++ b/lib/spack/spack/cmd/restage.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2014, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse diff --git a/lib/spack/spack/cmd/spec.py b/lib/spack/spack/cmd/spec.py index 43a106ea37..321e3e429b 100644 --- a/lib/spack/spack/cmd/spec.py +++ b/lib/spack/spack/cmd/spec.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import spack.cmd diff --git a/lib/spack/spack/cmd/stage.py b/lib/spack/spack/cmd/stage.py index 975bb54ef7..61e9c6d9ff 100644 --- a/lib/spack/spack/cmd/stage.py +++ b/lib/spack/spack/cmd/stage.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import argparse diff --git a/lib/spack/spack/cmd/test-install.py b/lib/spack/spack/cmd/test-install.py index 3277e15548..45592a7dda 100644 --- a/lib/spack/spack/cmd/test-install.py +++ b/lib/spack/spack/cmd/test-install.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import codecs diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index ddc6cb4fce..cb9dd26c71 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os from pprint import pprint diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 1ff3d8db5f..3bffc2633b 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 __future__ import print_function diff --git a/lib/spack/spack/cmd/unload.py b/lib/spack/spack/cmd/unload.py index cfb640ee6f..7bd15750ed 100644 --- a/lib/spack/spack/cmd/unload.py +++ b/lib/spack/spack/cmd/unload.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by David Beckingsale, david@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import spack.modules diff --git a/lib/spack/spack/cmd/unuse.py b/lib/spack/spack/cmd/unuse.py index 06176a976b..789a690e9c 100644 --- a/lib/spack/spack/cmd/unuse.py +++ b/lib/spack/spack/cmd/unuse.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import spack.modules diff --git a/lib/spack/spack/cmd/url-parse.py b/lib/spack/spack/cmd/url-parse.py index 077c793d2e..ce12a17d13 100644 --- a/lib/spack/spack/cmd/url-parse.py +++ b/lib/spack/spack/cmd/url-parse.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import sys diff --git a/lib/spack/spack/cmd/urls.py b/lib/spack/spack/cmd/urls.py index ebab65f7d1..2fe2019a22 100644 --- a/lib/spack/spack/cmd/urls.py +++ b/lib/spack/spack/cmd/urls.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import sys import spack diff --git a/lib/spack/spack/cmd/use.py b/lib/spack/spack/cmd/use.py index c09695cfd3..bbb90fde1b 100644 --- a/lib/spack/spack/cmd/use.py +++ b/lib/spack/spack/cmd/use.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import argparse import spack.modules diff --git a/lib/spack/spack/cmd/versions.py b/lib/spack/spack/cmd/versions.py index bba75dae96..ec3a4b2e34 100644 --- a/lib/spack/spack/cmd/versions.py +++ b/lib/spack/spack/cmd/versions.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os from llnl.util.tty.colify import colify diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index 0f208caaf3..e2da272212 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import re diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 3a04bc2ebc..692e5518aa 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """This module contains functions related to finding compilers on the system and configuring Spack to use multiple compilers. diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index 8c646905c7..072bcd065f 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import re import spack.compiler as cpr diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py index 91c498ac82..164bddeb3f 100644 --- a/lib/spack/spack/compilers/gcc.py +++ b/lib/spack/spack/compilers/gcc.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import llnl.util.tty as tty from spack.compiler import * diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py index 9b1cf07c36..5007ece645 100644 --- a/lib/spack/spack/compilers/intel.py +++ b/lib/spack/spack/compilers/intel.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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.compiler import * import llnl.util.tty as tty diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py index 49b77eae6b..cee11bc97a 100644 --- a/lib/spack/spack/compilers/nag.py +++ b/lib/spack/spack/compilers/nag.py @@ -1,3 +1,27 @@ +############################################################################## +# 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.compiler import * import llnl.util.tty as tty diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py index 94c6b8365c..d42148dc49 100644 --- a/lib/spack/spack/compilers/pgi.py +++ b/lib/spack/spack/compilers/pgi.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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.compiler import * import llnl.util.tty as tty diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py index 61a2e730dc..bda2de4b87 100644 --- a/lib/spack/spack/compilers/xl.py +++ b/lib/spack/spack/compilers/xl.py @@ -1,27 +1,26 @@ -# -*- coding: utf-8 -*- ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by François Bissey, francois.bissey@canterbury.ac.nz, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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.compiler import * import llnl.util.tty as tty diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index ed9bf79868..f5e1c10b48 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ Functions here are used to take abstract specs and make them concrete. diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 2e2787c37c..ec37bd290c 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -1,27 +1,27 @@ # flake8: noqa ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """This module implements Spack's configuration file handling. diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index 089d29325e..ee4473e079 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """Spack's installation tracking database. diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 61cd303012..74ee7b0add 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """This package contains directives that can be used within a package. diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py index da8f1aa1bc..32d27d7bd0 100644 --- a/lib/spack/spack/directory_layout.py +++ b/lib/spack/spack/directory_layout.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import re import os diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 3fbe2531c1..11998ad8d2 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import collections import inspect import os diff --git a/lib/spack/spack/error.py b/lib/spack/spack/error.py index 0c2e7eb53c..85ad2fe249 100644 --- a/lib/spack/spack/error.py +++ b/lib/spack/spack/error.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import sys diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index ce2c4e30c7..e05cb13c1e 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ Fetch strategies are used to download source code into a staging area diff --git a/lib/spack/spack/graph.py b/lib/spack/spack/graph.py index f3732dfbff..22058d41d8 100644 --- a/lib/spack/spack/graph.py +++ b/lib/spack/spack/graph.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """Functions for graphing DAGs of dependencies. diff --git a/lib/spack/spack/hooks/__init__.py b/lib/spack/spack/hooks/__init__.py index 2765f7be39..902e488eca 100644 --- a/lib/spack/spack/hooks/__init__.py +++ b/lib/spack/spack/hooks/__init__.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """This package contains modules with hooks for various stages in the Spack install process. You can add modules here and they'll be diff --git a/lib/spack/spack/hooks/dotkit.py b/lib/spack/spack/hooks/dotkit.py index 9123637356..a140646e04 100644 --- a/lib/spack/spack/hooks/dotkit.py +++ b/lib/spack/spack/hooks/dotkit.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import spack.modules diff --git a/lib/spack/spack/hooks/extensions.py b/lib/spack/spack/hooks/extensions.py index 627184cabd..bcbd68dfa0 100644 --- a/lib/spack/spack/hooks/extensions.py +++ b/lib/spack/spack/hooks/extensions.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import spack diff --git a/lib/spack/spack/hooks/licensing.py b/lib/spack/spack/hooks/licensing.py index 31f15cc3e9..0f63b0e05a 100644 --- a/lib/spack/spack/hooks/licensing.py +++ b/lib/spack/spack/hooks/licensing.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os import spack diff --git a/lib/spack/spack/hooks/sbang.py b/lib/spack/spack/hooks/sbang.py index d78adb576e..83d67ea225 100644 --- a/lib/spack/spack/hooks/sbang.py +++ b/lib/spack/spack/hooks/sbang.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os diff --git a/lib/spack/spack/hooks/tclmodule.py b/lib/spack/spack/hooks/tclmodule.py index 8b315f27a2..2c88810c97 100644 --- a/lib/spack/spack/hooks/tclmodule.py +++ b/lib/spack/spack/hooks/tclmodule.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by David Beckingsale, david@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import spack.modules diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py index 6981f69ac0..0bbcfba6b4 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirror.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ This file contains code for creating spack mirror directories. A diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 53f054094a..a35e21c3db 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ This module contains code for creating environment modules, which can include diff --git a/lib/spack/spack/multimethod.py b/lib/spack/spack/multimethod.py index 3cd17e796a..5fda9328d6 100644 --- a/lib/spack/spack/multimethod.py +++ b/lib/spack/spack/multimethod.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """This module contains utilities for using multi-methods in spack. You can think of multi-methods like overloaded methods -- diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 8f8eb6db64..8167341127 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ This is where most of the action happens in Spack. diff --git a/lib/spack/spack/package_test.py b/lib/spack/spack/package_test.py index 9c15e3f5d0..e366b5f0e5 100644 --- a/lib/spack/spack/package_test.py +++ b/lib/spack/spack/package_test.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2016, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * import os diff --git a/lib/spack/spack/parse.py b/lib/spack/spack/parse.py index e9467aa685..8adf957e7f 100644 --- a/lib/spack/spack/parse.py +++ b/lib/spack/spack/parse.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import re import itertools diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py index b82a047753..c2e181be2f 100644 --- a/lib/spack/spack/patch.py +++ b/lib/spack/spack/patch.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os diff --git a/lib/spack/spack/preferred_packages.py b/lib/spack/spack/preferred_packages.py index 4d8526c75f..4820584150 100644 --- a/lib/spack/spack/preferred_packages.py +++ b/lib/spack/spack/preferred_packages.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://scalability-llnl.github.io/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import spack diff --git a/lib/spack/spack/repository.py b/lib/spack/spack/repository.py index d2fdc937f7..70134964ad 100644 --- a/lib/spack/spack/repository.py +++ b/lib/spack/spack/repository.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://software.llnl.gov/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import exceptions diff --git a/lib/spack/spack/resource.py b/lib/spack/spack/resource.py index ddfaaf4cb0..24b675f8da 100644 --- a/lib/spack/spack/resource.py +++ b/lib/spack/spack/resource.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://software.llnl.gov/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """Describes an optional resource needed for a build. diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index d04135860e..89a023a750 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ Spack allows very fine-grained control over how packages are installed and diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 84c47ee660..a76ec168ad 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import errno diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index 10eaac1344..1668e271fa 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import sys diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index 35392d9d6d..a630866143 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ This test checks that the Spack cc compiler wrapper is parsing diff --git a/lib/spack/spack/test/cmd/__init__.py b/lib/spack/spack/test/cmd/__init__.py index e69de29bb2..ed1ec23bca 100644 --- a/lib/spack/spack/test/cmd/__init__.py +++ b/lib/spack/spack/test/cmd/__init__.py @@ -0,0 +1,24 @@ +############################################################################## +# 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 +############################################################################## diff --git a/lib/spack/spack/test/cmd/test_install.py b/lib/spack/spack/test/cmd/test_install.py index 2206c7bea1..d17e013ed2 100644 --- a/lib/spack/spack/test/cmd/test_install.py +++ b/lib/spack/spack/test/cmd/test_install.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import collections from contextlib import contextmanager diff --git a/lib/spack/spack/test/cmd/uninstall.py b/lib/spack/spack/test/cmd/uninstall.py index 80efe06d36..9fffaace40 100644 --- a/lib/spack/spack/test/cmd/uninstall.py +++ b/lib/spack/spack/test/cmd/uninstall.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import spack.test.mock_database from spack.cmd.uninstall import uninstall diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 9cd8c969ae..799fdae3a9 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import spack from spack.spec import Spec, CompilerSpec diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index ed0797a541..eff482f4c6 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import shutil diff --git a/lib/spack/spack/test/configure_guess.py b/lib/spack/spack/test/configure_guess.py index 2440d120e5..bad3673e7a 100644 --- a/lib/spack/spack/test/configure_guess.py +++ b/lib/spack/spack/test/configure_guess.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import shutil diff --git a/lib/spack/spack/test/database.py b/lib/spack/spack/test/database.py index 465263d057..e1322f2081 100644 --- a/lib/spack/spack/test/database.py +++ b/lib/spack/spack/test/database.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ These tests check the database is functioning properly, diff --git a/lib/spack/spack/test/directory_layout.py b/lib/spack/spack/test/directory_layout.py index 8ad8f1a360..74669fe8a2 100644 --- a/lib/spack/spack/test/directory_layout.py +++ b/lib/spack/spack/test/directory_layout.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """\ This test verifies that the Spack directory layout works properly. diff --git a/lib/spack/spack/test/environment.py b/lib/spack/spack/test/environment.py index 6c8f5ea43c..ded1539e18 100644 --- a/lib/spack/spack/test/environment.py +++ b/lib/spack/spack/test/environment.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import unittest import os from spack.environment import EnvironmentModifications diff --git a/lib/spack/spack/test/git_fetch.py b/lib/spack/spack/test/git_fetch.py index 3578044116..4de65760d7 100644 --- a/lib/spack/spack/test/git_fetch.py +++ b/lib/spack/spack/test/git_fetch.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os diff --git a/lib/spack/spack/test/hg_fetch.py b/lib/spack/spack/test/hg_fetch.py index b8a0c1ec46..292ffba949 100644 --- a/lib/spack/spack/test/hg_fetch.py +++ b/lib/spack/spack/test/hg_fetch.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import spack diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py index fc5b7e67df..cfe6ea9b27 100644 --- a/lib/spack/spack/test/install.py +++ b/lib/spack/spack/test/install.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import shutil import tempfile diff --git a/lib/spack/spack/test/link_tree.py b/lib/spack/spack/test/link_tree.py index ee37e765c7..de40991b57 100644 --- a/lib/spack/spack/test/link_tree.py +++ b/lib/spack/spack/test/link_tree.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import unittest diff --git a/lib/spack/spack/test/lock.py b/lib/spack/spack/test/lock.py index 3b11d18da4..0e9f6daf4d 100644 --- a/lib/spack/spack/test/lock.py +++ b/lib/spack/spack/test/lock.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ These tests ensure that our lock works correctly. diff --git a/lib/spack/spack/test/make_executable.py b/lib/spack/spack/test/make_executable.py index a2606acf19..b7a45a3f72 100644 --- a/lib/spack/spack/test/make_executable.py +++ b/lib/spack/spack/test/make_executable.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ Tests for Spack's built-in parallel make support. diff --git a/lib/spack/spack/test/mirror.py b/lib/spack/spack/test/mirror.py index e707adfe9d..b682d4e097 100644 --- a/lib/spack/spack/test/mirror.py +++ b/lib/spack/spack/test/mirror.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import spack diff --git a/lib/spack/spack/test/mock_database.py b/lib/spack/spack/test/mock_database.py index 82ba59fc48..b1194f2451 100644 --- a/lib/spack/spack/test/mock_database.py +++ b/lib/spack/spack/test/mock_database.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import shutil import tempfile diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 6d24a84150..595667bf35 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import shutil diff --git a/lib/spack/spack/test/mock_repo.py b/lib/spack/spack/test/mock_repo.py index a8bdfb5571..a8098b8eec 100644 --- a/lib/spack/spack/test/mock_repo.py +++ b/lib/spack/spack/test/mock_repo.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import shutil diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index c65d663250..56e294de26 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import collections from contextlib import contextmanager diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index 2d4b8cd584..f653ca3477 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ Test for multi_method dispatch. diff --git a/lib/spack/spack/test/namespace_trie.py b/lib/spack/spack/test/namespace_trie.py index 2023ba6d96..b38ecd6179 100644 --- a/lib/spack/spack/test/namespace_trie.py +++ b/lib/spack/spack/test/namespace_trie.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://software.llnl.gov/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import unittest diff --git a/lib/spack/spack/test/optional_deps.py b/lib/spack/spack/test/optional_deps.py index 55f35ea4c9..90382dfc4a 100644 --- a/lib/spack/spack/test/optional_deps.py +++ b/lib/spack/spack/test/optional_deps.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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.spec import Spec diff --git a/lib/spack/spack/test/package_sanity.py b/lib/spack/spack/test/package_sanity.py index ee09040d0d..9198986f5d 100644 --- a/lib/spack/spack/test/package_sanity.py +++ b/lib/spack/spack/test/package_sanity.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """\ This test does sanity checks on Spack's builtin package database. diff --git a/lib/spack/spack/test/packages.py b/lib/spack/spack/test/packages.py index f0b5e05f3b..bea42bb33a 100644 --- a/lib/spack/spack/test/packages.py +++ b/lib/spack/spack/test/packages.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import spack diff --git a/lib/spack/spack/test/pattern.py b/lib/spack/spack/test/pattern.py index 6c783c6a5f..3419d600b8 100644 --- a/lib/spack/spack/test/pattern.py +++ b/lib/spack/spack/test/pattern.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import unittest diff --git a/lib/spack/spack/test/python_version.py b/lib/spack/spack/test/python_version.py index 4294975304..6c09effc56 100644 --- a/lib/spack/spack/test/python_version.py +++ b/lib/spack/spack/test/python_version.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ This test ensures that all Spack files are Python version 2.6 or less. diff --git a/lib/spack/spack/test/sbang.py b/lib/spack/spack/test/sbang.py index 825bc4be98..6aea1a68c7 100644 --- a/lib/spack/spack/test/sbang.py +++ b/lib/spack/spack/test/sbang.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """\ Test that Spack's shebang filtering works correctly. diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index 5e6162b6e6..4645f98565 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ These tests check Spec DAG operations using dummy packages. diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 8c33d1ff6e..60eb86d652 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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.spec import * from spack.test.mock_packages_test import * diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index 6e08e30e13..928d111ea9 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import unittest diff --git a/lib/spack/spack/test/spec_yaml.py b/lib/spack/spack/test/spec_yaml.py index 11987ea1b3..0230fc203a 100644 --- a/lib/spack/spack/test/spec_yaml.py +++ b/lib/spack/spack/test/spec_yaml.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """Test YAML serialization for specs. diff --git a/lib/spack/spack/test/stage.py b/lib/spack/spack/test/stage.py index ea425127c4..6d8c3ac67c 100644 --- a/lib/spack/spack/test/stage.py +++ b/lib/spack/spack/test/stage.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """\ Test that the Stage class works correctly. diff --git a/lib/spack/spack/test/svn_fetch.py b/lib/spack/spack/test/svn_fetch.py index 1ee4ee700e..0a745a090b 100644 --- a/lib/spack/spack/test/svn_fetch.py +++ b/lib/spack/spack/test/svn_fetch.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os import re diff --git a/lib/spack/spack/test/tally_plugin.py b/lib/spack/spack/test/tally_plugin.py index 4163ab95dd..96af1c9b21 100644 --- a/lib/spack/spack/test/tally_plugin.py +++ b/lib/spack/spack/test/tally_plugin.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://scalability-software.llnl.gov/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os diff --git a/lib/spack/spack/test/url_extrapolate.py b/lib/spack/spack/test/url_extrapolate.py index 068a335b49..ffd4230f71 100644 --- a/lib/spack/spack/test/url_extrapolate.py +++ b/lib/spack/spack/test/url_extrapolate.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """\ Tests ability of spack to extrapolate URL versions from existing versions. diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py index 561d4658a1..648996aaaa 100644 --- a/lib/spack/spack/test/url_parse.py +++ b/lib/spack/spack/test/url_parse.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """\ This file has a bunch of versions tests taken from the excellent version diff --git a/lib/spack/spack/test/url_substitution.py b/lib/spack/spack/test/url_substitution.py index 2be38af0d3..9cc04834b6 100644 --- a/lib/spack/spack/test/url_substitution.py +++ b/lib/spack/spack/test/url_substitution.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """\ This test does sanity checks on substituting new versions into URLs diff --git a/lib/spack/spack/test/versions.py b/lib/spack/spack/test/versions.py index 2732006eb3..a026403e2e 100644 --- a/lib/spack/spack/test/versions.py +++ b/lib/spack/spack/test/versions.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ These version tests were taken from the RPM source code. diff --git a/lib/spack/spack/test/yaml.py b/lib/spack/spack/test/yaml.py index b930c022f2..f1b83e7b71 100644 --- a/lib/spack/spack/test/yaml.py +++ b/lib/spack/spack/test/yaml.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ Test Spack's custom YAML format. diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index ad51da9d47..f678a2dca9 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ This module has methods for parsing names and versions of packages from URLs. diff --git a/lib/spack/spack/util/__init__.py b/lib/spack/spack/util/__init__.py index b54691b67c..ed1ec23bca 100644 --- a/lib/spack/spack/util/__init__.py +++ b/lib/spack/spack/util/__init__.py @@ -1,24 +1,24 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## diff --git a/lib/spack/spack/util/compression.py b/lib/spack/spack/util/compression.py index 5ae5867428..dc1188eb0f 100644 --- a/lib/spack/spack/util/compression.py +++ b/lib/spack/spack/util/compression.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import re import os diff --git a/lib/spack/spack/util/crypto.py b/lib/spack/spack/util/crypto.py index 5269260284..1ae9793518 100644 --- a/lib/spack/spack/util/crypto.py +++ b/lib/spack/spack/util/crypto.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import hashlib diff --git a/lib/spack/spack/util/debug.py b/lib/spack/spack/util/debug.py index 7930753f6f..e8a0595416 100644 --- a/lib/spack/spack/util/debug.py +++ b/lib/spack/spack/util/debug.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """Debug signal handler: prints a stack trace and enters interpreter. diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py index 55e653fd2f..f23110d2d9 100644 --- a/lib/spack/spack/util/environment.py +++ b/lib/spack/spack/util/environment.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import os diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index 25819b6fc7..d2ccfde69b 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## __all__ = ['Executable', 'which', 'ProcessError'] diff --git a/lib/spack/spack/util/multiproc.py b/lib/spack/spack/util/multiproc.py index 8ca82df011..038cd90121 100644 --- a/lib/spack/spack/util/multiproc.py +++ b/lib/spack/spack/util/multiproc.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ This implements a parallel map operation but it can accept more values diff --git a/lib/spack/spack/util/naming.py b/lib/spack/spack/util/naming.py index 5025f15027..2d9762942d 100644 --- a/lib/spack/spack/util/naming.py +++ b/lib/spack/spack/util/naming.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## # Need this because of spack.util.string from __future__ import absolute_import import string diff --git a/lib/spack/spack/util/pattern.py b/lib/spack/spack/util/pattern.py index 17a126498b..6d4bcb1039 100644 --- a/lib/spack/spack/util/pattern.py +++ b/lib/spack/spack/util/pattern.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import inspect import collections diff --git a/lib/spack/spack/util/prefix.py b/lib/spack/spack/util/prefix.py index c613ca5182..e1a0f2958b 100644 --- a/lib/spack/spack/util/prefix.py +++ b/lib/spack/spack/util/prefix.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ This file contains utilities to help with installing packages. diff --git a/lib/spack/spack/util/spack_yaml.py b/lib/spack/spack/util/spack_yaml.py index 728e86b8ee..909f9a57a8 100644 --- a/lib/spack/spack/util/spack_yaml.py +++ b/lib/spack/spack/util/spack_yaml.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """Enhanced YAML parsing for Spack. diff --git a/lib/spack/spack/util/string.py b/lib/spack/spack/util/string.py index 1556ce6d29..ce017b8126 100644 --- a/lib/spack/spack/util/string.py +++ b/lib/spack/spack/util/string.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## def comma_list(sequence, article=''): diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index 73f4858b02..47abc507e0 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## import re import os diff --git a/lib/spack/spack/variant.py b/lib/spack/spack/variant.py index 8959e76684..20686d44b2 100644 --- a/lib/spack/spack/variant.py +++ b/lib/spack/spack/variant.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """Variant is a class describing flags on builds, or "variants". diff --git a/lib/spack/spack/version.py b/lib/spack/spack/version.py index e8a0a261c9..247f6d2362 100644 --- a/lib/spack/spack/version.py +++ b/lib/spack/spack/version.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ This module implements Version and version-ish objects. These are: diff --git a/lib/spack/spack/virtual.py b/lib/spack/spack/virtual.py index d16aea8642..91ad77c8fd 100644 --- a/lib/spack/spack/virtual.py +++ b/lib/spack/spack/virtual.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## """ The ``virtual`` module contains utility classes for virtual dependencies. diff --git a/share/spack/setup-env.csh b/share/spack/setup-env.csh index 42d8c42726..b960c21459 100755 --- a/share/spack/setup-env.csh +++ b/share/spack/setup-env.csh @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## # diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index dba6f1eff4..8aa259cf15 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -1,28 +1,29 @@ -##################################################################### -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## +######################################################################## # # This file is part of Spack and sets up the spack environment for # bash and zsh. This includes dotkit support, module support, and @@ -30,7 +31,6 @@ # # . /path/to/spack/share/spack/setup-env.sh # - ######################################################################## # This is a wrapper around the spack command that forwards calls to # 'spack use' and 'spack unuse' to shell functions. This in turn diff --git a/var/spack/repos/builtin.mock/packages/a/package.py b/var/spack/repos/builtin.mock/packages/a/package.py index fa63c08df0..40b92240fc 100644 --- a/var/spack/repos/builtin.mock/packages/a/package.py +++ b/var/spack/repos/builtin.mock/packages/a/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 A(Package): diff --git a/var/spack/repos/builtin.mock/packages/b/package.py b/var/spack/repos/builtin.mock/packages/b/package.py index cb88aa2157..c447a56b48 100644 --- a/var/spack/repos/builtin.mock/packages/b/package.py +++ b/var/spack/repos/builtin.mock/packages/b/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 B(Package): diff --git a/var/spack/repos/builtin.mock/packages/c/package.py b/var/spack/repos/builtin.mock/packages/c/package.py index f51b913fa9..5b6079c4e3 100644 --- a/var/spack/repos/builtin.mock/packages/c/package.py +++ b/var/spack/repos/builtin.mock/packages/c/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 C(Package): diff --git a/var/spack/repos/builtin.mock/packages/callpath/package.py b/var/spack/repos/builtin.mock/packages/callpath/package.py index abc576f78f..c297a123b8 100644 --- a/var/spack/repos/builtin.mock/packages/callpath/package.py +++ b/var/spack/repos/builtin.mock/packages/callpath/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * 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 a5d3ef156a..355689a2d2 100644 --- a/var/spack/repos/builtin.mock/packages/cmake-client/package.py +++ b/var/spack/repos/builtin.mock/packages/cmake-client/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * import os diff --git a/var/spack/repos/builtin.mock/packages/cmake/package.py b/var/spack/repos/builtin.mock/packages/cmake/package.py index deb44c2bf7..0356cf8afb 100644 --- a/var/spack/repos/builtin.mock/packages/cmake/package.py +++ b/var/spack/repos/builtin.mock/packages/cmake/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * import os diff --git a/var/spack/repos/builtin.mock/packages/direct_mpich/package.py b/var/spack/repos/builtin.mock/packages/direct_mpich/package.py index efe7fc2afc..663908d56c 100644 --- a/var/spack/repos/builtin.mock/packages/direct_mpich/package.py +++ b/var/spack/repos/builtin.mock/packages/direct_mpich/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/dyninst/package.py b/var/spack/repos/builtin.mock/packages/dyninst/package.py index ea57950865..ad486011e2 100644 --- a/var/spack/repos/builtin.mock/packages/dyninst/package.py +++ b/var/spack/repos/builtin.mock/packages/dyninst/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/e/package.py b/var/spack/repos/builtin.mock/packages/e/package.py index 76c6b64c7f..b951a3eaa6 100644 --- a/var/spack/repos/builtin.mock/packages/e/package.py +++ b/var/spack/repos/builtin.mock/packages/e/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 E(Package): diff --git a/var/spack/repos/builtin.mock/packages/externalprereq/package.py b/var/spack/repos/builtin.mock/packages/externalprereq/package.py index 7d63925693..bd3c4348bf 100644 --- a/var/spack/repos/builtin.mock/packages/externalprereq/package.py +++ b/var/spack/repos/builtin.mock/packages/externalprereq/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://scalability-llnl.github.io/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/externaltest/package.py b/var/spack/repos/builtin.mock/packages/externaltest/package.py index c546922f87..2318887aec 100644 --- a/var/spack/repos/builtin.mock/packages/externaltest/package.py +++ b/var/spack/repos/builtin.mock/packages/externaltest/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://scalability-llnl.github.io/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/externaltool/package.py b/var/spack/repos/builtin.mock/packages/externaltool/package.py index af902bd70e..9ff2396f36 100644 --- a/var/spack/repos/builtin.mock/packages/externaltool/package.py +++ b/var/spack/repos/builtin.mock/packages/externaltool/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://scalability-llnl.github.io/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/externalvirtual/package.py b/var/spack/repos/builtin.mock/packages/externalvirtual/package.py index 722c1e1c53..e19ef332f0 100644 --- a/var/spack/repos/builtin.mock/packages/externalvirtual/package.py +++ b/var/spack/repos/builtin.mock/packages/externalvirtual/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://scalability-llnl.github.io/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/fake/package.py b/var/spack/repos/builtin.mock/packages/fake/package.py index 5f81ef20fc..15aabf1101 100644 --- a/var/spack/repos/builtin.mock/packages/fake/package.py +++ b/var/spack/repos/builtin.mock/packages/fake/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/git-test/package.py b/var/spack/repos/builtin.mock/packages/git-test/package.py index 689185463c..aeea41146f 100644 --- a/var/spack/repos/builtin.mock/packages/git-test/package.py +++ b/var/spack/repos/builtin.mock/packages/git-test/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 GitTest(Package): diff --git a/var/spack/repos/builtin.mock/packages/hg-test/package.py b/var/spack/repos/builtin.mock/packages/hg-test/package.py index 462f1e4c3a..64719eb53c 100644 --- a/var/spack/repos/builtin.mock/packages/hg-test/package.py +++ b/var/spack/repos/builtin.mock/packages/hg-test/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 HgTest(Package): diff --git a/var/spack/repos/builtin.mock/packages/hypre/package.py b/var/spack/repos/builtin.mock/packages/hypre/package.py index f69f16d2cc..3aedea9bf2 100644 --- a/var/spack/repos/builtin.mock/packages/hypre/package.py +++ b/var/spack/repos/builtin.mock/packages/hypre/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/indirect_mpich/package.py b/var/spack/repos/builtin.mock/packages/indirect_mpich/package.py index 0b1773a27b..6ed779889b 100644 --- a/var/spack/repos/builtin.mock/packages/indirect_mpich/package.py +++ b/var/spack/repos/builtin.mock/packages/indirect_mpich/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/libdwarf/package.py b/var/spack/repos/builtin.mock/packages/libdwarf/package.py index e486a5de03..b53e295e23 100644 --- a/var/spack/repos/builtin.mock/packages/libdwarf/package.py +++ b/var/spack/repos/builtin.mock/packages/libdwarf/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * import os diff --git a/var/spack/repos/builtin.mock/packages/libelf/package.py b/var/spack/repos/builtin.mock/packages/libelf/package.py index 5e5b0b7143..f52d8cefe1 100644 --- a/var/spack/repos/builtin.mock/packages/libelf/package.py +++ b/var/spack/repos/builtin.mock/packages/libelf/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/mpich/package.py b/var/spack/repos/builtin.mock/packages/mpich/package.py index 836d9c4a9f..f278f26b8b 100644 --- a/var/spack/repos/builtin.mock/packages/mpich/package.py +++ b/var/spack/repos/builtin.mock/packages/mpich/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/mpich2/package.py b/var/spack/repos/builtin.mock/packages/mpich2/package.py index 90f969b898..e6b68d2490 100644 --- a/var/spack/repos/builtin.mock/packages/mpich2/package.py +++ b/var/spack/repos/builtin.mock/packages/mpich2/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/mpileaks/package.py b/var/spack/repos/builtin.mock/packages/mpileaks/package.py index 9a18c5e1f2..bc26f539ba 100644 --- a/var/spack/repos/builtin.mock/packages/mpileaks/package.py +++ b/var/spack/repos/builtin.mock/packages/mpileaks/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/multimethod/package.py b/var/spack/repos/builtin.mock/packages/multimethod/package.py index ea103fe175..2d15722470 100644 --- a/var/spack/repos/builtin.mock/packages/multimethod/package.py +++ b/var/spack/repos/builtin.mock/packages/multimethod/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/netlib-blas/package.py b/var/spack/repos/builtin.mock/packages/netlib-blas/package.py index 39f2c92ae5..9d567f2e9b 100644 --- a/var/spack/repos/builtin.mock/packages/netlib-blas/package.py +++ b/var/spack/repos/builtin.mock/packages/netlib-blas/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/netlib-lapack/package.py b/var/spack/repos/builtin.mock/packages/netlib-lapack/package.py index 331844e544..46d6ae43dc 100644 --- a/var/spack/repos/builtin.mock/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin.mock/packages/netlib-lapack/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py b/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py index 509bfb71e5..b36237c1e2 100644 --- a/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py +++ b/var/spack/repos/builtin.mock/packages/openblas-with-lapack/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/openblas/package.py b/var/spack/repos/builtin.mock/packages/openblas/package.py index c7771b92a3..5b39447e83 100644 --- a/var/spack/repos/builtin.mock/packages/openblas/package.py +++ b/var/spack/repos/builtin.mock/packages/openblas/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py b/var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py index ef0587588e..f97959c763 100644 --- a/var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py +++ b/var/spack/repos/builtin.mock/packages/optional-dep-test-2/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 OptionalDepTest2(Package): diff --git a/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py b/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py index e6cb3bd6e7..d8fe33c3da 100644 --- a/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py +++ b/var/spack/repos/builtin.mock/packages/optional-dep-test-3/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 OptionalDepTest3(Package): diff --git a/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py b/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py index bb57576ca9..80c1da55f8 100644 --- a/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py +++ b/var/spack/repos/builtin.mock/packages/optional-dep-test/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 OptionalDepTest(Package): diff --git a/var/spack/repos/builtin.mock/packages/python/package.py b/var/spack/repos/builtin.mock/packages/python/package.py index c5fed52f53..dc21b475e5 100644 --- a/var/spack/repos/builtin.mock/packages/python/package.py +++ b/var/spack/repos/builtin.mock/packages/python/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/svn-test/package.py b/var/spack/repos/builtin.mock/packages/svn-test/package.py index ba4d5522b4..2f197593e0 100644 --- a/var/spack/repos/builtin.mock/packages/svn-test/package.py +++ b/var/spack/repos/builtin.mock/packages/svn-test/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 SvnTest(Package): diff --git a/var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py b/var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py index fec5849e67..7c65909ad2 100644 --- a/var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py +++ b/var/spack/repos/builtin.mock/packages/trivial_install_test_package/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin.mock/packages/zmpi/package.py b/var/spack/repos/builtin.mock/packages/zmpi/package.py index 201fac2fbf..fcd3afe93b 100644 --- a/var/spack/repos/builtin.mock/packages/zmpi/package.py +++ b/var/spack/repos/builtin.mock/packages/zmpi/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/ImageMagick/package.py b/var/spack/repos/builtin/packages/ImageMagick/package.py index 3a86d9fb7c..f8173169e1 100644 --- a/var/spack/repos/builtin/packages/ImageMagick/package.py +++ b/var/spack/repos/builtin/packages/ImageMagick/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/LuaJIT/package.py b/var/spack/repos/builtin/packages/LuaJIT/package.py index 7b2a269212..db6f7d3cad 100644 --- a/var/spack/repos/builtin/packages/LuaJIT/package.py +++ b/var/spack/repos/builtin/packages/LuaJIT/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/Mitos/package.py b/var/spack/repos/builtin/packages/Mitos/package.py index ec1d56a5c7..83aca3dc6a 100644 --- a/var/spack/repos/builtin/packages/Mitos/package.py +++ b/var/spack/repos/builtin/packages/Mitos/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 7c4aa3520c..0177fe1a2b 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import functools import glob import inspect diff --git a/var/spack/repos/builtin/packages/SAMRAI/package.py b/var/spack/repos/builtin/packages/SAMRAI/package.py index 2c3b9180af..73c51ced23 100644 --- a/var/spack/repos/builtin/packages/SAMRAI/package.py +++ b/var/spack/repos/builtin/packages/SAMRAI/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Samrai(Package): diff --git a/var/spack/repos/builtin/packages/activeharmony/package.py b/var/spack/repos/builtin/packages/activeharmony/package.py index 45dcc7c0e8..9d15bd71d9 100644 --- a/var/spack/repos/builtin/packages/activeharmony/package.py +++ b/var/spack/repos/builtin/packages/activeharmony/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Activeharmony(Package): diff --git a/var/spack/repos/builtin/packages/adept-utils/package.py b/var/spack/repos/builtin/packages/adept-utils/package.py index fb59576c21..7b6c3702af 100644 --- a/var/spack/repos/builtin/packages/adept-utils/package.py +++ b/var/spack/repos/builtin/packages/adept-utils/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py index 70933542ca..a6052ad7bd 100644 --- a/var/spack/repos/builtin/packages/adol-c/package.py +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import sys diff --git a/var/spack/repos/builtin/packages/allinea-forge/package.py b/var/spack/repos/builtin/packages/allinea-forge/package.py index e5bd62dd70..ac60762cc3 100644 --- a/var/spack/repos/builtin/packages/allinea-forge/package.py +++ b/var/spack/repos/builtin/packages/allinea-forge/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/allinea-reports/package.py b/var/spack/repos/builtin/packages/allinea-reports/package.py index 7b11e681f5..13863c271d 100644 --- a/var/spack/repos/builtin/packages/allinea-reports/package.py +++ b/var/spack/repos/builtin/packages/allinea-reports/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/antlr/package.py b/var/spack/repos/builtin/packages/antlr/package.py index c7c7e3e850..eb67facaf3 100644 --- a/var/spack/repos/builtin/packages/antlr/package.py +++ b/var/spack/repos/builtin/packages/antlr/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Antlr(Package): diff --git a/var/spack/repos/builtin/packages/apex/package.py b/var/spack/repos/builtin/packages/apex/package.py index 8769d97056..20cbd8e8c6 100644 --- a/var/spack/repos/builtin/packages/apex/package.py +++ b/var/spack/repos/builtin/packages/apex/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * from spack.util.environment import * diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py index 8f19c84d22..05dc670aed 100644 --- a/var/spack/repos/builtin/packages/apr-util/package.py +++ b/var/spack/repos/builtin/packages/apr-util/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/apr/package.py b/var/spack/repos/builtin/packages/apr/package.py index 8a440766ec..398e1c323d 100644 --- a/var/spack/repos/builtin/packages/apr/package.py +++ b/var/spack/repos/builtin/packages/apr/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py index 6b152f7863..fcd5171a7d 100644 --- a/var/spack/repos/builtin/packages/arpack-ng/package.py +++ b/var/spack/repos/builtin/packages/arpack-ng/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/arpack/package.py b/var/spack/repos/builtin/packages/arpack/package.py index 8c67c536f3..75158776fe 100644 --- a/var/spack/repos/builtin/packages/arpack/package.py +++ b/var/spack/repos/builtin/packages/arpack/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os import shutil diff --git a/var/spack/repos/builtin/packages/asciidoc/package.py b/var/spack/repos/builtin/packages/asciidoc/package.py index 828f3b3f4f..a846e0ba65 100644 --- a/var/spack/repos/builtin/packages/asciidoc/package.py +++ b/var/spack/repos/builtin/packages/asciidoc/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Asciidoc(Package): diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py index 57083bb947..cd6f1d04f1 100644 --- a/var/spack/repos/builtin/packages/astyle/package.py +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/atk/package.py b/var/spack/repos/builtin/packages/atk/package.py index 769805b227..1d26145fd1 100644 --- a/var/spack/repos/builtin/packages/atk/package.py +++ b/var/spack/repos/builtin/packages/atk/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Atk(Package): diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index b5504122b7..c43d92c34f 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * from spack.util.executable import Executable import os.path diff --git a/var/spack/repos/builtin/packages/atop/package.py b/var/spack/repos/builtin/packages/atop/package.py index 346ab0763c..9cacafc634 100644 --- a/var/spack/repos/builtin/packages/atop/package.py +++ b/var/spack/repos/builtin/packages/atop/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Atop(Package): diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py index b5e29b8a27..d920855a2f 100644 --- a/var/spack/repos/builtin/packages/autoconf/package.py +++ b/var/spack/repos/builtin/packages/autoconf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Autoconf(Package): diff --git a/var/spack/repos/builtin/packages/automaded/package.py b/var/spack/repos/builtin/packages/automaded/package.py index e0bc7efb8b..fc65a04a06 100644 --- a/var/spack/repos/builtin/packages/automaded/package.py +++ b/var/spack/repos/builtin/packages/automaded/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/automake/package.py b/var/spack/repos/builtin/packages/automake/package.py index 2172a42030..331b364496 100644 --- a/var/spack/repos/builtin/packages/automake/package.py +++ b/var/spack/repos/builtin/packages/automake/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Automake(Package): diff --git a/var/spack/repos/builtin/packages/bash/package.py b/var/spack/repos/builtin/packages/bash/package.py index 9c9fbeedcf..5820595be9 100644 --- a/var/spack/repos/builtin/packages/bash/package.py +++ b/var/spack/repos/builtin/packages/bash/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Bash(Package): diff --git a/var/spack/repos/builtin/packages/bbcp/package.py b/var/spack/repos/builtin/packages/bbcp/package.py index e9baa5ccf4..09e897f34e 100644 --- a/var/spack/repos/builtin/packages/bbcp/package.py +++ b/var/spack/repos/builtin/packages/bbcp/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Bbcp(Package): diff --git a/var/spack/repos/builtin/packages/bear/package.py b/var/spack/repos/builtin/packages/bear/package.py index 0d4436fccc..730a684ec5 100644 --- a/var/spack/repos/builtin/packages/bear/package.py +++ b/var/spack/repos/builtin/packages/bear/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Bear(Package): diff --git a/var/spack/repos/builtin/packages/bib2xhtml/package.py b/var/spack/repos/builtin/packages/bib2xhtml/package.py index 7f8e0cfe5a..a9cbd204b6 100644 --- a/var/spack/repos/builtin/packages/bib2xhtml/package.py +++ b/var/spack/repos/builtin/packages/bib2xhtml/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * from glob import glob diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 158d722046..9e4cc98ae6 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Binutils(Package): diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py index 9a2ddcbf96..c5bc051c80 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Bison(Package): diff --git a/var/spack/repos/builtin/packages/blitz/package.py b/var/spack/repos/builtin/packages/blitz/package.py index 9413b276fe..acc6ddcd07 100644 --- a/var/spack/repos/builtin/packages/blitz/package.py +++ b/var/spack/repos/builtin/packages/blitz/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Blitz(Package): diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 12bc9508c3..b1b9c58b32 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import spack import sys diff --git a/var/spack/repos/builtin/packages/bowtie2/package.py b/var/spack/repos/builtin/packages/bowtie2/package.py index 339aab6598..6d641da49b 100644 --- a/var/spack/repos/builtin/packages/bowtie2/package.py +++ b/var/spack/repos/builtin/packages/bowtie2/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * from glob import glob class Bowtie2(Package): diff --git a/var/spack/repos/builtin/packages/boxlib/package.py b/var/spack/repos/builtin/packages/boxlib/package.py index 4f1b71132f..ec7db6c08e 100644 --- a/var/spack/repos/builtin/packages/boxlib/package.py +++ b/var/spack/repos/builtin/packages/boxlib/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Boxlib(Package): diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py index 638ba1fa4d..3b6d1d830e 100644 --- a/var/spack/repos/builtin/packages/bzip2/package.py +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Bzip2(Package): diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py index 8255e869be..5c7c2fae22 100644 --- a/var/spack/repos/builtin/packages/cairo/package.py +++ b/var/spack/repos/builtin/packages/cairo/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Cairo(Package): diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py index d51b4a4dd5..4b8fe0d8af 100644 --- a/var/spack/repos/builtin/packages/caliper/package.py +++ b/var/spack/repos/builtin/packages/caliper/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Caliper(Package): diff --git a/var/spack/repos/builtin/packages/callpath/package.py b/var/spack/repos/builtin/packages/callpath/package.py index 3d2d96249e..2ad2dc60e4 100644 --- a/var/spack/repos/builtin/packages/callpath/package.py +++ b/var/spack/repos/builtin/packages/callpath/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/cblas/package.py b/var/spack/repos/builtin/packages/cblas/package.py index 3cfe5ee588..0b85c5842a 100644 --- a/var/spack/repos/builtin/packages/cblas/package.py +++ b/var/spack/repos/builtin/packages/cblas/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py index 90789a98f2..7ce90ce0db 100644 --- a/var/spack/repos/builtin/packages/cbtf-argonavis/package.py +++ b/var/spack/repos/builtin/packages/cbtf-argonavis/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## ################################################################################ # Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # diff --git a/var/spack/repos/builtin/packages/cbtf-krell/package.py b/var/spack/repos/builtin/packages/cbtf-krell/package.py index e6050cb4a9..7506f78146 100644 --- a/var/spack/repos/builtin/packages/cbtf-krell/package.py +++ b/var/spack/repos/builtin/packages/cbtf-krell/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## ################################################################################ # Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # diff --git a/var/spack/repos/builtin/packages/cbtf-lanl/package.py b/var/spack/repos/builtin/packages/cbtf-lanl/package.py index 5ca88601f3..fa7de3d4a3 100644 --- a/var/spack/repos/builtin/packages/cbtf-lanl/package.py +++ b/var/spack/repos/builtin/packages/cbtf-lanl/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## ################################################################################ # Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # diff --git a/var/spack/repos/builtin/packages/cbtf/package.py b/var/spack/repos/builtin/packages/cbtf/package.py index 7ce1cd382b..2231cf1d45 100644 --- a/var/spack/repos/builtin/packages/cbtf/package.py +++ b/var/spack/repos/builtin/packages/cbtf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## ################################################################################ # Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # diff --git a/var/spack/repos/builtin/packages/cereal/package.py b/var/spack/repos/builtin/packages/cereal/package.py index 6acbf666c8..c53c667efb 100644 --- a/var/spack/repos/builtin/packages/cereal/package.py +++ b/var/spack/repos/builtin/packages/cereal/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os import shutil diff --git a/var/spack/repos/builtin/packages/cfitsio/package.py b/var/spack/repos/builtin/packages/cfitsio/package.py index ff450cb5f3..ed49ae5808 100644 --- a/var/spack/repos/builtin/packages/cfitsio/package.py +++ b/var/spack/repos/builtin/packages/cfitsio/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Cfitsio(Package): diff --git a/var/spack/repos/builtin/packages/cgal/package.py b/var/spack/repos/builtin/packages/cgal/package.py index ef4a2736db..ea1b20e34f 100644 --- a/var/spack/repos/builtin/packages/cgal/package.py +++ b/var/spack/repos/builtin/packages/cgal/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/cgm/package.py b/var/spack/repos/builtin/packages/cgm/package.py index 05d6395c5a..c5da72d25a 100644 --- a/var/spack/repos/builtin/packages/cgm/package.py +++ b/var/spack/repos/builtin/packages/cgm/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Cgm(Package): diff --git a/var/spack/repos/builtin/packages/cityhash/package.py b/var/spack/repos/builtin/packages/cityhash/package.py index 1643cc3b42..caa15780e3 100644 --- a/var/spack/repos/builtin/packages/cityhash/package.py +++ b/var/spack/repos/builtin/packages/cityhash/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * from spack.util.environment import * diff --git a/var/spack/repos/builtin/packages/cleverleaf/package.py b/var/spack/repos/builtin/packages/cleverleaf/package.py index fb400b25c3..6b54d1bf26 100644 --- a/var/spack/repos/builtin/packages/cleverleaf/package.py +++ b/var/spack/repos/builtin/packages/cleverleaf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Cleverleaf(Package): diff --git a/var/spack/repos/builtin/packages/cloog/package.py b/var/spack/repos/builtin/packages/cloog/package.py index 814a33c76c..db3d2ac928 100644 --- a/var/spack/repos/builtin/packages/cloog/package.py +++ b/var/spack/repos/builtin/packages/cloog/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Cloog(Package): diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 2493cf0a13..7b2a125fe5 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/cmocka/package.py b/var/spack/repos/builtin/packages/cmocka/package.py index 7377016a6b..41f80d9761 100644 --- a/var/spack/repos/builtin/packages/cmocka/package.py +++ b/var/spack/repos/builtin/packages/cmocka/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Cmocka(Package): diff --git a/var/spack/repos/builtin/packages/cnmem/package.py b/var/spack/repos/builtin/packages/cnmem/package.py index 0a83e8fc20..f4c05f5b5f 100644 --- a/var/spack/repos/builtin/packages/cnmem/package.py +++ b/var/spack/repos/builtin/packages/cnmem/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Cnmem(Package): diff --git a/var/spack/repos/builtin/packages/coreutils/package.py b/var/spack/repos/builtin/packages/coreutils/package.py index 78c608d8eb..cb8f596b41 100644 --- a/var/spack/repos/builtin/packages/coreutils/package.py +++ b/var/spack/repos/builtin/packages/coreutils/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Coreutils(Package): diff --git a/var/spack/repos/builtin/packages/cppcheck/package.py b/var/spack/repos/builtin/packages/cppcheck/package.py index 8e98f457ee..16f052ef2f 100644 --- a/var/spack/repos/builtin/packages/cppcheck/package.py +++ b/var/spack/repos/builtin/packages/cppcheck/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Cppcheck(Package): diff --git a/var/spack/repos/builtin/packages/cram/package.py b/var/spack/repos/builtin/packages/cram/package.py index b19422b8a8..7e05587087 100644 --- a/var/spack/repos/builtin/packages/cram/package.py +++ b/var/spack/repos/builtin/packages/cram/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Cram(Package): diff --git a/var/spack/repos/builtin/packages/cryptopp/package.py b/var/spack/repos/builtin/packages/cryptopp/package.py index c2778e14da..77895a7331 100644 --- a/var/spack/repos/builtin/packages/cryptopp/package.py +++ b/var/spack/repos/builtin/packages/cryptopp/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import glob from spack import * diff --git a/var/spack/repos/builtin/packages/cscope/package.py b/var/spack/repos/builtin/packages/cscope/package.py index 9aac0f7304..88d522f486 100644 --- a/var/spack/repos/builtin/packages/cscope/package.py +++ b/var/spack/repos/builtin/packages/cscope/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Cscope(Package): diff --git a/var/spack/repos/builtin/packages/cube/package.py b/var/spack/repos/builtin/packages/cube/package.py index 17d388c33d..40c2cc6893 100644 --- a/var/spack/repos/builtin/packages/cube/package.py +++ b/var/spack/repos/builtin/packages/cube/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index ea083d8651..96694670ad 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * from glob import glob import os diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py index ab6305fc08..e3de6ee5a1 100644 --- a/var/spack/repos/builtin/packages/curl/package.py +++ b/var/spack/repos/builtin/packages/curl/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Curl(Package): diff --git a/var/spack/repos/builtin/packages/czmq/package.py b/var/spack/repos/builtin/packages/czmq/package.py index 0665332179..d69f3e5009 100644 --- a/var/spack/repos/builtin/packages/czmq/package.py +++ b/var/spack/repos/builtin/packages/czmq/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/dakota/package.py b/var/spack/repos/builtin/packages/dakota/package.py index 5ec82ef83d..3a8ddf28ef 100644 --- a/var/spack/repos/builtin/packages/dakota/package.py +++ b/var/spack/repos/builtin/packages/dakota/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/damselfly/package.py b/var/spack/repos/builtin/packages/damselfly/package.py index 96666d1abe..42fab63f98 100644 --- a/var/spack/repos/builtin/packages/damselfly/package.py +++ b/var/spack/repos/builtin/packages/damselfly/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Damselfly(Package): diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py index 74ce8ef502..130ba2ea1f 100644 --- a/var/spack/repos/builtin/packages/dbus/package.py +++ b/var/spack/repos/builtin/packages/dbus/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Dbus(Package): diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index df8330384d..49dc971d3a 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import sys diff --git a/var/spack/repos/builtin/packages/dia/package.py b/var/spack/repos/builtin/packages/dia/package.py index 25d5f08205..38742b7e7d 100644 --- a/var/spack/repos/builtin/packages/dia/package.py +++ b/var/spack/repos/builtin/packages/dia/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Dia(Package): diff --git a/var/spack/repos/builtin/packages/docbook-xml/package.py b/var/spack/repos/builtin/packages/docbook-xml/package.py index fce1de7deb..9c22174610 100644 --- a/var/spack/repos/builtin/packages/docbook-xml/package.py +++ b/var/spack/repos/builtin/packages/docbook-xml/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os import glob from spack import * diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index 3a1deba9e1..994a38ca87 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## #------------------------------------------------------------------------------ # Author: Justin Too # Date: September 11, 2015 diff --git a/var/spack/repos/builtin/packages/dri2proto/package.py b/var/spack/repos/builtin/packages/dri2proto/package.py index 11dfa568e2..25ea783c0c 100644 --- a/var/spack/repos/builtin/packages/dri2proto/package.py +++ b/var/spack/repos/builtin/packages/dri2proto/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Dri2proto(Package): diff --git a/var/spack/repos/builtin/packages/dtcmp/package.py b/var/spack/repos/builtin/packages/dtcmp/package.py index 9d940583c1..b50b2ae3ae 100644 --- a/var/spack/repos/builtin/packages/dtcmp/package.py +++ b/var/spack/repos/builtin/packages/dtcmp/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py index b28e897a0f..735936f087 100644 --- a/var/spack/repos/builtin/packages/dyninst/package.py +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py index 6b38ab0261..e20fcffdd7 100644 --- a/var/spack/repos/builtin/packages/eigen/package.py +++ b/var/spack/repos/builtin/packages/eigen/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by David Beckingsale, david@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py index 926d234584..ecb5759ddc 100644 --- a/var/spack/repos/builtin/packages/elfutils/package.py +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Elfutils(Package): diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py index 1d9216fd1a..9367dfdd78 100644 --- a/var/spack/repos/builtin/packages/elk/package.py +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import spack diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py index 2ade5b0b37..ae81422495 100644 --- a/var/spack/repos/builtin/packages/elpa/package.py +++ b/var/spack/repos/builtin/packages/elpa/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py index caa264857e..4b05864a1e 100644 --- a/var/spack/repos/builtin/packages/emacs/package.py +++ b/var/spack/repos/builtin/packages/emacs/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Emacs(Package): diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py index 45181da41b..fe7a5ee4f6 100644 --- a/var/spack/repos/builtin/packages/environment-modules/package.py +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index 0dad57a9f6..ef6a3ccc7b 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/exodusii/package.py b/var/spack/repos/builtin/packages/exodusii/package.py index af258b7e6e..5e9227af46 100644 --- a/var/spack/repos/builtin/packages/exodusii/package.py +++ b/var/spack/repos/builtin/packages/exodusii/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * # TODO: Add support for a C++11 enabled installation that filters out the diff --git a/var/spack/repos/builtin/packages/expat/package.py b/var/spack/repos/builtin/packages/expat/package.py index 3f925c6546..51e827b2c5 100644 --- a/var/spack/repos/builtin/packages/expat/package.py +++ b/var/spack/repos/builtin/packages/expat/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Expat(Package): diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py index 3ad4cbaf86..84c410e4ba 100644 --- a/var/spack/repos/builtin/packages/extrae/package.py +++ b/var/spack/repos/builtin/packages/extrae/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * # typical working line with extrae 3.0.1 diff --git a/var/spack/repos/builtin/packages/exuberant-ctags/package.py b/var/spack/repos/builtin/packages/exuberant-ctags/package.py index efd2b541b2..c49d0624f6 100644 --- a/var/spack/repos/builtin/packages/exuberant-ctags/package.py +++ b/var/spack/repos/builtin/packages/exuberant-ctags/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 ExuberantCtags(Package): diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index 4ffc787594..434aeea616 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## diff --git a/var/spack/repos/builtin/packages/fish/package.py b/var/spack/repos/builtin/packages/fish/package.py index b5a4a2d209..9d23a3d63d 100644 --- a/var/spack/repos/builtin/packages/fish/package.py +++ b/var/spack/repos/builtin/packages/fish/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Fish(Package): diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index e4795893e0..926651010f 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Flex(Package): diff --git a/var/spack/repos/builtin/packages/fltk/package.py b/var/spack/repos/builtin/packages/fltk/package.py index 0b462f83f8..f8ac5bc2a4 100644 --- a/var/spack/repos/builtin/packages/fltk/package.py +++ b/var/spack/repos/builtin/packages/fltk/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/flux/package.py b/var/spack/repos/builtin/packages/flux/package.py index dc4e0594c5..2b972d63ae 100644 --- a/var/spack/repos/builtin/packages/flux/package.py +++ b/var/spack/repos/builtin/packages/flux/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/fontconfig/package.py b/var/spack/repos/builtin/packages/fontconfig/package.py index 517c9d1813..76e9d8cb3f 100644 --- a/var/spack/repos/builtin/packages/fontconfig/package.py +++ b/var/spack/repos/builtin/packages/fontconfig/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Fontconfig(Package): diff --git a/var/spack/repos/builtin/packages/freetype/package.py b/var/spack/repos/builtin/packages/freetype/package.py index 0309b858a1..897c011396 100644 --- a/var/spack/repos/builtin/packages/freetype/package.py +++ b/var/spack/repos/builtin/packages/freetype/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Freetype(Package): diff --git a/var/spack/repos/builtin/packages/gasnet/package.py b/var/spack/repos/builtin/packages/gasnet/package.py index 705961d1de..b3bd6c25f2 100644 --- a/var/spack/repos/builtin/packages/gasnet/package.py +++ b/var/spack/repos/builtin/packages/gasnet/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Gasnet(Package): diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 8f90757232..47dbeb2a99 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py index 4f1f1ec2dd..caff06bdd6 100644 --- a/var/spack/repos/builtin/packages/gdal/package.py +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Gdal(Package): diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py index 0e9e8fc099..58d8a545db 100644 --- a/var/spack/repos/builtin/packages/gdb/package.py +++ b/var/spack/repos/builtin/packages/gdb/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://software.llnl.gov/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py index 14a5569984..daf43f3256 100644 --- a/var/spack/repos/builtin/packages/gdk-pixbuf/package.py +++ b/var/spack/repos/builtin/packages/gdk-pixbuf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 GdkPixbuf(Package): diff --git a/var/spack/repos/builtin/packages/geos/package.py b/var/spack/repos/builtin/packages/geos/package.py index 030703f286..88438b0a99 100644 --- a/var/spack/repos/builtin/packages/geos/package.py +++ b/var/spack/repos/builtin/packages/geos/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/gettext/package.py b/var/spack/repos/builtin/packages/gettext/package.py index 05712d7392..df301aea3c 100644 --- a/var/spack/repos/builtin/packages/gettext/package.py +++ b/var/spack/repos/builtin/packages/gettext/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Gettext(Package): diff --git a/var/spack/repos/builtin/packages/gflags/package.py b/var/spack/repos/builtin/packages/gflags/package.py index 62dd80a094..9f3552d53d 100644 --- a/var/spack/repos/builtin/packages/gflags/package.py +++ b/var/spack/repos/builtin/packages/gflags/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py index 0ab49d425f..ba787f858f 100644 --- a/var/spack/repos/builtin/packages/ghostscript/package.py +++ b/var/spack/repos/builtin/packages/ghostscript/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Ghostscript(Package): diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 77521fd658..03e7d3e031 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Git(Package): diff --git a/var/spack/repos/builtin/packages/gl2ps/package.py b/var/spack/repos/builtin/packages/gl2ps/package.py index cb376b3f03..25172bd544 100644 --- a/var/spack/repos/builtin/packages/gl2ps/package.py +++ b/var/spack/repos/builtin/packages/gl2ps/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Gl2ps(Package): diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index a3fc3f79eb..b146ea63d8 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import sys diff --git a/var/spack/repos/builtin/packages/glm/package.py b/var/spack/repos/builtin/packages/glm/package.py index ecae89f1e8..0c9212f17d 100644 --- a/var/spack/repos/builtin/packages/glm/package.py +++ b/var/spack/repos/builtin/packages/glm/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/global/package.py b/var/spack/repos/builtin/packages/global/package.py index aac1cede30..c144d6660b 100644 --- a/var/spack/repos/builtin/packages/global/package.py +++ b/var/spack/repos/builtin/packages/global/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/glog/package.py b/var/spack/repos/builtin/packages/glog/package.py index d73386b394..03ee092429 100644 --- a/var/spack/repos/builtin/packages/glog/package.py +++ b/var/spack/repos/builtin/packages/glog/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/glpk/package.py b/var/spack/repos/builtin/packages/glpk/package.py index 855f459fb3..2ab3c38150 100644 --- a/var/spack/repos/builtin/packages/glpk/package.py +++ b/var/spack/repos/builtin/packages/glpk/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/gmp/package.py b/var/spack/repos/builtin/packages/gmp/package.py index 85e9c237d6..3933788425 100644 --- a/var/spack/repos/builtin/packages/gmp/package.py +++ b/var/spack/repos/builtin/packages/gmp/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py index 5f659c56df..e425d460c2 100644 --- a/var/spack/repos/builtin/packages/gmsh/package.py +++ b/var/spack/repos/builtin/packages/gmsh/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/gnuplot/package.py b/var/spack/repos/builtin/packages/gnuplot/package.py index 71c09bd43d..a76677e066 100644 --- a/var/spack/repos/builtin/packages/gnuplot/package.py +++ b/var/spack/repos/builtin/packages/gnuplot/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/gnutls/package.py b/var/spack/repos/builtin/packages/gnutls/package.py index cf57a24a6d..71b571bc88 100644 --- a/var/spack/repos/builtin/packages/gnutls/package.py +++ b/var/spack/repos/builtin/packages/gnutls/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Gnutls(Package): diff --git a/var/spack/repos/builtin/packages/googletest/package.py b/var/spack/repos/builtin/packages/googletest/package.py index 663b758747..9444253c8c 100644 --- a/var/spack/repos/builtin/packages/googletest/package.py +++ b/var/spack/repos/builtin/packages/googletest/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Googletest(Package): diff --git a/var/spack/repos/builtin/packages/gperf/package.py b/var/spack/repos/builtin/packages/gperf/package.py index 32551b67b4..af176afcf6 100644 --- a/var/spack/repos/builtin/packages/gperf/package.py +++ b/var/spack/repos/builtin/packages/gperf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Gperf(Package): diff --git a/var/spack/repos/builtin/packages/gperftools/package.py b/var/spack/repos/builtin/packages/gperftools/package.py index 22b2e6c424..1f17ab71a4 100644 --- a/var/spack/repos/builtin/packages/gperftools/package.py +++ b/var/spack/repos/builtin/packages/gperftools/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/graphlib/package.py b/var/spack/repos/builtin/packages/graphlib/package.py index ddac0b2b66..f70f32cc8a 100644 --- a/var/spack/repos/builtin/packages/graphlib/package.py +++ b/var/spack/repos/builtin/packages/graphlib/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Graphlib(Package): diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index ecf92620d4..203e7b7f3c 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Graphviz(Package): diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 5fe8399308..1a50a42488 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/gsl/package.py b/var/spack/repos/builtin/packages/gsl/package.py index 789eb49d85..c1695a6f02 100644 --- a/var/spack/repos/builtin/packages/gsl/package.py +++ b/var/spack/repos/builtin/packages/gsl/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/gtkplus/package.py b/var/spack/repos/builtin/packages/gtkplus/package.py index 0ebc7100de..c135e89f78 100644 --- a/var/spack/repos/builtin/packages/gtkplus/package.py +++ b/var/spack/repos/builtin/packages/gtkplus/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Gtkplus(Package): diff --git a/var/spack/repos/builtin/packages/harfbuzz/package.py b/var/spack/repos/builtin/packages/harfbuzz/package.py index ed7c42a909..e4c1b80de3 100644 --- a/var/spack/repos/builtin/packages/harfbuzz/package.py +++ b/var/spack/repos/builtin/packages/harfbuzz/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Harfbuzz(Package): diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py index ac6435f2a2..7ad4df2fde 100644 --- a/var/spack/repos/builtin/packages/hdf/package.py +++ b/var/spack/repos/builtin/packages/hdf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Hdf(Package): diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index cae46d3301..21137ef356 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/hoomd-blue/package.py b/var/spack/repos/builtin/packages/hoomd-blue/package.py index d310b7687a..90d5107e3b 100644 --- a/var/spack/repos/builtin/packages/hoomd-blue/package.py +++ b/var/spack/repos/builtin/packages/hoomd-blue/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/hpx5/package.py b/var/spack/repos/builtin/packages/hpx5/package.py index 3dae3c4170..cd0c0b7a7b 100644 --- a/var/spack/repos/builtin/packages/hpx5/package.py +++ b/var/spack/repos/builtin/packages/hpx5/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index a461a7482c..ee0168c38e 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Hwloc(Package): diff --git a/var/spack/repos/builtin/packages/hydra/package.py b/var/spack/repos/builtin/packages/hydra/package.py index c1b8868276..3d56056022 100644 --- a/var/spack/repos/builtin/packages/hydra/package.py +++ b/var/spack/repos/builtin/packages/hydra/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Hydra(Package): diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 4b915daa68..f87dae9f4e 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os, sys diff --git a/var/spack/repos/builtin/packages/icu/package.py b/var/spack/repos/builtin/packages/icu/package.py index f256ec5712..c7cabb5d95 100644 --- a/var/spack/repos/builtin/packages/icu/package.py +++ b/var/spack/repos/builtin/packages/icu/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Icu(Package): diff --git a/var/spack/repos/builtin/packages/icu4c/package.py b/var/spack/repos/builtin/packages/icu4c/package.py index 55b44463b2..6cfec99c3f 100644 --- a/var/spack/repos/builtin/packages/icu4c/package.py +++ b/var/spack/repos/builtin/packages/icu4c/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Icu4c(Package): diff --git a/var/spack/repos/builtin/packages/intltool/package.py b/var/spack/repos/builtin/packages/intltool/package.py index 9b3c095378..48830c474a 100644 --- a/var/spack/repos/builtin/packages/intltool/package.py +++ b/var/spack/repos/builtin/packages/intltool/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Intltool(Package): diff --git a/var/spack/repos/builtin/packages/ior/package.py b/var/spack/repos/builtin/packages/ior/package.py index c46650a674..6aa72e5cc9 100644 --- a/var/spack/repos/builtin/packages/ior/package.py +++ b/var/spack/repos/builtin/packages/ior/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py index 13c37bf79c..47c5ca0c09 100644 --- a/var/spack/repos/builtin/packages/ipopt/package.py +++ b/var/spack/repos/builtin/packages/ipopt/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Ipopt(Package): diff --git a/var/spack/repos/builtin/packages/isl/package.py b/var/spack/repos/builtin/packages/isl/package.py index 836ef3ea40..f456f62225 100644 --- a/var/spack/repos/builtin/packages/isl/package.py +++ b/var/spack/repos/builtin/packages/isl/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Isl(Package): diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py index cbcc53ac0a..2ec86f05e3 100644 --- a/var/spack/repos/builtin/packages/jdk/package.py +++ b/var/spack/repos/builtin/packages/jdk/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## #------------------------------------------------------------------------------ # Author: Justin Too #------------------------------------------------------------------------------ diff --git a/var/spack/repos/builtin/packages/jemalloc/package.py b/var/spack/repos/builtin/packages/jemalloc/package.py index 9cb0fd1f40..a67754a513 100644 --- a/var/spack/repos/builtin/packages/jemalloc/package.py +++ b/var/spack/repos/builtin/packages/jemalloc/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Jemalloc(Package): diff --git a/var/spack/repos/builtin/packages/jpeg/package.py b/var/spack/repos/builtin/packages/jpeg/package.py index 2f15e59ad4..e4a9d8535b 100644 --- a/var/spack/repos/builtin/packages/jpeg/package.py +++ b/var/spack/repos/builtin/packages/jpeg/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Jpeg(Package): diff --git a/var/spack/repos/builtin/packages/judy/package.py b/var/spack/repos/builtin/packages/judy/package.py index b8d8701383..8d47767ef0 100644 --- a/var/spack/repos/builtin/packages/judy/package.py +++ b/var/spack/repos/builtin/packages/judy/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Judy(Package): diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 25d782266b..69b52130e9 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/kealib/package.py b/var/spack/repos/builtin/packages/kealib/package.py index 475d21e1d8..7c73c4518b 100644 --- a/var/spack/repos/builtin/packages/kealib/package.py +++ b/var/spack/repos/builtin/packages/kealib/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Kealib(Package): diff --git a/var/spack/repos/builtin/packages/kripke/package.py b/var/spack/repos/builtin/packages/kripke/package.py index 7d067ea44d..d405e9a51d 100644 --- a/var/spack/repos/builtin/packages/kripke/package.py +++ b/var/spack/repos/builtin/packages/kripke/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Kripke(Package): diff --git a/var/spack/repos/builtin/packages/launchmon/package.py b/var/spack/repos/builtin/packages/launchmon/package.py index aec2fd6fa7..f38bc38202 100644 --- a/var/spack/repos/builtin/packages/launchmon/package.py +++ b/var/spack/repos/builtin/packages/launchmon/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2014, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/lcms/package.py b/var/spack/repos/builtin/packages/lcms/package.py index a53c2f997a..434d8e6c98 100644 --- a/var/spack/repos/builtin/packages/lcms/package.py +++ b/var/spack/repos/builtin/packages/lcms/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Lcms(Package): diff --git a/var/spack/repos/builtin/packages/leveldb/package.py b/var/spack/repos/builtin/packages/leveldb/package.py index da68a9cbcb..408f1d31c1 100644 --- a/var/spack/repos/builtin/packages/leveldb/package.py +++ b/var/spack/repos/builtin/packages/leveldb/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os import glob from spack import * diff --git a/var/spack/repos/builtin/packages/libNBC/package.py b/var/spack/repos/builtin/packages/libNBC/package.py index 550568e97d..ed1d0ce96f 100644 --- a/var/spack/repos/builtin/packages/libNBC/package.py +++ b/var/spack/repos/builtin/packages/libNBC/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/libarchive/package.py b/var/spack/repos/builtin/packages/libarchive/package.py index cbd4b89cd0..f11d732afa 100644 --- a/var/spack/repos/builtin/packages/libarchive/package.py +++ b/var/spack/repos/builtin/packages/libarchive/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libarchive(Package): diff --git a/var/spack/repos/builtin/packages/libcerf/package.py b/var/spack/repos/builtin/packages/libcerf/package.py index 15e87ce4fe..b30d76f4e9 100644 --- a/var/spack/repos/builtin/packages/libcerf/package.py +++ b/var/spack/repos/builtin/packages/libcerf/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/libcircle/package.py b/var/spack/repos/builtin/packages/libcircle/package.py index 3f7c996fb0..75fdb96125 100644 --- a/var/spack/repos/builtin/packages/libcircle/package.py +++ b/var/spack/repos/builtin/packages/libcircle/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/libdrm/package.py b/var/spack/repos/builtin/packages/libdrm/package.py index d5d779f796..b05412e588 100644 --- a/var/spack/repos/builtin/packages/libdrm/package.py +++ b/var/spack/repos/builtin/packages/libdrm/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libdrm(Package): diff --git a/var/spack/repos/builtin/packages/libdwarf/package.py b/var/spack/repos/builtin/packages/libdwarf/package.py index addb557519..3f5a72116e 100644 --- a/var/spack/repos/builtin/packages/libdwarf/package.py +++ b/var/spack/repos/builtin/packages/libdwarf/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * import os diff --git a/var/spack/repos/builtin/packages/libedit/package.py b/var/spack/repos/builtin/packages/libedit/package.py index faed8bad37..4366344679 100644 --- a/var/spack/repos/builtin/packages/libedit/package.py +++ b/var/spack/repos/builtin/packages/libedit/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libedit(Package): diff --git a/var/spack/repos/builtin/packages/libelf/package.py b/var/spack/repos/builtin/packages/libelf/package.py index 29bc21b65c..1e1deea818 100644 --- a/var/spack/repos/builtin/packages/libelf/package.py +++ b/var/spack/repos/builtin/packages/libelf/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/libevent/package.py b/var/spack/repos/builtin/packages/libevent/package.py index 714a155dc0..3ae427a2eb 100644 --- a/var/spack/repos/builtin/packages/libevent/package.py +++ b/var/spack/repos/builtin/packages/libevent/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libevent(Package): diff --git a/var/spack/repos/builtin/packages/libffi/package.py b/var/spack/repos/builtin/packages/libffi/package.py index acec031717..1d3c85c8e0 100644 --- a/var/spack/repos/builtin/packages/libffi/package.py +++ b/var/spack/repos/builtin/packages/libffi/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libffi(Package): diff --git a/var/spack/repos/builtin/packages/libgcrypt/package.py b/var/spack/repos/builtin/packages/libgcrypt/package.py index 1d0a57f317..b1a316cc1b 100644 --- a/var/spack/repos/builtin/packages/libgcrypt/package.py +++ b/var/spack/repos/builtin/packages/libgcrypt/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libgcrypt(Package): diff --git a/var/spack/repos/builtin/packages/libgd/package.py b/var/spack/repos/builtin/packages/libgd/package.py index d920957ef1..5e4e420842 100644 --- a/var/spack/repos/builtin/packages/libgd/package.py +++ b/var/spack/repos/builtin/packages/libgd/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/libgpg-error/package.py b/var/spack/repos/builtin/packages/libgpg-error/package.py index dd5fc2408a..3fe82a69e7 100644 --- a/var/spack/repos/builtin/packages/libgpg-error/package.py +++ b/var/spack/repos/builtin/packages/libgpg-error/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 LibgpgError(Package): diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py index 07ee183947..8615b2ed83 100644 --- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py +++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 LibjpegTurbo(Package): diff --git a/var/spack/repos/builtin/packages/libjson-c/package.py b/var/spack/repos/builtin/packages/libjson-c/package.py index c0801cce9c..75f3e130ad 100644 --- a/var/spack/repos/builtin/packages/libjson-c/package.py +++ b/var/spack/repos/builtin/packages/libjson-c/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 LibjsonC(Package): diff --git a/var/spack/repos/builtin/packages/libmng/package.py b/var/spack/repos/builtin/packages/libmng/package.py index e5336ea2c2..dd0903c4bd 100644 --- a/var/spack/repos/builtin/packages/libmng/package.py +++ b/var/spack/repos/builtin/packages/libmng/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libmng(Package): diff --git a/var/spack/repos/builtin/packages/libmonitor/package.py b/var/spack/repos/builtin/packages/libmonitor/package.py index eecf1963e3..883d8af405 100644 --- a/var/spack/repos/builtin/packages/libmonitor/package.py +++ b/var/spack/repos/builtin/packages/libmonitor/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/libpciaccess/package.py b/var/spack/repos/builtin/packages/libpciaccess/package.py index 0c0847d323..5d1e93eab7 100644 --- a/var/spack/repos/builtin/packages/libpciaccess/package.py +++ b/var/spack/repos/builtin/packages/libpciaccess/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os.path diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py index 9d5782896e..951b91eabd 100644 --- a/var/spack/repos/builtin/packages/libpng/package.py +++ b/var/spack/repos/builtin/packages/libpng/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libpng(Package): diff --git a/var/spack/repos/builtin/packages/libsigsegv/package.py b/var/spack/repos/builtin/packages/libsigsegv/package.py index 4b486198ec..14acdcbcd2 100644 --- a/var/spack/repos/builtin/packages/libsigsegv/package.py +++ b/var/spack/repos/builtin/packages/libsigsegv/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libsigsegv(Package): diff --git a/var/spack/repos/builtin/packages/libsodium/package.py b/var/spack/repos/builtin/packages/libsodium/package.py index 1c8a16d998..831a75e659 100644 --- a/var/spack/repos/builtin/packages/libsodium/package.py +++ b/var/spack/repos/builtin/packages/libsodium/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libsodium(Package): diff --git a/var/spack/repos/builtin/packages/libtermkey/package.py b/var/spack/repos/builtin/packages/libtermkey/package.py index 7f25edaf76..c7db959a40 100644 --- a/var/spack/repos/builtin/packages/libtermkey/package.py +++ b/var/spack/repos/builtin/packages/libtermkey/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libtermkey(Package): diff --git a/var/spack/repos/builtin/packages/libtiff/package.py b/var/spack/repos/builtin/packages/libtiff/package.py index 63c6704cb8..4b03e7997b 100644 --- a/var/spack/repos/builtin/packages/libtiff/package.py +++ b/var/spack/repos/builtin/packages/libtiff/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libtiff(Package): diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index c804f5ab5d..90e7b3b643 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libtool(Package): diff --git a/var/spack/repos/builtin/packages/libunwind/package.py b/var/spack/repos/builtin/packages/libunwind/package.py index 6f162f7b08..980b765c02 100644 --- a/var/spack/repos/builtin/packages/libunwind/package.py +++ b/var/spack/repos/builtin/packages/libunwind/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/libuuid/package.py b/var/spack/repos/builtin/packages/libuuid/package.py index 373c5bfcac..0dd32ec77d 100644 --- a/var/spack/repos/builtin/packages/libuuid/package.py +++ b/var/spack/repos/builtin/packages/libuuid/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libuuid(Package): diff --git a/var/spack/repos/builtin/packages/libuv/package.py b/var/spack/repos/builtin/packages/libuv/package.py index eace94d1a6..63565c7aea 100644 --- a/var/spack/repos/builtin/packages/libuv/package.py +++ b/var/spack/repos/builtin/packages/libuv/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libuv(Package): diff --git a/var/spack/repos/builtin/packages/libvterm/package.py b/var/spack/repos/builtin/packages/libvterm/package.py index 3212f6550d..e57af273ad 100644 --- a/var/spack/repos/builtin/packages/libvterm/package.py +++ b/var/spack/repos/builtin/packages/libvterm/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libvterm(Package): diff --git a/var/spack/repos/builtin/packages/libxc/package.py b/var/spack/repos/builtin/packages/libxc/package.py index 010a5918c5..87437373d6 100644 --- a/var/spack/repos/builtin/packages/libxc/package.py +++ b/var/spack/repos/builtin/packages/libxc/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libxc(Package): diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index b2543be5da..0f39bb0f1d 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libxcb(Package): diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py index 134e596963..baaa2fc83d 100644 --- a/var/spack/repos/builtin/packages/libxml2/package.py +++ b/var/spack/repos/builtin/packages/libxml2/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/libxshmfence/package.py b/var/spack/repos/builtin/packages/libxshmfence/package.py index 3aa2448b46..6d63ea6426 100644 --- a/var/spack/repos/builtin/packages/libxshmfence/package.py +++ b/var/spack/repos/builtin/packages/libxshmfence/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libxshmfence(Package): diff --git a/var/spack/repos/builtin/packages/libxslt/package.py b/var/spack/repos/builtin/packages/libxslt/package.py index f97332d020..c6c439ad09 100644 --- a/var/spack/repos/builtin/packages/libxslt/package.py +++ b/var/spack/repos/builtin/packages/libxslt/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Libxslt(Package): diff --git a/var/spack/repos/builtin/packages/llvm-lld/package.py b/var/spack/repos/builtin/packages/llvm-lld/package.py index cb91aa22a5..073c2d1b9e 100644 --- a/var/spack/repos/builtin/packages/llvm-lld/package.py +++ b/var/spack/repos/builtin/packages/llvm-lld/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 1d25d59e50..c090c131c6 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2016, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by David Beckingsale, david@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * import os, shutil diff --git a/var/spack/repos/builtin/packages/lmdb/package.py b/var/spack/repos/builtin/packages/lmdb/package.py index 875b8100c5..79c020b2df 100644 --- a/var/spack/repos/builtin/packages/lmdb/package.py +++ b/var/spack/repos/builtin/packages/lmdb/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py index d642594f92..0a8b9b4577 100644 --- a/var/spack/repos/builtin/packages/lmod/package.py +++ b/var/spack/repos/builtin/packages/lmod/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index ca8cfc5365..9a73a22645 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/lwgrp/package.py b/var/spack/repos/builtin/packages/lwgrp/package.py index 5963382b92..471098c873 100644 --- a/var/spack/repos/builtin/packages/lwgrp/package.py +++ b/var/spack/repos/builtin/packages/lwgrp/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/lwm2/package.py b/var/spack/repos/builtin/packages/lwm2/package.py index 31afff8816..340474b47e 100644 --- a/var/spack/repos/builtin/packages/lwm2/package.py +++ b/var/spack/repos/builtin/packages/lwm2/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Lwm2(Package): diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py index a4b9dcb623..dcb306dcd3 100644 --- a/var/spack/repos/builtin/packages/m4/package.py +++ b/var/spack/repos/builtin/packages/m4/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 M4(Package): diff --git a/var/spack/repos/builtin/packages/matio/package.py b/var/spack/repos/builtin/packages/matio/package.py index 12cfb80926..c141f7e8af 100644 --- a/var/spack/repos/builtin/packages/matio/package.py +++ b/var/spack/repos/builtin/packages/matio/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/mbedtls/package.py b/var/spack/repos/builtin/packages/mbedtls/package.py index 3da00cf417..ae34d25691 100644 --- a/var/spack/repos/builtin/packages/mbedtls/package.py +++ b/var/spack/repos/builtin/packages/mbedtls/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Mbedtls(Package): diff --git a/var/spack/repos/builtin/packages/memaxes/package.py b/var/spack/repos/builtin/packages/memaxes/package.py index 4b1da558a2..135384e2f7 100644 --- a/var/spack/repos/builtin/packages/memaxes/package.py +++ b/var/spack/repos/builtin/packages/memaxes/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Memaxes(Package): diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py index 62da8c993b..bd9c9eec4a 100644 --- a/var/spack/repos/builtin/packages/mesa/package.py +++ b/var/spack/repos/builtin/packages/mesa/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Mesa(Package): diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index b05f23a3dc..061179b78e 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index 510e09c4e1..504efb5e35 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import glob, string diff --git a/var/spack/repos/builtin/packages/moab/package.py b/var/spack/repos/builtin/packages/moab/package.py index 5fa9e8e746..893a543e97 100644 --- a/var/spack/repos/builtin/packages/moab/package.py +++ b/var/spack/repos/builtin/packages/moab/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/mpc/package.py b/var/spack/repos/builtin/packages/mpc/package.py index 108fec678f..92eb976f8b 100644 --- a/var/spack/repos/builtin/packages/mpc/package.py +++ b/var/spack/repos/builtin/packages/mpc/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/mpe2/package.py b/var/spack/repos/builtin/packages/mpe2/package.py index 27295172cc..f69ea2d65b 100644 --- a/var/spack/repos/builtin/packages/mpe2/package.py +++ b/var/spack/repos/builtin/packages/mpe2/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Mpe2(Package): diff --git a/var/spack/repos/builtin/packages/mpfr/package.py b/var/spack/repos/builtin/packages/mpfr/package.py index 7e6e7d5bb6..ed3926a8ab 100644 --- a/var/spack/repos/builtin/packages/mpfr/package.py +++ b/var/spack/repos/builtin/packages/mpfr/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/mpibash/package.py b/var/spack/repos/builtin/packages/mpibash/package.py index d0f6dafed6..b328b98ecf 100644 --- a/var/spack/repos/builtin/packages/mpibash/package.py +++ b/var/spack/repos/builtin/packages/mpibash/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 2179086fe5..164d9db541 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * import os diff --git a/var/spack/repos/builtin/packages/mpileaks/package.py b/var/spack/repos/builtin/packages/mpileaks/package.py index 661d9d66bf..51bc66a0eb 100644 --- a/var/spack/repos/builtin/packages/mpileaks/package.py +++ b/var/spack/repos/builtin/packages/mpileaks/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/mrnet/package.py b/var/spack/repos/builtin/packages/mrnet/package.py index b52233be4a..3380c7f823 100644 --- a/var/spack/repos/builtin/packages/mrnet/package.py +++ b/var/spack/repos/builtin/packages/mrnet/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Mrnet(Package): diff --git a/var/spack/repos/builtin/packages/msgpack-c/package.py b/var/spack/repos/builtin/packages/msgpack-c/package.py index a363bc89be..925dceabed 100644 --- a/var/spack/repos/builtin/packages/msgpack-c/package.py +++ b/var/spack/repos/builtin/packages/msgpack-c/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 MsgpackC(Package): diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 58f790ec32..92c45c9b95 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os, sys, glob diff --git a/var/spack/repos/builtin/packages/munge/package.py b/var/spack/repos/builtin/packages/munge/package.py index c737ca0354..ebe3e18882 100644 --- a/var/spack/repos/builtin/packages/munge/package.py +++ b/var/spack/repos/builtin/packages/munge/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/muparser/package.py b/var/spack/repos/builtin/packages/muparser/package.py index 19ca8ce287..47d1855329 100644 --- a/var/spack/repos/builtin/packages/muparser/package.py +++ b/var/spack/repos/builtin/packages/muparser/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Muparser(Package): diff --git a/var/spack/repos/builtin/packages/muster/package.py b/var/spack/repos/builtin/packages/muster/package.py index 0dc2e5e086..993f147245 100644 --- a/var/spack/repos/builtin/packages/muster/package.py +++ b/var/spack/repos/builtin/packages/muster/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Muster(Package): diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index c68a04d251..f4997bdfa1 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/nag/package.py b/var/spack/repos/builtin/packages/nag/package.py index af893d3db0..63269a50b1 100644 --- a/var/spack/repos/builtin/packages/nag/package.py +++ b/var/spack/repos/builtin/packages/nag/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/nasm/package.py b/var/spack/repos/builtin/packages/nasm/package.py index 933b6a62c5..c955e6d13e 100644 --- a/var/spack/repos/builtin/packages/nasm/package.py +++ b/var/spack/repos/builtin/packages/nasm/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Nasm(Package): diff --git a/var/spack/repos/builtin/packages/nccmp/package.py b/var/spack/repos/builtin/packages/nccmp/package.py index 72e86831c6..68bddd6957 100644 --- a/var/spack/repos/builtin/packages/nccmp/package.py +++ b/var/spack/repos/builtin/packages/nccmp/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Nccmp(Package): diff --git a/var/spack/repos/builtin/packages/ncdu/package.py b/var/spack/repos/builtin/packages/ncdu/package.py index 234f9730d6..0f2f9cda45 100644 --- a/var/spack/repos/builtin/packages/ncdu/package.py +++ b/var/spack/repos/builtin/packages/ncdu/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Ncdu(Package): diff --git a/var/spack/repos/builtin/packages/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py index 3a9aeaa656..4bc4da68e3 100644 --- a/var/spack/repos/builtin/packages/nco/package.py +++ b/var/spack/repos/builtin/packages/nco/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py index 219fbce226..3ab2b0477d 100644 --- a/var/spack/repos/builtin/packages/ncurses/package.py +++ b/var/spack/repos/builtin/packages/ncurses/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Ncurses(Package): diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py index 1aa13e3f03..b39e17ca49 100644 --- a/var/spack/repos/builtin/packages/ncview/package.py +++ b/var/spack/repos/builtin/packages/ncview/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Ncview(Package): diff --git a/var/spack/repos/builtin/packages/ndiff/package.py b/var/spack/repos/builtin/packages/ndiff/package.py index 10e445c81e..3c9dd4054a 100644 --- a/var/spack/repos/builtin/packages/ndiff/package.py +++ b/var/spack/repos/builtin/packages/ndiff/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Ndiff(Package): diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py index 8aa1d8b236..994c51c0da 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 NetcdfCxx(Package): diff --git a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py index b83e964b00..b67ea299a8 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 NetcdfCxx4(Package): diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/package.py b/var/spack/repos/builtin/packages/netcdf-fortran/package.py index e4e33445e5..3d1951ceee 100644 --- a/var/spack/repos/builtin/packages/netcdf-fortran/package.py +++ b/var/spack/repos/builtin/packages/netcdf-fortran/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 NetcdfFortran(Package): diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index 4aad0f6f3c..c2256d5e9f 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/netgauge/package.py b/var/spack/repos/builtin/packages/netgauge/package.py index 0ea42175c6..be9292fabb 100644 --- a/var/spack/repos/builtin/packages/netgauge/package.py +++ b/var/spack/repos/builtin/packages/netgauge/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index f70e634347..47857eb713 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index 276876d197..f7fe26a42d 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import sys diff --git a/var/spack/repos/builtin/packages/nettle/package.py b/var/spack/repos/builtin/packages/nettle/package.py index cd600b0b87..56e4836611 100644 --- a/var/spack/repos/builtin/packages/nettle/package.py +++ b/var/spack/repos/builtin/packages/nettle/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Nettle(Package): diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py index 0722dd49a6..e3f3819289 100644 --- a/var/spack/repos/builtin/packages/ninja/package.py +++ b/var/spack/repos/builtin/packages/ninja/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py index e72c60fadb..e15d60cb0b 100644 --- a/var/spack/repos/builtin/packages/numdiff/package.py +++ b/var/spack/repos/builtin/packages/numdiff/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * import sys diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py index 3fe6638e66..0f0fcfb733 100644 --- a/var/spack/repos/builtin/packages/oce/package.py +++ b/var/spack/repos/builtin/packages/oce/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import platform, sys diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py index 6e99c23652..17c7ff82f4 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Octave(Package): diff --git a/var/spack/repos/builtin/packages/ompss/package.py b/var/spack/repos/builtin/packages/ompss/package.py index e09e0a624f..c0848ffd70 100644 --- a/var/spack/repos/builtin/packages/ompss/package.py +++ b/var/spack/repos/builtin/packages/ompss/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os import glob diff --git a/var/spack/repos/builtin/packages/ompt-openmp/package.py b/var/spack/repos/builtin/packages/ompt-openmp/package.py index e5bcfb51f0..e74dcf6c23 100644 --- a/var/spack/repos/builtin/packages/ompt-openmp/package.py +++ b/var/spack/repos/builtin/packages/ompt-openmp/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 OmptOpenmp(Package): diff --git a/var/spack/repos/builtin/packages/opari2/package.py b/var/spack/repos/builtin/packages/opari2/package.py index c68978f5c0..510fff9fc2 100644 --- a/var/spack/repos/builtin/packages/opari2/package.py +++ b/var/spack/repos/builtin/packages/opari2/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index cd8e3755ce..ebfec4bded 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * from spack.package_test import * import os diff --git a/var/spack/repos/builtin/packages/opencv/package.py b/var/spack/repos/builtin/packages/opencv/package.py index 99b555323f..989c66316c 100644 --- a/var/spack/repos/builtin/packages/opencv/package.py +++ b/var/spack/repos/builtin/packages/opencv/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py index afec197d11..9b2063593a 100644 --- a/var/spack/repos/builtin/packages/openjpeg/package.py +++ b/var/spack/repos/builtin/packages/openjpeg/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Openjpeg(Package): diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index c656f78dab..163990bf15 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/openspeedshop/package.py b/var/spack/repos/builtin/packages/openspeedshop/package.py index bcd77351aa..c501ea063c 100644 --- a/var/spack/repos/builtin/packages/openspeedshop/package.py +++ b/var/spack/repos/builtin/packages/openspeedshop/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## ################################################################################ # Copyright (c) 2015-2016 Krell Institute. All Rights Reserved. # diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index d0c95731a2..119cdd83c2 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import urllib import llnl.util.tty as tty diff --git a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py index 01054471a3..2104bf842b 100644 --- a/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py +++ b/var/spack/repos/builtin/packages/osu-micro-benchmarks/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 OsuMicroBenchmarks(Package): diff --git a/var/spack/repos/builtin/packages/otf/package.py b/var/spack/repos/builtin/packages/otf/package.py index 52893dd265..4a7a00b212 100644 --- a/var/spack/repos/builtin/packages/otf/package.py +++ b/var/spack/repos/builtin/packages/otf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Otf(Package): diff --git a/var/spack/repos/builtin/packages/otf2/package.py b/var/spack/repos/builtin/packages/otf2/package.py index c3d61bc228..131836f8ac 100644 --- a/var/spack/repos/builtin/packages/otf2/package.py +++ b/var/spack/repos/builtin/packages/otf2/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/p4est/package.py b/var/spack/repos/builtin/packages/p4est/package.py index adf75babb9..d0db4f7f20 100644 --- a/var/spack/repos/builtin/packages/p4est/package.py +++ b/var/spack/repos/builtin/packages/p4est/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 P4est(Package): diff --git a/var/spack/repos/builtin/packages/pango/package.py b/var/spack/repos/builtin/packages/pango/package.py index 79dad3a3d2..a04f6d64e0 100644 --- a/var/spack/repos/builtin/packages/pango/package.py +++ b/var/spack/repos/builtin/packages/pango/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Pango(Package): diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index 74b3ea9ef9..ecd958407f 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import glob import os diff --git a/var/spack/repos/builtin/packages/paradiseo/package.py b/var/spack/repos/builtin/packages/paradiseo/package.py index 34766099da..d6324b63e6 100644 --- a/var/spack/repos/builtin/packages/paradiseo/package.py +++ b/var/spack/repos/builtin/packages/paradiseo/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import sys diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py index 1bbd24781e..59c44c8a4a 100644 --- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 ParallelNetcdf(Package): diff --git a/var/spack/repos/builtin/packages/paraver/package.py b/var/spack/repos/builtin/packages/paraver/package.py index 5f8a153d4c..50ce6b79fb 100644 --- a/var/spack/repos/builtin/packages/paraver/package.py +++ b/var/spack/repos/builtin/packages/paraver/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 60f8d3c243..711cbc98c9 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Paraview(Package): diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index b49f8dae00..2dead4a76a 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/parpack/package.py b/var/spack/repos/builtin/packages/parpack/package.py index 622aceca04..5930dada85 100644 --- a/var/spack/repos/builtin/packages/parpack/package.py +++ b/var/spack/repos/builtin/packages/parpack/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os import shutil diff --git a/var/spack/repos/builtin/packages/patchelf/package.py b/var/spack/repos/builtin/packages/patchelf/package.py index 036dc6bd17..3860875bcc 100644 --- a/var/spack/repos/builtin/packages/patchelf/package.py +++ b/var/spack/repos/builtin/packages/patchelf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Patchelf(Package): diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py index e38d337e3d..7a9f3b911d 100644 --- a/var/spack/repos/builtin/packages/pcre/package.py +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Pcre(Package): diff --git a/var/spack/repos/builtin/packages/pcre2/package.py b/var/spack/repos/builtin/packages/pcre2/package.py index 6a0244a15e..b013685f05 100644 --- a/var/spack/repos/builtin/packages/pcre2/package.py +++ b/var/spack/repos/builtin/packages/pcre2/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Pcre2(Package): diff --git a/var/spack/repos/builtin/packages/pdt/package.py b/var/spack/repos/builtin/packages/pdt/package.py index ce3b793e30..60136fc0cd 100644 --- a/var/spack/repos/builtin/packages/pdt/package.py +++ b/var/spack/repos/builtin/packages/pdt/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 1161dd7d67..6456a1aabf 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/pgi/package.py b/var/spack/repos/builtin/packages/pgi/package.py index 8dc6453469..7170c65303 100644 --- a/var/spack/repos/builtin/packages/pgi/package.py +++ b/var/spack/repos/builtin/packages/pgi/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/pidx/package.py b/var/spack/repos/builtin/packages/pidx/package.py index 81aed62fb1..d38dcd7b96 100644 --- a/var/spack/repos/builtin/packages/pidx/package.py +++ b/var/spack/repos/builtin/packages/pidx/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Pidx(Package): diff --git a/var/spack/repos/builtin/packages/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py index 895cbdbca5..34d8dfea0d 100644 --- a/var/spack/repos/builtin/packages/pixman/package.py +++ b/var/spack/repos/builtin/packages/pixman/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Pixman(Package): diff --git a/var/spack/repos/builtin/packages/pkg-config/package.py b/var/spack/repos/builtin/packages/pkg-config/package.py index a803bc3f9b..ddbc151767 100644 --- a/var/spack/repos/builtin/packages/pkg-config/package.py +++ b/var/spack/repos/builtin/packages/pkg-config/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PkgConfig(Package): diff --git a/var/spack/repos/builtin/packages/pmgr_collective/package.py b/var/spack/repos/builtin/packages/pmgr_collective/package.py index 1fc47c658f..a6e3b8e2a2 100644 --- a/var/spack/repos/builtin/packages/pmgr_collective/package.py +++ b/var/spack/repos/builtin/packages/pmgr_collective/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/postgresql/package.py b/var/spack/repos/builtin/packages/postgresql/package.py index 46922b7b71..9362234881 100644 --- a/var/spack/repos/builtin/packages/postgresql/package.py +++ b/var/spack/repos/builtin/packages/postgresql/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Postgresql(Package): diff --git a/var/spack/repos/builtin/packages/ppl/package.py b/var/spack/repos/builtin/packages/ppl/package.py index 018d5c523d..a54c6ce221 100644 --- a/var/spack/repos/builtin/packages/ppl/package.py +++ b/var/spack/repos/builtin/packages/ppl/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Ppl(Package): diff --git a/var/spack/repos/builtin/packages/proj/package.py b/var/spack/repos/builtin/packages/proj/package.py index 797772f4f6..20dd4f5f69 100644 --- a/var/spack/repos/builtin/packages/proj/package.py +++ b/var/spack/repos/builtin/packages/proj/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Proj(Package): diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py index 34085c7ce9..d4befc34ab 100644 --- a/var/spack/repos/builtin/packages/protobuf/package.py +++ b/var/spack/repos/builtin/packages/protobuf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py index 9aecc95c63..05f4616ff5 100644 --- a/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py +++ b/var/spack/repos/builtin/packages/py-SQLAlchemy/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PySqlalchemy(Package): diff --git a/var/spack/repos/builtin/packages/py-argcomplete/package.py b/var/spack/repos/builtin/packages/py-argcomplete/package.py index c94ef7238b..ace9320424 100644 --- a/var/spack/repos/builtin/packages/py-argcomplete/package.py +++ b/var/spack/repos/builtin/packages/py-argcomplete/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyArgcomplete(Package): diff --git a/var/spack/repos/builtin/packages/py-astroid/package.py b/var/spack/repos/builtin/packages/py-astroid/package.py index 1ecb5eecee..8ba6696b0c 100644 --- a/var/spack/repos/builtin/packages/py-astroid/package.py +++ b/var/spack/repos/builtin/packages/py-astroid/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py index d138a514f6..86875bbcae 100644 --- a/var/spack/repos/builtin/packages/py-astropy/package.py +++ b/var/spack/repos/builtin/packages/py-astropy/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyAstropy(Package): diff --git a/var/spack/repos/builtin/packages/py-basemap/package.py b/var/spack/repos/builtin/packages/py-basemap/package.py index 8dfc99b28d..95d02bce91 100644 --- a/var/spack/repos/builtin/packages/py-basemap/package.py +++ b/var/spack/repos/builtin/packages/py-basemap/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/py-biopython/package.py b/var/spack/repos/builtin/packages/py-biopython/package.py index 8ecaf48626..26f42e060b 100644 --- a/var/spack/repos/builtin/packages/py-biopython/package.py +++ b/var/spack/repos/builtin/packages/py-biopython/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyBiopython(Package): diff --git a/var/spack/repos/builtin/packages/py-blessings/package.py b/var/spack/repos/builtin/packages/py-blessings/package.py index f2475a0efd..05a1f5bcbb 100644 --- a/var/spack/repos/builtin/packages/py-blessings/package.py +++ b/var/spack/repos/builtin/packages/py-blessings/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyBlessings(Package): diff --git a/var/spack/repos/builtin/packages/py-bottleneck/package.py b/var/spack/repos/builtin/packages/py-bottleneck/package.py index d43308543b..1a186b219c 100644 --- a/var/spack/repos/builtin/packages/py-bottleneck/package.py +++ b/var/spack/repos/builtin/packages/py-bottleneck/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyBottleneck(Package): diff --git a/var/spack/repos/builtin/packages/py-cffi/package.py b/var/spack/repos/builtin/packages/py-cffi/package.py index 909049a67c..58d0a81990 100644 --- a/var/spack/repos/builtin/packages/py-cffi/package.py +++ b/var/spack/repos/builtin/packages/py-cffi/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyCffi(Package): diff --git a/var/spack/repos/builtin/packages/py-coverage/package.py b/var/spack/repos/builtin/packages/py-coverage/package.py index 39b2ac3b01..92a5bd0088 100644 --- a/var/spack/repos/builtin/packages/py-coverage/package.py +++ b/var/spack/repos/builtin/packages/py-coverage/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyCoverage(Package): diff --git a/var/spack/repos/builtin/packages/py-csvkit/package.py b/var/spack/repos/builtin/packages/py-csvkit/package.py index def30457be..7fe2f953f7 100644 --- a/var/spack/repos/builtin/packages/py-csvkit/package.py +++ b/var/spack/repos/builtin/packages/py-csvkit/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyCsvkit(Package): diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py index 072355026e..5ccc508697 100644 --- a/var/spack/repos/builtin/packages/py-cython/package.py +++ b/var/spack/repos/builtin/packages/py-cython/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyCython(Package): diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py index cf0a16f21e..831f86e81c 100644 --- a/var/spack/repos/builtin/packages/py-dask/package.py +++ b/var/spack/repos/builtin/packages/py-dask/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyDask(Package): diff --git a/var/spack/repos/builtin/packages/py-dateutil/package.py b/var/spack/repos/builtin/packages/py-dateutil/package.py index b67e91ace6..eb8eb09e75 100644 --- a/var/spack/repos/builtin/packages/py-dateutil/package.py +++ b/var/spack/repos/builtin/packages/py-dateutil/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyDateutil(Package): diff --git a/var/spack/repos/builtin/packages/py-dbf/package.py b/var/spack/repos/builtin/packages/py-dbf/package.py index 698b221903..09c93de428 100644 --- a/var/spack/repos/builtin/packages/py-dbf/package.py +++ b/var/spack/repos/builtin/packages/py-dbf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyDbf(Package): diff --git a/var/spack/repos/builtin/packages/py-decorator/package.py b/var/spack/repos/builtin/packages/py-decorator/package.py index abbd9f43d1..90a95cd0cb 100644 --- a/var/spack/repos/builtin/packages/py-decorator/package.py +++ b/var/spack/repos/builtin/packages/py-decorator/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyDecorator(Package): diff --git a/var/spack/repos/builtin/packages/py-epydoc/package.py b/var/spack/repos/builtin/packages/py-epydoc/package.py index af05510504..b370075e02 100644 --- a/var/spack/repos/builtin/packages/py-epydoc/package.py +++ b/var/spack/repos/builtin/packages/py-epydoc/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyEpydoc(Package): diff --git a/var/spack/repos/builtin/packages/py-flake8/package.py b/var/spack/repos/builtin/packages/py-flake8/package.py index e7a1665bdd..b261467d84 100644 --- a/var/spack/repos/builtin/packages/py-flake8/package.py +++ b/var/spack/repos/builtin/packages/py-flake8/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/py-funcsigs/package.py b/var/spack/repos/builtin/packages/py-funcsigs/package.py index a428890288..9d987b284e 100644 --- a/var/spack/repos/builtin/packages/py-funcsigs/package.py +++ b/var/spack/repos/builtin/packages/py-funcsigs/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/py-genders/package.py b/var/spack/repos/builtin/packages/py-genders/package.py index c49c8fd5b2..44f6cb1ef4 100644 --- a/var/spack/repos/builtin/packages/py-genders/package.py +++ b/var/spack/repos/builtin/packages/py-genders/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyGenders(Package): diff --git a/var/spack/repos/builtin/packages/py-genshi/package.py b/var/spack/repos/builtin/packages/py-genshi/package.py index d485c89429..cba479a88f 100644 --- a/var/spack/repos/builtin/packages/py-genshi/package.py +++ b/var/spack/repos/builtin/packages/py-genshi/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 version, extends, depends_on from spack import Package diff --git a/var/spack/repos/builtin/packages/py-gnuplot/package.py b/var/spack/repos/builtin/packages/py-gnuplot/package.py index ede4472c03..3381c4a5ac 100644 --- a/var/spack/repos/builtin/packages/py-gnuplot/package.py +++ b/var/spack/repos/builtin/packages/py-gnuplot/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyGnuplot(Package): diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py index 6293da5407..de72bac44e 100644 --- a/var/spack/repos/builtin/packages/py-h5py/package.py +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import re diff --git a/var/spack/repos/builtin/packages/py-ipython/package.py b/var/spack/repos/builtin/packages/py-ipython/package.py index 8d0e64a07f..7a94f90b38 100644 --- a/var/spack/repos/builtin/packages/py-ipython/package.py +++ b/var/spack/repos/builtin/packages/py-ipython/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyIpython(Package): diff --git a/var/spack/repos/builtin/packages/py-jdcal/package.py b/var/spack/repos/builtin/packages/py-jdcal/package.py index 54169b2c21..fd1d6b4419 100644 --- a/var/spack/repos/builtin/packages/py-jdcal/package.py +++ b/var/spack/repos/builtin/packages/py-jdcal/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyJdcal(Package): diff --git a/var/spack/repos/builtin/packages/py-jinja2/package.py b/var/spack/repos/builtin/packages/py-jinja2/package.py index 5d92cdd49a..48312d9baf 100644 --- a/var/spack/repos/builtin/packages/py-jinja2/package.py +++ b/var/spack/repos/builtin/packages/py-jinja2/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-lockfile/package.py b/var/spack/repos/builtin/packages/py-lockfile/package.py index 8722914d94..998b41abc6 100644 --- a/var/spack/repos/builtin/packages/py-lockfile/package.py +++ b/var/spack/repos/builtin/packages/py-lockfile/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyLockfile(Package): 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 a47c4ac0ec..8675c48e9a 100644 --- a/var/spack/repos/builtin/packages/py-logilab-common/package.py +++ b/var/spack/repos/builtin/packages/py-logilab-common/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-mako/package.py b/var/spack/repos/builtin/packages/py-mako/package.py index 3e91ffd8e5..a03ef4defb 100644 --- a/var/spack/repos/builtin/packages/py-mako/package.py +++ b/var/spack/repos/builtin/packages/py-mako/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyMako(Package): diff --git a/var/spack/repos/builtin/packages/py-markupsafe/package.py b/var/spack/repos/builtin/packages/py-markupsafe/package.py index 0a0c3a724a..58c9f70066 100644 --- a/var/spack/repos/builtin/packages/py-markupsafe/package.py +++ b/var/spack/repos/builtin/packages/py-markupsafe/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 1a190cc5f3..14f9716ae6 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/py-mistune/package.py b/var/spack/repos/builtin/packages/py-mistune/package.py index 44a114b173..9bcbb5a927 100644 --- a/var/spack/repos/builtin/packages/py-mistune/package.py +++ b/var/spack/repos/builtin/packages/py-mistune/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-mock/package.py b/var/spack/repos/builtin/packages/py-mock/package.py index e89af8802a..0587131b88 100644 --- a/var/spack/repos/builtin/packages/py-mock/package.py +++ b/var/spack/repos/builtin/packages/py-mock/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyMock(Package): diff --git a/var/spack/repos/builtin/packages/py-mpi4py/package.py b/var/spack/repos/builtin/packages/py-mpi4py/package.py index f599205644..2764b8b3c6 100644 --- a/var/spack/repos/builtin/packages/py-mpi4py/package.py +++ b/var/spack/repos/builtin/packages/py-mpi4py/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyMpi4py(Package): diff --git a/var/spack/repos/builtin/packages/py-mpmath/package.py b/var/spack/repos/builtin/packages/py-mpmath/package.py index 4d3261ae8f..899ff053a9 100644 --- a/var/spack/repos/builtin/packages/py-mpmath/package.py +++ b/var/spack/repos/builtin/packages/py-mpmath/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyMpmath(Package): diff --git a/var/spack/repos/builtin/packages/py-mx/package.py b/var/spack/repos/builtin/packages/py-mx/package.py index 717ee0562b..d0f9f7cadf 100644 --- a/var/spack/repos/builtin/packages/py-mx/package.py +++ b/var/spack/repos/builtin/packages/py-mx/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyMx(Package): diff --git a/var/spack/repos/builtin/packages/py-mysqldb1/package.py b/var/spack/repos/builtin/packages/py-mysqldb1/package.py index fda02b4982..9918ba3e64 100644 --- a/var/spack/repos/builtin/packages/py-mysqldb1/package.py +++ b/var/spack/repos/builtin/packages/py-mysqldb1/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyMysqldb1(Package): diff --git a/var/spack/repos/builtin/packages/py-netcdf/package.py b/var/spack/repos/builtin/packages/py-netcdf/package.py index 7faa15ad25..e3f857a0ce 100644 --- a/var/spack/repos/builtin/packages/py-netcdf/package.py +++ b/var/spack/repos/builtin/packages/py-netcdf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyNetcdf(Package): diff --git a/var/spack/repos/builtin/packages/py-networkx/package.py b/var/spack/repos/builtin/packages/py-networkx/package.py index 893146ec3e..6bdb24e36e 100644 --- a/var/spack/repos/builtin/packages/py-networkx/package.py +++ b/var/spack/repos/builtin/packages/py-networkx/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyNetworkx(Package): diff --git a/var/spack/repos/builtin/packages/py-nose/package.py b/var/spack/repos/builtin/packages/py-nose/package.py index c2c2b52e03..abb2d500a2 100644 --- a/var/spack/repos/builtin/packages/py-nose/package.py +++ b/var/spack/repos/builtin/packages/py-nose/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/py-numexpr/package.py b/var/spack/repos/builtin/packages/py-numexpr/package.py index 0076aa456b..d8bacd179f 100644 --- a/var/spack/repos/builtin/packages/py-numexpr/package.py +++ b/var/spack/repos/builtin/packages/py-numexpr/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import re diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 40988fb44a..e9672b7bb0 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyNumpy(Package): diff --git a/var/spack/repos/builtin/packages/py-openpyxl/package.py b/var/spack/repos/builtin/packages/py-openpyxl/package.py index 87ff9f3521..30cb52348f 100644 --- a/var/spack/repos/builtin/packages/py-openpyxl/package.py +++ b/var/spack/repos/builtin/packages/py-openpyxl/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyOpenpyxl(Package): diff --git a/var/spack/repos/builtin/packages/py-pandas/package.py b/var/spack/repos/builtin/packages/py-pandas/package.py index 59d515eb5e..7f54fc5d76 100644 --- a/var/spack/repos/builtin/packages/py-pandas/package.py +++ b/var/spack/repos/builtin/packages/py-pandas/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/py-pbr/package.py b/var/spack/repos/builtin/packages/py-pbr/package.py index 02957483d4..336ea37144 100644 --- a/var/spack/repos/builtin/packages/py-pbr/package.py +++ b/var/spack/repos/builtin/packages/py-pbr/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/py-periodictable/package.py b/var/spack/repos/builtin/packages/py-periodictable/package.py index 6a495a1cc8..7d8a635979 100644 --- a/var/spack/repos/builtin/packages/py-periodictable/package.py +++ b/var/spack/repos/builtin/packages/py-periodictable/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPeriodictable(Package): diff --git a/var/spack/repos/builtin/packages/py-pexpect/package.py b/var/spack/repos/builtin/packages/py-pexpect/package.py index ff5fac84e0..dd95af9643 100644 --- a/var/spack/repos/builtin/packages/py-pexpect/package.py +++ b/var/spack/repos/builtin/packages/py-pexpect/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPexpect(Package): diff --git a/var/spack/repos/builtin/packages/py-phonopy/package.py b/var/spack/repos/builtin/packages/py-phonopy/package.py index 6d10fea74f..68774c90c2 100644 --- a/var/spack/repos/builtin/packages/py-phonopy/package.py +++ b/var/spack/repos/builtin/packages/py-phonopy/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPhonopy(Package): diff --git a/var/spack/repos/builtin/packages/py-pil/package.py b/var/spack/repos/builtin/packages/py-pil/package.py index 743b761981..dc4418fdfe 100644 --- a/var/spack/repos/builtin/packages/py-pil/package.py +++ b/var/spack/repos/builtin/packages/py-pil/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPil(Package): diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py index 66d9bb4382..cdbc57e0a5 100644 --- a/var/spack/repos/builtin/packages/py-pillow/package.py +++ b/var/spack/repos/builtin/packages/py-pillow/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/py-pmw/package.py b/var/spack/repos/builtin/packages/py-pmw/package.py index 56131811e9..062bfe9c03 100644 --- a/var/spack/repos/builtin/packages/py-pmw/package.py +++ b/var/spack/repos/builtin/packages/py-pmw/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPmw(Package): diff --git a/var/spack/repos/builtin/packages/py-prettytable/package.py b/var/spack/repos/builtin/packages/py-prettytable/package.py index 27fab7c046..e3edc7b706 100644 --- a/var/spack/repos/builtin/packages/py-prettytable/package.py +++ b/var/spack/repos/builtin/packages/py-prettytable/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-py2neo/package.py b/var/spack/repos/builtin/packages/py-py2neo/package.py index d30b823a87..9c6e219264 100644 --- a/var/spack/repos/builtin/packages/py-py2neo/package.py +++ b/var/spack/repos/builtin/packages/py-py2neo/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-pychecker/package.py b/var/spack/repos/builtin/packages/py-pychecker/package.py index bda5a746aa..137c5f491c 100644 --- a/var/spack/repos/builtin/packages/py-pychecker/package.py +++ b/var/spack/repos/builtin/packages/py-pychecker/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPychecker(Package): diff --git a/var/spack/repos/builtin/packages/py-pycparser/package.py b/var/spack/repos/builtin/packages/py-pycparser/package.py index f2bb679d25..c33769c526 100644 --- a/var/spack/repos/builtin/packages/py-pycparser/package.py +++ b/var/spack/repos/builtin/packages/py-pycparser/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPycparser(Package): diff --git a/var/spack/repos/builtin/packages/py-pyelftools/package.py b/var/spack/repos/builtin/packages/py-pyelftools/package.py index d5ad32e624..0c4a7a36cc 100644 --- a/var/spack/repos/builtin/packages/py-pyelftools/package.py +++ b/var/spack/repos/builtin/packages/py-pyelftools/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPyelftools(Package): diff --git a/var/spack/repos/builtin/packages/py-pygments/package.py b/var/spack/repos/builtin/packages/py-pygments/package.py index 7e07bf6869..fedf3d068d 100644 --- a/var/spack/repos/builtin/packages/py-pygments/package.py +++ b/var/spack/repos/builtin/packages/py-pygments/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPygments(Package): diff --git a/var/spack/repos/builtin/packages/py-pylint/package.py b/var/spack/repos/builtin/packages/py-pylint/package.py index 9579708c29..66118e8228 100644 --- a/var/spack/repos/builtin/packages/py-pylint/package.py +++ b/var/spack/repos/builtin/packages/py-pylint/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import re diff --git a/var/spack/repos/builtin/packages/py-pypar/package.py b/var/spack/repos/builtin/packages/py-pypar/package.py index af9c76ccd8..f762789dea 100644 --- a/var/spack/repos/builtin/packages/py-pypar/package.py +++ b/var/spack/repos/builtin/packages/py-pypar/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPypar(Package): diff --git a/var/spack/repos/builtin/packages/py-pyparsing/package.py b/var/spack/repos/builtin/packages/py-pyparsing/package.py index a6e50ad139..0423aa3bdb 100644 --- a/var/spack/repos/builtin/packages/py-pyparsing/package.py +++ b/var/spack/repos/builtin/packages/py-pyparsing/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPyparsing(Package): diff --git a/var/spack/repos/builtin/packages/py-pyqt/package.py b/var/spack/repos/builtin/packages/py-pyqt/package.py index 8edca105bb..b090e25682 100644 --- a/var/spack/repos/builtin/packages/py-pyqt/package.py +++ b/var/spack/repos/builtin/packages/py-pyqt/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPyqt(Package): diff --git a/var/spack/repos/builtin/packages/py-pyside/package.py b/var/spack/repos/builtin/packages/py-pyside/package.py index ffa433e18e..affee6c55a 100644 --- a/var/spack/repos/builtin/packages/py-pyside/package.py +++ b/var/spack/repos/builtin/packages/py-pyside/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/py-pytables/package.py b/var/spack/repos/builtin/packages/py-pytables/package.py index a5b1e78ab3..47592fb3d1 100644 --- a/var/spack/repos/builtin/packages/py-pytables/package.py +++ b/var/spack/repos/builtin/packages/py-pytables/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import re 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 12cbe9101c..ae6393986d 100644 --- a/var/spack/repos/builtin/packages/py-python-daemon/package.py +++ b/var/spack/repos/builtin/packages/py-python-daemon/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPythonDaemon(Package): diff --git a/var/spack/repos/builtin/packages/py-pytz/package.py b/var/spack/repos/builtin/packages/py-pytz/package.py index 060cf0cde4..caf2c90e73 100644 --- a/var/spack/repos/builtin/packages/py-pytz/package.py +++ b/var/spack/repos/builtin/packages/py-pytz/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPytz(Package): diff --git a/var/spack/repos/builtin/packages/py-pyyaml/package.py b/var/spack/repos/builtin/packages/py-pyyaml/package.py index cae42f6e59..c0e22ba681 100644 --- a/var/spack/repos/builtin/packages/py-pyyaml/package.py +++ b/var/spack/repos/builtin/packages/py-pyyaml/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyPyyaml(Package): diff --git a/var/spack/repos/builtin/packages/py-rpy2/package.py b/var/spack/repos/builtin/packages/py-rpy2/package.py index a0b03d03e3..03fd2b4a06 100644 --- a/var/spack/repos/builtin/packages/py-rpy2/package.py +++ b/var/spack/repos/builtin/packages/py-rpy2/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyRpy2(Package): diff --git a/var/spack/repos/builtin/packages/py-scientificpython/package.py b/var/spack/repos/builtin/packages/py-scientificpython/package.py index df2c86caac..7f7eb76b73 100644 --- a/var/spack/repos/builtin/packages/py-scientificpython/package.py +++ b/var/spack/repos/builtin/packages/py-scientificpython/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyScientificpython(Package): 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 d13339060e..0479e9eb0a 100644 --- a/var/spack/repos/builtin/packages/py-scikit-image/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyScikitImage(Package): 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 2d7985b98c..7bb5853b19 100644 --- a/var/spack/repos/builtin/packages/py-scikit-learn/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-learn/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyScikitLearn(Package): diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index 4d47c641ee..f7c372b345 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyScipy(Package): diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index 1368711978..68032cb68d 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PySetuptools(Package): diff --git a/var/spack/repos/builtin/packages/py-shiboken/package.py b/var/spack/repos/builtin/packages/py-shiboken/package.py index e4bf4ce07e..a2240c68a4 100644 --- a/var/spack/repos/builtin/packages/py-shiboken/package.py +++ b/var/spack/repos/builtin/packages/py-shiboken/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/py-sip/package.py b/var/spack/repos/builtin/packages/py-sip/package.py index e4a6fb6961..fc8e7f5296 100644 --- a/var/spack/repos/builtin/packages/py-sip/package.py +++ b/var/spack/repos/builtin/packages/py-sip/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/py-six/package.py b/var/spack/repos/builtin/packages/py-six/package.py index df277100f7..3efb3d4317 100644 --- a/var/spack/repos/builtin/packages/py-six/package.py +++ b/var/spack/repos/builtin/packages/py-six/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PySix(Package): diff --git a/var/spack/repos/builtin/packages/py-sphinx/package.py b/var/spack/repos/builtin/packages/py-sphinx/package.py index ec2e89a098..d00f1d128b 100644 --- a/var/spack/repos/builtin/packages/py-sphinx/package.py +++ b/var/spack/repos/builtin/packages/py-sphinx/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PySphinx(Package): diff --git a/var/spack/repos/builtin/packages/py-storm/package.py b/var/spack/repos/builtin/packages/py-storm/package.py index abc121d30b..53af720c50 100644 --- a/var/spack/repos/builtin/packages/py-storm/package.py +++ b/var/spack/repos/builtin/packages/py-storm/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 depends_on, extends, version from spack import Package diff --git a/var/spack/repos/builtin/packages/py-sympy/package.py b/var/spack/repos/builtin/packages/py-sympy/package.py index bbce8c74e3..5e38fc5be1 100644 --- a/var/spack/repos/builtin/packages/py-sympy/package.py +++ b/var/spack/repos/builtin/packages/py-sympy/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PySympy(Package): diff --git a/var/spack/repos/builtin/packages/py-tappy/package.py b/var/spack/repos/builtin/packages/py-tappy/package.py index df61a909da..a1026a9b4b 100644 --- a/var/spack/repos/builtin/packages/py-tappy/package.py +++ b/var/spack/repos/builtin/packages/py-tappy/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyTappy(Package): diff --git a/var/spack/repos/builtin/packages/py-tuiview/package.py b/var/spack/repos/builtin/packages/py-tuiview/package.py index 984b4196b1..200a33a676 100644 --- a/var/spack/repos/builtin/packages/py-tuiview/package.py +++ b/var/spack/repos/builtin/packages/py-tuiview/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyTuiview(Package): diff --git a/var/spack/repos/builtin/packages/py-twisted/package.py b/var/spack/repos/builtin/packages/py-twisted/package.py index 2fdebb6cb9..27db4adff4 100644 --- a/var/spack/repos/builtin/packages/py-twisted/package.py +++ b/var/spack/repos/builtin/packages/py-twisted/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyTwisted(Package): diff --git a/var/spack/repos/builtin/packages/py-urwid/package.py b/var/spack/repos/builtin/packages/py-urwid/package.py index aaa11c681d..0accc72df8 100644 --- a/var/spack/repos/builtin/packages/py-urwid/package.py +++ b/var/spack/repos/builtin/packages/py-urwid/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyUrwid(Package): diff --git a/var/spack/repos/builtin/packages/py-virtualenv/package.py b/var/spack/repos/builtin/packages/py-virtualenv/package.py index 09303d37b4..d42cb96eb7 100644 --- a/var/spack/repos/builtin/packages/py-virtualenv/package.py +++ b/var/spack/repos/builtin/packages/py-virtualenv/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import shutil diff --git a/var/spack/repos/builtin/packages/py-wheel/package.py b/var/spack/repos/builtin/packages/py-wheel/package.py index 3118e74519..68b6f3d679 100644 --- a/var/spack/repos/builtin/packages/py-wheel/package.py +++ b/var/spack/repos/builtin/packages/py-wheel/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyWheel(Package): diff --git a/var/spack/repos/builtin/packages/py-xlrd/package.py b/var/spack/repos/builtin/packages/py-xlrd/package.py index 8f25c06aad..9220f90340 100644 --- a/var/spack/repos/builtin/packages/py-xlrd/package.py +++ b/var/spack/repos/builtin/packages/py-xlrd/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyXlrd(Package): diff --git a/var/spack/repos/builtin/packages/py-yapf/package.py b/var/spack/repos/builtin/packages/py-yapf/package.py index 12ef191515..60f740c98d 100644 --- a/var/spack/repos/builtin/packages/py-yapf/package.py +++ b/var/spack/repos/builtin/packages/py-yapf/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 PyYapf(Package): diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index f7e1d94567..86c12498e1 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import functools import glob import inspect diff --git a/var/spack/repos/builtin/packages/qhull/package.py b/var/spack/repos/builtin/packages/qhull/package.py index 8f7c2f31b1..280c9cc12c 100644 --- a/var/spack/repos/builtin/packages/qhull/package.py +++ b/var/spack/repos/builtin/packages/qhull/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Qhull(Package): diff --git a/var/spack/repos/builtin/packages/qrupdate/package.py b/var/spack/repos/builtin/packages/qrupdate/package.py index 5374d02c97..314950dc36 100644 --- a/var/spack/repos/builtin/packages/qrupdate/package.py +++ b/var/spack/repos/builtin/packages/qrupdate/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Qrupdate(Package): diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 1e1d6302f3..0c91a5ce87 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/qthreads/package.py b/var/spack/repos/builtin/packages/qthreads/package.py index 5da9340927..47b5706063 100644 --- a/var/spack/repos/builtin/packages/qthreads/package.py +++ b/var/spack/repos/builtin/packages/qthreads/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Qthreads(Package): diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index 2d92c1c4d8..0d3b6a3e57 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 RBiocgenerics(Package): diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py index d06c7e9240..34a1eee79f 100644 --- a/var/spack/repos/builtin/packages/r-abind/package.py +++ b/var/spack/repos/builtin/packages/r-abind/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 RAbind(Package): diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py index 4911c636b4..fffae68019 100644 --- a/var/spack/repos/builtin/packages/r-filehash/package.py +++ b/var/spack/repos/builtin/packages/r-filehash/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 RFilehash(Package): diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py index e900cdb216..f86917ec0c 100644 --- a/var/spack/repos/builtin/packages/r-magic/package.py +++ b/var/spack/repos/builtin/packages/r-magic/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 RMagic(Package): diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index f807ab71af..b6300a1dfa 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Raja(Package): diff --git a/var/spack/repos/builtin/packages/ravel/package.py b/var/spack/repos/builtin/packages/ravel/package.py index d774a0ab86..763ec1b9a2 100644 --- a/var/spack/repos/builtin/packages/ravel/package.py +++ b/var/spack/repos/builtin/packages/ravel/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Ravel(Package): diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py index 0c429ea756..039bf725eb 100644 --- a/var/spack/repos/builtin/packages/readline/package.py +++ b/var/spack/repos/builtin/packages/readline/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Readline(Package): diff --git a/var/spack/repos/builtin/packages/rose/package.py b/var/spack/repos/builtin/packages/rose/package.py index 1d7294acab..b8a65e8574 100644 --- a/var/spack/repos/builtin/packages/rose/package.py +++ b/var/spack/repos/builtin/packages/rose/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## #------------------------------------------------------------------------------ # Author: Justin Too #------------------------------------------------------------------------------ diff --git a/var/spack/repos/builtin/packages/rsync/package.py b/var/spack/repos/builtin/packages/rsync/package.py index 76aec3096d..a9f8d4cfda 100644 --- a/var/spack/repos/builtin/packages/rsync/package.py +++ b/var/spack/repos/builtin/packages/rsync/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Rsync(Package): diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py index e13677e4d2..dd71913fc9 100644 --- a/var/spack/repos/builtin/packages/ruby/package.py +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/samtools/package.py b/var/spack/repos/builtin/packages/samtools/package.py index 72900398d8..f5c7f4431f 100644 --- a/var/spack/repos/builtin/packages/samtools/package.py +++ b/var/spack/repos/builtin/packages/samtools/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Samtools(Package): diff --git a/var/spack/repos/builtin/packages/scalasca/package.py b/var/spack/repos/builtin/packages/scalasca/package.py index 6de14564b2..98e43ee75a 100644 --- a/var/spack/repos/builtin/packages/scalasca/package.py +++ b/var/spack/repos/builtin/packages/scalasca/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/scons/package.py b/var/spack/repos/builtin/packages/scons/package.py index 594aeced88..40ae4176dd 100644 --- a/var/spack/repos/builtin/packages/scons/package.py +++ b/var/spack/repos/builtin/packages/scons/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Scons(Package): diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py index 5127e814b6..633511a15a 100644 --- a/var/spack/repos/builtin/packages/scorep/package.py +++ b/var/spack/repos/builtin/packages/scorep/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 8fad74b24f..e82c3acd42 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os, re diff --git a/var/spack/repos/builtin/packages/scr/package.py b/var/spack/repos/builtin/packages/scr/package.py index 1408dce678..b638688e7b 100644 --- a/var/spack/repos/builtin/packages/scr/package.py +++ b/var/spack/repos/builtin/packages/scr/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py index a5c9057b99..3b1d08889c 100644 --- a/var/spack/repos/builtin/packages/serf/package.py +++ b/var/spack/repos/builtin/packages/serf/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 7e68663c6e..017a09977a 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py index 8b5f24394f..c148a579ec 100644 --- a/var/spack/repos/builtin/packages/slepc/package.py +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/snappy/package.py b/var/spack/repos/builtin/packages/snappy/package.py index c8f9ceef7d..836063f933 100644 --- a/var/spack/repos/builtin/packages/snappy/package.py +++ b/var/spack/repos/builtin/packages/snappy/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import os from spack import * diff --git a/var/spack/repos/builtin/packages/sparsehash/package.py b/var/spack/repos/builtin/packages/sparsehash/package.py index 7decaeb89b..a72a5ce105 100644 --- a/var/spack/repos/builtin/packages/sparsehash/package.py +++ b/var/spack/repos/builtin/packages/sparsehash/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Sparsehash(Package): diff --git a/var/spack/repos/builtin/packages/spindle/package.py b/var/spack/repos/builtin/packages/spindle/package.py index a20753458a..bcdc7543a3 100644 --- a/var/spack/repos/builtin/packages/spindle/package.py +++ b/var/spack/repos/builtin/packages/spindle/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2014, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/spot/package.py b/var/spack/repos/builtin/packages/spot/package.py index 9e539277ae..59535dcc4c 100644 --- a/var/spack/repos/builtin/packages/spot/package.py +++ b/var/spack/repos/builtin/packages/spot/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/sqlite/package.py b/var/spack/repos/builtin/packages/sqlite/package.py index 1cf2d30239..5e7ae4fb8b 100644 --- a/var/spack/repos/builtin/packages/sqlite/package.py +++ b/var/spack/repos/builtin/packages/sqlite/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/stat/package.py b/var/spack/repos/builtin/packages/stat/package.py index 5d81e62731..80d27e149f 100644 --- a/var/spack/repos/builtin/packages/stat/package.py +++ b/var/spack/repos/builtin/packages/stat/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Stat(Package): diff --git a/var/spack/repos/builtin/packages/subversion/package.py b/var/spack/repos/builtin/packages/subversion/package.py index 04cde94aad..68ee397857 100644 --- a/var/spack/repos/builtin/packages/subversion/package.py +++ b/var/spack/repos/builtin/packages/subversion/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * #import os diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index a4b3979a15..dd0dfa3e23 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py index 7e025a8244..ba2340f74c 100644 --- a/var/spack/repos/builtin/packages/sundials/package.py +++ b/var/spack/repos/builtin/packages/sundials/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 3420d9b90a..6c06b5497c 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import glob diff --git a/var/spack/repos/builtin/packages/swig/package.py b/var/spack/repos/builtin/packages/swig/package.py index 78a6c6bbae..f552621821 100644 --- a/var/spack/repos/builtin/packages/swig/package.py +++ b/var/spack/repos/builtin/packages/swig/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2014, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/szip/package.py b/var/spack/repos/builtin/packages/szip/package.py index c48c5b431e..fd3a2a209d 100644 --- a/var/spack/repos/builtin/packages/szip/package.py +++ b/var/spack/repos/builtin/packages/szip/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Szip(Package): diff --git a/var/spack/repos/builtin/packages/tar/package.py b/var/spack/repos/builtin/packages/tar/package.py index 539174017c..c55b5165bf 100644 --- a/var/spack/repos/builtin/packages/tar/package.py +++ b/var/spack/repos/builtin/packages/tar/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Tar(Package): diff --git a/var/spack/repos/builtin/packages/task/package.py b/var/spack/repos/builtin/packages/task/package.py index 07f44cc45b..dc52c4f9f6 100644 --- a/var/spack/repos/builtin/packages/task/package.py +++ b/var/spack/repos/builtin/packages/task/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Task(Package): diff --git a/var/spack/repos/builtin/packages/taskd/package.py b/var/spack/repos/builtin/packages/taskd/package.py index 66bc0cb484..8a022b4fe9 100644 --- a/var/spack/repos/builtin/packages/taskd/package.py +++ b/var/spack/repos/builtin/packages/taskd/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Taskd(Package): diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py index 31492397d8..3b181f3fa4 100644 --- a/var/spack/repos/builtin/packages/tau/package.py +++ b/var/spack/repos/builtin/packages/tau/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/tbb/package.py b/var/spack/repos/builtin/packages/tbb/package.py index 56ffe4c27c..6c3ceb1e76 100644 --- a/var/spack/repos/builtin/packages/tbb/package.py +++ b/var/spack/repos/builtin/packages/tbb/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os import glob diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index db8bee88d0..a4d8b515bb 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Tcl(Package): diff --git a/var/spack/repos/builtin/packages/tetgen/package.py b/var/spack/repos/builtin/packages/tetgen/package.py index 30c2b76655..5e87ed7fba 100644 --- a/var/spack/repos/builtin/packages/tetgen/package.py +++ b/var/spack/repos/builtin/packages/tetgen/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Tetgen(Package): diff --git a/var/spack/repos/builtin/packages/texinfo/package.py b/var/spack/repos/builtin/packages/texinfo/package.py index 6cf8d79072..5c6fef0db6 100644 --- a/var/spack/repos/builtin/packages/texinfo/package.py +++ b/var/spack/repos/builtin/packages/texinfo/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://software.llnl.gov/spack +# For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * 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 30f06354bf..e289b6d783 100644 --- a/var/spack/repos/builtin/packages/the_silver_searcher/package.py +++ b/var/spack/repos/builtin/packages/the_silver_searcher/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 TheSilverSearcher(Package): diff --git a/var/spack/repos/builtin/packages/thrift/package.py b/var/spack/repos/builtin/packages/thrift/package.py index 6430f40e80..6d834c6321 100644 --- a/var/spack/repos/builtin/packages/thrift/package.py +++ b/var/spack/repos/builtin/packages/thrift/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Thrift(Package): diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py index 839d217f34..330e1c77f5 100644 --- a/var/spack/repos/builtin/packages/tk/package.py +++ b/var/spack/repos/builtin/packages/tk/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Tk(Package): diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py index f2067d1366..c46425c0d3 100644 --- a/var/spack/repos/builtin/packages/tmux/package.py +++ b/var/spack/repos/builtin/packages/tmux/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Tmux(Package): diff --git a/var/spack/repos/builtin/packages/tmuxinator/package.py b/var/spack/repos/builtin/packages/tmuxinator/package.py index 77ae063e5d..b9c92ea4db 100644 --- a/var/spack/repos/builtin/packages/tmuxinator/package.py +++ b/var/spack/repos/builtin/packages/tmuxinator/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Tmuxinator(Package): diff --git a/var/spack/repos/builtin/packages/triangle/package.py b/var/spack/repos/builtin/packages/triangle/package.py index f65d93776d..bc8b0ec639 100644 --- a/var/spack/repos/builtin/packages/triangle/package.py +++ b/var/spack/repos/builtin/packages/triangle/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Triangle(Package): diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 0f72055fa7..1eaec86405 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os, sys, glob diff --git a/var/spack/repos/builtin/packages/turbomole/package.py b/var/spack/repos/builtin/packages/turbomole/package.py index acc95e3b10..3362113d13 100644 --- a/var/spack/repos/builtin/packages/turbomole/package.py +++ b/var/spack/repos/builtin/packages/turbomole/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os import subprocess diff --git a/var/spack/repos/builtin/packages/udunits2/package.py b/var/spack/repos/builtin/packages/udunits2/package.py index 9954a733bb..aed39668fd 100644 --- a/var/spack/repos/builtin/packages/udunits2/package.py +++ b/var/spack/repos/builtin/packages/udunits2/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Udunits2(Package): diff --git a/var/spack/repos/builtin/packages/uncrustify/package.py b/var/spack/repos/builtin/packages/uncrustify/package.py index d3f2d1b473..db96bc301e 100644 --- a/var/spack/repos/builtin/packages/uncrustify/package.py +++ b/var/spack/repos/builtin/packages/uncrustify/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Uncrustify(Package): diff --git a/var/spack/repos/builtin/packages/unibilium/package.py b/var/spack/repos/builtin/packages/unibilium/package.py index ef5de56f79..d9e0ad6bcb 100644 --- a/var/spack/repos/builtin/packages/unibilium/package.py +++ b/var/spack/repos/builtin/packages/unibilium/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Unibilium(Package): diff --git a/var/spack/repos/builtin/packages/util-linux/package.py b/var/spack/repos/builtin/packages/util-linux/package.py index cb7ceabf57..bf6972683d 100644 --- a/var/spack/repos/builtin/packages/util-linux/package.py +++ b/var/spack/repos/builtin/packages/util-linux/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * import os diff --git a/var/spack/repos/builtin/packages/valgrind/package.py b/var/spack/repos/builtin/packages/valgrind/package.py index 0b030d73e9..afd4cc6ad0 100644 --- a/var/spack/repos/builtin/packages/valgrind/package.py +++ b/var/spack/repos/builtin/packages/valgrind/package.py @@ -1,26 +1,26 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 * diff --git a/var/spack/repos/builtin/packages/vim/package.py b/var/spack/repos/builtin/packages/vim/package.py index 4099b3257f..f66c20894b 100644 --- a/var/spack/repos/builtin/packages/vim/package.py +++ b/var/spack/repos/builtin/packages/vim/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Vim(Package): diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index 14e3b6a0c1..ae19fd0450 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 * diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index 24382af406..d2296dbc26 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Vtk(Package): diff --git a/var/spack/repos/builtin/packages/wget/package.py b/var/spack/repos/builtin/packages/wget/package.py index 4b92659478..532cf332e9 100644 --- a/var/spack/repos/builtin/packages/wget/package.py +++ b/var/spack/repos/builtin/packages/wget/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Wget(Package): diff --git a/var/spack/repos/builtin/packages/wx/package.py b/var/spack/repos/builtin/packages/wx/package.py index 206fde7775..c000824803 100644 --- a/var/spack/repos/builtin/packages/wx/package.py +++ b/var/spack/repos/builtin/packages/wx/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Wx(Package): diff --git a/var/spack/repos/builtin/packages/wxpropgrid/package.py b/var/spack/repos/builtin/packages/wxpropgrid/package.py index 790cead517..2283e1acf1 100644 --- a/var/spack/repos/builtin/packages/wxpropgrid/package.py +++ b/var/spack/repos/builtin/packages/wxpropgrid/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Wxpropgrid(Package): diff --git a/var/spack/repos/builtin/packages/xcb-proto/package.py b/var/spack/repos/builtin/packages/xcb-proto/package.py index 17a94bd892..efcbdf0aea 100644 --- a/var/spack/repos/builtin/packages/xcb-proto/package.py +++ b/var/spack/repos/builtin/packages/xcb-proto/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 XcbProto(Package): diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py index bd02ddcd4b..2efccc3c08 100644 --- a/var/spack/repos/builtin/packages/xerces-c/package.py +++ b/var/spack/repos/builtin/packages/xerces-c/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 XercesC(Package): diff --git a/var/spack/repos/builtin/packages/xz/package.py b/var/spack/repos/builtin/packages/xz/package.py index fdcac95345..b3ef7808aa 100644 --- a/var/spack/repos/builtin/packages/xz/package.py +++ b/var/spack/repos/builtin/packages/xz/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Xz(Package): diff --git a/var/spack/repos/builtin/packages/yasm/package.py b/var/spack/repos/builtin/packages/yasm/package.py index d3a695b16d..e05160c8ea 100644 --- a/var/spack/repos/builtin/packages/yasm/package.py +++ b/var/spack/repos/builtin/packages/yasm/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Yasm(Package): diff --git a/var/spack/repos/builtin/packages/zeromq/package.py b/var/spack/repos/builtin/packages/zeromq/package.py index b5a1e3d4cd..9bdd5861e0 100644 --- a/var/spack/repos/builtin/packages/zeromq/package.py +++ b/var/spack/repos/builtin/packages/zeromq/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Zeromq(Package): diff --git a/var/spack/repos/builtin/packages/zfp/package.py b/var/spack/repos/builtin/packages/zfp/package.py index 620fe9d456..878b65118f 100644 --- a/var/spack/repos/builtin/packages/zfp/package.py +++ b/var/spack/repos/builtin/packages/zfp/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Zfp(Package): diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py index 2770f781ac..e1cbdc7e28 100644 --- a/var/spack/repos/builtin/packages/zlib/package.py +++ b/var/spack/repos/builtin/packages/zlib/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Zlib(Package): diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py index 738dfb508b..841ff3f4a2 100644 --- a/var/spack/repos/builtin/packages/zoltan/package.py +++ b/var/spack/repos/builtin/packages/zoltan/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 +############################################################################## import re, os, glob from spack import * diff --git a/var/spack/repos/builtin/packages/zsh/package.py b/var/spack/repos/builtin/packages/zsh/package.py index 06665f0c83..2c9ed4c6e7 100644 --- a/var/spack/repos/builtin/packages/zsh/package.py +++ b/var/spack/repos/builtin/packages/zsh/package.py @@ -1,3 +1,27 @@ +############################################################################## +# 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 Zsh(Package): -- cgit v1.2.3-70-g09d2 From 68c681bb788c86dc45c4df042f513fbf8a3e2c5f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 12 May 2016 08:59:17 +0200 Subject: document blas and lapack usage in packages --- lib/spack/docs/packaging_guide.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 650e0ee3b2..f7f39d0d7b 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1994,6 +1994,19 @@ instead of hard-coding ``join_path(self.spec['mpi'].prefix.bin, 'mpicc')`` for the reasons outlined above. +Blas and Lapack libraries +~~~~~~~~~~~~~~~~~~~~~~~~~ +Different packages provide implementation of ``Blas`` and ``Lapack`` routines. +The names of the resulting static and/or shared libraries differ from package +to package. In order to make ``install()`` method indifferent to the +choice of ``Blas`` implementation, each package which provides it +sets up ``self.spec.blas_shared_lib`` and ``self.spec.blas_static_lib `` to +point to the shared and static ``Blas`` libraries, respectively. The same +applies to packages which provide ``Lapack``. Package developers are advised to +use these variables, for example ``spec['blas'].blas_shared_lib`` instead of +hard-coding ``join_path(spec['blas'].prefix.lib, 'libopenblas.so')``. + + Forking ``install()`` ~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3-70-g09d2 From 3ece0e7b761755c38f76615fcbd38470940eba61 Mon Sep 17 00:00:00 2001 From: George Zagaris Date: Thu, 12 May 2016 00:42:22 -0700 Subject: Add doxygen version 1.8.11 --- var/spack/repos/builtin/packages/doxygen/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index 994a38ca87..26c6b3899d 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -39,6 +39,7 @@ class Doxygen(Package): homepage = "http://www.stack.nl/~dimitri/doxygen/" url = "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.src.tar.gz" + version('1.8.11', 'f4697a444feaed739cfa2f0644abc19b') version('1.8.10', '79767ccd986f12a0f949015efb5f058f') depends_on("cmake@2.8.12:") -- cgit v1.2.3-70-g09d2 From e2e72b14b2756f046eff185ef65d0ff393b383e2 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 10 May 2016 16:08:58 -0500 Subject: Use new openmp_flag and mpi attributes --- var/spack/repos/builtin/packages/elk/package.py | 39 +++++++++++++++---------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py index 9367dfdd78..9f36647eb6 100644 --- a/var/spack/repos/builtin/packages/elk/package.py +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -25,6 +25,7 @@ from spack import * import spack + class Elk(Package): '''An all-electron full-potential linearised augmented-plane wave (FP-LAPW) code with many advanced features.''' @@ -58,34 +59,29 @@ class Elk(Package): # Dictionary of configuration options config = { 'MAKE': 'make', - 'F90': join_path(spack.build_env_path, 'f90'), - 'F77': join_path(spack.build_env_path, 'f77'), - 'AR': 'ar', - 'LIB_FFT': 'fftlib.a', - 'SRC_MPI': 'mpi_stub.f90', - 'SRC_OMP': 'omp_stub.f90', - 'SRC_libxc': 'libxcifc_stub.f90', - 'SRC_FFT': 'zfftifc.f90' + 'AR': 'ar' } # Compiler-specific flags flags = '' if self.compiler.name == 'intel': - flags = '-O3 -ip -unroll -no-prec-div -openmp' + flags = '-O3 -ip -unroll -no-prec-div' elif self.compiler.name == 'gcc': - flags = '-O3 -ffast-math -funroll-loops -fopenmp' + flags = '-O3 -ffast-math -funroll-loops' elif self.compiler.name == 'pgi': - flags = '-O3 -mp -lpthread' + flags = '-O3 -lpthread' elif self.compiler.name == 'g95': flags = '-O3 -fno-second-underscore' elif self.compiler.name == 'nag': flags = '-O4 -kind=byte -dusty -dcfuns' elif self.compiler.name == 'xl': - flags = '-O3 -qsmp=omp' + flags = '-O3' config['F90_OPTS'] = flags config['F77_OPTS'] = flags # BLAS/LAPACK support + # Note: BLAS/LAPACK must be compiled with OpenMP support + # if the +openmp variant is chosen blas = 'blas.a' lapack = 'lapack.a' if '+blas' in spec: @@ -98,16 +94,25 @@ class Elk(Package): if '+fft' in spec: config['LIB_FFT'] = join_path(spec['fftw'].prefix.lib, 'libfftw3.so') config['SRC_FFT'] = 'zfftifc_fftw.f90' + else: + config['LIB_FFT'] = 'fftlib.a' + config['SRC_FFT'] = 'zfftifc.f90' # MPI support if '+mpi' in spec: - config.pop('SRC_MPI') - config['F90'] = join_path(spec['mpi'].prefix.bin, 'mpif90') - config['F77'] = join_path(spec['mpi'].prefix.bin, 'mpif77') + config['F90'] = join_path(spec['mpi'].mpifc) + config['F77'] = join_path(spec['mpi'].mpif77) + else: + config['F90'] = join_path(spack.build_env_path, 'f90'), + config['F77'] = join_path(spack.build_env_path, 'f77'), + config['SRC_MPI'] = 'mpi_stub.f90' # OpenMP support if '+openmp' in spec: - config.pop('SRC_OMP') + config['F90_OPTS'] += ' ' + self.compiler.openmp_flag + config['F77_OPTS'] += ' ' + self.compiler.openmp_flag + else: + config['SRC_OMP'] = 'omp_stub.f90' # Libxc support if '+libxc' in spec: @@ -120,6 +125,8 @@ class Elk(Package): 'libxc.f90', 'libxcifc.f90' ]) + else: + config['SRC_libxc'] = 'libxcifc_stub.f90' # Write configuration options to include file with open('make.inc', 'w') as inc: -- cgit v1.2.3-70-g09d2 From d7020434d9175b1b831ad5c1b4b2c8d2c10d2df9 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 11 May 2016 10:22:59 -0500 Subject: Use new-ish blas_shared_lib and more flake8 fixes --- var/spack/repos/builtin/packages/elk/package.py | 44 ++++++++++++++----------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py index 9f36647eb6..18c8e9e7bf 100644 --- a/var/spack/repos/builtin/packages/elk/package.py +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -22,8 +22,8 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -from spack import * import spack +from spack import * class Elk(Package): @@ -36,14 +36,20 @@ class Elk(Package): version('3.3.17', 'f57f6230d14f3b3b558e5c71f62f0592') # Elk provides these libraries, but allows you to specify your own - variant('blas', default=True, description='Build with custom BLAS library') - variant('lapack', default=True, description='Build with custom LAPACK library') - variant('fft', default=True, description='Build with custom FFT library') + variant('blas', default=True, + description='Build with custom BLAS library') + variant('lapack', default=True, + description='Build with custom LAPACK library') + variant('fft', default=True, + description='Build with custom FFT library') # Elk does not provide these libraries, but allows you to use them - variant('mpi', default=True, description='Enable MPI parallelism') - variant('openmp', default=True, description='Enable OpenMP support') - variant('libxc', default=True, description='Link to Libxc functional library') + variant('mpi', default=True, + description='Enable MPI parallelism') + variant('openmp', default=True, + description='Enable OpenMP support') + variant('libxc', default=True, + description='Link to Libxc functional library') depends_on('blas', when='+blas') depends_on('lapack', when='+lapack') @@ -54,17 +60,16 @@ class Elk(Package): # Cannot be built in parallel parallel = False - def configure(self, spec): # Dictionary of configuration options config = { - 'MAKE': 'make', - 'AR': 'ar' + 'MAKE': 'make', + 'AR': 'ar' } # Compiler-specific flags flags = '' - if self.compiler.name == 'intel': + if self.compiler.name == 'intel': flags = '-O3 -ip -unroll -no-prec-div' elif self.compiler.name == 'gcc': flags = '-O3 -ffast-math -funroll-loops' @@ -84,15 +89,17 @@ class Elk(Package): # if the +openmp variant is chosen blas = 'blas.a' lapack = 'lapack.a' - if '+blas' in spec: - blas = join_path(spec['blas'].prefix.lib, 'libblas.so') + if '+blas' in spec: + blas = spec['blas'].blas_shared_lib if '+lapack' in spec: - lapack = join_path(spec['lapack'].prefix.lib, 'liblapack.so') - config['LIB_LPK'] = ' '.join([lapack, blas]) # lapack must come before blas + lapack = spec['lapack'].lapack_shared_lib + # lapack must come before blas + config['LIB_LPK'] = ' '.join([lapack, blas]) # FFT support if '+fft' in spec: - config['LIB_FFT'] = join_path(spec['fftw'].prefix.lib, 'libfftw3.so') + config['LIB_FFT'] = join_path(spec['fftw'].prefix.lib, + 'libfftw3.so') config['SRC_FFT'] = 'zfftifc_fftw.f90' else: config['LIB_FFT'] = 'fftlib.a' @@ -100,8 +107,8 @@ class Elk(Package): # MPI support if '+mpi' in spec: - config['F90'] = join_path(spec['mpi'].mpifc) - config['F77'] = join_path(spec['mpi'].mpif77) + config['F90'] = spec['mpi'].mpifc + config['F77'] = spec['mpi'].mpif77 else: config['F90'] = join_path(spack.build_env_path, 'f90'), config['F77'] = join_path(spack.build_env_path, 'f77'), @@ -133,7 +140,6 @@ class Elk(Package): for key in config: inc.write('{0} = {1}\n'.format(key, config[key])) - def install(self, spec, prefix): # Elk only provides an interactive setup script self.configure(spec) -- cgit v1.2.3-70-g09d2 From 3526d9266079a2371e8b2d615fdacd60c59721bc Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 11 May 2016 10:36:11 -0500 Subject: Indentation fix --- var/spack/repos/builtin/packages/elk/package.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py index 18c8e9e7bf..235b6fae0b 100644 --- a/var/spack/repos/builtin/packages/elk/package.py +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -37,19 +37,19 @@ class Elk(Package): # Elk provides these libraries, but allows you to specify your own variant('blas', default=True, - description='Build with custom BLAS library') + description='Build with custom BLAS library') variant('lapack', default=True, - description='Build with custom LAPACK library') + description='Build with custom LAPACK library') variant('fft', default=True, - description='Build with custom FFT library') + description='Build with custom FFT library') # Elk does not provide these libraries, but allows you to use them variant('mpi', default=True, - description='Enable MPI parallelism') + description='Enable MPI parallelism') variant('openmp', default=True, - description='Enable OpenMP support') + description='Enable OpenMP support') variant('libxc', default=True, - description='Link to Libxc functional library') + description='Link to Libxc functional library') depends_on('blas', when='+blas') depends_on('lapack', when='+lapack') @@ -156,4 +156,3 @@ class Elk(Package): install_tree('examples', join_path(prefix, 'examples')) install_tree('species', join_path(prefix, 'species')) - -- cgit v1.2.3-70-g09d2 From 03307f91df80a52e424356f579c68a94a32e7ca7 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 11 May 2016 15:14:16 -0500 Subject: Fix bug when compiling elk~mpi --- var/spack/repos/builtin/packages/elk/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/elk/package.py b/var/spack/repos/builtin/packages/elk/package.py index 235b6fae0b..b089e585dd 100644 --- a/var/spack/repos/builtin/packages/elk/package.py +++ b/var/spack/repos/builtin/packages/elk/package.py @@ -54,7 +54,7 @@ class Elk(Package): depends_on('blas', when='+blas') depends_on('lapack', when='+lapack') depends_on('fftw', when='+fft') - depends_on('mpi', when='+mpi') + depends_on('mpi@2:', when='+mpi') depends_on('libxc', when='+libxc') # Cannot be built in parallel @@ -110,8 +110,8 @@ class Elk(Package): config['F90'] = spec['mpi'].mpifc config['F77'] = spec['mpi'].mpif77 else: - config['F90'] = join_path(spack.build_env_path, 'f90'), - config['F77'] = join_path(spack.build_env_path, 'f77'), + config['F90'] = join_path(spack.build_env_path, 'f90') + config['F77'] = join_path(spack.build_env_path, 'f77') config['SRC_MPI'] = 'mpi_stub.f90' # OpenMP support -- cgit v1.2.3-70-g09d2 From 5e13bba068244db9a71c2b4fc1bc52b85fcb5225 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 12 May 2016 10:30:13 -0700 Subject: Fix #941: add copyright to new package files. - also reworded the boilerplate a bit. --- lib/spack/spack/cmd/create.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 7071af2686..41bfa741f6 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -1,3 +1,4 @@ +_copyright = """\ ############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. @@ -22,6 +23,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 ############################################################################## +""" import string import os import hashlib @@ -47,22 +49,22 @@ from spack.stage import Stage description = "Create a new package file from an archive URL" -package_template = string.Template("""\ -# FIXME: -# This is a template package file for Spack. We've conveniently -# put "FIXME" labels next to all the things you'll want to change. +package_template = string.Template( + _copyright + """ # -# Once you've edited all the FIXME's, delete this whole message, -# save this file, and test out your package like this: +# This is a template package file for Spack. We've put "FIXME" +# next to all the things you'll want to change. Once you've handled +# them, you can save this file and test your package like this: # # spack install ${name} # -# You can always get back here to change things with: +# You can edit this file again by typing: # # spack edit ${name} # -# See the spack documentation for more information on building -# packages. +# See the Spack documentation for more information on packaging. +# If you submit this package back to Spack as a pull request, +# please first remove this boilerplate and all FIXME comments. # from spack import * -- cgit v1.2.3-70-g09d2 From ab41fd6692feb9cdaa29dedf81689e3ff04a5f26 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 12 May 2016 16:21:06 -0500 Subject: Add bertini package Also add missing dependency. Flex would not build for me without bison. It complained about not being able to find `yacc`. --- .../repos/builtin/packages/bertini/package.py | 49 ++++++++++++++++++++++ var/spack/repos/builtin/packages/flex/package.py | 2 + 2 files changed, 51 insertions(+) create mode 100644 var/spack/repos/builtin/packages/bertini/package.py diff --git a/var/spack/repos/builtin/packages/bertini/package.py b/var/spack/repos/builtin/packages/bertini/package.py new file mode 100644 index 0000000000..67e4a945ff --- /dev/null +++ b/var/spack/repos/builtin/packages/bertini/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 Bertini(Package): + """Bertini is a general-purpose solver, written in C, that was created + for research about polynomial continuation. It solves for the numerical + solution of systems of polynomial equations using homotopy continuation.""" + + homepage = "https://bertini.nd.edu/" + url = "https://bertini.nd.edu/BertiniSource_v1.5.tar.gz" + + version('1.5', 'e3f6cc6e7f9a0cf1d73185e8671af707') + + variant('mpi', default=True, description='Compile in parallel') + + depends_on('flex') + depends_on('bison') + depends_on('gmp') + depends_on('mpfr') + depends_on('mpi', when='+mpi') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index 926651010f..99ccf70024 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -33,6 +33,8 @@ class Flex(Package): version('2.6.0', '5724bcffed4ebe39e9b55a9be80859ec') version('2.5.39', 'e133e9ead8ec0a58d81166b461244fde') + depends_on('bison') + def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 088dce709e85d0f522ac2d90c22618a20d421cbc Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 12 May 2016 16:33:37 -0500 Subject: Make flake8 happy --- var/spack/repos/builtin/packages/bertini/package.py | 1 + var/spack/repos/builtin/packages/flex/package.py | 1 + 2 files changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/bertini/package.py b/var/spack/repos/builtin/packages/bertini/package.py index 67e4a945ff..8d7da705e4 100644 --- a/var/spack/repos/builtin/packages/bertini/package.py +++ b/var/spack/repos/builtin/packages/bertini/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Bertini(Package): """Bertini is a general-purpose solver, written in C, that was created for research about polynomial continuation. It solves for the numerical diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index 99ccf70024..f41af061a5 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Flex(Package): """Flex is a tool for generating scanners.""" -- cgit v1.2.3-70-g09d2 From 4c9dd028d2305360329767831e65bafe403c6e8a Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 12 May 2016 17:20:48 -0700 Subject: Fixed error causing hang in env/cc --- lib/spack/env/cc | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 4a3e6eddc9..91916c4532 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -153,6 +153,29 @@ fi # Save original command for debug logging input_command="$@" +# +# Filter '.' and Spack environment directories out of PATH so that +# this script doesn't just call itself +# +IFS=':' read -ra env_path <<< "$PATH" +IFS=':' read -ra spack_env_dirs <<< "$SPACK_ENV_PATH" +spack_env_dirs+=(".") +PATH="" +for dir in "${env_path[@]}"; do + remove="" + for rm_dir in "${spack_env_dirs[@]}"; do + if [ "$dir" = "$rm_dir" ]; then remove=True; fi + done + if [ -z "$remove" ]; then + if [ -z "$PATH" ]; then + PATH="$dir" + else + PATH="$PATH:$dir" + fi + fi +done +export PATH + if [ "$mode" == vcheck ] ; then exec ${command} "$@" fi @@ -317,29 +340,6 @@ unset LD_LIBRARY_PATH unset LD_RUN_PATH unset DYLD_LIBRARY_PATH -# -# Filter '.' and Spack environment directories out of PATH so that -# this script doesn't just call itself -# -IFS=':' read -ra env_path <<< "$PATH" -IFS=':' read -ra spack_env_dirs <<< "$SPACK_ENV_PATH" -spack_env_dirs+=(".") -PATH="" -for dir in "${env_path[@]}"; do - remove="" - for rm_dir in "${spack_env_dirs[@]}"; do - if [ "$dir" = "$rm_dir" ]; then remove=True; fi - done - if [ -z "$remove" ]; then - if [ -z "$PATH" ]; then - PATH="$dir" - else - PATH="$PATH:$dir" - fi - fi -done -export PATH - full_command=("$command") full_command+=("${args[@]}") -- cgit v1.2.3-70-g09d2 From b8a91db08948440100a2d4d6a0cad01f1eb9b33a Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Thu, 12 May 2016 20:04:45 -0700 Subject: Intel software packages and license enhancements --- lib/spack/spack/hooks/licensing.py | 5 +- lib/spack/spack/package.py | 10 +- var/spack/repos/builtin/packages/daal/package.py | 27 +++++ .../packages/intel-parallelstudio/package.py | 112 ++++++++++++++++++++ var/spack/repos/builtin/packages/intel/package.py | 117 +++++++++++++++++++++ var/spack/repos/builtin/packages/ipp/package.py | 25 +++++ var/spack/repos/builtin/packages/mkl/package.py | 27 +++++ 7 files changed, 319 insertions(+), 4 deletions(-) create mode 100644 var/spack/repos/builtin/packages/daal/package.py create mode 100644 var/spack/repos/builtin/packages/intel-parallelstudio/package.py create mode 100644 var/spack/repos/builtin/packages/intel/package.py create mode 100644 var/spack/repos/builtin/packages/ipp/package.py create mode 100644 var/spack/repos/builtin/packages/mkl/package.py diff --git a/lib/spack/spack/hooks/licensing.py b/lib/spack/spack/hooks/licensing.py index 0f63b0e05a..f5d3ebd98c 100644 --- a/lib/spack/spack/hooks/licensing.py +++ b/lib/spack/spack/hooks/licensing.py @@ -26,7 +26,7 @@ import os import spack import llnl.util.tty as tty -from llnl.util.filesystem import join_path +from llnl.util.filesystem import join_path, mkdirp def pre_install(pkg): @@ -154,6 +154,9 @@ def symlink_license(pkg): target = pkg.global_license_file for filename in pkg.license_files: link_name = join_path(pkg.prefix, filename) + license_dir = os.path.split(link_name)[0] + if not os.path.exists(license_dir): + mkdirp(license_dir) if os.path.exists(target): os.symlink(target, link_name) tty.msg("Added local symlink %s to global license file" % diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 8167341127..cda6a4be18 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -397,14 +397,18 @@ class Package(object): if self.is_extension: spack.repo.get(self.extendee_spec)._check_extendable() + @property + def global_license_dir(self): + """Returns the path where a global license file should be stored.""" + spack_root = ancestor(__file__, 4) + return join_path(spack_root, 'etc', 'spack', 'licenses') + @property def global_license_file(self): """Returns the path where a global license file should be stored.""" if not self.license_files: return - spack_root = ancestor(__file__, 4) - global_license_dir = join_path(spack_root, 'etc', 'spack', 'licenses') - return join_path(global_license_dir, self.name, + return join_path(self.global_license_dir, self.name, os.path.basename(self.license_files[0])) @property diff --git a/var/spack/repos/builtin/packages/daal/package.py b/var/spack/repos/builtin/packages/daal/package.py new file mode 100644 index 0000000000..16ae048a4c --- /dev/null +++ b/var/spack/repos/builtin/packages/daal/package.py @@ -0,0 +1,27 @@ +from spack import * +import sys, os, re + +from spack.pkg.builtin.intel import IntelInstaller + +class Daal(IntelInstaller): + """Intel Data Analytics Accesleration Library. + + Note: You will have to add the download file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "https://software.intel.com/en-us/daal" + + version('2016.2.181', 'aad2aa70e5599ebfe6f85b29d8719d46', + url="file://%s/l_daal_2016.2.181.tgz" % os.getcwd()) + version('2016.3.210', 'ad747c0dd97dace4cad03cf2266cad28', + url="file://%s/l_daal_2016.3.210.tgz" % os.getcwd()) + + def install(self, spec, prefix): + + self.intel_prefix = os.path.join(prefix, "pkg") + IntelInstaller.install(self, spec, prefix) + + daal_dir = os.path.join(self.intel_prefix, "daal") + for f in os.listdir(daal_dir): + os.symlink(os.path.join(daal_dir, f), os.path.join(self.prefix, f)) diff --git a/var/spack/repos/builtin/packages/intel-parallelstudio/package.py b/var/spack/repos/builtin/packages/intel-parallelstudio/package.py new file mode 100644 index 0000000000..127a89654d --- /dev/null +++ b/var/spack/repos/builtin/packages/intel-parallelstudio/package.py @@ -0,0 +1,112 @@ +from spack import * +import sys, os, re + +from spack.pkg.builtin.intel import IntelInstaller, filter_pick + +class IntelParallelstudio(IntelInstaller): + """Intel Parallel Studio. + + Note: You will have to add the download file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe" + + # TODO: can also try the online installer (will download files on demand) + version('composer.2016.2', '1133fb831312eb519f7da897fec223fa', + url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" % os.getcwd()) + version('professional.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', + url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) + version('cluster.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', + url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) + version('composer.2016.3', '3208eeabee951fc27579177b593cefe9', + url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" % os.getcwd()) + version('professional.2016.3', 'eda19bb0d0d19709197ede58f13443f3', + url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) + version('cluster.2016.3', 'eda19bb0d0d19709197ede58f13443f3', + url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) + + variant('rpath', default=True, description="Add rpath to .cfg files") + variant('all', default=False, description="Install all files associated with the requested edition") + variant('mpi', default=True, description="Install the Intel MPI library and ITAC tool") + variant('mkl', default=True, description="Install the Intel MKL library") + variant('daal', default=True, description="Install the Intel DAAL libraries") + variant('ipp', default=True, description="Install the Intel IPP libraries") + variant('tools', default=True, description="Install the Intel Advisor, VTune Amplifier, and Inspector tools") + + provides('mpi', when='@cluster:+mpi') + provides('mkl', when='+mkl') + provides('daal', when='+daal') + provides('ipp', when='+ipp') + + def install(self, spec, prefix): + + # remove the installation DB, otherwise it will try to install into location of other Intel builds + try: + os.remove(os.path.join(os.environ["HOME"], "intel", "intel_sdp_products.db")) + except OSError: + pass # if the file does not exist + + base_components = "ALL" # when in doubt, install everything + mpi_components = "" + mkl_components = "" + daal_components = "" + ipp_components = "" + tools_components = "" + + if spec.satisfies('+all'): + base_components = "ALL" + else: + with open("pset/mediaconfig.xml", "r") as f: + lines = f.readlines() + all_components = [] + for line in lines: + if line.find('') != -1: + component = line[line.find('') + 6:line.find('')] + all_components.append(component) + base_components = filter_pick(all_components, re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)').search) + mpi_components = filter_pick(all_components, re.compile('(icsxe|imb|mpi|itac|intel-tc|clck)').search) + mkl_components = filter_pick(all_components, re.compile('(mkl)').search) + daal_components = filter_pick(all_components, re.compile('(daal)').search) + ipp_components = filter_pick(all_components, re.compile('(ipp)').search) + tool_components = filter_pick(all_components, re.compile('(gdb|vtune|inspector|advisor)').search) + + components = base_components + if not spec.satisfies('+all'): + if spec.satisfies('+mpi') and 'cluster' in str(spec.version): + components += mpi_components + if spec.satisfies('+mkl'): + components += mkl_components + if spec.satisfies('+daal'): + components += daal_components + if spec.satisfies('+ipp'): + components += ipp_components + if spec.satisfies('+tools') and (spec.satisfies('@cluster') or spec.satisfies('@professional')): + components += tool_components + + self.intel_components = ';'.join(components) + IntelInstaller.install(self, spec, prefix) + + absbindir = os.path.split(os.path.realpath(os.path.join(self.prefix.bin, "icc")))[0] + abslibdir = os.path.split(os.path.realpath(os.path.join(self.prefix.lib, "intel64", "libimf.a")))[0] + + # symlink or copy? + os.symlink(self.global_license_file, os.path.join(absbindir, "license.lic")) + if spec.satisfies('+tools') and (spec.satisfies('@cluster') or spec.satisfies('@professional')): + os.mkdir(os.path.join(self.prefix, "inspector_xe/licenses")) + os.symlink(self.global_license_file, os.path.join(self.prefix, "inspector_xe/licenses", "license.lic")) + os.mkdir(os.path.join(self.prefix, "advisor_xe/licenses")) + os.symlink(self.global_license_file, os.path.join(self.prefix, "advisor_xe/licenses", "license.lic")) + os.mkdir(os.path.join(self.prefix, "vtune_amplifier_xe/licenses")) + os.symlink(self.global_license_file, os.path.join(self.prefix, "vtune_amplifier_xe/licenses", "license.lic")) + + if (spec.satisfies('+all') or spec.satisfies('+mpi')) and spec.satisfies('@cluster'): + os.symlink(self.global_license_file, os.path.join(self.prefix, "itac_latest", "license.lic")) + + if spec.satisfies('+rpath'): + for compiler_command in ["icc", "icpc", "ifort"]: + cfgfilename = os.path.join(absbindir, "%s.cfg" %(compiler_command)) + with open(cfgfilename, "w") as f: + f.write('-Xlinker -rpath -Xlinker %s\n' %(abslibdir)) + + os.symlink(os.path.join(self.prefix.man, "common", "man1"), os.path.join(self.prefix.man, "man1")) diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py new file mode 100644 index 0000000000..e51cc773af --- /dev/null +++ b/var/spack/repos/builtin/packages/intel/package.py @@ -0,0 +1,117 @@ +from spack import * +import sys, os, re + +def filter_pick(input_list, regex_filter): + return [l for l in input_list for m in (regex_filter(l),) if m] + +def unfilter_pick(input_list, regex_filter): + return [l for l in input_list for m in (regex_filter(l),) if not m] + +def get_all_components(): + all_components = [] + with open("pset/mediaconfig.xml", "r") as f: + lines = f.readlines() + for line in lines: + if line.find('') != -1: + component = line[line.find('') + 6:line.find('')] + all_components.append(component) + return all_components + +class IntelInstaller(Package): + """Base package containing common methods for installing Intel software""" + + homepage = "https://software.intel.com/en-us" + intel_components = "ALL" + license_required = True + license_comment = '#' + license_files = ['Licenses/license.lic'] + license_vars = ['INTEL_LICENSE_FILE'] + license_url = 'https://software.intel.com/en-us/articles/intel-license-manager-faq' + + @property + def global_license_file(self): + """Returns the path where a global license file should be stored.""" + if not self.license_files: + return + return join_path(self.global_license_dir, "intel", + os.path.basename(self.license_files[0])) + + def install(self, spec, prefix): + + # remove the installation DB, otherwise it will try to install into location of other Intel builds + try: + os.remove(os.path.join(os.environ["HOME"], "intel", "intel_sdp_products.db")) + except OSError: + pass # if the file does not exist + + if not hasattr(self, "intel_prefix"): + self.intel_prefix = self.prefix + + silent_config_filename = 'silent.cfg' + with open(silent_config_filename, 'w') as f: + f.write(""" +ACCEPT_EULA=accept +PSET_MODE=install +CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes +PSET_INSTALL_DIR=%s +ACTIVATION_LICENSE_FILE=%s +ACTIVATION_TYPE=license_file +PHONEHOME_SEND_USAGE_DATA=no +COMPONENTS=%s +""" %(self.intel_prefix, self.global_license_file, self.intel_components)) + + install_script = which("install.sh") + install_script('--silent', silent_config_filename) + + +class Intel(IntelInstaller): + """Intel Compilers. + + Note: You will have to add the download file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe" + + # TODO: can also try the online installer (will download files on demand) + version('16.0.2', '1133fb831312eb519f7da897fec223fa', + url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" % os.getcwd()) + version('16.0.3', '3208eeabee951fc27579177b593cefe9', + url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" % os.getcwd()) + + variant('rpath', default=True, description="Add rpath to .cfg files") + + def install(self, spec, prefix): + + # remove the installation DB, otherwise it will try to install into location of other Intel builds + try: + os.remove(os.path.join(os.environ["HOME"], "intel", "intel_sdp_products.db")) + except OSError: + pass # if the file does not exist + + components = [] + with open("pset/mediaconfig.xml", "r") as f: + lines = f.readlines() + all_components = [] + for line in lines: + if line.find('') != -1: + component = line[line.find('') + 6:line.find('')] + all_components.append(component) + components = filter_pick(all_components, re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)').search) + + self.intel_components = ';'.join(components) + IntelInstaller.install(self, spec, prefix) + + absbindir = os.path.split(os.path.realpath(os.path.join(self.prefix.bin, "icc")))[0] + abslibdir = os.path.split(os.path.realpath(os.path.join(self.prefix.lib, "intel64", "libimf.a")))[0] + + # symlink or copy? + os.symlink(self.global_license_file, os.path.join(absbindir, "license.lic")) + + if spec.satisfies('+rpath'): + for compiler_command in ["icc", "icpc", "ifort"]: + cfgfilename = os.path.join(absbindir, "%s.cfg" %(compiler_command)) + with open(cfgfilename, "w") as f: + f.write('-Xlinker -rpath -Xlinker %s\n' %(abslibdir)) + + os.symlink(os.path.join(self.prefix.man, "common", "man1"), os.path.join(self.prefix.man, "man1")) diff --git a/var/spack/repos/builtin/packages/ipp/package.py b/var/spack/repos/builtin/packages/ipp/package.py new file mode 100644 index 0000000000..23c944c2d5 --- /dev/null +++ b/var/spack/repos/builtin/packages/ipp/package.py @@ -0,0 +1,25 @@ +from spack import * +import sys, os, re + +from spack.pkg.builtin.intel import IntelInstaller + +class Ipp(IntelInstaller): + """Intel Integrated Performance Primitives. + + Note: You will have to add the download file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "https://software.intel.com/en-us/intel-ipp" + + version('9.0.3.210', '0e1520dd3de7f811a6ef6ebc7aa429a3', + url="file://%s/l_ipp_9.0.3.210.tgz" % os.getcwd()) + + def install(self, spec, prefix): + + self.intel_prefix = os.path.join(prefix, "pkg") + IntelInstaller.install(self, spec, prefix) + + ipp_dir = os.path.join(self.intel_prefix, "ipp") + for f in os.listdir(ipp_dir): + os.symlink(os.path.join(ipp_dir, f), os.path.join(self.prefix, f)) diff --git a/var/spack/repos/builtin/packages/mkl/package.py b/var/spack/repos/builtin/packages/mkl/package.py new file mode 100644 index 0000000000..1d4553b7f5 --- /dev/null +++ b/var/spack/repos/builtin/packages/mkl/package.py @@ -0,0 +1,27 @@ +from spack import * +import os, re, sys + +from spack.pkg.builtin.intel import IntelInstaller + +class Mkl(IntelInstaller): + """Intel Math Kernel Library. + + Note: You will have to add the download file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "https://software.intel.com/en-us/intel-mkl" + + version('11.3.2.181', '536dbd82896d6facc16de8f961d17d65', + url="file://%s/l_mkl_11.3.2.181.tgz" % os.getcwd()) + version('11.3.3.210', 'f72546df27f5ebb0941b5d21fd804e34', + url="file://%s/l_mkl_11.3.3.210.tgz" % os.getcwd()) + + def install(self, spec, prefix): + + self.intel_prefix = os.path.join(prefix, "pkg") + IntelInstaller.install(self, spec, prefix) + + mkl_dir = os.path.join(self.intel_prefix, "mkl") + for f in os.listdir(mkl_dir): + os.symlink(os.path.join(mkl_dir, f), os.path.join(self.prefix, f)) -- cgit v1.2.3-70-g09d2 From e763eeacdde4bd63d5beb1fee0ca6eb8593a0884 Mon Sep 17 00:00:00 2001 From: George Zagaris Date: Thu, 12 May 2016 21:30:11 -0700 Subject: fix format in doxygen/package.py --- var/spack/repos/builtin/packages/doxygen/package.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index 26c6b3899d..b8f15dee14 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -22,20 +22,21 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -#------------------------------------------------------------------------------ + # Author: Justin Too # Date: September 11, 2015 -#------------------------------------------------------------------------------ from spack import * import sys + class Doxygen(Package): """Doxygen is the de facto standard tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, - Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some extent D.. - """ + Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some + extent D..""" + homepage = "http://www.stack.nl/~dimitri/doxygen/" url = "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.10.src.tar.gz" @@ -47,7 +48,6 @@ class Doxygen(Package): depends_on("flex", sys.platform != 'darwin') depends_on("bison", sys.platform != 'darwin') - def install(self, spec, prefix): cmake('.', *std_cmake_args) -- cgit v1.2.3-70-g09d2 From 67999d1b1cf58a46543975320c36fb42cd39e9b5 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 13 May 2016 15:31:46 +0200 Subject: astyle: fix filter command which failed on OSX with python 2.7.10 --- var/spack/repos/builtin/packages/astyle/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py index cd6f1d04f1..815c184577 100644 --- a/var/spack/repos/builtin/packages/astyle/package.py +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -41,7 +41,7 @@ class Astyle(Package): # we need to edit the makefile in place to set compiler: make_file = join_path(self.stage.source_path, 'build', 'gcc', 'Makefile') - filter_file(r'^CXX\s*=.*', 'CXX=%s'.format(spack_cxx), make_file) + filter_file(r'^CXX\s*=.*', 'CXX=%s' % spack_cxx, make_file) make('-f', make_file, -- cgit v1.2.3-70-g09d2 From 8db35ab9a282c2a609afc846abb76f4bd22b836e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 13 May 2016 10:10:38 +0200 Subject: openblas: use spack_cc/spack_f77 and add a note on compiler mixing --- var/spack/repos/builtin/packages/openblas/package.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index ebfec4bded..22e49daaa7 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -48,11 +48,13 @@ class Openblas(Package): patch('make.patch') def install(self, spec, prefix): - # Openblas is picky about compilers. Configure fails with - # FC=/abs/path/to/f77, whereas FC=f77 works fine. - # To circumvent this, provide basename only: - make_defs = ['CC=%s' % os.path.basename(spack_cc), - 'FC=%s' % os.path.basename(spack_f77), + # Configure fails to pick up fortran from FC=/abs/path/to/f77, but + # works fine with FC=/abs/path/to/gfortran. + # When mixing compilers make sure that + # $SPACK_ROOT/lib/spack/env/ have symlinks with reasonable + # names and hack them inside lib/spack/spack/compilers/.py + make_defs = ['CC=%s' % spack_cc, + 'FC=%s' % spack_f77, 'MAKE_NO_J=1'] make_targets = ['libs', 'netlib'] -- cgit v1.2.3-70-g09d2 From f43cab0951e5023736d3e332d747e0db212acb72 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 13 May 2016 14:39:20 -0700 Subject: fixed pkgconfig issue --- lib/spack/spack/build_environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 82d0792e26..8016bc4151 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -232,7 +232,7 @@ def set_build_environment_variables(pkg): pcdir = join_path(p, libdir, 'pkgconfig') if os.path.isdir(pcdir): pkg_config_dirs.append(pcdir) - path_set("PKG_CONFIG_PATH", pkg_config_dirs) + path_put_first("PKG_CONFIG_PATH", pkg_config_dirs) if pkg.spec.architecture.target.module_name: load_module(pkg.spec.architecture.target.module_name) -- cgit v1.2.3-70-g09d2 From fce6ecb05c2aa8f025c27f4245994efef2987b38 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 13 May 2016 15:04:06 -0700 Subject: Changed _proper_compiler_spec to return filtered list. Apparently filter returns a list rather than filtering the original list. Lead to compiler finding problems if user specified frontend compilers --- lib/spack/spack/concretize.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 58ea83ac4a..9ad5271542 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -301,8 +301,9 @@ class DefaultConcretizer(object): # Should think whether this can be more efficient def _proper_compiler_style(cspec, architecture): compilers = spack.compilers.compilers_for_spec(cspec) - filter(lambda c: c.operating_system == architecture.platform_os, compilers) - return compilers + return filter(lambda c: c.operating_system == + architecture.platform_os, compilers) + #return compilers all_compilers = spack.compilers.all_compilers() -- cgit v1.2.3-70-g09d2 From e9b71872a8d590d342e4cfcc78ff9855cff7fc24 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Fri, 13 May 2016 15:16:07 -0700 Subject: addressed PR#946 comments from @adamjstewart --- lib/spack/spack/hooks/licensing.py | 2 +- lib/spack/spack/package.py | 6 +- var/spack/repos/builtin/packages/daal/package.py | 2 +- .../packages/intel-parallel-studio/package.py | 100 ++++++++++++++++++ .../packages/intel-parallelstudio/package.py | 112 --------------------- var/spack/repos/builtin/packages/intel/package.py | 17 ++-- 6 files changed, 112 insertions(+), 127 deletions(-) create mode 100644 var/spack/repos/builtin/packages/intel-parallel-studio/package.py delete mode 100644 var/spack/repos/builtin/packages/intel-parallelstudio/package.py diff --git a/lib/spack/spack/hooks/licensing.py b/lib/spack/spack/hooks/licensing.py index f5d3ebd98c..9010b84154 100644 --- a/lib/spack/spack/hooks/licensing.py +++ b/lib/spack/spack/hooks/licensing.py @@ -154,7 +154,7 @@ def symlink_license(pkg): target = pkg.global_license_file for filename in pkg.license_files: link_name = join_path(pkg.prefix, filename) - license_dir = os.path.split(link_name)[0] + license_dir = os.path.dirname(link_name) if not os.path.exists(license_dir): mkdirp(license_dir) if os.path.exists(target): diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index cda6a4be18..fa3ece47f7 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -399,13 +399,15 @@ class Package(object): @property def global_license_dir(self): - """Returns the path where a global license file should be stored.""" + """Returns the directory where global license files for all + packages are stored.""" spack_root = ancestor(__file__, 4) return join_path(spack_root, 'etc', 'spack', 'licenses') @property def global_license_file(self): - """Returns the path where a global license file should be stored.""" + """Returns the path where a global license file for this + particular package should be stored.""" if not self.license_files: return return join_path(self.global_license_dir, self.name, diff --git a/var/spack/repos/builtin/packages/daal/package.py b/var/spack/repos/builtin/packages/daal/package.py index 16ae048a4c..9fdbd7bf5e 100644 --- a/var/spack/repos/builtin/packages/daal/package.py +++ b/var/spack/repos/builtin/packages/daal/package.py @@ -4,7 +4,7 @@ import sys, os, re from spack.pkg.builtin.intel import IntelInstaller class Daal(IntelInstaller): - """Intel Data Analytics Accesleration Library. + """Intel Data Analytics Acceleration Library. Note: You will have to add the download file to a mirror so that Spack can find it. For instructions on how to set up a diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py new file mode 100644 index 0000000000..3a44cb32a3 --- /dev/null +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -0,0 +1,100 @@ +from spack import * +import sys, os, re + +from spack.pkg.builtin.intel import IntelInstaller, filter_pick, get_all_components + +class IntelParallelStudio(IntelInstaller): + """Intel Parallel Studio. + + Note: You will have to add the download file to a + mirror so that Spack can find it. For instructions on how to set up a + mirror, see http://software.llnl.gov/spack/mirrors.html""" + + homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe" + + # TODO: can also try the online installer (will download files on demand) + version('composer.2016.2', '1133fb831312eb519f7da897fec223fa', + url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" % os.getcwd()) + version('professional.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', + url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) + version('cluster.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', + url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) + version('composer.2016.3', '3208eeabee951fc27579177b593cefe9', + url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" % os.getcwd()) + version('professional.2016.3', 'eda19bb0d0d19709197ede58f13443f3', + url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) + version('cluster.2016.3', 'eda19bb0d0d19709197ede58f13443f3', + url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) + + variant('rpath', default=True, description="Add rpath to .cfg files") + variant('all', default=False, description="Install all files associated with the requested edition") + variant('mpi', default=True, description="Install the Intel MPI library and ITAC tool") + variant('mkl', default=True, description="Install the Intel MKL library") + variant('daal', default=True, description="Install the Intel DAAL libraries") + variant('ipp', default=True, description="Install the Intel IPP libraries") + variant('tools', default=True, description="Install the Intel Advisor, VTune Amplifier, and Inspector tools") + + provides('mpi', when='@cluster:+mpi') + provides('mkl', when='+mkl') + provides('daal', when='+daal') + provides('ipp', when='+ipp') + + def install(self, spec, prefix): + + base_components = "ALL" # when in doubt, install everything + mpi_components = "" + mkl_components = "" + daal_components = "" + ipp_components = "" + tools_components = "" + + if spec.satisfies('+all'): + base_components = "ALL" + else: + all_components = get_all_components() + base_components = filter_pick(all_components, re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)').search) + mpi_components = filter_pick(all_components, re.compile('(icsxe|imb|mpi|itac|intel-tc|clck)').search) + mkl_components = filter_pick(all_components, re.compile('(mkl)').search) + daal_components = filter_pick(all_components, re.compile('(daal)').search) + ipp_components = filter_pick(all_components, re.compile('(ipp)').search) + tool_components = filter_pick(all_components, re.compile('(gdb|vtune|inspector|advisor)').search) + + components = base_components + if not spec.satisfies('+all'): + if spec.satisfies('+mpi') and 'cluster' in str(spec.version): + components += mpi_components + if spec.satisfies('+mkl'): + components += mkl_components + if spec.satisfies('+daal'): + components += daal_components + if spec.satisfies('+ipp'): + components += ipp_components + if spec.satisfies('+tools') and (spec.satisfies('@cluster') or spec.satisfies('@professional')): + components += tool_components + + self.intel_components = ';'.join(components) + IntelInstaller.install(self, spec, prefix) + + absbindir = os.path.dirname(os.path.realpath(os.path.join(self.prefix.bin, "icc"))) + abslibdir = os.path.dirname(os.path.realpath(os.path.join(self.prefix.lib, "intel64", "libimf.a"))) + + relbindir = absbindir.strip(os.path.commonprefix([self.prefix, absbindir])) + os.symlink(self.global_license_file, os.path.join(absbindir, "license.lic")) + if spec.satisfies('+tools') and (spec.satisfies('@cluster') or spec.satisfies('@professional')): + os.mkdir(os.path.join(self.prefix, "inspector_xe/licenses")) + os.symlink(self.global_license_file, os.path.join(self.prefix, "inspector_xe/licenses", "license.lic")) + os.mkdir(os.path.join(self.prefix, "advisor_xe/licenses")) + os.symlink(self.global_license_file, os.path.join(self.prefix, "advisor_xe/licenses", "license.lic")) + os.mkdir(os.path.join(self.prefix, "vtune_amplifier_xe/licenses")) + os.symlink(self.global_license_file, os.path.join(self.prefix, "vtune_amplifier_xe/licenses", "license.lic")) + + if (spec.satisfies('+all') or spec.satisfies('+mpi')) and spec.satisfies('@cluster'): + os.symlink(self.global_license_file, os.path.join(self.prefix, "itac_latest", "license.lic")) + + if spec.satisfies('+rpath'): + for compiler_command in ["icc", "icpc", "ifort"]: + cfgfilename = os.path.join(absbindir, "%s.cfg" %(compiler_command)) + with open(cfgfilename, "w") as f: + f.write('-Xlinker -rpath -Xlinker %s\n' %(abslibdir)) + + os.symlink(os.path.join(self.prefix.man, "common", "man1"), os.path.join(self.prefix.man, "man1")) diff --git a/var/spack/repos/builtin/packages/intel-parallelstudio/package.py b/var/spack/repos/builtin/packages/intel-parallelstudio/package.py deleted file mode 100644 index 127a89654d..0000000000 --- a/var/spack/repos/builtin/packages/intel-parallelstudio/package.py +++ /dev/null @@ -1,112 +0,0 @@ -from spack import * -import sys, os, re - -from spack.pkg.builtin.intel import IntelInstaller, filter_pick - -class IntelParallelstudio(IntelInstaller): - """Intel Parallel Studio. - - Note: You will have to add the download file to a - mirror so that Spack can find it. For instructions on how to set up a - mirror, see http://software.llnl.gov/spack/mirrors.html""" - - homepage = "https://software.intel.com/en-us/intel-parallel-studio-xe" - - # TODO: can also try the online installer (will download files on demand) - version('composer.2016.2', '1133fb831312eb519f7da897fec223fa', - url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" % os.getcwd()) - version('professional.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', - url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) - version('cluster.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', - url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) - version('composer.2016.3', '3208eeabee951fc27579177b593cefe9', - url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" % os.getcwd()) - version('professional.2016.3', 'eda19bb0d0d19709197ede58f13443f3', - url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) - version('cluster.2016.3', 'eda19bb0d0d19709197ede58f13443f3', - url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) - - variant('rpath', default=True, description="Add rpath to .cfg files") - variant('all', default=False, description="Install all files associated with the requested edition") - variant('mpi', default=True, description="Install the Intel MPI library and ITAC tool") - variant('mkl', default=True, description="Install the Intel MKL library") - variant('daal', default=True, description="Install the Intel DAAL libraries") - variant('ipp', default=True, description="Install the Intel IPP libraries") - variant('tools', default=True, description="Install the Intel Advisor, VTune Amplifier, and Inspector tools") - - provides('mpi', when='@cluster:+mpi') - provides('mkl', when='+mkl') - provides('daal', when='+daal') - provides('ipp', when='+ipp') - - def install(self, spec, prefix): - - # remove the installation DB, otherwise it will try to install into location of other Intel builds - try: - os.remove(os.path.join(os.environ["HOME"], "intel", "intel_sdp_products.db")) - except OSError: - pass # if the file does not exist - - base_components = "ALL" # when in doubt, install everything - mpi_components = "" - mkl_components = "" - daal_components = "" - ipp_components = "" - tools_components = "" - - if spec.satisfies('+all'): - base_components = "ALL" - else: - with open("pset/mediaconfig.xml", "r") as f: - lines = f.readlines() - all_components = [] - for line in lines: - if line.find('') != -1: - component = line[line.find('') + 6:line.find('')] - all_components.append(component) - base_components = filter_pick(all_components, re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)').search) - mpi_components = filter_pick(all_components, re.compile('(icsxe|imb|mpi|itac|intel-tc|clck)').search) - mkl_components = filter_pick(all_components, re.compile('(mkl)').search) - daal_components = filter_pick(all_components, re.compile('(daal)').search) - ipp_components = filter_pick(all_components, re.compile('(ipp)').search) - tool_components = filter_pick(all_components, re.compile('(gdb|vtune|inspector|advisor)').search) - - components = base_components - if not spec.satisfies('+all'): - if spec.satisfies('+mpi') and 'cluster' in str(spec.version): - components += mpi_components - if spec.satisfies('+mkl'): - components += mkl_components - if spec.satisfies('+daal'): - components += daal_components - if spec.satisfies('+ipp'): - components += ipp_components - if spec.satisfies('+tools') and (spec.satisfies('@cluster') or spec.satisfies('@professional')): - components += tool_components - - self.intel_components = ';'.join(components) - IntelInstaller.install(self, spec, prefix) - - absbindir = os.path.split(os.path.realpath(os.path.join(self.prefix.bin, "icc")))[0] - abslibdir = os.path.split(os.path.realpath(os.path.join(self.prefix.lib, "intel64", "libimf.a")))[0] - - # symlink or copy? - os.symlink(self.global_license_file, os.path.join(absbindir, "license.lic")) - if spec.satisfies('+tools') and (spec.satisfies('@cluster') or spec.satisfies('@professional')): - os.mkdir(os.path.join(self.prefix, "inspector_xe/licenses")) - os.symlink(self.global_license_file, os.path.join(self.prefix, "inspector_xe/licenses", "license.lic")) - os.mkdir(os.path.join(self.prefix, "advisor_xe/licenses")) - os.symlink(self.global_license_file, os.path.join(self.prefix, "advisor_xe/licenses", "license.lic")) - os.mkdir(os.path.join(self.prefix, "vtune_amplifier_xe/licenses")) - os.symlink(self.global_license_file, os.path.join(self.prefix, "vtune_amplifier_xe/licenses", "license.lic")) - - if (spec.satisfies('+all') or spec.satisfies('+mpi')) and spec.satisfies('@cluster'): - os.symlink(self.global_license_file, os.path.join(self.prefix, "itac_latest", "license.lic")) - - if spec.satisfies('+rpath'): - for compiler_command in ["icc", "icpc", "ifort"]: - cfgfilename = os.path.join(absbindir, "%s.cfg" %(compiler_command)) - with open(cfgfilename, "w") as f: - f.write('-Xlinker -rpath -Xlinker %s\n' %(abslibdir)) - - os.symlink(os.path.join(self.prefix.man, "common", "man1"), os.path.join(self.prefix.man, "man1")) diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py index e51cc773af..a547ab56db 100644 --- a/var/spack/repos/builtin/packages/intel/package.py +++ b/var/spack/repos/builtin/packages/intel/package.py @@ -2,12 +2,15 @@ from spack import * import sys, os, re def filter_pick(input_list, regex_filter): + """Returns the items in input_list that are found in the regex_filter""" return [l for l in input_list for m in (regex_filter(l),) if m] def unfilter_pick(input_list, regex_filter): + """Returns the items in input_list that are not found in the regex_filter""" return [l for l in input_list for m in (regex_filter(l),) if not m] def get_all_components(): + """Returns a list of all the components associated with the downloaded Intel package""" all_components = [] with open("pset/mediaconfig.xml", "r") as f: lines = f.readlines() @@ -39,10 +42,8 @@ class IntelInstaller(Package): def install(self, spec, prefix): # remove the installation DB, otherwise it will try to install into location of other Intel builds - try: + if os.path.exists(os.path.join(os.environ["HOME"], "intel", "intel_sdp_products.db")): os.remove(os.path.join(os.environ["HOME"], "intel", "intel_sdp_products.db")) - except OSError: - pass # if the file does not exist if not hasattr(self, "intel_prefix"): self.intel_prefix = self.prefix @@ -90,14 +91,8 @@ class Intel(IntelInstaller): pass # if the file does not exist components = [] - with open("pset/mediaconfig.xml", "r") as f: - lines = f.readlines() - all_components = [] - for line in lines: - if line.find('') != -1: - component = line[line.find('') + 6:line.find('')] - all_components.append(component) - components = filter_pick(all_components, re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)').search) + all_components = get_all_components() + components = filter_pick(all_components, re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)').search) self.intel_components = ';'.join(components) IntelInstaller.install(self, spec, prefix) -- cgit v1.2.3-70-g09d2 From e3cd0a67d020b73e5fdc6cfeb4ee874d49f2c305 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Fri, 13 May 2016 16:12:48 -0700 Subject: address flake8 issues --- var/spack/repos/builtin/packages/daal/package.py | 3 +- .../packages/intel-parallel-studio/package.py | 95 ++++++++++++++-------- var/spack/repos/builtin/packages/intel/package.py | 60 ++++++++------ var/spack/repos/builtin/packages/ipp/package.py | 3 +- var/spack/repos/builtin/packages/mkl/package.py | 3 +- 5 files changed, 104 insertions(+), 60 deletions(-) diff --git a/var/spack/repos/builtin/packages/daal/package.py b/var/spack/repos/builtin/packages/daal/package.py index 9fdbd7bf5e..e13dd80e19 100644 --- a/var/spack/repos/builtin/packages/daal/package.py +++ b/var/spack/repos/builtin/packages/daal/package.py @@ -1,8 +1,9 @@ from spack import * -import sys, os, re +import os from spack.pkg.builtin.intel import IntelInstaller + class Daal(IntelInstaller): """Intel Data Analytics Acceleration Library. diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py index 3a44cb32a3..db6cc888dd 100644 --- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -1,8 +1,10 @@ from spack import * -import sys, os, re +import os +import re from spack.pkg.builtin.intel import IntelInstaller, filter_pick, get_all_components + class IntelParallelStudio(IntelInstaller): """Intel Parallel Studio. @@ -14,25 +16,31 @@ class IntelParallelStudio(IntelInstaller): # TODO: can also try the online installer (will download files on demand) version('composer.2016.2', '1133fb831312eb519f7da897fec223fa', - url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" + % os.getcwd()) version('professional.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', - url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) version('cluster.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', - url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) version('composer.2016.3', '3208eeabee951fc27579177b593cefe9', - url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" + % os.getcwd()) version('professional.2016.3', 'eda19bb0d0d19709197ede58f13443f3', - url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) version('cluster.2016.3', 'eda19bb0d0d19709197ede58f13443f3', - url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) variant('rpath', default=True, description="Add rpath to .cfg files") - variant('all', default=False, description="Install all files associated with the requested edition") - variant('mpi', default=True, description="Install the Intel MPI library and ITAC tool") + variant('all', default=False, + description="Install all files associated with the requested edition") + variant('mpi', default=True, + description="Install the Intel MPI library and ITAC tool") variant('mkl', default=True, description="Install the Intel MKL library") - variant('daal', default=True, description="Install the Intel DAAL libraries") + variant('daal', + default=True, description="Install the Intel DAAL libraries") variant('ipp', default=True, description="Install the Intel IPP libraries") - variant('tools', default=True, description="Install the Intel Advisor, VTune Amplifier, and Inspector tools") + variant('tools', default=True, description="""Install the Intel Advisor,\ +VTune Amplifier, and Inspector tools""") provides('mpi', when='@cluster:+mpi') provides('mkl', when='+mkl') @@ -41,23 +49,29 @@ class IntelParallelStudio(IntelInstaller): def install(self, spec, prefix): - base_components = "ALL" # when in doubt, install everything + base_components = "ALL" # when in doubt, install everything mpi_components = "" mkl_components = "" daal_components = "" ipp_components = "" - tools_components = "" if spec.satisfies('+all'): base_components = "ALL" else: all_components = get_all_components() - base_components = filter_pick(all_components, re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)').search) - mpi_components = filter_pick(all_components, re.compile('(icsxe|imb|mpi|itac|intel-tc|clck)').search) - mkl_components = filter_pick(all_components, re.compile('(mkl)').search) - daal_components = filter_pick(all_components, re.compile('(daal)').search) - ipp_components = filter_pick(all_components, re.compile('(ipp)').search) - tool_components = filter_pick(all_components, re.compile('(gdb|vtune|inspector|advisor)').search) + base_components = filter_pick(all_components, + re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)' + ).search) + mpi_components = filter_pick(all_components, + re.compile('(icsxe|imb|mpi|itac|intel-tc|clck)').search) + mkl_components = filter_pick(all_components, + re.compile('(mkl)').search) + daal_components = filter_pick(all_components, + re.compile('(daal)').search) + ipp_components = filter_pick(all_components, + re.compile('(ipp)').search) + tool_components = filter_pick(all_components, + re.compile('(gdb|vtune|inspector|advisor)').search) components = base_components if not spec.satisfies('+all'): @@ -69,32 +83,45 @@ class IntelParallelStudio(IntelInstaller): components += daal_components if spec.satisfies('+ipp'): components += ipp_components - if spec.satisfies('+tools') and (spec.satisfies('@cluster') or spec.satisfies('@professional')): + if spec.satisfies('+tools') and (spec.satisfies('@cluster') or\ + spec.satisfies('@professional')): components += tool_components self.intel_components = ';'.join(components) IntelInstaller.install(self, spec, prefix) - absbindir = os.path.dirname(os.path.realpath(os.path.join(self.prefix.bin, "icc"))) - abslibdir = os.path.dirname(os.path.realpath(os.path.join(self.prefix.lib, "intel64", "libimf.a"))) - - relbindir = absbindir.strip(os.path.commonprefix([self.prefix, absbindir])) - os.symlink(self.global_license_file, os.path.join(absbindir, "license.lic")) - if spec.satisfies('+tools') and (spec.satisfies('@cluster') or spec.satisfies('@professional')): + absbindir = os.path.dirname(os.path.realpath(os.path.join( + self.prefix.bin, "icc"))) + abslibdir = os.path.dirname(os.path.realpath(os.path.join + (self.prefix.lib, "intel64", "libimf.a"))) + + relbindir = absbindir.strip(os.path.commonprefix([self.prefix, + absbindir])) + os.symlink(self.global_license_file, os.path.join(absbindir, + "license.lic")) + if spec.satisfies('+tools') and (spec.satisfies('@cluster') or\ + spec.satisfies('@professional')): os.mkdir(os.path.join(self.prefix, "inspector_xe/licenses")) - os.symlink(self.global_license_file, os.path.join(self.prefix, "inspector_xe/licenses", "license.lic")) + os.symlink(self.global_license_file, os.path.join( + self.prefix, "inspector_xe/licenses", "license.lic")) os.mkdir(os.path.join(self.prefix, "advisor_xe/licenses")) - os.symlink(self.global_license_file, os.path.join(self.prefix, "advisor_xe/licenses", "license.lic")) + os.symlink(self.global_license_file, os.path.join( + self.prefix, "advisor_xe/licenses", "license.lic")) os.mkdir(os.path.join(self.prefix, "vtune_amplifier_xe/licenses")) - os.symlink(self.global_license_file, os.path.join(self.prefix, "vtune_amplifier_xe/licenses", "license.lic")) + os.symlink(self.global_license_file, os.path.join( + self.prefix, "vtune_amplifier_xe/licenses", "license.lic")) - if (spec.satisfies('+all') or spec.satisfies('+mpi')) and spec.satisfies('@cluster'): - os.symlink(self.global_license_file, os.path.join(self.prefix, "itac_latest", "license.lic")) + if (spec.satisfies('+all') or spec.satisfies('+mpi')) and\ + spec.satisfies('@cluster'): + os.symlink(self.global_license_file, os.path.join( + self.prefix, "itac_latest", "license.lic")) if spec.satisfies('+rpath'): for compiler_command in ["icc", "icpc", "ifort"]: - cfgfilename = os.path.join(absbindir, "%s.cfg" %(compiler_command)) + cfgfilename = os.path.join(absbindir, "%s.cfg" %\ + compiler_command) with open(cfgfilename, "w") as f: - f.write('-Xlinker -rpath -Xlinker %s\n' %(abslibdir)) + f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir) - os.symlink(os.path.join(self.prefix.man, "common", "man1"), os.path.join(self.prefix.man, "man1")) + os.symlink(os.path.join(self.prefix.man, "common", "man1"), + os.path.join(self.prefix.man, "man1")) diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py index a547ab56db..2d6929fc73 100644 --- a/var/spack/repos/builtin/packages/intel/package.py +++ b/var/spack/repos/builtin/packages/intel/package.py @@ -1,16 +1,22 @@ from spack import * -import sys, os, re +import os +import re + def filter_pick(input_list, regex_filter): """Returns the items in input_list that are found in the regex_filter""" return [l for l in input_list for m in (regex_filter(l),) if m] + def unfilter_pick(input_list, regex_filter): - """Returns the items in input_list that are not found in the regex_filter""" + """Returns the items in input_list that are not found in the + regex_filter""" return [l for l in input_list for m in (regex_filter(l),) if not m] + def get_all_components(): - """Returns a list of all the components associated with the downloaded Intel package""" + """Returns a list of all the components associated with the downloaded + Intel package""" all_components = [] with open("pset/mediaconfig.xml", "r") as f: lines = f.readlines() @@ -20,6 +26,7 @@ def get_all_components(): all_components.append(component) return all_components + class IntelInstaller(Package): """Base package containing common methods for installing Intel software""" @@ -29,7 +36,8 @@ class IntelInstaller(Package): license_comment = '#' license_files = ['Licenses/license.lic'] license_vars = ['INTEL_LICENSE_FILE'] - license_url = 'https://software.intel.com/en-us/articles/intel-license-manager-faq' + license_url = \ + 'https://software.intel.com/en-us/articles/intel-license-manager-faq' @property def global_license_file(self): @@ -41,9 +49,12 @@ class IntelInstaller(Package): def install(self, spec, prefix): - # remove the installation DB, otherwise it will try to install into location of other Intel builds - if os.path.exists(os.path.join(os.environ["HOME"], "intel", "intel_sdp_products.db")): - os.remove(os.path.join(os.environ["HOME"], "intel", "intel_sdp_products.db")) + # Remove the installation DB, otherwise it will try to install into + # location of other Intel builds + if os.path.exists(os.path.join(os.environ["HOME"], "intel", + "intel_sdp_products.db")): + os.remove(os.path.join(os.environ["HOME"], "intel", + "intel_sdp_products.db")) if not hasattr(self, "intel_prefix"): self.intel_prefix = self.prefix @@ -58,6 +69,7 @@ PSET_INSTALL_DIR=%s ACTIVATION_LICENSE_FILE=%s ACTIVATION_TYPE=license_file PHONEHOME_SEND_USAGE_DATA=no +CONTINUE_WITH_OPTIONAL_ERROR=yes COMPONENTS=%s """ %(self.intel_prefix, self.global_license_file, self.intel_components)) @@ -76,37 +88,39 @@ class Intel(IntelInstaller): # TODO: can also try the online installer (will download files on demand) version('16.0.2', '1133fb831312eb519f7da897fec223fa', - url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz"\ + % os.getcwd()) version('16.0.3', '3208eeabee951fc27579177b593cefe9', - url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz"\ + % os.getcwd()) variant('rpath', default=True, description="Add rpath to .cfg files") def install(self, spec, prefix): - - # remove the installation DB, otherwise it will try to install into location of other Intel builds - try: - os.remove(os.path.join(os.environ["HOME"], "intel", "intel_sdp_products.db")) - except OSError: - pass # if the file does not exist - components = [] all_components = get_all_components() - components = filter_pick(all_components, re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)').search) + components = filter_pick(all_components, + re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)' + ).search) self.intel_components = ';'.join(components) IntelInstaller.install(self, spec, prefix) - absbindir = os.path.split(os.path.realpath(os.path.join(self.prefix.bin, "icc")))[0] - abslibdir = os.path.split(os.path.realpath(os.path.join(self.prefix.lib, "intel64", "libimf.a")))[0] + absbindir = os.path.split(os.path.realpath(os.path.join( + self.prefix.bin, "icc")))[0] + abslibdir = os.path.split(os.path.realpath(os.path.join( + self.prefix.lib, "intel64", "libimf.a")))[0] # symlink or copy? - os.symlink(self.global_license_file, os.path.join(absbindir, "license.lic")) + os.symlink(self.global_license_file, os.path.join(absbindir, + "license.lic")) if spec.satisfies('+rpath'): for compiler_command in ["icc", "icpc", "ifort"]: - cfgfilename = os.path.join(absbindir, "%s.cfg" %(compiler_command)) + cfgfilename = os.path.join(absbindir, "%s.cfg" %\ + compiler_command) with open(cfgfilename, "w") as f: - f.write('-Xlinker -rpath -Xlinker %s\n' %(abslibdir)) + f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir) - os.symlink(os.path.join(self.prefix.man, "common", "man1"), os.path.join(self.prefix.man, "man1")) + os.symlink(os.path.join(self.prefix.man, "common", "man1"), + os.path.join(self.prefix.man, "man1")) diff --git a/var/spack/repos/builtin/packages/ipp/package.py b/var/spack/repos/builtin/packages/ipp/package.py index 23c944c2d5..2bd931d5bd 100644 --- a/var/spack/repos/builtin/packages/ipp/package.py +++ b/var/spack/repos/builtin/packages/ipp/package.py @@ -1,8 +1,9 @@ from spack import * -import sys, os, re +import os from spack.pkg.builtin.intel import IntelInstaller + class Ipp(IntelInstaller): """Intel Integrated Performance Primitives. diff --git a/var/spack/repos/builtin/packages/mkl/package.py b/var/spack/repos/builtin/packages/mkl/package.py index 1d4553b7f5..454e78d29c 100644 --- a/var/spack/repos/builtin/packages/mkl/package.py +++ b/var/spack/repos/builtin/packages/mkl/package.py @@ -1,8 +1,9 @@ from spack import * -import os, re, sys +import os from spack.pkg.builtin.intel import IntelInstaller + class Mkl(IntelInstaller): """Intel Math Kernel Library. -- cgit v1.2.3-70-g09d2 From 8ddc1f89778335dda3d1dd213e75bc3a92d99712 Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Sat, 14 May 2016 09:11:04 -0400 Subject: Move from str.format() to string.Template. --- lib/spack/spack/cmd/view.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index b504dfd2b1..caf14bfa53 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -317,16 +317,19 @@ visitor_check = visitor_statlink def visitor_print(specs, args): 'Print a string for each spec using args.format.' fmt = args.format[0] + from string import Template + t = Template(fmt) + for spec in specs: kwds = spec2dict(spec) try: - string = fmt.format(**kwds) + text = t.substitute(kwds) except KeyError: tty.error("Format error, use keywords: %s" % (', '.join(kwds.keys()), )) raise # argparser escapes these - string = string.replace(r'\n', '\n').replace(r'\t', '\t') - sys.stdout.write(string) + text = text.replace(r'\n', '\n').replace(r'\t', '\t') + sys.stdout.write(text) # Finally, the actual "view" command. There should be no need to -- cgit v1.2.3-70-g09d2 From 8078845273021dae01e3fdde2a5e3b10aea2f845 Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Sat, 14 May 2016 09:11:41 -0400 Subject: Remove problematic tests, deal with this issue outside of PR #869. --- share/spack/examples/test_view.sh | 31 ------------------- .../repos/builtin.mock/packages/test-a/package.py | 30 ------------------- .../builtin.mock/packages/test-a/test-a-0.0.tar.gz | Bin 112 -> 0 bytes .../repos/builtin.mock/packages/test-b/package.py | 32 -------------------- .../builtin.mock/packages/test-b/test-b-0.0.tar.gz | Bin 112 -> 0 bytes .../repos/builtin.mock/packages/test-c/package.py | 32 -------------------- .../builtin.mock/packages/test-c/test-c-0.0.tar.gz | Bin 112 -> 0 bytes .../repos/builtin.mock/packages/test-d/package.py | 33 --------------------- .../builtin.mock/packages/test-d/test-d-0.0.tar.gz | Bin 112 -> 0 bytes 9 files changed, 158 deletions(-) delete mode 100755 share/spack/examples/test_view.sh delete mode 100644 var/spack/repos/builtin.mock/packages/test-a/package.py delete mode 100644 var/spack/repos/builtin.mock/packages/test-a/test-a-0.0.tar.gz delete mode 100644 var/spack/repos/builtin.mock/packages/test-b/package.py delete mode 100644 var/spack/repos/builtin.mock/packages/test-b/test-b-0.0.tar.gz delete mode 100644 var/spack/repos/builtin.mock/packages/test-c/package.py delete mode 100644 var/spack/repos/builtin.mock/packages/test-c/test-c-0.0.tar.gz delete mode 100644 var/spack/repos/builtin.mock/packages/test-d/package.py delete mode 100644 var/spack/repos/builtin.mock/packages/test-d/test-d-0.0.tar.gz diff --git a/share/spack/examples/test_view.sh b/share/spack/examples/test_view.sh deleted file mode 100755 index b3e7102192..0000000000 --- a/share/spack/examples/test_view.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# This will install a few bogus/test packages in order to test the -# `spack view` command. It assumes you have "spack" in your path. - -# It makes sub-directories in your CWD and installs and uninstalls -# Spack packages named test-*. - -set -x -set -e - -view="spack -m view -v" -for variant in +nom ~nom+var +nom+var -do - spack -m uninstall -f -a -y test-d - spack -m install test-d$variant - testdir=test_view - rm -rf $testdir - echo "hardlink may fail if Spack install area and CWD are not same FS" - for action in symlink hardlink - do - $view --dependencies=no $action $testdir test-d - $view -e test-a -e test-b $action $testdir test-d - $view $action $testdir test-d - $view status $testdir test-d - $view -d false remove $testdir test-a - $view remove $testdir test-d - rmdir $testdir # should not fail - done -done -echo "Warnings about skipping existing in the above are okay" diff --git a/var/spack/repos/builtin.mock/packages/test-a/package.py b/var/spack/repos/builtin.mock/packages/test-a/package.py deleted file mode 100644 index ff45344b7a..0000000000 --- a/var/spack/repos/builtin.mock/packages/test-a/package.py +++ /dev/null @@ -1,30 +0,0 @@ -from spack import * - -import os - -mydir = os.path.dirname(__file__) -source = os.path.join(mydir,'test-a-0.0.tar.gz') - -class TestA(Package): - """The test-a package""" - - url = 'file://'+source - homepage = "http://www.example.com/" - - version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') - - variant('nom', default=True, description='Nominal variant') - variant('var', default=False, description='Variant variant') - - def install(self, spec, prefix): - bindir = os.path.join(prefix,'bin') - os.makedirs(bindir) - script = os.path.join(bindir, 'test-a') - with open(script,'w') as fp: - fp.write("""#!/bin/bash -echo 'name: %s' -echo 'prefix: %s' -echo 'spec: %s' - """ % (spec.name, prefix, spec)) - - os.chmod(script, 0555) diff --git a/var/spack/repos/builtin.mock/packages/test-a/test-a-0.0.tar.gz b/var/spack/repos/builtin.mock/packages/test-a/test-a-0.0.tar.gz deleted file mode 100644 index 3588e05765..0000000000 Binary files a/var/spack/repos/builtin.mock/packages/test-a/test-a-0.0.tar.gz and /dev/null differ diff --git a/var/spack/repos/builtin.mock/packages/test-b/package.py b/var/spack/repos/builtin.mock/packages/test-b/package.py deleted file mode 100644 index f6d30bb85f..0000000000 --- a/var/spack/repos/builtin.mock/packages/test-b/package.py +++ /dev/null @@ -1,32 +0,0 @@ -from spack import * - -import os - -mydir = os.path.dirname(__file__) -source = os.path.join(mydir,'test-b-0.0.tar.gz') - -class TestB(Package): - """The test-b package""" - - url = 'file://'+source - homepage = "http://www.example.com/" - - version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') - - variant('nom', default=True, description='Nominal variant') - variant('var', default=False, description='Variant variant') - - depends_on('test-a') - - def install(self, spec, prefix): - bindir = os.path.join(prefix,'bin') - os.makedirs(bindir) - script = os.path.join(bindir, 'test-b') - with open(script,'w') as fp: - fp.write("""#!/bin/bash -echo 'name: %s' -echo 'prefix: %s' -echo 'spec: %s' - """ % (spec.name, prefix, spec)) - - os.chmod(script, 0555) diff --git a/var/spack/repos/builtin.mock/packages/test-b/test-b-0.0.tar.gz b/var/spack/repos/builtin.mock/packages/test-b/test-b-0.0.tar.gz deleted file mode 100644 index 3588e05765..0000000000 Binary files a/var/spack/repos/builtin.mock/packages/test-b/test-b-0.0.tar.gz and /dev/null differ diff --git a/var/spack/repos/builtin.mock/packages/test-c/package.py b/var/spack/repos/builtin.mock/packages/test-c/package.py deleted file mode 100644 index 641e46ee50..0000000000 --- a/var/spack/repos/builtin.mock/packages/test-c/package.py +++ /dev/null @@ -1,32 +0,0 @@ -from spack import * - -import os - -mydir = os.path.dirname(__file__) -source = os.path.join(mydir,'test-c-0.0.tar.gz') - -class TestC(Package): - """The test-c package""" - - url = 'file://'+source - homepage = "http://www.example.com/" - - version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') - - variant('nom', default=True, description='Nominal variant') - variant('var', default=False, description='Variant variant') - - depends_on('test-a+var',when='+var') - - def install(self, spec, prefix): - bindir = os.path.join(prefix,'bin') - os.makedirs(bindir) - script = os.path.join(bindir, 'test-c') - with open(script,'w') as fp: - fp.write("""#!/bin/bash -echo 'name: %s' -echo 'prefix: %s' -echo 'spec: %s' - """ % (spec.name, prefix, spec)) - - os.chmod(script, 0555) diff --git a/var/spack/repos/builtin.mock/packages/test-c/test-c-0.0.tar.gz b/var/spack/repos/builtin.mock/packages/test-c/test-c-0.0.tar.gz deleted file mode 100644 index 3588e05765..0000000000 Binary files a/var/spack/repos/builtin.mock/packages/test-c/test-c-0.0.tar.gz and /dev/null differ diff --git a/var/spack/repos/builtin.mock/packages/test-d/package.py b/var/spack/repos/builtin.mock/packages/test-d/package.py deleted file mode 100644 index b46c680edd..0000000000 --- a/var/spack/repos/builtin.mock/packages/test-d/package.py +++ /dev/null @@ -1,33 +0,0 @@ -from spack import * - -import os - -mydir = os.path.dirname(__file__) -source = os.path.join(mydir,'test-d-0.0.tar.gz') - -class TestD(Package): - """The test-d package""" - - url = 'file://'+source - homepage = "http://www.example.com/" - - version('0.0', '4e823d0af4154fcf52b75dad41b7fd63') - - variant('nom', default=True, description='Nominal variant') - variant('var', default=False, description='Variant variant') - - depends_on('test-b') - depends_on('test-c') - - def install(self, spec, prefix): - bindir = os.path.join(prefix,'bin') - os.makedirs(bindir) - script = os.path.join(bindir, 'test-d') - with open(script,'w') as fp: - fp.write("""#!/bin/bash -echo 'name: %s' -echo 'prefix: %s' -echo 'spec: %s' - """ % (spec.name, prefix, spec)) - - os.chmod(script, 0555) diff --git a/var/spack/repos/builtin.mock/packages/test-d/test-d-0.0.tar.gz b/var/spack/repos/builtin.mock/packages/test-d/test-d-0.0.tar.gz deleted file mode 100644 index 3588e05765..0000000000 Binary files a/var/spack/repos/builtin.mock/packages/test-d/test-d-0.0.tar.gz and /dev/null differ -- cgit v1.2.3-70-g09d2 From c98afe2205ec90bc98c7f1c33b3e8e05403c7c22 Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Sat, 14 May 2016 13:14:51 -0400 Subject: Pick a better name for the 'spec' parameters. --- lib/spack/spack/cmd/view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index caf14bfa53..8767459c08 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -189,8 +189,8 @@ def spec2dict(spec): # pkg = spec.package ret = dict(name = spec.name, - short = spec.short_spec, - cshort = spec.cshort_spec, # color + spec = spec.short_spec, + colorspec = spec.cshort_spec, # color root = spec.root, prefix = spec.prefix, version = spec.version, -- cgit v1.2.3-70-g09d2 From b3ede099e2d2dd684ebe478dd711a979ebb3bf98 Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Sat, 14 May 2016 13:15:25 -0400 Subject: Document command. --- lib/spack/docs/basic_usage.rst | 233 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 29791d98c4..e340881a93 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -330,6 +330,125 @@ of libelf would look like this: The full spec syntax is discussed in detail in :ref:`sec-specs`. +``spack view print`` +~~~~~~~~~~~~~~~~~~~~~~ + +``spack view print`` is a subcommand of ``spack view`` which displays information about one or more installed packages and their dependencies using a user-provided format string. The string can reverence variables in a shell-like manner for example ``$variable`` or ``${variable}text``. It can also include ``\t`` for tabs and ``\n`` for new lines. + +Some of the supported variables are: + +``name`` + The package name. + +``version`` + The package version. + +``spec`` + The package specification. + +``root`` + The root specification. + +``prefix`` + The installation directory. + +``variants`` + The collection of variants, if any. + +``namespace`` + The package repository name space. + +``compiler`` + The compiler \`name@versoin\` used to build the package. + +``architecture`` + The architecture targeted by the compiler. + +``dependencies`` + A comma-separated list of names of packages on which the package depends. + +``dependents`` + A comma-separated list of names of packages which depend on the package. + +``hash`` + The Spack hash for the package. + +``url`` + The source URL for the package. + +``stage`` + The directory for staging the build. + +``build_log`` + The path to the build log file. + +``rpath`` + The colon-separated library \`RPATH\` used in building the package. + +Here are some example uses of `spack view print`. A simple line-oriented report of information can be produced: + +.. code-block:: sh + + $ spack view print '$name\t$version\t$hash\n' cmake@3.5.2 + ncurses 6.0 bvbu4ixbnvtodpik4qzljlx3ukpyfrcz + zlib 1.2.8 ckki7zlryxrsetfqkgoxxahlhqqjni7n + openssl 1.0.2g 6zbar63sciso253nptxyrnhupymo7oyi + cmake 3.5.2 wprvmoczkpw4tiy5ybuk5zr7saus2d7g + +There are better ways to do this but a slow-and-dirty shell init procedure can be formed: + +.. code-block:: sh + + $ spack view print 'export PATH="${prefix}/bin:$$PATH"\n' m4 + export PATH="/spack/opt/spack/linux-x86_64/gcc-5.2.1/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2/bin:$PATH" + export PATH="/spack/opt/spack/linux-x86_64/gcc-5.2.1/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp/bin:$PATH" + $ eval $(spack view print 'export PATH="${prefix}/bin:$$PATH"\n' m4) + +Or, maybe you have some external application that can chew on Spack data in which case you can dump it to some easily parsed markup syntax such as YAML: + +.. code-block:: sh + + + $ spack view print '${name}:\n - version: ${version}\n - url : ${url}\n - spec: ${spec}\n - prefix: ${prefix}\n - root : ${root}\n - stage : ${stage}\n - log: ${build_log}\n' m4 + +Which might produce something like: + +.. code-block:: yaml + + libsigsegv: + - version: 2.10 + - url : ftp://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz + - spec: libsigsegv@2.10%gcc@5.2.1=linux-x86_64-h6hsv76 + - prefix: /spack/opt/spack/linux-x86_64/gcc-5.2.1/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2 + - root : m4@1.4.17%gcc@5.2.1+sigsegv=linux-x86_64^libsigsegv@2.10%gcc@5.2.1=linux-x86_64 + - stage : /spack/var/spack/stage/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2 + - log: /spack/opt/spack/linux-x86_64/gcc-5.2.1/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2/.spack/build.out + m4: + - version: 1.4.17 + - url : ftp://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz + - spec: m4@1.4.17%gcc@5.2.1+sigsegv=linux-x86_64-a4ikhdd + - prefix: /spack/opt/spack/linux-x86_64/gcc-5.2.1/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp + - root : m4@1.4.17%gcc@5.2.1+sigsegv=linux-x86_64^libsigsegv@2.10%gcc@5.2.1=linux-x86_64 + - stage : /spack/var/spack/stage/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp + - log: /spack/opt/spack/linux-x86_64/gcc-5.2.1/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp/.spack/build.out + +Or, maybe you want to do something with information about package dependencies by generating some ready-to-import Python code holding the tree: + +.. code-block:: sh + + $ spack view print '$name = dict(name = "$name", parents = [$dependencies], children = [$dependents])\n' cmake@3.5.2 + +Producing this Python code + +.. code-block:: python + + ncurses = dict(name = "ncurses", parents = []]) + zlib = dict(name = "zlib", parents = []]) + openssl = dict(name = "openssl", parents = [zlib]]) + cmake = dict(name = "cmake", parents = [ncurses,openssl]]) + + + Compiler configuration ----------------------------------- @@ -1035,6 +1154,120 @@ regenerate all module and dotkit files from scratch: .. _extensions: +Filesystem Views +------------------------------- + +.. Maybe this is not the right location for this documentation. + +The Spack installation area allows for many package installation trees +to coexist and gives the user choices as to what versions and variants +of packages to use. To use them, the user must rely on a way to +aggregate a subset of those packages. The section on Environment +Modules gives one good way to do that which relies on setting various +environment variables. An alternative way to aggregate is through +**filesystem views**. + +A filesystem view is a single directory tree which is the union of the +directory hierarchies of the individual package installation trees +that have been included. The files of the view's installed packages +are brought into the view by symbolic or hard links back to their +location in the original Spack installation area. As the view is +formed, any clashes due to a file having the exact same path in its +package installation tree are handled in a first-come-first-served +basis and a warning is printed. Packages and their dependencies can +be both added and removed. During removal, empty directories will be +purged. These operations can be limited to pertain to just the +packages listed by the user or to exclude specific dependencies and +they allow for software installed outside of Spack to coexist inside +the filesystem view tree. + +By its nature, a filesystem view represents a particular choice of one +set of packages among all the versions and variants that are available +in the Spack installation area. It is thus equivalent to the +directory hiearchy that might exist under ``/usr/local``. While this +limits a view to including only one version/variant of any package, it +provides the benefits of having a simpler and traditional layout which +may be used without any particular knowledge that its packages were +built by Spack. + +Views can be used for a variety of purposes including: + +- A central installation in a traditional layout, eg ``/usr/local`` maintained over time by the sysadmin. +- A self-contained installation area which may for the basis of a top-level atomic versioning scheme, eg ``/opt/pro`` vs ``/opt/dev``. +- Providing an atomic and monolithic binary distribution, eg for delivery as a single tarball. +- Producing ephemeral testing or developing environments. + +Using Filesystem Views +~~~~~~~~~~~~~~~~~~~~~~ + +A filesystem view is created and packages are linked in by the ``spack +view`` command's ``symlink`` and ``hardlink`` sub-commands. The +``spack view remove`` command can be used to unlink some or all of the +filesystem view. + +The following example creates a filesystem view based +on an installed ``cmake`` package and then removes from the view the +files in the ``cmake`` package while retaining its dependencies. + +.. code-block:: sh + + + $ spack view -v symlink myview cmake@3.5.2 + ==> Linking package: "ncurses" + ==> Linking package: "zlib" + ==> Linking package: "openssl" + ==> Linking package: "cmake" + + $ ls myview/ + bin doc etc include lib share + + $ ls myview/bin/ + captoinfo clear cpack ctest infotocap openssl tabs toe tset + ccmake cmake c_rehash infocmp ncurses6-config reset tic tput + + $ spack view -v -d false rm myview cmake@3.5.2 + ==> Removing package: "cmake" + + $ ls myview/bin/ + captoinfo c_rehash infotocap openssl tabs toe tset + clear infocmp ncurses6-config reset tic tput + + +Limitations of Filesystem Views +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This section describes some limitations that should be considered in +using filesystems views. + +Filesystem views are merely organizational. The binary executable +programs, shared libraries and other build products found in a view +are mere links into the "real" Spack installation area. If a view is +built with symbolic links it requires the Spack-installed package to +be kept in place. Building a view with hardlinks removes this +requirement but any internal paths (eg, rpath or ``#!`` interpreter +specifications) will still require the Spack-installed package files +to be in place. + +.. FIXME: reference the relocation work of Hegner and Gartung. + +As described above, when a view is built only a single instance of a +file may exist in the unified filesystem tree. If more than one +package provides a file at the same path (relative to its own root) +then it is the first package added to the view that "wins". A warning +is printed and it is up to the user to determine if the conflict +matters. + +It is up to the user to assure a consistent view is produced. In +particular if the user excludes packages, limits the following of +dependencies or removes packages the view may become inconsistent. In +particular, if two packages require the same sub-tree of dependencies, +removing one package (recursively) will remove its dependencies and +leave the other package broken. + + + + + Extensions & Python support ------------------------------------ -- cgit v1.2.3-70-g09d2 From 4bf9b168a57dab285983485394f7d22d6ec7ea1f Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Sat, 14 May 2016 16:19:10 -0400 Subject: netcdf-cxx4: Update to latest released version 4.3.0 --- var/spack/repos/builtin/packages/netcdf-cxx4/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py index b67ea299a8..d705a8cd87 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py @@ -27,13 +27,16 @@ from spack import * class NetcdfCxx4(Package): """C++ interface for NetCDF4""" homepage = "http://www.unidata.ucar.edu/software/netcdf" - url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx4-4.2.tar.gz" + url = "https://www.github.com/unidata/netcdf-cxx4/tarball/v4.3.0" - version('4.2', 'd019853802092cf686254aaba165fc81') + version('4.3.0', '0dde8b9763eecdafbd69d076e687337e') + version('4.2.1', 'd019853802092cf686254aaba165fc81') depends_on('netcdf') + depends_on("autoconf") def install(self, spec, prefix): + which('autoreconf')('-ivf') # Rebuild to prevent problems of inconsistency in git repo configure('--prefix=%s' % prefix) make() make("install") -- cgit v1.2.3-70-g09d2 From c5a35acd6706ebc8ef994b3afbcb9de7b1c77b1c Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 14 May 2016 18:37:00 +0200 Subject: sed: add package --- var/spack/repos/builtin/packages/sed/package.py | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 var/spack/repos/builtin/packages/sed/package.py diff --git a/var/spack/repos/builtin/packages/sed/package.py b/var/spack/repos/builtin/packages/sed/package.py new file mode 100644 index 0000000000..f2a240e1b3 --- /dev/null +++ b/var/spack/repos/builtin/packages/sed/package.py @@ -0,0 +1,39 @@ +############################################################################## +# 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 Sed(Package): + """GNU implementation of the famous stream editor.""" + homepage = "http://www.gnu.org/software/sed/" + url = "http://ftpmirror.gnu.org/sed/sed-4.2.2.tar.bz2" + + version('4.2.2', '7ffe1c7cdc3233e1e0c4b502df253974') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") -- cgit v1.2.3-70-g09d2 From b5979b13e3f9bcf3e151b494bb2a557aaabedeff Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sat, 14 May 2016 16:03:42 -0700 Subject: complete lua rework, also module path fix This is a complete rework of the lua package, it also allows the environment modification classes to handle paths that are not separated by colons, and uses the support for same in TCL modules as well. The biggest difference is the handling for lua extension packages, which now have their paths set correctly by the lua parent package, and have access to both lua and luarocks as installation tools. See the luaposix package for what should be required for most lua packages after this. --- lib/spack/spack/directives.py | 2 +- lib/spack/spack/environment.py | 21 +++--- lib/spack/spack/modules.py | 7 +- .../repos/builtin/packages/lua-luaposix/package.py | 16 +++++ var/spack/repos/builtin/packages/lua/package.py | 76 ++++++++++++++++++++++ 5 files changed, 108 insertions(+), 14 deletions(-) create mode 100644 var/spack/repos/builtin/packages/lua-luaposix/package.py diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 74ee7b0add..1819f4308c 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -292,7 +292,7 @@ def resource(pkg, **kwargs): message += "\tdestination : '{dest}\n'".format(dest=destination) raise RuntimeError(message) # Check if the path falls within the main package stage area - test_path = 'stage_folder_root/' + test_path = 'stage_folder_root' normalized_destination = os.path.normpath(join_path(test_path, destination)) # Normalized absolute path if test_path not in normalized_destination: message = "The destination folder of a resource must fall within the main package stage directory.\n" diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 11998ad8d2..ee5afb15dd 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -39,7 +39,8 @@ class NameValueModifier(object): def __init__(self, name, value, **kwargs): self.name = name self.value = value - self.args = {'name': name, 'value': value} + self.separator = kwargs.get('separator', ':') + self.args = {'name': name, 'value': value, 'delim': self.separator} self.args.update(kwargs) @@ -56,34 +57,34 @@ class UnsetEnv(NameModifier): class SetPath(NameValueModifier): def execute(self): - string_path = concatenate_paths(self.value) + string_path = concatenate_paths(self.value, separator=self.separator) os.environ[self.name] = string_path class AppendPath(NameValueModifier): def execute(self): environment_value = os.environ.get(self.name, '') - directories = environment_value.split(':') if environment_value else [] + directories = environment_value.split(self.separator) if environment_value else [] directories.append(os.path.normpath(self.value)) - os.environ[self.name] = ':'.join(directories) + os.environ[self.name] = self.separator.join(directories) class PrependPath(NameValueModifier): def execute(self): environment_value = os.environ.get(self.name, '') - directories = environment_value.split(':') if environment_value else [] + directories = environment_value.split(self.separator) if environment_value else [] directories = [os.path.normpath(self.value)] + directories - os.environ[self.name] = ':'.join(directories) + os.environ[self.name] = self.separator.join(directories) class RemovePath(NameValueModifier): def execute(self): environment_value = os.environ.get(self.name, '') - directories = environment_value.split(':') if environment_value else [] + directories = environment_value.split(self.separator) if environment_value else [] directories = [os.path.normpath(x) for x in directories if x != os.path.normpath(self.value)] - os.environ[self.name] = ':'.join(directories) + os.environ[self.name] = self.separator.join(directories) class EnvironmentModifications(object): @@ -238,7 +239,7 @@ class EnvironmentModifications(object): x.execute() -def concatenate_paths(paths): +def concatenate_paths(paths, separator=';'): """ Concatenates an iterable of paths into a string of column separated paths @@ -248,7 +249,7 @@ def concatenate_paths(paths): Returns: string """ - return ':'.join(str(item) for item in paths) + return separator.join(str(item) for item in paths) def set_or_unset_not_first(variable, changes, errstream): diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index a35e21c3db..9b6a019108 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -485,9 +485,10 @@ class TclModule(EnvModule): path = join_path(spack.share_path, "modules") environment_modifications_formats = { - PrependPath: 'prepend-path {name} \"{value}\"\n', - AppendPath: 'append-path {name} \"{value}\"\n', - RemovePath: 'remove-path {name} \"{value}\"\n', + formats = { + PrependPath: 'prepend-path --delim "{delim}" {name} \"{value}\"\n', + AppendPath: 'append-path --delim "{delim}" {name} \"{value}\"\n', + RemovePath: 'remove-path --delim "{delim}" {name} \"{value}\"\n', SetEnv: 'setenv {name} \"{value}\"\n', UnsetEnv: 'unsetenv {name}\n' } diff --git a/var/spack/repos/builtin/packages/lua-luaposix/package.py b/var/spack/repos/builtin/packages/lua-luaposix/package.py new file mode 100644 index 0000000000..d0606b71f7 --- /dev/null +++ b/var/spack/repos/builtin/packages/lua-luaposix/package.py @@ -0,0 +1,16 @@ +from spack import * +import glob + +class LuaLuaposix(Package): + """Lua posix bindings, including ncurses""" + homepage = "https://github.com/luaposix/luaposix/" + url = "https://github.com/luaposix/luaposix/archive/release-v33.4.0.tar.gz" + + version('33.4.0', 'b36ff049095f28752caeb0b46144516c') + + extends("lua") + + def install(self, spec, prefix): + rockspec = glob.glob('luaposix-*.rockspec') + print rockspec + luarocks('--tree=' + prefix, 'install', rockspec[0]) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 9a73a22645..b6ba2d600e 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -42,9 +42,17 @@ class Lua(Package): version('5.1.4', 'd0870f2de55d59c1c8419f36e8fac150') version('5.1.3', 'a70a8dfaa150e047866dc01a46272599') + extendable = True + depends_on('ncurses') depends_on('readline') + resource(name="luarocks", + url="https://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz", + md5="a38126684cf42b7d0e7a3c7cf485defb", + destination="luarocks", + placement='luarocks') + def install(self, spec, prefix): if spec.satisfies("=darwin-i686") or spec.satisfies("=darwin-x86_64"): target = 'macosx' @@ -56,3 +64,71 @@ class Lua(Package): make('INSTALL_TOP=%s' % prefix, 'MYLDFLAGS=-L%s -lncurses' % spec['ncurses'].prefix.lib, 'install') + + with working_dir(os.path.join('luarocks','luarocks')): + configure('--prefix=' + prefix, + '--with-lua=' + prefix) + make('build') + make('install') + + def append_paths(self, paths, cpaths, path): + paths.append(os.path.join(path, '?.lua')) + paths.append(os.path.join(path, '?', 'init.lua')) + cpaths.append(os.path.join(path, '?.so')) + + def setup_dependent_environment(self, spack_env, run_env, extension_spec): + lua_paths = [ + ] + for d in extension_spec.traverse(): + 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)) + + lua_patterns = [] + lua_cpatterns = [] + for p in lua_paths: + if os.path.isdir(p): + self.append_paths(lua_patterns, lua_cpatterns, p) + + # Always add this package's paths + for p in ( os.path.join(self.spec.prefix, self.lua_lib_dir), os.path.join(self.spec.prefix, self.lua_share_dir)): + self.append_paths(lua_patterns, lua_cpatterns, p) + + + spack_env.set('LUA_PATH', ';'.join(lua_patterns), separator=';') + spack_env.set('LUA_CPATH', ';'.join(lua_cpatterns), separator=';') + + # For run time environment set only the path for extension_spec and prepend it to LUAPATH + if extension_spec.package.extends(self.spec): + run_env.prepend_path('LUA_PATH', ';'.join(lua_patterns), separator=';') + run_env.prepend_path('LUA_CPATH', ';'.join(lua_cpatterns), separator=';') + # run_env.prepend_path('LUA_PATH', os.path.join(extension_spec.prefix, self.lua_lib_dir, '?.lua'), separator=';') + # run_env.prepend_path('LUA_PATH', os.path.join(extension_spec.prefix, self.lua_lib_dir, '?', 'init.lua'), separator=';') + # run_env.prepend_path('LUA_CPATH', os.path.join(extension_spec.prefix, self.lua_lib_dir, '?.so'), separator=';') + + def setup_environment(self, spack_env, run_env): + run_env.prepend_path('LUA_PATH', os.path.join(self.spec.prefix, self.lua_share_dir, '?.lua'), separator=';') + run_env.prepend_path('LUA_PATH', os.path.join(self.spec.prefix, self.lua_share_dir, '?', 'init.lua'), separator=';') + run_env.prepend_path('LUA_PATH', os.path.join(self.spec.prefix, self.lua_lib_dir, '?.lua'), separator=';') + run_env.prepend_path('LUA_PATH', os.path.join(self.spec.prefix, self.lua_lib_dir, '?', 'init.lua'), separator=';') + run_env.prepend_path('LUA_CPATH', os.path.join(self.spec.prefix, self.lua_lib_dir, '?.so'), separator=';') + + @property + def lua_lib_dir(self): + return os.path.join('lib', 'lua', '%d.%d' % self.version[:2]) + @property + def lua_share_dir(self): + return os.path.join('share', 'lua', '%d.%d' % self.version[:2]) + + def setup_dependent_package(self, module, ext_spec): + """ + Called before lua modules's install() methods. + + In most cases, extensions will only need to have two lines:: + + luarocks('--tree=' + prefix, 'install', rock_spec_path) + """ + # Lua extension builds can have lua and luarocks executable functions + module.lua = Executable(join_path(self.spec.prefix.bin, 'lua')) + module.luarocks = Executable(join_path(self.spec.prefix.bin, 'luarocks')) + -- cgit v1.2.3-70-g09d2 From 12e36ee0e731e1d76acd129c50e9b8c79af99d27 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sat, 14 May 2016 16:20:45 -0700 Subject: fix merge error --- lib/spack/spack/modules.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 9b6a019108..d2b819e80a 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -485,7 +485,6 @@ class TclModule(EnvModule): path = join_path(spack.share_path, "modules") environment_modifications_formats = { - formats = { PrependPath: 'prepend-path --delim "{delim}" {name} \"{value}\"\n', AppendPath: 'append-path --delim "{delim}" {name} \"{value}\"\n', RemovePath: 'remove-path --delim "{delim}" {name} \"{value}\"\n', -- cgit v1.2.3-70-g09d2 From fffc2d2765d8bdcdb87aba5aaa2140fa6819a59a Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 14 May 2016 19:33:45 -0500 Subject: Updated turbomole package file. This PR updates the turbomole package file but does not introduce any new funtionality. The updtes are: - use spack interface for subprocess.PIPE and subprocess.Popen - clean up based on flake8 - remove some extra whitespace --- .../repos/builtin/packages/turbomole/package.py | 76 +++++++++++++--------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/var/spack/repos/builtin/packages/turbomole/package.py b/var/spack/repos/builtin/packages/turbomole/package.py index 3362113d13..6ccce23f97 100644 --- a/var/spack/repos/builtin/packages/turbomole/package.py +++ b/var/spack/repos/builtin/packages/turbomole/package.py @@ -26,21 +26,22 @@ from spack import * import os import subprocess + class Turbomole(Package): """TURBOMOLE: Program Package for ab initio Electronic Structure Calculations. NB: Requires a license to download.""" - - # NOTE: Turbomole requires purchase of a license to download. Go to the - # NOTE: Turbomole home page, http://www.turbomole-gmbh.com, for details. - # NOTE: Spack will search the current directory for this file. It is - # NOTE: probably best to add this file to a Spack mirror so that it can be - # NOTE: found from anywhere. For information on setting up a Spack mirror - # NOTE: see http://software.llnl.gov/spack/mirrors.html + + # NOTE: Turbomole requires purchase of a license to download. Go to the + # NOTE: Turbomole home page, http://www.turbomole-gmbh.com, for details. + # NOTE: Spack will search the current directory for this file. It is + # NOTE: probably best to add this file to a Spack mirror so that it can be + # NOTE: found from anywhere. For information on setting up a Spack mirror + # NOTE: see http://software.llnl.gov/spack/mirrors.html homepage = "http://www.turbomole-gmbh.com/" version('7.0.2', '92b97e1e52e8dcf02a4d9ac0147c09d6', - url="file://%s/turbolinux702.tar.gz" % os.getcwd()) + url="file://%s/turbolinux702.tar.gz" % os.getcwd()) variant('mpi', default=False, description='Set up MPI environment') variant('smp', default=False, description='Set up SMP environment') @@ -56,33 +57,31 @@ class Turbomole(Package): def do_fetch(self, mirror_only=True): if '+mpi' in self.spec and '+smp' in self.spec: - raise InstallError('Can not have both SMP and MPI enabled in the same build.') + raise InstallError('Can not have both SMP and MPI enabled in the ' + 'same build.') super(Turbomole, self).do_fetch(mirror_only) def get_tm_arch(self): - # For python-2.7 we could use `tm_arch = subprocess.check_output()` - # Use the following for compatibility with python 2.6 if 'TURBOMOLE' in os.getcwd(): - tm_arch = subprocess.Popen(['sh', 'scripts/sysname'], - stdout=subprocess.PIPE).communicate()[0] + tm_sysname = Executable('./scripts/sysname') + tm_arch = tm_sysname(output=str) return tm_arch.rstrip('\n') else: return - + def install(self, spec, prefix): if spec.satisfies('@:7.0.2'): calculate_version = 'calculate_2.4_linux64' molecontrol_version = 'MoleControl_2.5' - tm_arch=self.get_tm_arch() + tm_arch = self.get_tm_arch() tar = which('tar') dst = join_path(prefix, 'TURBOMOLE') tar('-x', '-z', '-f', 'thermocalc.tar.gz') with working_dir('thermocalc'): - cmd = 'sh install << Date: Sat, 14 May 2016 17:38:13 -0700 Subject: changes to appease flake8 (mostly) for lua package --- var/spack/repos/builtin/packages/lua/package.py | 63 ++++++++++++++----------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index b6ba2d600e..11d66bc8f9 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -25,10 +25,11 @@ from spack import * import os + class Lua(Package): """ The Lua programming language interpreter and library """ homepage = "http://www.lua.org" - url = "http://www.lua.org/ftp/lua-5.1.5.tar.gz" + url = "http://www.lua.org/ftp/lua-5.1.5.tar.gz" version('5.3.2', '33278c2ab5ee3c1a875be8d55c1ca2a1') version('5.3.1', '797adacada8d85761c079390ff1d9961') @@ -47,11 +48,12 @@ class Lua(Package): depends_on('ncurses') depends_on('readline') - resource(name="luarocks", - url="https://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz", - md5="a38126684cf42b7d0e7a3c7cf485defb", - destination="luarocks", - placement='luarocks') + resource( + name="luarocks", + url="https://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz", + md5="a38126684cf42b7d0e7a3c7cf485defb", + destination="luarocks", + placement='luarocks') def install(self, spec, prefix): if spec.satisfies("=darwin-i686") or spec.satisfies("=darwin-x86_64"): @@ -59,15 +61,13 @@ class Lua(Package): else: target = 'linux' make('INSTALL_TOP=%s' % prefix, - 'MYLDFLAGS=-L%s -lncurses' % spec['ncurses'].prefix.lib, - target) + 'MYLDFLAGS=-L%s -lncurses' % spec['ncurses'].prefix.lib, target) make('INSTALL_TOP=%s' % prefix, 'MYLDFLAGS=-L%s -lncurses' % spec['ncurses'].prefix.lib, 'install') - with working_dir(os.path.join('luarocks','luarocks')): - configure('--prefix=' + prefix, - '--with-lua=' + prefix) + with working_dir(os.path.join('luarocks', 'luarocks')): + configure('--prefix=' + prefix, '--with-lua=' + prefix) make('build') make('install') @@ -77,8 +77,7 @@ class Lua(Package): cpaths.append(os.path.join(path, '?.so')) def setup_dependent_environment(self, spack_env, run_env, extension_spec): - lua_paths = [ - ] + lua_paths = [] for d in extension_spec.traverse(): if d.package.extends(self.spec): lua_paths.append(os.path.join(d.prefix, self.lua_lib_dir)) @@ -91,31 +90,41 @@ class Lua(Package): self.append_paths(lua_patterns, lua_cpatterns, p) # Always add this package's paths - for p in ( os.path.join(self.spec.prefix, self.lua_lib_dir), os.path.join(self.spec.prefix, self.lua_share_dir)): + for p in (os.path.join(self.spec.prefix, self.lua_lib_dir), + os.path.join(self.spec.prefix, self.lua_share_dir)): self.append_paths(lua_patterns, lua_cpatterns, p) - spack_env.set('LUA_PATH', ';'.join(lua_patterns), separator=';') spack_env.set('LUA_CPATH', ';'.join(lua_cpatterns), separator=';') # For run time environment set only the path for extension_spec and prepend it to LUAPATH if extension_spec.package.extends(self.spec): - run_env.prepend_path('LUA_PATH', ';'.join(lua_patterns), separator=';') - run_env.prepend_path('LUA_CPATH', ';'.join(lua_cpatterns), separator=';') - # run_env.prepend_path('LUA_PATH', os.path.join(extension_spec.prefix, self.lua_lib_dir, '?.lua'), separator=';') - # run_env.prepend_path('LUA_PATH', os.path.join(extension_spec.prefix, self.lua_lib_dir, '?', 'init.lua'), separator=';') - # run_env.prepend_path('LUA_CPATH', os.path.join(extension_spec.prefix, self.lua_lib_dir, '?.so'), separator=';') + run_env.prepend_path('LUA_PATH', ';'.join(lua_patterns), + separator=';') + run_env.prepend_path('LUA_CPATH', ';'.join(lua_cpatterns), + separator=';') def setup_environment(self, spack_env, run_env): - run_env.prepend_path('LUA_PATH', os.path.join(self.spec.prefix, self.lua_share_dir, '?.lua'), separator=';') - run_env.prepend_path('LUA_PATH', os.path.join(self.spec.prefix, self.lua_share_dir, '?', 'init.lua'), separator=';') - run_env.prepend_path('LUA_PATH', os.path.join(self.spec.prefix, self.lua_lib_dir, '?.lua'), separator=';') - run_env.prepend_path('LUA_PATH', os.path.join(self.spec.prefix, self.lua_lib_dir, '?', 'init.lua'), separator=';') - run_env.prepend_path('LUA_CPATH', os.path.join(self.spec.prefix, self.lua_lib_dir, '?.so'), separator=';') + run_env.prepend_path('LUA_PATH', os.path.join( + self.spec.prefix, self.lua_share_dir, '?.lua'), + separator=';') + run_env.prepend_path('LUA_PATH', os.path.join( + self.spec.prefix, self.lua_share_dir, '?', 'init.lua'), + separator=';') + run_env.prepend_path('LUA_PATH', os.path.join( + self.spec.prefix, self.lua_lib_dir, '?.lua'), + separator=';') + run_env.prepend_path('LUA_PATH', os.path.join( + self.spec.prefix, self.lua_lib_dir, '?', 'init.lua'), + separator=';') + run_env.prepend_path('LUA_CPATH', os.path.join( + self.spec.prefix, self.lua_lib_dir, '?.so'), + separator=';') @property def lua_lib_dir(self): return os.path.join('lib', 'lua', '%d.%d' % self.version[:2]) + @property def lua_share_dir(self): return os.path.join('share', 'lua', '%d.%d' % self.version[:2]) @@ -130,5 +139,5 @@ class Lua(Package): """ # Lua extension builds can have lua and luarocks executable functions module.lua = Executable(join_path(self.spec.prefix.bin, 'lua')) - module.luarocks = Executable(join_path(self.spec.prefix.bin, 'luarocks')) - + module.luarocks = Executable(join_path(self.spec.prefix.bin, + 'luarocks')) -- cgit v1.2.3-70-g09d2 From 0668b6d7bab8e96834251d39d2bcda5ba016e34d Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sat, 14 May 2016 17:38:32 -0700 Subject: changes to appease flake8 for lua-luaposix package --- var/spack/repos/builtin/packages/lua-luaposix/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/lua-luaposix/package.py b/var/spack/repos/builtin/packages/lua-luaposix/package.py index d0606b71f7..1e8a925c43 100644 --- a/var/spack/repos/builtin/packages/lua-luaposix/package.py +++ b/var/spack/repos/builtin/packages/lua-luaposix/package.py @@ -1,6 +1,7 @@ from spack import * import glob + class LuaLuaposix(Package): """Lua posix bindings, including ncurses""" homepage = "https://github.com/luaposix/luaposix/" -- cgit v1.2.3-70-g09d2 From df30182a10ec98212a85cb2c2a8209b5d837b001 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sat, 14 May 2016 17:39:59 -0700 Subject: appeasing flake8 in environment --- lib/spack/spack/environment.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index ee5afb15dd..900036441a 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -64,7 +64,8 @@ class SetPath(NameValueModifier): class AppendPath(NameValueModifier): def execute(self): environment_value = os.environ.get(self.name, '') - directories = environment_value.split(self.separator) if environment_value else [] + directories = environment_value.split( + self.separator) if environment_value else [] directories.append(os.path.normpath(self.value)) os.environ[self.name] = self.separator.join(directories) @@ -72,7 +73,8 @@ class AppendPath(NameValueModifier): class PrependPath(NameValueModifier): def execute(self): environment_value = os.environ.get(self.name, '') - directories = environment_value.split(self.separator) if environment_value else [] + directories = environment_value.split( + self.separator) if environment_value else [] directories = [os.path.normpath(self.value)] + directories os.environ[self.name] = self.separator.join(directories) @@ -80,9 +82,9 @@ class PrependPath(NameValueModifier): class RemovePath(NameValueModifier): def execute(self): environment_value = os.environ.get(self.name, '') - directories = environment_value.split(self.separator) if environment_value else [] - directories = [os.path.normpath(x) - for x in directories + directories = environment_value.split( + self.separator) if environment_value else [] + directories = [os.path.normpath(x) for x in directories if x != os.path.normpath(self.value)] os.environ[self.name] = self.separator.join(directories) @@ -257,16 +259,13 @@ def set_or_unset_not_first(variable, changes, errstream): Check if we are going to set or unset something after other modifications have already been requested """ - indexes = [ii - for ii, item in enumerate(changes) + indexes = [ii for ii, item in enumerate(changes) if ii != 0 and type(item) in [SetEnv, UnsetEnv]] if indexes: good = '\t \t{context} at {filename}:{lineno}' nogood = '\t--->\t{context} at {filename}:{lineno}' message = 'Suspicious requests to set or unset the variable \'{var}\' found' # NOQA: ignore=E501 - errstream( - message.format( - var=variable)) + errstream(message.format(var=variable)) for ii, item in enumerate(changes): print_format = nogood if ii in indexes else good errstream(print_format.format(**item.args)) -- cgit v1.2.3-70-g09d2 From f50439b990a46cdb06e133f2f11d59271f878c7c Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sat, 14 May 2016 17:49:06 -0700 Subject: appeasing the great vengeful flake8 gods --- var/spack/repos/builtin/packages/lua/package.py | 41 +++++++++++++++---------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 11d66bc8f9..639b4dd15a 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -50,7 +50,8 @@ class Lua(Package): resource( name="luarocks", - url="https://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz", + url="https://keplerproject.github.io/luarocks/releases/" + "luarocks-2.3.0.tar.gz", md5="a38126684cf42b7d0e7a3c7cf485defb", destination="luarocks", placement='luarocks') @@ -97,7 +98,8 @@ class Lua(Package): spack_env.set('LUA_PATH', ';'.join(lua_patterns), separator=';') spack_env.set('LUA_CPATH', ';'.join(lua_cpatterns), separator=';') - # For run time environment set only the path for extension_spec and prepend it to LUAPATH + # For run time environment set only the path for extension_spec and + # prepend it to LUAPATH if extension_spec.package.extends(self.spec): run_env.prepend_path('LUA_PATH', ';'.join(lua_patterns), separator=';') @@ -105,21 +107,26 @@ class Lua(Package): separator=';') def setup_environment(self, spack_env, run_env): - run_env.prepend_path('LUA_PATH', os.path.join( - self.spec.prefix, self.lua_share_dir, '?.lua'), - separator=';') - run_env.prepend_path('LUA_PATH', os.path.join( - self.spec.prefix, self.lua_share_dir, '?', 'init.lua'), - separator=';') - run_env.prepend_path('LUA_PATH', os.path.join( - self.spec.prefix, self.lua_lib_dir, '?.lua'), - separator=';') - run_env.prepend_path('LUA_PATH', os.path.join( - self.spec.prefix, self.lua_lib_dir, '?', 'init.lua'), - separator=';') - run_env.prepend_path('LUA_CPATH', os.path.join( - self.spec.prefix, self.lua_lib_dir, '?.so'), - separator=';') + run_env.prepend_path( + 'LUA_PATH', + os.path.join(self.spec.prefix, self.lua_share_dir, '?.lua'), + separator=';') + run_env.prepend_path( + 'LUA_PATH', os.path.join(self.spec.prefix, self.lua_share_dir, '?', + 'init.lua'), + separator=';') + run_env.prepend_path( + 'LUA_PATH', + os.path.join(self.spec.prefix, self.lua_lib_dir, '?.lua'), + separator=';') + run_env.prepend_path( + 'LUA_PATH', + os.path.join(self.spec.prefix, self.lua_lib_dir, '?', 'init.lua'), + separator=';') + run_env.prepend_path( + 'LUA_CPATH', + os.path.join(self.spec.prefix, self.lua_lib_dir, '?.so'), + separator=';') @property def lua_lib_dir(self): -- cgit v1.2.3-70-g09d2 From a2197f3a417d63f0f13eac64f016abd0528d7748 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sat, 14 May 2016 17:51:58 -0700 Subject: yet more sacrifices to the god of short-lines --- lib/spack/spack/directives.py | 49 ++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index 1819f4308c..51b26773e2 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -45,11 +45,8 @@ The available directives are: * ``resource`` """ -__all__ = ['depends_on', 'extends', 'provides', 'patch', 'version', - 'variant', 'resource'] import re -import inspect import os.path import functools @@ -67,6 +64,9 @@ from spack.spec import Spec, parse_anonymous_spec from spack.resource import Resource from spack.fetch_strategy import from_kwargs +__all__ = ['depends_on', 'extends', 'provides', 'patch', 'version', 'variant', + 'resource'] + # # This is a list of all directives, built up as they are defined in # this file. @@ -122,15 +122,14 @@ class directive(object): def __init__(self, dicts=None): if isinstance(dicts, basestring): - dicts = (dicts,) + dicts = (dicts, ) elif type(dicts) not in (list, tuple): raise TypeError( - "dicts arg must be list, tuple, or string. Found %s" - % type(dicts)) + "dicts arg must be list, tuple, or string. Found %s" % + type(dicts)) self.dicts = dicts - def ensure_dicts(self, pkg): """Ensure that a package has the dicts required by this directive.""" for d in self.dicts: @@ -142,7 +141,6 @@ class directive(object): raise spack.error.SpackError( "Package %s has non-dict %s attribute!" % (pkg, d)) - def __call__(self, directive_function): directives[directive_function.__name__] = self @@ -259,11 +257,12 @@ def variant(pkg, name, default=False, description=""): """Define a variant for the package. Packager can specify a default value (on or off) as well as a text description.""" - default = bool(default) + default = bool(default) description = str(description).strip() if not re.match(spack.spec.identifier_re, name): - raise DirectiveError("Invalid variant name in %s: '%s'" % (pkg.name, name)) + raise DirectiveError("Invalid variant name in %s: '%s'" % + (pkg.name, name)) pkg.variants[name] = Variant(default, description) @@ -271,31 +270,37 @@ def variant(pkg, name, default=False, description=""): @directive('resources') def resource(pkg, **kwargs): """ - Define an external resource to be fetched and staged when building the package. Based on the keywords present in the - dictionary the appropriate FetchStrategy will be used for the resource. Resources are fetched and staged in their - own folder inside spack stage area, and then linked into the stage area of the package that needs them. + Define an external resource to be fetched and staged when building the + package. Based on the keywords present in the dictionary the appropriate + FetchStrategy will be used for the resource. Resources are fetched and + staged in their own folder inside spack stage area, and then linked into + the stage area of the package that needs them. List of recognized keywords: - * 'when' : (optional) represents the condition upon which the resource is needed - * 'destination' : (optional) path where to link the resource. This path must be relative to the main package stage - area. - * 'placement' : (optional) gives the possibility to fine tune how the resource is linked into the main package stage - area. + * 'when' : (optional) represents the condition upon which the resource is + needed + * 'destination' : (optional) path where to link the resource. This path + must be relative to the main package stage area. + * 'placement' : (optional) gives the possibility to fine tune how the + resource is linked into the main package stage area. """ when = kwargs.get('when', pkg.name) destination = kwargs.get('destination', "") placement = kwargs.get('placement', None) # Check if the path is relative if os.path.isabs(destination): - message = "The destination keyword of a resource directive can't be an absolute path.\n" + message = "The destination keyword of a resource directive can't be" + " an absolute path.\n" message += "\tdestination : '{dest}\n'".format(dest=destination) raise RuntimeError(message) # Check if the path falls within the main package stage area test_path = 'stage_folder_root' - normalized_destination = os.path.normpath(join_path(test_path, destination)) # Normalized absolute path + normalized_destination = os.path.normpath(join_path(test_path, destination) + ) # Normalized absolute path if test_path not in normalized_destination: - message = "The destination folder of a resource must fall within the main package stage directory.\n" + message = "The destination folder of a resource must fall within the" + " main package stage directory.\n" message += "\tdestination : '{dest}'\n".format(dest=destination) raise RuntimeError(message) when_spec = parse_anonymous_spec(when, pkg.name) @@ -307,6 +312,7 @@ def resource(pkg, **kwargs): class DirectiveError(spack.error.SpackError): """This is raised when something is wrong with a package directive.""" + def __init__(self, directive, message): super(DirectiveError, self).__init__(message) self.directive = directive @@ -314,6 +320,7 @@ class DirectiveError(spack.error.SpackError): class CircularReferenceError(DirectiveError): """This is raised when something depends on itself.""" + def __init__(self, directive, package): super(CircularReferenceError, self).__init__( directive, -- cgit v1.2.3-70-g09d2 From 0c33e8ac4859b3ce559055af87479418b8cc8fe4 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 30 Dec 2015 11:22:11 -0800 Subject: go and a basic go package --- var/spack/packages/go/package.py | 49 ++++++++++++++++++++++ .../packages/the_platinum_searcher/package.py | 19 +++++++++ 2 files changed, 68 insertions(+) create mode 100644 var/spack/packages/go/package.py create mode 100644 var/spack/packages/the_platinum_searcher/package.py diff --git a/var/spack/packages/go/package.py b/var/spack/packages/go/package.py new file mode 100644 index 0000000000..4e3f6fa8ec --- /dev/null +++ b/var/spack/packages/go/package.py @@ -0,0 +1,49 @@ +import os +from spack import * + +class Go(Package): + """The golang compiler and build environment""" + homepage = "https://golang.org" + url = "https://go.googlesource.com/go" + + extendable = True + + # temporary fix until tags are pulled correctly + version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2') + + # to-do, make non-c self-hosting compilers possible + # depends_on('go@:1.4.2', when='@1.5:') + + def install(self, spec, prefix): + os.environ['GOROOT'] = os.getcwd() + os.environ['GOBIN'] = join_path(os.getcwd(), 'bin') + os.environ['GOROOT_FINAL'] = prefix + bash = which('bash') + bash('-c', 'env') + bash('-c', 'pwd') + with working_dir('src'): + #TODO: crutch until the read-only-filesystem bug is fixed upstream + bash('all.bash', fail_on_error=False) + cp = which('cp') + bash('-c', 'cp -r ./* "{}"'.format(prefix)) + + def setup_dependent_environment(self, module, spec, ext_spec): + """Called before go modules' install() methods. + + In most cases, extensions will only need to have one line:: + + go('get', '') + """ + # Add a go command for extensions + module.go = Executable(join_path(spec.prefix.bin, 'go')) + os.environ['GOROOT'] = spec.prefix + + stage_path = os.path.realpath(ext_spec.package.stage.source_path) + print "PREFIX: {}".format(stage_path) + go_paths = [stage_path] + for d in ext_spec.traverse(): + if d.package.extends(self.spec): + go_paths.append(d.prefix) + os.environ['GOPATH'] = ':'.join(go_paths) + + diff --git a/var/spack/packages/the_platinum_searcher/package.py b/var/spack/packages/the_platinum_searcher/package.py new file mode 100644 index 0000000000..1dd54d3b98 --- /dev/null +++ b/var/spack/packages/the_platinum_searcher/package.py @@ -0,0 +1,19 @@ +from spack import * + +class ThePlatinumSearcher(Package): + """Fast parallel recursive grep alternative""" + # FIXME: add a proper url for your package's homepage here. + homepage = "https://github.com/monochromegane/the_platinum_searcher" + url = "https://github.com/monochromegane/the_platinum_searcher/archive/v1.7.7.tar.gz" + + version('1.7.7', '08d7265e101bc1427d5d4b9903aa1166') + + depends_on("go") + + def install(self, spec, prefix): + env = which('env') + env() + # Fetch all dependencies + go('get', './...') + # Build pt + go('build') -- cgit v1.2.3-70-g09d2 From 915f91a6199dfe77481742330194e0f6ee17fb8b Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Thu, 12 May 2016 10:45:58 -0700 Subject: moving go packages to the new path --- var/spack/packages/go/package.py | 49 --------------------- .../packages/the_platinum_searcher/package.py | 19 -------- var/spack/repos/builtin/packages/go/package.py | 50 ++++++++++++++++++++++ .../packages/the_platinum_searcher/package.py | 19 ++++++++ 4 files changed, 69 insertions(+), 68 deletions(-) delete mode 100644 var/spack/packages/go/package.py delete mode 100644 var/spack/packages/the_platinum_searcher/package.py create mode 100644 var/spack/repos/builtin/packages/go/package.py create mode 100644 var/spack/repos/builtin/packages/the_platinum_searcher/package.py diff --git a/var/spack/packages/go/package.py b/var/spack/packages/go/package.py deleted file mode 100644 index 4e3f6fa8ec..0000000000 --- a/var/spack/packages/go/package.py +++ /dev/null @@ -1,49 +0,0 @@ -import os -from spack import * - -class Go(Package): - """The golang compiler and build environment""" - homepage = "https://golang.org" - url = "https://go.googlesource.com/go" - - extendable = True - - # temporary fix until tags are pulled correctly - version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2') - - # to-do, make non-c self-hosting compilers possible - # depends_on('go@:1.4.2', when='@1.5:') - - def install(self, spec, prefix): - os.environ['GOROOT'] = os.getcwd() - os.environ['GOBIN'] = join_path(os.getcwd(), 'bin') - os.environ['GOROOT_FINAL'] = prefix - bash = which('bash') - bash('-c', 'env') - bash('-c', 'pwd') - with working_dir('src'): - #TODO: crutch until the read-only-filesystem bug is fixed upstream - bash('all.bash', fail_on_error=False) - cp = which('cp') - bash('-c', 'cp -r ./* "{}"'.format(prefix)) - - def setup_dependent_environment(self, module, spec, ext_spec): - """Called before go modules' install() methods. - - In most cases, extensions will only need to have one line:: - - go('get', '') - """ - # Add a go command for extensions - module.go = Executable(join_path(spec.prefix.bin, 'go')) - os.environ['GOROOT'] = spec.prefix - - stage_path = os.path.realpath(ext_spec.package.stage.source_path) - print "PREFIX: {}".format(stage_path) - go_paths = [stage_path] - for d in ext_spec.traverse(): - if d.package.extends(self.spec): - go_paths.append(d.prefix) - os.environ['GOPATH'] = ':'.join(go_paths) - - diff --git a/var/spack/packages/the_platinum_searcher/package.py b/var/spack/packages/the_platinum_searcher/package.py deleted file mode 100644 index 1dd54d3b98..0000000000 --- a/var/spack/packages/the_platinum_searcher/package.py +++ /dev/null @@ -1,19 +0,0 @@ -from spack import * - -class ThePlatinumSearcher(Package): - """Fast parallel recursive grep alternative""" - # FIXME: add a proper url for your package's homepage here. - homepage = "https://github.com/monochromegane/the_platinum_searcher" - url = "https://github.com/monochromegane/the_platinum_searcher/archive/v1.7.7.tar.gz" - - version('1.7.7', '08d7265e101bc1427d5d4b9903aa1166') - - depends_on("go") - - def install(self, spec, prefix): - env = which('env') - env() - # Fetch all dependencies - go('get', './...') - # Build pt - go('build') diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py new file mode 100644 index 0000000000..05fce90534 --- /dev/null +++ b/var/spack/repos/builtin/packages/go/package.py @@ -0,0 +1,50 @@ +import os +from spack import * + +class Go(Package): + """The golang compiler and build environment""" + homepage = "https://golang.org" + url = "https://go.googlesource.com/go" + + extendable = True + + # temporary fix until tags are pulled correctly + version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2') + version('1.5.0', git='https://go.googlesource.com/go', tag='go1.5.0') + + # to-do, make non-c self-hosting compilers possible + depends_on('go@:1.4.2', when='@1.5:') + + def install(self, spec, prefix): + os.environ['GOROOT'] = os.getcwd() + os.environ['GOBIN'] = join_path(os.getcwd(), 'bin') + os.environ['GOROOT_FINAL'] = prefix + bash = which('bash') + bash('-c', 'env') + bash('-c', 'pwd') + with working_dir('src'): + #TODO: crutch until the read-only-filesystem bug is fixed upstream + bash('all.bash', fail_on_error=False) + cp = which('cp') + bash('-c', 'cp -r ./* "{}"'.format(prefix)) + + def setup_dependent_environment(self, module, spec, ext_spec): + """Called before go modules' install() methods. + + In most cases, extensions will only need to have one line:: + + go('get', '') + """ + # Add a go command for extensions + module.go = Executable(join_path(spec.prefix.bin, 'go')) + os.environ['GOROOT'] = spec.prefix + + stage_path = os.path.realpath(ext_spec.package.stage.source_path) + print "PREFIX: {}".format(stage_path) + go_paths = [stage_path] + for d in ext_spec.traverse(): + if d.package.extends(self.spec): + go_paths.append(d.prefix) + os.environ['GOPATH'] = ':'.join(go_paths) + + diff --git a/var/spack/repos/builtin/packages/the_platinum_searcher/package.py b/var/spack/repos/builtin/packages/the_platinum_searcher/package.py new file mode 100644 index 0000000000..1dd54d3b98 --- /dev/null +++ b/var/spack/repos/builtin/packages/the_platinum_searcher/package.py @@ -0,0 +1,19 @@ +from spack import * + +class ThePlatinumSearcher(Package): + """Fast parallel recursive grep alternative""" + # FIXME: add a proper url for your package's homepage here. + homepage = "https://github.com/monochromegane/the_platinum_searcher" + url = "https://github.com/monochromegane/the_platinum_searcher/archive/v1.7.7.tar.gz" + + version('1.7.7', '08d7265e101bc1427d5d4b9903aa1166') + + depends_on("go") + + def install(self, spec, prefix): + env = which('env') + env() + # Fetch all dependencies + go('get', './...') + # Build pt + go('build') -- cgit v1.2.3-70-g09d2 From 0816e9554d108498cdb419d71f3bac1375622ad1 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sat, 14 May 2016 18:06:22 -0700 Subject: adding go_compiler providers --- var/spack/repos/builtin/packages/gcc/package.py | 3 +++ var/spack/repos/builtin/packages/go/package.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 47dbeb2a99..f630b9b61a 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -62,6 +62,9 @@ class Gcc(Package): depends_on("binutils~libiberty", when='+binutils ~gold') depends_on("binutils~libiberty+gold", when='+binutils +gold') + if sys.platform != 'darwin': + provides('go_compiler' when='@4.7.1:') + # TODO: integrate these libraries. #depends_on("ppl") #depends_on("cloog") diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 05fce90534..71b1b9c18f 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -12,12 +12,14 @@ class Go(Package): version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2') version('1.5.0', git='https://go.googlesource.com/go', tag='go1.5.0') + + provides('go_compiler') # to-do, make non-c self-hosting compilers possible - depends_on('go@:1.4.2', when='@1.5:') + # should be go_compiler, but that creates an infinite loop + depends_on('gcc', when='@1.5:') def install(self, spec, prefix): os.environ['GOROOT'] = os.getcwd() - os.environ['GOBIN'] = join_path(os.getcwd(), 'bin') os.environ['GOROOT_FINAL'] = prefix bash = which('bash') bash('-c', 'env') -- cgit v1.2.3-70-g09d2 From 577657b3f7eec000c172ac4f495a9480cd1d4038 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sat, 14 May 2016 22:35:55 -0700 Subject: go rework This commit includes: * a new go package that uses gccgo to bootstrap the go toolchain * env support added to Executable * a new Go fetch strategy that uses `go get` to fetch a package and all of its deps * A platinum searcher package that leverages the new go package and fetch strategy --- lib/spack/spack/fetch_strategy.py | 54 ++++++++++++++ lib/spack/spack/util/executable.py | 4 +- var/spack/repos/builtin/packages/gcc/package.py | 84 +++++++++++----------- var/spack/repos/builtin/packages/go/package.py | 81 +++++++++++++-------- .../packages/the_platinum_searcher/package.py | 19 ++--- 5 files changed, 160 insertions(+), 82 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index e05cb13c1e..0144d26057 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -381,6 +381,60 @@ class VCSFetchStrategy(FetchStrategy): def __repr__(self): return "%s<%s>" % (self.__class__, self.url) +class GoFetchStrategy(VCSFetchStrategy): + """Fetch strategy that employs the `go get` infrastructure + Use like this in a package: + + version('name', go='github.com/monochromegane/the_platinum_searcher/...') + + Go get does not natively support versions, they can be faked with git + """ + enabled = True + required_attributes = ('go',) + + def __init__(self, **kwargs): + # Discards the keywords in kwargs that may conflict with the next call to __init__ + forwarded_args = copy.copy(kwargs) + forwarded_args.pop('name', None) + + super(GoFetchStrategy, self).__init__('go', **forwarded_args) + self._go = None + + @property + def go_version(self): + vstring = self.go('version', output=str).split(' ')[2] + return Version(vstring) + + @property + def go(self): + if not self._go: + self._go = which('go', required=True) + return self._go + + @_needs_stage + def fetch(self): + self.stage.chdir() + + tty.msg("Trying to get go resource:", self.url) + + try: + os.mkdir('go') + except OSError: + pass + env = dict(os.environ) + env['GOPATH'] = os.path.join(os.getcwd(),'go') + self.go('get', '-v', '-d', self.url, env=env) + + def archive(self, destination): + super(GoFetchStrategy, self).archive(destination, exclude='.git') + + @_needs_stage + def reset(self): + self.stage.chdir_to_source() + self.go('clean') + + def __str__(self): + return "[go] %s" % self.url class GitFetchStrategy(VCSFetchStrategy): """Fetch strategy that gets source code from a git repository. diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index d2ccfde69b..0b91b6c360 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -105,6 +105,8 @@ class Executable(object): fail_on_error = kwargs.pop("fail_on_error", True) ignore_errors = kwargs.pop("ignore_errors", ()) + env = kwargs.get('env', None) + # TODO: This is deprecated. Remove in a future version. return_output = kwargs.pop("return_output", False) @@ -149,7 +151,7 @@ class Executable(object): try: proc = subprocess.Popen( - cmd, stdin=istream, stderr=estream, stdout=ostream) + cmd, stdin=istream, stderr=estream, stdout=ostream, env=env) out, err = proc.communicate() rc = self.returncode = proc.returncode diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index f630b9b61a..0ef6b731ed 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -1,33 +1,33 @@ ############################################################################## -# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013, 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. +# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # # For details, see https://github.com/llnl/spack # Please also see the LICENSE file for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License (as -# published by the Free Software Foundation) version 2.1, February 1999. +# it under the terms of the GNU General Public License (as published by +# the Free Software Foundation) version 2.1 dated February 1999. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU Lesser General Public License for more details. +# conditions of the GNU General Public License for more details. # -# You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# 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 * from contextlib import closing from glob import glob import sys -import os + class Gcc(Package): """The GNU Compiler Collection includes front ends for C, C++, @@ -50,10 +50,12 @@ class Gcc(Package): version('4.6.4', 'b407a3d1480c11667f293bfb1f17d1a4') version('4.5.4', '27e459c2566b8209ab064570e1b378f7') - variant('binutils', default=sys.platform != 'darwin', - description="Build via binutils") - variant('gold', default=sys.platform != 'darwin', - description="Build the gold linker plugin for ld-based LTO") + variant('binutils', + default=sys.platform != 'darwin', + description="Build via binutils") + variant('gold', + default=sys.platform != 'darwin', + description="Build the gold linker plugin for ld-based LTO") depends_on("mpfr") depends_on("gmp") @@ -62,12 +64,9 @@ class Gcc(Package): depends_on("binutils~libiberty", when='+binutils ~gold') depends_on("binutils~libiberty+gold", when='+binutils +gold') - if sys.platform != 'darwin': - provides('go_compiler' when='@4.7.1:') - # TODO: integrate these libraries. - #depends_on("ppl") - #depends_on("cloog") + # depends_on("ppl") + # depends_on("cloog") if sys.platform == 'darwin': patch('darwin/gcc-4.9.patch1', when='@4.9.3') patch('darwin/gcc-4.9.patch2', when='@4.9.3') @@ -75,7 +74,7 @@ class Gcc(Package): def install(self, spec, prefix): # libjava/configure needs a minor fix to install into spack paths. filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', - string=True) + string=True) enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc')) @@ -83,62 +82,59 @@ class Gcc(Package): enabled_languages.add('go') # Generic options to compile GCC - options = ["--prefix=%s" % prefix, - "--libdir=%s/lib64" % prefix, + options = ["--prefix=%s" % prefix, "--libdir=%s/lib64" % prefix, "--disable-multilib", "--enable-languages=" + ','.join(enabled_languages), - "--with-mpc=%s" % spec['mpc'].prefix, - "--with-mpfr=%s" % spec['mpfr'].prefix, - "--with-gmp=%s" % spec['gmp'].prefix, - "--enable-lto", - "--with-quad"] + "--with-mpc=%s" % spec['mpc'].prefix, "--with-mpfr=%s" % + spec['mpfr'].prefix, "--with-gmp=%s" % spec['gmp'].prefix, + "--enable-lto", "--with-quad"] # Binutils if spec.satisfies('+binutils'): static_bootstrap_flags = "-static-libstdc++ -static-libgcc" - binutils_options = ["--with-sysroot=/", - "--with-stage1-ldflags=%s %s" % - (self.rpath_args, static_bootstrap_flags), - "--with-boot-ldflags=%s %s" % - (self.rpath_args, static_bootstrap_flags), - "--with-gnu-ld", - "--with-ld=%s/bin/ld" % spec['binutils'].prefix, - "--with-gnu-as", - "--with-as=%s/bin/as" % spec['binutils'].prefix] + binutils_options = [ + "--with-sysroot=/", "--with-stage1-ldflags=%s %s" % + (self.rpath_args, static_bootstrap_flags), + "--with-boot-ldflags=%s %s" % + (self.rpath_args, static_bootstrap_flags), "--with-gnu-ld", + "--with-ld=%s/bin/ld" % spec['binutils'].prefix, + "--with-gnu-as", + "--with-as=%s/bin/as" % spec['binutils'].prefix + ] options.extend(binutils_options) # Isl if 'isl' in spec: isl_options = ["--with-isl=%s" % spec['isl'].prefix] options.extend(isl_options) - if sys.platform == 'darwin' : - darwin_options = [ "--with-build-config=bootstrap-debug" ] + if sys.platform == 'darwin': + darwin_options = ["--with-build-config=bootstrap-debug"] options.extend(darwin_options) build_dir = join_path(self.stage.path, 'spack-build') - configure = Executable( join_path(self.stage.source_path, 'configure') ) + configure = Executable(join_path(self.stage.source_path, 'configure')) with working_dir(build_dir, create=True): # Rest of install is straightforward. configure(*options) - if sys.platform == 'darwin' : make("bootstrap") - else: make() + if sys.platform == 'darwin': + make("bootstrap") + else: + make() make("install") self.write_rpath_specs() - @property def spec_dir(self): # e.g. lib64/gcc/x86_64-unknown-linux-gnu/4.9.2 spec_dir = glob("%s/lib64/gcc/*/*" % self.prefix) return spec_dir[0] if spec_dir else None - def write_rpath_specs(self): """Generate a spec file so the linker adds a rpath to the libs the compiler used to build the executable.""" if not self.spec_dir: tty.warn("Could not install specs for %s." % - self.spec.format('$_$@')) + self.spec.format('$_$@')) return gcc = Executable(join_path(self.prefix.bin, 'gcc')) @@ -149,5 +145,5 @@ class Gcc(Package): out.write(line + "\n") if line.startswith("*link:"): out.write("-rpath %s/lib:%s/lib64 \\\n" % - (self.prefix, self.prefix)) + (self.prefix, self.prefix)) set_install_permissions(specs_file) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 71b1b9c18f..6fe212c800 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -1,6 +1,9 @@ import os +import shutil +import glob from spack import * + class Go(Package): """The golang compiler and build environment""" homepage = "https://golang.org" @@ -10,43 +13,65 @@ class Go(Package): # temporary fix until tags are pulled correctly version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2') - version('1.5.0', git='https://go.googlesource.com/go', tag='go1.5.0') + version('1.5.4', git='https://go.googlesource.com/go', tag='go1.5.4') + version('1.6.2', git='https://go.googlesource.com/go', tag='go1.6.2') + + variant('test', + default=True, + description="Run tests as part of build, a good idea but quite" + " time consuming") + provides('golang') - provides('go_compiler') - # to-do, make non-c self-hosting compilers possible + # to-do, make non-c self-hosting compilers feasible without backflips # should be go_compiler, but that creates an infinite loop - depends_on('gcc', when='@1.5:') + depends_on('gcc@5:', when='@1.5:') + depends_on('git') def install(self, spec, prefix): - os.environ['GOROOT'] = os.getcwd() - os.environ['GOROOT_FINAL'] = prefix - bash = which('bash') - bash('-c', 'env') - bash('-c', 'pwd') - with working_dir('src'): - #TODO: crutch until the read-only-filesystem bug is fixed upstream - bash('all.bash', fail_on_error=False) - cp = which('cp') - bash('-c', 'cp -r ./* "{}"'.format(prefix)) - - def setup_dependent_environment(self, module, spec, ext_spec): + bash = which('bash') + with working_dir('src'): + if '+test' in spec: + bash('all.bash') + else: + bash('make.bash') + + try: + os.makedirs(prefix) + except OSError: + pass + for f in glob.glob('*'): + if os.path.isdir(f): + shutil.copytree(f, os.path.join(prefix, f)) + else: + shutil.copy2(f, os.path.join(prefix, f)) + + def setup_environment(self, spack_env, run_env): + # spack_env.set("GOROOT", self.spec.prefix) + # run_env.set("GOROOT", self.spec.prefix) + spack_env.set('GOROOT_FINAL', self.spec.prefix) + spack_env.set('GOROOT_BOOTSTRAP', self.spec['gcc'].prefix) + + def setup_dependent_package(self, module, ext_spec): + # Add a go command/compiler for extensions + module.go = Executable(join_path(self.spec.prefix.bin, 'go')) + + def setup_dependent_environment(self, spack_env, run_env, ext_spec): """Called before go modules' install() methods. In most cases, extensions will only need to have one line:: - go('get', '') + go('get', '') """ - # Add a go command for extensions - module.go = Executable(join_path(spec.prefix.bin, 'go')) - os.environ['GOROOT'] = spec.prefix - - stage_path = os.path.realpath(ext_spec.package.stage.source_path) - print "PREFIX: {}".format(stage_path) - go_paths = [stage_path] - for d in ext_spec.traverse(): - if d.package.extends(self.spec): - go_paths.append(d.prefix) - os.environ['GOPATH'] = ':'.join(go_paths) + # spack_env.set("GOROOT", self.spec.prefix) + # run_env.set("GOROOT", self.spec.prefix) + # stage_path = os.path.realpath(ext_spec.package.stage.source_path) + # print "PREFIX: {}".format(stage_path) + # go_paths = [stage_path] + # for d in ext_spec.traverse(): + # if d.package.extends(self.spec): + # go_paths.append(d.prefix) + # spack_env.prepend_path('GOPATH', ':'.join(go_paths)) + spack_env.set('GOPATH', ext_spec.package.stage.source_path) 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 1dd54d3b98..c040da3699 100644 --- a/var/spack/repos/builtin/packages/the_platinum_searcher/package.py +++ b/var/spack/repos/builtin/packages/the_platinum_searcher/package.py @@ -1,19 +1,20 @@ from spack import * +import os +import shutil + class ThePlatinumSearcher(Package): """Fast parallel recursive grep alternative""" # FIXME: add a proper url for your package's homepage here. homepage = "https://github.com/monochromegane/the_platinum_searcher" - url = "https://github.com/monochromegane/the_platinum_searcher/archive/v1.7.7.tar.gz" + url = "https://github.com/monochromegane/the_platinum_searcher" + + package = 'github.com/monochromegane/the_platinum_searcher/...' - version('1.7.7', '08d7265e101bc1427d5d4b9903aa1166') + version('head', go=package) - depends_on("go") + extends("go") def install(self, spec, prefix): - env = which('env') - env() - # Fetch all dependencies - go('get', './...') - # Build pt - go('build') + go('install', self.package) + shutil.copytree('bin', os.path.join(prefix, 'bin')) -- cgit v1.2.3-70-g09d2 From 2bfa4d7e4f0ef9dc70b0d7d12d38c2ec005de7a5 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sat, 14 May 2016 22:42:14 -0700 Subject: removing comments also randomly changed unnecessary licence block --- var/spack/repos/builtin/packages/gcc/package.py | 24 ------------------------ var/spack/repos/builtin/packages/go/package.py | 13 ++----------- 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 0ef6b731ed..218f25b586 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -1,27 +1,3 @@ -############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. -# -# This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## from spack import * from contextlib import closing diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 6fe212c800..80924c7fad 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -59,19 +59,10 @@ class Go(Package): def setup_dependent_environment(self, spack_env, run_env, ext_spec): """Called before go modules' install() methods. - In most cases, extensions will only need to have one line:: + In most cases, extensions will only need to have two lines:: go('get', '') + shutil.copytree('bin', os.path.join(prefix, '/bin')) """ - # spack_env.set("GOROOT", self.spec.prefix) - # run_env.set("GOROOT", self.spec.prefix) - - # stage_path = os.path.realpath(ext_spec.package.stage.source_path) - # print "PREFIX: {}".format(stage_path) - # go_paths = [stage_path] - # for d in ext_spec.traverse(): - # if d.package.extends(self.spec): - # go_paths.append(d.prefix) - # spack_env.prepend_path('GOPATH', ':'.join(go_paths)) spack_env.set('GOPATH', ext_spec.package.stage.source_path) -- cgit v1.2.3-70-g09d2 From c2ca5f44b4091821fbda36ce2dce77af3e4087f5 Mon Sep 17 00:00:00 2001 From: Greg Lee Date: Sun, 15 May 2016 08:19:55 -0700 Subject: flake8 fixes --- .../packages/intel-parallel-studio/package.py | 77 +++++++++++----------- var/spack/repos/builtin/packages/intel/package.py | 23 ++++--- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py index db6cc888dd..a176af101d 100644 --- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -2,7 +2,8 @@ from spack import * import os import re -from spack.pkg.builtin.intel import IntelInstaller, filter_pick, get_all_components +from spack.pkg.builtin.intel import IntelInstaller, filter_pick, \ + get_all_components class IntelParallelStudio(IntelInstaller): @@ -16,28 +17,28 @@ class IntelParallelStudio(IntelInstaller): # TODO: can also try the online installer (will download files on demand) version('composer.2016.2', '1133fb831312eb519f7da897fec223fa', - url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" + url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" # NOQA: ignore=E501 % os.getcwd()) version('professional.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', - url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) # NOQA: ignore=E501 version('cluster.2016.2', '70be832f2d34c9bf596a5e99d5f2d832', - url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_update2.tgz" % os.getcwd()) # NOQA: ignore=E501 version('composer.2016.3', '3208eeabee951fc27579177b593cefe9', - url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" + url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" # NOQA: ignore=E501 % os.getcwd()) version('professional.2016.3', 'eda19bb0d0d19709197ede58f13443f3', - url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) # NOQA: ignore=E501 version('cluster.2016.3', 'eda19bb0d0d19709197ede58f13443f3', - url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) + url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) # NOQA: ignore=E501 variant('rpath', default=True, description="Add rpath to .cfg files") variant('all', default=False, - description="Install all files associated with the requested edition") + description="Install all files with the requested edition") variant('mpi', default=True, - description="Install the Intel MPI library and ITAC tool") + description="Install the Intel MPI library and ITAC tool") variant('mkl', default=True, description="Install the Intel MKL library") variant('daal', - default=True, description="Install the Intel DAAL libraries") + default=True, description="Install the Intel DAAL libraries") variant('ipp', default=True, description="Install the Intel IPP libraries") variant('tools', default=True, description="""Install the Intel Advisor,\ VTune Amplifier, and Inspector tools""") @@ -59,19 +60,21 @@ VTune Amplifier, and Inspector tools""") base_components = "ALL" else: all_components = get_all_components() - base_components = filter_pick(all_components, - re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)' - ).search) - mpi_components = filter_pick(all_components, - re.compile('(icsxe|imb|mpi|itac|intel-tc|clck)').search) - mkl_components = filter_pick(all_components, - re.compile('(mkl)').search) - daal_components = filter_pick(all_components, - re.compile('(daal)').search) - ipp_components = filter_pick(all_components, - re.compile('(ipp)').search) - tool_components = filter_pick(all_components, - re.compile('(gdb|vtune|inspector|advisor)').search) + regex = '(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)' + base_components = \ + filter_pick(all_components, re.compile(regex).search) + regex = '(icsxe|imb|mpi|itac|intel-tc|clck)' + mpi_components = \ + filter_pick(all_components, re.compile(regex).search) + mkl_components = \ + filter_pick(all_components, re.compile('(mkl)').search) + daal_components = \ + filter_pick(all_components, re.compile('(daal)').search) + ipp_components = \ + filter_pick(all_components, re.compile('(ipp)').search) + regex = '(gdb|vtune|inspector|advisor)' + tool_components = \ + filter_pick(all_components, re.compile(regex).search) components = base_components if not spec.satisfies('+all'): @@ -83,8 +86,8 @@ VTune Amplifier, and Inspector tools""") components += daal_components if spec.satisfies('+ipp'): components += ipp_components - if spec.satisfies('+tools') and (spec.satisfies('@cluster') or\ - spec.satisfies('@professional')): + if spec.satisfies('+tools') and (spec.satisfies('@cluster') or + spec.satisfies('@professional')): components += tool_components self.intel_components = ';'.join(components) @@ -93,14 +96,12 @@ VTune Amplifier, and Inspector tools""") absbindir = os.path.dirname(os.path.realpath(os.path.join( self.prefix.bin, "icc"))) abslibdir = os.path.dirname(os.path.realpath(os.path.join - (self.prefix.lib, "intel64", "libimf.a"))) + (self.prefix.lib, "intel64", "libimf.a"))) - relbindir = absbindir.strip(os.path.commonprefix([self.prefix, - absbindir])) os.symlink(self.global_license_file, os.path.join(absbindir, - "license.lic")) - if spec.satisfies('+tools') and (spec.satisfies('@cluster') or\ - spec.satisfies('@professional')): + "license.lic")) + if spec.satisfies('+tools') and (spec.satisfies('@cluster') or + spec.satisfies('@professional')): os.mkdir(os.path.join(self.prefix, "inspector_xe/licenses")) os.symlink(self.global_license_file, os.path.join( self.prefix, "inspector_xe/licenses", "license.lic")) @@ -111,17 +112,17 @@ VTune Amplifier, and Inspector tools""") os.symlink(self.global_license_file, os.path.join( self.prefix, "vtune_amplifier_xe/licenses", "license.lic")) - if (spec.satisfies('+all') or spec.satisfies('+mpi')) and\ - spec.satisfies('@cluster'): - os.symlink(self.global_license_file, os.path.join( - self.prefix, "itac_latest", "license.lic")) + if (spec.satisfies('+all') or spec.satisfies('+mpi')) and \ + spec.satisfies('@cluster'): + os.symlink(self.global_license_file, os.path.join( + self.prefix, "itac_latest", "license.lic")) if spec.satisfies('+rpath'): for compiler_command in ["icc", "icpc", "ifort"]: - cfgfilename = os.path.join(absbindir, "%s.cfg" %\ - compiler_command) + cfgfilename = os.path.join(absbindir, "%s.cfg" % + compiler_command) with open(cfgfilename, "w") as f: f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir) os.symlink(os.path.join(self.prefix.man, "common", "man1"), - os.path.join(self.prefix.man, "man1")) + os.path.join(self.prefix.man, "man1")) diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py index 2d6929fc73..ec3192380a 100644 --- a/var/spack/repos/builtin/packages/intel/package.py +++ b/var/spack/repos/builtin/packages/intel/package.py @@ -52,9 +52,9 @@ class IntelInstaller(Package): # Remove the installation DB, otherwise it will try to install into # location of other Intel builds if os.path.exists(os.path.join(os.environ["HOME"], "intel", - "intel_sdp_products.db")): + "intel_sdp_products.db")): os.remove(os.path.join(os.environ["HOME"], "intel", - "intel_sdp_products.db")) + "intel_sdp_products.db")) if not hasattr(self, "intel_prefix"): self.intel_prefix = self.prefix @@ -71,7 +71,7 @@ ACTIVATION_TYPE=license_file PHONEHOME_SEND_USAGE_DATA=no CONTINUE_WITH_OPTIONAL_ERROR=yes COMPONENTS=%s -""" %(self.intel_prefix, self.global_license_file, self.intel_components)) +""" % (self.intel_prefix, self.global_license_file, self.intel_components)) install_script = which("install.sh") install_script('--silent', silent_config_filename) @@ -88,10 +88,10 @@ class Intel(IntelInstaller): # TODO: can also try the online installer (will download files on demand) version('16.0.2', '1133fb831312eb519f7da897fec223fa', - url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz"\ + url="file://%s/parallel_studio_xe_2016_composer_edition_update2.tgz" # NOQA: ignore=E501 % os.getcwd()) version('16.0.3', '3208eeabee951fc27579177b593cefe9', - url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz"\ + url="file://%s/parallel_studio_xe_2016_composer_edition_update3.tgz" # NOQA: ignore=E501 % os.getcwd()) variant('rpath', default=True, description="Add rpath to .cfg files") @@ -99,9 +99,8 @@ class Intel(IntelInstaller): def install(self, spec, prefix): components = [] all_components = get_all_components() - components = filter_pick(all_components, - re.compile('(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)' - ).search) + regex = '(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)' + components = filter_pick(all_components, re.compile(regex).search) self.intel_components = ';'.join(components) IntelInstaller.install(self, spec, prefix) @@ -113,14 +112,14 @@ class Intel(IntelInstaller): # symlink or copy? os.symlink(self.global_license_file, os.path.join(absbindir, - "license.lic")) + "license.lic")) if spec.satisfies('+rpath'): for compiler_command in ["icc", "icpc", "ifort"]: - cfgfilename = os.path.join(absbindir, "%s.cfg" %\ - compiler_command) + cfgfilename = os.path.join(absbindir, "%s.cfg" % + compiler_command) with open(cfgfilename, "w") as f: f.write('-Xlinker -rpath -Xlinker %s\n' % abslibdir) os.symlink(os.path.join(self.prefix.man, "common", "man1"), - os.path.join(self.prefix.man, "man1")) + os.path.join(self.prefix.man, "man1")) -- cgit v1.2.3-70-g09d2 From 21d4f3a3564c5633ccbce8e75648fa36a2e57388 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 15 May 2016 18:33:06 +0200 Subject: ghostscript: url was changed upstream --- var/spack/repos/builtin/packages/ghostscript/package.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py index ba787f858f..3a121111a3 100644 --- a/var/spack/repos/builtin/packages/ghostscript/package.py +++ b/var/spack/repos/builtin/packages/ghostscript/package.py @@ -27,7 +27,7 @@ from spack import * class Ghostscript(Package): """an interpreter for the PostScript language and for PDF. """ homepage = "http://ghostscript.com/" - url = "http://downloads.ghostscript.com/public/ghostscript-9.16.tar.gz" + url = "http://downloads.ghostscript.com/public/old-gs-releases/ghostscript-9.16.tar.gz" version('9.16', '829319325bbdb83f5c81379a8f86f38f') @@ -38,4 +38,3 @@ class Ghostscript(Package): make() make("install") - -- cgit v1.2.3-70-g09d2 From a045154b5eda7c4d44d3e3b24fe4369c38b1aed4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 15 May 2016 18:34:50 +0200 Subject: graphviz: add missing dependency and fix installation on darwin --- var/spack/repos/builtin/packages/graphviz/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 203e7b7f3c..a527d7ae50 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import sys class Graphviz(Package): """Graph Visualization Software""" @@ -42,12 +43,20 @@ class Graphviz(Package): depends_on("swig") depends_on("python") depends_on("ghostscript") + depends_on("pkg-config") def install(self, spec, prefix): options = ['--prefix=%s' % prefix] if not '+perl' in spec: options.append('--disable-perl') + # On OSX fix the compiler error: + # In file included from tkStubLib.c:15: + # /usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found + # include + if sys.platform == 'darwin': + options.append('CFLAGS=-I/opt/X11/include') + configure(*options) make() make("install") -- cgit v1.2.3-70-g09d2 From c6524d0311146e747667126004b5792eee7d3bf4 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sun, 15 May 2016 09:50:21 -0700 Subject: environment: fixed comment and default separator --- lib/spack/spack/environment.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 900036441a..af642dcc9b 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -241,12 +241,14 @@ class EnvironmentModifications(object): x.execute() -def concatenate_paths(paths, separator=';'): +def concatenate_paths(paths, separator=':'): """ - Concatenates an iterable of paths into a string of column separated paths + Concatenates an iterable of paths into a string of paths separated by + separator, defaulting to colon Args: paths: iterable of paths + separator: the separator to use, default ':' Returns: string -- cgit v1.2.3-70-g09d2 From b7aa47a17822f49cdff50cda165367957ee20a73 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sun, 15 May 2016 09:52:09 -0700 Subject: remove debug print --- var/spack/repos/builtin/packages/lua-luaposix/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/lua-luaposix/package.py b/var/spack/repos/builtin/packages/lua-luaposix/package.py index 1e8a925c43..9e96548f08 100644 --- a/var/spack/repos/builtin/packages/lua-luaposix/package.py +++ b/var/spack/repos/builtin/packages/lua-luaposix/package.py @@ -13,5 +13,4 @@ class LuaLuaposix(Package): def install(self, spec, prefix): rockspec = glob.glob('luaposix-*.rockspec') - print rockspec luarocks('--tree=' + prefix, 'install', rockspec[0]) -- cgit v1.2.3-70-g09d2 From 71d991153928e05af21e6fefabf6ae3cd0fd627b Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sun, 15 May 2016 10:23:33 -0700 Subject: go cleanup, adding hub --- var/spack/repos/builtin/packages/gcc/package.py | 2 ++ var/spack/repos/builtin/packages/go/package.py | 2 ++ var/spack/repos/builtin/packages/hub/package.py | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 var/spack/repos/builtin/packages/hub/package.py diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 218f25b586..224105ea0f 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -46,6 +46,8 @@ class Gcc(Package): if sys.platform == 'darwin': patch('darwin/gcc-4.9.patch1', when='@4.9.3') patch('darwin/gcc-4.9.patch2', when='@4.9.3') + else: + provides('golang', when='@4.7.1:') def install(self, spec, prefix): # libjava/configure needs a minor fix to install into spack paths. diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 80924c7fad..90f34dcfc6 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -65,4 +65,6 @@ class Go(Package): shutil.copytree('bin', os.path.join(prefix, '/bin')) """ + if os.environ.get('GOROOT', False): + tty.warn('GOROOT is set, this is not recommended') spack_env.set('GOPATH', ext_spec.package.stage.source_path) diff --git a/var/spack/repos/builtin/packages/hub/package.py b/var/spack/repos/builtin/packages/hub/package.py new file mode 100644 index 0000000000..e82bc7a551 --- /dev/null +++ b/var/spack/repos/builtin/packages/hub/package.py @@ -0,0 +1,20 @@ +from spack import * + +class Hub(Package): + """The github git wrapper""" + homepage = "https://github.com/github/hub" + url = "https://github.com/github/hub/archive/v2.2.3.tar.gz" + + version('head' , git='https://github.com/github/hub') + version('2.2.3' , '6675992ddd16d186eac7ba4484d57f5b') + version('2.2.2' , '7edc8f5b5d3c7c392ee191dd999596fc') + version('2.2.1' , '889a31ee9d10ae9cb333480d8dbe881f') + version('2.2.0' , 'eddce830a079b8480f104aa7496f46fe') + version('1.12.4', '4f2ebb14834c9981b04e40b0d1754717') + + extends("go") + + def install(self, spec, prefix): + os.environ['GOPATH'] = os.getcwd() + bash = which('bash') + bash(os.path.join('script', 'build'), '-o', os.path.join(prefix, 'bin', 'hub')) -- cgit v1.2.3-70-g09d2 From 459c647bc97617f2334334c2c59e979f5b15fbef Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 15 May 2016 18:36:45 +0200 Subject: doxygen: add graphviz variant; enable flex and bison on OSX and they build fine --- var/spack/repos/builtin/packages/doxygen/package.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index b8f15dee14..d6b72af2f9 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -22,10 +22,6 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## - -# Author: Justin Too -# Date: September 11, 2015 - from spack import * import sys @@ -43,10 +39,15 @@ class Doxygen(Package): version('1.8.11', 'f4697a444feaed739cfa2f0644abc19b') version('1.8.10', '79767ccd986f12a0f949015efb5f058f') + # graphviz appears to be a run-time optional dependency + variant('graphviz', default=True, description='Build with dot command support from Graphviz.') + depends_on("cmake@2.8.12:") - # flex does not build on OSX, but it's provided there anyway - depends_on("flex", sys.platform != 'darwin') - depends_on("bison", sys.platform != 'darwin') + depends_on("flex") + depends_on("bison") + + #optional dependencies + depends_on("graphviz", when="+graphviz") def install(self, spec, prefix): cmake('.', *std_cmake_args) -- cgit v1.2.3-70-g09d2 From 0fbf70d95de9fda8dd622a13130575914482bc86 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 15 May 2016 23:11:49 +0200 Subject: indentation fixes --- var/spack/repos/builtin/packages/doxygen/package.py | 5 ++--- var/spack/repos/builtin/packages/ghostscript/package.py | 3 ++- var/spack/repos/builtin/packages/graphviz/package.py | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index d6b72af2f9..b2e9582b5a 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import sys class Doxygen(Package): @@ -40,13 +39,13 @@ class Doxygen(Package): version('1.8.10', '79767ccd986f12a0f949015efb5f058f') # graphviz appears to be a run-time optional dependency - variant('graphviz', default=True, description='Build with dot command support from Graphviz.') + 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") - #optional dependencies + # optional dependencies depends_on("graphviz", when="+graphviz") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/ghostscript/package.py b/var/spack/repos/builtin/packages/ghostscript/package.py index 3a121111a3..707f65c902 100644 --- a/var/spack/repos/builtin/packages/ghostscript/package.py +++ b/var/spack/repos/builtin/packages/ghostscript/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Ghostscript(Package): """an interpreter for the PostScript language and for PDF. """ homepage = "http://ghostscript.com/" @@ -34,7 +35,7 @@ class Ghostscript(Package): parallel = False def install(self, spec, prefix): - configure("--prefix=%s" %prefix, "--enable-shared") + configure("--prefix=%s" % prefix, "--enable-shared") make() make("install") diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index a527d7ae50..2f99015ba2 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -25,6 +25,7 @@ from spack import * import sys + class Graphviz(Package): """Graph Visualization Software""" homepage = "http://www.graphviz.org" @@ -36,7 +37,7 @@ class Graphviz(Package): # related to missing Perl packages. If spack begins support for Perl in the # future, this package can be updated to depend_on('perl') and the # ncecessary devel packages. - variant('perl', default=False, description='Enable if you need the optional Perl language bindings.') + variant('perl', default=False, description='Enable if you need the optional Perl language bindings.') # NOQA: ignore=E501 parallel = False @@ -47,7 +48,7 @@ class Graphviz(Package): def install(self, spec, prefix): options = ['--prefix=%s' % prefix] - if not '+perl' in spec: + if '+perl' not in spec: options.append('--disable-perl') # On OSX fix the compiler error: -- cgit v1.2.3-70-g09d2 From 52c359bc77d1f790157ab9f74c31edae262d106c Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 16 May 2016 03:36:31 -0700 Subject: fix linking issue on ubuntu Evidently some readline variants are built with only a dynamic dependency on ncurses, this addresses that problem for such systems. --- var/spack/repos/builtin/packages/lua/package.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 639b4dd15a..5e9c8e36ee 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -62,9 +62,18 @@ class Lua(Package): else: target = 'linux' make('INSTALL_TOP=%s' % prefix, - 'MYLDFLAGS=-L%s -lncurses' % spec['ncurses'].prefix.lib, target) + 'MYLDFLAGS=-L%s -L%s ' % ( + spec['readline'].prefix.lib, + spec['ncurses'].prefix.lib + ), + 'MYLIBS=-lncurses', + target) make('INSTALL_TOP=%s' % prefix, - 'MYLDFLAGS=-L%s -lncurses' % spec['ncurses'].prefix.lib, + 'MYLDFLAGS=-L%s -L%s ' % ( + spec['readline'].prefix.lib, + spec['ncurses'].prefix.lib + ), + 'MYLIBS=-lncurses', 'install') with working_dir(os.path.join('luarocks', 'luarocks')): -- cgit v1.2.3-70-g09d2 From dacedfcc0ebe2bdf15cc5bb5b49d5a61d6aca354 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 16 May 2016 05:12:30 -0700 Subject: formatting to appease flake8 --- lib/spack/spack/fetch_strategy.py | 202 ++++++++++++--------- lib/spack/spack/util/executable.py | 92 +++++----- var/spack/repos/builtin/packages/hub/package.py | 16 +- .../packages/the_platinum_searcher/package.py | 3 +- 4 files changed, 178 insertions(+), 135 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 0144d26057..7c8cebe0c9 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -57,7 +57,6 @@ from spack.version import Version, ver from spack.util.compression import decompressor_for, extension import spack.util.pattern as pattern - """List of all fetch strategies, created by FetchStrategy metaclass.""" all_strategies = [] @@ -82,13 +81,16 @@ class FetchStrategy(object): class __metaclass__(type): """This metaclass registers all fetch strategies in a list.""" + def __init__(cls, name, bases, dict): type.__init__(cls, name, bases, dict) - if cls.enabled: all_strategies.append(cls) + if cls.enabled: + all_strategies.append(cls) def __init__(self): - # The stage is initialized late, so that fetch strategies can be constructed - # at package construction time. This is where things will be fetched. + # The stage is initialized late, so that fetch strategies can be + # constructed at package construction time. This is where things + # will be fetched. self.stage = None def set_stage(self, stage): @@ -97,15 +99,20 @@ class FetchStrategy(object): self.stage = stage # Subclasses need to implement these methods - def fetch(self): pass # Return True on success, False on fail. + def fetch(self): + pass # Return True on success, False on fail. - def check(self): pass # Do checksum. + def check(self): + pass # Do checksum. - def expand(self): pass # Expand archive. + def expand(self): + pass # Expand archive. - def reset(self): pass # Revert to freshly downloaded state. + def reset(self): + pass # Revert to freshly downloaded state. - def archive(self, destination): pass # Used to create tarball for mirror. + def archive(self, destination): + pass # Used to create tarball for mirror. def __str__(self): # Should be human readable URL. return "FetchStrategy.__str___" @@ -139,10 +146,12 @@ class URLFetchStrategy(FetchStrategy): # If URL or digest are provided in the kwargs, then prefer # those values. self.url = kwargs.get('url', None) - if not self.url: self.url = url + if not self.url: + self.url = url self.digest = kwargs.get('md5', None) - if not self.digest: self.digest = digest + if not self.digest: + self.digest = digest self.expand_archive = kwargs.get('expand', True) @@ -167,16 +176,20 @@ class URLFetchStrategy(FetchStrategy): tty.msg("Trying to fetch from %s" % self.url) if partial_file: - save_args = ['-C', '-', # continue partial downloads - '-o', partial_file] # use a .part file + save_args = ['-C', + '-', # continue partial downloads + '-o', + partial_file] # use a .part file else: save_args = ['-O'] curl_args = save_args + [ - '-f', # fail on >400 errors - '-D', '-', # print out HTML headers - '-L', # resolve 3xx redirects - self.url, ] + '-f', # fail on >400 errors + '-D', + '-', # print out HTML headers + '-L', # resolve 3xx redirects + self.url, + ] if sys.stdout.isatty(): curl_args.append('-#') # status bar when using a tty @@ -184,8 +197,7 @@ class URLFetchStrategy(FetchStrategy): curl_args.append('-sS') # just errors when not. # Run curl but grab the mime type from the http headers - headers = spack.curl( - *curl_args, output=str, fail_on_error=False) + headers = spack.curl(*curl_args, output=str, fail_on_error=False) if spack.curl.returncode != 0: # clean up archive on failure. @@ -198,33 +210,36 @@ class URLFetchStrategy(FetchStrategy): if spack.curl.returncode == 22: # This is a 404. Curl will print the error. raise FailedDownloadError( - self.url, "URL %s was not found!" % self.url) + self.url, "URL %s was not found!" % self.url) elif spack.curl.returncode == 60: # This is a certificate error. Suggest spack -k raise FailedDownloadError( - self.url, - "Curl was unable to fetch due to invalid certificate. " - "This is either an attack, or your cluster's SSL configuration " - "is bad. If you believe your SSL configuration is bad, you " - "can try running spack -k, which will not check SSL certificates." - "Use this at your own risk.") + self.url, + "Curl was unable to fetch due to invalid certificate. " + "This is either an attack, or your cluster's SSL " + "configuration is bad. If you believe your SSL " + "configuration is bad, you can try running spack -k, " + "which will not check SSL certificates." + "Use this at your own risk.") else: # This is some other curl error. Curl will print the # error, but print a spack message too raise FailedDownloadError( - self.url, "Curl failed with error %d" % spack.curl.returncode) + self.url, + "Curl failed with error %d" % spack.curl.returncode) # Check if we somehow got an HTML file rather than the archive we # asked for. We only look at the last content type, to handle # redirects properly. content_types = re.findall(r'Content-Type:[^\r\n]+', headers) if content_types and 'text/html' in content_types[-1]: - tty.warn("The contents of " + self.archive_file + " look like HTML.", - "The checksum will likely be bad. If it is, you can use", - "'spack clean ' to remove the bad archive, then fix", - "your internet gateway issue and install again.") + tty.warn( + "The contents of " + self.archive_file + " look like HTML.", + "The checksum will likely be bad. If it is, you can use", + "'spack clean ' to remove the bad archive, then fix", + "your internet gateway issue and install again.") if save_file: os.rename(partial_file, save_file) @@ -247,14 +262,16 @@ class URLFetchStrategy(FetchStrategy): self.stage.chdir() if not self.archive_file: - raise NoArchiveFileError("URLFetchStrategy couldn't find archive file", - "Failed on expand() for URL %s" % self.url) + raise NoArchiveFileError( + "URLFetchStrategy couldn't find archive file", + "Failed on expand() for URL %s" % self.url) decompress = decompressor_for(self.archive_file) # Expand all tarballs in their own directory to contain # exploding tarballs. - tarball_container = os.path.join(self.stage.path, "spack-expanded-archive") + tarball_container = os.path.join(self.stage.path, + "spack-expanded-archive") mkdirp(tarball_container) os.chdir(tarball_container) decompress(self.archive_file) @@ -295,20 +312,25 @@ class URLFetchStrategy(FetchStrategy): """Check the downloaded archive against a checksum digest. No-op if this stage checks code out of a repository.""" if not self.digest: - raise NoDigestError("Attempt to check URLFetchStrategy with no digest.") + raise NoDigestError( + "Attempt to check URLFetchStrategy with no digest.") checker = crypto.Checker(self.digest) if not checker.check(self.archive_file): raise ChecksumError( - "%s checksum failed for %s" % (checker.hash_name, self.archive_file), - "Expected %s but got %s" % (self.digest, checker.sum)) + "%s checksum failed for %s" % + (checker.hash_name, self.archive_file), + "Expected %s but got %s" % (self.digest, checker.sum)) @_needs_stage def reset(self): - """Removes the source path if it exists, then re-expands the archive.""" + """ + Removes the source path if it exists, then re-expands the archive. + """ if not self.archive_file: - raise NoArchiveFileError("Tried to reset URLFetchStrategy before fetching", - "Failed on reset() for URL %s" % self.url) + raise NoArchiveFileError( + "Tried to reset URLFetchStrategy before fetching", + "Failed on reset() for URL %s" % self.url) # Remove everythigng but the archive from the stage for filename in os.listdir(self.stage.path): @@ -337,14 +359,16 @@ class VCSFetchStrategy(FetchStrategy): # Set a URL based on the type of fetch strategy. self.url = kwargs.get(name, None) - if not self.url: raise ValueError( + if not self.url: + raise ValueError( "%s requires %s argument." % (self.__class__, name)) # Ensure that there's only one of the rev_types if sum(k in kwargs for k in rev_types) > 1: raise FetchStrategyError( - "Supply only one of %s to fetch with %s" % ( - comma_or(rev_types), name)) + "Supply only one of %s to fetch with %s" % ( + comma_or(rev_types), name + )) # Set attributes for each rev type. for rt in rev_types: @@ -381,19 +405,23 @@ class VCSFetchStrategy(FetchStrategy): def __repr__(self): return "%s<%s>" % (self.__class__, self.url) + class GoFetchStrategy(VCSFetchStrategy): - """Fetch strategy that employs the `go get` infrastructure - Use like this in a package: + """ + Fetch strategy that employs the `go get` infrastructure + Use like this in a package: - version('name', go='github.com/monochromegane/the_platinum_searcher/...') + version('name', + go='github.com/monochromegane/the_platinum_searcher/...') - Go get does not natively support versions, they can be faked with git + Go get does not natively support versions, they can be faked with git """ enabled = True - required_attributes = ('go',) + required_attributes = ('go', ) def __init__(self, **kwargs): - # Discards the keywords in kwargs that may conflict with the next call to __init__ + # Discards the keywords in kwargs that may conflict with the next + # call to __init__ forwarded_args = copy.copy(kwargs) forwarded_args.pop('name', None) @@ -422,8 +450,8 @@ class GoFetchStrategy(VCSFetchStrategy): except OSError: pass env = dict(os.environ) - env['GOPATH'] = os.path.join(os.getcwd(),'go') - self.go('get', '-v', '-d', self.url, env=env) + env['GOPATH'] = os.path.join(os.getcwd(), 'go') + self.go('get', '-v', '-d', self.url, env=env) def archive(self, destination): super(GoFetchStrategy, self).archive(destination, exclude='.git') @@ -436,32 +464,35 @@ class GoFetchStrategy(VCSFetchStrategy): def __str__(self): return "[go] %s" % self.url + class GitFetchStrategy(VCSFetchStrategy): - """Fetch strategy that gets source code from a git repository. - Use like this in a package: + """ + Fetch strategy that gets source code from a git repository. + Use like this in a package: - version('name', git='https://github.com/project/repo.git') + version('name', git='https://github.com/project/repo.git') - Optionally, you can provide a branch, or commit to check out, e.g.: + Optionally, you can provide a branch, or commit to check out, e.g.: - version('1.1', git='https://github.com/project/repo.git', tag='v1.1') + version('1.1', git='https://github.com/project/repo.git', tag='v1.1') - You can use these three optional attributes in addition to ``git``: + You can use these three optional attributes in addition to ``git``: - * ``branch``: Particular branch to build from (default is master) - * ``tag``: Particular tag to check out - * ``commit``: Particular commit hash in the repo + * ``branch``: Particular branch to build from (default is master) + * ``tag``: Particular tag to check out + * ``commit``: Particular commit hash in the repo """ enabled = True - required_attributes = ('git',) + required_attributes = ('git', ) def __init__(self, **kwargs): - # Discards the keywords in kwargs that may conflict with the next call to __init__ + # Discards the keywords in kwargs that may conflict with the next call + # to __init__ forwarded_args = copy.copy(kwargs) forwarded_args.pop('name', None) super(GitFetchStrategy, self).__init__( - 'git', 'tag', 'branch', 'commit', **forwarded_args) + 'git', 'tag', 'branch', 'commit', **forwarded_args) self._git = None @property @@ -569,12 +600,13 @@ class SvnFetchStrategy(VCSFetchStrategy): required_attributes = ['svn'] def __init__(self, **kwargs): - # Discards the keywords in kwargs that may conflict with the next call to __init__ + # Discards the keywords in kwargs that may conflict with the next call + # to __init__ forwarded_args = copy.copy(kwargs) forwarded_args.pop('name', None) super(SvnFetchStrategy, self).__init__( - 'svn', 'revision', **forwarded_args) + 'svn', 'revision', **forwarded_args) self._svn = None if self.revision is not None: self.revision = str(self.revision) @@ -630,32 +662,35 @@ class SvnFetchStrategy(VCSFetchStrategy): class HgFetchStrategy(VCSFetchStrategy): - """Fetch strategy that gets source code from a Mercurial repository. - Use like this in a package: + """ + Fetch strategy that gets source code from a Mercurial repository. + Use like this in a package: - version('name', hg='https://jay.grs.rwth-aachen.de/hg/lwm2') + version('name', hg='https://jay.grs.rwth-aachen.de/hg/lwm2') - Optionally, you can provide a branch, or revision to check out, e.g.: + Optionally, you can provide a branch, or revision to check out, e.g.: - version('torus', hg='https://jay.grs.rwth-aachen.de/hg/lwm2', branch='torus') + version('torus', + hg='https://jay.grs.rwth-aachen.de/hg/lwm2', branch='torus') - You can use the optional 'revision' attribute to check out a - branch, tag, or particular revision in hg. To prevent - non-reproducible builds, using a moving target like a branch is - discouraged. + You can use the optional 'revision' attribute to check out a + branch, tag, or particular revision in hg. To prevent + non-reproducible builds, using a moving target like a branch is + discouraged. - * ``revision``: Particular revision, branch, or tag. + * ``revision``: Particular revision, branch, or tag. """ enabled = True required_attributes = ['hg'] def __init__(self, **kwargs): - # Discards the keywords in kwargs that may conflict with the next call to __init__ + # Discards the keywords in kwargs that may conflict with the next call + # to __init__ forwarded_args = copy.copy(kwargs) forwarded_args.pop('name', None) super(HgFetchStrategy, self).__init__( - 'hg', 'revision', **forwarded_args) + 'hg', 'revision', **forwarded_args) self._hg = None @property @@ -729,7 +764,8 @@ def from_kwargs(**kwargs): return fetcher(**kwargs) # Raise an error in case we can't instantiate any known strategy message = "Cannot instantiate any FetchStrategy" - long_message = message + " from the given arguments : {arguments}".format(srguments=kwargs) + long_message = message + " from the given arguments : {arguments}".format( + srguments=kwargs) raise FetchError(message, long_message) @@ -741,7 +777,7 @@ def for_package_version(pkg, version): """Determine a fetch strategy based on the arguments supplied to version() in the package description.""" # If it's not a known version, extrapolate one. - if not version in pkg.versions: + if version not in pkg.versions: url = pkg.url_for_version(version) if not url: raise InvalidArgsError(pkg, version) @@ -779,7 +815,7 @@ class FailedDownloadError(FetchError): def __init__(self, url, msg=""): super(FailedDownloadError, self).__init__( - "Failed to fetch file from URL: %s" % url, msg) + "Failed to fetch file from URL: %s" % url, msg) self.url = url @@ -795,7 +831,8 @@ class NoDigestError(FetchError): class InvalidArgsError(FetchError): def __init__(self, pkg, version): - msg = "Could not construct a fetch strategy for package %s at version %s" + msg = ("Could not construct a fetch strategy for package %s at " + "version %s") msg %= (pkg.name, version) super(InvalidArgsError, self).__init__(msg) @@ -812,4 +849,5 @@ class NoStageError(FetchError): def __init__(self, method): super(NoStageError, self).__init__( - "Must call FetchStrategy.set_stage() before calling %s" % method.__name__) + "Must call FetchStrategy.set_stage() before calling %s" % + method.__name__) diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index 0b91b6c360..38b778fa00 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -22,10 +22,8 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -__all__ = ['Executable', 'which', 'ProcessError'] import os -import sys import re import subprocess import inspect @@ -34,9 +32,12 @@ import llnl.util.tty as tty import spack import spack.error +__all__ = ['Executable', 'which', 'ProcessError'] + class Executable(object): """Class representing a program that can be run on the command line.""" + def __init__(self, name): self.exe = name.split(' ') self.returncode = None @@ -44,16 +45,13 @@ class Executable(object): if not self.exe: raise ProcessError("Cannot construct executable for '%s'" % name) - def add_default_arg(self, arg): self.exe.append(arg) - @property def command(self): return ' '.join(self.exe) - def __call__(self, *args, **kwargs): """Run this executable in a subprocess. @@ -105,7 +103,7 @@ class Executable(object): fail_on_error = kwargs.pop("fail_on_error", True) ignore_errors = kwargs.pop("ignore_errors", ()) - env = kwargs.get('env', None) + env = kwargs.get('env', None) # TODO: This is deprecated. Remove in a future version. return_output = kwargs.pop("return_output", False) @@ -116,8 +114,8 @@ class Executable(object): else: output = kwargs.pop("output", None) - error = kwargs.pop("error", None) - input = kwargs.pop("input", None) + error = kwargs.pop("error", None) + input = kwargs.pop("input", None) if input is str: raise ValueError("Cannot use `str` as input stream.") @@ -128,85 +126,90 @@ class Executable(object): return subprocess.PIPE, False else: return arg, False + ostream, close_ostream = streamify(output, 'w') - estream, close_estream = streamify(error, 'w') - istream, close_istream = streamify(input, 'r') + estream, close_estream = streamify(error, 'w') + istream, close_istream = streamify(input, 'r') # if they just want to ignore one error code, make it a tuple. if isinstance(ignore_errors, int): - ignore_errors = (ignore_errors,) + ignore_errors = (ignore_errors, ) quoted_args = [arg for arg in args if re.search(r'^"|^\'|"$|\'$', arg)] if quoted_args: - tty.warn("Quotes in command arguments can confuse scripts like configure.", - "The following arguments may cause problems when executed:", - str("\n".join([" "+arg for arg in quoted_args])), - "Quotes aren't needed because spack doesn't use a shell.", - "Consider removing them") + tty.warn( + "Quotes in command arguments can confuse scripts like" + " configure.", + "The following arguments may cause problems when executed:", + str("\n".join([" " + arg for arg in quoted_args])), + "Quotes aren't needed because spack doesn't use a shell.", + "Consider removing them") cmd = self.exe + list(args) - cmd_line = "'%s'" % "' '".join(map(lambda arg: arg.replace("'", "'\"'\"'"), cmd)) + cmd_line = "'%s'" % "' '".join( + map(lambda arg: arg.replace("'", "'\"'\"'"), cmd)) tty.debug(cmd_line) try: proc = subprocess.Popen( - cmd, stdin=istream, stderr=estream, stdout=ostream, env=env) + cmd, + stdin=istream, + stderr=estream, + stdout=ostream, + env=env) out, err = proc.communicate() rc = self.returncode = proc.returncode if fail_on_error and rc != 0 and (rc not in ignore_errors): - raise ProcessError("Command exited with status %d:" - % proc.returncode, cmd_line) + raise ProcessError("Command exited with status %d:" % + proc.returncode, cmd_line) if output is str or error is str: result = '' - if output is str: result += out - if error is str: result += err + if output is str: + result += out + if error is str: + result += err return result except OSError, e: raise ProcessError( - "%s: %s" % (self.exe[0], e.strerror), - "Command: " + cmd_line) + "%s: %s" % (self.exe[0], e.strerror), "Command: " + cmd_line) except subprocess.CalledProcessError, e: if fail_on_error: raise ProcessError( - str(e), - "\nExit status %d when invoking command: %s" - % (proc.returncode, cmd_line)) + str(e), "\nExit status %d when invoking command: %s" % + (proc.returncode, cmd_line)) finally: - if close_ostream: output.close() - if close_estream: error.close() - if close_istream: input.close() - + if close_ostream: + output.close() + if close_estream: + error.close() + if close_istream: + input.close() def __eq__(self, other): return self.exe == other.exe - def __neq__(self, other): return not (self == other) - def __hash__(self): - return hash((type(self),) + tuple(self.exe)) - + return hash((type(self), ) + tuple(self.exe)) def __repr__(self): return "" % self.exe - def __str__(self): return ' '.join(self.exe) - def which(name, **kwargs): """Finds an executable in the path like command-line which.""" - path = kwargs.get('path', os.environ.get('PATH', '').split(os.pathsep)) + path = kwargs.get('path', os.environ.get('PATH', '').split(os.pathsep)) required = kwargs.get('required', False) if not path: @@ -235,14 +238,16 @@ class ProcessError(spack.error.SpackError): @property def long_message(self): msg = self._long_message - if msg: msg += "\n\n" + if msg: + msg += "\n\n" if self.build_log: msg += "See build log for details:\n" msg += " %s" % self.build_log if self.package_context: - if msg: msg += "\n\n" + if msg: + msg += "\n\n" msg += '\n'.join(self.package_context) return msg @@ -269,7 +274,7 @@ def _get_package_context(): frame = f[0] # Find a frame with 'self' in the local variables. - if not 'self' in frame.f_locals: + if 'self' not in frame.f_locals: continue # Look only at a frame in a subclass of spack.Package @@ -282,9 +287,8 @@ def _get_package_context(): # Build a message showing where in install we failed. lines.append("%s:%d, in %s:" % ( - inspect.getfile(frame.f_code), - frame.f_lineno, - frame.f_code.co_name)) + inspect.getfile(frame.f_code), frame.f_lineno, frame.f_code.co_name + )) sourcelines, start = inspect.getsourcelines(frame) for i, line in enumerate(sourcelines): diff --git a/var/spack/repos/builtin/packages/hub/package.py b/var/spack/repos/builtin/packages/hub/package.py index e82bc7a551..5f3926533a 100644 --- a/var/spack/repos/builtin/packages/hub/package.py +++ b/var/spack/repos/builtin/packages/hub/package.py @@ -1,15 +1,16 @@ from spack import * + class Hub(Package): """The github git wrapper""" homepage = "https://github.com/github/hub" - url = "https://github.com/github/hub/archive/v2.2.3.tar.gz" + url = "https://github.com/github/hub/archive/v2.2.3.tar.gz" - version('head' , git='https://github.com/github/hub') - version('2.2.3' , '6675992ddd16d186eac7ba4484d57f5b') - version('2.2.2' , '7edc8f5b5d3c7c392ee191dd999596fc') - version('2.2.1' , '889a31ee9d10ae9cb333480d8dbe881f') - version('2.2.0' , 'eddce830a079b8480f104aa7496f46fe') + version('head', git='https://github.com/github/hub') + version('2.2.3', '6675992ddd16d186eac7ba4484d57f5b') + version('2.2.2', '7edc8f5b5d3c7c392ee191dd999596fc') + version('2.2.1', '889a31ee9d10ae9cb333480d8dbe881f') + version('2.2.0', 'eddce830a079b8480f104aa7496f46fe') version('1.12.4', '4f2ebb14834c9981b04e40b0d1754717') extends("go") @@ -17,4 +18,5 @@ class Hub(Package): def install(self, spec, prefix): os.environ['GOPATH'] = os.getcwd() bash = which('bash') - bash(os.path.join('script', 'build'), '-o', os.path.join(prefix, 'bin', 'hub')) + bash(os.path.join('script', 'build'), '-o', os.path.join(prefix, 'bin', + 'hub')) 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 c040da3699..da21a0f656 100644 --- a/var/spack/repos/builtin/packages/the_platinum_searcher/package.py +++ b/var/spack/repos/builtin/packages/the_platinum_searcher/package.py @@ -5,9 +5,8 @@ import shutil class ThePlatinumSearcher(Package): """Fast parallel recursive grep alternative""" - # FIXME: add a proper url for your package's homepage here. homepage = "https://github.com/monochromegane/the_platinum_searcher" - url = "https://github.com/monochromegane/the_platinum_searcher" + url = "https://github.com/monochromegane/the_platinum_searcher" package = 'github.com/monochromegane/the_platinum_searcher/...' -- cgit v1.2.3-70-g09d2 From 97804279406376273726b231faac4c6342a172fe Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 16 May 2016 05:37:04 -0700 Subject: fixing more flake8 errors that only appear on travis... --- var/spack/repos/builtin/packages/lua/package.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 5e9c8e36ee..e621967586 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -64,15 +64,13 @@ class Lua(Package): make('INSTALL_TOP=%s' % prefix, 'MYLDFLAGS=-L%s -L%s ' % ( spec['readline'].prefix.lib, - spec['ncurses'].prefix.lib - ), + spec['ncurses'].prefix.lib), 'MYLIBS=-lncurses', target) make('INSTALL_TOP=%s' % prefix, 'MYLDFLAGS=-L%s -L%s ' % ( spec['readline'].prefix.lib, - spec['ncurses'].prefix.lib - ), + spec['ncurses'].prefix.lib), 'MYLIBS=-lncurses', 'install') -- cgit v1.2.3-70-g09d2 From 77a34ebdf94dd39be338ab85deb45e564c0a563b Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Mon, 16 May 2016 10:08:59 -0400 Subject: flake8-clean. --- lib/spack/spack/cmd/view.py | 159 +++++++++++++++++++++++--------------------- 1 file changed, 84 insertions(+), 75 deletions(-) diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index 8767459c08..4861383eaa 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -29,14 +29,17 @@ A "view" is the product of applying a function on a set of package specs. This set consists of: - specs resolved from the package names given by the user (the seeds) + - all depenencies of the seeds unless user specifies `--no-depenencies` -- less any specs with names matching the regular expressions given by `--exclude` + +- less any specs with names matching the regular expressions given by + `--exclude` The `view` command provides a number of functions (the "actions"): - symlink :: a file system view which is a directory hierarchy that is the union of the hierarchies of the installed packages in the DAG - where installed files are referenced via symlinks. + where installed files are referenced via symlinks. - hardlink :: like the symlink view but hardlinks are used. @@ -66,71 +69,70 @@ brett.viren@gmail.com ca 2016. import os import re import sys -import argparse - import spack import spack.cmd import llnl.util.tty as tty description = "Produce a single-rooted directory view of a spec." + def setup_parser(sp): setup_parser.parser = sp - sp.add_argument('-v','--verbose', action='store_true', default=False, - help="Display verbose output.") - sp.add_argument('-e','--exclude', action='append', default=[], - help="Exclude packages with names matching the given regex pattern.") - sp.add_argument('-d', '--dependencies', choices=['true','false','yes','no'], - default='true', - help="Follow dependencies.") - + sp.add_argument( + '-v', '--verbose', action='store_true', default=False, + help="Display verbose output.") + sp.add_argument( + '-e', '--exclude', action='append', default=[], + help="Exclude packages with names matching the given regex pattern.") + sp.add_argument( + '-d', '--dependencies', choices=['true', 'false', 'yes', 'no'], + default='true', + help="Follow dependencies.") ssp = sp.add_subparsers(metavar='ACTION', dest='action') - specs_opts = dict(metavar='spec', nargs='+', + specs_opts = dict(metavar='spec', nargs='+', help="Seed specs of the packages to view.") # The action parameterizes the command but in keeping with Spack # patterns we make it a subcommand. file_system_view_actions = [ - ssp.add_parser('symlink', aliases=['add','soft'], - help='Add package files to a filesystem view via symbolic links.'), - ssp.add_parser('hardlink', aliases=['hard'], - help='Add packages files to a filesystem via via hard links.'), - ssp.add_parser('remove', aliases=['rm'], - help='Remove packages from a filesystem view.'), - ssp.add_parser('statlink', aliases=['status','check'], - help='Check status of packages in a filesystem view.') + ssp.add_parser( + 'symlink', aliases=['add', 'soft'], + help='Add package files to a filesystem view via symbolic links.'), + ssp.add_parser( + 'hardlink', aliases=['hard'], + help='Add packages files to a filesystem via via hard links.'), + ssp.add_parser( + 'remove', aliases=['rm'], + help='Remove packages from a filesystem view.'), + ssp.add_parser( + 'statlink', aliases=['status', 'check'], + help='Check status of packages in a filesystem view.') ] # All these options and arguments are common to every action. for act in file_system_view_actions: act.add_argument('path', nargs=1, help="Path to file system view directory.") act.add_argument('specs', **specs_opts) - + # The formatted print action. act = ssp.add_parser('print', help="Print a string to stdout based on given format") - act.add_argument('format', nargs=1, + act.add_argument('format', nargs=1, help="Format describing per-package printout.") act.add_argument('specs', **specs_opts) - ## Other VIEW ACTIONS might be added here. - ## Some ideas are the following (and some are redundant with existing cmds) - ## A JSON view that dumps a DAG to a JSON file - ## A DOT view that dumps to a GraphViz file - ## A SHELL INIT view that dumps bash/csh script setting up to use packages in the view return -### Util functions - def assuredir(path): 'Assure path exists as a directory' if not os.path.exists(path): os.makedirs(path) - + + def relative_to(prefix, path): 'Return end of `path` relative to `prefix`' assert 0 == path.find(prefix) @@ -139,31 +141,36 @@ def relative_to(prefix, path): reldir = reldir[1:] return reldir + def transform_path(spec, path, prefix=None): 'Return the a relative path corresponding to given path spec.prefix' if os.path.isabs(path): path = relative_to(spec.prefix, path) subdirs = path.split(os.path.sep) if subdirs[0] == '.spack': - lst = ['.spack',spec.name]+subdirs[1:] + lst = ['.spack', spec.name] + subdirs[1:] path = os.path.join(*lst) if prefix: path = os.path.join(prefix, path) return path + def purge_empty_directories(path): - 'Ascend up from the leaves accessible from `path` and remove empty directories.' + '''Ascend up from the leaves accessible from `path` + and remove empty directories.''' for dirpath, subdirs, files in os.walk(path, topdown=False): for sd in subdirs: - sdp = os.path.join(dirpath,sd) + sdp = os.path.join(dirpath, sd) try: os.rmdir(sdp) except OSError: pass + def filter_exclude(specs, exclude): 'Filter specs given sequence of exclude regex' to_exclude = [re.compile(e) for e in exclude] + def exclude(spec): for e in to_exclude: if e.match(spec.name): @@ -171,6 +178,7 @@ def filter_exclude(specs, exclude): return False return [s for s in specs if not exclude(s)] + def flatten(seeds, descend=True): 'Normalize and flattend seed specs and descend hiearchy' flat = set() @@ -181,6 +189,7 @@ def flatten(seeds, descend=True): flat.update(spec.normalized().traverse()) return flat + def spec2dict(spec): 'Convert info in a spec into a simple dictionary.' @@ -188,44 +197,45 @@ def spec2dict(spec): # some things need processing or are properties. # pkg = spec.package - ret = dict(name = spec.name, - spec = spec.short_spec, - colorspec = spec.cshort_spec, # color - root = spec.root, - prefix = spec.prefix, - version = spec.version, - variants = spec.variants, - namespace = spec.namespace, - compiler = spec.compiler, - architecture = spec.architecture, - dependencies = ','.join(spec.dependencies.keys()), - dependents = ','.join(spec.dependents.keys()), - external = spec.external or "False", - hash = spec.dag_hash(), + inst_deps = ','.join([s.name for s in pkg.installed_dependents]), + ret = dict(name=spec.name, + spec=spec.short_spec, + colorspec=spec.cshort_spec, # color + root=spec.root, + prefix=spec.prefix, + version=spec.version, + variants=spec.variants, + namespace=spec.namespace, + compiler=spec.compiler, + architecture=spec.architecture, + dependencies=','.join(spec.dependencies.keys()), + dependents=','.join(spec.dependents.keys()), + external=spec.external or "False", + hash=spec.dag_hash(), # package related: - url = pkg.url, - stage = pkg.stage.path, - installed = pkg.installed, - installed_dependents = ','.join([s.name for s in pkg.installed_dependents]), - build_log = pkg.build_log_path, - rpath = ':'.join(pkg.rpath), + url=pkg.url, + stage=pkg.stage.path, + installed=pkg.installed, + installed_dependents=inst_deps, + build_log=pkg.build_log_path, + rpath=':'.join(pkg.rpath), # ... ) return ret -### Action-specific helpers def check_one(spec, path, verbose=False): 'Check status of view in path against spec' dotspack = os.path.join(path, '.spack', spec.name) if os.path.exists(os.path.join(dotspack)): - tty.info('Package in view: "%s"'%spec.name) + tty.info('Package in view: "%s"' % spec.name) return - tty.info('Package not in view: "%s"'%spec.name) + tty.info('Package not in view: "%s"' % spec.name) return + def remove_one(spec, path, verbose=False): 'Remove any files found in `spec` from `path` and purge empty directories.' @@ -235,12 +245,12 @@ def remove_one(spec, path, verbose=False): dotspack = transform_path(spec, '.spack', path) if not os.path.exists(dotspack): if verbose: - tty.info('Skipping nonexistent package: "%s"'%spec.name) + tty.info('Skipping nonexistent package: "%s"' % spec.name) return if verbose: - tty.info('Removing package: "%s"'%spec.name) - for dirpath,dirnames,filenames in os.walk(spec.prefix): + tty.info('Removing package: "%s"' % spec.name) + for dirpath, dirnames, filenames in os.walk(spec.prefix): if not filenames: continue targdir = transform_path(spec, dirpath, path) @@ -250,17 +260,18 @@ def remove_one(spec, path, verbose=False): continue os.unlink(dst) -def link_one(spec, path, link = os.symlink, verbose=False): + +def link_one(spec, path, link=os.symlink, verbose=False): 'Link all files in `spec` into directory `path`.' dotspack = transform_path(spec, '.spack', path) if os.path.exists(dotspack): - tty.warn('Skipping existing package: "%s"'%spec.name) + tty.warn('Skipping existing package: "%s"' % spec.name) return if verbose: tty.info('Linking package: "%s"' % spec.name) - for dirpath,dirnames,filenames in os.walk(spec.prefix): + for dirpath, dirnames, filenames in os.walk(spec.prefix): if not filenames: continue # avoid explicitly making empty dirs @@ -275,11 +286,8 @@ def link_one(spec, path, link = os.symlink, verbose=False): continue # silence these tty.warn("Skipping existing file: %s" % dst) continue - link(src,dst) - + link(src, dst) -### The canonically named visitor_* functions and their alias maps. -### One for each action. def visitor_symlink(specs, args): 'Symlink all files found in specs' @@ -290,6 +298,7 @@ def visitor_symlink(specs, args): visitor_add = visitor_symlink visitor_soft = visitor_symlink + def visitor_hardlink(specs, args): 'Hardlink all files found in specs' path = args.path[0] @@ -298,6 +307,7 @@ def visitor_hardlink(specs, args): link_one(spec, path, os.link, verbose=args.verbose) visitor_hard = visitor_hardlink + def visitor_remove(specs, args): 'Remove all files and directories found in specs from args.path' path = args.path[0] @@ -306,6 +316,7 @@ def visitor_remove(specs, args): purge_empty_directories(path) visitor_rm = visitor_remove + def visitor_statlink(specs, args): 'Give status of view in args.path relative to specs' path = args.path[0] @@ -314,6 +325,7 @@ def visitor_statlink(specs, args): visitor_status = visitor_statlink visitor_check = visitor_statlink + def visitor_print(specs, args): 'Print a string for each spec using args.format.' fmt = args.format[0] @@ -325,25 +337,22 @@ def visitor_print(specs, args): try: text = t.substitute(kwds) except KeyError: - tty.error("Format error, use keywords: %s" % (', '.join(kwds.keys()), )) + tty.error("Format error, use keywords: %s" % + (', '.join(kwds.keys()), )) raise # argparser escapes these text = text.replace(r'\n', '\n').replace(r'\t', '\t') sys.stdout.write(text) -# Finally, the actual "view" command. There should be no need to -# modify anything below when new actions are added. - - def view(parser, args): 'Produce a view of a set of packages.' - # Process common args + # Process common args seeds = [spack.cmd.disambiguate_spec(s) for s in args.specs] - specs = flatten(seeds, args.dependencies.lower() in ['yes','true']) + specs = flatten(seeds, args.dependencies.lower() in ['yes', 'true']) specs = filter_exclude(specs, args.exclude) - + # Execute the visitation. try: visitor = globals()['visitor_' + args.action] -- cgit v1.2.3-70-g09d2 From 4acdfeae61d278ecf682adee1b9842d58ce3035a Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Fri, 29 Apr 2016 10:21:55 -0700 Subject: track whether a package was installed "explicitly" Adds a new attribute in the database to track whether a package was installed explicitly or not, where explicitly is the user running `spack install ` and implicitly is it being installed as a dependency. It also adds arguments to `spack find` to find these packages such that it should be possible to query the packages that were installed implicitly and are not currently depended upon any longer. --- lib/spack/spack/cmd/find.py | 15 ++++++++++++++- lib/spack/spack/cmd/install.py | 3 ++- lib/spack/spack/database.py | 20 ++++++++++++-------- lib/spack/spack/package.py | 5 +++-- 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index a99012a275..6896e92ef5 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -57,6 +57,12 @@ def setup_parser(subparser): '-L', '--very-long', action='store_true', help='Show dependency hashes as well as versions.') + subparser.add_argument( + '-e', '--explicit', action='store_true', + help='Show only specs that were installed explicitly') + subparser.add_argument( + '-E', '--implicit', action='store_true', + help='Show only specs that were installed as dependencies') subparser.add_argument( '-u', '--unknown', action='store_true', help='Show only specs Spack does not have a package for.') @@ -163,7 +169,14 @@ def find(parser, args): installed = any if args.unknown: known = False - q_args = { 'installed' : installed, 'known' : known } + + explicit = None + if args.explicit: + explicit = False + if args.implicit: + explicit = True + + q_args = { 'installed' : installed, 'known' : known, "explicit" : explicit } # Get all the specs the user asked for if not query_specs: diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py index fef21f15ba..9d3175786b 100644 --- a/lib/spack/spack/cmd/install.py +++ b/lib/spack/spack/cmd/install.py @@ -78,4 +78,5 @@ def install(parser, args): ignore_deps=args.ignore_deps, make_jobs=args.jobs, verbose=args.verbose, - fake=args.fake) + fake=args.fake, + explicit=True) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index ee4473e079..73bc8143c8 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -92,22 +92,24 @@ class InstallRecord(object): dependents left. """ - def __init__(self, spec, path, installed, ref_count=0): + def __init__(self, spec, path, installed, ref_count=0, explicit=False): self.spec = spec self.path = str(path) self.installed = bool(installed) self.ref_count = ref_count + self.explicit = explicit def to_dict(self): return { 'spec' : self.spec.to_node_dict(), 'path' : self.path, 'installed' : self.installed, - 'ref_count' : self.ref_count } + 'ref_count' : self.ref_count, + 'explicit' : self.explicit } @classmethod def from_dict(cls, spec, dictionary): d = dictionary - return InstallRecord(spec, d['path'], d['installed'], d['ref_count']) + return InstallRecord(spec, d['path'], d['installed'], d['ref_count'], d.get('explicit', False)) class Database(object): @@ -370,7 +372,7 @@ class Database(object): self.reindex(spack.install_layout) - def _add(self, spec, path, directory_layout=None): + def _add(self, spec, path, directory_layout=None, explicit=False): """Add an install record for spec at path to the database. This assumes that the spec is not already installed. It @@ -392,7 +394,7 @@ class Database(object): rec.path = path else: - self._data[key] = InstallRecord(spec, path, True) + self._data[key] = InstallRecord(spec, path, True, explicit=explicit) for dep in spec.dependencies.values(): self._increment_ref_count(dep, directory_layout) @@ -415,7 +417,7 @@ class Database(object): self._data[key].ref_count += 1 @_autospec - def add(self, spec, path): + def add(self, spec, path, explicit=False): """Add spec at path to database, locking and reading DB to sync. ``add()`` will lock and read from the DB on disk. @@ -424,7 +426,7 @@ class Database(object): # TODO: ensure that spec is concrete? # Entire add is transactional. with self.write_transaction(): - self._add(spec, path) + self._add(spec, path, explicit=explicit) def _get_matching_spec_key(self, spec, **kwargs): @@ -513,7 +515,7 @@ class Database(object): # TODO: conditional way to do this instead of catching exceptions - def query(self, query_spec=any, known=any, installed=True): + def query(self, query_spec=any, known=any, installed=True, explicit=any): """Run a query on the database. ``query_spec`` @@ -553,6 +555,8 @@ class Database(object): for key, rec in self._data.items(): if installed is not any and rec.installed != installed: continue + if explicit is not any and rec.explicit != explicit: + continue if known is not any and spack.repo.exists(rec.spec.name) != known: continue if query_spec is any or rec.spec.satisfies(query_spec): diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 8167341127..d1c36d0670 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -857,7 +857,8 @@ class Package(object): skip_patch=False, verbose=False, make_jobs=None, - fake=False): + fake=False, + explicit=False): """Called by commands to install a package and its dependencies. Package implementations should override install() to describe @@ -995,7 +996,7 @@ class Package(object): # note: PARENT of the build process adds the new package to # the database, so that we don't need to re-read from file. - spack.installed_db.add(self.spec, self.prefix) + spack.installed_db.add(self.spec, self.prefix, explicit=explicit) def sanity_check_prefix(self): """This function checks whether install succeeded.""" -- cgit v1.2.3-70-g09d2 From 8859a09cd267f626dfe79da01ac88c245261ccbb Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 16 May 2016 07:58:34 -0700 Subject: handle explicit when requesting to install already installed packages --- lib/spack/spack/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index d1c36d0670..2e7d8a7709 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -888,6 +888,11 @@ class Package(object): # Ensure package is not already installed if spack.install_layout.check_installed(self.spec): tty.msg("%s is already installed in %s" % (self.name, self.prefix)) + rec = spack.installed_db.get_record(self.spec) + if (not rec.explicit) and explicit: + with spack.installed_db.write_transaction(): + rec = spack.installed_db.get_record(self.spec) + rec.explicit = True return tty.msg("Installing %s" % self.name) -- cgit v1.2.3-70-g09d2 From 62dd040a8fd7f6f8993640156049eeb061efe955 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 16 May 2016 09:30:37 -0700 Subject: add GOPATH support Also fixes flex to depend on bison for its yacc implementation. --- var/spack/repos/builtin/packages/flex/package.py | 5 ++++- var/spack/repos/builtin/packages/go/package.py | 12 +++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index 926651010f..b778538606 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -24,15 +24,18 @@ ############################################################################## from spack import * + class Flex(Package): """Flex is a tool for generating scanners.""" homepage = "http://flex.sourceforge.net/" - url = "http://download.sourceforge.net/flex/flex-2.5.39.tar.gz" + url = "http://download.sourceforge.net/flex/flex-2.5.39.tar.gz" version('2.6.0', '5724bcffed4ebe39e9b55a9be80859ec') version('2.5.39', 'e133e9ead8ec0a58d81166b461244fde') + depends_on("bison") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 90f34dcfc6..f1057e6bed 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -67,4 +67,14 @@ class Go(Package): if os.environ.get('GOROOT', False): tty.warn('GOROOT is set, this is not recommended') - spack_env.set('GOPATH', ext_spec.package.stage.source_path) + + # Set GOPATH to include paths of dependencies + for d in extension_spec.traverse(): + if d.package.extends(self.spec): + spack_env.prepend_path('GOPATH', d.prefix) + + # This *MUST* be first, this is where new code is installed + spack_env.prepend_path('GOPATH', ext_spec.package.stage.source_path) + + # Allow packages to find this when using module or dotkit + run_env.prepend_path('GOPATH', ext_spec.prefix) -- cgit v1.2.3-70-g09d2 From 7705603f7302f7e7c1076d3aff53cb1829fb8e74 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Mon, 16 May 2016 09:43:46 -0700 Subject: Added more compilers to mock packages tests --- lib/spack/spack/test/mock_packages_test.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 612008ac58..81b56daacd 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -47,6 +47,17 @@ compilers: f77: None fc: None modules: 'None' + clang3.3SUSE: + spec: clang@3.3 + operating_system: + name: SuSE + version: '11' + paths: + cc: /path/to/clang + cxx: /path/to/clang++ + f77: None + fc: None + modules: 'None' clang3.3RHL: spec: clang@3.3 operating_system: @@ -69,6 +80,17 @@ compilers: version: '10' spec: gcc@4.5.0 modules: 'None' + gcc4.5.0SUSE: + paths: + cc: /path/to/gcc + cxx: /path/to/g++ + f77: /path/to/gfortran + fc: /path/to/gfortran + operating_system: + name: SuSE + version: '11' + spec: gcc@4.5.0 + modules: 'None' gcc4.5.0RHL: paths: cc: /path/to/gcc -- cgit v1.2.3-70-g09d2 From 65ff89a0b0f49bfc0bfa0370460c86d8b12f8db7 Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Mon, 16 May 2016 12:53:24 -0400 Subject: Placate flake8 demands. --- var/spack/repos/builtin/packages/netcdf-cxx4/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py index d705a8cd87..f8af76429b 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class NetcdfCxx4(Package): """C++ interface for NetCDF4""" homepage = "http://www.unidata.ucar.edu/software/netcdf" @@ -36,7 +37,8 @@ class NetcdfCxx4(Package): depends_on("autoconf") def install(self, spec, prefix): - which('autoreconf')('-ivf') # Rebuild to prevent problems of inconsistency in git repo + # Rebuild to prevent problems of inconsistency in git repo + which('autoreconf')('-ivf') configure('--prefix=%s' % prefix) make() make("install") -- cgit v1.2.3-70-g09d2 From 0fd9cdb861b9b794cc6aa20cd5ecca1989a43820 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Mon, 16 May 2016 09:56:07 -0700 Subject: Fixed config tests for new compiler config format --- lib/spack/spack/test/config.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index 2a8d642584..daa4c572bd 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -138,11 +138,17 @@ class ConfigTest(MockPackagesTest): """Check that named compilers in comps match Spack's config.""" config = spack.config.get_config('compilers') compiler_list = ['cc', 'cxx', 'f77', 'fc'] - for key in compiler_names: - for c in compiler_list: - expected = comps['all'][key][c] - actual = config['all'][key][c] - self.assertEqual(expected, actual) + param_list = ['modules', 'paths', 'spec', 'operating_system'] + for alias, compiler in config.items(): + if compiler['spec'] in compiler_names: + for p in param_list: + expected = comps[alias][p] + actual = config[alias][p] + self.assertEqual(expected, actual) + for c in compiler_list: + expected = comps[alias]['paths'][c] + actual = config[alias]['paths'][c] + self.assertEqual(expected, actual) def test_write_key_in_memory(self): # Write b_comps "on top of" a_comps. -- cgit v1.2.3-70-g09d2 From 52c8bedb9ce59998708b7562d9c784b44b466c1d Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Mon, 16 May 2016 11:09:44 -0700 Subject: Updated style checking to ignore refinition errors for '@when' fxns. Updated the Scotch package to conform to PEP8 standards and to test style checking improvements. --- share/spack/qa/run-flake8 | 5 +- var/spack/repos/builtin/packages/scotch/package.py | 70 ++++++++++++---------- 2 files changed, 44 insertions(+), 31 deletions(-) diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8 index 722c7fcba6..42da56222c 100755 --- a/share/spack/qa/run-flake8 +++ b/share/spack/qa/run-flake8 @@ -21,9 +21,12 @@ fi changed=$(git diff --name-only develop... | grep '.py$') # Exempt url lines in changed packages from overlong line errors. +# Exempt functions defined with '@when' decorator from redefinition errors. for file in $changed; do if [[ $file = *package.py ]]; then - perl -i~ -pe 's/^(\s*url\s*=.*)$/\1 # NOQA: ignore=E501/' $file; + cp "$file" "$file~" + perl -i -pe 's/^(\s*url\s*=.*)$/\1 # NOQA: ignore=E501/' $file + perl -i -pe 's/^(\s*\@when\(.*\).*)$/\1 # NOQA: ignore=F811/' $file fi done diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index e82c3acd42..931e5c993a 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -22,8 +22,10 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## +import os +import re from spack import * -import os, re + class Scotch(Package): """Scotch is a software package for graph and mesh/hypergraph @@ -38,10 +40,14 @@ class Scotch(Package): version('6.0.0', 'c50d6187462ba801f9a82133ee666e8e') version('5.1.10b', 'f587201d6cf5cf63527182fbfba70753') - variant('mpi', default=False, description='Activate the compilation of PT-Scotch') - variant('compression', default=True, description='Activate the posibility to use compressed files') - variant('esmumps', default=False, description='Activate the compilation of the lib esmumps needed by mumps') - variant('shared', default=True, description='Build shared libraries') + variant('mpi', default=False, + description='Activate the compilation of parallel libraries') + variant('compression', default=True, + description='Activate the posibility to use compressed files') + variant('esmumps', default=False, + description='Activate the compilation of esmumps needed by mumps') + variant('shared', default=True, + description='Build a shared version of the library') depends_on('flex') depends_on('bison') @@ -51,7 +57,7 @@ class Scotch(Package): # NOTE: Versions of Scotch up to version 6.0.0 don't include support for # building with 'esmumps' in their default packages. In order to enable # support for this feature, we must grab the 'esmumps' enabled archives - # from the Scotch hosting site. These alternative archives include a strict + # from the Scotch hosting site. These alternative archives include a # superset of the behavior in their default counterparts, so we choose to # always grab these versions for older Scotch versions for simplicity. @when('@:6.0.0') @@ -62,32 +68,34 @@ class Scotch(Package): def url_for_version(self, version): return super(Scotch, self).url_for_version(version) - # NOTE: Several of the 'esmumps' enabled Scotch releases up to version 6.0.0 - # have broken build scripts that don't properly build 'esmumps' as a separate - # target, so we need a patch procedure to remove 'esmumps' from existing targets - # and to add it as a standalone target. + # NOTE: Several of the 'esmumps' enabled Scotch releases up to version + # 6.0.0 have broken build scripts that don't properly build 'esmumps' as a + # separate target, so we need a patch procedure to remove 'esmumps' from + # existing targets and to add it as a standalone target. @when('@:6.0.0') def patch(self): makefile_path = os.path.join('src', 'Makefile') with open(makefile_path, 'r') as makefile: - esmumps_enabled = any(re.search(r'^esmumps(\s*):(.*)$', line) for line in makefile.readlines()) + esmumps_enabled = any(re.search(r'^esmumps(\s*):(.*)$', line) + for line in makefile.readlines()) if not esmumps_enabled: mff = FileFilter(makefile_path) mff.filter(r'^.*((esmumps)|(ptesmumps)).*(install).*$', '') - makefile_esmumps_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Makefile.esmumps') + mfesmumps_dir = os.path.dirname(os.path.realpath(__file__)) + mfesmumps_path = os.path.join(mfesmumps_dir, 'Makefile.esmumps') with open(makefile_path, 'a') as makefile: - makefile.write('\ninclude %s\n' % makefile_esmumps_path) + makefile.write('\ninclude %s\n' % mfesmumps_path) @when('@6.0.1:') def patch(self): pass - # NOTE: Configuration of Scotch is achieved by writing a 'Makefile.inc' file - # that contains all of the configuration variables and their desired values - # for the installation. This function writes this file based on the given - # installation variants. + # NOTE: Configuration of Scotch is achieved by writing a 'Makefile.inc' + # file that contains all of the configuration variables and their desired + # values for the installation. This function writes this file based on + # the given installation variants. def configure(self): makefile_inc = [] cflags = [ @@ -96,9 +104,9 @@ class Scotch(Package): '-DSCOTCH_DETERMINISTIC', '-DSCOTCH_RENAME', '-DIDXSIZE64' - ] + ] - ## Library Build Type ## + # Library Build Type # if '+shared' in self.spec: makefile_inc.extend([ @@ -107,7 +115,7 @@ class Scotch(Package): 'RANLIB = echo', 'AR = $(CC)', 'ARFLAGS = -shared $(LDFLAGS) -o' - ]) + ]) cflags.append('-fPIC') else: makefile_inc.extend([ @@ -116,21 +124,21 @@ class Scotch(Package): 'RANLIB = ranlib', 'AR = ar', 'ARFLAGS = -ruv ' - ]) + ]) - ## Compiler-Specific Options ## + # Compiler-Specific Options # if self.compiler.name == 'gcc': cflags.append('-Drestrict=__restrict') elif self.compiler.name == 'intel': cflags.append('-restrict') + mpicc_path = self.spec['mpi'].mpicc if '+mpi' in self.spec else 'mpicc' makefile_inc.append('CCS = $(CC)') - makefile_inc.append('CCP = %s' % - (self.spec['mpi'].mpicc if '+mpi' in self.spec else 'mpicc')) + makefile_inc.append('CCP = %s' % mpicc_path) makefile_inc.append('CCD = $(CCS)') - ## Extra Features ## + # Extra Features # ldflags = [] @@ -143,8 +151,10 @@ class Scotch(Package): makefile_inc.append('LDFLAGS = %s' % ' '.join(ldflags)) - ## General Features ## + # General Features # + flex_path = os.path.join(self.spec['flex'].prefix.bin, 'flex') + bison_path = os.path.join(self.spec['bison'].prefix.bin, 'bison') makefile_inc.extend([ 'EXE =', 'OBJ = .o', @@ -155,10 +165,10 @@ class Scotch(Package): 'MV = mv', 'CP = cp', 'CFLAGS = %s' % ' '.join(cflags), - 'LEX = %s -Pscotchyy -olex.yy.c' % os.path.join(self.spec['flex'].prefix.bin , 'flex'), - 'YACC = %s -pscotchyy -y -b y' % os.path.join(self.spec['bison'].prefix.bin, 'bison'), + 'LEX = %s -Pscotchyy -olex.yy.c' % flex_path, + 'YACC = %s -pscotchyy -y -b y' % bison_path, 'prefix = %s' % self.prefix - ]) + ]) with working_dir('src'): with open('Makefile.inc', 'w') as fh: @@ -178,7 +188,7 @@ class Scotch(Package): with working_dir('src'): for target in targets: - make(target, parallel=(target!='ptesmumps')) + make(target, parallel=(target != 'ptesmumps')) install_tree('bin', prefix.bin) install_tree('lib', prefix.lib) -- cgit v1.2.3-70-g09d2 From 761c5c845072f2079acaab886aac197798d9fd25 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Mon, 16 May 2016 12:14:57 -0700 Subject: Added line limit exemptions for 'variant' and 'version' directives. Updated the 'scotch' package to use oneline 'variant' directives. --- share/spack/qa/run-flake8 | 9 +++++++-- var/spack/repos/builtin/packages/scotch/package.py | 12 ++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8 index 42da56222c..44eb0167fb 100755 --- a/share/spack/qa/run-flake8 +++ b/share/spack/qa/run-flake8 @@ -20,12 +20,17 @@ fi # Check if changed files are flake8 conformant [framework] changed=$(git diff --name-only develop... | grep '.py$') -# Exempt url lines in changed packages from overlong line errors. -# Exempt functions defined with '@when' decorator from redefinition errors. +# Add approved style exemptions to the changed packages. for file in $changed; do if [[ $file = *package.py ]]; then cp "$file" "$file~" + + # Exempt lines with urls and descriptions from overlong line errors. 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 + + # Exempt '@when' decorated functions from redefinition errors. perl -i -pe 's/^(\s*\@when\(.*\).*)$/\1 # NOQA: ignore=F811/' $file fi done diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 931e5c993a..3abbf3c665 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -40,14 +40,10 @@ class Scotch(Package): version('6.0.0', 'c50d6187462ba801f9a82133ee666e8e') version('5.1.10b', 'f587201d6cf5cf63527182fbfba70753') - variant('mpi', default=False, - description='Activate the compilation of parallel libraries') - variant('compression', default=True, - description='Activate the posibility to use compressed files') - variant('esmumps', default=False, - description='Activate the compilation of esmumps needed by mumps') - variant('shared', default=True, - description='Build a shared version of the library') + variant('mpi', default=False, description='Activate the compilation of parallel libraries') + variant('compression', default=True, description='Activate the posibility to use compressed files') + variant('esmumps', default=False, description='Activate the compilation of esmumps needed by mumps') + variant('shared', default=True, description='Build a shared version of the library') depends_on('flex') depends_on('bison') -- cgit v1.2.3-70-g09d2 From af4af94203d0dc7cebd110c2bd43707e527c63cb Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Tue, 17 May 2016 05:21:11 -0700 Subject: rework for gopath and bootstrapping --- .../repos/builtin/packages/go-bootstrap/package.py | 51 ++++++++++++++++++++++ var/spack/repos/builtin/packages/go/package.py | 36 +++++++-------- var/spack/repos/builtin/packages/hub/package.py | 4 +- .../packages/the_platinum_searcher/package.py | 4 +- 4 files changed, 76 insertions(+), 19 deletions(-) create mode 100644 var/spack/repos/builtin/packages/go-bootstrap/package.py diff --git a/var/spack/repos/builtin/packages/go-bootstrap/package.py b/var/spack/repos/builtin/packages/go-bootstrap/package.py new file mode 100644 index 0000000000..fd0b5bc5d1 --- /dev/null +++ b/var/spack/repos/builtin/packages/go-bootstrap/package.py @@ -0,0 +1,51 @@ +import os +import shutil +import glob +from spack import * + +# THIS PACKAGE SHOULD NOT EXIST +# it exists to make up for the inability to: +# * use an external go compiler +# * have go depend on itself +# * have a sensible way to find gccgo without a dep on gcc + +class GoBootstrap(Package): + """Old C-bootstrapped go to bootstrap real go""" + homepage = "https://golang.org" + url = "https://go.googlesource.com/go" + + extendable = True + + # temporary fix until tags are pulled correctly + version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2') + + variant('test', + default=True, + description="Run tests as part of build, a good idea but quite" + " time consuming") + + provides('golang@:1.4.2') + + depends_on('git') + + def install(self, spec, prefix): + bash = which('bash') + with working_dir('src'): + if '+test' in spec: + bash('all.bash') + else: + bash('make.bash') + + try: + os.makedirs(prefix) + except OSError: + pass + for f in glob.glob('*'): + if os.path.isdir(f): + shutil.copytree(f, os.path.join(prefix, f)) + else: + shutil.copy2(f, os.path.join(prefix, f)) + + def setup_environment(self, spack_env, run_env): + spack_env.set('GOROOT_FINAL', self.spec.prefix) + diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index f1057e6bed..28e0d1ba7f 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -1,6 +1,7 @@ import os import shutil import glob +import llnl.util.tty as tty from spack import * @@ -11,8 +12,6 @@ class Go(Package): extendable = True - # temporary fix until tags are pulled correctly - version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2') version('1.5.4', git='https://go.googlesource.com/go', tag='go1.5.4') version('1.6.2', git='https://go.googlesource.com/go', tag='go1.6.2') @@ -24,8 +23,8 @@ class Go(Package): provides('golang') # to-do, make non-c self-hosting compilers feasible without backflips - # should be go_compiler, but that creates an infinite loop - depends_on('gcc@5:', when='@1.5:') + # should be a dep on external go compiler + depends_on('go-bootstrap') depends_on('git') def install(self, spec, prefix): @@ -47,34 +46,37 @@ class Go(Package): shutil.copy2(f, os.path.join(prefix, f)) def setup_environment(self, spack_env, run_env): - # spack_env.set("GOROOT", self.spec.prefix) - # run_env.set("GOROOT", self.spec.prefix) spack_env.set('GOROOT_FINAL', self.spec.prefix) - spack_env.set('GOROOT_BOOTSTRAP', self.spec['gcc'].prefix) + spack_env.set('GOROOT_BOOTSTRAP', self.spec['go-bootstrap'].prefix) def setup_dependent_package(self, module, ext_spec): - # Add a go command/compiler for extensions - module.go = Executable(join_path(self.spec.prefix.bin, 'go')) - - def setup_dependent_environment(self, spack_env, run_env, ext_spec): """Called before go modules' install() methods. - In most cases, extensions will only need to have two lines:: + In most cases, extensions will only need to set GOPATH and use go:: - go('get', '') + env = os.environ + env['GOPATH'] = self.source_path + ':' + env['GOPATH'] + go('get', '', env=env) shutil.copytree('bin', os.path.join(prefix, '/bin')) """ + # Add a go command/compiler for extensions + module.go = Executable(join_path(self.spec.prefix.bin, 'go')) + def setup_dependent_environment(self, spack_env, run_env, ext_spec): if os.environ.get('GOROOT', False): tty.warn('GOROOT is set, this is not recommended') + path_components = [] # Set GOPATH to include paths of dependencies - for d in extension_spec.traverse(): + for d in ext_spec.traverse(): if d.package.extends(self.spec): - spack_env.prepend_path('GOPATH', d.prefix) + path_components.append(d.prefix) # This *MUST* be first, this is where new code is installed - spack_env.prepend_path('GOPATH', ext_spec.package.stage.source_path) + spack_env.set('GOPATH', ':'.join(path_components)) # Allow packages to find this when using module or dotkit - run_env.prepend_path('GOPATH', ext_spec.prefix) + run_env.prepend_path('GOPATH', ':'.join( + [ext_spec.prefix] + path_components)) + + diff --git a/var/spack/repos/builtin/packages/hub/package.py b/var/spack/repos/builtin/packages/hub/package.py index 5f3926533a..ed8b742e42 100644 --- a/var/spack/repos/builtin/packages/hub/package.py +++ b/var/spack/repos/builtin/packages/hub/package.py @@ -1,4 +1,5 @@ from spack import * +import os class Hub(Package): @@ -16,7 +17,8 @@ class Hub(Package): extends("go") def install(self, spec, prefix): - os.environ['GOPATH'] = os.getcwd() + env = os.environ + env['GOPATH'] = self.stage.source_path + ':' + env['GOPATH'] bash = which('bash') bash(os.path.join('script', 'build'), '-o', os.path.join(prefix, 'bin', 'hub')) 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 da21a0f656..9c9a66cdef 100644 --- a/var/spack/repos/builtin/packages/the_platinum_searcher/package.py +++ b/var/spack/repos/builtin/packages/the_platinum_searcher/package.py @@ -15,5 +15,7 @@ class ThePlatinumSearcher(Package): extends("go") def install(self, spec, prefix): - go('install', self.package) + env = os.environ + env['GOPATH'] = self.stage.source_path + ':' + env['GOPATH'] + go('install', self.package, env=env) shutil.copytree('bin', os.path.join(prefix, 'bin')) -- cgit v1.2.3-70-g09d2 From 80c02ad36af00b31f9b4ed4f3d1de72ae963ed98 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Tue, 17 May 2016 05:30:35 -0700 Subject: flake8-related cleanup --- var/spack/repos/builtin/packages/go-bootstrap/package.py | 2 +- var/spack/repos/builtin/packages/go/package.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/go-bootstrap/package.py b/var/spack/repos/builtin/packages/go-bootstrap/package.py index fd0b5bc5d1..b0e2109fd3 100644 --- a/var/spack/repos/builtin/packages/go-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/go-bootstrap/package.py @@ -9,6 +9,7 @@ from spack import * # * have go depend on itself # * have a sensible way to find gccgo without a dep on gcc + class GoBootstrap(Package): """Old C-bootstrapped go to bootstrap real go""" homepage = "https://golang.org" @@ -48,4 +49,3 @@ class GoBootstrap(Package): def setup_environment(self, spack_env, run_env): spack_env.set('GOROOT_FINAL', self.spec.prefix) - diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 28e0d1ba7f..13b83517d1 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -78,5 +78,3 @@ class Go(Package): # Allow packages to find this when using module or dotkit run_env.prepend_path('GOPATH', ':'.join( [ext_spec.prefix] + path_components)) - - -- cgit v1.2.3-70-g09d2 From 471950434ed9f0f88cad04b6edcb1ee499adcb94 Mon Sep 17 00:00:00 2001 From: "Veronica G. Vergara Larrea" Date: Tue, 17 May 2016 13:40:01 -0400 Subject: add a flag to openmpi to allow users to disable vt support --- var/spack/repos/builtin/packages/openmpi/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 163990bf15..e1e3ad1492 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -65,6 +65,8 @@ class Openmpi(Package): variant('sqlite3', default=False, description='Build sqlite3 support') + variant('vt', default=True, description='Build support for contributed package vt') + # TODO : support for CUDA is missing provides('mpi@:2.2', when='@1.6.5') @@ -116,7 +118,8 @@ class Openmpi(Package): # Other options '--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple', '--with-pmi' if '+pmi' in spec else '--without-pmi', - '--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3' + '--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3', + '--disable-vt' if '-vt' in spec else '--enable-vt' ]) # TODO: use variants for this, e.g. +lanl, +llnl, etc. -- cgit v1.2.3-70-g09d2 From 7b9b18f03c7654271b865e4a3a0117124331aa0c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 17 May 2016 13:14:59 -0500 Subject: Add HPL benchmark package --- var/spack/repos/builtin/packages/hpl/package.py | 111 ++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 var/spack/repos/builtin/packages/hpl/package.py diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py new file mode 100644 index 0000000000..1fe3e6ea32 --- /dev/null +++ b/var/spack/repos/builtin/packages/hpl/package.py @@ -0,0 +1,111 @@ +############################################################################## +# 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 * +import os +import platform + + +class Hpl(Package): + """HPL is a software package that solves a (random) dense linear system + in double precision (64 bits) arithmetic on distributed-memory computers. + It can thus be regarded as a portable as well as freely available + implementation of the High Performance Computing Linpack Benchmark.""" + + homepage = "http://www.netlib.org/benchmark/hpl/" + url = "http://www.netlib.org/benchmark/hpl/hpl-2.2.tar.gz" + + version('2.2', '0eb19e787c3dc8f4058db22c9e0c5320') + + variant('openmp', default=False, description='Enable OpenMP support') + + depends_on('mpi@1.1:') + depends_on('blas') + + def configure(self, spec, arch): + # List of configuration options + # Order is important + config = [] + + # OpenMP support + if '+openmp' in spec: + config.append( + 'OMP_DEFS = {0}'.format(self.compiler.openmp_flag) + ) + + config.extend([ + # Shell + 'SHELL = /bin/sh', + 'CD = cd', + 'CP = cp', + 'LN_S = ln -fs', + 'MKDIR = mkdir -p', + 'RM = /bin/rm -f', + 'TOUCH = touch', + # Platform identifier + 'ARCH = {0}'.format(arch), + # HPL Directory Structure / HPL library + 'TOPdir = {0}'.format(os.getcwd()), + 'INCdir = $(TOPdir)/include', + 'BINdir = $(TOPdir)/bin/$(ARCH)', + 'LIBdir = $(TOPdir)/lib/$(ARCH)', + 'HPLlib = $(LIBdir)/libhpl.a', + # Message Passing library (MPI) + 'MPinc = -I{0}'.format(spec['mpi'].prefix.include), + 'MPlib = -L{0}'.format(spec['mpi'].prefix.lib), + # Linear Algebra library (BLAS or VSIPL) + 'LAinc = {0}'.format(spec['blas'].prefix.include), + 'LAlib = {0}'.format(spec['blas'].blas_shared_lib), + # F77 / C interface + 'F2CDEFS = -DAdd_ -DF77_INTEGER=int -DStringSunStyle', + # HPL includes / libraries / specifics + 'HPL_INCLUDES = -I$(INCdir) -I$(INCdir)/$(ARCH) ' + + '-I$(LAinc) -I$(MPinc)', + 'HPL_LIBS = $(HPLlib) $(LAlib) $(MPlib)', + 'HPL_OPTS = -DHPL_DETAILED_TIMING -DHPL_PROGRESS_REPORT', + 'HPL_DEFS = $(F2CDEFS) $(HPL_OPTS) $(HPL_INCLUDES)', + # Compilers / linkers - Optimization flags + 'CC = {0}'.format(spec['mpi'].mpicc), + 'CCNOOPT = $(HPL_DEFS)', + 'CCFLAGS = $(HPL_DEFS) -O3', + 'LINKER = $(CC)', + 'LINKFLAGS = $(CCFLAGS) $(OMP_DEFS)', + 'ARCHIVER = ar', + 'ARFLAGS = r', + 'RANLIB = echo' + ]) + + # Write configuration options to include file + with open('Make.{0}'.format(arch), 'w') as makefile: + for var in config: + makefile.write('{0}\n'.format(var)) + + + def install(self, spec, prefix): + arch = '{0}-{1}'.format(platform.system(), platform.processor()) + + self.configure(spec, arch) + + make('arch={0}'.format(arch)) + install_tree(join_path('bin', arch), prefix.bin) -- cgit v1.2.3-70-g09d2 From 631cbdbda89a1a227dcb0277478195a950984240 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 17 May 2016 13:22:00 -0500 Subject: Flake8 --- var/spack/repos/builtin/packages/hpl/package.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py index 1fe3e6ea32..3a469d842e 100644 --- a/var/spack/repos/builtin/packages/hpl/package.py +++ b/var/spack/repos/builtin/packages/hpl/package.py @@ -81,7 +81,7 @@ class Hpl(Package): 'F2CDEFS = -DAdd_ -DF77_INTEGER=int -DStringSunStyle', # HPL includes / libraries / specifics 'HPL_INCLUDES = -I$(INCdir) -I$(INCdir)/$(ARCH) ' + - '-I$(LAinc) -I$(MPinc)', + '-I$(LAinc) -I$(MPinc)', 'HPL_LIBS = $(HPLlib) $(LAlib) $(MPlib)', 'HPL_OPTS = -DHPL_DETAILED_TIMING -DHPL_PROGRESS_REPORT', 'HPL_DEFS = $(F2CDEFS) $(HPL_OPTS) $(HPL_INCLUDES)', @@ -101,7 +101,6 @@ class Hpl(Package): for var in config: makefile.write('{0}\n'.format(var)) - def install(self, spec, prefix): arch = '{0}-{1}'.format(platform.system(), platform.processor()) -- cgit v1.2.3-70-g09d2 From f16228d811e4be68f4e4704ff3c2eaee86c936d6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 17 May 2016 13:36:38 -0500 Subject: Add more install directories --- var/spack/repos/builtin/packages/hpl/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py index 3a469d842e..3d6e996323 100644 --- a/var/spack/repos/builtin/packages/hpl/package.py +++ b/var/spack/repos/builtin/packages/hpl/package.py @@ -102,9 +102,16 @@ class Hpl(Package): makefile.write('{0}\n'.format(var)) def install(self, spec, prefix): + # Arch used for file naming purposes only arch = '{0}-{1}'.format(platform.system(), platform.processor()) + # Generate Makefile include self.configure(spec, arch) make('arch={0}'.format(arch)) + + # Manual installation install_tree(join_path('bin', arch), prefix.bin) + install_tree(join_path('lib', arch), prefix.lib) + install_tree(join_path('include', arch), prefix.include) + install_tree('man', prefix.man) -- cgit v1.2.3-70-g09d2 From 6c95a5d4960c997da9ed917a57845812838d7fde Mon Sep 17 00:00:00 2001 From: "Veronica G. Vergara Larrea" Date: Tue, 17 May 2016 14:37:36 -0400 Subject: the right flag here is +, the default behavior is controlled in the variant --- var/spack/repos/builtin/packages/openmpi/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index e1e3ad1492..0e3185db25 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -119,7 +119,7 @@ class Openmpi(Package): '--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple', '--with-pmi' if '+pmi' in spec else '--without-pmi', '--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3', - '--disable-vt' if '-vt' in spec else '--enable-vt' + '--enable-vt' if '+vt' in spec else '--disable-vt' ]) # TODO: use variants for this, e.g. +lanl, +llnl, etc. -- cgit v1.2.3-70-g09d2 From fcc4c1b2f20fd1e19f7443923f779ef4e5b9c5d0 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 17 May 2016 15:13:28 -0400 Subject: Remove duplicate providers that can concretize to the same result Patch generously provided by @becker33. Closes #928. --- lib/spack/spack/spec.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 89a023a750..470353c4f6 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1071,6 +1071,11 @@ class Spec(object): # If there is a provider for the vpkg, then use that instead of # the virtual package. if providers: + # Remove duplicate providers that can concretize to the same result. + for provider in providers: + for spec in providers: + if spec is not provider and provider.satisfies(spec): + providers.remove(spec) # Can't have multiple providers for the same thing in one spec. if len(providers) > 1: raise MultipleProviderError(vdep, providers) -- cgit v1.2.3-70-g09d2 From 1a187e73ae51e40c1e9bc6eea8aaf8f9e60ffd3f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 17 May 2016 22:57:32 +0200 Subject: tbb: add 4.4.4; raise InstallError when building 4.4.3 with GCC6.1 --- var/spack/repos/builtin/packages/tbb/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/tbb/package.py b/var/spack/repos/builtin/packages/tbb/package.py index 6c3ceb1e76..14e1b3d3b5 100644 --- a/var/spack/repos/builtin/packages/tbb/package.py +++ b/var/spack/repos/builtin/packages/tbb/package.py @@ -35,6 +35,7 @@ class Tbb(Package): homepage = "http://www.threadingbuildingblocks.org/" # Only version-specific URL's work for TBB + version('4.4.4', 'd4cee5e4ca75cab5181834877738619c56afeb71', url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160413oss_src.tgz') version('4.4.3', '80707e277f69d9b20eeebdd7a5f5331137868ce1', url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160128oss_src_0.tgz') def coerce_to_spack(self,tbb_build_subdir): @@ -54,8 +55,10 @@ class Tbb(Package): of.write(l); def install(self, spec, prefix): - # - # we need to follow TBB's compiler selection logic to get the proper build + link flags + if spec.satisfies('%gcc@6.1:') and spec.satisfies('@:4.4.3'): + raise InstallError('Only TBB 4.4.4 and above build with GCC 6.1!') + + # We need to follow TBB's compiler selection logic to get the proper build + link flags # but we still need to use spack's compiler wrappers # to accomplish this, we do two things: # -- cgit v1.2.3-70-g09d2 From 9d584d0c4714361ffa56cfdea112707c8dd69fea Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 17 May 2016 16:06:43 -0700 Subject: Tag Spack version 0.9 - Tagging a version to include all that's happened since 0.8.17 - This is in anticipation of merging `features/cflags` and `features/newarch`, which will break the spec format. - 1.0 will likely come after those. --- lib/spack/spack/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 164340bf0f..c7a155597f 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -105,7 +105,7 @@ concretizer = DefaultConcretizer() # Version information from spack.version import Version -spack_version = Version("0.8.15") +spack_version = Version("0.9") # # Executables used by Spack -- cgit v1.2.3-70-g09d2 From 582d01784aa44024da598187c654947bfd2e55de Mon Sep 17 00:00:00 2001 From: Greg Lee Date: Tue, 17 May 2016 21:18:34 -0700 Subject: added newdtags variant, default to false (i.e., remove --enable-new-dtags) --- .../builtin/packages/intel-parallel-studio/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py index a176af101d..493ca16417 100644 --- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -32,6 +32,8 @@ class IntelParallelStudio(IntelInstaller): url="file://%s/parallel_studio_xe_2016_update3.tgz" % os.getcwd()) # NOQA: ignore=E501 variant('rpath', default=True, description="Add rpath to .cfg files") + variant('newdtags', default=False, + description="Allow use of --enable-new-dtags in MPI wrappers") variant('all', default=False, description="Install all files with the requested edition") variant('mpi', default=True, @@ -116,6 +118,20 @@ VTune Amplifier, and Inspector tools""") spec.satisfies('@cluster'): os.symlink(self.global_license_file, os.path.join( self.prefix, "itac_latest", "license.lic")) + if spec.satisfies('~newdtags'): + wrappers = ["mpif77", "mpif77", "mpif90", "mpif90", + "mpigcc", "mpigcc", "mpigxx", "mpigxx", + "mpiicc", "mpiicc", "mpiicpc", "mpiicpc", + "mpiifort", "mpiifort"] + wrapper_paths = [] + for root, dirs, files in os.walk(spec.prefix): + for name in files: + if name in wrappers: + wrapper_paths.append(os.path.join(spec.prefix, + root, name)) + for wrapper in wrapper_paths: + filter_file(r'-Xlinker --enable-new-dtags', r' ', + wrapper) if spec.satisfies('+rpath'): for compiler_command in ["icc", "icpc", "ifort"]: -- cgit v1.2.3-70-g09d2 From 267666cd97b93056b9f626e34783554f84bf5bce Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 17 May 2016 23:35:05 +0200 Subject: formatting --- var/spack/repos/builtin/packages/tbb/package.py | 50 ++++++++++++------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/var/spack/repos/builtin/packages/tbb/package.py b/var/spack/repos/builtin/packages/tbb/package.py index 14e1b3d3b5..c88b170816 100644 --- a/var/spack/repos/builtin/packages/tbb/package.py +++ b/var/spack/repos/builtin/packages/tbb/package.py @@ -23,9 +23,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os import glob + class Tbb(Package): """Widely used C++ template library for task parallelism. Intel Threading Building Blocks (Intel TBB) lets you easily write parallel @@ -35,38 +35,39 @@ class Tbb(Package): homepage = "http://www.threadingbuildingblocks.org/" # Only version-specific URL's work for TBB - version('4.4.4', 'd4cee5e4ca75cab5181834877738619c56afeb71', url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160413oss_src.tgz') - version('4.4.3', '80707e277f69d9b20eeebdd7a5f5331137868ce1', url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160128oss_src_0.tgz') + version('4.4.4', 'd4cee5e4ca75cab5181834877738619c56afeb71', url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160413oss_src.tgz') # NOQA: ignore=E501 + version('4.4.3', '80707e277f69d9b20eeebdd7a5f5331137868ce1', url='https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb44_20160128oss_src_0.tgz') # NOQA: ignore=E501 - def coerce_to_spack(self,tbb_build_subdir): - for compiler in ["icc","gcc","clang"]: - fs = glob.glob(join_path(tbb_build_subdir,"*.%s.inc" % compiler )) - for f in fs: - lines = open(f).readlines() - of = open(f,"w") - for l in lines: - if l.strip().startswith("CPLUS ="): + def coerce_to_spack(self, tbb_build_subdir): + for compiler in ["icc", "gcc", "clang"]: + fs = glob.glob(join_path(tbb_build_subdir, + "*.%s.inc" % compiler)) + for f in fs: + lines = open(f).readlines() + of = open(f, "w") + for l in lines: + if l.strip().startswith("CPLUS ="): of.write("# coerced to spack\n") of.write("CPLUS = $(CXX)\n") - elif l.strip().startswith("CPLUS ="): + elif l.strip().startswith("CPLUS ="): of.write("# coerced to spack\n") of.write("CONLY = $(CC)\n") - else: - of.write(l); + else: + of.write(l) def install(self, spec, prefix): if spec.satisfies('%gcc@6.1:') and spec.satisfies('@:4.4.3'): - raise InstallError('Only TBB 4.4.4 and above build with GCC 6.1!') + raise InstallError('Only TBB 4.4.4 and above build with GCC 6.1!') - # We need to follow TBB's compiler selection logic to get the proper build + link flags - # but we still need to use spack's compiler wrappers + # We need to follow TBB's compiler selection logic to get the proper + # build + link flags but we still need to use spack's compiler wrappers # to accomplish this, we do two things: # - # * Look at the spack spec to determine which compiler we should pass to tbb's Makefile + # * Look at the spack spec to determine which compiler we should pass + # to tbb's Makefile; # # * patch tbb's build system to use the compiler wrappers (CC, CXX) for - # icc, gcc, clang - # (see coerce_to_spack()) + # icc, gcc, clang (see coerce_to_spack()); # self.coerce_to_spack("build") @@ -77,7 +78,6 @@ class Tbb(Package): else: tbb_compiler = "gcc" - mkdirp(prefix) mkdirp(prefix.lib) @@ -85,10 +85,10 @@ class Tbb(Package): # tbb does not have a configure script or make install target # we simply call make, and try to put the pieces together # - make("compiler=%s" %(tbb_compiler)) + make("compiler=%s" % (tbb_compiler)) # install headers to {prefix}/include - install_tree('include',prefix.include) + install_tree('include', prefix.include) # install libs to {prefix}/lib tbb_lib_names = ["libtbb", @@ -97,10 +97,10 @@ class Tbb(Package): for lib_name in tbb_lib_names: # install release libs - fs = glob.glob(join_path("build","*release",lib_name + ".*")) + fs = glob.glob(join_path("build", "*release", lib_name + ".*")) for f in fs: install(f, prefix.lib) # install debug libs if they exist - fs = glob.glob(join_path("build","*debug",lib_name + "_debug.*")) + fs = glob.glob(join_path("build", "*debug", lib_name + "_debug.*")) for f in fs: install(f, prefix.lib) -- cgit v1.2.3-70-g09d2 From fcc30cbf3084be54831aa88d422a554073b17b7a Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 18 May 2016 11:48:03 +0200 Subject: fixes #967 --- lib/spack/spack/cmd/find.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index b9feed839c..d0b6752495 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -186,7 +186,7 @@ def find(parser, args): if args.unknown: known = False - explicit = None + explicit = any if args.explicit: explicit = False if args.implicit: -- cgit v1.2.3-70-g09d2 From 23c7089789c2adf8c8861daf8cfd25e8e273a8c5 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 18 May 2016 11:52:27 +0200 Subject: fixes #967, flake8 approved --- lib/spack/spack/cmd/find.py | 135 +++++++++++++++++++++++++++----------------- 1 file changed, 82 insertions(+), 53 deletions(-) diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index d0b6752495..7d6aef44a3 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -22,66 +22,92 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -import sys -import collections -import itertools import argparse -from StringIO import StringIO +import sys import llnl.util.tty as tty +import spack +import spack.spec +from llnl.util.lang import * from llnl.util.tty.colify import * from llnl.util.tty.color import * -from llnl.util.lang import * -import spack -import spack.spec +description = "Find installed spack packages" -description ="Find installed spack packages" def setup_parser(subparser): format_group = subparser.add_mutually_exclusive_group() + format_group.add_argument('-s', + '--short', + action='store_const', + dest='mode', + const='short', + help='Show only specs (default)') + format_group.add_argument('-p', + '--paths', + action='store_const', + dest='mode', + const='paths', + help='Show paths to package install directories') format_group.add_argument( - '-s', '--short', action='store_const', dest='mode', const='short', - help='Show only specs (default)') - format_group.add_argument( - '-p', '--paths', action='store_const', dest='mode', const='paths', - help='Show paths to package install directories') - format_group.add_argument( - '-d', '--deps', action='store_const', dest='mode', const='deps', + '-d', + '--deps', + action='store_const', + dest='mode', + const='deps', help='Show full dependency DAG of installed packages') - subparser.add_argument( - '-l', '--long', action='store_true', dest='long', - help='Show dependency hashes as well as versions.') - subparser.add_argument( - '-L', '--very-long', action='store_true', dest='very_long', - help='Show dependency hashes as well as versions.') - subparser.add_argument( - '-f', '--show-flags', action='store_true', dest='show_flags', - help='Show spec compiler flags.') + subparser.add_argument('-l', + '--long', + action='store_true', + dest='long', + help='Show dependency hashes as well as versions.') + subparser.add_argument('-L', + '--very-long', + action='store_true', + dest='very_long', + help='Show dependency hashes as well as versions.') + subparser.add_argument('-f', + '--show-flags', + action='store_true', + dest='show_flags', + help='Show spec compiler flags.') subparser.add_argument( - '-e', '--explicit', action='store_true', + '-e', + '--explicit', + action='store_true', help='Show only specs that were installed explicitly') subparser.add_argument( - '-E', '--implicit', action='store_true', + '-E', + '--implicit', + action='store_true', help='Show only specs that were installed as dependencies') subparser.add_argument( - '-u', '--unknown', action='store_true', dest='unknown', + '-u', + '--unknown', + action='store_true', + dest='unknown', help='Show only specs Spack does not have a package for.') subparser.add_argument( - '-m', '--missing', action='store_true', dest='missing', + '-m', + '--missing', + action='store_true', + dest='missing', help='Show missing dependencies as well as installed specs.') - subparser.add_argument( - '-M', '--only-missing', action='store_true', dest='only_missing', - help='Show only missing dependencies.') - subparser.add_argument( - '-N', '--namespace', action='store_true', - help='Show fully qualified package names.') + subparser.add_argument('-M', + '--only-missing', + action='store_true', + dest='only_missing', + help='Show only missing dependencies.') + subparser.add_argument('-N', + '--namespace', + action='store_true', + help='Show fully qualified package names.') - subparser.add_argument( - 'query_specs', nargs=argparse.REMAINDER, - help='optional specs to filter results') + subparser.add_argument('query_specs', + nargs=argparse.REMAINDER, + help='optional specs to filter results') def gray_hash(spec, length): @@ -109,14 +135,15 @@ def display_specs(specs, **kwargs): # Traverse the index and print out each package for i, (architecture, compiler) in enumerate(sorted(index)): - if i > 0: print + if i > 0: + print - header = "%s{%s} / %s{%s}" % ( - spack.spec.architecture_color, architecture, - spack.spec.compiler_color, compiler) + header = "%s{%s} / %s{%s}" % (spack.spec.architecture_color, + architecture, spack.spec.compiler_color, + compiler) tty.hline(colorize(header), char='-') - specs = index[(architecture,compiler)] + specs = index[(architecture, compiler)] specs.sort() abbreviated = [s.format(format_string, color=True) for s in specs] @@ -128,20 +155,21 @@ def display_specs(specs, **kwargs): for abbrv, spec in zip(abbreviated, specs): if hashes: - print gray_hash(spec, hlen), - print format % (abbrv, spec.prefix) + print(gray_hash(spec, hlen), ) + print(format % (abbrv, spec.prefix)) elif mode == 'deps': for spec in specs: - print spec.tree( + print(spec.tree( format=format_string, color=True, indent=4, - prefix=(lambda s: gray_hash(s, hlen)) if hashes else None) + prefix=(lambda s: gray_hash(s, hlen)) if hashes else None)) elif mode == 'short': # Print columns of output if not printing flags if not flags: + def fmt(s): string = "" if hashes: @@ -149,18 +177,17 @@ def display_specs(specs, **kwargs): string += s.format('$-%s$@$+' % nfmt, color=True) return string + colify(fmt(s) for s in specs) # Print one entry per line if including flags else: for spec in specs: # Print the hash if necessary hsh = gray_hash(spec, hlen) + ' ' if hashes else '' - print hsh + spec.format(format_string, color=True) + '\n' + print(hsh + spec.format(format_string, color=True) + '\n') else: - raise ValueError( - "Invalid mode for display_specs: %s. Must be one of (paths, deps, short)." % mode) - + raise ValueError("Invalid mode for display_specs: %s. Must be one of (paths, deps, short)." % mode) # NOQA: ignore=E501 def find(parser, args): @@ -192,13 +219,14 @@ def find(parser, args): if args.implicit: explicit = True - q_args = { 'installed' : installed, 'known' : known, "explicit" : explicit } + q_args = {'installed': installed, 'known': known, "explicit": explicit} # Get all the specs the user asked for if not query_specs: specs = set(spack.installed_db.query(**q_args)) else: - results = [set(spack.installed_db.query(qs, **q_args)) for qs in query_specs] + results = [set(spack.installed_db.query(qs, **q_args)) + for qs in query_specs] specs = set.union(*results) if not args.mode: @@ -206,7 +234,8 @@ def find(parser, args): if sys.stdout.isatty(): tty.msg("%d installed packages." % len(specs)) - display_specs(specs, mode=args.mode, + display_specs(specs, + mode=args.mode, long=args.long, very_long=args.very_long, show_flags=args.show_flags) -- cgit v1.2.3-70-g09d2 From bbbffe7423eb28dc1963817538988ffdced216f3 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Wed, 18 May 2016 08:51:22 -0400 Subject: Add boost 1.61.0 --- var/spack/repos/builtin/packages/boost/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index c3d09d29ac..2f2965eb12 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -43,6 +43,7 @@ class Boost(Package): list_url = "http://sourceforge.net/projects/boost/files/boost/" list_depth = 2 + version('1.61.0', '6095876341956f65f9d35939ccea1a9f') version('1.60.0', '65a840e1a0b13a558ff19eeb2c4f0cbe') version('1.59.0', '6aa9a5c6a4ca1016edd0ed1178e3cb87') version('1.58.0', 'b8839650e61e9c1c0a89f371dd475546') -- cgit v1.2.3-70-g09d2 From 434ff28af453619b9c164121d6ef51ba14673e3a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 18 May 2016 15:14:21 -0500 Subject: Add STREAM benchmark package --- var/spack/repos/builtin/packages/stream/package.py | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 var/spack/repos/builtin/packages/stream/package.py diff --git a/var/spack/repos/builtin/packages/stream/package.py b/var/spack/repos/builtin/packages/stream/package.py new file mode 100644 index 0000000000..8b3f32af8a --- /dev/null +++ b/var/spack/repos/builtin/packages/stream/package.py @@ -0,0 +1,62 @@ +############################################################################## +# 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 Stream(Package): + """The STREAM benchmark is a simple synthetic benchmark program that + measures sustainable memory bandwidth (in MB/s) and the corresponding + computation rate for simple vector kernels.""" + + homepage = "https://www.cs.virginia.edu/stream/ref.html" + + version('5.10', git='https://github.com/jeffhammond/STREAM.git') + + variant('openmp', default=False, description='Build with OpenMP support') + + def patch(self): + makefile = FileFilter('Makefile') + + # Use the Spack compiler wrappers + makefile.filter('CC = .*', 'CC = cc') + makefile.filter('FC = .*', 'FC = f77') + + cflags = '-O2' + fflags = '-O2' + if '+openmp' in self.spec: + cflags += ' ' + self.compiler.openmp_flag + fflags += ' ' + self.compiler.openmp_flag + + # Set the appropriate flags for this compiler + makefile.filter('CFLAGS = .*', 'CFLAGS = {0}'.format(cflags)) + makefile.filter('FFLAGS = .*', 'FFLAGS = {0}'.format(fflags)) + + def install(self, spec, prefix): + make() + + # Manual installation + mkdir(prefix.bin) + install('stream_c.exe', prefix.bin) + install('stream_f.exe', prefix.bin) -- cgit v1.2.3-70-g09d2 From 29635b7bbd9fd506e38f1987bd845587f6158ac3 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 18 May 2016 14:04:39 -0700 Subject: initial docs for find and flake8 cleanup --- lib/spack/docs/basic_usage.rst | 6 + lib/spack/spack/cmd/find.py | 40 +- lib/spack/spack/database.py | 99 ++-- lib/spack/spack/spec.py | 645 +++++++++++---------- .../repos/builtin/packages/py-autopep8/package.py | 16 + .../repos/builtin/packages/py-pep8/package.py | 15 + 6 files changed, 433 insertions(+), 388 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-autopep8/package.py create mode 100644 var/spack/repos/builtin/packages/py-pep8/package.py diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 15db2f7a16..6efed83621 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -246,6 +246,12 @@ Packages are divided into groups according to their architecture and compiler. Within each group, Spack tries to keep the view simple, and only shows the version of installed packages. +``spack find`` can filter the package list based on the package name, spec, or +a number of properties of their installation status. For example, missing +dependencies of a spec can be shown with ``-m``, packages which were +explicitly installed with ``spack install `` can be singled out with +``-e`` and those which have been pulled in only as dependencies with ``-E``. + In some cases, there may be different configurations of the *same* version of a package installed. For example, there are two installations of of ``libdwarf@20130729`` above. We can look at them diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 7d6aef44a3..c22268d534 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -37,71 +37,59 @@ description = "Find installed spack packages" def setup_parser(subparser): format_group = subparser.add_mutually_exclusive_group() - format_group.add_argument('-s', - '--short', + format_group.add_argument('-s', '--short', action='store_const', dest='mode', const='short', help='Show only specs (default)') - format_group.add_argument('-p', - '--paths', + format_group.add_argument('-p', '--paths', action='store_const', dest='mode', const='paths', help='Show paths to package install directories') format_group.add_argument( - '-d', - '--deps', + '-d', '--deps', action='store_const', dest='mode', const='deps', help='Show full dependency DAG of installed packages') - subparser.add_argument('-l', - '--long', + subparser.add_argument('-l', '--long', action='store_true', dest='long', help='Show dependency hashes as well as versions.') - subparser.add_argument('-L', - '--very-long', + subparser.add_argument('-L', '--very-long', action='store_true', dest='very_long', help='Show dependency hashes as well as versions.') - subparser.add_argument('-f', - '--show-flags', + subparser.add_argument('-f', '--show-flags', action='store_true', dest='show_flags', help='Show spec compiler flags.') subparser.add_argument( - '-e', - '--explicit', + '-e', '--explicit', action='store_true', help='Show only specs that were installed explicitly') subparser.add_argument( - '-E', - '--implicit', + '-E', '--implicit', action='store_true', help='Show only specs that were installed as dependencies') subparser.add_argument( - '-u', - '--unknown', + '-u', '--unknown', action='store_true', dest='unknown', help='Show only specs Spack does not have a package for.') subparser.add_argument( - '-m', - '--missing', + '-m', '--missing', action='store_true', dest='missing', help='Show missing dependencies as well as installed specs.') - subparser.add_argument('-M', - '--only-missing', + subparser.add_argument('-M', '--only-missing', action='store_true', dest='only_missing', help='Show only missing dependencies.') - subparser.add_argument('-N', - '--namespace', + subparser.add_argument('-N', '--namespace', action='store_true', help='Show fully qualified package names.') @@ -187,7 +175,9 @@ def display_specs(specs, **kwargs): print(hsh + spec.format(format_string, color=True) + '\n') else: - raise ValueError("Invalid mode for display_specs: %s. Must be one of (paths, deps, short)." % mode) # NOQA: ignore=E501 + raise ValueError( + "Invalid mode for display_specs: %s. Must be one of (paths," + "deps, short)." % mode) # NOQA: ignore=E501 def find(parser, args): diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index f3967e6b72..e768ddf5fe 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -40,7 +40,6 @@ filesystem. """ import os -import time import socket import yaml @@ -56,6 +55,7 @@ from spack.spec import Spec from spack.error import SpackError from spack.repository import UnknownPackageError + # DB goes in this directory underneath the root _db_dirname = '.spack-db' @@ -69,10 +69,12 @@ _db_lock_timeout = 60 def _autospec(function): """Decorator that automatically converts the argument of a single-arg function to a Spec.""" + def converter(self, spec_like, *args, **kwargs): if not isinstance(spec_like, spack.spec.Spec): spec_like = spack.spec.Spec(spec_like) return function(self, spec_like, *args, **kwargs) + return converter @@ -92,6 +94,7 @@ class InstallRecord(object): dependents left. """ + def __init__(self, spec, path, installed, ref_count=0, explicit=False): self.spec = spec self.path = str(path) @@ -100,16 +103,19 @@ class InstallRecord(object): self.explicit = explicit def to_dict(self): - return { 'spec' : self.spec.to_node_dict(), - 'path' : self.path, - 'installed' : self.installed, - 'ref_count' : self.ref_count, - 'explicit' : self.explicit } + return { + 'spec': self.spec.to_node_dict(), + 'path': self.path, + 'installed': self.installed, + 'ref_count': self.ref_count, + 'explicit': self.explicit + } @classmethod def from_dict(cls, spec, dictionary): d = dictionary - return InstallRecord(spec, d['path'], d['installed'], d['ref_count'], d.get('explicit', False)) + return InstallRecord(spec, d['path'], d['installed'], d['ref_count'], + d.get('explicit', False)) class Database(object): @@ -144,7 +150,7 @@ class Database(object): # Set up layout of database files within the db dir self._index_path = join_path(self._db_dir, 'index.yaml') - self._lock_path = join_path(self._db_dir, 'lock') + self._lock_path = join_path(self._db_dir, 'lock') # Create needed directories and files if not os.path.exists(self._db_dir): @@ -157,17 +163,14 @@ class Database(object): self.lock = Lock(self._lock_path) self._data = {} - def write_transaction(self, timeout=_db_lock_timeout): """Get a write lock context manager for use in a `with` block.""" return WriteTransaction(self, self._read, self._write, timeout) - def read_transaction(self, timeout=_db_lock_timeout): """Get a read lock context manager for use in a `with` block.""" return ReadTransaction(self, self._read, None, timeout) - def _write_to_yaml(self, stream): """Write out the databsae to a YAML file. @@ -183,9 +186,9 @@ class Database(object): # different paths, it can't differentiate. # TODO: fix this before we support multiple install locations. database = { - 'database' : { - 'installs' : installs, - 'version' : str(_db_version) + 'database': { + 'installs': installs, + 'version': str(_db_version) } } @@ -194,15 +197,11 @@ class Database(object): except YAMLError as e: raise SpackYAMLError("error writing YAML database:", str(e)) - def _read_spec_from_yaml(self, hash_key, installs, parent_key=None): """Recursively construct a spec from a hash in a YAML database. Does not do any locking. """ - if hash_key not in installs: - parent = read_spec(installs[parent_key]['path']) - spec_dict = installs[hash_key]['spec'] # Install records don't include hash with spec, so we add it in here @@ -224,7 +223,6 @@ class Database(object): spec._mark_concrete() return spec - def _read_from_yaml(self, stream): """ Fill database from YAML, do not maintain old data @@ -246,15 +244,15 @@ class Database(object): return def check(cond, msg): - if not cond: raise CorruptDatabaseError(self._index_path, msg) + if not cond: + raise CorruptDatabaseError(self._index_path, msg) check('database' in yfile, "No 'database' attribute in YAML.") # High-level file checks db = yfile['database'] check('installs' in db, "No 'installs' in YAML DB.") - check('version' in db, "No 'version' in YAML DB.") - + check('version' in db, "No 'version' in YAML DB.") installs = db['installs'] @@ -277,25 +275,25 @@ class Database(object): # hashes are the same. spec_hash = spec.dag_hash() if not spec_hash == hash_key: - tty.warn("Hash mismatch in database: %s -> spec with hash %s" - % (hash_key, spec_hash)) - continue # TODO: is skipping the right thing to do? + tty.warn( + "Hash mismatch in database: %s -> spec with hash %s" % + (hash_key, spec_hash)) + continue # TODO: is skipping the right thing to do? # Insert the brand new spec in the database. Each # spec has its own copies of its dependency specs. - # TODO: would a more immmutable spec implementation simplify this? + # TODO: would a more immmutable spec implementation simplify + # this? data[hash_key] = InstallRecord.from_dict(spec, rec) except Exception as e: tty.warn("Invalid database reecord:", "file: %s" % self._index_path, - "hash: %s" % hash_key, - "cause: %s" % str(e)) + "hash: %s" % hash_key, "cause: %s" % str(e)) raise self._data = data - def reindex(self, directory_layout): """Build database index from scratch based from a directory layout. @@ -320,7 +318,6 @@ class Database(object): self._data = old_data raise - def _check_ref_counts(self): """Ensure consistency of reference counts in the DB. @@ -342,9 +339,8 @@ class Database(object): found = rec.ref_count if not expected == found: raise AssertionError( - "Invalid ref_count: %s: %d (expected %d), in DB %s" - % (key, found, expected, self._index_path)) - + "Invalid ref_count: %s: %d (expected %d), in DB %s" % + (key, found, expected, self._index_path)) def _write(self): """Write the in-memory database index to its file path. @@ -366,7 +362,6 @@ class Database(object): os.remove(temp_file) raise - def _read(self): """Re-read Database from the data in the set location. @@ -381,7 +376,6 @@ class Database(object): # reindex() takes its own write lock, so no lock here. self.reindex(spack.install_layout) - def _add(self, spec, path, directory_layout=None, explicit=False): """Add an install record for spec at path to the database. @@ -404,11 +398,11 @@ class Database(object): rec.path = path else: - self._data[key] = InstallRecord(spec, path, True, explicit=explicit) + self._data[key] = InstallRecord(spec, path, True, + explicit=explicit) for dep in spec.dependencies.values(): self._increment_ref_count(dep, directory_layout) - def _increment_ref_count(self, spec, directory_layout=None): """Recursively examine dependencies and update their DB entries.""" key = spec.dag_hash() @@ -438,28 +432,25 @@ class Database(object): with self.write_transaction(): self._add(spec, path, explicit=explicit) - def _get_matching_spec_key(self, spec, **kwargs): """Get the exact spec OR get a single spec that matches.""" key = spec.dag_hash() - if not key in self._data: + if key not in self._data: match = self.query_one(spec, **kwargs) if match: return match.dag_hash() raise KeyError("No such spec in database! %s" % spec) return key - @_autospec def get_record(self, spec, **kwargs): key = self._get_matching_spec_key(spec, **kwargs) return self._data[key] - def _decrement_ref_count(self, spec): key = spec.dag_hash() - if not key in self._data: + if key not in self._data: # TODO: print something here? DB is corrupt, but # not much we can do. return @@ -472,7 +463,6 @@ class Database(object): for dep in spec.dependencies.values(): self._decrement_ref_count(dep) - def _remove(self, spec): """Non-locking version of remove(); does real work. """ @@ -491,7 +481,6 @@ class Database(object): # query spec was passed in. return rec.spec - @_autospec def remove(self, spec): """Removes a spec from the database. To be called on uninstall. @@ -508,7 +497,6 @@ class Database(object): with self.write_transaction(): return self._remove(spec) - @_autospec def installed_extensions_for(self, extendee_spec): """ @@ -519,12 +507,11 @@ class Database(object): try: if s.package.extends(extendee_spec): yield s.package - except UnknownPackageError as e: + except UnknownPackageError: continue # skips unknown packages # TODO: conditional way to do this instead of catching exceptions - def query(self, query_spec=any, known=any, installed=True, explicit=any): """Run a query on the database. @@ -567,14 +554,14 @@ class Database(object): continue if explicit is not any and rec.explicit != explicit: continue - if known is not any and spack.repo.exists(rec.spec.name) != known: + if known is not any and spack.repo.exists( + rec.spec.name) != known: continue if query_spec is any or rec.spec.satisfies(query_spec): results.append(rec.spec) return sorted(results) - def query_one(self, query_spec, known=any, installed=True): """Query for exactly one spec that matches the query spec. @@ -586,10 +573,9 @@ class Database(object): assert len(concrete_specs) <= 1 return concrete_specs[0] if concrete_specs else None - def missing(self, spec): with self.read_transaction(): - key = spec.dag_hash() + key = spec.dag_hash() return key in self._data and not self._data[key].installed @@ -601,7 +587,10 @@ class _Transaction(object): Timeout for lock is customizable. """ - def __init__(self, db, acquire_fn=None, release_fn=None, + + def __init__(self, db, + acquire_fn=None, + release_fn=None, timeout=_db_lock_timeout): self._db = db self._timeout = timeout @@ -636,11 +625,11 @@ class WriteTransaction(_Transaction): class CorruptDatabaseError(SpackError): def __init__(self, path, msg=''): super(CorruptDatabaseError, self).__init__( - "Spack database is corrupt: %s. %s" %(path, msg)) + "Spack database is corrupt: %s. %s" % (path, msg)) class InvalidDatabaseVersionError(SpackError): def __init__(self, expected, found): super(InvalidDatabaseVersionError, self).__init__( - "Expected database version %s but found version %s" - % (expected, found)) + "Expected database version %s but found version %s" % + (expected, found)) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 58bdc0e430..2bf4522687 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1,4 +1,4 @@ -############################################################################## +# # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # @@ -21,7 +21,7 @@ # 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 -############################################################################## +# """ Spack allows very fine-grained control over how packages are installed and over how they are built and configured. To make this easy, it has its own @@ -96,7 +96,6 @@ specs to avoid ambiguity. Both are provided because ~ can cause shell expansion when it is the first character in an id typed on the command line. """ import sys -import itertools import hashlib import base64 from StringIO import StringIO @@ -113,8 +112,6 @@ import spack.parse import spack.error import spack.compilers as compilers -# TODO: move display_specs to some other location. -from spack.cmd.find import display_specs from spack.version import * from spack.util.string import * from spack.util.prefix import Prefix @@ -124,24 +121,24 @@ from spack.virtual import ProviderIndex identifier_re = r'\w[\w-]*' # Convenient names for color formats so that other things can use them -compiler_color = '@g' -version_color = '@c' -architecture_color = '@m' -enabled_variant_color = '@B' +compiler_color = '@g' +version_color = '@c' +architecture_color = '@m' +enabled_variant_color = '@B' disabled_variant_color = '@r' -dependency_color = '@.' -hash_color = '@K' +dependency_color = '@.' +hash_color = '@K' """This map determines the coloring of specs when using color output. We make the fields different colors to enhance readability. See spack.color for descriptions of the color codes. """ -color_formats = {'%' : compiler_color, - '@' : version_color, - '=' : architecture_color, - '+' : enabled_variant_color, - '~' : disabled_variant_color, - '^' : dependency_color, - '#' : hash_color } +color_formats = {'%': compiler_color, + '@': version_color, + '=': architecture_color, + '+': enabled_variant_color, + '~': disabled_variant_color, + '^': dependency_color, + '#': hash_color} """Regex used for splitting by spec field separators.""" _separators = '[%s]' % ''.join(color_formats.keys()) @@ -150,6 +147,7 @@ _separators = '[%s]' % ''.join(color_formats.keys()) every time we call str()""" _any_version = VersionList([':']) + def index_specs(specs): """Take a list of specs and return a dict of lists. Dict is keyed by spec name and lists include all specs with the @@ -157,7 +155,7 @@ def index_specs(specs): """ spec_dict = {} for spec in specs: - if not spec.name in spec_dict: + if spec.name not in spec_dict: spec_dict[spec.name] = [] spec_dict[spec.name].append(spec) return spec_dict @@ -167,6 +165,7 @@ def colorize_spec(spec): """Returns a spec colorized according to the colors specified in color_formats.""" class insert_color: + def __init__(self): self.last = None @@ -184,9 +183,11 @@ def colorize_spec(spec): @key_ordering class CompilerSpec(object): + """The CompilerSpec field represents the compiler or range of compiler versions that a package should be built with. CompilerSpecs have a name and a version list. """ + def __init__(self, *args): nargs = len(args) if nargs == 1: @@ -204,8 +205,8 @@ class CompilerSpec(object): else: raise TypeError( - "Can only build CompilerSpec from string or CompilerSpec." + - " Found %s" % type(arg)) + "Can only build CompilerSpec from string or " + + "CompilerSpec. Found %s" % type(arg)) elif nargs == 2: name, version = args @@ -217,23 +218,19 @@ class CompilerSpec(object): raise TypeError( "__init__ takes 1 or 2 arguments. (%d given)" % nargs) - def _add_version(self, version): self.versions.add(version) - def _autospec(self, compiler_spec_like): if isinstance(compiler_spec_like, CompilerSpec): return compiler_spec_like return CompilerSpec(compiler_spec_like) - def satisfies(self, other, strict=False): other = self._autospec(other) return (self.name == other.name and self.versions.satisfies(other.versions, strict=strict)) - def constrain(self, other): """Intersect self's versions with other. @@ -247,44 +244,37 @@ class CompilerSpec(object): return self.versions.intersect(other.versions) - @property def concrete(self): """A CompilerSpec is concrete if its versions are concrete and there is an available compiler with the right version.""" return self.versions.concrete - @property def version(self): if not self.concrete: raise SpecError("Spec is not concrete: " + str(self)) return self.versions[0] - def copy(self): clone = CompilerSpec.__new__(CompilerSpec) clone.name = self.name clone.versions = self.versions.copy() return clone - def _cmp_key(self): return (self.name, self.versions) - def to_dict(self): - d = {'name' : self.name} + d = {'name': self.name} d.update(self.versions.to_dict()) - return { 'compiler' : d } - + return {'compiler': d} @staticmethod def from_dict(d): d = d['compiler'] return CompilerSpec(d['name'], VersionList.from_dict(d)) - def __str__(self): out = self.name if self.versions and self.versions != _any_version: @@ -298,25 +288,24 @@ class CompilerSpec(object): @key_ordering class VariantSpec(object): + """Variants are named, build-time options for a package. Names depend on the particular package being built, and each named variant can be enabled or disabled. """ + def __init__(self, name, value): self.name = name self.value = value - def _cmp_key(self): return (self.name, self.value) - def copy(self): return VariantSpec(self.name, self.value) - def __str__(self): - if self.value in [True,False]: + if self.value in [True, False]: out = '+' if self.value else '~' return out + self.name else: @@ -324,11 +313,11 @@ class VariantSpec(object): class VariantMap(HashableMap): + def __init__(self, spec): super(VariantMap, self).__init__() self.spec = spec - def satisfies(self, other, strict=False): if strict or self.spec._concrete: return all(k in self and self[k].value == other[k].value @@ -337,7 +326,6 @@ class VariantMap(HashableMap): return all(self[k].value == other[k].value for k in other if k in self) - def constrain(self, other): """Add all variants in other that aren't in self to self. @@ -356,7 +344,7 @@ class VariantMap(HashableMap): raise UnsatisfiableVariantSpecError(self[k], other[k]) else: self[k] = other[k].copy() - changed =True + changed = True return changed @property @@ -364,14 +352,12 @@ class VariantMap(HashableMap): return self.spec._concrete or all( v in self for v in self.spec.package_class.variants) - def copy(self): clone = VariantMap(None) for name, variant in self.items(): clone[name] = variant.copy() return clone - def __str__(self): sorted_keys = sorted(self.keys()) return ''.join(str(self[key]) for key in sorted_keys) @@ -380,20 +366,20 @@ class VariantMap(HashableMap): _valid_compiler_flags = [ 'cflags', 'cxxflags', 'fflags', 'ldflags', 'ldlibs', 'cppflags'] + class FlagMap(HashableMap): + def __init__(self, spec): super(FlagMap, self).__init__() self.spec = spec - def satisfies(self, other, strict=False): if strict or (self.spec and self.spec._concrete): return all(f in self and set(self[f]) <= set(other[f]) for f in other) else: return all(set(self[f]) <= set(other[f]) - for f in other if (other[f] != [] and f in self)) - + for f in other if (other[f] != [] and f in self)) def constrain(self, other): """Add all flags in other that aren't in self to self. @@ -403,13 +389,15 @@ class FlagMap(HashableMap): if other.spec and other.spec._concrete: for k in self: if k not in other: - raise UnsatisfiableCompilerFlagSpecError(self[k], '') + raise UnsatisfiableCompilerFlagSpecError( + self[k], '') changed = False for k in other: if k in self and not set(self[k]) <= set(other[k]): raise UnsatisfiableCompilerFlagSpecError( - ' '.join(f for f in self[k]), ' '.join( f for f in other[k])) + ' '.join(f for f in self[k]), + ' '.join(f for f in other[k])) elif k not in self: self[k] = other[k] changed = True @@ -423,32 +411,33 @@ class FlagMap(HashableMap): def concrete(self): return all(flag in self for flag in _valid_compiler_flags) - def copy(self): clone = FlagMap(None) for name, value in self.items(): clone[name] = value return clone - def _cmp_key(self): - return ''.join(str(key) + ' '.join(str(v) for v in value) for key, value in sorted(self.items())) - + return ''.join(str(key) + ' '.join(str(v) for v in value) + for key, value in sorted(self.items())) def __str__(self): - sorted_keys = filter(lambda flag: self[flag] != [], sorted(self.keys())) - cond_symbol = ' ' if len(sorted_keys)>0 else '' - return cond_symbol + ' '.join(str(key) + '=\"' + ' '.join(str(f) for f in self[key]) + '\"' for key in sorted_keys) + sorted_keys = filter( + lambda flag: self[flag] != [], sorted(self.keys())) + cond_symbol = ' ' if len(sorted_keys) > 0 else '' + return cond_symbol + ' '.join(str(key) + '=\"' + ' '.join(str(f) + for f in self[key]) + '\"' + for key in sorted_keys) class DependencyMap(HashableMap): + """Each spec has a DependencyMap containing specs for its dependencies. The DependencyMap is keyed by name. """ @property def concrete(self): return all(d.concrete for d in self.values()) - def __str__(self): return ''.join( ["^" + str(self[name]) for name in sorted(self.keys())]) @@ -456,6 +445,7 @@ class DependencyMap(HashableMap): @key_ordering class Spec(object): + def __init__(self, spec_like, *dep_like, **kwargs): # Copy if spec_like is a Spec. if isinstance(spec_like, Spec): @@ -494,11 +484,11 @@ class Spec(object): # cases we've read them from a file want to assume normal. # This allows us to manipulate specs that Spack doesn't have # package.py files for. - self._normal = kwargs.get('normal', False) + self._normal = kwargs.get('normal', False) self._concrete = kwargs.get('concrete', False) # Allow a spec to be constructed with an external path. - self.external = kwargs.get('external', None) + self.external = kwargs.get('external', None) # This allows users to construct a spec DAG with literals. # Note that given two specs a and b, Spec(a) copies a, but @@ -507,7 +497,6 @@ class Spec(object): spec = dep if isinstance(dep, Spec) else Spec(dep) self._add_dependency(spec) - # # Private routines here are called by the parser when building a spec. # @@ -515,10 +504,10 @@ class Spec(object): """Called by the parser to add an allowable version.""" self.versions.add(version) - def _add_variant(self, name, value): """Called by the parser to add a variant.""" - if name in self.variants: raise DuplicateVariantError( + if name in self.variants: + raise DuplicateVariantError( "Cannot specify variant '%s' twice" % name) if isinstance(value, basestring) and value.upper() == 'TRUE': value = True @@ -526,7 +515,6 @@ class Spec(object): value = False self.variants[name] = VariantSpec(name, value) - def _add_flag(self, name, value): """Called by the parser to add a known flag. Known flags currently include "arch" @@ -538,26 +526,27 @@ class Spec(object): assert(self.compiler_flags is not None) self.compiler_flags[name] = value.split() else: - self._add_variant(name,value) + self._add_variant(name, value) def _set_compiler(self, compiler): """Called by the parser to set the compiler.""" - if self.compiler: raise DuplicateCompilerSpecError( + if self.compiler: + raise DuplicateCompilerSpecError( "Spec for '%s' cannot have two compilers." % self.name) self.compiler = compiler - def _set_architecture(self, architecture): """Called by the parser to set the architecture.""" - if self.architecture: raise DuplicateArchitectureError( + if self.architecture: + raise DuplicateArchitectureError( "Spec for '%s' cannot have two architectures." % self.name) self.architecture = architecture - def _add_dependency(self, spec): """Called by the parser to add another spec as a dependency.""" if spec.name in self.dependencies: - raise DuplicateDependencyError("Cannot depend on '%s' twice" % spec) + raise DuplicateDependencyError( + "Cannot depend on '%s' twice" % spec) self.dependencies[spec.name] = spec spec.dependents[self.name] = self @@ -566,8 +555,8 @@ class Spec(object): # @property def fullname(self): - return '%s.%s' % (self.namespace, self.name) if self.namespace else (self.name if self.name else '') - + return '%s.%s' % ((self.namespace, self.name) if self.namespace else + (self.name if self.name else '')) @property def root(self): @@ -587,12 +576,10 @@ class Spec(object): assert(all(first_root is d.root for d in depiter)) return first_root - @property def package(self): return spack.repo.get(self) - @property def package_class(self): """Internal package call gets only the class object for a package. @@ -600,7 +587,6 @@ class Spec(object): """ return spack.repo.get_pkg_class(self.name) - @property def virtual(self): """Right now, a spec is virtual if no package exists with its name. @@ -612,12 +598,10 @@ class Spec(object): """ return Spec.is_virtual(self.name) - @staticmethod def is_virtual(name): """Test if a name is virtual without requiring a Spec.""" - return (not name is None) and ( not spack.repo.exists(name) ) - + return (name is not None) and (not spack.repo.exists(name)) @property def concrete(self): @@ -628,17 +612,17 @@ class Spec(object): if self._concrete: return True - self._concrete = bool(not self.virtual - and self.namespace is not None - and self.versions.concrete - and self.variants.concrete - and self.architecture - and self.compiler and self.compiler.concrete - and self.compiler_flags.concrete - and self.dependencies.concrete) + self._concrete = bool(not self.virtual and + self.namespace is not None and + self.versions.concrete and + self.variants.concrete and + self.architecture and + self.compiler and + self.compiler.concrete and + self.compiler_flags.concrete and + self.dependencies.concrete) return self._concrete - def traverse(self, visited=None, d=0, **kwargs): """Generic traversal of the DAG represented by this spec. This will yield each node in the spec. Options: @@ -682,14 +666,14 @@ class Spec(object): """ # get initial values for kwargs - depth = kwargs.get('depth', False) - key_fun = kwargs.get('key', id) + depth = kwargs.get('depth', False) + key_fun = kwargs.get('key', id) if isinstance(key_fun, basestring): key_fun = attrgetter(key_fun) yield_root = kwargs.get('root', True) - cover = kwargs.get('cover', 'nodes') - direction = kwargs.get('direction', 'children') - order = kwargs.get('order', 'pre') + cover = kwargs.get('cover', 'nodes') + direction = kwargs.get('direction', 'children') + order = kwargs.get('order', 'pre') # Make sure kwargs have legal values; raise ValueError if not. def validate(name, val, allowed_values): @@ -726,33 +710,29 @@ class Spec(object): visited.add(key) for name in sorted(successors): child = successors[name] - for elt in child.traverse(visited, d+1, **kwargs): + for elt in child.traverse(visited, d + 1, **kwargs): yield elt # Postorder traversal yields after successors if yield_me and order == 'post': yield result - @property def short_spec(self): """Returns a version of the spec with the dependencies hashed instead of completely enumerated.""" return self.format('$_$@$%@$+$=$#') - @property def cshort_spec(self): """Returns a version of the spec with the dependencies hashed instead of completely enumerated.""" return self.format('$_$@$%@$+$=$#', color=True) - @property def prefix(self): return Prefix(spack.install_layout.path_for_spec(self)) - def dag_hash(self, length=None): """ Return a hash of the entire spec DAG, including connectivity. @@ -769,13 +749,14 @@ class Spec(object): return b32_hash def to_node_dict(self): - 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()) ) + 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())) 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, self.dependencies[d].dag_hash()) + for d in sorted(self.dependencies)), } # Older concrete specs do not have a namespace. Omit for @@ -789,8 +770,7 @@ class Spec(object): d['compiler'] = None d.update(self.versions.to_dict()) - return { self.name : d } - + return {self.name: d} def to_yaml(self, stream=None): node_list = [] @@ -798,10 +778,9 @@ class Spec(object): node = s.to_node_dict() node[s.name]['hash'] = s.dag_hash() node_list.append(node) - return yaml.dump({ 'spec' : node_list }, + return yaml.dump({'spec': node_list}, stream=stream, default_flow_style=False) - @staticmethod def from_node_dict(node): name = next(iter(node)) @@ -832,11 +811,11 @@ class Spec(object): for name in FlagMap.valid_compiler_flags(): spec.compiler_flags[name] = [] else: - raise SpackRecordError("Did not find a valid format for variants in YAML file") + raise SpackRecordError( + "Did not find a valid format for variants in YAML file") return spec - @staticmethod def from_yaml(stream): """Construct a spec from YAML. @@ -869,15 +848,16 @@ class Spec(object): deps[name].dependencies[dep_name] = deps[dep_name] return spec - def _concretize_helper(self, presets=None, visited=None): """Recursive helper function for concretize(). This concretizes everything bottom-up. As things are concretized, they're added to the presets, and ancestors will prefer the settings of their children. """ - if presets is None: presets = {} - if visited is None: visited = set() + if presets is None: + presets = {} + if visited is None: + visited = set() if self.name in visited: return False @@ -886,7 +866,8 @@ class Spec(object): # Concretize deps first -- this is a bottom-up process. for name in sorted(self.dependencies.keys()): - changed |= self.dependencies[name]._concretize_helper(presets, visited) + changed |= self.dependencies[ + name]._concretize_helper(presets, visited) if self.name in presets: changed |= self.constrain(presets[self.name]) @@ -899,7 +880,8 @@ class Spec(object): changed |= any( (spack.concretizer.concretize_architecture(self), spack.concretizer.concretize_compiler(self), - spack.concretizer.concretize_compiler_flags(self),#has to be concretized after compiler + spack.concretizer.concretize_compiler_flags( + self), # has to be concretized after compiler spack.concretizer.concretize_version(self), spack.concretizer.concretize_variants(self))) presets[self.name] = self @@ -907,7 +889,6 @@ class Spec(object): visited.add(self.name) return changed - def _replace_with(self, concrete): """Replace this virtual spec with a concrete spec.""" assert(self.virtual) @@ -919,7 +900,6 @@ class Spec(object): if concrete.name not in dependent.dependencies: dependent._add_dependency(concrete) - def _replace_node(self, replacement): """Replace this spec with another. @@ -937,7 +917,6 @@ class Spec(object): del dep.dependents[self.name] del self.dependencies[dep.name] - def _expand_virtual_packages(self): """Find virtual packages in this spec, replace them with providers, and normalize again to include the provider's (potentially virtual) @@ -970,12 +949,14 @@ class Spec(object): # TODO: may break if in-place on self but # shouldn't happen if root is traversed first. spec._replace_with(replacement) - done=False + done = False break if not replacement: - # Get a list of possible replacements in order of preference. - candidates = spack.concretizer.choose_virtual_or_external(spec) + # Get a list of possible replacements in order of + # preference. + candidates = spack.concretizer.choose_virtual_or_external( + spec) # Try the replacements in order, skipping any that cause # satisfiability problems. @@ -988,11 +969,12 @@ class Spec(object): copy[spec.name]._dup(replacement.copy(deps=False)) try: - # If there are duplicate providers or duplicate provider - # deps, consolidate them and merge constraints. + # If there are duplicate providers or duplicate + # provider deps, consolidate them and merge + # constraints. copy.normalize(force=True) break - except SpecError as e: + except SpecError: # On error, we'll try the next replacement. continue @@ -1007,15 +989,15 @@ class Spec(object): def feq(cfield, sfield): return (not cfield) or (cfield == sfield) - if replacement is spec or (feq(replacement.name, spec.name) and - 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.variants, spec.variants) and - feq(replacement.external, spec.external)): + if replacement is spec or ( + feq(replacement.name, spec.name) and + 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.variants, spec.variants) and + feq(replacement.external, spec.external)): continue - # Refine this spec to the candidate. This uses # replace_with AND dup so that it can work in # place. TODO: make this more efficient. @@ -1026,12 +1008,11 @@ class Spec(object): changed = True self_index.update(spec) - done=False + done = False break return changed - def concretize(self): """A spec is concrete if it describes one build of a package uniquely. This will ensure that this spec is concrete. @@ -1040,9 +1021,9 @@ class Spec(object): of a package, this will add constraints to make it concrete. Some rigorous validation and checks are also performed on the spec. - Concretizing ensures that it is self-consistent and that it's consistent - with requirements of its pacakges. See flatten() and normalize() for - more details on this. + Concretizing ensures that it is self-consistent and that it's + consistent with requirements of its pacakges. See flatten() and + normalize() for more details on this. """ if not self.name: raise SpecError("Attempting to concretize anonymous spec") @@ -1058,7 +1039,7 @@ class Spec(object): self._expand_virtual_packages(), self._concretize_helper()) changed = any(changes) - force=True + force = True for s in self.traverse(): # After concretizing, assign namespaces to anything left. @@ -1075,7 +1056,6 @@ class Spec(object): # Mark everything in the spec as concrete, as well. self._mark_concrete() - def _mark_concrete(self): """Mark this spec and its dependencies as concrete. @@ -1086,7 +1066,6 @@ class Spec(object): s._normal = True s._concrete = True - def concretized(self): """This is a non-destructive version of concretize(). First clones, then returns a concrete version of this package without modifying @@ -1095,7 +1074,6 @@ class Spec(object): clone.concretize() return clone - def flat_dependencies(self, **kwargs): """Return a DependencyMap containing all of this spec's dependencies with their constraints merged. @@ -1134,7 +1112,6 @@ class Spec(object): # parser doesn't allow it. Spack must be broken! raise InconsistentSpecError("Invalid Spec DAG: %s" % e.message) - def index(self): """Return DependencyMap that points to all the dependencies in this spec.""" @@ -1143,7 +1120,6 @@ class Spec(object): 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 @@ -1151,7 +1127,6 @@ class Spec(object): 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. @@ -1172,12 +1147,11 @@ class Spec(object): try: dep.constrain(dep_spec) except UnsatisfiableSpecError, e: - e.message = ("Conflicting conditional dependencies on package " - "%s for spec %s" % (self.name, self)) + e.message = ("Conflicting conditional dependencies on" + "package %s for spec %s" % (self.name, self)) raise e return dep - def _find_provider(self, vdep, provider_index): """Find provider for a virtual spec in the provider index. Raise an exception if there is a conflicting virtual @@ -1189,7 +1163,8 @@ class Spec(object): # If there is a provider for the vpkg, then use that instead of # the virtual package. if providers: - # Remove duplicate providers that can concretize to the same result. + # Remove duplicate providers that can concretize to the same + # result. for provider in providers: for spec in providers: if spec is not provider and provider.satisfies(spec): @@ -1208,11 +1183,10 @@ class Spec(object): elif required: raise UnsatisfiableProviderSpecError(required[0], vdep) - def _merge_dependency(self, dep, visited, spec_deps, provider_index): """Merge the dependency into this spec. - This is the core of the normalize() method. There are a few basic steps: + This is the core of normalize(). There are some basic steps: * If dep is virtual, evaluate whether it corresponds to an existing concrete dependency, and merge if so. @@ -1256,7 +1230,7 @@ class Spec(object): changed |= spec_deps[dep.name].constrain(dep) except UnsatisfiableSpecError, e: - e.message = "Invalid spec: '%s'. " + 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) @@ -1267,10 +1241,10 @@ class Spec(object): if dep.name not in self.dependencies: self._add_dependency(dependency) - changed |= dependency._normalize_helper(visited, spec_deps, provider_index) + changed |= dependency._normalize_helper( + visited, spec_deps, provider_index) return changed - def _normalize_helper(self, visited, spec_deps, provider_index): """Recursive helper function for _normalize.""" if self.name in visited: @@ -1301,22 +1275,22 @@ class Spec(object): return any_change - def normalize(self, force=False): """When specs are parsed, any dependencies specified are hanging off the root, and ONLY the ones that were explicitly provided are there. Normalization turns a partial flat spec into a DAG, where: 1. Known dependencies of the root package are in the DAG. - 2. Each node's dependencies dict only contains its known direct deps. + 2. Each node's dependencies dict only contains its known direct + deps. 3. There is only ONE unique spec for each package in the DAG. * This includes virtual packages. If there a non-virtual package that provides a virtual package that is in the spec, then we replace the virtual package with the non-virtual one. - TODO: normalize should probably implement some form of cycle detection, - to ensure that the spec is actually a DAG. + TODO: normalize should probably implement some form of cycle + detection, to ensure that the spec is actually a DAG. """ if not self.name: raise SpecError("Attempting to normalize anonymous spec") @@ -1350,14 +1324,14 @@ class Spec(object): self._normal = True return any_change - def normalized(self): - """Return a normalized copy of this spec without modifying this spec.""" + """ + Return a normalized copy of this spec without modifying this spec. + """ clone = self.copy() clone.normalize() return clone - def validate_names(self): """This checks that names of packages and compilers in this spec are real. If they're not, it will raise either UnknownPackageError or @@ -1378,7 +1352,6 @@ class Spec(object): if vname not in spec.package_class.variants: raise UnknownVariantError(spec.name, vname) - def constrain(self, other, deps=True): """Merge the constraints of other with self. @@ -1386,19 +1359,22 @@ class Spec(object): """ other = self._autospec(other) - if not (self.name == other.name or (not self.name) or (not other.name) ): + if not (self.name == other.name or + (not self.name) or + (not other.name)): raise UnsatisfiableSpecNameError(self.name, other.name) - if other.namespace is not None: - if self.namespace is not None and other.namespace != self.namespace: - raise UnsatisfiableSpecNameError(self.fullname, other.fullname) + if (other.namespace is not None and + self.namespace is not None and + other.namespace != self.namespace): + raise UnsatisfiableSpecNameError(self.fullname, other.fullname) if not self.versions.overlaps(other.versions): raise UnsatisfiableVersionSpecError(self.versions, other.versions) for v in other.variants: if (v in self.variants and - self.variants[v].value != other.variants[v].value): + self.variants[v].value != other.variants[v].value): raise UnsatisfiableVariantSpecError(self.variants[v], other.variants[v]) @@ -1428,7 +1404,6 @@ class Spec(object): return changed - def _constrain_dependencies(self, other): """Apply constraints of other spec's dependencies to this spec.""" other = self._autospec(other) @@ -1447,7 +1422,6 @@ class Spec(object): for name in self.common_dependencies(other): changed |= self[name].constrain(other[name], deps=False) - # Update with additional constraints from other spec for name in other.dep_difference(self): self._add_dependency(other[name].copy()) @@ -1455,7 +1429,6 @@ class Spec(object): return changed - def common_dependencies(self, other): """Return names of dependencies that self an other have in common.""" common = set( @@ -1464,14 +1437,12 @@ class Spec(object): s.name for s in other.traverse(root=False)) return common - def constrained(self, other, deps=True): """Return a constrained copy without modifying this spec.""" clone = self.copy(deps=deps) clone.constrain(other, deps) return clone - def dep_difference(self, other): """Returns dependencies in self that are not in other.""" mine = set(s.name for s in self.traverse(root=False)) @@ -1479,11 +1450,11 @@ class Spec(object): s.name for s in other.traverse(root=False)) return mine - def _autospec(self, spec_like): - """Used to convert arguments to specs. If spec_like is a spec, returns it. - If it's a string, tries to parse a string. If that fails, tries to parse - a local spec from it (i.e. name is assumed to be self's name). + """ + Used to convert arguments to specs. If spec_like is a spec, returns + it. If it's a string, tries to parse a string. If that fails, tries + to parse a local spec from it (i.e. name is assumed to be self's name). """ if isinstance(spec_like, spack.spec.Spec): return spec_like @@ -1491,12 +1462,12 @@ class Spec(object): try: spec = spack.spec.Spec(spec_like) if not spec.name: - raise SpecError("anonymous package -- this will always be handled") + raise SpecError( + "anonymous package -- this will always be handled") return spec except SpecError: return parse_anonymous_spec(spec_like, self.name) - def satisfies(self, other, deps=True, strict=False): """Determine if this spec satisfies all constraints of another. @@ -1512,7 +1483,7 @@ class Spec(object): """ other = self._autospec(other) - # A concrete provider can satisfy a virtual dependency. + # A concrete provider can satisfy a virtual dependency. if not self.virtual and other.virtual: pkg = spack.repo.get(self.fullname) if pkg.provides(other.name): @@ -1527,10 +1498,10 @@ class Spec(object): return False # namespaces either match, or other doesn't require one. - if other.namespace is not None: - if self.namespace is not None and self.namespace != other.namespace: - return False - + if (other.namespace is not None and + self.namespace is not None and + self.namespace != other.namespace): + return False if self.versions and other.versions: if not self.versions.satisfies(other.versions, strict=strict): return False @@ -1558,21 +1529,24 @@ class Spec(object): elif strict and (other.architecture and not self.architecture): return False - if not self.compiler_flags.satisfies(other.compiler_flags, strict=strict): + if not self.compiler_flags.satisfies( + other.compiler_flags, + strict=strict): return False # If we need to descend into dependencies, do it, otherwise we're done. if deps: deps_strict = strict if not (self.name and other.name): - deps_strict=True + deps_strict = True return self.satisfies_dependencies(other, strict=deps_strict) else: return True - def satisfies_dependencies(self, other, strict=False): - """This checks constraints on common dependencies against each other.""" + """ + This checks constraints on common dependencies against each other. + """ other = self._autospec(other) if strict: @@ -1583,7 +1557,8 @@ class Spec(object): return False elif not self.dependencies or not other.dependencies: - # if either spec doesn't restrict dependencies then both are compatible. + # if either spec doesn't restrict dependencies then both are + # compatible. return True # Handle first-order constraints directly @@ -1599,11 +1574,12 @@ class Spec(object): if not self_index.satisfies(other_index): return False - # These two loops handle cases where there is an overly restrictive vpkg - # in one spec for a provider in the other (e.g., mpi@3: is not compatible - # with mpich2) + # These two loops handle cases where there is an overly restrictive + # vpkg in one spec for a provider in the other (e.g., mpi@3: is not + # compatible with mpich2) for spec in self.virtual_dependencies(): - if spec.name in other_index and not other_index.providers_for(spec): + if (spec.name in other_index and + not other_index.providers_for(spec)): return False for spec in other.virtual_dependencies(): @@ -1612,12 +1588,10 @@ class Spec(object): return True - def virtual_dependencies(self): """Return list of any virtual deps in this spec.""" return [spec for spec in self.traverse() if spec.virtual] - def _dup(self, other, **kwargs): """Copy the spec other into self. This is an overwriting copy. It does not copy any dependents (parents), but by default @@ -1633,10 +1607,14 @@ class Spec(object): # We don't count dependencies as changes here changed = True if hasattr(self, 'name'): - changed = (self.name != other.name and self.versions != other.versions and - self.architecture != other.architecture and self.compiler != other.compiler and - self.variants != other.variants and self._normal != other._normal and - self.concrete != other.concrete and self.external != other.external) + changed = (self.name != other.name and + self.versions != other.versions and + self.architecture != other.architecture and + self.compiler != other.compiler and + self.variants != other.variants and + self._normal != other._normal and + self.concrete != other.concrete and + self.external != other.external) # Local node attributes get copied first. self.name = other.name @@ -1672,7 +1650,6 @@ class Spec(object): self.external = other.external return changed - def copy(self, **kwargs): """Return a copy of this spec. By default, returns a deep copy. Supply dependencies=False @@ -1682,14 +1659,12 @@ class Spec(object): clone._dup(self, **kwargs) return clone - @property def version(self): if not self.versions.concrete: raise SpecError("Spec version is not concrete: " + str(self)) return self.versions[0] - def __getitem__(self, name): """Get a dependency from the spec by its name.""" for spec in self.traverse(): @@ -1708,7 +1683,6 @@ 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 does. If the spec has no name, then we parse this one first. @@ -1720,13 +1694,11 @@ class Spec(object): return False - def sorted_deps(self): """Return a list of all dependencies sorted by name.""" deps = self.flat_dependencies() return tuple(deps[name] for name in sorted(deps)) - def _eq_dag(self, other, vs, vo): """Recursive helper for eq_dag and ne_dag. Does the actual DAG traversal.""" @@ -1739,18 +1711,22 @@ class Spec(object): 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] + for name in sorted(self.dependencies)] + osorted = [other.dependencies[name] + for name in sorted(other.dependencies)] for s, o in zip(ssorted, osorted): visited_s = id(s) in vs visited_o = id(o) in vo # Check for duplicate or non-equal dependencies - if visited_s != visited_o: return False + if visited_s != visited_o: + return False # Skip visited nodes - if visited_s or visited_o: continue + if visited_s or visited_o: + continue # Recursive check for equality if not s._eq_dag(o, vs, vo): @@ -1758,17 +1734,14 @@ class Spec(object): return True - def eq_dag(self, other): """True if the full dependency DAGs of specs are equal""" return self._eq_dag(other, set(), set()) - def ne_dag(self, other): """True if the full dependency DAGs of specs are not equal""" return not self.eq_dag(other) - def _cmp_node(self): """Comparison key for just *this node* and not its deps.""" return (self.name, @@ -1780,17 +1753,14 @@ class Spec(object): self.compiler_flags, self.dag_hash()) - def eq_node(self, other): """Equality with another spec, not including dependencies.""" return self._cmp_node() == other._cmp_node() - def ne_node(self, other): """Inequality with another spec, not including dependencies.""" return self._cmp_node() != other._cmp_node() - def _cmp_key(self): """This returns a key for the spec *including* DAG structure. @@ -1802,55 +1772,56 @@ class Spec(object): tuple(hash(self.dependencies[name]) for name in sorted(self.dependencies)),) - def colorized(self): return colorize_spec(self) - def format(self, format_string='$_$@$%@+$+$=', **kwargs): - """Prints out particular pieces of a spec, depending on what is - in the format string. The format strings you can provide are:: - - $_ Package name - $. Full package name (with namespace) - $@ Version with '@' prefix - $% Compiler with '%' prefix - $%@ Compiler with '%' prefix & compiler version with '@' prefix - $%+ Compiler with '%' prefix & compiler flags prefixed by name - $%@+ Compiler, compiler version, and compiler flags with same prefixes as above - $+ Options - $= Architecture prefixed by 'arch=' - $# 7-char prefix of DAG hash with '-' prefix - $$ $ - - You can also use full-string versions, which leave off the prefixes: - - ${PACKAGE} Package name - ${VERSION} Version - ${COMPILER} Full compiler string - ${COMPILERNAME} Compiler name - ${COMPILERVER} Compiler version - ${COMPILERFLAGS} Compiler flags - ${OPTIONS} Options - ${ARCHITECTURE} Architecture - ${SHA1} Dependencies 8-char sha1 prefix - - ${SPACK_ROOT} The spack root directory - ${SPACK_INSTALL} The default spack install directory, ${SPACK_PREFIX}/opt - - Optionally you can provide a width, e.g. $20_ for a 20-wide name. - Like printf, you can provide '-' for left justification, e.g. - $-20_ for a left-justified name. - - Anything else is copied verbatim into the output stream. - - *Example:* ``$_$@$+`` translates to the name, version, and options - of the package, but no dependencies, arch, or compiler. - - TODO: allow, e.g., $6# to customize short hash length - TODO: allow, e.g., $## for full hash. - """ - color = kwargs.get('color', False) + """ + Prints out particular pieces of a spec, depending on what is + in the format string. The format strings you can provide are:: + + $_ Package name + $. Full package name (with namespace) + $@ Version with '@' prefix + $% Compiler with '%' prefix + $%@ Compiler with '%' prefix & compiler version with '@' prefix + $%+ Compiler with '%' prefix & compiler flags prefixed by name + $%@+ Compiler, compiler version, and compiler flags with same + prefixes as above + $+ Options + $= Architecture prefixed by 'arch=' + $# 7-char prefix of DAG hash with '-' prefix + $$ $ + + You can also use full-string versions, which elide the prefixes: + + ${PACKAGE} Package name + ${VERSION} Version + ${COMPILER} Full compiler string + ${COMPILERNAME} Compiler name + ${COMPILERVER} Compiler version + ${COMPILERFLAGS} Compiler flags + ${OPTIONS} Options + ${ARCHITECTURE} Architecture + ${SHA1} Dependencies 8-char sha1 prefix + + ${SPACK_ROOT} The spack root directory + ${SPACK_INSTALL} The default spack install directory, + ${SPACK_PREFIX}/opt + + Optionally you can provide a width, e.g. $20_ for a 20-wide name. + Like printf, you can provide '-' for left justification, e.g. + $-20_ for a left-justified name. + + Anything else is copied verbatim into the output stream. + + *Example:* ``$_$@$+`` translates to the name, version, and options + of the package, but no dependencies, arch, or compiler. + + TODO: allow, e.g., $6# to customize short hash length + TODO: allow, e.g., $## for full hash. + """ + color = kwargs.get('color', False) length = len(format_string) out = StringIO() named = escape = compiler = False @@ -1908,7 +1879,7 @@ class Spec(object): elif compiler: if c == '@': if (self.compiler and self.compiler.versions and - self.compiler.versions != _any_version): + self.compiler.versions != _any_version): write(c + str(self.compiler.versions), '%') elif c == '+': if self.compiler_flags: @@ -1924,10 +1895,10 @@ class Spec(object): elif named: if not c == '}': if i == length - 1: - raise ValueError("Error: unterminated ${ in format: '%s'" - % format_string) + raise ValueError("Error: unterminated ${ in format:" + "'%s'" % format_string) named_str += c - continue; + continue if named_str == 'PACKAGE': name = self.name if self.name else '' write(fmt % self.name, '@') @@ -1973,24 +1944,21 @@ class Spec(object): result = out.getvalue() return result - def dep_string(self): return ''.join("^" + dep.format() for dep in self.sorted_deps()) - def __str__(self): return self.format() + self.dep_string() - def tree(self, **kwargs): """Prints out this spec and its dependencies, tree-formatted with indentation.""" - color = kwargs.pop('color', False) - depth = kwargs.pop('depth', False) + color = kwargs.pop('color', False) + depth = kwargs.pop('depth', False) showid = kwargs.pop('ids', False) - cover = kwargs.pop('cover', 'nodes') + cover = kwargs.pop('cover', 'nodes') indent = kwargs.pop('indent', 0) - fmt = kwargs.pop('format', '$_$@$%@+$+$=') + fmt = kwargs.pop('format', '$_$@$%@+$+$=') prefix = kwargs.pop('prefix', None) check_kwargs(kwargs, self.tree) @@ -2014,7 +1982,6 @@ class Spec(object): out += node.format(fmt, color=color) + "\n" return out - def __repr__(self): return str(self) @@ -2024,28 +1991,33 @@ class Spec(object): # HASH, DEP, AT, COLON, COMMA, ON, OFF, PCT, EQ, QT, ID = range(11) + class SpecLexer(spack.parse.Lexer): + """Parses tokens that make up spack specs.""" + def __init__(self): super(SpecLexer, self).__init__([ - (r'/', lambda scanner, val: self.token(HASH, val)), - (r'\^', lambda scanner, val: self.token(DEP, val)), - (r'\@', lambda scanner, val: self.token(AT, val)), - (r'\:', lambda scanner, val: self.token(COLON, val)), - (r'\,', lambda scanner, val: self.token(COMMA, val)), - (r'\+', lambda scanner, val: self.token(ON, val)), - (r'\-', lambda scanner, val: self.token(OFF, val)), - (r'\~', lambda scanner, val: self.token(OFF, val)), - (r'\%', lambda scanner, val: self.token(PCT, val)), - (r'\=', lambda scanner, val: self.token(EQ, val)), + (r'/', lambda scanner, val: self.token(HASH, val)), + (r'\^', lambda scanner, val: self.token(DEP, val)), + (r'\@', lambda scanner, val: self.token(AT, val)), + (r'\:', lambda scanner, val: self.token(COLON, val)), + (r'\,', lambda scanner, val: self.token(COMMA, val)), + (r'\+', lambda scanner, val: self.token(ON, val)), + (r'\-', lambda scanner, val: self.token(OFF, val)), + (r'\~', lambda scanner, val: self.token(OFF, val)), + (r'\%', lambda scanner, val: self.token(PCT, val)), + (r'\=', lambda scanner, val: self.token(EQ, val)), # This is more liberal than identifier_re (see above). # Checked by check_identifier() for better error messages. - (r'([\"\'])(?:(?=(\\?))\2.)*?\1',lambda scanner, val: self.token(QT, val)), + (r'([\"\'])(?:(?=(\\?))\2.)*?\1', + lambda scanner, val: self.token(QT, val)), (r'\w[\w.-]*', lambda scanner, val: self.token(ID, val)), - (r'\s+', lambda scanner, val: None)]) + (r'\s+', lambda scanner, val: None)]) class SpecParser(spack.parse.Parser): + def __init__(self): super(SpecParser, self).__init__(SpecLexer()) self.previous = None @@ -2067,7 +2039,8 @@ class SpecParser(spack.parse.Parser): self.token.value = self.token.value[1:-1] else: self.expect(ID) - specs[-1]._add_flag(self.previous.value, self.token.value) + specs[-1]._add_flag( + self.previous.value, self.token.value) else: specs.append(self.spec(self.previous.value)) self.previous = None @@ -2086,22 +2059,21 @@ class SpecParser(spack.parse.Parser): specs[-1]._add_dependency(self.spec(self.token.value)) else: - # Attempt to construct an anonymous spec, but check that the first token is valid - # TODO: Is this check even necessary, or will it all be Lex errors now? - specs.append(self.spec(None,True)) + # Attempt to construct an anonymous spec, but check that + # the first token is valid + # TODO: Is this check even necessary, or will it all be Lex + # errors now? + specs.append(self.spec(None, True)) except spack.parse.ParseError, e: raise SpecParseError(e) - return specs - def parse_compiler(self, text): self.setup(text) return self.compiler() - def spec_by_hash(self): self.expect(ID) @@ -2110,15 +2082,17 @@ class SpecParser(spack.parse.Parser): spec.dag_hash()[:len(self.token.value)] == self.token.value] if not matches: - tty.die("%s does not match any installed packages." %self.token.value) + tty.die("%s does not match any installed packages." % + self.token.value) if len(matches) != 1: - raise AmbiguousHashError("Multiple packages specify hash %s." % self.token.value, *matches) + raise AmbiguousHashError( + "Multiple packages specify hash %s." % self.token.value, + *matches) return matches[0] - - def spec(self, name, check_valid_token = False): + def spec(self, name, check_valid_token=False): """Parse a spec out of the input. If a spec is supplied, then initialize and return it instead of creating a new one.""" if name: @@ -2130,8 +2104,6 @@ class SpecParser(spack.parse.Parser): spec_namespace = None spec_name = None - - # This will init the spec without calling __init__. spec = Spec.__new__(Spec) spec.name = spec_name @@ -2141,7 +2113,7 @@ class SpecParser(spack.parse.Parser): spec.compiler = None spec.external = None spec.compiler_flags = FlagMap(spec) - spec.dependents = DependencyMap() + spec.dependents = DependencyMap() spec.dependencies = DependencyMap() spec.namespace = spec_namespace spec._hash = None @@ -2159,7 +2131,8 @@ class SpecParser(spack.parse.Parser): else: self.expect(ID) if self.accept(EQ): - raise SpecParseError(spack.parse.ParseError("","","Expected dependency received anonymous spec")) + raise SpecParseError(spack.parse.ParseError( + "", "", "Expected dependency received anonymous spec")) spec.add_dependency(self.spec(self.token.value)) while self.next: @@ -2175,7 +2148,7 @@ class SpecParser(spack.parse.Parser): check_valid_token = False elif self.accept(OFF): - spec._add_variant(self.variant(),False) + spec._add_variant(self.variant(), False) check_valid_token = False elif self.accept(PCT): @@ -2205,9 +2178,8 @@ class SpecParser(spack.parse.Parser): return spec - - def variant(self,name=None): - #TODO: Make generalized variants possible + def variant(self, name=None): + # TODO: Make generalized variants possible if name: return name else: @@ -2216,11 +2188,11 @@ class SpecParser(spack.parse.Parser): return self.token.value def architecture(self): - #TODO: Make this work properly as a subcase of variant (includes adding names to grammar) + # TODO: Make this work properly as a subcase of variant (includes + # adding names to grammar) self.expect(ID) return self.token.value - def version(self): start = None end = None @@ -2237,11 +2209,12 @@ class SpecParser(spack.parse.Parser): # No colon and no id: invalid version. self.next_token_error("Invalid version specifier") - if start: start = Version(start) - if end: end = Version(end) + if start: + start = Version(start) + if end: + end = Version(end) return VersionRange(start, end) - def version_list(self): vlist = [] vlist.append(self.version()) @@ -2249,7 +2222,6 @@ class SpecParser(spack.parse.Parser): vlist.append(self.version()) return vlist - def compiler(self): self.expect(ID) self.check_identifier() @@ -2265,7 +2237,6 @@ class SpecParser(spack.parse.Parser): compiler.versions = VersionList(':') return compiler - def check_identifier(self, id=None): """The only identifiers that can contain '.' are versions, but version ids are context-sensitive so we have to check on a case-by-case @@ -2299,10 +2270,15 @@ def parse_anonymous_spec(spec_like, pkg_name): try: anon_spec = Spec(spec_like) if anon_spec.name != pkg_name: - raise SpecParseError(spack.parse.ParseError("","","Expected anonymous spec for package %s but found spec for package %s" % (pkg_name, anon_spec.name) )) + raise SpecParseError(spack.parse.ParseError( + "", + "", + "Expected anonymous spec for package %s but found spec for" + "package %s" % (pkg_name, anon_spec.name))) except SpecParseError: - anon_spec = Spec(pkg_name + ' ' + spec_like) - if anon_spec.name != pkg_name: raise ValueError( + anon_spec = Spec(pkg_name + ' ' + spec_like) + if anon_spec.name != pkg_name: + raise ValueError( "Invalid spec for package %s: %s" % (pkg_name, spec_like)) else: anon_spec = spec_like.copy() @@ -2315,13 +2291,17 @@ def parse_anonymous_spec(spec_like, pkg_name): class SpecError(spack.error.SpackError): + """Superclass for all errors that occur while constructing specs.""" + def __init__(self, message): super(SpecError, self).__init__(message) class SpecParseError(SpecError): + """Wrapper for ParseError for when we're parsing specs.""" + def __init__(self, parse_error): super(SpecParseError, self).__init__(parse_error.message) self.string = parse_error.string @@ -2329,61 +2309,79 @@ class SpecParseError(SpecError): class DuplicateDependencyError(SpecError): + """Raised when the same dependency occurs in a spec twice.""" + def __init__(self, message): super(DuplicateDependencyError, self).__init__(message) class DuplicateVariantError(SpecError): + """Raised when the same variant occurs in a spec twice.""" + def __init__(self, message): super(DuplicateVariantError, self).__init__(message) class DuplicateCompilerSpecError(SpecError): + """Raised when the same compiler occurs in a spec twice.""" + def __init__(self, message): super(DuplicateCompilerSpecError, self).__init__(message) class UnsupportedCompilerError(SpecError): + """Raised when the user asks for a compiler spack doesn't know about.""" + def __init__(self, compiler_name): super(UnsupportedCompilerError, self).__init__( "The '%s' compiler is not yet supported." % compiler_name) class UnknownVariantError(SpecError): + """Raised when the same variant occurs in a spec twice.""" + def __init__(self, pkg, variant): super(UnknownVariantError, self).__init__( "Package %s has no variant %s!" % (pkg, variant)) class DuplicateArchitectureError(SpecError): + """Raised when the same architecture occurs in a spec twice.""" + def __init__(self, message): super(DuplicateArchitectureError, self).__init__(message) class InconsistentSpecError(SpecError): + """Raised when two nodes in the same spec DAG have inconsistent constraints.""" + def __init__(self, message): super(InconsistentSpecError, self).__init__(message) class InvalidDependencyException(SpecError): + """Raised when a dependency in a spec is not actually a dependency of the package.""" + def __init__(self, message): super(InvalidDependencyException, self).__init__(message) class NoProviderError(SpecError): + """Raised when there is no package that provides a particular virtual dependency. """ + def __init__(self, vpkg): super(NoProviderError, self).__init__( "No providers found for virtual package: '%s'" % vpkg) @@ -2391,9 +2389,11 @@ class NoProviderError(SpecError): class MultipleProviderError(SpecError): + """Raised when there is no package that provides a particular virtual dependency. """ + def __init__(self, vpkg, providers): """Takes the name of the vpkg""" super(MultipleProviderError, self).__init__( @@ -2402,9 +2402,12 @@ class MultipleProviderError(SpecError): self.vpkg = vpkg self.providers = providers + class UnsatisfiableSpecError(SpecError): + """Raised when a spec conflicts with package constraints. Provide the requirement that was violated when raising.""" + def __init__(self, provided, required, constraint_type): super(UnsatisfiableSpecError, self).__init__( "%s does not satisfy %s" % (provided, required)) @@ -2414,69 +2417,95 @@ class UnsatisfiableSpecError(SpecError): class UnsatisfiableSpecNameError(UnsatisfiableSpecError): + """Raised when two specs aren't even for the same package.""" + def __init__(self, provided, required): super(UnsatisfiableSpecNameError, self).__init__( provided, required, "name") class UnsatisfiableVersionSpecError(UnsatisfiableSpecError): + """Raised when a spec version conflicts with package constraints.""" + def __init__(self, provided, required): super(UnsatisfiableVersionSpecError, self).__init__( provided, required, "version") class UnsatisfiableCompilerSpecError(UnsatisfiableSpecError): + """Raised when a spec comiler conflicts with package constraints.""" + def __init__(self, provided, required): super(UnsatisfiableCompilerSpecError, self).__init__( provided, required, "compiler") class UnsatisfiableVariantSpecError(UnsatisfiableSpecError): + """Raised when a spec variant conflicts with package constraints.""" + def __init__(self, provided, required): super(UnsatisfiableVariantSpecError, self).__init__( provided, required, "variant") + class UnsatisfiableCompilerFlagSpecError(UnsatisfiableSpecError): + """Raised when a spec variant conflicts with package constraints.""" + def __init__(self, provided, required): super(UnsatisfiableCompilerFlagSpecError, self).__init__( provided, required, "compiler_flags") + class UnsatisfiableArchitectureSpecError(UnsatisfiableSpecError): + """Raised when a spec architecture conflicts with package constraints.""" + def __init__(self, provided, required): super(UnsatisfiableArchitectureSpecError, self).__init__( provided, required, "architecture") class UnsatisfiableProviderSpecError(UnsatisfiableSpecError): + """Raised when a provider is supplied but constraints don't match a vpkg requirement""" + def __init__(self, provided, required): super(UnsatisfiableProviderSpecError, self).__init__( provided, required, "provider") # TODO: get rid of this and be more specific about particular incompatible # dep constraints + + class UnsatisfiableDependencySpecError(UnsatisfiableSpecError): + """Raised when some dependency of constrained specs are incompatible""" + def __init__(self, provided, required): super(UnsatisfiableDependencySpecError, self).__init__( provided, required, "dependency") + class SpackYAMLError(spack.error.SpackError): + def __init__(self, msg, yaml_error): super(SpackYAMLError, self).__init__(msg, str(yaml_error)) + class SpackRecordError(spack.error.SpackError): + def __init__(self, msg): super(SpackRecordError, self).__init__(msg) + class AmbiguousHashError(SpecError): + def __init__(self, msg, *specs): super(AmbiguousHashError, self).__init__(msg) for spec in specs: diff --git a/var/spack/repos/builtin/packages/py-autopep8/package.py b/var/spack/repos/builtin/packages/py-autopep8/package.py new file mode 100644 index 0000000000..f2fd3cd683 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-autopep8/package.py @@ -0,0 +1,16 @@ +from spack import * + +class PyAutopep8(Package): + """Automatic pep8 formatter""" + homepage = "https://github.com/hhatto/autopep8" + url = "https://github.com/hhatto/autopep8/archive/ver1.2.2.tar.gz" + + version('1.2.2', 'def3d023fc9dfd1b7113602e965ad8e1') + + extends('python') + depends_on('py-setuptools') + depends_on('py-pep8') + + 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 new file mode 100644 index 0000000000..987783b392 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pep8/package.py @@ -0,0 +1,15 @@ +from spack import * + +class PyPep8(Package): + """python pep8 format checker""" + homepage = "https://github.com/PyCQA/pycodestyle" + url = "https://github.com/PyCQA/pycodestyle/archive/1.7.0.tar.gz" + + version('1.7.0', '31070a3a6391928893cbf5fa523eb8d9') + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) + -- cgit v1.2.3-70-g09d2 From a1f8cc2817a27695092f9e0c81c5e9382818d9cd Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 18 May 2016 14:24:16 -0700 Subject: peren-nesting fix in spec --- lib/spack/spack/spec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 2bf4522687..2cfcb7f341 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -555,8 +555,8 @@ class Spec(object): # @property def fullname(self): - return '%s.%s' % ((self.namespace, self.name) if self.namespace else - (self.name if self.name else '')) + return (('%s.%s' % (self.namespace, self.name)) if self.namespace else + (self.name if self.name else '')) @property def root(self): -- cgit v1.2.3-70-g09d2 From 80310a3b7c09c8b59b3414b0c20aed6c36620675 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 18 May 2016 16:50:50 -0700 Subject: Finished merge on these files --- lib/spack/env/cc | 44 +++++++++---------- lib/spack/spack/compilers/pgi.py | 13 +++--- lib/spack/spack/config.py | 46 +++++++++++-------- lib/spack/spack/spec.py | 95 ++++++++++++++++++++-------------------- 4 files changed, 104 insertions(+), 94 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 9758b74f37..1e405ae6e9 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -174,6 +174,28 @@ if [[ -z $command ]]; then die "ERROR: Compiler '$SPACK_COMPILER_SPEC' does not support compiling $language programs." fi +# +# Filter '.' and Spack environment directories out of PATH so that +# this script doesn't just call itself +# +IFS=':' read -ra env_path <<< "$PATH" +IFS=':' read -ra spack_env_dirs <<< "$SPACK_ENV_PATH" +spack_env_dirs+=("" ".") +PATH="" +for dir in "${env_path[@]}"; do + addpath=true + for env_dir in "${spack_env_dirs[@]}"; do + if [[ $dir == $env_dir ]]; then + addpath=false + break + fi + done + if $addpath; then + PATH="${PATH:+$PATH:}$dir" + fi +done +export PATH + if [[ $mode == vcheck ]]; then exec ${command} "$@" fi @@ -286,28 +308,6 @@ unset LD_LIBRARY_PATH unset LD_RUN_PATH unset DYLD_LIBRARY_PATH -# -# Filter '.' and Spack environment directories out of PATH so that -# this script doesn't just call itself -# -IFS=':' read -ra env_path <<< "$PATH" -IFS=':' read -ra spack_env_dirs <<< "$SPACK_ENV_PATH" -spack_env_dirs+=("" ".") -PATH="" -for dir in "${env_path[@]}"; do - addpath=true - for env_dir in "${spack_env_dirs[@]}"; do - if [[ $dir == $env_dir ]]; then - addpath=false - break - fi - done - if $addpath; then - PATH="${PATH:+$PATH:}$dir" - fi -done -export PATH - full_command=("$command" "${args[@]}") # In test command mode, write out full command for Spack tests. diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py index d3fad15b0c..6d36d8bfa6 100644 --- a/lib/spack/spack/compilers/pgi.py +++ b/lib/spack/spack/compilers/pgi.py @@ -44,7 +44,12 @@ class Pgi(Compiler): 'f77' : 'pgi/pgfortran', 'fc' : 'pgi/pgfortran' } -#ifdef NEW + + + PrgEnv = 'PrgEnv-pgi' + PrgEnv_compiler = 'pgi' + + @property def openmp_flag(self): return "-mp" @@ -53,12 +58,6 @@ class Pgi(Compiler): def cxx11_flag(self): return "-std=c++11" - -#else /* not NEW */ - PrgEnv = 'PrgEnv-pgi' - PrgEnv_compiler = 'pgi' - -#endif /* not NEW */ @classmethod def default_version(cls, comp): """The '-V' option works for all the PGI compilers. diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 3d6c175c7c..ec04c81787 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -167,6 +167,18 @@ section_schemas = { 'f77': { 'anyOf': [ {'type' : 'string' }, {'type' : 'null' }]}, 'fc': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'cflags': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'cxxflags': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'fflags': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'cppflags': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'ldflags': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'ldlibs': { 'anyOf': [ {'type' : 'string' }, {'type' : 'null' }]}}}, 'spec': { 'type': 'string'},#r'\w[\w-]*@\w[\w-]*' 'operating_system': { @@ -234,15 +246,11 @@ section_schemas = { 'items' : { 'type' : 'string' } }, #compiler specs 'buildable': { 'type': 'boolean', -#ifdef NEW 'default': True, -#else /* not NEW */ - 'default': False, }, - 'module': { - 'anyOf' : [{'type': 'string'}, - {'type': 'null'}] -#endif /* not NEW */ + 'modules': { + 'type' : 'object', + 'default' : {}, }, 'providers': { 'type': 'object', @@ -687,7 +695,8 @@ def spec_externals(spec): external_specs = [] pkg_paths = allpkgs.get(name, {}).get('paths', None) - if not pkg_paths: + pkg_modules = allpkgs.get(name, {}).get('modules', None) + if (not pkg_paths) and (not pkg_modules): return [] for external_spec, path in pkg_paths.iteritems(): @@ -695,20 +704,21 @@ def spec_externals(spec): # skip entries without paths (avoid creating extra Specs) continue -#ifdef NEW external_spec = spack.spec.Spec(external_spec, external=path) if external_spec.satisfies(spec): external_specs.append(external_spec) + + for external_spec, module in pkg_modules.iteritems(): + if not module: + continue + + path = get_path_from_module(module) + + external_spec = spack.spec.Spec(external_spec, external=path, external_module=module) + if external_spec.satisfies(spec): + external_specs.append(external_spec) + return external_specs -#else /* not NEW */ - module = allpkgs.get(pkg, {}).get('module', None) - if not path: - if not module: - continue - path = get_path_from_module(module) - spec_locations.append( (spack.spec.Spec(pkg), path, module) ) - return spec_locations -#endif /* not NEW */ def is_spec_buildable(spec): diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index f71d56435e..e61ffc0912 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -497,14 +497,10 @@ class Spec(object): # package.py files for. self._normal = kwargs.get('normal', False) self._concrete = kwargs.get('concrete', False) -#ifdef NEW # Allow a spec to be constructed with an external path. self.external = kwargs.get('external', None) -#else /* not NEW */ - self.external = None - self.external_module = None -#endif /* not NEW */ + self.external_module = kwargs.get('external_module', None) # This allows users to construct a spec DAG with literals. # Note that given two specs a and b, Spec(a) copies a, but @@ -538,8 +534,10 @@ class Spec(object): Known flags currently include "arch" """ valid_flags = FlagMap.valid_compiler_flags() - if name == 'arch': - self._set_architecture(value) + if name == 'os' or name == 'operating_system': + self._set_os(value) + elif name == 'target': + self._set_target(value) elif name in valid_flags: assert(self.compiler_flags is not None) self.compiler_flags[name] = value.split() @@ -553,12 +551,13 @@ class Spec(object): self.compiler = compiler - def _set_architecture(self, architecture): - """Called by the parser to set the architecture.""" - if self.architecture: raise DuplicateArchitectureError( - "Spec for '%s' cannot have two architectures." % self.name) - self.architecture = architecture + def _set_os(self, value): + """Called by the parser to set the architecture operating system""" + self.architecture.platform_os = self.architecture.platform.operating_system(value) + def _set_target(self, value): + """Called by the parser to set the architecture target""" + self.architecture.target = self.architecture.platform.target(value) def _add_dependency(self, spec): """Called by the parser to add another spec as a dependency.""" @@ -793,9 +792,9 @@ class Spec(object): if self.architecture: # TODO: Fix the target.to_dict to account for the tuple # Want it to be a dict of dicts - d['architecture'] = self.architecture.to_dict() + d['arch'] = self.architecture.to_dict() else: - d['architecture'] = None + d['arch'] = None if self.compiler: d.update(self.compiler.to_dict()) @@ -824,17 +823,12 @@ class Spec(object): spec = Spec(name) spec.namespace = node.get('namespace', None) spec.versions = VersionList.from_dict(node) -#ifdef NEW - spec.architecture = node['arch'] if 'hash' in node: spec._hash = node['hash'] -#else /* not NEW */ - # TODO: Need to fix the architecture.Target.from_dict - spec.architecture = spack.architecture.arch_from_dict(node['architecture']) + spec.architecture = spack.architecture.arch_from_dict(node['arch']) -#endif /* not NEW */ if node['compiler'] is None: spec.compiler = None else: @@ -1423,9 +1417,19 @@ class Spec(object): # TODO: Check out the logic here if self.architecture is not None and other.architecture is not None: - if self.architecture != other.architecture: - raise UnsatisfiableArchitectureSpecError(self.architecture, - other.architecture) + if self.architecture.platform is not None and other.architecture.platform is not None: + if self.architecture.platform != other.architecture.platform: + raise UnsatisfiableArchitectureSpecError(self.architecture, + other.architecture) + if self.architecture.platform_os is not None and other.architecture.platform_os is not None: + if self.architecture.platform_os != other.architecture.platform_os: + raise UnsatisfiableArchitectureSpecError(self.architecture, + other.architecture) + if self.architecture.target is not None and other.architecture.target is not None: + if self.architecture.target != other.architecture.target: + raise UnsatisfiableArchitectureSpecError(self.architecture, + other.architecture) + changed = False if self.compiler is not None and other.compiler is not None: @@ -1440,7 +1444,14 @@ class Spec(object): changed |= self.compiler_flags.constrain(other.compiler_flags) old = self.architecture - self.architecture = self.architecture or other.architecture + if self.architecture is None or other.architecture is None: + self.architecture = self.architecture or other.architecture + elif self.architecture.platform is None or other.architecture.platform is None: + self.architecture.platform = self.architecture.platform or other.architecture.platform + elif self.architecture.platform_os is None of other.architecture.platform_os is None: + self.architecture.platform_os = self.architecture.platform_os or other.architecture.platform_os + elif self.architecture.target is None or other.architecture.target is None: + self.architecture.target = self.architecture.target or other.architecture.target changed |= (self.architecture != old) if deps: @@ -1572,16 +1583,18 @@ class Spec(object): # Architecture satisfaction is currently just string equality. # If not strict, None means unconstrained. - if isinstance(self.architecture, basestring): - self.add_architecture_from_string(self.architecture) - if isinstance(other.architecture, basestring): - other.add_architecture_from_string(other.architecture) + # TODO: Need to make sure that comparisons can be made via classes if self.architecture and other.architecture: - if self.architecture != other.architecture: + if ((self.architecture.platform and other.architecture.platform and self.architecture.platform != other.architecture.platform) or + (self.architecture.platform_os and other.architecture.platform_os and self.architecture.platform_os != other.architecture.platform_os) or + (self.architecture.target and other.architecture.target and self.architecture.target != other.architecture.target)): return False - elif strict and (other.architecture and not self.architecture): + elif strict and ((other.architecture and not self.architecture) or + (other.architecture.platform and not self.architecture.platform) or + (other.architecture.platform_os and not self.architecture.platform_os) or + (other.architecture.target and not self.architecture.target)): return False if not self.compiler_flags.satisfies(other.compiler_flags, strict=strict): @@ -1663,7 +1676,7 @@ class Spec(object): self.architecture != other.architecture and self.compiler != other.compiler and \ self.variants != other.variants and self._normal != other._normal and \ self.concrete != other.concrete and self.external != other.external and \ - self.external_module != other.external_module) + self.external_module != other.external_module and self.compiler_flags != other.compiler_flags) # Local node attributes get copied first. self.name = other.name @@ -1677,12 +1690,9 @@ class Spec(object): self.variants = other.variants.copy() self.variants.spec = self self.external = other.external + self.external_module = other.external_module self.namespace = other.namespace -#ifdef NEW self._hash = other._hash -#else /* not NEW */ - self.external_module = other.external_module -#endif /* not NEW */ # If we copy dependencies, preserve DAG structure in the new spec if kwargs.get('deps', True): @@ -1983,7 +1993,7 @@ class Spec(object): write(fmt % str(self.variants), '+') elif named_str == 'ARCHITECTURE': if self.architecture: - write(fmt % str(self.architecture), '=') + write(fmt % str(self.architecture), ' arch=') elif named_str == 'SHA1': if self.dependencies: out.write(fmt % str(self.dag_hash(7))) @@ -2202,14 +2212,11 @@ class SpecParser(spack.parse.Parser): spec.name = spec_name spec.versions = VersionList() spec.variants = VariantMap(spec) - spec.architecture = None + spec.architecture = spack.architecture.Arch() spec.compiler = None spec.external = None -#ifdef NEW - spec.compiler_flags = FlagMap(spec) -#else /* not NEW */ spec.external_module = None -#endif /* not NEW */ + spec.compiler_flags = FlagMap(spec) spec.dependents = DependencyMap() spec.dependencies = DependencyMap() spec.namespace = spec_namespace @@ -2284,12 +2291,6 @@ class SpecParser(spack.parse.Parser): self.check_identifier() return self.token.value - def architecture(self): - #TODO: Make this work properly as a subcase of variant (includes adding names to grammar) - self.expect(ID) - return self.token.value - - def version(self): start = None end = None -- cgit v1.2.3-70-g09d2 From faa0f2a13c01a9f279d59912cff5d00c499cb990 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 18 May 2016 17:01:59 -0700 Subject: got rid of ifdef --- lib/spack/spack/cmd/find.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index c768faea91..8b91f45cfd 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -239,8 +239,5 @@ def find(parser, args): mode=args.mode, long=args.long, very_long=args.very_long, -#ifdef NEW show_flags=args.show_flags) -#else /* not NEW */ namespace=args.namespace) -#endif /* not NEW */ -- cgit v1.2.3-70-g09d2 From 9f8ff32bcce99c8a188f285e235e9c32ee245f97 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 18 May 2016 17:05:11 -0700 Subject: Got rid of ifdefs, changed parameters for Compiler: added kwargs --- lib/spack/spack/compiler.py | 65 +++++++++++---------------------------------- 1 file changed, 15 insertions(+), 50 deletions(-) diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py index dfae72010a..ce4555bc56 100644 --- a/lib/spack/spack/compiler.py +++ b/lib/spack/spack/compiler.py @@ -101,7 +101,6 @@ class Compiler(object): def cxx_rpath_arg(self): return '-Wl,-rpath,' -#ifdef NEW @property def f77_rpath_arg(self): return '-Wl,-rpath,' @@ -109,32 +108,32 @@ class Compiler(object): @property def fc_rpath_arg(self): return '-Wl,-rpath,' -#else /* not NEW */ # Cray PrgEnv name that can be used to load this compiler PrgEnv = None - # Name of module used to switch versions of this compiler PrgEnv_compiler = None -#endif /* not NEW */ - -#ifdef NEW - - def __init__(self, cspec, cc, cxx, f77, fc, **kwargs): -#else /* not NEW */ - def __init__(self, cspec, operating_system, paths, modules=[], alias=None): -#endif /* not NEW */ + def __init__(self, cspec, operating_system, + paths, modules=[], alias=None, **kwargs): def check(exe): if exe is None: return None _verify_executables(exe) return exe -#ifdef NEW - self.cc = check(cc) - self.cxx = check(cxx) - self.f77 = check(f77) - self.fc = check(fc) + self.cc = check(paths[0]) + self.cxx = check(paths[1]) + if len(paths) > 2: + self.f77 = check(paths[2]) + if len(paths) == 3: + self.fc = self.f77 + else: + self.fc = check(paths[3]) + + #self.cc = check(cc) + #self.cxx = check(cxx) + #self.f77 = check(f77) + #self.fc = check(fc) # Unfortunately have to make sure these params are accepted # in the same order they are returned by sorted(flags) @@ -145,19 +144,7 @@ class Compiler(object): if value is not None: self.flags[flag] = value.split() -#else /* not NEW */ self.operating_system = operating_system - - self.cc = check(paths[0]) - self.cxx = check(paths[1]) - if len(paths) > 2: - self.f77 = check(paths[2]) - if len(paths) == 3: - self.fc = self.f77 - else: - self.fc = check(paths[3]) - -#endif /* not NEW */ self.spec = cspec self.modules = modules self.alias = alias @@ -287,28 +274,6 @@ class Compiler(object): successful.reverse() return dict(((v, p, s), path) for v, p, s, path in successful) - @classmethod - def default_version(cls, cc): - """Override just this to override all compiler version functions.""" - return dumpversion(cc) - - @classmethod - def cc_version(cls, cc): - return cls.default_version(cc) - - @classmethod - def cxx_version(cls, cxx): - return cls.default_version(cxx) - - @classmethod - def f77_version(cls, f77): - return cls.default_version(f77) - - @classmethod - def fc_version(cls, fc): - return cls.default_version(fc) - - def __repr__(self): """Return a string representation of the compiler toolchain.""" return self.__str__() -- cgit v1.2.3-70-g09d2 From b4b794223065b3301da9f89eab536bf8d162c150 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 18 May 2016 17:07:23 -0700 Subject: Moved searching of flags into get compilers in compilers_for_spec --- lib/spack/spack/compilers/__init__.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 000ef2058e..3432c142bf 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -254,17 +254,18 @@ def compilers_for_spec(compiler_spec, scope=None): else: operating_system = None - compilers.append(cls(cspec, operating_system, compiler_paths, mods, alias)) - -#ifdef NEW - flags = {} - for f in spack.spec.FlagMap.valid_compiler_flags(): - if f in items: - flags[f] = items[f] - return cls(cspec, *compiler_paths, **flags) -#else /* not NEW */ - return compilers -#endif /* not NEW */ + flags = {} + for f in spack.spec.FlagMap.valid_compiler_flags(): + if f in items: + flags[f] = items[f] + + compilers.append(cls(cspec, operating_system, compiler_paths, mods, alias, **flags)) + +##ifdef NEW +# return cls(cspec, *compiler_paths, **flags) +##else /* not NEW */ +# return compilers +##endif /* not NEW */ matches = set(find(compiler_spec, scope)) compilers = [] -- cgit v1.2.3-70-g09d2 From deb5011d08467c0a19b52e5ee9fefa3fb0854b89 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 18 May 2016 17:14:16 -0700 Subject: more merge work --- lib/spack/spack/build_environment.py | 23 ++++++++--------------- lib/spack/spack/spec.py | 10 ++++++++++ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 4974cc1e76..7aeea5c672 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -213,13 +213,12 @@ def set_compiler_environment_variables(pkg): if flags[flag] != []: env.set('SPACK_' + flag.upper(), ' '.join(f for f in flags[flag])) -#ifdef NEW env.set('SPACK_COMPILER_SPEC', str(pkg.spec.compiler)) - return env -#else /* not NEW */ + for mod in compiler.modules: load_module(mod) -#endif /* not NEW */ + + return env def set_build_environment_variables(pkg, env): @@ -283,16 +282,13 @@ def set_build_environment_variables(pkg, env): pcdir = join_path(p, maybe, 'pkgconfig') if os.path.isdir(pcdir): pkg_config_dirs.append(pcdir) -#ifdef NEW - env.set_path('PKG_CONFIG_PATH', pkg_config_dirs) - return env -#else /* not NEW */ - path_put_first("PKG_CONFIG_PATH", pkg_config_dirs) + env.prepend_path('PKG_CONFIG_PATH', pkg_config_dirs) if pkg.spec.architecture.target.module_name: load_module(pkg.spec.architecture.target.module_name) -#endif /* not NEW */ + + return env def set_module_variables_for_package(pkg, module): @@ -368,16 +364,13 @@ def set_module_variables_for_package(pkg, module): def get_rpaths(pkg): """Get a list of all the rpaths for a package.""" - for spec in pkg.spec.traverse(root=False): - if spec.external_module: - load_module(spec.external_module) - spec.external = get_path_from_module(spec.external_module) - rpaths = [pkg.prefix.lib, pkg.prefix.lib64] rpaths.extend(d.prefix.lib for d in pkg.spec.dependencies.values() if os.path.isdir(d.prefix.lib)) rpaths.extend(d.prefix.lib64 for d in pkg.spec.dependencies.values() if os.path.isdir(d.prefix.lib64)) + for mod in pkg.spec.compiler.modules: + rpaths.append(get_path_for_module(mod)) return rpaths diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index e61ffc0912..9d217d17ca 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -120,6 +120,7 @@ from spack.version import * from spack.util.string import * from spack.util.prefix import Prefix from spack.virtual import ProviderIndex +from spack.build_environment import get_path_from_module, load_module # Valid pattern for an identifier in Spack identifier_re = r'\w[\w-]*' @@ -1085,6 +1086,15 @@ class Spec(object): if s.namespace is None: s.namespace = spack.repo.repo_for_pkg(s.name).namespace + + for s in self.traverse(root=False): + if spec.external_module: + compiler = spack.compilers.compiler_for_spec(spec.compiler, spec.architecture.platform_os) + for mod in compiler.modules: + load_module(mod) + + spec.external = get_path_from_module(spec.external_module) + # Mark everything in the spec as concrete, as well. self._mark_concrete() -- cgit v1.2.3-70-g09d2 From b1e5eafb80c8cd87f4d496fe7fdb7a74a77da603 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 18 May 2016 17:18:26 -0700 Subject: more merge work --- lib/spack/spack/test/config.py | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index 7d71cc1c7f..8fffc09437 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -142,19 +142,6 @@ class ConfigTest(MockPackagesTest): """Check that named compilers in comps match Spack's config.""" config = spack.config.get_config('compilers') compiler_list = ['cc', 'cxx', 'f77', 'fc'] -#ifdef NEW - for key in compiler_names: - for c in compiler_list: - expected = comps[arch][key][c] - actual = config[arch][key][c] - self.assertEqual(expected, actual) - - def test_write_list_in_memory(self): - spack.config.update_config('repos', repos_low, 'test_low_priority') - spack.config.update_config('repos', repos_high, 'test_high_priority') - config = spack.config.get_config('repos') - self.assertEqual(config, repos_high+repos_low) -#else /* not NEW */ param_list = ['modules', 'paths', 'spec', 'operating_system'] for alias, compiler in config.items(): if compiler['spec'] in compiler_names: @@ -166,7 +153,12 @@ class ConfigTest(MockPackagesTest): expected = comps[alias]['paths'][c] actual = config[alias]['paths'][c] self.assertEqual(expected, actual) -#endif /* not NEW */ + + def test_write_list_in_memory(self): + spack.config.update_config('repos', repos_low, 'test_low_priority') + spack.config.update_config('repos', repos_high, 'test_high_priority') + config = spack.config.get_config('repos') + self.assertEqual(config, repos_high+repos_low) def test_write_key_in_memory(self): # Write b_comps "on top of" a_comps. @@ -187,9 +179,8 @@ class ConfigTest(MockPackagesTest): spack.config.clear_config_caches() # Same check again, to ensure consistency. -#ifdef NEW - self.check_config(a_comps, 'x86_64_E5v2_IntelIB', 'gcc@4.7.3', 'gcc@4.5.0') - self.check_config(b_comps, 'x86_64_E5v3', 'icc@10.0', 'icc@11.1', 'clang@3.3') + self.check_config(a_comps, 'gcc@4.7.3', 'gcc@4.5.0') + self.check_config(b_comps, 'icc@10.0', 'icc@11.1', 'clang@3.3') def test_write_to_same_priority_file(self): # Write b_comps in the same file as a_comps. @@ -200,9 +191,5 @@ class ConfigTest(MockPackagesTest): spack.config.clear_config_caches() # Same check again, to ensure consistency. - self.check_config(a_comps, 'x86_64_E5v2_IntelIB', 'gcc@4.7.3', 'gcc@4.5.0') - self.check_config(b_comps, 'x86_64_E5v3', 'icc@10.0', 'icc@11.1', 'clang@3.3') -#else /* not NEW */ self.check_config(a_comps, 'gcc@4.7.3', 'gcc@4.5.0') self.check_config(b_comps, 'icc@10.0', 'icc@11.1', 'clang@3.3') -#endif /* not NEW */ -- cgit v1.2.3-70-g09d2 From 5417f1cdc676ab6c244cce1f3594a9620ba24b16 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 18 May 2016 17:21:03 -0700 Subject: more merge work --- lib/spack/spack/test/__init__.py | 40 ++----------------------------------- lib/spack/spack/test/multimethod.py | 22 ++------------------ 2 files changed, 4 insertions(+), 58 deletions(-) diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index cac7c2f058..480e6290e7 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -31,8 +31,8 @@ from llnl.util.filesystem import join_path from llnl.util.tty.colify import colify from spack.test.tally_plugin import Tally """Names of tests to be included in Spack's test suite""" -#ifdef NEW -test_names = ['versions', 'url_parse', 'url_substitution', 'packages', 'stage', + +test_names = ['architecture', 'versions', 'url_parse', 'url_substitution', 'packages', 'stage', 'spec_syntax', 'spec_semantics', 'spec_dag', 'concretize', 'multimethod', 'install', 'package_sanity', 'config', 'directory_layout', 'pattern', 'python_version', 'git_fetch', @@ -41,42 +41,6 @@ test_names = ['versions', 'url_parse', 'url_substitution', 'packages', 'stage', 'make_executable', 'configure_guess', 'lock', 'database', 'namespace_trie', 'yaml', 'sbang', 'environment', 'cmd.uninstall', 'cmd.test_install'] -#else /* not NEW */ -test_names = ['architecture', - 'versions', - 'url_parse', - 'url_substitution', - 'packages', - 'stage', - 'spec_syntax', - 'spec_semantics', - 'spec_dag', - 'concretize', - 'multimethod', - 'install', - 'package_sanity', - 'config', - 'directory_layout', - 'pattern', - 'python_version', - 'git_fetch', - 'svn_fetch', - 'hg_fetch', - 'mirror', - 'url_extrapolate', - 'cc', - 'link_tree', - 'spec_yaml', - 'optional_deps', - 'make_executable', - 'configure_guess', - 'unit_install', - 'lock', - 'database', - 'namespace_trie', - 'yaml', - 'sbang'] -#endif /* not NEW */ def list_tests(): diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index 7636bd6c38..034e6b3923 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -92,36 +92,18 @@ class MultiMethodTest(MockPackagesTest): self.assertEqual(pkg.has_a_default(), 'default') -#ifdef NEW - def test_architecture_match(self): - pkg = spack.repo.get('multimethod arch=x86_64') - self.assertEqual(pkg.different_by_architecture(), 'x86_64') - - pkg = spack.repo.get('multimethod arch=ppc64') - self.assertEqual(pkg.different_by_architecture(), 'ppc64') - - pkg = spack.repo.get('multimethod arch=ppc32') - self.assertEqual(pkg.different_by_architecture(), 'ppc32') - - pkg = spack.repo.get('multimethod arch=arm64') - self.assertEqual(pkg.different_by_architecture(), 'arm64') - - pkg = spack.repo.get('multimethod arch=macos') - self.assertRaises(NoSuchMethodError, pkg.different_by_architecture) -#else /* not NEW */ def test_target_match(self): platform = spack.architecture.sys_type() targets = platform.targets.values() for target in targets[:-1]: - pkg = spack.repo.get('multimethod='+target.name) + pkg = spack.repo.get('multimethod target='+target.name) self.assertEqual(pkg.different_by_target(), target.name) - pkg = spack.repo.get('multimethod='+targets[-1].name) + pkg = spack.repo.get('multimethod target='+targets[-1].name) if len(targets) == 1: self.assertEqual(pkg.different_by_target(), targets[-1].name) else: self.assertRaises(NoSuchMethodError, pkg.different_by_target) -#endif /* not NEW */ def test_dependency_match(self): -- cgit v1.2.3-70-g09d2 From 6926f4d0da05ee2839e455af32d52098d9828be7 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 18 May 2016 17:23:10 -0700 Subject: Changed arch tests to new spec target= os= --- lib/spack/spack/test/spec_semantics.py | 109 +++++++++++++++------------------ 1 file changed, 50 insertions(+), 59 deletions(-) diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index b6c9d61293..8cdb91e206 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import unittest +import spack.architecture from spack.spec import * from spack.test.mock_packages_test import * @@ -138,23 +139,31 @@ class SpecSematicsTest(MockPackagesTest): self.check_unsatisfiable('foo %gcc@4.7', '%gcc@4.7.3') -#ifdef NEW def test_satisfies_architecture(self): - self.check_satisfies('foo arch=chaos_5_x86_64_ib', ' arch=chaos_5_x86_64_ib') - self.check_satisfies('foo arch=bgqos_0', ' arch=bgqos_0') + platform = self.architecture.sys_type() + if platform.name == 'crayxc': + self.check_satisfies('foo target=frontend os=frontend', 'target=frontend os=frontend') + self.check_satisfies('foo target=backend os=backend', 'target=backend', 'os=backend') + self.check_satisfies('foo target=default_target os=default_os','target=default_target os=default_os') - self.check_unsatisfiable('foo arch=bgqos_0', ' arch=chaos_5_x86_64_ib') - self.check_unsatisfiable('foo arch=chaos_5_x86_64_ib', ' arch=bgqos_0') -#else /* not NEW */ - def test_satisfies_target(self): - platform = spack.architecture.sys_type() - targets = platform.targets.values() - for target in targets: - self.check_satisfies('foo='+target.name, '='+target.name) -#endif /* not NEW */ - for i in range(1,len(targets)): - self.check_unsatisfiable('foo='+targets[i-1].name, '='+targets[i].name) +#ifdef NEW + #def test_satisfies_architecture(self): + # self.check_satisfies('foo arch=chaos_5_x86_64_ib', ' arch=chaos_5_x86_64_ib') + # self.check_satisfies('foo arch=bgqos_0', ' arch=bgqos_0') + + # self.check_unsatisfiable('foo arch=bgqos_0', ' arch=chaos_5_x86_64_ib') + # self.check_unsatisfiable('foo arch=chaos_5_x86_64_ib', ' arch=bgqos_0') +#els#e /* not NEW */ + #def test_satisfies_target(self): + # platform = spack.architecture.sys_type() + # targets = platform.targets.values() + # for target in targets: + # self.check_satisfies('foo='+target.name, '='+target.name) +#end#if /* not NEW */ + + # for i in range(1,len(targets)): + # self.check_unsatisfiable('foo='+targets[i-1].name, '='+targets[i].name) def test_satisfies_dependencies(self): self.check_satisfies('mpileaks^mpich', '^mpich') @@ -355,22 +364,29 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain('libelf+debug~foo', 'libelf+debug', 'libelf+debug~foo') -#ifdef NEW def test_constrain_compiler_flags(self): self.check_constrain('libelf cflags="-O3" cppflags="-Wall"', 'libelf cflags="-O3"', 'libelf cppflags="-Wall"') self.check_constrain('libelf cflags="-O3" cppflags="-Wall"', 'libelf cflags="-O3"', 'libelf cflags="-O3" cppflags="-Wall"') - def test_constrain_arch(self): - self.check_constrain('libelf arch=bgqos_0', 'libelf arch=bgqos_0', 'libelf arch=bgqos_0') - self.check_constrain('libelf arch=bgqos_0', 'libelf', 'libelf arch=bgqos_0') -#else /* not NEW */ - def test_constrain_target(self): - platform = spack.architecture.sys_type() - target = platform.target('default_target').name - self.check_constrain('libelf='+target, 'libelf='+target, 'libelf='+target) - self.check_constrain('libelf='+target, 'libelf', 'libelf='+target) -#endif /* not NEW */ + def test_constrain_architecture(self): + self.check_constrain('libelf target=default_target os=default_os', + 'libelf target=default_target os=default_os', + 'libelf target=default_target os=default_os') + self.check_constrain('libelf target=default_target os=default_os', + 'libelf', + 'libelf target=default_target os=default_os') + + #def test_constrain_arch(self): + # self.check_constrain('libelf arch=bgqos_0', 'libelf arch=bgqos_0', 'libelf arch=bgqos_0') + # self.check_constrain('libelf arch=bgqos_0', 'libelf', 'libelf arch=bgqos_0') +#els#e /* not NEW */ + #def test_constrain_target(self): + # platform = spack.architecture.sys_type() + # target = platform.target('default_target').name + # self.check_constrain('libelf='+target, 'libelf='+target, 'libelf='+target) + # self.check_constrain('libelf='+target, 'libelf', 'libelf='+target) +#end#if /* not NEW */ def test_constrain_compiler(self): @@ -384,20 +400,11 @@ class SpecSematicsTest(MockPackagesTest): self.check_invalid_constraint('libelf+debug', 'libelf~debug') self.check_invalid_constraint('libelf+debug~foo', 'libelf+debug+foo') -#ifdef NEW self.check_invalid_constraint('libelf debug=2', 'libelf debug=1') self.check_invalid_constraint('libelf cppflags="-O3"', 'libelf cppflags="-O2"') - - self.check_invalid_constraint('libelf arch=bgqos_0', 'libelf arch=x86_54') -#else /* not NEW */ - - platform = spack.architecture.sys_type() - targets = platform.targets.values() - if len(targets) > 1: - self.check_invalid_constraint('libelf='+targets[0].name, 'libelf='+targets[1].name) -#endif /* not NEW */ - + self.check_invalid_constraint('libelf target=default_target os=default_os', + 'libelf target=x86_64 os=ubuntu') def test_constrain_changed(self): self.check_constrain_changed('libelf', '@1.0') @@ -406,14 +413,13 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf%gcc', '%gcc@4.5') self.check_constrain_changed('libelf', '+debug') self.check_constrain_changed('libelf', '~debug') -#ifdef NEW self.check_constrain_changed('libelf', 'debug=2') self.check_constrain_changed('libelf', 'cppflags="-O3"') self.check_constrain_changed('libelf', ' arch=bgqos_0') -#else /* not NEW */ + platform = spack.architecture.sys_type() - self.check_constrain_changed('libelf', '='+platform.target('default_target').name) -#endif /* not NEW */ + self.check_constrain_changed('libelf', 'target='+platform.target('default_target').name) + self.check_constrain_changed('libelf', 'os='+platform.operating_system('default_os').name) def test_constrain_not_changed(self): @@ -424,17 +430,12 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf%gcc@4.5', '%gcc@4.5') self.check_constrain_not_changed('libelf+debug', '+debug') self.check_constrain_not_changed('libelf~debug', '~debug') -#ifdef NEW self.check_constrain_not_changed('libelf debug=2', 'debug=2') self.check_constrain_not_changed('libelf cppflags="-O3"', 'cppflags="-O3"') - self.check_constrain_not_changed('libelf arch=bgqos_0', ' arch=bgqos_0') -#else /* not NEW */ + platform = spack.architecture.sys_type() default_target = platform.target('default_target').name - self.check_constrain_not_changed('libelf='+default_target, '='+default_target) -#endif /* not NEW */ - self.check_constrain_not_changed('libelf^foo', 'libelf^foo') - self.check_constrain_not_changed('libelf^foo^bar', 'libelf^foo^bar') + self.check_constrain_not_changed('libelf target='+default_target, 'target='+default_target) def test_constrain_dependency_changed(self): @@ -444,14 +445,9 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf^foo%gcc', 'libelf^foo%gcc@4.5') self.check_constrain_changed('libelf^foo', 'libelf^foo+debug') self.check_constrain_changed('libelf^foo', 'libelf^foo~debug') -#ifdef NEW - self.check_constrain_changed('libelf^foo', 'libelf^foo cppflags="-O3"') - self.check_constrain_changed('libelf^foo', 'libelf^foo arch=bgqos_0') -#else /* not NEW */ platform = spack.architecture.sys_type() default_target = platform.target('default_target').name - self.check_constrain_changed('libelf^foo', 'libelf^foo='+default_target) -#endif /* not NEW */ + self.check_constrain_changed('libelf^foo', 'libelf^foo target='+default_target) def test_constrain_dependency_not_changed(self): @@ -461,13 +457,8 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf^foo%gcc@4.5', 'libelf^foo%gcc@4.5') self.check_constrain_not_changed('libelf^foo+debug', 'libelf^foo+debug') self.check_constrain_not_changed('libelf^foo~debug', 'libelf^foo~debug') -#ifdef NEW self.check_constrain_not_changed('libelf^foo cppflags="-O3"', 'libelf^foo cppflags="-O3"') - self.check_constrain_not_changed('libelf^foo arch=bgqos_0', 'libelf^foo arch=bgqos_0') -#else /* not NEW */ platform = spack.architecture.sys_type() default_target = platform.target('default_target').name - self.check_constrain_not_changed('libelf^foo='+default_target, 'libelf^foo='+default_target) - -#endif /* not NEW */ + self.check_constrain_not_changed('libelf^foo target='+default_target, 'libelf^foo target='+default_target) -- cgit v1.2.3-70-g09d2 From b25da51638c6c3abd97a1f77cc4feffd144a62d1 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 18 May 2016 17:26:06 -0700 Subject: Changed unsatisfiable architecture test --- lib/spack/spack/test/spec_dag.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index 3c005c4ead..99a986a528 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -29,6 +29,7 @@ You can find the dummy packages here:: spack/lib/spack/spack/test/mock_packages """ import spack +import spack.architecture import spack.package from llnl.util.lang import list_modules @@ -240,21 +241,12 @@ class SpecDagTest(MockPackagesTest): self.assertRaises(spack.spec.UnsatisfiableCompilerSpecError, spec.normalize) -#ifdef NEW def test_unsatisfiable_architecture(self): - self.set_pkg_dep('mpileaks', 'mpich arch=bgqos_0') - spec = Spec('mpileaks ^mpich arch=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf') - self.assertRaises(spack.spec.UnsatisfiableArchitectureSpecError, spec.normalize) -#else /* not NEW */ - def test_unsatisfiable_target(self): platform = spack.architecture.sys_type() - if len(platform.targets) > 1: - first = platform.targets.values()[0].name - second = platform.targets.values()[1].name - self.set_pkg_dep('mpileaks', 'mpich='+first) - spec = Spec('mpileaks ^mpich='+ second +' ^callpath ^dyninst ^libelf ^libdwarf') - self.assertRaises(spack.spec.UnsatisfiableTargetSpecError, spec.normalize) -#endif /* not NEW */ + + self.set_pkg_dep('mpileaks', 'mpich target=%s' % platform.target('default_target')) + spec = Spec('mpileaks ^mpich target=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf') + self.assertRaises(spack.spec.UnsatisfiableArchitectureSpecError, spec.normalize) def test_invalid_dep(self): -- cgit v1.2.3-70-g09d2 From 01d5ffcd87d4801874dc810fb8123447971b867d Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 18 May 2016 17:42:11 -0700 Subject: Fixed the first set of merge bugs --- lib/spack/spack/architecture.py | 8 ++++---- lib/spack/spack/cmd/find.py | 2 +- lib/spack/spack/compilers/__init__.py | 6 +----- lib/spack/spack/concretize.py | 11 ++++++----- lib/spack/spack/spec.py | 2 +- lib/spack/spack/test/architecture.py | 7 +++---- 6 files changed, 16 insertions(+), 20 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index d7f908cfb1..41778795c3 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -323,8 +323,8 @@ class Arch(object): target = self.target d['platform'] = self.platform.name - d['platform_os'] = self.platform_os.to_dict() - d['target'] = self.target.to_dict() + d['platform_os'] = self.platform_os.to_dict() if self.platform_os else None + d['target'] = self.target.to_dict() if self.target else None return d @@ -362,8 +362,8 @@ def arch_from_dict(d): os_dict = d['platform_os'] target_dict = d['target'] - target = _target_from_dict(target_dict) - platform_os = _operating_system_from_dict(os_dict) + target = _target_from_dict(target_dict) if os_dict else None + platform_os = _operating_system_from_dict(os_dict) if os_dict else None arch.target = target arch.platform_os = platform_os diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 8b91f45cfd..c2bba13dc8 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -239,5 +239,5 @@ def find(parser, args): mode=args.mode, long=args.long, very_long=args.very_long, - show_flags=args.show_flags) + show_flags=args.show_flags, namespace=args.namespace) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 3432c142bf..8fe7a17116 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -261,11 +261,7 @@ def compilers_for_spec(compiler_spec, scope=None): compilers.append(cls(cspec, operating_system, compiler_paths, mods, alias, **flags)) -##ifdef NEW -# return cls(cspec, *compiler_paths, **flags) -##else /* not NEW */ -# return compilers -##endif /* not NEW */ + return compilers matches = set(find(compiler_spec, scope)) compilers = [] diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 72b184dd8f..f38afd38dc 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -282,11 +282,8 @@ class DefaultConcretizer(object): return False #Find the another spec that has a compiler, or the root if none do -#ifdef NEW other_spec = spec if spec.compiler else find_spec(spec, lambda(x) : x.compiler) -#else /* not NEW */ - other_spec = find_spec(spec, lambda(x) : x.compiler) -#endif /* not NEW */ + if not other_spec: other_spec = spec.root other_compiler = other_spec.compiler @@ -321,6 +318,10 @@ class DefaultConcretizer(object): compiler is used, defaulting to no compiler flags in the spec. Default specs set at the compiler level will still be added later. """ + if not spec.architecture.platform_os: + #Although this usually means changed, this means awaiting other changes + return True + ret = False for flag in spack.spec.FlagMap.valid_compiler_flags(): try: @@ -352,7 +353,7 @@ class DefaultConcretizer(object): # Include the compiler flag defaults from the config files # This ensures that spack will detect conflicts that stem from a change # in default compiler flags. - compiler = spack.compilers.compiler_for_spec(spec.compiler) + compiler = spack.compilers.compiler_for_spec(spec.compiler, spec.architecture.platform_os) for flag in compiler.flags: if flag not in spec.compiler_flags: spec.compiler_flags[flag] = compiler.flags[flag] diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 9d217d17ca..7c04baaa91 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1458,7 +1458,7 @@ class Spec(object): self.architecture = self.architecture or other.architecture elif self.architecture.platform is None or other.architecture.platform is None: self.architecture.platform = self.architecture.platform or other.architecture.platform - elif self.architecture.platform_os is None of other.architecture.platform_os is None: + elif self.architecture.platform_os is None or other.architecture.platform_os is None: self.architecture.platform_os = self.architecture.platform_os or other.architecture.platform_os elif self.architecture.target is None or other.architecture.target is None: self.architecture.target = self.architecture.target or other.architecture.target diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 4cba2da9a5..2927e468a0 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -72,7 +72,7 @@ class ArchitectureTest(MockPackagesTest): """ frontend_os = self.platform.operating_system("frontend") frontend_target = self.platform.target("frontend") - frontend_spec = Spec("libelf=frontend") + frontend_spec = Spec("libelf os=frontend target=frontend") frontend_spec.concretize() self.assertEqual(frontend_os, frontend_spec.architecture.platform_os) self.assertEqual(frontend_target, frontend_spec.architecture.target) @@ -83,7 +83,7 @@ class ArchitectureTest(MockPackagesTest): """ backend_os = self.platform.operating_system("backend") backend_target = self.platform.target("backend") - backend_spec = Spec("libelf=backend") + backend_spec = Spec("libelf os=backend target=backend") backend_spec.concretize() self.assertEqual(backend_os, backend_spec.architecture.platform_os) self.assertEqual(backend_target, backend_spec.architecture.target) @@ -109,8 +109,7 @@ class ArchitectureTest(MockPackagesTest): results = [] for arch in combinations: o,t = arch - arch_spec = "-".join(arch) - spec = Spec("libelf=%s" % arch_spec) + spec = Spec("libelf os=%s target=%s" % (o, t)) spec.concretize() results.append(spec.architecture.platform_os == self.platform.operating_system(o)) results.append(spec.architecture.target == self.platform.target(t)) -- cgit v1.2.3-70-g09d2 From 63459ab0c78512906c35c5d5f9fbd5a072a3203a Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 18 May 2016 18:21:52 -0700 Subject: Fixed some of the bugs --- lib/spack/spack/spec.py | 24 ++++++++++++---------- lib/spack/spack/test/spec_semantics.py | 37 +++++++++++++++------------------- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 7c04baaa91..f88475d1c8 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1088,12 +1088,12 @@ class Spec(object): for s in self.traverse(root=False): - if spec.external_module: - compiler = spack.compilers.compiler_for_spec(spec.compiler, spec.architecture.platform_os) + if s.external_module: + compiler = spack.compilers.compiler_for_spec(s.compiler, s.architecture.platform_os) for mod in compiler.modules: load_module(mod) - spec.external = get_path_from_module(spec.external_module) + s.external = get_path_from_module(s.external_module) # Mark everything in the spec as concrete, as well. self._mark_concrete() @@ -1426,6 +1426,7 @@ class Spec(object): other.variants[v]) # TODO: Check out the logic here + print self.architecture, other.architecture, "^^^^^^^^^^^^^^^^^^^^^^^" if self.architecture is not None and other.architecture is not None: if self.architecture.platform is not None and other.architecture.platform is not None: if self.architecture.platform != other.architecture.platform: @@ -1453,16 +1454,17 @@ class Spec(object): changed |= self.compiler_flags.constrain(other.compiler_flags) - old = self.architecture + old = str(self.architecture) if self.architecture is None or other.architecture is None: self.architecture = self.architecture or other.architecture - elif self.architecture.platform is None or other.architecture.platform is None: - self.architecture.platform = self.architecture.platform or other.architecture.platform - elif self.architecture.platform_os is None or other.architecture.platform_os is None: - self.architecture.platform_os = self.architecture.platform_os or other.architecture.platform_os - elif self.architecture.target is None or other.architecture.target is None: - self.architecture.target = self.architecture.target or other.architecture.target - changed |= (self.architecture != old) + else: + if self.architecture.platform is None or other.architecture.platform is None: + self.architecture.platform = self.architecture.platform or other.architecture.platform + if self.architecture.platform_os is None or other.architecture.platform_os is None: + self.architecture.platform_os = self.architecture.platform_os or other.architecture.platform_os + if self.architecture.target is None or other.architecture.target is None: + self.architecture.target = self.architecture.target or other.architecture.target + changed |= (str(self.architecture) != old) if deps: changed |= self._constrain_dependencies(other) diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 8cdb91e206..9bd32a3d10 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -140,7 +140,7 @@ class SpecSematicsTest(MockPackagesTest): def test_satisfies_architecture(self): - platform = self.architecture.sys_type() + platform = spack.architecture.sys_type() if platform.name == 'crayxc': self.check_satisfies('foo target=frontend os=frontend', 'target=frontend os=frontend') self.check_satisfies('foo target=backend os=backend', 'target=backend', 'os=backend') @@ -377,34 +377,28 @@ class SpecSematicsTest(MockPackagesTest): 'libelf', 'libelf target=default_target os=default_os') - #def test_constrain_arch(self): - # self.check_constrain('libelf arch=bgqos_0', 'libelf arch=bgqos_0', 'libelf arch=bgqos_0') - # self.check_constrain('libelf arch=bgqos_0', 'libelf', 'libelf arch=bgqos_0') -#els#e /* not NEW */ - #def test_constrain_target(self): - # platform = spack.architecture.sys_type() - # target = platform.target('default_target').name - # self.check_constrain('libelf='+target, 'libelf='+target, 'libelf='+target) - # self.check_constrain('libelf='+target, 'libelf', 'libelf='+target) -#end#if /* not NEW */ - - def test_constrain_compiler(self): self.check_constrain('libelf %gcc@4.4.7', 'libelf %gcc@4.4.7', 'libelf %gcc@4.4.7') self.check_constrain('libelf %gcc@4.4.7', 'libelf', 'libelf %gcc@4.4.7') def test_invalid_constraint(self): - self.check_invalid_constraint('libelf@0:2.0', 'libelf@2.1:3') - self.check_invalid_constraint('libelf@0:2.5%gcc@4.8:4.9', 'libelf@2.1:3%gcc@4.5:4.7') +# self.check_invalid_constraint('libelf@0:2.0', 'libelf@2.1:3') +# self.check_invalid_constraint('libelf@0:2.5%gcc@4.8:4.9', 'libelf@2.1:3%gcc@4.5:4.7') - self.check_invalid_constraint('libelf+debug', 'libelf~debug') - self.check_invalid_constraint('libelf+debug~foo', 'libelf+debug+foo') - self.check_invalid_constraint('libelf debug=2', 'libelf debug=1') +# self.check_invalid_constraint('libelf+debug', 'libelf~debug') +# self.check_invalid_constraint('libelf+debug~foo', 'libelf+debug+foo') +# self.check_invalid_constraint('libelf debug=2', 'libelf debug=1') - self.check_invalid_constraint('libelf cppflags="-O3"', 'libelf cppflags="-O2"') - self.check_invalid_constraint('libelf target=default_target os=default_os', - 'libelf target=x86_64 os=ubuntu') +# self.check_invalid_constraint('libelf cppflags="-O3"', 'libelf cppflags="-O2"') + platform = spack.architecture.sys_type() + if len(platform.operating_sys.keys()) > 1 or len(platform.targets.keys()) > 1: + os1 = platform.operating_sys.keys()[0] + os2 = platform.operating_sys.keys()[-1] + target1 = platform.targets.keys()[0] + target2 = platform.targets.keys()[-1] + self.check_invalid_constraint('libelf target=%s os=%s' % (target1, os1), + 'libelf target=%s os=%s' % (target2, os2)) def test_constrain_changed(self): self.check_constrain_changed('libelf', '@1.0') @@ -447,6 +441,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf^foo', 'libelf^foo~debug') platform = spack.architecture.sys_type() default_target = platform.target('default_target').name + print default_target self.check_constrain_changed('libelf^foo', 'libelf^foo target='+default_target) -- cgit v1.2.3-70-g09d2 From 126fc10b9dc56a51eb75bb7cfb88619b7029097c Mon Sep 17 00:00:00 2001 From: Brett Viren Date: Thu, 19 May 2016 08:35:54 -0600 Subject: Remove `view print` for now. --- lib/spack/docs/basic_usage.rst | 118 ----------------------------------------- lib/spack/spack/cmd/view.py | 72 ++----------------------- 2 files changed, 3 insertions(+), 187 deletions(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 4af4387846..e108e393d7 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -330,124 +330,6 @@ of libelf would look like this: The full spec syntax is discussed in detail in :ref:`sec-specs`. -``spack view print`` -~~~~~~~~~~~~~~~~~~~~~~ - -``spack view print`` is a subcommand of ``spack view`` which displays information about one or more installed packages and their dependencies using a user-provided format string. The string can reverence variables in a shell-like manner for example ``$variable`` or ``${variable}text``. It can also include ``\t`` for tabs and ``\n`` for new lines. - -Some of the supported variables are: - -``name`` - The package name. - -``version`` - The package version. - -``spec`` - The package specification. - -``root`` - The root specification. - -``prefix`` - The installation directory. - -``variants`` - The collection of variants, if any. - -``namespace`` - The package repository name space. - -``compiler`` - The compiler \`name@versoin\` used to build the package. - -``architecture`` - The architecture targeted by the compiler. - -``dependencies`` - A comma-separated list of names of packages on which the package depends. - -``dependents`` - A comma-separated list of names of packages which depend on the package. - -``hash`` - The Spack hash for the package. - -``url`` - The source URL for the package. - -``stage`` - The directory for staging the build. - -``build_log`` - The path to the build log file. - -``rpath`` - The colon-separated library \`RPATH\` used in building the package. - -Here are some example uses of `spack view print`. A simple line-oriented report of information can be produced: - -.. code-block:: sh - - $ spack view print '$name\t$version\t$hash\n' cmake@3.5.2 - ncurses 6.0 bvbu4ixbnvtodpik4qzljlx3ukpyfrcz - zlib 1.2.8 ckki7zlryxrsetfqkgoxxahlhqqjni7n - openssl 1.0.2g 6zbar63sciso253nptxyrnhupymo7oyi - cmake 3.5.2 wprvmoczkpw4tiy5ybuk5zr7saus2d7g - -There are better ways to do this but a slow-and-dirty shell init procedure can be formed: - -.. code-block:: sh - - $ spack view print 'export PATH="${prefix}/bin:$$PATH"\n' m4 - export PATH="/spack/opt/spack/linux-x86_64/gcc-5.2.1/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2/bin:$PATH" - export PATH="/spack/opt/spack/linux-x86_64/gcc-5.2.1/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp/bin:$PATH" - $ eval $(spack view print 'export PATH="${prefix}/bin:$$PATH"\n' m4) - -Or, maybe you have some external application that can chew on Spack data in which case you can dump it to some easily parsed markup syntax such as YAML: - -.. code-block:: sh - - - $ spack view print '${name}:\n - version: ${version}\n - url : ${url}\n - spec: ${spec}\n - prefix: ${prefix}\n - root : ${root}\n - stage : ${stage}\n - log: ${build_log}\n' m4 - -Which might produce something like: - -.. code-block:: yaml - - libsigsegv: - - version: 2.10 - - url : ftp://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz - - spec: libsigsegv@2.10%gcc@5.2.1=linux-x86_64-h6hsv76 - - prefix: /spack/opt/spack/linux-x86_64/gcc-5.2.1/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2 - - root : m4@1.4.17%gcc@5.2.1+sigsegv=linux-x86_64^libsigsegv@2.10%gcc@5.2.1=linux-x86_64 - - stage : /spack/var/spack/stage/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2 - - log: /spack/opt/spack/linux-x86_64/gcc-5.2.1/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2/.spack/build.out - m4: - - version: 1.4.17 - - url : ftp://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz - - spec: m4@1.4.17%gcc@5.2.1+sigsegv=linux-x86_64-a4ikhdd - - prefix: /spack/opt/spack/linux-x86_64/gcc-5.2.1/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp - - root : m4@1.4.17%gcc@5.2.1+sigsegv=linux-x86_64^libsigsegv@2.10%gcc@5.2.1=linux-x86_64 - - stage : /spack/var/spack/stage/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp - - log: /spack/opt/spack/linux-x86_64/gcc-5.2.1/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp/.spack/build.out - -Or, maybe you want to do something with information about package dependencies by generating some ready-to-import Python code holding the tree: - -.. code-block:: sh - - $ spack view print '$name = dict(name = "$name", parents = [$dependencies], children = [$dependents])\n' cmake@3.5.2 - -Producing this Python code - -.. code-block:: python - - ncurses = dict(name = "ncurses", parents = []]) - zlib = dict(name = "zlib", parents = []]) - openssl = dict(name = "openssl", parents = [zlib]]) - cmake = dict(name = "cmake", parents = [ncurses,openssl]]) - - Compiler configuration diff --git a/lib/spack/spack/cmd/view.py b/lib/spack/spack/cmd/view.py index 4861383eaa..8f1fc9be74 100644 --- a/lib/spack/spack/cmd/view.py +++ b/lib/spack/spack/cmd/view.py @@ -24,9 +24,8 @@ ############################################################################## '''Produce a "view" of a Spack DAG. -A "view" is the product of applying a function on a set of package specs. - -This set consists of: +A "view" is file hierarchy representing the union of a number of +Spack-installed package file hierarchies. The union is formed from: - specs resolved from the package names given by the user (the seeds) @@ -35,7 +34,7 @@ This set consists of: - less any specs with names matching the regular expressions given by `--exclude` -The `view` command provides a number of functions (the "actions"): +The `view` can be built and tore down via a number of methods (the "actions"): - symlink :: a file system view which is a directory hierarchy that is the union of the hierarchies of the installed packages in the DAG @@ -46,8 +45,6 @@ The `view` command provides a number of functions (the "actions"): - statlink :: a view producing a status report of a symlink or hardlink view. -- format :: a view printing one string per spec following a given format. - The file system view concept is imspired by Nix, implemented by brett.viren@gmail.com ca 2016. @@ -68,7 +65,6 @@ brett.viren@gmail.com ca 2016. import os import re -import sys import spack import spack.cmd import llnl.util.tty as tty @@ -117,13 +113,6 @@ def setup_parser(sp): help="Path to file system view directory.") act.add_argument('specs', **specs_opts) - # The formatted print action. - act = ssp.add_parser('print', - help="Print a string to stdout based on given format") - act.add_argument('format', nargs=1, - help="Format describing per-package printout.") - act.add_argument('specs', **specs_opts) - return @@ -190,42 +179,6 @@ def flatten(seeds, descend=True): return flat -def spec2dict(spec): - 'Convert info in a spec into a simple dictionary.' - - # Expclitly convert instead of just returning spec.__dict__ as - # some things need processing or are properties. - # - pkg = spec.package - inst_deps = ','.join([s.name for s in pkg.installed_dependents]), - ret = dict(name=spec.name, - spec=spec.short_spec, - colorspec=spec.cshort_spec, # color - root=spec.root, - prefix=spec.prefix, - version=spec.version, - variants=spec.variants, - namespace=spec.namespace, - compiler=spec.compiler, - architecture=spec.architecture, - dependencies=','.join(spec.dependencies.keys()), - dependents=','.join(spec.dependents.keys()), - external=spec.external or "False", - hash=spec.dag_hash(), - - # package related: - url=pkg.url, - stage=pkg.stage.path, - installed=pkg.installed, - installed_dependents=inst_deps, - build_log=pkg.build_log_path, - rpath=':'.join(pkg.rpath), - - # ... - ) - return ret - - def check_one(spec, path, verbose=False): 'Check status of view in path against spec' dotspack = os.path.join(path, '.spack', spec.name) @@ -326,25 +279,6 @@ visitor_status = visitor_statlink visitor_check = visitor_statlink -def visitor_print(specs, args): - 'Print a string for each spec using args.format.' - fmt = args.format[0] - from string import Template - t = Template(fmt) - - for spec in specs: - kwds = spec2dict(spec) - try: - text = t.substitute(kwds) - except KeyError: - tty.error("Format error, use keywords: %s" % - (', '.join(kwds.keys()), )) - raise - # argparser escapes these - text = text.replace(r'\n', '\n').replace(r'\t', '\t') - sys.stdout.write(text) - - def view(parser, args): 'Produce a view of a set of packages.' -- cgit v1.2.3-70-g09d2 From 1bf306bbbdccb3b9dd917d3f74213b9811bfb975 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Thu, 19 May 2016 16:37:53 +0200 Subject: Adding +metis variant to scotch + minor changes --- .../repos/builtin/packages/scotch/Makefile.esmumps | 5 -- var/spack/repos/builtin/packages/scotch/package.py | 77 +++++++++++----------- 2 files changed, 39 insertions(+), 43 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/scotch/Makefile.esmumps diff --git a/var/spack/repos/builtin/packages/scotch/Makefile.esmumps b/var/spack/repos/builtin/packages/scotch/Makefile.esmumps deleted file mode 100644 index 4bfc760197..0000000000 --- a/var/spack/repos/builtin/packages/scotch/Makefile.esmumps +++ /dev/null @@ -1,5 +0,0 @@ -esmumps : scotch - (cd esmumps ; $(MAKE) scotch && $(MAKE) install) - -ptesmumps : ptscotch - (cd esmumps ; $(MAKE) ptscotch && $(MAKE) ptinstall) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 3abbf3c665..5ffab85a4f 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -37,13 +37,18 @@ class Scotch(Package): list_url = "http://gforge.inria.fr/frs/?group_id=248" version('6.0.3', '10b0cc0f184de2de99859eafaca83cfc') - version('6.0.0', 'c50d6187462ba801f9a82133ee666e8e') - version('5.1.10b', 'f587201d6cf5cf63527182fbfba70753') + version('6.0.0', 'ba117428c0a6cd97d0c93e8b872bb3fe') + version('5.1.10b', '9b8622b39c141ecaca4a46298486fd99') + + # This must be set for version <= 6.0.0 + md5_esmumps = { Version('5.1.10b'): 'f587201d6cf5cf63527182fbfba70753', + Version('6.0.0'): 'c50d6187462ba801f9a82133ee666e8e' } variant('mpi', default=False, description='Activate the compilation of parallel libraries') variant('compression', default=True, description='Activate the posibility to use compressed files') variant('esmumps', default=False, description='Activate the compilation of esmumps needed by mumps') variant('shared', default=True, description='Build a shared version of the library') + variant('metis', default=True, description='Build a metis wrapper library library') depends_on('flex') depends_on('bison') @@ -56,37 +61,19 @@ class Scotch(Package): # from the Scotch hosting site. These alternative archives include a # superset of the behavior in their default counterparts, so we choose to # always grab these versions for older Scotch versions for simplicity. - @when('@:6.0.0') - def url_for_version(self, version): - return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version) - - @when('@6.0.1:') def url_for_version(self, version): return super(Scotch, self).url_for_version(version) - # NOTE: Several of the 'esmumps' enabled Scotch releases up to version - # 6.0.0 have broken build scripts that don't properly build 'esmumps' as a - # separate target, so we need a patch procedure to remove 'esmumps' from - # existing targets and to add it as a standalone target. - @when('@:6.0.0') - def patch(self): - makefile_path = os.path.join('src', 'Makefile') - with open(makefile_path, 'r') as makefile: - esmumps_enabled = any(re.search(r'^esmumps(\s*):(.*)$', line) - for line in makefile.readlines()) - - if not esmumps_enabled: - mff = FileFilter(makefile_path) - mff.filter(r'^.*((esmumps)|(ptesmumps)).*(install).*$', '') - - mfesmumps_dir = os.path.dirname(os.path.realpath(__file__)) - mfesmumps_path = os.path.join(mfesmumps_dir, 'Makefile.esmumps') - with open(makefile_path, 'a') as makefile: - makefile.write('\ninclude %s\n' % mfesmumps_path) + @when('+esmumps') + def url_for_version(self, version): + if version <= Version('6.0.0'): + self.versions[version]['md5'] = self.md5_esmumps[version] + return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version) + else: + return super(Scotch, self).url_for_version(version) - @when('@6.0.1:') def patch(self): - pass + self.configure() # NOTE: Configuration of Scotch is achieved by writing a 'Makefile.inc' # file that contains all of the configuration variables and their desired @@ -103,13 +90,13 @@ class Scotch(Package): ] # Library Build Type # - if '+shared' in self.spec: makefile_inc.extend([ + # todo change for Darwin systems 'LIB = .so', 'CLIBFLAGS = -shared -fPIC', 'RANLIB = echo', - 'AR = $(CC)', + 'AR = $(CC)', 'ARFLAGS = -shared $(LDFLAGS) -o' ]) cflags.append('-fPIC') @@ -118,7 +105,7 @@ class Scotch(Package): 'LIB = .a', 'CLIBFLAGS = ', 'RANLIB = ranlib', - 'AR = ar', + 'AR = ar', 'ARFLAGS = -ruv ' ]) @@ -171,20 +158,34 @@ class Scotch(Package): fh.write('\n'.join(makefile_inc)) def install(self, spec, prefix): - self.configure() - targets = ['scotch'] if '+mpi' in self.spec: targets.append('ptscotch') - if '+esmumps' in self.spec: - targets.append('esmumps') - if '+mpi' in self.spec: - targets.append('ptesmumps') + if self.spec.version >= Version('6.0.0'): + if '+esmumps' in self.spec: + targets.append('esmumps') + if '+mpi' in self.spec: + targets.append('ptesmumps') with working_dir('src'): for target in targets: - make(target, parallel=(target != 'ptesmumps')) + can_make_parallel = not (target == 'ptesmumps' + or (self.spec.version < Version('6.0.0') + and target == 'ptscotch')) + make(target, parallel=can_make_parallel) + + # It seams easier to remove metis wrappers from the folder that will be installed than + # to tweak their Makefiles + if '+metis' not in self.spec: + with working_dir('lib'): + lib_ext = '.so' if '+shared' in self.spec else '.a' + force_remove('libscotchmetis{0}'.format(lib_ext)) + force_remove('libptscotchparmetis{0}'.format(lib_ext)) + + with working_dir('include'): + force_remove('metis.h') + force_remove('parmetis.h') install_tree('bin', prefix.bin) install_tree('lib', prefix.lib) -- cgit v1.2.3-70-g09d2 From 19c8a52fe1c25639c47620bc07f0824c59c921f7 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 19 May 2016 09:53:49 -0700 Subject: fixed spec syntax test --- lib/spack/spack/test/spec_syntax.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index c4e4c9cdfe..ae19de177b 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -58,7 +58,7 @@ class SpecSyntaxTest(unittest.TestCase): # ================================================================================ # Parse checks # ================================================================================ - def check_parse(self, expected, spec=None): + def check_parse(self, expected, spec=None, remove_arch=True): """Assert that the provided spec is able to be parsed. If this is called with one argument, it assumes that the string is canonical (i.e., no spaces and ~ instead of - for variants) and that it @@ -70,6 +70,13 @@ class SpecSyntaxTest(unittest.TestCase): if spec is None: spec = expected output = spack.spec.parse(spec) + + # Remove architectures that get added by parser. + if remove_arch: + for spec in output: + for s in spec.traverse(): + s.architecture = None + parsed = (" ".join(str(spec) for spec in output)) self.assertEqual(expected, parsed) -- cgit v1.2.3-70-g09d2 From 36450b9bc9f41ac0f70696352327d8f07d4ee3e3 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 19 May 2016 14:25:50 -0700 Subject: Adding link_paths to craype compilers --- lib/spack/spack/compilers/craype.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/compilers/craype.py b/lib/spack/spack/compilers/craype.py index e8ae284f5b..4ba8b110ec 100644 --- a/lib/spack/spack/compilers/craype.py +++ b/lib/spack/spack/compilers/craype.py @@ -47,10 +47,11 @@ class Craype(Compiler): PrgEnv = 'PrgEnv-cray' PrgEnv_compiler = 'craype' -# @property -# def cxx11_flag(self): -# return "-hstd=c++11" - + link_paths = { 'cc' : 'cc', + 'cxx' : 'c++', + 'f77' : 'f77', + 'fc' : 'fc'} + @classmethod def default_version(cls, comp): return get_compiler_version(comp, r'([Vv]ersion).*(\d+(\.\d+)+)') -- cgit v1.2.3-70-g09d2 From a51566ec6e4693cf32bab36e5a543ece426e37c7 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Fri, 20 May 2016 00:31:12 +0200 Subject: changes to simplify the esmumps variant for version < 6.0.0 + typos corrections, according to the remarks on PR #979 --- var/spack/repos/builtin/packages/scotch/package.py | 34 +++++++++++++--------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 5ffab85a4f..5ce835189d 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -32,23 +32,19 @@ class Scotch(Package): partitioning, graph clustering, and sparse matrix ordering.""" homepage = "http://www.labri.fr/perso/pelegrin/scotch/" - url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.3.tar.gz" + url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.3.tar.gz" base_url = "http://gforge.inria.fr/frs/download.php/latestfile/298" list_url = "http://gforge.inria.fr/frs/?group_id=248" version('6.0.3', '10b0cc0f184de2de99859eafaca83cfc') - version('6.0.0', 'ba117428c0a6cd97d0c93e8b872bb3fe') - version('5.1.10b', '9b8622b39c141ecaca4a46298486fd99') - - # This must be set for version <= 6.0.0 - md5_esmumps = { Version('5.1.10b'): 'f587201d6cf5cf63527182fbfba70753', - Version('6.0.0'): 'c50d6187462ba801f9a82133ee666e8e' } + version('6.0.0', 'c50d6187462ba801f9a82133ee666e8e') + version('5.1.10b', 'f587201d6cf5cf63527182fbfba70753') variant('mpi', default=False, description='Activate the compilation of parallel libraries') variant('compression', default=True, description='Activate the posibility to use compressed files') variant('esmumps', default=False, description='Activate the compilation of esmumps needed by mumps') variant('shared', default=True, description='Build a shared version of the library') - variant('metis', default=True, description='Build a metis wrapper library library') + variant('metis', default=True, description='Build metis and parmetis wrapper libraries') depends_on('flex') depends_on('bison') @@ -64,10 +60,8 @@ class Scotch(Package): def url_for_version(self, version): return super(Scotch, self).url_for_version(version) - @when('+esmumps') def url_for_version(self, version): if version <= Version('6.0.0'): - self.versions[version]['md5'] = self.md5_esmumps[version] return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version) else: return super(Scotch, self).url_for_version(version) @@ -96,7 +90,7 @@ class Scotch(Package): 'LIB = .so', 'CLIBFLAGS = -shared -fPIC', 'RANLIB = echo', - 'AR = $(CC)', + 'AR = $(CC)', 'ARFLAGS = -shared $(LDFLAGS) -o' ]) cflags.append('-fPIC') @@ -105,7 +99,7 @@ class Scotch(Package): 'LIB = .a', 'CLIBFLAGS = ', 'RANLIB = ranlib', - 'AR = ar', + 'AR = ar', 'ARFLAGS = -ruv ' ]) @@ -170,13 +164,19 @@ class Scotch(Package): with working_dir('src'): for target in targets: + # It seams that building ptesmumps in parallel fails, for + # version prior to 6.0.0 there is no separated targets force + # ptesmumps, this library is built by the ptscotch target. This + # should explain the test for the can_make_parallel variable can_make_parallel = not (target == 'ptesmumps' or (self.spec.version < Version('6.0.0') and target == 'ptscotch')) make(target, parallel=can_make_parallel) + # todo change this to take into account darwin systems + lib_ext = '.so' if '+shared' in self.spec else '.a' # It seams easier to remove metis wrappers from the folder that will be installed than - # to tweak their Makefiles + # to tweak the Makefiles if '+metis' not in self.spec: with working_dir('lib'): lib_ext = '.so' if '+shared' in self.spec else '.a' @@ -187,6 +187,14 @@ class Scotch(Package): force_remove('metis.h') force_remove('parmetis.h') + if '~esmumps' in self.spec and self.spec.version < Version('6.0.0'): + with working_dir('lib'): + force_remove('libesmumps{0}'.format(lib_ext)) + force_remove('libptesmumps{0}'.format(lib_ext)) + + with working_dir('include'): + force_remove('esmumps.h') + install_tree('bin', prefix.bin) install_tree('lib', prefix.lib) install_tree('include', prefix.include) -- cgit v1.2.3-70-g09d2 From a233ed2de78383cfa2688e33ab6ff1cf456a15f9 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Fri, 20 May 2016 00:42:34 +0200 Subject: changes scotch package to make he coverage test pass --- var/spack/repos/builtin/packages/scotch/package.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 5ce835189d..6b200d8fea 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os -import re from spack import * @@ -60,11 +59,9 @@ class Scotch(Package): def url_for_version(self, version): return super(Scotch, self).url_for_version(version) + @when(":6.0.0") def url_for_version(self, version): - if version <= Version('6.0.0'): - return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version) - else: - return super(Scotch, self).url_for_version(version) + return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version) def patch(self): self.configure() @@ -168,15 +165,16 @@ class Scotch(Package): # version prior to 6.0.0 there is no separated targets force # ptesmumps, this library is built by the ptscotch target. This # should explain the test for the can_make_parallel variable - can_make_parallel = not (target == 'ptesmumps' - or (self.spec.version < Version('6.0.0') - and target == 'ptscotch')) + can_make_parallel = \ + not (target == 'ptesmumps' or + (self.spec.version < Version('6.0.0') and + target == 'ptscotch')) make(target, parallel=can_make_parallel) # todo change this to take into account darwin systems lib_ext = '.so' if '+shared' in self.spec else '.a' - # It seams easier to remove metis wrappers from the folder that will be installed than - # to tweak the Makefiles + # It seams easier to remove metis wrappers from the folder that will be + # installed than to tweak the Makefiles if '+metis' not in self.spec: with working_dir('lib'): lib_ext = '.so' if '+shared' in self.spec else '.a' -- cgit v1.2.3-70-g09d2 From 2e77cc635e8ebd40dbf83fd0340d753e503eb1b1 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Fri, 20 May 2016 00:51:58 +0200 Subject: missing @ in version definition --- var/spack/repos/builtin/packages/scotch/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 6b200d8fea..3c2b4993ac 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -59,7 +59,7 @@ class Scotch(Package): def url_for_version(self, version): return super(Scotch, self).url_for_version(version) - @when(":6.0.0") + @when('@:6.0.0') def url_for_version(self, version): return '%s/scotch_%s_esmumps.tar.gz' % (Scotch.base_url, version) -- cgit v1.2.3-70-g09d2 From 175a042fd332c13200fb30f7f834541c3bbaa6c4 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 19 May 2016 16:42:13 -0700 Subject: Changed rpaths method so that it only grabs rpaths using the compiler module name instead of PrgEnv-x module name --- lib/spack/spack/build_environment.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 7aeea5c672..4f4ca26cbc 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -113,7 +113,6 @@ class MakeExecutable(Executable): return super(MakeExecutable, self).__call__(*args, **kwargs) - def load_module(mod): """Takes a module name and removes modules until it is possible to load that module. It then loads the provided module. Depends on the @@ -145,7 +144,6 @@ def get_path_from_module(mod): # Read the module text = modulecmd('show', mod, output=str, error=str).split('\n') - # If it lists its package directory, return that for line in text: if line.find(mod.upper()+'_DIR') >= 0: @@ -166,15 +164,14 @@ def get_path_from_module(mod): # If it sets the LD_LIBRARY_PATH or CRAY_LD_LIBRARY_PATH, use that for line in text: - if line.find('LD_LIBRARY_PATH') >= 0: + if line.find('LD_LIBRARY_PATH') >= 0: words = line.split() path = words[2] return path[:path.find('/lib')] - # Unable to find module path return None -def set_compiler_environment_variables(pkg): +def set_compiler_environment_variables(pkg, env): assert(pkg.spec.concrete) compiler = pkg.compiler flags = pkg.spec.compiler_flags @@ -276,14 +273,12 @@ def set_build_environment_variables(pkg, env): env.set(SPACK_DEBUG_LOG_DIR, spack.spack_working_dir) # Add any pkgconfig directories to PKG_CONFIG_PATH - pkg_config_dirs = [] - for p in dep_prefixes: - for maybe in ('lib', 'lib64', 'share'): - pcdir = join_path(p, maybe, 'pkgconfig') + for pre in dep_prefixes: + for directory in ('lib', 'lib64', 'share'): + pcdir = join_path(pre, directory, 'pkgconfig') if os.path.isdir(pcdir): - pkg_config_dirs.append(pcdir) - - env.prepend_path('PKG_CONFIG_PATH', pkg_config_dirs) + #pkg_config_dirs.append(pcdir) + env.prepend_path('PKG_CONFIG_PATH',pcdir) if pkg.spec.architecture.target.module_name: load_module(pkg.spec.architecture.target.module_name) @@ -369,8 +364,9 @@ def get_rpaths(pkg): if os.path.isdir(d.prefix.lib)) rpaths.extend(d.prefix.lib64 for d in pkg.spec.dependencies.values() if os.path.isdir(d.prefix.lib64)) - for mod in pkg.spec.compiler.modules: - rpaths.append(get_path_for_module(mod)) + # Second module is our compiler mod name. We use that to get rpaths from + # module show output. + rpaths.append(get_path_from_module(pkg.compiler.modules[1])) return rpaths -- cgit v1.2.3-70-g09d2 From b485ca8198ab677e1e0a3616f5d0d25d5024b3ce Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 20 May 2016 10:32:46 +0200 Subject: find : added unit tests, exits with 1 if -E and -e are given --- lib/spack/spack/cmd/find.py | 41 ++++++++++++++++++----------- lib/spack/spack/test/__init__.py | 2 +- lib/spack/spack/test/cmd/find.py | 57 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 17 deletions(-) create mode 100644 lib/spack/spack/test/cmd/find.py diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index c22268d534..9d6d6be1ea 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -180,6 +180,29 @@ def display_specs(specs, **kwargs): "deps, short)." % mode) # NOQA: ignore=E501 +def query_arguments(args): + # Check arguments + if args.explicit and args.implicit: + tty.error('You can\'t pass -E and -e options simultaneously.') + raise SystemExit(1) + + # Set up query arguments. + installed, known = True, any + if args.only_missing: + installed = False + elif args.missing: + installed = any + if args.unknown: + known = False + explicit = any + if args.explicit: + explicit = True + if args.implicit: + explicit = False + q_args = {'installed': installed, 'known': known, "explicit": explicit} + return q_args + + def find(parser, args): # Filter out specs that don't exist. query_specs = spack.cmd.parse_specs(args.query_specs) @@ -194,22 +217,7 @@ def find(parser, args): if not query_specs: return - # Set up query arguments. - installed, known = True, any - if args.only_missing: - installed = False - elif args.missing: - installed = any - if args.unknown: - known = False - - explicit = any - if args.explicit: - explicit = False - if args.implicit: - explicit = True - - q_args = {'installed': installed, 'known': known, "explicit": explicit} + q_args = query_arguments(args) # Get all the specs the user asked for if not query_specs: @@ -229,3 +237,4 @@ def find(parser, args): long=args.long, very_long=args.very_long, show_flags=args.show_flags) + diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index 1668e271fa..891dc873fd 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -38,7 +38,7 @@ test_names = ['versions', 'url_parse', 'url_substitution', 'packages', 'stage', 'svn_fetch', 'hg_fetch', 'mirror', 'modules', 'url_extrapolate', 'cc', 'link_tree', 'spec_yaml', 'optional_deps', 'make_executable', 'configure_guess', 'lock', 'database', - 'namespace_trie', 'yaml', 'sbang', 'environment', + 'namespace_trie', 'yaml', 'sbang', 'environment', 'cmd.find', 'cmd.uninstall', 'cmd.test_install'] diff --git a/lib/spack/spack/test/cmd/find.py b/lib/spack/spack/test/cmd/find.py new file mode 100644 index 0000000000..c9909c81c5 --- /dev/null +++ b/lib/spack/spack/test/cmd/find.py @@ -0,0 +1,57 @@ +############################################################################## +# 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 +############################################################################## + + +import spack.cmd.find +import unittest + + +class Bunch(object): + def __init__(self, **kwargs): + self.__dict__.update(kwargs) + + +class FindTest(unittest.TestCase): + def test_query_arguments(self): + query_arguments = spack.cmd.find.query_arguments + # Default arguments + args = Bunch(only_missing=False, missing=False, unknown=False, explicit=False, implicit=False) + q_args = query_arguments(args) + self.assertTrue('installed' in q_args) + self.assertTrue('known' in q_args) + self.assertTrue('explicit' in q_args) + self.assertEqual(q_args['installed'], True) + self.assertEqual(q_args['known'], any) + self.assertEqual(q_args['explicit'], any) + # Check that explicit works correctly + args.explicit = True + q_args = query_arguments(args) + self.assertEqual(q_args['explicit'], True) + args.explicit = False + args.implicit = True + q_args = query_arguments(args) + self.assertEqual(q_args['explicit'], False) + args.explicit = True + self.assertRaises(SystemExit, query_arguments, args) -- cgit v1.2.3-70-g09d2 From 7303c387e87c783b2cc5b980456ae21a8bbe7ed4 Mon Sep 17 00:00:00 2001 From: alalazo Date: Fri, 20 May 2016 10:34:11 +0200 Subject: autopep8 : fixed style --- lib/spack/spack/cmd/find.py | 1 - lib/spack/spack/test/cmd/find.py | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 9d6d6be1ea..93c10a910f 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -237,4 +237,3 @@ def find(parser, args): long=args.long, very_long=args.very_long, show_flags=args.show_flags) - diff --git a/lib/spack/spack/test/cmd/find.py b/lib/spack/spack/test/cmd/find.py index c9909c81c5..371e9650e0 100644 --- a/lib/spack/spack/test/cmd/find.py +++ b/lib/spack/spack/test/cmd/find.py @@ -29,15 +29,18 @@ import unittest class Bunch(object): + def __init__(self, **kwargs): self.__dict__.update(kwargs) class FindTest(unittest.TestCase): + def test_query_arguments(self): query_arguments = spack.cmd.find.query_arguments # Default arguments - args = Bunch(only_missing=False, missing=False, unknown=False, explicit=False, implicit=False) + args = Bunch(only_missing=False, missing=False, + unknown=False, explicit=False, implicit=False) q_args = query_arguments(args) self.assertTrue('installed' in q_args) self.assertTrue('known' in q_args) -- cgit v1.2.3-70-g09d2 From 09eed08b9c94a41c46664ca275602deacef40346 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 18 May 2016 13:41:39 -0400 Subject: Auto-detect verbs location --- .../repos/builtin/packages/openmpi/package.py | 31 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 0e3185db25..4e465e1784 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -27,6 +27,26 @@ import os from spack import * +def _verbs_dir(): + """ + Try to find the directory where the OpenFabrics verbs package is + installed. Return None if not found. + """ + try: + # Try to locate Verbs by looking for a utility in the path + ibv_devices = which("ibv_devices") + # Run it (silently) to ensure it works + ibv_devices(output=str, error=str) + # Get path to executable + path = ibv_devices.exe[0] + # Remove executable name and "bin" directory + path = os.path.dirname(path) + path = os.path.dirname(path) + return path + except: + return None + + class Openmpi(Package): """Open MPI is a project combining technologies and resources from several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) @@ -54,7 +74,7 @@ class Openmpi(Package): variant('psm', default=False, description='Build support for the PSM library.') variant('psm2', default=False, description='Build support for the Intel PSM2 library.') variant('pmi', default=False, description='Build support for PMI-based launchers') - variant('verbs', default=False, description='Build support for OpenFabrics verbs.') + variant('verbs', default=_verbs_dir() is not None, description='Build support for OpenFabrics verbs.') variant('mxm', default=False, description='Build Mellanox Messaging support') variant('thread_multiple', default=False, description='Enable MPI_THREAD_MULTIPLE support') @@ -113,7 +133,6 @@ class Openmpi(Package): # Fabrics '--with-psm' if '+psm' in spec else '--without-psm', '--with-psm2' if '+psm2' in spec else '--without-psm2', - ('--with-%s' % self.verbs) if '+verbs' in spec else ('--without-%s' % self.verbs), '--with-mxm' if '+mxm' in spec else '--without-mxm', # Other options '--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple', @@ -121,6 +140,14 @@ class Openmpi(Package): '--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3', '--enable-vt' if '+vt' in spec else '--disable-vt' ]) + if '+verbs' in spec: + path = _verbs_dir() + if path is not None: + config_args.append('--with-%s=%s' % (self.verbs, path)) + else: + config_args.append('--with-%s' % self.verbs) + else: + config_args.append('--without-%s' % self.verbs) # TODO: use variants for this, e.g. +lanl, +llnl, etc. # use this for LANL builds, but for LLNL builds, we need: -- cgit v1.2.3-70-g09d2 From c3767d593d04f990b4344540c95e07f172d54c42 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 20 May 2016 15:48:13 -0700 Subject: compiler list is sorted in descending order, in order to get most up to date version we check from the beginning of the list --- lib/spack/spack/concretize.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index f38afd38dc..1c451296c6 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -302,10 +302,10 @@ class DefaultConcretizer(object): raise UnavailableCompilerVersionError(other_compiler) # copy concrete version into other_compiler - index = len(matches)-1 + index = 0 while not _proper_compiler_style(matches[index], spec.architecture): - index -= 1 - if index == 0: + index += 1 + if index == len(matches) - 1: raise NoValidVersionError(spec) spec.compiler = matches[index].copy() assert(spec.compiler.concrete) -- cgit v1.2.3-70-g09d2 From d0870865817054288fbebb7dda626b6e8aeb0114 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 21 May 2016 14:33:05 -0700 Subject: update documentation. --- lib/spack/docs/configuration.rst | 233 ++++++++++++++++++++++++++++++++++ lib/spack/docs/index.rst | 2 +- lib/spack/docs/packaging_guide.rst | 60 +-------- lib/spack/docs/site_configuration.rst | 173 ------------------------- 4 files changed, 238 insertions(+), 230 deletions(-) create mode 100644 lib/spack/docs/configuration.rst delete mode 100644 lib/spack/docs/site_configuration.rst diff --git a/lib/spack/docs/configuration.rst b/lib/spack/docs/configuration.rst new file mode 100644 index 0000000000..c0b79a7f44 --- /dev/null +++ b/lib/spack/docs/configuration.rst @@ -0,0 +1,233 @@ +.. _configuration: + +Configuration +=================================== + +.. _temp-space: + +Temporary space +---------------------------- + +.. warning:: Temporary space configuration will eventually be moved to + configuration files, but currently these settings are in + ``lib/spack/spack/__init__.py`` + +By default, Spack will try to do all of its building in temporary +space. There are two main reasons for this. First, Spack is designed +to run out of a user's home directory, and on may systems the home +directory is network mounted and potentially not a very fast +filesystem. We create build stages in a temporary directory to avoid +this. Second, many systems impose quotas on home directories, and +``/tmp`` or similar directories often have more available space. This +helps conserve space for installations in users' home directories. + +You can customize temporary directories by editing +``lib/spack/spack/__init__.py``. Specifically, find this part of the file: + +.. code-block:: python + + # Whether to build in tmp space or directly in the stage_path. + # If this is true, then spack will make stage directories in + # a tmp filesystem, and it will symlink them into stage_path. + use_tmp_stage = True + + # Locations to use for staging and building, in order of preference + # Use a %u to add a username to the stage paths here, in case this + # is a shared filesystem. Spack will use the first of these paths + # that it can create. + tmp_dirs = ['/nfs/tmp2/%u/spack-stage', + '/var/tmp/%u/spack-stage', + '/tmp/%u/spack-stage'] + +The ``use_tmp_stage`` variable controls whether Spack builds +**directly** inside the ``var/spack/`` directory. Normally, Spack +will try to find a temporary directory for a build, then it *symlinks* +that temporary directory into ``var/spack/`` so that you can keep +track of what temporary directories Spack is using. + +The ``tmp_dirs`` variable is a list of paths Spack should search when +trying to find a temporary directory. They can optionally contain a +``%u``, which will substitute the current user's name into the path. +The list is searched in order, and Spack will create a temporary stage +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. + + +External Packages +---------------------------- +Spack can be configured to use externally-installed +packages rather than building its own packages. This may be desirable +if machines ship with system packages, such as a customized MPI +that should be used instead of Spack building its own MPI. + +External packages are configured through the ``packages.yaml`` file found +in a Spack installation's ``etc/spack/`` or a user's ``~/.spack/`` +directory. Here's an example of an external configuration: + +.. code-block:: yaml + + packages: + openmpi: + paths: + openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib: /opt/openmpi-1.4.3 + openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib+debug: /opt/openmpi-1.4.3-debug + openmpi@1.6.5%intel@10.1=chaos_5_x86_64_ib: /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. + +Each ``packages.yaml`` begins with a ``packages:`` token, followed +by a list of package names. To specify externals, add a ``paths`` +token under the package name, which lists externals in a +``spec : /path`` 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 +on its most-favored packages, and it may guess incorrectly. + +Each package version and compilers listed in an external should +have entries in Spack's packages and compiler configuration, even +though the package and compiler may not every be built. + +The packages configuration can tell Spack to use an external location +for certain package versions, but it does not restrict Spack to using +external packages. In the above example, if an OpenMPI 1.8.4 became +available Spack may choose to start building and linking with that version +rather than continue using the pre-installed OpenMPI versions. + +To prevent this, the ``packages.yaml`` configuration also allows packages +to be flagged as non-buildable. The previous example could be modified to +be: + +.. code-block:: yaml + + packages: + openmpi: + paths: + openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib: /opt/openmpi-1.4.3 + openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib+debug: /opt/openmpi-1.4.3-debug + openmpi@1.6.5%intel@10.1=chaos_5_x86_64_ib: /opt/openmpi-1.6.5-intel + buildable: False + +The addition of the ``buildable`` flag tells Spack that it should never build +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. + +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. + + +Concretization Preferences +-------------------------------- + +Spack can be configured to prefer certain compilers, package +versions, depends_on, and variants during concretization. +The preferred configuration can be controlled via the +``~/.spack/packages.yaml`` file for user configuations, or the +``etc/spack/packages.yaml`` site configuration. + + +Here's an example packages.yaml file that sets preferred packages: + +.. code-block:: sh + + packages: + dyninst: + compiler: [gcc@4.9] + variants: +debug + gperftools: + version: [2.2, 2.4, 2.3] + all: + compiler: [gcc@4.4.7, gcc@4.6:, intel, clang, pgi] + providers: + mpi: [mvapich, mpich, openmpi] + + +At a high level, this example is specifying how packages should be +concretized. The dyninst package should prefer using gcc 4.9 and +be built with debug options. The gperftools package should prefer version +2.2 over 2.4. Every package on the system should prefer mvapich for +its MPI and gcc 4.4.7 (except for Dyninst, which overrides this by preferring gcc 4.9). +These options are used to fill in implicit defaults. Any of them can be overwritten +on the command line if explicitly requested. + +Each packages.yaml file begins with the string ``packages:`` and +package names are specified on the next level. The special string ``all`` +applies settings to each package. Underneath each package name is +one or more components: ``compiler``, ``variants``, ``version``, +or ``providers``. Each component has an ordered list of spec +``constraints``, with earlier entries in the list being preferred over +later entries. + +Sometimes a package installation may have constraints that forbid +the first concretization rule, in which case Spack will use the first +legal concretization rule. Going back to the example, if a user +requests gperftools 2.3 or later, then Spack will install version 2.4 +as the 2.4 version of gperftools is preferred over 2.3. + +An explicit concretization rule in the preferred section will always +take preference over unlisted concretizations. In the above example, +xlc isn't listed in the compiler list. Every listed compiler from +gcc to pgi will thus be preferred over the xlc compiler. + +The syntax for the ``provider`` section differs slightly from other +concretization rules. A provider lists a value that packages may +``depend_on`` (e.g, mpi) and a list of rules for fulfilling that +dependency. + + + +Profiling +------------------ + +Spack has some limited built-in support for profiling, and can report +statistics using standard Python timing tools. To use this feature, +supply ``-p`` to Spack on the command line, before any subcommands. + +.. _spack-p: + +``spack -p`` +~~~~~~~~~~~~~~~~~ + +``spack -p`` output looks like this: + +.. code-block:: sh + + $ spack -p graph dyninst + o dyninst + |\ + | |\ + | o | libdwarf + |/ / + o | libelf + / + o boost + + 307670 function calls (305943 primitive calls) in 0.127 seconds + + Ordered by: internal time + + ncalls tottime percall cumtime percall filename:lineno(function) + 853 0.021 0.000 0.066 0.000 inspect.py:472(getmodule) + 51197 0.011 0.000 0.018 0.000 inspect.py:51(ismodule) + 73961 0.010 0.000 0.010 0.000 {isinstance} + 1762 0.006 0.000 0.053 0.000 inspect.py:440(getsourcefile) + 32075 0.006 0.000 0.006 0.000 {hasattr} + 1760 0.004 0.000 0.004 0.000 {posix.stat} + 2240 0.004 0.000 0.004 0.000 {posix.lstat} + 2602 0.004 0.000 0.011 0.000 inspect.py:398(getfile) + 771 0.004 0.000 0.077 0.000 inspect.py:518(findsource) + 2656 0.004 0.000 0.004 0.000 {method 'match' of '_sre.SRE_Pattern' objects} + 30772 0.003 0.000 0.003 0.000 {method 'get' of 'dict' objects} + ... + +The bottom of the output shows the top most time consuming functions, +slowest on top. The profiling support is from Python's built-in tool, +`cProfile +`_. diff --git a/lib/spack/docs/index.rst b/lib/spack/docs/index.rst index d6ce52b747..98ed9ff0fe 100644 --- a/lib/spack/docs/index.rst +++ b/lib/spack/docs/index.rst @@ -47,7 +47,7 @@ Table of Contents basic_usage packaging_guide mirrors - site_configuration + configuration developer_guide command_index package_list diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 650e0ee3b2..63c411ffb5 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1648,8 +1648,8 @@ point will Spack call the ``install()`` method for your package. Concretization in Spack is based on certain selection policies that tell Spack how to select, e.g., a version, when one is not specified explicitly. Concretization policies are discussed in more detail in -:ref:`site-configuration`. Sites using Spack can customize them to -match the preferences of their own users. +:ref:`configuration`. Sites using Spack can customize them to match +the preferences of their own users. .. _spack-spec: @@ -1682,60 +1682,8 @@ be concretized on their system. For example, one user may prefer packages built with OpenMPI and the Intel compiler. Another user may prefer packages be built with MVAPICH and GCC. -Spack can be configured to prefer certain compilers, package -versions, depends_on, and variants during concretization. -The preferred configuration can be controlled via the -``~/.spack/packages.yaml`` file for user configuations, or the -``etc/spack/packages.yaml`` site configuration. - - -Here's an example packages.yaml file that sets preferred packages: - -.. code-block:: sh - - packages: - dyninst: - compiler: [gcc@4.9] - variants: +debug - gperftools: - version: [2.2, 2.4, 2.3] - all: - compiler: [gcc@4.4.7, gcc@4.6:, intel, clang, pgi] - providers: - mpi: [mvapich, mpich, openmpi] - - -At a high level, this example is specifying how packages should be -concretized. The dyninst package should prefer using gcc 4.9 and -be built with debug options. The gperftools package should prefer version -2.2 over 2.4. Every package on the system should prefer mvapich for -its MPI and gcc 4.4.7 (except for Dyninst, which overrides this by preferring gcc 4.9). -These options are used to fill in implicit defaults. Any of them can be overwritten -on the command line if explicitly requested. - -Each packages.yaml file begins with the string ``packages:`` and -package names are specified on the next level. The special string ``all`` -applies settings to each package. Underneath each package name is -one or more components: ``compiler``, ``variants``, ``version``, -or ``providers``. Each component has an ordered list of spec -``constraints``, with earlier entries in the list being preferred over -later entries. - -Sometimes a package installation may have constraints that forbid -the first concretization rule, in which case Spack will use the first -legal concretization rule. Going back to the example, if a user -requests gperftools 2.3 or later, then Spack will install version 2.4 -as the 2.4 version of gperftools is preferred over 2.3. - -An explicit concretization rule in the preferred section will always -take preference over unlisted concretizations. In the above example, -xlc isn't listed in the compiler list. Every listed compiler from -gcc to pgi will thus be preferred over the xlc compiler. - -The syntax for the ``provider`` section differs slightly from other -concretization rules. A provider lists a value that packages may -``depend_on`` (e.g, mpi) and a list of rules for fulfilling that -dependency. +See the `documentation in the config section `_ +for more details. .. _install-method: diff --git a/lib/spack/docs/site_configuration.rst b/lib/spack/docs/site_configuration.rst deleted file mode 100644 index 3abfa21a9d..0000000000 --- a/lib/spack/docs/site_configuration.rst +++ /dev/null @@ -1,173 +0,0 @@ -.. _site-configuration: - -Site configuration -=================================== - -.. _temp-space: - -Temporary space ----------------------------- - -.. warning:: Temporary space configuration will eventually be moved to - configuration files, but currently these settings are in - ``lib/spack/spack/__init__.py`` - -By default, Spack will try to do all of its building in temporary -space. There are two main reasons for this. First, Spack is designed -to run out of a user's home directory, and on may systems the home -directory is network mounted and potentially not a very fast -filesystem. We create build stages in a temporary directory to avoid -this. Second, many systems impose quotas on home directories, and -``/tmp`` or similar directories often have more available space. This -helps conserve space for installations in users' home directories. - -You can customize temporary directories by editing -``lib/spack/spack/__init__.py``. Specifically, find this part of the file: - -.. code-block:: python - - # Whether to build in tmp space or directly in the stage_path. - # If this is true, then spack will make stage directories in - # a tmp filesystem, and it will symlink them into stage_path. - use_tmp_stage = True - - # Locations to use for staging and building, in order of preference - # Use a %u to add a username to the stage paths here, in case this - # is a shared filesystem. Spack will use the first of these paths - # that it can create. - tmp_dirs = ['/nfs/tmp2/%u/spack-stage', - '/var/tmp/%u/spack-stage', - '/tmp/%u/spack-stage'] - -The ``use_tmp_stage`` variable controls whether Spack builds -**directly** inside the ``var/spack/`` directory. Normally, Spack -will try to find a temporary directory for a build, then it *symlinks* -that temporary directory into ``var/spack/`` so that you can keep -track of what temporary directories Spack is using. - -The ``tmp_dirs`` variable is a list of paths Spack should search when -trying to find a temporary directory. They can optionally contain a -``%u``, which will substitute the current user's name into the path. -The list is searched in order, and Spack will create a temporary stage -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. - - -External Packages -~~~~~~~~~~~~~~~~~~~~~ -Spack can be configured to use externally-installed -packages rather than building its own packages. This may be desirable -if machines ship with system packages, such as a customized MPI -that should be used instead of Spack building its own MPI. - -External packages are configured through the ``packages.yaml`` file found -in a Spack installation's ``etc/spack/`` or a user's ``~/.spack/`` -directory. Here's an example of an external configuration: - -.. code-block:: yaml - - packages: - openmpi: - paths: - openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib: /opt/openmpi-1.4.3 - openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib+debug: /opt/openmpi-1.4.3-debug - openmpi@1.6.5%intel@10.1=chaos_5_x86_64_ib: /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. - -Each ``packages.yaml`` begins with a ``packages:`` token, followed -by a list of package names. To specify externals, add a ``paths`` -token under the package name, which lists externals in a -``spec : /path`` 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 -on its most-favored packages, and it may guess incorrectly. - -Each package version and compilers listed in an external should -have entries in Spack's packages and compiler configuration, even -though the package and compiler may not every be built. - -The packages configuration can tell Spack to use an external location -for certain package versions, but it does not restrict Spack to using -external packages. In the above example, if an OpenMPI 1.8.4 became -available Spack may choose to start building and linking with that version -rather than continue using the pre-installed OpenMPI versions. - -To prevent this, the ``packages.yaml`` configuration also allows packages -to be flagged as non-buildable. The previous example could be modified to -be: - -.. code-block:: yaml - - packages: - openmpi: - paths: - openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib: /opt/openmpi-1.4.3 - openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib+debug: /opt/openmpi-1.4.3-debug - openmpi@1.6.5%intel@10.1=chaos_5_x86_64_ib: /opt/openmpi-1.6.5-intel - buildable: False - -The addition of the ``buildable`` flag tells Spack that it should never build -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. - -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. - - -Profiling -~~~~~~~~~~~~~~~~~~~~~ - -Spack has some limited built-in support for profiling, and can report -statistics using standard Python timing tools. To use this feature, -supply ``-p`` to Spack on the command line, before any subcommands. - -.. _spack-p: - -``spack -p`` -^^^^^^^^^^^^^^^^^^ - -``spack -p`` output looks like this: - -.. code-block:: sh - - $ spack -p graph dyninst - o dyninst - |\ - | |\ - | o | libdwarf - |/ / - o | libelf - / - o boost - - 307670 function calls (305943 primitive calls) in 0.127 seconds - - Ordered by: internal time - - ncalls tottime percall cumtime percall filename:lineno(function) - 853 0.021 0.000 0.066 0.000 inspect.py:472(getmodule) - 51197 0.011 0.000 0.018 0.000 inspect.py:51(ismodule) - 73961 0.010 0.000 0.010 0.000 {isinstance} - 1762 0.006 0.000 0.053 0.000 inspect.py:440(getsourcefile) - 32075 0.006 0.000 0.006 0.000 {hasattr} - 1760 0.004 0.000 0.004 0.000 {posix.stat} - 2240 0.004 0.000 0.004 0.000 {posix.lstat} - 2602 0.004 0.000 0.011 0.000 inspect.py:398(getfile) - 771 0.004 0.000 0.077 0.000 inspect.py:518(findsource) - 2656 0.004 0.000 0.004 0.000 {method 'match' of '_sre.SRE_Pattern' objects} - 30772 0.003 0.000 0.003 0.000 {method 'get' of 'dict' objects} - ... - -The bottom of the output shows the top most time consuming functions, -slowest on top. The profiling support is from Python's built-in tool, -`cProfile -`_. -- cgit v1.2.3-70-g09d2 From 4c87ef915f917c2262349832966a12127b7700b3 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Sun, 22 May 2016 18:55:29 +0200 Subject: First try at OpenFOAM-extend --- .../builtin/packages/openfoam-extend/package.py | 262 +++++++++++++++++++++ .../repos/builtin/packages/parmgridgen/package.py | 75 ++++++ var/spack/repos/builtin/packages/scotch/package.py | 12 +- 3 files changed, 342 insertions(+), 7 deletions(-) create mode 100644 var/spack/repos/builtin/packages/openfoam-extend/package.py create mode 100644 var/spack/repos/builtin/packages/parmgridgen/package.py diff --git a/var/spack/repos/builtin/packages/openfoam-extend/package.py b/var/spack/repos/builtin/packages/openfoam-extend/package.py new file mode 100644 index 0000000000..6af824df7e --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-extend/package.py @@ -0,0 +1,262 @@ +from spack import * +from spack.environment import * + +import multiprocessing +import subprocess +import re +import os + + +class OpenfoamExtend(Package): + """OpenFOAM-extend or foam-extend""" + + version('3.2', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.2') + version('3.1', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.1') + version('3.0', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.0') + + variant('paraview', default=False, description='Enable ParaFOAM') + variant('scotch', default=True, description='Activate Scotch as a possible decomposition library') + variant('ptscotch', default=True, description='Activate PT-Scotch as a possible decomposition library') + variant('metis', default=True, description='Activate Metis as a possible decomposition library') + variant('parmetis', default=True, description='Activate Parmetis as a possible decomposition library') + variant('parmgridgen', default=True, description='Activate Parmgridgen support') + + supported_compilers = {'clang': 'Clang', 'gcc': 'Gcc', 'intel': 'Icc'} + + depends_on('mpi') + depends_on('cmake') + depends_on('python') + depends_on('flex@:2.5.99') + depends_on('bison') + depends_on('m4') + depends_on('hwloc') + depends_on('zlib') + + depends_on('scotch ~ metis', when='~ptscotch+scotch') + depends_on('scotch ~ metis + mpi', when='+ptscotch') + depends_on('metis@5:', when='+metis') + depends_on('parmetis', when='+parmetis') + depends_on('parmgridgen', when='+parmgridgen') + + depends_on('paraview', when='+paraview') + depends_on('qt@:4', when='+paraview') + + def _get_env(self, command): + variable_set = re.compile(r'(.+?)=(.*)') + proc = subprocess.Popen(['bash', '-c', command], + stdout=subprocess.PIPE) + env = {} + for line in proc.stdout: + match_grp = variable_set.match(line) + if match_grp: + env[match_grp.group(1)] = match_grp.group(2) + return env + + def set_arch(self): + (sysname, nodename, release, version, machine) = os.uname() + + if self.compiler.name not in self.supported_compilers: + raise RuntimeError('{0} is not a supported compiler \ + to compile OpenFOAM'.format(self.compiler.name)) + + foam_compiler = self.supported_compilers[self.compiler.name] + if sysname == 'Linux': + arch = 'linux' + if foam_compiler == 'Clang': + raise RuntimeError('OS, compiler combinaison not\ + supported ({0} {1})'.format(sysname, foam_compiler)) + elif sysname == 'Darwin': + if machine == 'x86_64': + arch = 'darwinIntel' + if foam_compiler == 'Icc': + raise RuntimeError('OS, compiler combinaison not\ + supported ({0} {1})'.format(sysname, foam_compiler)) + else: + raise RuntimeError('{0} {1} is not a \ + supported architecture'.format(sysname, machine)) + + return (arch, foam_compiler) + + def get_openfoam_environment(self, env_openfoam): + env_before = self._get_env('env') + + with working_dir(self.stage.source_path): + env_after = self._get_env('source etc/bashrc && env') + + if 'PATH' in env_after: + del env_after['PATH'] + + if 'LD_LIBRARY_PATH' in env_after: + del env_after['LD_LIBRARY_PATH'] + + for key, value in env_after.iteritems(): + if key not in env_before or not value == env_before[key]: + env_openfoam.set(key, value) + + def patch(self): + if '+parmgridgen' in self.spec: + filter_file(r'-lIMlib -lMGridGen', + r'-limlib -lmgrid', + 'src/dbns/Make/options') + filter_file(r'-lMGridGen', + r'-lmgrid', + 'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options') + + (arch, foam_compiler) = self.set_arch() + + prefs_dict = { + 'compilerInstall': 'System', + 'WM_COMPILER': foam_compiler, + 'WM_ARCH_OPTION': '64', + 'WM_PRECISION_OPTION': 'DP', + 'WM_COMPILE_OPTION': 'SPACKOpt', + 'WM_MPLIB': 'SPACK', + + 'CMAKE_DIR': self.spec['cmake'].prefix, + 'CMAKE_BIN_DIR': self.spec['cmake'].prefix.bin, + 'PYTHON_DIR': self.spec['python'].prefix, + 'PYTHON_BIN_DIR': self.spec['python'].prefix.bin, + + 'FLEX_SYSTEM': 1, + 'FLEX_DIR': self.spec['flex'].prefix, + + 'BISON_SYSTEM': 1, + 'BISON_DIR': self.spec['flex'].prefix, + + 'M4_SYSTEM': 1, + 'M4_DIR': self.spec['m4'].prefix, + + 'ZLIB_SYSTEM': 1, + 'ZLIB_DIR': self.spec['zlib'].prefix, + + 'HWLOC_SYSTEM': 1, + 'HWLOC_DIR': self.spec['hwloc'].prefix, + 'HWLOC_BIN_DIR': self.spec['hwloc'].prefix.bin, + } + + if '+scotch' in self.spec or '+ptscotch' in self.spec: + prefs_dict['SCOTCH_SYSTEM'] = 1 + prefs_dict['SCOTCH_DIR'] = self.spec['scotch'].prefix + prefs_dict['SCOTCH_BIN_DIR'] = self.spec['scotch'].prefix.bin + prefs_dict['SCOTCH_LIB_DIR'] = self.spec['scotch'].prefix.lib + prefs_dict['SCOTCH_INCLUDE_DIR'] = \ + self.spec['scotch'].prefix.include + + if '+metis' in self.spec: + prefs_dict['METIS_SYSTEM'] = 1 + prefs_dict['METIS_DIR'] = self.spec['metis'].prefix + prefs_dict['METIS_BIN_DIR'] = self.spec['metis'].prefix.bin + prefs_dict['METIS_LIB_DIR'] = self.spec['metis'].prefix.lib + prefs_dict['METIS_INCLUDE_DIR'] = self.spec['metis'].prefix.include + + if '+parmetis' in self.spec: + prefs_dict['PARMETIS_SYSTEM'] = 1 + prefs_dict['PARMETIS_DIR'] = self.spec['parmetis'].prefix + prefs_dict['PARMETIS_BIN_DIR'] = self.spec['parmetis'].prefix.bin + prefs_dict['PARMETIS_LIB_DIR'] = self.spec['parmetis'].prefix.lib + prefs_dict['PARMETIS_INCLUDE_DIR'] = \ + self.spec['parmetis'].prefix.include + + if '+parmgridgen' in self.spec: + prefs_dict['PARMGRIDGEN_SYSTEM'] = 1 + prefs_dict['PARMGRIDGEN_DIR'] = self.spec['parmgridgen'].prefix + prefs_dict['PARMGRIDGEN_BIN_DIR'] = \ + self.spec['parmgridgen'].prefix.bin + prefs_dict['PARMGRIDGEN_LIB_DIR'] = \ + self.spec['parmgridgen'].prefix.lib + prefs_dict['PARMGRIDGEN_INCLUDE_DIR'] = \ + self.spec['parmgridgen'].prefix.include + + if '+paraview' in self.spec: + prefs_dict['PARAVIEW_SYSTEM'] = 1 + prefs_dict['PARAVIEW_DIR'] = self.spec['paraview'].prefix, + prefs_dict['PARAVIEW_BIN_DIR'] = self.spec['paraview'].prefix.bin, + prefs_dict['QT_SYSTEM'] = 1 + prefs_dict['QT_DIR'] = self.spec['qt'].prefix, + prefs_dict['QT_BIN_DIR'] = self.spec['qt'].prefix.bin, + + with working_dir('.'): + with open("etc/prefs.sh", "w") as fh: + for key in sorted(prefs_dict): + fh.write('export {0}={1}\n'.format(key, prefs_dict[key])) + + with open("etc/prefs.csh", "w") as fh: + for key in sorted(prefs_dict): + fh.write('setenv {0}={1}\n'.format(key, prefs_dict[key])) + + mpi_info = [ + 'PFLAGS = -DOMPI_SKIP_MPICXX -DMPICH_IGNORE_CXX_SEEK', + 'PINC = -I{0}'.format(self.spec['mpi'].prefix.include), + 'PLIBS = -L{0} -lmpi'.format(self.spec['mpi'].prefix.lib) + ] + + arch_path = ''.join([arch, prefs_dict['WM_ARCH_OPTION'], + foam_compiler]) + option_path = ''.join([arch_path, + prefs_dict['WM_PRECISION_OPTION'], + prefs_dict['WM_COMPILE_OPTION']]) + rule_path = join_path("wmake", "rules", arch_path) + build_path = join_path(self.stage.source_path, 'lib', option_path) + install_path = \ + join_path(self.prefix, + 'foam-extend-{0}'.format(self.version.up_to(2)), + option_path) + + rpaths_foam = ' '.join([ + '{0}{1}'.format(self.compiler.cxx_rpath_arg, + install_path), + '{0}{1}'.format(self.compiler.cxx_rpath_arg, + build_path) + ]) + + compiler_flags = { + 'DBUG': rpaths_foam, + 'OPT': '-O3', + } + + with working_dir(rule_path): + with open('mplibSPACK', "w") as fh: + fh.write('\n'.join(mpi_info)) + + for comp in ['c', 'c++']: + with open('{0}SPACKOpt'.format(comp), "w") as fh: + for key, val in compiler_flags.iteritems(): + fh.write('{0}{1} = {2}\n'.format(comp, key, val)) + + def setup_environment(self, spack_env, run_env): + with working_dir(self.stage.path): + spack_env.set('FOAM_INST_DIR', os.path.abspath('.')) + + (arch, foam_compiler) = self.set_arch() + + run_env.set('FOAM_INST_DIR', self.prefix) + + def install(self, spec, prefix): + self.patch() + + env_openfoam = EnvironmentModifications() + self.get_openfoam_environment(env_openfoam) + env_openfoam.apply_modifications() + + if self.parallel: + os.environ['WM_NCOMPPROCS'] = str(self.make_jobs) \ + if self.make_jobs else str(multiprocessing.cpu_count()) + + # for key in sorted(os.environ): + # print("{0} = {1}".format(key, os.environ[key])) + + allwmake = Executable('./Allwmake') + allwmake() + + install_path = \ + join_path(self.prefix, + 'foam-extend-{0}'.format(self.version.up_to(2))) + + if '+source' in spec: + install_tree('src', join_path(install_path, 'src')) + + install_tree('lib', join_path(install_path, 'lib')) + install_tree('bin', join_path(install_path, 'bin')) + install_tree('applications', join_path(install_path, 'applications')) + install_tree('etc', join_path(install_path, 'etc')) + install_tree('wmake', join_path(install_path, 'wmake')) diff --git a/var/spack/repos/builtin/packages/parmgridgen/package.py b/var/spack/repos/builtin/packages/parmgridgen/package.py new file mode 100644 index 0000000000..11b19f2ec2 --- /dev/null +++ b/var/spack/repos/builtin/packages/parmgridgen/package.py @@ -0,0 +1,75 @@ +############################################################################## +# 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 Parmgridgen(Package): + """MGRIDGEN is a serial library written entirely in ANSI C that implements + (serial) algorithms for obtaining a sequence of successive coarse grids + that are well-suited for geometric multigrid methods. + ParMGridGen is the parallel version of MGridGen + """ + + homepage = "http://www-users.cs.umn.edu/~moulitsa/software.html" + url = "http://www-users.cs.umn.edu/~moulitsa/download/ParMGridGen-1.0.tar.gz" + + version('1.0', '2872fa95b7fb91d6bd525490eed62038') + + depends_on('mpi') + + def install(self, spec, prefix): + make_opts = [ + 'make=make', + 'COPTIONS=-fPIC', + 'LDOPTIONS=-fPIC', + 'CC={0}'.format(self.compiler.cc), + 'PARCC={0}'.format(self.spec['mpi'].mpicc), + 'LD={0}'.format(self.compiler.cc), + 'PARLD={0}'.format(self.spec['mpi'].mpicc), + 'LIBDIR=-L../..', + 'PARLIBS=-L../../ -lparmgrid -lmgrid -lm', + 'LIBS=-L../../ -lmgrid -lm', + 'parallel' + ] + + make(*make_opts, parallel=False) + + include_path = join_path(self.prefix, 'include') + lib_path = join_path(self.prefix, 'lib') + bin_path = join_path(self.prefix, 'bin') + + mkdirp(include_path, lib_path, bin_path) + + install("mgridgen.h", include_path) + install("parmgridgen.h", include_path) + + install("MGridGen/IMlib/libIMlib.a", + join_path(lib_path, 'libimlib.a')) + install("libmgrid.a", lib_path) + install("libparmgrid.a", lib_path) + + install("mgridgen", bin_path) + install("parmgridgen", bin_path) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 3c2b4993ac..2f6e42c439 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -171,15 +171,13 @@ class Scotch(Package): target == 'ptscotch')) make(target, parallel=can_make_parallel) - # todo change this to take into account darwin systems - lib_ext = '.so' if '+shared' in self.spec else '.a' + lib_ext = dso_suffix if '+shared' in self.spec else 'a' # It seams easier to remove metis wrappers from the folder that will be # installed than to tweak the Makefiles if '+metis' not in self.spec: with working_dir('lib'): - lib_ext = '.so' if '+shared' in self.spec else '.a' - force_remove('libscotchmetis{0}'.format(lib_ext)) - force_remove('libptscotchparmetis{0}'.format(lib_ext)) + force_remove('libscotchmetis.{0}'.format(lib_ext)) + force_remove('libptscotchparmetis.{0}'.format(lib_ext)) with working_dir('include'): force_remove('metis.h') @@ -187,8 +185,8 @@ class Scotch(Package): if '~esmumps' in self.spec and self.spec.version < Version('6.0.0'): with working_dir('lib'): - force_remove('libesmumps{0}'.format(lib_ext)) - force_remove('libptesmumps{0}'.format(lib_ext)) + force_remove('libesmumps.{0}'.format(lib_ext)) + force_remove('libptesmumps.{0}'.format(lib_ext)) with working_dir('include'): force_remove('esmumps.h') -- cgit v1.2.3-70-g09d2 From 404b7c7c4fe721f3b7236f6d02fb1330d4245858 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 16 May 2016 09:06:03 -0700 Subject: initial rust support --- .../repos/builtin/packages/rust-bindgen/package.py | 13 +++++ var/spack/repos/builtin/packages/rust/package.py | 62 ++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 var/spack/repos/builtin/packages/rust-bindgen/package.py create mode 100644 var/spack/repos/builtin/packages/rust/package.py diff --git a/var/spack/repos/builtin/packages/rust-bindgen/package.py b/var/spack/repos/builtin/packages/rust-bindgen/package.py new file mode 100644 index 0000000000..8d48ea096e --- /dev/null +++ b/var/spack/repos/builtin/packages/rust-bindgen/package.py @@ -0,0 +1,13 @@ +from spack import * +import os + + +class RustBindgen(Package): + """The rust programming language toolchain""" + homepage = "http://www.rust-lang.org" + url = "https://github.com/crabtw/rust-bindgen" + + extends("rust") + + def install(self, spec, prefix): + cargo('install', '--root', prefix) diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py new file mode 100644 index 0000000000..abc10dc047 --- /dev/null +++ b/var/spack/repos/builtin/packages/rust/package.py @@ -0,0 +1,62 @@ +from spack import * +import os + + +def get_submodules(): + git = which('git') + git('submodule', 'update', '--init', '--recursive') + +class Rust(Package): + """The rust programming language toolchain""" + homepage = "http://www.rust-lang.org" + url = "https://github.com/rust-lang/rust" + + version('1.8.0', tag='1.8.0', git="https://github.com/rust-lang/rust") + + resource(name='cargo', + git="https://github.com/rust-lang/cargo.git", + tag='0.10.0', + destination='cargo') + + extendable = True + + # Rust + depends_on("curl") + depends_on("git") + depends_on("cmake") + depends_on("python@:2.8") + + # Cargo + depends_on("openssl") + + def install(self, spec, prefix): + get_submodules() + configure('--prefix=%s' % prefix) + + make() + make("install") + + # Install cargo, rust package manager + with working_dir(os.path.join('cargo', 'cargo')): + get_submodules() + configure('--prefix=' + prefix, + '--local-rust-root=' + prefix) + + make() + make("install") + + def setup_dependent_package(self, module, ext_spec): + """ + Called before python modules' install() methods. + + In most cases, extensions will only need to have one or two lines:: + + cargo('build') + cargo('install', '--root', prefix) + + or + + cargo('install', '--root', prefix) + """ + # Rust extension builds can have a global cargo executable function + module.cargo = Executable(join_path(self.spec.prefix.bin, 'cargo')) -- cgit v1.2.3-70-g09d2 From 425beb4d97d2a54f082c6ffbc90d05ef7d7ab7c5 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 18 May 2016 10:57:11 -0700 Subject: updates for rust-bindgen --- var/spack/repos/builtin/packages/rust-bindgen/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/rust-bindgen/package.py b/var/spack/repos/builtin/packages/rust-bindgen/package.py index 8d48ea096e..a2164f11c5 100644 --- a/var/spack/repos/builtin/packages/rust-bindgen/package.py +++ b/var/spack/repos/builtin/packages/rust-bindgen/package.py @@ -7,6 +7,8 @@ class RustBindgen(Package): homepage = "http://www.rust-lang.org" url = "https://github.com/crabtw/rust-bindgen" + version('0.16', tag='0.16', git='https://github.com/crabtw/rust-bindgen') + extends("rust") def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 9bd4bc02d6dfa60485e193d994a504c01e4d51e1 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Thu, 19 May 2016 13:59:40 -0700 Subject: fixing warning for package fetch --- lib/spack/spack/fetch_strategy.py | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 7c8cebe0c9..1953d7c1b3 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -1,4 +1,4 @@ -############################################################################## +# # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # @@ -21,7 +21,7 @@ # 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 -############################################################################## +# """ Fetch strategies are used to download source code into a staging area in order to build it. They need to define the following methods: @@ -75,11 +75,13 @@ def _needs_stage(fun): class FetchStrategy(object): + """Superclass of all fetch strategies.""" enabled = False # Non-abstract subclasses should be enabled. required_attributes = None # Attributes required in version() args. class __metaclass__(type): + """This metaclass registers all fetch strategies in a list.""" def __init__(cls, name, bases, dict): @@ -126,6 +128,7 @@ class FetchStrategy(object): @pattern.composite(interface=FetchStrategy) class FetchStrategyComposite(object): + """ Composite for a FetchStrategy object. Implements the GoF composite pattern. """ @@ -134,6 +137,7 @@ class FetchStrategyComposite(object): class URLFetchStrategy(FetchStrategy): + """FetchStrategy that pulls source code from a URL for an archive, checks the archive against a checksum,and decompresses the archive. """ @@ -235,12 +239,13 @@ class URLFetchStrategy(FetchStrategy): # redirects properly. content_types = re.findall(r'Content-Type:[^\r\n]+', headers) if content_types and 'text/html' in content_types[-1]: - tty.warn( - "The contents of " + self.archive_file + " look like HTML.", - "The checksum will likely be bad. If it is, you can use", - "'spack clean ' to remove the bad archive, then fix", - "your internet gateway issue and install again.") - + tty.warn("The contents of ", + (self.archive_file if self.archive_file is not None + else "the archive"), + " look like HTML.", + "The checksum will likely be bad. If it is, you can use", + "'spack clean ' to remove the bad archive, then", + "fix your internet gateway issue and install again.") if save_file: os.rename(partial_file, save_file) @@ -353,6 +358,7 @@ class URLFetchStrategy(FetchStrategy): class VCSFetchStrategy(FetchStrategy): + def __init__(self, name, *rev_types, **kwargs): super(VCSFetchStrategy, self).__init__() self.name = name @@ -407,6 +413,7 @@ class VCSFetchStrategy(FetchStrategy): class GoFetchStrategy(VCSFetchStrategy): + """ Fetch strategy that employs the `go get` infrastructure Use like this in a package: @@ -466,6 +473,7 @@ class GoFetchStrategy(VCSFetchStrategy): class GitFetchStrategy(VCSFetchStrategy): + """ Fetch strategy that gets source code from a git repository. Use like this in a package: @@ -586,6 +594,7 @@ class GitFetchStrategy(VCSFetchStrategy): class SvnFetchStrategy(VCSFetchStrategy): + """Fetch strategy that gets source code from a subversion repository. Use like this in a package: @@ -662,6 +671,7 @@ class SvnFetchStrategy(VCSFetchStrategy): class HgFetchStrategy(VCSFetchStrategy): + """ Fetch strategy that gets source code from a Mercurial repository. Use like this in a package: @@ -806,11 +816,13 @@ def for_package_version(pkg, version): class FetchError(spack.error.SpackError): + def __init__(self, msg, long_msg=None): super(FetchError, self).__init__(msg, long_msg) class FailedDownloadError(FetchError): + """Raised wen a download fails.""" def __init__(self, url, msg=""): @@ -820,16 +832,19 @@ class FailedDownloadError(FetchError): class NoArchiveFileError(FetchError): + def __init__(self, msg, long_msg): super(NoArchiveFileError, self).__init__(msg, long_msg) class NoDigestError(FetchError): + def __init__(self, msg, long_msg=None): super(NoDigestError, self).__init__(msg, long_msg) class InvalidArgsError(FetchError): + def __init__(self, pkg, version): msg = ("Could not construct a fetch strategy for package %s at " "version %s") @@ -838,6 +853,7 @@ class InvalidArgsError(FetchError): class ChecksumError(FetchError): + """Raised when archive fails to checksum.""" def __init__(self, message, long_msg=None): @@ -845,6 +861,7 @@ class ChecksumError(FetchError): class NoStageError(FetchError): + """Raised when fetch operations are called before set_stage().""" def __init__(self, method): -- cgit v1.2.3-70-g09d2 From 00de72272d2ac4fd949c43cdaa9487defc7875c8 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sun, 22 May 2016 11:14:46 -0700 Subject: rust compiler/builder package, new llvm variants --- var/spack/repos/builtin/packages/llvm/package.py | 34 ++++++++++++++++++---- .../repos/builtin/packages/rust-bindgen/package.py | 5 +++- var/spack/repos/builtin/packages/rust/package.py | 5 ++-- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index c090c131c6..c32f66590a 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os, shutil +import os, glob class Llvm(Package): @@ -46,7 +46,9 @@ class Llvm(Package): variant('libcxx', default=True, description="Build the LLVM C++ standard library") variant('compiler-rt', default=True, description="Build the LLVM compiler runtime, including sanitizers") variant('gold', default=True, description="Add support for LTO with the gold linker plugin") - + variant('shared_libs', default=False, description="Build all components as shared libraries, faster, less memory to build, less stable") + variant('link_dylib', default=False, description="Build and link the libLLVM shared library rather than static") + variant('all_targets', default=True, description="Build all supported targets, default targets ,NVPTX,AMDGPU,CppBackend") # Build dependency depends_on('cmake @2.8.12.2:') @@ -257,6 +259,28 @@ class Llvm(Package): if '+compiler-rt' not in spec: cmake_args.append('-DLLVM_EXTERNAL_COMPILER_RT_BUILD:Bool=OFF') + if '+shared_libs' in spec: + cmake_args.append('-DBUILD_SHARED_LIBS:Bool=ON') + + if '+link_dylib' in spec: + cmake_args.append('-DLLVM_LINK_LLVM_DYLIB:Bool=ON') + + if '+all_targets' not in spec: # all is default on cmake + targets = ['CppBackend', 'NVPTX', 'AMDGPU'] + if 'x86' in spec.architecture.lower(): + targets.append('X86') + elif 'arm' in spec.architecture.lower(): + targets.append('ARM') + elif 'aarch64' in spec.architecture.lower(): + targets.append('AArch64') + elif 'sparc' in spec.architecture.lower(): + targets.append('sparc') + elif ('ppc' in spec.architecture.lower() or + 'power' in spec.architecture.lower()): + targets.append('PowerPC') + + cmake_args.append('-DLLVM_TARGETS_TO_BUILD:Bool=' + ';'.join(targets)) + if '+clang' not in spec: if '+clang_extra' in spec: raise SpackException('The clang_extra variant requires the clang variant to be selected') @@ -267,7 +291,5 @@ class Llvm(Package): cmake(*cmake_args) make() make("install") - query_path = os.path.join('bin', 'clang-query') - # Manually install clang-query, because llvm doesn't... - if os.path.exists(query_path): - shutil.copy(query_path, os.path.join(prefix, 'bin')) + cp = which('cp') + cp('-a', 'bin/', prefix) diff --git a/var/spack/repos/builtin/packages/rust-bindgen/package.py b/var/spack/repos/builtin/packages/rust-bindgen/package.py index a2164f11c5..854016d12a 100644 --- a/var/spack/repos/builtin/packages/rust-bindgen/package.py +++ b/var/spack/repos/builtin/packages/rust-bindgen/package.py @@ -10,6 +10,9 @@ class RustBindgen(Package): version('0.16', tag='0.16', git='https://github.com/crabtw/rust-bindgen') extends("rust") + depends_on("llvm") def install(self, spec, prefix): - cargo('install', '--root', prefix) + env = dict(os.environ) + env['LIBCLANG_PATH'] = os.path.join(spec['llvm'].prefix, 'lib') + cargo('install', '--root', prefix, env=env) diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py index abc10dc047..65f81ce534 100644 --- a/var/spack/repos/builtin/packages/rust/package.py +++ b/var/spack/repos/builtin/packages/rust/package.py @@ -21,6 +21,7 @@ class Rust(Package): extendable = True # Rust + depends_on("llvm") depends_on("curl") depends_on("git") depends_on("cmake") @@ -30,8 +31,8 @@ class Rust(Package): depends_on("openssl") def install(self, spec, prefix): - get_submodules() - configure('--prefix=%s' % prefix) + configure('--prefix=%s' % prefix, + '--llvm-root=' + spec['llvm'].prefix) make() make("install") -- cgit v1.2.3-70-g09d2 From 3ab56a188e83054420d9004be1c6d07276c91375 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 22 May 2016 18:33:13 -0700 Subject: Fixes #980: really slow spack spec performance - `spack spec dealii` now takse seconds rather than 18 minutes. - Slow hash (`dag_hash`) was accidentally inserted into the fast hash (`__hash__`). - Do not put the slow hash in the fast hash. --- lib/spack/spack/spec.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 2cfcb7f341..7c09af4c21 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1750,8 +1750,7 @@ class Spec(object): self.variants, self.architecture, self.compiler, - self.compiler_flags, - self.dag_hash()) + self.compiler_flags) def eq_node(self, other): """Equality with another spec, not including dependencies.""" -- cgit v1.2.3-70-g09d2 From 0890ac4507e5568d1d5a5da9bbd3c729238a9b3a Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 23 May 2016 10:54:48 +0200 Subject: modules : explicit module file load from configuration files --- lib/spack/spack/config.py | 1 + lib/spack/spack/modules.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index ec37bd290c..c3133697f4 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -286,6 +286,7 @@ section_schemas = { 'autoload': {'$ref': '#/definitions/dependency_selection'}, 'prerequisites': {'$ref': '#/definitions/dependency_selection'}, 'conflict': {'$ref': '#/definitions/array_of_strings'}, + 'load': {'$ref': '#/definitions/array_of_strings'}, 'environment': { 'type': 'object', 'default': {}, diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index d2b819e80a..9fa92a593f 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -381,6 +381,8 @@ class EnvModule(object): for x in filter_blacklisted( module_configuration.pop('autoload', []), self.name): module_file_content += self.autoload(x) + for x in module_configuration.pop('load', []): + module_file_content += self.autoload(x) for x in filter_blacklisted( module_configuration.pop('prerequisites', []), self.name): module_file_content += self.prerequisite(x) @@ -402,8 +404,12 @@ class EnvModule(object): return tuple() def autoload(self, spec): - m = type(self)(spec) - return self.autoload_format.format(module_file=m.use_name) + if not isinstance(spec, str): + m = type(self)(spec) + module_file = m.use_name + else: + module_file = spec + return self.autoload_format.format(module_file=module_file) def prerequisite(self, spec): m = type(self)(spec) -- cgit v1.2.3-70-g09d2 From ce3146e91abb728e720a9b8ae84134718a059d3f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 23 May 2016 14:50:06 +0200 Subject: octave: add missing dependencies and update to 4.0.2 --- var/spack/repos/builtin/packages/octave/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py index 17c7ff82f4..120c18726c 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -23,6 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import sys + class Octave(Package): """GNU Octave is a high-level language, primarily intended for numerical @@ -34,6 +36,7 @@ class Octave(Package): homepage = "https://www.gnu.org/software/octave/" url = "ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz" + version('4.0.2' , 'c2a5cacc6e4c52f924739cdf22c2c687') version('4.0.0' , 'a69f8320a4f20a8480c1b278b1adb799') # Variants @@ -62,7 +65,10 @@ class Octave(Package): # Required dependencies depends_on('blas') depends_on('lapack') + # Octave does not configure with sed from darwin: + depends_on('sed', sys.platform == 'darwin') depends_on('pcre') + depends_on('pkg-config') # Strongly recommended dependencies depends_on('readline', when='+readline') -- cgit v1.2.3-70-g09d2 From c78349a3a4bdbed6bb1727c4b4827646847c4791 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 23 May 2016 15:08:10 +0200 Subject: octave: fix formatting --- var/spack/repos/builtin/packages/octave/package.py | 53 +++++++++++----------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py index 120c18726c..72ff0ee6fc 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -36,8 +36,8 @@ class Octave(Package): homepage = "https://www.gnu.org/software/octave/" url = "ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz" - version('4.0.2' , 'c2a5cacc6e4c52f924739cdf22c2c687') - version('4.0.0' , 'a69f8320a4f20a8480c1b278b1adb799') + version('4.0.2', 'c2a5cacc6e4c52f924739cdf22c2c687') + version('4.0.0', 'a69f8320a4f20a8480c1b278b1adb799') # Variants variant('readline', default=True) @@ -71,30 +71,29 @@ class Octave(Package): depends_on('pkg-config') # Strongly recommended dependencies - depends_on('readline', when='+readline') + depends_on('readline', when='+readline') # Optional dependencies - depends_on('arpack', when='+arpack') - depends_on('curl', when='+curl') - depends_on('fftw', when='+fftw') - depends_on('fltk', when='+fltk') - depends_on('fontconfig', when='+fontconfig') - depends_on('freetype', when='+freetype') - depends_on('glpk', when='+glpk') - depends_on('gl2ps', when='+gl2ps') - depends_on('gnuplot', when='+gnuplot') - depends_on('ImageMagick', when='+magick') - depends_on('hdf5', when='+hdf5') - depends_on('jdk', when='+jdk') - depends_on('llvm', when='+llvm') - #depends_on('opengl', when='+opengl') # TODO: add package - depends_on('qhull', when='+qhull') - depends_on('qrupdate', when='+qrupdate') - #depends_on('qscintilla', when='+qscintilla) # TODO: add package - depends_on('qt', when='+qt') - depends_on('suite-sparse',when='+suitesparse') - depends_on('zlib', when='+zlib') - + depends_on('arpack', when='+arpack') + depends_on('curl', when='+curl') + depends_on('fftw', when='+fftw') + depends_on('fltk', when='+fltk') + depends_on('fontconfig', when='+fontconfig') + depends_on('freetype', when='+freetype') + depends_on('glpk', when='+glpk') + depends_on('gl2ps', when='+gl2ps') + depends_on('gnuplot', when='+gnuplot') + depends_on('ImageMagick', when='+magick') + depends_on('hdf5', when='+hdf5') + depends_on('jdk', when='+jdk') + depends_on('llvm', when='+llvm') + # depends_on('opengl', when='+opengl') # TODO: add package + depends_on('qhull', when='+qhull') + depends_on('qrupdate', when='+qrupdate') + # depends_on('qscintilla', when='+qscintilla) # TODO: add package + depends_on('qt', when='+qt') + depends_on('suite-sparse', when='+suitesparse') + depends_on('zlib', when='+zlib') def install(self, spec, prefix): config_args = [ @@ -160,7 +159,8 @@ class Octave(Package): config_args.append("--without-glpk") if '+magick' in spec: - config_args.append("--with-magick=%s" % spec['ImageMagick'].prefix.lib) + config_args.append("--with-magick=%s" + % spec['ImageMagick'].prefix.lib) if '+hdf5' in spec: config_args.extend([ @@ -193,7 +193,8 @@ class Octave(Package): if '+qrupdate' in spec: config_args.extend([ - "--with-qrupdate-includedir=%s" % spec['qrupdate'].prefix.include, + "--with-qrupdate-includedir=%s" + % spec['qrupdate'].prefix.include, "--with-qrupdate-libdir=%s" % spec['qrupdate'].prefix.lib ]) else: -- cgit v1.2.3-70-g09d2 From 6c352132d0dd2c0f05270fa7888d47ca37547674 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 23 May 2016 14:28:00 -0700 Subject: Started writing documentation for architecture. Might need a couple more drafts --- lib/spack/spack/architecture.py | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 41778795c3..45b4cc228d 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -22,6 +22,58 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## +""" +This module contains all the elements that are required to create an +architecture object. These include, the target processor, the operating system, +and the architecture platform (i.e. cray, darwin, linux, bgq, etc) classes. + +On a multiple architecture machine, the architecture spec field can be set to +build a package against any target and operating system that is present on the +platform. On Cray platforms or any other architecture that has different front and +back end environments, the operating system will determine the method of compiler +detection. + +There are two different types of compiler detection: + 1. Through the $PATH env variable (front-end detection) + 2. Through the tcl module system. (back-end detection) + +Depending on which operating system is specified, the compiler will be detected +using one of those methods. + +For platforms such as linux and darwin, the operating system is autodetected and +the target is set to be x86_64. + +The command line syntax for specifying an architecture is as follows: + + target= os= + +If the user wishes to use the defaults, either target or os can be left out of +the command line and Spack will concretize using the default. These defaults are +set in the 'platforms/' directory which contains the different subclasses for +platforms. If the machine has multiple architectures, the user can +also enter front-end, or fe or back-end or be. These settings will concretize +to their respective front-end and back-end targets and operating systems. +Additional platforms can be added by creating a subclass of Platform +and adding it inside the platform directory. + +Platforms are an abstract class that are extended by subclasses. If the user +wants to add a new type of platform (such as cray_xe), they can create a subclass +and set all the class attributes such as priority, front_target ,back_target, +front_os, back_os. Platforms also contain a priority class attribute. A lower +number signifies higher priority. These numbers are arbitrarily set and can be +changed though often there isn't much need unless a new platform is added and +the user wants that to be detected first. + +Targets are created inside the platform subclasses. Most architecture (like linux, +and darwin) will have only one target (x86_64) but in the case of Cray machines, +there is both a frontend and backend processor. The user can specify which targets +are present on front-end and back-end architecture + +Depending on the platform, operating systems are either auto-detected or are +set. The user can set the front-end and back-end operating setting by the class +attributes front_os and back_os. The operating system as described earlier, will +be responsible for compiler detection. +""" import os from collections import namedtuple import imp -- cgit v1.2.3-70-g09d2 From d7612e7aaace3b0fa483f17840e20cde5b28f430 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Mon, 23 May 2016 16:54:41 -0700 Subject: Fixed errors caught by spec and concretize tests --- lib/spack/spack/architecture.py | 78 ++++++++++++++++++++++++++------ lib/spack/spack/concretize.py | 23 +++++++--- lib/spack/spack/spec.py | 81 ++++++++++++++++++++++++++++------ lib/spack/spack/test/architecture.py | 2 + lib/spack/spack/test/concretize.py | 4 +- lib/spack/spack/test/spec_semantics.py | 14 +++--- lib/spack/spack/test/spec_syntax.py | 6 --- 7 files changed, 160 insertions(+), 48 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 41778795c3..e4b3dbf9c7 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -105,12 +105,25 @@ class Platform(object): self.operating_sys = {} self.name = name + def to_dict(self): + n = {} + n['targets'] = dict((name, target.to_dict()) for (name, target) in self.targets.items()) + n['operating_systems'] = dict((name, os.to_dict()) for (name, os) in self.operating_sys.items()) + n['priority'] = self.priority + n['default_front_end_target'] = self.front_end + n['default_back_end_target'] = self.back_end + n['default_target'] = self.default + n['default_front_end_os'] = self.front_os + n['default_back_end_os'] = self.back_os + n['default_os'] = self.default_os + return {self.name: n} + def add_target(self, name, target): """Used by the platform specific subclass to list available targets. Raises an error if the platform specifies a name that is reserved by spack as an alias. """ - if name in ['front_end', 'fe', 'back_end', 'be', 'default']: + if name in ['frontend', 'fe', 'backend', 'be', 'default_target']: raise ValueError( "%s is a spack reserved alias " "and cannot be the name of a target" % name) @@ -135,6 +148,10 @@ class Platform(object): """ Add the operating_system class object into the platform.operating_sys dictionary """ + if name in ['frontend', 'fe', 'backend', 'be', 'default_os']: + raise ValueError( + "%s is a spack reserved alias " + "and cannot be the name of an OS" % name) self.operating_sys[name] = os_class def operating_system(self, name): @@ -284,15 +301,18 @@ class OperatingSystem(object): class Arch(object): "Architecture is now a class to help with setting attributes" - def __init__(self, platform_os=None, target=None): - self.platform = sys_type() - if platform_os: - platform_os = self.platform.operating_system(platform_os) + def __init__(self, platform=None, platform_os=None, target=None): + self.platform = platform + if platform and platform_os: + platform_os = self.platform.operating_system(platform_os) self.platform_os = platform_os - if target: + if platform and target: target = self.platform.target(target) self.target = target + # Hooks for parser to use when platform is set after target or os + self.target_string = None + self.os_string = None @property def concrete(self): @@ -302,16 +322,19 @@ class Arch(object): def __str__(self): - if self.platform.name == 'darwin': - os_name = self.platform_os.name + if self.platform or self.platform_os or self.target: + if self.platform.name == 'darwin': + os_name = self.platform_os.name + else: + os_name = str(self.platform_os) + + return (str(self.platform) +"-"+ + os_name + "-" + str(self.target)) else: - os_name = str(self.platform_os) - - return (str(self.platform) +"-"+ - os_name + "-" + str(self.target)) + return '' def _cmp_key(self): - platform = self.platform.name + platform = self.platform.name if isinstance(self.platform, Platform) else self.platform os = self.platform_os.name if isinstance(self.platform_os, OperatingSystem) else self.platform_os target = self.target.name if isinstance(self.target, Target) else self.target return (platform, os, target) @@ -322,7 +345,7 @@ class Arch(object): platform_os = self.platform_os target = self.target - d['platform'] = self.platform.name + d['platform'] = self.platform.to_dict() if self.platform else None d['platform_os'] = self.platform_os.to_dict() if self.platform_os else None d['target'] = self.target.to_dict() if self.target else None @@ -350,6 +373,27 @@ def _operating_system_from_dict(os_dict): operating_system.version = os_dict['version'] return operating_system +def _platform_from_dict(platform_dict): + """ Constructs a platform from a dictionary. """ + platform = Platform.__new__(Platform) + name, p_dict = platform_dict.items()[0] + platform.name = name + platform.targets = {} + for name, t_dict in p_dict['targets'].items(): + platform.add_target(name, _target_from_dict(t_dict)) + platform.operating_sys = {} + for name, o_dict in p_dict['operating_systems'].items(): + platform.add_operating_system(name, _operating_system_from_dict(o_dict)) + platform.priority = p_dict['priority'] + platform.front_end = p_dict['default_front_end_target'] + platform.back_end = p_dict['default_back_end_target'] + platform.default = p_dict['default_target'] + platform.front_os = p_dict['default_front_end_os'] + platform.back_os = p_dict['default_back_end_os'] + platform.default_os = p_dict['default_os'] + + return platform + def arch_from_dict(d): """ Uses _platform_from_dict, _operating_system_from_dict, _target_from_dict helper methods to recreate the arch tuple from the dictionary read from @@ -359,14 +403,20 @@ def arch_from_dict(d): if d is None: return None + platform_dict = d['platform'] os_dict = d['platform_os'] target_dict = d['target'] + platform = _platform_from_dict(platform_dict) if platform_dict else None target = _target_from_dict(target_dict) if os_dict else None platform_os = _operating_system_from_dict(os_dict) if os_dict else None + arch.platform = platform arch.target = target arch.platform_os = platform_os + arch.os_string = None + arch.target_string = None + return arch @memoized diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index f38afd38dc..1f5c07779e 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -198,7 +198,7 @@ class DefaultConcretizer(object): spec.architecture.platform_os = spec.root.architecture.platform_os else: spec.architecture.platform_os = spec.architecture.platform.operating_system('default_os') - return True #changed + return True #changed def _concretize_target(self, spec): platform = spec.architecture.platform @@ -210,7 +210,19 @@ class DefaultConcretizer(object): spec.architecture.target = spec.root.architecture.target else: spec.architecture.target = spec.architecture.platform.target('default_target') - return True #changed + print spec.architecture, spec.architecture.platform, spec.architecture.platform_os, spec.architecture.target + return True #changed + + def _concretize_platform(self, spec): + if spec.architecture.platform is not None and isinstance( + spec.architecture.platform, spack.architecture.Platform): + return False + if spec.root.architecture and spec.root.architecture.platform: + if isinstance(spec.root.architecture.platform,spack.architecture.Platform): + spec.architecture.platform = spec.root.architecture.platform + else: + spec.architecture.platform = spack.architecture.sys_type() + return True #changed? def concretize_architecture(self, spec): """If the spec is empty provide the defaults of the platform. If the @@ -227,10 +239,11 @@ class DefaultConcretizer(object): # Set the architecture to all defaults spec.architecture = spack.architecture.Arch() return True - + # Concretize the operating_system and target based of the spec - ret = any((self._concretize_operating_system(spec), - self._concretize_target(spec))) + ret = any((self._concretize_platform(spec), + self._concretize_operating_system(spec), + self._concretize_target(spec))) return ret diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index f88475d1c8..d15598405f 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -99,6 +99,7 @@ import sys import itertools import hashlib import base64 +import imp from StringIO import StringIO from operator import attrgetter import yaml @@ -107,6 +108,7 @@ from yaml.error import MarkedYAMLError import llnl.util.tty as tty from llnl.util.lang import * from llnl.util.tty.color import * +from llnl.util.filesystem import join_path import spack import spack.architecture @@ -119,6 +121,7 @@ from spack.cmd.find import display_specs from spack.version import * from spack.util.string import * from spack.util.prefix import Prefix +from spack.util.naming import mod_to_class from spack.virtual import ProviderIndex from spack.build_environment import get_path_from_module, load_module @@ -535,10 +538,24 @@ class Spec(object): Known flags currently include "arch" """ valid_flags = FlagMap.valid_compiler_flags() - if name == 'os' or name == 'operating_system': - self._set_os(value) +# if name == 'arch' or name == 'architecture': +# platform, op_sys, target = value.split('-') +# print platform, op_sys, target, '+++++++' +# self._set_platform(platform) +# self._set_os(op_sys) +# self._set_target(target) + if name == 'platform': + self._set_platform(value) + elif name == 'os' or name == 'operating_system': + if self.architecture.platform: + self._set_os(value) + else: + self.architecture.os_string = value elif name == 'target': - self._set_target(value) + if self.architecture.platform: + self._set_target(value) + else: + self.architecture.target_string = value elif name in valid_flags: assert(self.compiler_flags is not None) self.compiler_flags[name] = value.split() @@ -551,6 +568,39 @@ class Spec(object): "Spec for '%s' cannot have two compilers." % self.name) self.compiler = compiler + def _set_platform(self, value): + """Called by the parser to set the architecture platform""" + if isinstance(value, basestring): + mod_path = spack.platform_path + mod_string = 'spack.platformss' + names = list_modules(mod_path) + if value in names: + # Create a platform object from the name + mod_name = mod_string + value + path = join_path(mod_path, value) + '.py' + mod = imp.load_source(mod_name, path) + class_name = mod_to_class(value) + if not hasattr(mod, class_name): + tty.die('No class %s defined in %s' % (class_name, mod_name)) + cls = getattr(mod, class_name) + if not inspect.isclass(cls): + tty.die('%s.%s is not a class' % (mod_name, class_name)) + platform = cls() + else: + tty.die("No platform class %s defined." % value) + else: + # The value is a platform + platform = value + + self.architecture.platform = platform + + # Set os and target if we previously got strings for them + if self.architecture.os_string: + self._set_os(self.architecture.os_string) + self.architecture.os_string = None + if self.architecture.target_string: + self._set_target(self.architecture.target_string) + self.architecture.target_string = None def _set_os(self, value): """Called by the parser to set the architecture operating system""" @@ -1016,6 +1066,7 @@ class Spec(object): changed = True spec.dependencies = DependencyMap() replacement.dependencies = DependencyMap() + replacement.architecture = self.architecture # TODO: could this and the stuff in _dup be cleaned up? def feq(cfield, sfield): @@ -1426,7 +1477,6 @@ class Spec(object): other.variants[v]) # TODO: Check out the logic here - print self.architecture, other.architecture, "^^^^^^^^^^^^^^^^^^^^^^^" if self.architecture is not None and other.architecture is not None: if self.architecture.platform is not None and other.architecture.platform is not None: if self.architecture.platform != other.architecture.platform: @@ -1831,8 +1881,7 @@ class Spec(object): self.variants, self.architecture, self.compiler, - self.compiler_flags, - self.dag_hash()) + self.compiler_flags) def eq_node(self, other): @@ -1946,7 +1995,7 @@ class Spec(object): if self.variants: write(fmt % str(self.variants), c) elif c == '=': - if self.architecture: + if self.architecture and str(self.architecture): write(fmt % (' arch' + c + str(self.architecture)), c) elif c == '#': out.write('-' + fmt % (self.dag_hash(7))) @@ -2004,7 +2053,7 @@ class Spec(object): if self.variants: write(fmt % str(self.variants), '+') elif named_str == 'ARCHITECTURE': - if self.architecture: + if self.architecture and str(self.architecture): write(fmt % str(self.architecture), ' arch=') elif named_str == 'SHA1': if self.dependencies: @@ -2054,13 +2103,13 @@ class Spec(object): self.variants, other.variants) #Target - if self.target != other.target: - return spack.pkgsort.target_compare(pkgname, - self.target, other.target) + if self.architecture != other.architecture: + return spack.pkgsort.architecture_compare(pkgname, + self.architecture, other.architecture) #Dependency is not configurable - if self.dep_hash() != other.dep_hash(): - return -1 if self.dep_hash() < other.dep_hash() else 1 + if self.dependencies != other.dependencies: + return -1 if self.dependencies < other.dependencies else 1 #Equal specs return 0 @@ -2181,6 +2230,11 @@ class SpecParser(spack.parse.Parser): raise SpecParseError(e) + # If the spec has an os or a target and no platform, give it the default platform + for spec in specs: + for s in spec.traverse(): + if s.architecture.os_string or s.architecture.target_string: + s._set_platform(spack.architecture.sys_type()) return specs @@ -2401,7 +2455,6 @@ class SpecError(spack.error.SpackError): def __init__(self, message): super(SpecError, self).__init__(message) - class SpecParseError(SpecError): """Wrapper for ParseError for when we're parsing specs.""" def __init__(self, parse_error): diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 2927e468a0..f5b1068435 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -26,12 +26,14 @@ class ArchitectureTest(MockPackagesTest): def test_dict_functions_for_architecture(self): arch = Arch() + arch.platform = spack.architecture.sys_type() arch.platform_os = arch.platform.operating_system('default_os') arch.target = arch.platform.target('default_target') d = arch.to_dict() new_arch = spack.architecture.arch_from_dict(d) + self.assertEqual(arch, new_arch) self.assertTrue( isinstance(arch, Arch) ) diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 49281b9a0c..963481054e 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -55,8 +55,8 @@ class ConcretizeTest(MockPackagesTest): if abstract.compiler and abstract.compiler.concrete: self.assertEqual(abstract.compiler, concrete.compiler) - if abstract.architecture and abstract.architecture.target.concrete: - self.assertEqual(abstract.target, concrete.target) + if abstract.architecture and abstract.architecture.concrete: + self.assertEqual(abstract.architecture, concrete.architecture) def check_concretize(self, abstract_spec): diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 9bd32a3d10..45c89100d4 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -383,14 +383,14 @@ class SpecSematicsTest(MockPackagesTest): def test_invalid_constraint(self): -# self.check_invalid_constraint('libelf@0:2.0', 'libelf@2.1:3') -# self.check_invalid_constraint('libelf@0:2.5%gcc@4.8:4.9', 'libelf@2.1:3%gcc@4.5:4.7') + self.check_invalid_constraint('libelf@0:2.0', 'libelf@2.1:3') + self.check_invalid_constraint('libelf@0:2.5%gcc@4.8:4.9', 'libelf@2.1:3%gcc@4.5:4.7') -# self.check_invalid_constraint('libelf+debug', 'libelf~debug') -# self.check_invalid_constraint('libelf+debug~foo', 'libelf+debug+foo') -# self.check_invalid_constraint('libelf debug=2', 'libelf debug=1') + self.check_invalid_constraint('libelf+debug', 'libelf~debug') + self.check_invalid_constraint('libelf+debug~foo', 'libelf+debug+foo') + self.check_invalid_constraint('libelf debug=2', 'libelf debug=1') -# self.check_invalid_constraint('libelf cppflags="-O3"', 'libelf cppflags="-O2"') + self.check_invalid_constraint('libelf cppflags="-O3"', 'libelf cppflags="-O2"') platform = spack.architecture.sys_type() if len(platform.operating_sys.keys()) > 1 or len(platform.targets.keys()) > 1: os1 = platform.operating_sys.keys()[0] @@ -439,9 +439,9 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf^foo%gcc', 'libelf^foo%gcc@4.5') self.check_constrain_changed('libelf^foo', 'libelf^foo+debug') self.check_constrain_changed('libelf^foo', 'libelf^foo~debug') + platform = spack.architecture.sys_type() default_target = platform.target('default_target').name - print default_target self.check_constrain_changed('libelf^foo', 'libelf^foo target='+default_target) diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index ae19de177b..4a534d7b5c 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -71,12 +71,6 @@ class SpecSyntaxTest(unittest.TestCase): spec = expected output = spack.spec.parse(spec) - # Remove architectures that get added by parser. - if remove_arch: - for spec in output: - for s in spec.traverse(): - s.architecture = None - parsed = (" ".join(str(spec) for spec in output)) self.assertEqual(expected, parsed) -- cgit v1.2.3-70-g09d2 From 1da6bbd14667b50f8c970022614baf39e059a779 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Mon, 23 May 2016 17:25:54 -0700 Subject: Fixed a couple more bugs --- lib/spack/spack/build_environment.py | 3 ++- lib/spack/spack/concretize.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 4f4ca26cbc..073f73a91a 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -366,7 +366,8 @@ def get_rpaths(pkg): if os.path.isdir(d.prefix.lib64)) # Second module is our compiler mod name. We use that to get rpaths from # module show output. - rpaths.append(get_path_from_module(pkg.compiler.modules[1])) + if pkg.compiler.modules and len(pkg.compiler.modules > 1): + rpaths.append(get_path_from_module(pkg.compiler.modules[1])) return rpaths diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 7ea8ea6928..7a24c1135e 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -210,7 +210,6 @@ class DefaultConcretizer(object): spec.architecture.target = spec.root.architecture.target else: spec.architecture.target = spec.architecture.platform.target('default_target') - print spec.architecture, spec.architecture.platform, spec.architecture.platform_os, spec.architecture.target return True #changed def _concretize_platform(self, spec): -- cgit v1.2.3-70-g09d2 From 513aae5ef8d610644e8f2d2c855e92a080573f5b Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Mon, 23 May 2016 17:39:06 -0700 Subject: fixed bug where earlier test was blowing away environment, causing an error on which('modulecmd') --- lib/spack/spack/test/environment.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/environment.py b/lib/spack/spack/test/environment.py index ded1539e18..a0d959db2f 100644 --- a/lib/spack/spack/test/environment.py +++ b/lib/spack/spack/test/environment.py @@ -24,17 +24,20 @@ ############################################################################## import unittest import os +import copy from spack.environment import EnvironmentModifications class EnvironmentTest(unittest.TestCase): def setUp(self): - os.environ.clear() os.environ['UNSET_ME'] = 'foo' os.environ['EMPTY_PATH_LIST'] = '' os.environ['PATH_LIST'] = '/path/second:/path/third' os.environ['REMOVE_PATH_LIST'] = '/a/b:/duplicate:/a/c:/remove/this:/a/d:/duplicate/:/f/g' + def tearDown(self): + pass + def test_set(self): env = EnvironmentModifications() env.set('A', 'dummy value') -- cgit v1.2.3-70-g09d2 From 84707ed92631bbc4e1c0a7d5c4f1ba19e8e60192 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 24 May 2016 15:23:52 +0200 Subject: modules : it's possible to add suffixes to module files based on constraint --- lib/spack/spack/config.py | 1 + lib/spack/spack/modules.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index c3133697f4..9037c5d796 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -287,6 +287,7 @@ section_schemas = { 'prerequisites': {'$ref': '#/definitions/dependency_selection'}, 'conflict': {'$ref': '#/definitions/array_of_strings'}, 'load': {'$ref': '#/definitions/array_of_strings'}, + 'suffixes': {'$ref': '#/definitions/dictionary_of_strings'}, 'environment': { 'type': 'object', 'default': {}, diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index 9fa92a593f..fb58be6ce0 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -285,11 +285,18 @@ class EnvModule(object): naming_tokens = self.tokens naming_scheme = self.naming_scheme name = naming_scheme.format(**naming_tokens) - name += '-' + self.spec.dag_hash( - ) # Always append the hash to make the module file unique # Not everybody is working on linux... parts = name.split('/') name = join_path(*parts) + # Add optional suffixes based on constraints + configuration, _ = parse_config_options(self) + suffixes = [name] + for constraint, suffix in configuration.get('suffixes', {}).items(): + if constraint in self.spec: + suffixes.append(suffix) + # Always append the hash to make the module file unique + suffixes.append(self.spec.dag_hash()) + name = '-'.join(suffixes) return name @property -- cgit v1.2.3-70-g09d2 From 9c95ec0b299f7f0eb83362318f77e31701708902 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Mon, 2 May 2016 16:41:55 -0700 Subject: Updated and added new versions to the METIS/ParMETIS packages. - Added a 'url_for_version' function to the METIS/ParMETIS packages. - Added installation support for METIS@5.0.2 and ParMETIS@4.0.2. - Changed the 'double' variant to 'real64' to make it more consistent with the 'idx64' variant naming. - Removed an unnecessary dependency on gdb. --- var/spack/repos/builtin/packages/metis/package.py | 35 ++++++++++------------ .../repos/builtin/packages/parmetis/package.py | 18 +++++------ 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 061179b78e..daeaf6245b 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -33,30 +33,30 @@ class Metis(Package): recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes. """ - homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' - url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz" + homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview" + base_url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis" - version('5.1.0', '5465e67079419a69e0116de24fce58fe', - url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz') - version('4.0.3', '5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55', - url='http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz') + version('5.1.0', '5465e67079419a69e0116de24fce58fe') + version('5.0.2', 'acb521a4e8c2e6dd559a7f9abd0468c5') + version('4.0.3', 'd3848b454532ef18dc83e4fb160d1e10') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds the library in debug mode') variant('gdb', default=False, description='Enables gdb support') variant('idx64', default=False, description='Use int64_t as default index type') - variant('double', default=False, description='Use double precision floating point types') + variant('real64', default=False, description='Use double precision floating point types') depends_on('cmake @2.8:', when='@5:') # build-time dependency - depends_on('gdb', when='+gdb') patch('install_gklib_defs_rename.patch', when='@5:') + def url_for_version(self, version): + version_dir = 'OLD/' if version < Version('4.0.3') else '' + return '%s/%smetis-%s.tar.gz' % (Metis.base_url, version_dir, version) @when('@4:4.0.3') def install(self, spec, prefix): - if '+gdb' in spec: raise InstallError('gdb support not implemented in METIS 4!') if '+idx64' in spec: @@ -128,7 +128,6 @@ class Metis(Package): @when('@5:') def install(self, spec, prefix): - options = [] options.extend(std_cmake_args) @@ -140,20 +139,15 @@ class Metis(Package): if '+shared' in spec: options.append('-DSHARED:BOOL=ON') - if '+debug' in spec: - options.extend(['-DDEBUG:BOOL=ON', - '-DCMAKE_BUILD_TYPE:STRING=Debug']) - + options.extend(['-DDEBUG:BOOL=ON', '-DCMAKE_BUILD_TYPE:STRING=Debug']) if '+gdb' in spec: options.append('-DGDB:BOOL=ON') metis_header = join_path(source_directory, 'include', 'metis.h') - if '+idx64' in spec: filter_file('IDXTYPEWIDTH 32', 'IDXTYPEWIDTH 64', metis_header) - - if '+double' in spec: + if '+real64' in spec: filter_file('REALTYPEWIDTH 32', 'REALTYPEWIDTH 64', metis_header) # Make clang 7.3 happy. @@ -166,9 +160,10 @@ class Metis(Package): with working_dir(build_directory, create=True): cmake(source_directory, *options) make() - make("install") + make('install') + # now run some tests: - for f in ["4elt", "copter2", "mdual"]: + for f in ['4elt', 'copter2', 'mdual']: graph = join_path(source_directory,'graphs','%s.graph' % f) Executable(join_path(prefix.bin,'graphchk'))(graph) Executable(join_path(prefix.bin,'gpmetis'))(graph,'2') @@ -182,6 +177,6 @@ class Metis(Package): # install GKlib headers, which will be needed for ParMETIS GKlib_dist = join_path(prefix.include,'GKlib') mkdirp(GKlib_dist) - fs = glob.glob(join_path(source_directory,'GKlib',"*.h")) + fs = glob.glob(join_path(source_directory,'GKlib','*.h')) for f in fs: install(f, GKlib_dist) diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index 2dead4a76a..a8456083b4 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -31,10 +31,12 @@ class Parmetis(Package): ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured graphs, meshes, and for computing fill-reducing orderings of sparse matrices. """ + homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' - url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz' + base_url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis' version('4.0.3', 'f69c479586bf6bb7aff6a9bc0c739628') + version('4.0.2', '0912a953da5bb9b5e5e10542298ffdce') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds the library in debug mode') @@ -42,17 +44,18 @@ class Parmetis(Package): depends_on('cmake @2.8:') # build dependency depends_on('mpi') - - patch('enable_external_metis.patch') depends_on('metis@5:') + patch('enable_external_metis.patch') # bug fixes from PETSc developers # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/ patch('pkg-parmetis-1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b.patch') # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch') - depends_on('gdb', when='+gdb') + def url_for_version(self, version): + version_dir = 'OLD/' if version < Version('3.2.0') else '' + return '%s/%sparmetis-%s.tar.gz' % (Parmetis.base_url, version_dir, version) def install(self, spec, prefix): options = [] @@ -71,18 +74,15 @@ class Parmetis(Package): if '+shared' in spec: options.append('-DSHARED:BOOL=ON') - if '+debug' in spec: - options.extend(['-DDEBUG:BOOL=ON', - '-DCMAKE_BUILD_TYPE:STRING=Debug']) - + options.extend(['-DDEBUG:BOOL=ON', '-DCMAKE_BUILD_TYPE:STRING=Debug']) if '+gdb' in spec: options.append('-DGDB:BOOL=ON') with working_dir(build_directory, create=True): cmake(source_directory, *options) make() - make("install") + make('install') # The shared library is not installed correctly on Darwin; correct this if (sys.platform == 'darwin') and ('+shared' in spec): -- cgit v1.2.3-70-g09d2 From 0ef6843d85a1b74659ed72bda18a72613276d4ec Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Mon, 9 May 2016 15:37:00 -0700 Subject: Improved MPI path specification for ParMETIS using PR #893 features. --- var/spack/repos/builtin/packages/parmetis/package.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index a8456083b4..956a035f7b 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -65,12 +65,10 @@ class Parmetis(Package): source_directory = self.stage.source_path metis_source = join_path(source_directory, 'metis') - # FIXME : Once a contract is defined, MPI compilers should be retrieved indirectly via spec['mpi'] in case - # FIXME : they use a non-standard name options.extend(['-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=spec['metis'].prefix.include), '-DMETIS_PATH:PATH={metis_source}'.format(metis_source=spec['metis'].prefix), - '-DCMAKE_C_COMPILER:STRING=mpicc', - '-DCMAKE_CXX_COMPILER:STRING=mpicxx']) + '-DCMAKE_C_COMPILER:STRING={mpicc}'.format(mpicc=spec['mpi'].mpicc), + '-DCMAKE_CXX_COMPILER:STRING={mpicxx}'.format(mpicxx=spec['mpi'].mpicxx)]) if '+shared' in spec: options.append('-DSHARED:BOOL=ON') -- cgit v1.2.3-70-g09d2 From 064d3584c0f95f19f159f0d7bc51c5172278638f Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Thu, 19 May 2016 09:33:47 -0700 Subject: Updating 'metis' and 'parmetis' to conform to PEP8 standards. --- var/spack/repos/builtin/packages/metis/package.py | 93 +++++++++++----------- .../repos/builtin/packages/parmetis/package.py | 34 ++++---- 2 files changed, 65 insertions(+), 62 deletions(-) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index daeaf6245b..94e6fce6db 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -24,14 +24,17 @@ ############################################################################## from spack import * -import glob, sys, os +import glob +import sys +import os + class Metis(Package): - """ - METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, and producing fill - reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the multilevel - recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes. - """ + """METIS is a set of serial programs for partitioning graphs, partitioning + finite element meshes, and producing fill reducing orderings for sparse + matrices. The algorithms implemented in METIS are based on the + multilevel recursive-bisection, multilevel k-way, and multi-constraint + partitioning schemes.""" homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview" base_url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis" @@ -47,22 +50,20 @@ 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:') # build-time dependency patch('install_gklib_defs_rename.patch', when='@5:') def url_for_version(self, version): - version_dir = 'OLD/' if version < Version('4.0.3') else '' - return '%s/%smetis-%s.tar.gz' % (Metis.base_url, version_dir, version) + verdir = 'OLD/' if version < Version('4.0.3') else '' + return '%s/%smetis-%s.tar.gz' % (Metis.base_url, verdir, version) - @when('@4:4.0.3') + @when('@4') def install(self, spec, prefix): - if '+gdb' in spec: - raise InstallError('gdb support not implemented in METIS 4!') - if '+idx64' in spec: - raise InstallError('idx64 option not implemented in METIS 4!') - if '+double' in spec: - raise InstallError('double option not implemented for METIS 4!') + unsupp_vars = [v for v in ('+gdb', '+idx64', '+real64') if v in spec] + if unsupp_vars: + msg = 'Given variants %s are unsupported by METIS 4!' % unsupp_vars + raise InstallError(msg) options = ['COPTIONS=-fPIC'] if '+debug' in spec: @@ -70,9 +71,10 @@ class Metis(Package): make(*options) mkdir(prefix.bin) - for x in ('pmetis', 'kmetis', 'oemetis', 'onmetis', 'partnmesh', - 'partdmesh', 'mesh2nodal', 'mesh2dual', 'graphchk'): - install(x, prefix.bin) + binfiles = ('pmetis', 'kmetis', 'oemetis', 'onmetis', 'partnmesh', + 'partdmesh', 'mesh2nodal', 'mesh2dual', 'graphchk') + for binfile in binfiles: + install(binfile, prefix.bin) mkdir(prefix.lib) install('libmetis.a', prefix.lib) @@ -82,12 +84,10 @@ class Metis(Package): install(h, prefix.include) mkdir(prefix.share) - for f in (join_path(*p) - for p in (('Programs', 'io.c'), - ('Test','mtest.c'), - ('Graphs','4elt.graph'), - ('Graphs', 'metis.mesh'), - ('Graphs', 'test.mgraph'))): + sharefiles = (('Programs', 'io.c'), ('Test', 'mtest.c'), + ('Graphs', '4elt.graph'), ('Graphs', 'metis.mesh'), + ('Graphs', 'test.mgraph')) + for sharefile in tuple(join_path(*sf) for sf in sharefiles): install(f, prefix.share) if '+shared' in spec: @@ -100,10 +100,10 @@ class Metis(Package): load_flag = '-Wl,-whole-archive' no_load_flag = '-Wl,-no-whole-archive' - os.system(spack_cc + ' -fPIC -shared ' + load_flag + - ' libmetis.a ' + no_load_flag + ' -o libmetis.' + - lib_dsuffix) - install('libmetis.' + lib_dsuffix, prefix.lib) + flags = (self.compiler.cc, load_flag, no_load_flag, lib_dsuffix) + build_cmd = '%s -fPIC -shared %s libmetis.a %s libmetis.%s' % flags + os.system(build_cmd) + install('libmetis.%s' % lib_dsuffix, prefix.lib) # Set up and run tests on installation symlink(join_path(prefix.share, 'io.c'), 'io.c') @@ -125,7 +125,6 @@ class Metis(Package): os.system(join_path(prefix.bin, 'partdmesh') + metis_mesh + ' 10') os.system(join_path(prefix.bin, 'mesh2dual') + metis_mesh) - @when('@5:') def install(self, spec, prefix): options = [] @@ -134,13 +133,14 @@ class Metis(Package): build_directory = join_path(self.stage.path, 'spack-build') source_directory = self.stage.source_path - options.append('-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=source_directory)) + options.append('-DGKLIB_PATH:PATH=%s/GKlib' % source_directory) options.append('-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % prefix) if '+shared' in spec: options.append('-DSHARED:BOOL=ON') if '+debug' in spec: - options.extend(['-DDEBUG:BOOL=ON', '-DCMAKE_BUILD_TYPE:STRING=Debug']) + options.extend(['-DDEBUG:BOOL=ON', + '-DCMAKE_BUILD_TYPE:STRING=Debug']) if '+gdb' in spec: options.append('-DGDB:BOOL=ON') @@ -153,9 +153,10 @@ class Metis(Package): # Make clang 7.3 happy. # Prevents "ld: section __DATA/__thread_bss extends beyond end of file" # See upstream LLVM issue https://llvm.org/bugs/show_bug.cgi?id=27059 - # Adopted from https://github.com/Homebrew/homebrew-science/blob/master/metis.rb + # and https://github.com/Homebrew/homebrew-science/blob/master/metis.rb if spec.satisfies('%clang@7.3.0'): - filter_file('#define MAX_JBUFS 128', '#define MAX_JBUFS 24', join_path(source_directory, 'GKlib', 'error.c')) + filter_file('#define MAX_JBUFS 128', '#define MAX_JBUFS 24', + join_path(source_directory, 'GKlib', 'error.c')) with working_dir(build_directory, create=True): cmake(source_directory, *options) @@ -164,19 +165,19 @@ class Metis(Package): # now run some tests: for f in ['4elt', 'copter2', 'mdual']: - graph = join_path(source_directory,'graphs','%s.graph' % f) - Executable(join_path(prefix.bin,'graphchk'))(graph) - Executable(join_path(prefix.bin,'gpmetis'))(graph,'2') - Executable(join_path(prefix.bin,'ndmetis'))(graph) + graph = join_path(source_directory, 'graphs', '%s.graph' % f) + Executable(join_path(prefix.bin, 'graphchk'))(graph) + Executable(join_path(prefix.bin, 'gpmetis'))(graph, '2') + Executable(join_path(prefix.bin, 'ndmetis'))(graph) - graph = join_path(source_directory,'graphs','test.mgraph') - Executable(join_path(prefix.bin,'gpmetis'))(graph,'2') - graph = join_path(source_directory,'graphs','metis.mesh') - Executable(join_path(prefix.bin,'mpmetis'))(graph,'2') + graph = join_path(source_directory, 'graphs', 'test.mgraph') + Executable(join_path(prefix.bin, 'gpmetis'))(graph, '2') + graph = join_path(source_directory, 'graphs', 'metis.mesh') + Executable(join_path(prefix.bin, 'mpmetis'))(graph, '2') # install GKlib headers, which will be needed for ParMETIS - GKlib_dist = join_path(prefix.include,'GKlib') + GKlib_dist = join_path(prefix.include, 'GKlib') mkdirp(GKlib_dist) - fs = glob.glob(join_path(source_directory,'GKlib','*.h')) - for f in fs: - install(f, GKlib_dist) + hfiles = glob.glob(join_path(source_directory, 'GKlib', '*.h')) + for hfile in hfiles: + install(hfile, GKlib_dist) diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index 956a035f7b..9b36f273e4 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -26,11 +26,11 @@ from spack import * import sys + class Parmetis(Package): - """ - ParMETIS is an MPI-based parallel library that implements a variety of algorithms for partitioning unstructured - graphs, meshes, and for computing fill-reducing orderings of sparse matrices. - """ + """ParMETIS is an MPI-based parallel library that implements a variety of + algorithms for partitioning unstructured graphs, meshes, and for + computing fill-reducing orderings of sparse matrices.""" homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview' base_url = 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis' @@ -42,20 +42,20 @@ 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:') # build dependency depends_on('mpi') depends_on('metis@5:') patch('enable_external_metis.patch') # bug fixes from PETSc developers - # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/ + # https://bitbucket.org/petsc/pkg-parmetis/commits/1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b/raw/ # NOQA: ignore=E501 patch('pkg-parmetis-1c1a9fd0f408dc4d42c57f5c3ee6ace411eb222b.patch') - # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ + # https://bitbucket.org/petsc/pkg-parmetis/commits/82409d68aa1d6cbc70740d0f35024aae17f7d5cb/raw/ # NOQA: ignore=E501 patch('pkg-parmetis-82409d68aa1d6cbc70740d0f35024aae17f7d5cb.patch') def url_for_version(self, version): - version_dir = 'OLD/' if version < Version('3.2.0') else '' - return '%s/%sparmetis-%s.tar.gz' % (Parmetis.base_url, version_dir, version) + verdir = 'OLD/' if version < Version('3.2.0') else '' + return '%s/%sparmetis-%s.tar.gz' % (Parmetis.base_url, verdir, version) def install(self, spec, prefix): options = [] @@ -63,17 +63,19 @@ class Parmetis(Package): build_directory = join_path(self.stage.path, 'spack-build') source_directory = self.stage.source_path - metis_source = join_path(source_directory, 'metis') - options.extend(['-DGKLIB_PATH:PATH={metis_source}/GKlib'.format(metis_source=spec['metis'].prefix.include), - '-DMETIS_PATH:PATH={metis_source}'.format(metis_source=spec['metis'].prefix), - '-DCMAKE_C_COMPILER:STRING={mpicc}'.format(mpicc=spec['mpi'].mpicc), - '-DCMAKE_CXX_COMPILER:STRING={mpicxx}'.format(mpicxx=spec['mpi'].mpicxx)]) + options.extend([ + '-DGKLIB_PATH:PATH=%s/GKlib' % spec['metis'].prefix.include, + '-DMETIS_PATH:PATH=%s' % spec['metis'].prefix, + '-DCMAKE_C_COMPILER:STRING=%s' % spec['mpi'].mpicc, + '-DCMAKE_CXX_COMPILER:STRING=%s' % spec['mpi'].mpicxx + ]) if '+shared' in spec: options.append('-DSHARED:BOOL=ON') if '+debug' in spec: - options.extend(['-DDEBUG:BOOL=ON', '-DCMAKE_BUILD_TYPE:STRING=Debug']) + options.extend(['-DDEBUG:BOOL=ON', + '-DCMAKE_BUILD_TYPE:STRING=Debug']) if '+gdb' in spec: options.append('-DGDB:BOOL=ON') @@ -82,6 +84,6 @@ class Parmetis(Package): make() make('install') - # The shared library is not installed correctly on Darwin; correct this + # The shared library is not installed correctly on Darwin; fix this if (sys.platform == 'darwin') and ('+shared' in spec): fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-70-g09d2 From 1bca69f27281d3bb707bcba41b4f332ab3988509 Mon Sep 17 00:00:00 2001 From: Greg Lee Date: Tue, 24 May 2016 14:54:09 -0700 Subject: updated launchmon url and version --- var/spack/repos/builtin/packages/launchmon/package.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/var/spack/repos/builtin/packages/launchmon/package.py b/var/spack/repos/builtin/packages/launchmon/package.py index f38bc38202..f256810005 100644 --- a/var/spack/repos/builtin/packages/launchmon/package.py +++ b/var/spack/repos/builtin/packages/launchmon/package.py @@ -24,29 +24,19 @@ ############################################################################## from spack import * + class Launchmon(Package): """Software infrastructure that enables HPC run-time tools to co-locate tool daemons with a parallel job.""" - homepage = "http://sourceforge.net/projects/launchmon" - url = "http://downloads.sourceforge.net/project/launchmon/launchmon/1.0.1%20release/launchmon-1.0.1.tar.gz" + homepage = "https://github.com/LLNL/LaunchMON" + url = "https://github.com/LLNL/LaunchMON/releases/download/v1.0.2/launchmon-v1.0.2.tar.gz" # NOQA: ignore=E501 - version('1.0.1', '2f12465803409fd07f91174a4389eb2b') - version('1.0.1-2', git='https://github.com/llnl/launchmon.git', commit='ff7e22424b8f375318951eb1c9282fcbbfa8aadf') + version('1.0.2', '8d6ba77a0ec2eff2fde2c5cc8fa7ff7a') depends_on('autoconf') depends_on('automake') depends_on('libtool') - - def patch(self): - # This patch makes libgcrypt compile correctly with newer gcc versions. - mf = FileFilter('tools/libgcrypt/tests/Makefile.in') - mf.filter(r'(basic_LDADD\s*=\s*.*)', r'\1 -lgpg-error') - mf.filter(r'(tsexp_LDADD\s*=\s*.*)', r'\1 -lgpg-error') - mf.filter(r'(keygen_LDADD\s*=\s*.*)', r'\1 -lgpg-error') - mf.filter(r'(benchmark_LDADD\s*=\s*.*)', r'\1 -lgpg-error') - - def install(self, spec, prefix): configure( "--prefix=" + prefix, -- cgit v1.2.3-70-g09d2 From b5d0a388604f3c33bbbfdc1baff98f54ccdede5b Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 24 May 2016 15:03:21 -0700 Subject: Fixed a few linking/testing bugs in the METIS@:4 install method. --- var/spack/repos/builtin/packages/metis/package.py | 52 ++++++++++++++--------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 94e6fce6db..eb0bdf28de 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -58,8 +58,9 @@ class Metis(Package): verdir = 'OLD/' if version < Version('4.0.3') else '' return '%s/%smetis-%s.tar.gz' % (Metis.base_url, verdir, version) - @when('@4') + @when('@:4') def install(self, spec, prefix): + # Process library spec and options unsupp_vars = [v for v in ('+gdb', '+idx64', '+real64') if v in spec] if unsupp_vars: msg = 'Given variants %s are unsupported by METIS 4!' % unsupp_vars @@ -70,6 +71,7 @@ class Metis(Package): options.append('OPTFLAGS=-g -O0') make(*options) + # Compile and install library files mkdir(prefix.bin) binfiles = ('pmetis', 'kmetis', 'oemetis', 'onmetis', 'partnmesh', 'partdmesh', 'mesh2nodal', 'mesh2dual', 'graphchk') @@ -88,7 +90,7 @@ class Metis(Package): ('Graphs', '4elt.graph'), ('Graphs', 'metis.mesh'), ('Graphs', 'test.mgraph')) for sharefile in tuple(join_path(*sf) for sf in sharefiles): - install(f, prefix.share) + install(sharefile, prefix.share) if '+shared' in spec: if sys.platform == 'darwin': @@ -100,30 +102,38 @@ class Metis(Package): load_flag = '-Wl,-whole-archive' no_load_flag = '-Wl,-no-whole-archive' - flags = (self.compiler.cc, load_flag, no_load_flag, lib_dsuffix) - build_cmd = '%s -fPIC -shared %s libmetis.a %s libmetis.%s' % flags - os.system(build_cmd) + os.system('%s -fPIC -shared %s libmetis.a %s -o libmetis.%s' % \ + (self.compiler.cc, load_flag, no_load_flag, lib_dsuffix)) install('libmetis.%s' % lib_dsuffix, prefix.lib) # Set up and run tests on installation + inc_flags = '-I%s' % prefix.include + lib_flags = '-L%s' % prefix.lib + if '+shared' in spec: + lib_flags += ' -Wl,-rpath=%s' % prefix.lib + symlink(join_path(prefix.share, 'io.c'), 'io.c') symlink(join_path(prefix.share, 'mtest.c'), 'mtest.c') - os.system(spack_cc + ' -I%s' % prefix.include + ' -c io.c') - os.system(spack_cc + ' -I%s' % prefix.include + - ' -L%s' % prefix.lib + ' -lmetis mtest.c io.o -o mtest') - _4eltgraph = join_path(prefix.share, '4elt.graph') - test_mgraph = join_path(prefix.share, 'test.mgraph') - metis_mesh = join_path(prefix.share, 'metis.mesh') - kmetis = join_path(prefix.bin, 'kmetis') - os.system('./mtest ' + _4eltgraph) - os.system(kmetis + ' ' + _4eltgraph + ' 40') - os.system(join_path(prefix.bin, 'onmetis') + ' ' + _4eltgraph) - os.system(join_path(prefix.bin, 'pmetis') + ' ' + test_mgraph + ' 2') - os.system(kmetis + ' ' + test_mgraph + ' 2') - os.system(kmetis + ' ' + test_mgraph + ' 5') - os.system(join_path(prefix.bin, 'partnmesh') + metis_mesh + ' 10') - os.system(join_path(prefix.bin, 'partdmesh') + metis_mesh + ' 10') - os.system(join_path(prefix.bin, 'mesh2dual') + metis_mesh) + + os.system('%s %s -c io.c' % (self.compiler.cc, inc_flags)) + os.system('%s %s %s mtest.c io.o -o mtest -lmetis -lm' % \ + (self.compiler.cc, inc_flags, lib_flags)) + + test_bin = lambda testname: join_path(prefix.bin, testname) + test_graph = lambda graphname: join_path(prefix.share, graphname) + + graph = test_graph('4elt.graph') + os.system('./mtest %s' % graph) + os.system('%s %s 40' % (test_bin('kmetis'), graph)) + os.system('%s %s' % (test_bin('onmetis'), graph)) + graph = test_graph('test.mgraph') + os.system('%s %s 2' % (test_bin('pmetis'), graph)) + os.system('%s %s 2' % (test_bin('kmetis'), graph)) + os.system('%s %s 5' % (test_bin('kmetis'), graph)) + graph = test_graph('metis.mesh') + os.system('%s %s 10' % (test_bin('partnmesh'), graph)) + os.system('%s %s 10' % (test_bin('partdmesh'), graph)) + os.system('%s %s' % (test_bin('mesh2dual'), graph)) @when('@5:') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From c9ba73d931439afd0670bcf6498154724d77cd45 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 24 May 2016 16:05:29 -0700 Subject: Added staging support and improved error handling for METIS@:4 installs. --- var/spack/repos/builtin/packages/metis/package.py | 27 +++++++++-------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index eb0bdf28de..65595229c0 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -72,6 +72,8 @@ class Metis(Package): make(*options) # Compile and install library files + ccompile = Executable(self.compiler.cc) + mkdir(prefix.bin) binfiles = ('pmetis', 'kmetis', 'oemetis', 'onmetis', 'partnmesh', 'partdmesh', 'mesh2nodal', 'mesh2dual', 'graphchk') @@ -86,8 +88,7 @@ class Metis(Package): install(h, prefix.include) mkdir(prefix.share) - sharefiles = (('Programs', 'io.c'), ('Test', 'mtest.c'), - ('Graphs', '4elt.graph'), ('Graphs', 'metis.mesh'), + sharefiles = (('Graphs', '4elt.graph'), ('Graphs', 'metis.mesh'), ('Graphs', 'test.mgraph')) for sharefile in tuple(join_path(*sf) for sf in sharefiles): install(sharefile, prefix.share) @@ -102,28 +103,20 @@ class Metis(Package): load_flag = '-Wl,-whole-archive' no_load_flag = '-Wl,-no-whole-archive' - os.system('%s -fPIC -shared %s libmetis.a %s -o libmetis.%s' % \ - (self.compiler.cc, load_flag, no_load_flag, lib_dsuffix)) - install('libmetis.%s' % lib_dsuffix, prefix.lib) + ccompile('-fPIC', '-shared', load_flag, 'libmetis.a', no_load_flag, + '-o', '%s/libmetis.%s' % (prefix.lib, lib_dsuffix)) # Set up and run tests on installation - inc_flags = '-I%s' % prefix.include - lib_flags = '-L%s' % prefix.lib - if '+shared' in spec: - lib_flags += ' -Wl,-rpath=%s' % prefix.lib - - symlink(join_path(prefix.share, 'io.c'), 'io.c') - symlink(join_path(prefix.share, 'mtest.c'), 'mtest.c') - - os.system('%s %s -c io.c' % (self.compiler.cc, inc_flags)) - os.system('%s %s %s mtest.c io.o -o mtest -lmetis -lm' % \ - (self.compiler.cc, inc_flags, lib_flags)) + ccompile('-I%s' % prefix.include, '-L%s' % prefix.lib, + '-Wl,-rpath=%s' % (prefix.lib if '+shared' in spec else ''), + join_path('Programs', 'io.o'), join_path('Test', 'mtest.c'), + '-o', '%s/mtest' % prefix.bin, '-lmetis', '-lm') test_bin = lambda testname: join_path(prefix.bin, testname) test_graph = lambda graphname: join_path(prefix.share, graphname) graph = test_graph('4elt.graph') - os.system('./mtest %s' % graph) + os.system('%s %s' % (test_bin('mtest'), graph)) os.system('%s %s 40' % (test_bin('kmetis'), graph)) os.system('%s %s' % (test_bin('onmetis'), graph)) graph = test_graph('test.mgraph') -- cgit v1.2.3-70-g09d2 From 483ec0d76275521579b2d1c93620a37841159e36 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Tue, 24 May 2016 16:13:52 -0700 Subject: Added preliminary improved testing code for METIS@:4. --- var/spack/repos/builtin/packages/metis/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 65595229c0..5ccc04bd5e 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -128,6 +128,25 @@ class Metis(Package): os.system('%s %s 10' % (test_bin('partdmesh'), graph)) os.system('%s %s' % (test_bin('mesh2dual'), graph)) + # TODO: The following code should replace the testing code in the + # block above since it causes installs to fail when one or more of the + # Metis tests fail, but it currently doesn't work because the 'mtest', + # 'onmetis', and 'partnmesh' tests return error codes that trigger + # false positives for failure. + """ + Executable(test_bin('mtest'))(test_graph('4elt.graph')) + Executable(test_bin('kmetis'))(test_graph('4elt.graph'), '40') + Executable(test_bin('onmetis'))(test_graph('4elt.graph')) + + Executable(test_bin('pmetis'))(test_graph('test.mgraph'), '2') + Executable(test_bin('kmetis'))(test_graph('test.mgraph'), '2') + Executable(test_bin('kmetis'))(test_graph('test.mgraph'), '5') + + Executable(test_bin('partnmesh'))(test_graph('metis.mesh'), '10') + Executable(test_bin('partdmesh'))(test_graph('metis.mesh'), '10') + Executable(test_bin('mesh2dual'))(test_graph('metis.mesh')) + """ + @when('@5:') def install(self, spec, prefix): options = [] -- cgit v1.2.3-70-g09d2 From 74dc7ffe4d9824f916c37b151e9ebe63a184c705 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 25 May 2016 10:56:12 -0700 Subject: updated documentation for cflags PR --- lib/spack/docs/basic_usage.rst | 155 +++++++++++++++++++++++++++---------- lib/spack/docs/configuration.rst | 12 +-- lib/spack/docs/features.rst | 17 ++-- lib/spack/docs/packaging_guide.rst | 48 +++++++----- 4 files changed, 158 insertions(+), 74 deletions(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 6efed83621..2eed9dddd4 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -102,8 +102,8 @@ that the packages is installed: ==> adept-utils is already installed in /home/gamblin2/spack/opt/chaos_5_x86_64_ib/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=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=chaos_5_x86_64_ib-59f6ad23. + ==> 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. ==> No patches needed for mpileaks. ==> Building mpileaks. @@ -132,10 +132,10 @@ sites, as installing a version that one user needs will not disrupt existing installations for other users. In addition to different versions, Spack can customize the compiler, -compile-time options (variants), and platform (for cross compiles) of -an installation. Spack is unique in that it can also configure the -*dependencies* a package is built with. For example, two -configurations of the same version of a package, one built with boost +compile-time options (variants), compiler flags, and platform (for +cross compiles) of an installation. Spack is unique in that it can +also configure the *dependencies* a package is built with. For example, +two configurations of the same version of a package, one built with boost 1.39.0, and the other version built with version 1.43.0, can coexist. This can all be done on the command line using the *spec* syntax. @@ -334,6 +334,11 @@ of libelf would look like this: -- chaos_5_x86_64_ib / gcc@4.4.7 -------------------------------- libdwarf@20130729-d9b90962 +We can also search for packages that have a certain attribute. For example, +``spack find -l libdwarf +debug`` will show only installations of libdwarf +with the 'debug' compile-time option enabled, while ``spack find -l +debug`` +will find every installed package with a 'debug' compile-time option enabled. + The full spec syntax is discussed in detail in :ref:`sec-specs`. @@ -463,6 +468,26 @@ For compilers, like ``clang``, that do not support Fortran, put Once you save the file, the configured compilers will show up in the 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,:: + + ... + chaos_5_x86_64_ib: + ... + intel@15.0.0: + 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 + cppflags: -O3 -fPIC + ... + +These flags will be treated by spack as if they were enterred from +the command line each time this compiler is used. The compiler wrappers +then inject those flags into the compiler command. Compiler flags +enterred from the command line will be discussed in more detail in the +following section. .. _sec-specs: @@ -480,7 +505,7 @@ the full syntax of specs. 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 =bgqos_0 ^callpath @1.1 %gcc@4.7.2 + mpileaks @1.2:1.4 %gcc@4.7.5 +debug -qt arch=bgq_os ^callpath @1.1 %gcc@4.7.2 If provided to ``spack install``, this will install the ``mpileaks`` library at some version between ``1.2`` and ``1.4`` (inclusive), @@ -498,8 +523,12 @@ More formally, a spec consists of the following pieces: * ``%`` Optional compiler specifier, with an optional compiler version (``gcc`` or ``gcc@4.7.3``) * ``+`` or ``-`` or ``~`` Optional variant specifiers (``+debug``, - ``-qt``, or ``~qt``) -* ``=`` Optional architecture specifier (``bgqos_0``) + ``-qt``, or ``~qt``) for boolean variants +* ``name=`` Optional variant specifiers that are not restricted to +boolean variants +* ``name=`` Optional compiler flag specifiers. Valid flag names are +``cflags``, ``cxxflags``, ``fflags``, ``cppflags``, ``ldflags``, and ``ldlibs``. +* ``arch=`` Optional architecture specifier (``arch=bgq_os``) * ``^`` Dependency specs (``^callpath@1.1``) There are two things to notice here. The first is that specs are @@ -579,7 +608,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 ``=bgqos_0`` all associate with the ``mpileaks`` package. +``-qt``, and ``arch=bgq_os`` 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 @@ -635,22 +664,25 @@ based on site policies. Variants ~~~~~~~~~~~~~~~~~~~~~~~ -.. Note:: - - Variants are not yet supported, but will be in the next Spack - release (0.9), due in Q2 2015. - -Variants are named options associated with a particular package, and -they can be turned on or off. For example, above, supplying -``+debug`` causes ``mpileaks`` to be built with debug flags. The -names of particular variants available for a package depend on what -was provided by the package author. ``spack info `` will +Variants are named options associated with a particular package. They are +optional, as each package must provide default values for each variant it +makes available. Variants can be specified using +a flexible parameter syntax ``name=``. For example, +``spack install libelf debug=True`` will install libelf build with debug +flags. The names of particular variants available for a package depend on +what was provided by the package author. ``spack into `` will provide information on what build variants are available. -Depending on the package a variant may be on or off by default. For -``mpileaks`` here, ``debug`` is off by default, and we turned it on -with ``+debug``. If a package is on by default you can turn it off by -either adding ``-name`` or ``~name`` to the spec. +For compatibility with earlier versions, variants which happen to be +boolean in nature can be specified by a syntax that represents turning +options on and off. For example, in the previous spec we could have +supplied ``libelf +debug`` with the same effect of enabling the debug +compile time option for the libelf package. + +Depending on the package a variant may have any default value. For +``libelf`` here, ``debug`` is ``False`` by default, and we turned it on +with ``debug=True`` or ``+debug``. If a package is ``True`` by default +you can turn it off by either adding ``-name`` or ``~name`` to the spec. There are two syntaxes here because, depending on context, ``~`` and ``-`` may mean different things. In most shells, the following will @@ -662,7 +694,7 @@ result in the shell performing home directory substitution: mpileaks~debug # use this instead If there is a user called ``debug``, the ``~`` will be incorrectly -expanded. In this situation, you would want to write ``mpileaks +expanded. In this situation, you would want to write ``libelf -debug``. However, ``-`` can be ambiguous when included after a package name without spaces: @@ -677,12 +709,35 @@ package, not a request for ``mpileaks`` built without ``debug`` options. In this scenario, you should write ``mpileaks~debug`` to avoid ambiguity. -When spack normalizes specs, it prints them out with no spaces and -uses only ``~`` for disabled variants. We allow ``-`` and spaces on -the command line is provided for convenience and legibility. +When spack normalizes specs, it prints them out with no spaces boolean +variants using the backwards compatibility syntax and uses only ``~`` +for disabled boolean variants. We allow ``-`` and spaces on the command +line is provided for convenience and legibility. -Architecture specifier +Compiler Flags +~~~~~~~~~~~~~~~~~~~~~~~ + +Compiler flags are specified using the same syntax as non-boolean variants, +but fulfill a different purpose. While the function of a variant is set by +the package, compiler flags are used by the compiler wrappers to inject +flags into the compile line of the build. Additionally, compiler flags are +inherited by dependencies. ``spack install libdwarf cppflags=\"-g\"`` will +install both libdwarf and libelf with the ``-g`` flag injected into their +compile line. + +Notice that the value of the compiler flags must be escape quoted on the +command line. From within python files, the same spec would be specified +``libdwarf cppflags="-g"``. This is necessary because of how the shell +handles the quote symbols. + +The six compiler flags are injected in the order of implicit make commands +in gnu autotools. If all flags are set, the order is +``$cppflags $cflags|$cxxflags $ldflags command $ldlibs`` for C and C++ and +``$fflags $cppflags $ldflags command $ldlibs`` for fortran. + + +Architecture specifiers ~~~~~~~~~~~~~~~~~~~~~~~ .. Note:: @@ -690,12 +745,9 @@ Architecture specifier Architecture specifiers are part of specs but are not yet functional. They will be in Spack version 1.0, due in Q3 2015. -The architecture specifier starts with a ``=`` and also comes after -some package name within a spec. It allows a user to specify a -particular architecture for the package to be built. This is mostly -used for architectures that need cross-compilation, and in most cases, -users will not need to specify the architecture when they install a -package. +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``). .. _sec-virtual-dependencies: @@ -773,6 +825,23 @@ any MPI implementation will do. If another package depends on error. Likewise, if you try to plug in some package that doesn't provide MPI, Spack will raise an error. +Specifying Specs by Hash +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Complicated specs can become cumbersome to enter on the command line, +especially when many of the qualifications are necessary to +distinguish between similar installs, for example when using the +``uninstall`` command. To avoid this, when referencing an existing spec, +Spack allows you to reference specs by their hash. We previously +discussed the spec hash that Spack computes. In place of a spec in any +command, substitute ``/`` where ```` is any amount from +the beginning of a spec hash. If the given spec hash is sufficient +to be unique, Spack will replace the reference with the spec to which +it refers. Otherwise, it will prompt for a more qualified hash. + +Note that this will not work to reinstall a depencency uninstalled by +``spack uninstall -f``. + .. _spack-providers: ``spack providers`` @@ -1002,8 +1071,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=chaos_5_x86_64_ib - libelf@0.8.13%intel@15.0.0=chaos_5_x86_64_ib + 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 You can either type the ``spack load`` command again with a fully qualified argument, or you can add just enough extra constraints to @@ -1282,7 +1351,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=chaos_5_x86_64_ib-703c7a96 + ==> python@2.7.8%gcc@4.4.7 arch=chaos_5_x86_64_ib-703c7a96 ==> 36 extensions: geos py-ipython py-pexpect py-pyside py-sip py-basemap py-libxml2 py-pil py-pytz py-six @@ -1372,9 +1441,9 @@ installation: .. code-block:: sh $ spack activate py-numpy - ==> Activated extension py-setuptools@11.3.1%gcc@4.4.7=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=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=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=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. Several things have happened here. The user requested that ``py-numpy`` be activated in the ``python`` installation it was built @@ -1389,7 +1458,7 @@ packages listed as activated: .. code-block:: sh $ spack extensions python - ==> python@2.7.8%gcc@4.4.7=chaos_5_x86_64_ib-703c7a96 + ==> python@2.7.8%gcc@4.4.7 arch=chaos_5_x86_64_ib-703c7a96 ==> 36 extensions: geos py-ipython py-pexpect py-pyside py-sip py-basemap py-libxml2 py-pil py-pytz py-six @@ -1437,7 +1506,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=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=chaos_5_x86_64_ib-66733244 for python@2.7.8%gcc@4.4.7. .. _spack-deactivate: diff --git a/lib/spack/docs/configuration.rst b/lib/spack/docs/configuration.rst index c0b79a7f44..c613071c65 100644 --- a/lib/spack/docs/configuration.rst +++ b/lib/spack/docs/configuration.rst @@ -70,9 +70,9 @@ directory. Here's an example of an external configuration: packages: openmpi: paths: - openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib: /opt/openmpi-1.4.3 - openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib+debug: /opt/openmpi-1.4.3-debug - openmpi@1.6.5%intel@10.1=chaos_5_x86_64_ib: /opt/openmpi-1.6.5-intel + 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 This example lists three installations of OpenMPI, one built with gcc, one built with gcc and debug information, and another built with Intel. @@ -108,9 +108,9 @@ be: packages: openmpi: paths: - openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib: /opt/openmpi-1.4.3 - openmpi@1.4.3%gcc@4.4.7=chaos_5_x86_64_ib+debug: /opt/openmpi-1.4.3-debug - openmpi@1.6.5%intel@10.1=chaos_5_x86_64_ib: /opt/openmpi-1.6.5-intel + 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 buildable: False The addition of the ``buildable`` flag tells Spack that it should never build diff --git a/lib/spack/docs/features.rst b/lib/spack/docs/features.rst index 0998ba8da4..27a3b4b435 100644 --- a/lib/spack/docs/features.rst +++ b/lib/spack/docs/features.rst @@ -31,14 +31,21 @@ platform, all on the command line. # Specify a compiler (and its version), with % $ spack install mpileaks@1.1.2 %gcc@4.7.3 - # Add special compile-time options with + + # Add special compile-time options by name + $ spack install mpileaks@1.1.2 %gcc@4.7.3 debug=True + + # Add special boolean compile-time options with + $ spack install mpileaks@1.1.2 %gcc@4.7.3 +debug - # Cross-compile for a different architecture with = - $ spack install mpileaks@1.1.2 =bgqos_0 + # Add compiler flags using the conventional names + $ spack install mpileaks@1.1.2 %gcc@4.7.3 cppflags=\"-O3 -floop-block\" + + # Cross-compile for a different architecture with arch= + $ spack install mpileaks@1.1.2 arch=bgqos_0 -Users can specify as many or few options as they care about. Spack -will fill in the unspecified values with sensible defaults. +Users can specify as many or few options as they care about. Spack +will fill in the unspecified values with sensible defaults. The two listed +syntaxes for variants are identical when the value is boolean. Customize dependencies diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 63c411ffb5..1f83f611b0 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -1221,11 +1221,13 @@ just as easily provide a version range: depends_on("libelf@0.8.2:0.8.4:") -Or a requirement for a particular variant: +Or a requirement for a particular variant or compiler flags: .. code-block:: python depends_on("libelf@0.8+debug") + depends_on('libelf debug=True') + depends_on('libelf cppflags="-fPIC") Both users *and* package authors can use the same spec syntax to refer to different package configurations. Users use the spec syntax on the @@ -1623,21 +1625,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=linux-ppc64 - ^callpath@1.0%gcc@4.7.3+debug=linux-ppc64 - ^dyninst@8.1.2%gcc@4.7.3=linux-ppc64 - ^libdwarf@20130729%gcc@4.7.3=linux-ppc64 - ^libelf@0.8.11%gcc@4.7.3=linux-ppc64 - ^mpich@3.0.4%gcc@4.7.3=linux-ppc64 + 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 .. graphviz:: digraph { - "mpileaks@2.3\n%gcc@4.7.3\n=linux-ppc64" -> "mpich@3.0.4\n%gcc@4.7.3\n=linux-ppc64" - "mpileaks@2.3\n%gcc@4.7.3\n=linux-ppc64" -> "callpath@1.0\n%gcc@4.7.3+debug\n=linux-ppc64" -> "mpich@3.0.4\n%gcc@4.7.3\n=linux-ppc64" - "callpath@1.0\n%gcc@4.7.3+debug\n=linux-ppc64" -> "dyninst@8.1.2\n%gcc@4.7.3\n=linux-ppc64" - "dyninst@8.1.2\n%gcc@4.7.3\n=linux-ppc64" -> "libdwarf@20130729\n%gcc@4.7.3\n=linux-ppc64" -> "libelf@0.8.11\n%gcc@4.7.3\n=linux-ppc64" - "dyninst@8.1.2\n%gcc@4.7.3\n=linux-ppc64" -> "libelf@0.8.11\n%gcc@4.7.3\n=linux-ppc64" + "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" } Here, all versions, compilers, and platforms are filled in, and there @@ -1666,9 +1668,9 @@ running ``spack spec``. For example: ^libdwarf ^libelf - dyninst@8.0.1%gcc@4.7.3=linux-ppc64 - ^libdwarf@20130729%gcc@4.7.3=linux-ppc64 - ^libelf@0.8.13%gcc@4.7.3=linux-ppc64 + 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 This is useful when you want to know exactly what Spack will do when you ask for a particular spec. @@ -1908,6 +1910,12 @@ the command line. ``$rpath_flag`` can be overriden on a compiler specific basis in ``lib/spack/spack/compilers/$compiler.py``. +The compiler wrappers also pass the compiler flags specified by the user from +the command line (``cflags``, ``cxxflags``, ``fflags``, ``cppflags``, ``ldflags``, +and/or ``ldlibs``). They do not override the canonical autotools flags with the +same names (but in ALL-CAPS) that may be passed into the build by particularly +challenging package scripts. + Compiler flags ~~~~~~~~~~~~~~ In rare circumstances such as compiling and running small unit tests, a package @@ -2154,12 +2162,12 @@ example: def install(self, prefix): # Do default install - @when('=chaos_5_x86_64_ib') + @when('arch=chaos_5_x86_64_ib') 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('=bgqos_0") + @when('arch=bgqos_0") def install(self, prefix): # This will be executed if the package's sys_type is bgqos_0 @@ -2749,11 +2757,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=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=linux-ppc64. + ==> 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. $ spack cd libelf $ pwd - /Users/gamblin2/src/spack/var/spack/stage/libelf@0.8.13%gcc@4.8.3=linux-ppc64/libelf-0.8.13 + /Users/gamblin2/src/spack/var/spack/stage/libelf@0.8.13%gcc@4.8.3 arch=linux-ppc64/libelf-0.8.13 ``spack cd`` here changed he current working directory to the directory containing the expanded ``libelf`` source code. There are a -- cgit v1.2.3-70-g09d2 From 3a68dd2011488acdff4e3c8cb4690718e87623e6 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 25 May 2016 12:22:16 -0700 Subject: (hopefully) final fixes of the merge --- lib/spack/spack/architecture.py | 13 +++++++++++-- lib/spack/spack/spec.py | 9 +++++++++ lib/spack/spack/test/modules.py | 19 +++++++++++-------- lib/spack/spack/test/spec_dag.py | 4 ++-- lib/spack/spack/test/spec_semantics.py | 17 +++++------------ 5 files changed, 38 insertions(+), 24 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 05dc969ebe..e9dd489e54 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -233,8 +233,17 @@ class Platform(object): return self.name def _cmp_key(self): - return (self.name, (_cmp_key(t) for t in self.targets.values()), - (_cmp_key(o) for o in self.operating_sys.values())) + t_keys = ''.join(str(t._cmp_key()) for t in sorted(self.targets.values())) + o_keys = ''.join(str(o._cmp_key()) for o in sorted(self.operating_sys.values())) + return (self.name, + self.default, + self.front_end, + self.back_end, + self.default_os, + self.front_os, + self.back_os, + t_keys, + o_keys) @key_ordering class OperatingSystem(object): diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index d15598405f..5d82af4af6 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1649,9 +1649,18 @@ class Spec(object): # TODO: Need to make sure that comparisons can be made via classes if self.architecture and other.architecture: + print self.architecture, other.architecture if ((self.architecture.platform and other.architecture.platform and self.architecture.platform != other.architecture.platform) or (self.architecture.platform_os and other.architecture.platform_os and self.architecture.platform_os != other.architecture.platform_os) or (self.architecture.target and other.architecture.target and self.architecture.target != other.architecture.target)): + d1 = self.architecture.platform.to_dict() + d2 = other.architecture.platform.to_dict() + print d1 + print d2 + print d1==d2 + print self.architecture.platform == other.architecture.platform + print self.architecture.platform._cmp_key() + print other.architecture.platform._cmp_key() return False elif strict and ((other.architecture and not self.architecture) or (other.architecture.platform and not self.architecture.platform) or diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index c73badf8f2..582e067860 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -73,7 +73,7 @@ configuration_alter_environment = { 'all': { 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']} }, - 'arch=x86-linux': { + 'platform=test target=x86_64': { 'environment': {'set': {'FOO': 'foo'}, 'unset': ['BAR']} } @@ -116,6 +116,7 @@ class TclTests(MockPackagesTest): def get_modulefile_content(self, spec): spec.concretize() + print spec, '&&&&&' generator = spack.modules.TclModule(spec) generator.write() content = FILE_REGISTRY[generator.file_name].split('\n') @@ -123,27 +124,28 @@ class TclTests(MockPackagesTest): def test_simple_case(self): spack.modules.CONFIGURATION = configuration_autoload_direct - spec = spack.spec.Spec('mpich@3.0.4 arch=x86-linux') + spec = spack.spec.Spec('mpich@3.0.4') content = self.get_modulefile_content(spec) self.assertTrue('module-whatis "mpich @3.0.4"' in content) def test_autoload(self): spack.modules.CONFIGURATION = configuration_autoload_direct - spec = spack.spec.Spec('mpileaks arch=x86-linux') + spec = spack.spec.Spec('mpileaks') content = self.get_modulefile_content(spec) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 2) self.assertEqual(len([x for x in content if 'module load ' in x]), 2) spack.modules.CONFIGURATION = configuration_autoload_all - spec = spack.spec.Spec('mpileaks arch=x86-linux') + spec = spack.spec.Spec('mpileaks') content = self.get_modulefile_content(spec) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 5) self.assertEqual(len([x for x in content if 'module load ' in x]), 5) def test_alter_environment(self): spack.modules.CONFIGURATION = configuration_alter_environment - spec = spack.spec.Spec('mpileaks arch=x86-linux') + spec = spack.spec.Spec('mpileaks platform=test target=x86_64') content = self.get_modulefile_content(spec) + print content self.assertEqual( len([x for x in content @@ -152,8 +154,9 @@ class TclTests(MockPackagesTest): len([x for x in content if 'setenv FOO "foo"' in x]), 1) self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 1) - spec = spack.spec.Spec('libdwarf arch=x64-linux') + spec = spack.spec.Spec('libdwarf %clang platform=test target=x86_32') content = self.get_modulefile_content(spec) + print content self.assertEqual( len([x for x in content @@ -164,14 +167,14 @@ class TclTests(MockPackagesTest): def test_blacklist(self): spack.modules.CONFIGURATION = configuration_blacklist - spec = spack.spec.Spec('mpileaks arch=x86-linux') + spec = spack.spec.Spec('mpileaks') content = self.get_modulefile_content(spec) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 1) self.assertEqual(len([x for x in content if 'module load ' in x]), 1) def test_conflicts(self): spack.modules.CONFIGURATION = configuration_conflicts - spec = spack.spec.Spec('mpileaks arch=x86-linux') + spec = spack.spec.Spec('mpileaks') content = self.get_modulefile_content(spec) self.assertEqual( len([x for x in content if x.startswith('conflict')]), 2) diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index 99a986a528..712f07ac4d 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -244,8 +244,8 @@ class SpecDagTest(MockPackagesTest): def test_unsatisfiable_architecture(self): platform = spack.architecture.sys_type() - self.set_pkg_dep('mpileaks', 'mpich target=%s' % platform.target('default_target')) - spec = Spec('mpileaks ^mpich target=sles_10_ppc64 ^callpath ^dyninst ^libelf ^libdwarf') + self.set_pkg_dep('mpileaks', 'mpich platform=test target=be') + spec = Spec('mpileaks ^mpich platform=test target=fe ^callpath ^dyninst ^libelf ^libdwarf') self.assertRaises(spack.spec.UnsatisfiableArchitectureSpecError, spec.normalize) diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 45c89100d4..aa99ad71ed 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -141,10 +141,9 @@ class SpecSematicsTest(MockPackagesTest): def test_satisfies_architecture(self): platform = spack.architecture.sys_type() - if platform.name == 'crayxc': - self.check_satisfies('foo target=frontend os=frontend', 'target=frontend os=frontend') - self.check_satisfies('foo target=backend os=backend', 'target=backend', 'os=backend') - self.check_satisfies('foo target=default_target os=default_os','target=default_target os=default_os') + self.check_satisfies('foo platform=test target=frontend os=frontend', 'platform=test target=frontend os=frontend') + self.check_satisfies('foo platform=test target=backend os=backend', 'platform=test target=backend', 'platform=test os=backend') + self.check_satisfies('foo platform=test target=default_target os=default_os','platform=test target=default_target os=default_os') #ifdef NEW @@ -391,14 +390,8 @@ class SpecSematicsTest(MockPackagesTest): self.check_invalid_constraint('libelf debug=2', 'libelf debug=1') self.check_invalid_constraint('libelf cppflags="-O3"', 'libelf cppflags="-O2"') - platform = spack.architecture.sys_type() - if len(platform.operating_sys.keys()) > 1 or len(platform.targets.keys()) > 1: - os1 = platform.operating_sys.keys()[0] - os2 = platform.operating_sys.keys()[-1] - target1 = platform.targets.keys()[0] - target2 = platform.targets.keys()[-1] - self.check_invalid_constraint('libelf target=%s os=%s' % (target1, os1), - 'libelf target=%s os=%s' % (target2, os2)) + self.check_invalid_constraint('libelf platform=test target=be os=be', + 'libelf target=fe os=fe') def test_constrain_changed(self): self.check_constrain_changed('libelf', '@1.0') -- cgit v1.2.3-70-g09d2 From 734fb459a45896ee41881ca906643bd362be3e37 Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Wed, 25 May 2016 12:27:52 -0700 Subject: Fixing a small bug with metis@4+shared installs on the Mac platform. --- var/spack/repos/builtin/packages/metis/package.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 5ccc04bd5e..c4f2afaff2 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -94,17 +94,19 @@ class Metis(Package): install(sharefile, prefix.share) if '+shared' in spec: + shared_flags = ['-fPIC', '-shared'] if sys.platform == 'darwin': - lib_dsuffix = 'dylib' - load_flag = '-Wl,-all_load' - no_load_flag = '' + shared_suffix = 'dylib' + shared_flags.extend(['-Wl,-all_load', 'libmetis.a']) else: - lib_dsuffix = 'so' - load_flag = '-Wl,-whole-archive' - no_load_flag = '-Wl,-no-whole-archive' + shared_suffix = 'so' + shared_flags.extend(['-Wl,-whole-archive', 'libmetis.a', + '-Wl,-no-whole-archive']) - ccompile('-fPIC', '-shared', load_flag, 'libmetis.a', no_load_flag, - '-o', '%s/libmetis.%s' % (prefix.lib, lib_dsuffix)) + shared_out = '%s/libmetis.%s' % (prefix.lib, shared_suffix) + shared_flags.extend(['-o', shared_out]) + + ccompile(*shared_flags) # Set up and run tests on installation ccompile('-I%s' % prefix.include, '-L%s' % prefix.lib, @@ -128,7 +130,7 @@ class Metis(Package): os.system('%s %s 10' % (test_bin('partdmesh'), graph)) os.system('%s %s' % (test_bin('mesh2dual'), graph)) - # TODO: The following code should replace the testing code in the + # FIXME: The following code should replace the testing code in the # block above since it causes installs to fail when one or more of the # Metis tests fail, but it currently doesn't work because the 'mtest', # 'onmetis', and 'partnmesh' tests return error codes that trigger -- cgit v1.2.3-70-g09d2 From 0f40174723612c60ca7bdc0ed0ce1e96daa643bd Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 25 May 2016 12:28:59 -0700 Subject: added test platform --- lib/spack/spack/platforms/test.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/spack/spack/platforms/test.py diff --git a/lib/spack/spack/platforms/test.py b/lib/spack/spack/platforms/test.py new file mode 100644 index 0000000000..3a4f9d5f2d --- /dev/null +++ b/lib/spack/spack/platforms/test.py @@ -0,0 +1,28 @@ +import subprocess +from spack.architecture import Platform, Target +from spack.operating_systems.linux_distro import LinuxDistro +from spack.operating_systems.cnl import Cnl + + +class Test(Platform): + priority = 1000000 + front_end = 'x86_32' + back_end = 'x86_64' + default = 'x86_64' + + back_os = 'CNL' + default_os = 'CNL' + + def __init__(self): + super(Test, self).__init__('test') + self.add_target(self.default, Target(self.default)) + self.add_target(self.front_end, Target(self.front_end)) + + self.add_operating_system(self.default_os, Cnl()) + linux_dist = LinuxDistro() + self.front_os = linux_dist.name + self.add_operating_system(self.front_os, linux_dist) + + @classmethod + def detect(self): + return True -- cgit v1.2.3-70-g09d2 From 8f99334f11edd4b56f3e9bc88d2f8666cf0a37a1 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 25 May 2016 16:06:14 -0700 Subject: Fixed test config to work on yosemite --- lib/spack/spack/architecture.py | 38 +++++++++++++++--------------- lib/spack/spack/test/mock_packages_test.py | 24 ++++++++++++++++++- 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index e9dd489e54..5d16a2f5f5 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -22,26 +22,26 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -""" -This module contains all the elements that are required to create an -architecture object. These include, the target processor, the operating system, -and the architecture platform (i.e. cray, darwin, linux, bgq, etc) classes. +""" +This module contains all the elements that are required to create an +architecture object. These include, the target processor, the operating system, +and the architecture platform (i.e. cray, darwin, linux, bgq, etc) classes. -On a multiple architecture machine, the architecture spec field can be set to -build a package against any target and operating system that is present on the +On a multiple architecture machine, the architecture spec field can be set to +build a package against any target and operating system that is present on the platform. On Cray platforms or any other architecture that has different front and back end environments, the operating system will determine the method of compiler -detection. +detection. -There are two different types of compiler detection: +There are two different types of compiler detection: 1. Through the $PATH env variable (front-end detection) 2. Through the tcl module system. (back-end detection) Depending on which operating system is specified, the compiler will be detected -using one of those methods. +using one of those methods. For platforms such as linux and darwin, the operating system is autodetected and -the target is set to be x86_64. +the target is set to be x86_64. The command line syntax for specifying an architecture is as follows: @@ -52,27 +52,27 @@ the command line and Spack will concretize using the default. These defaults are set in the 'platforms/' directory which contains the different subclasses for platforms. If the machine has multiple architectures, the user can also enter front-end, or fe or back-end or be. These settings will concretize -to their respective front-end and back-end targets and operating systems. +to their respective front-end and back-end targets and operating systems. Additional platforms can be added by creating a subclass of Platform -and adding it inside the platform directory. +and adding it inside the platform directory. Platforms are an abstract class that are extended by subclasses. If the user wants to add a new type of platform (such as cray_xe), they can create a subclass -and set all the class attributes such as priority, front_target ,back_target, +and set all the class attributes such as priority, front_target ,back_target, front_os, back_os. Platforms also contain a priority class attribute. A lower number signifies higher priority. These numbers are arbitrarily set and can be changed though often there isn't much need unless a new platform is added and -the user wants that to be detected first. +the user wants that to be detected first. Targets are created inside the platform subclasses. Most architecture (like linux, and darwin) will have only one target (x86_64) but in the case of Cray machines, there is both a frontend and backend processor. The user can specify which targets are present on front-end and back-end architecture -Depending on the platform, operating systems are either auto-detected or are +Depending on the platform, operating systems are either auto-detected or are set. The user can set the front-end and back-end operating setting by the class attributes front_os and back_os. The operating system as described earlier, will -be responsible for compiler detection. +be responsible for compiler detection. """ import os from collections import namedtuple @@ -216,7 +216,7 @@ class Platform(object): return self.operating_sys.get(name, None) - + @classmethod def detect(self): """ Subclass is responsible for implementing this method. @@ -235,7 +235,7 @@ class Platform(object): def _cmp_key(self): t_keys = ''.join(str(t._cmp_key()) for t in sorted(self.targets.values())) o_keys = ''.join(str(o._cmp_key()) for o in sorted(self.operating_sys.values())) - return (self.name, + return (self.name, self.default, self.front_end, self.back_end, @@ -385,7 +385,7 @@ class Arch(object): def __str__(self): if self.platform or self.platform_os or self.target: if self.platform.name == 'darwin': - os_name = self.platform_os.name + os_name = self.platform_os.name if self.platform_os else "None" else: os_name = str(self.platform_os) diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 79dbdb89a6..0cdf01f1b9 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -69,6 +69,17 @@ compilers: f77: None fc: None modules: 'None' + clang3.3OSX: + spec: clang@3.3 + operating_system: + name: yosemite + version: '10.10' + paths: + cc: /path/to/clang + cxx: /path/to/clang++ + f77: None + fc: None + modules: 'None' gcc4.5.0CNL: paths: cc: /path/to/gcc @@ -98,10 +109,21 @@ compilers: f77: /path/to/gfortran fc: /path/to/gfortran operating_system: - name: RHL + name: redhat version: '6.7' spec: gcc@4.5.0 modules: 'None' + gcc4.5.0OSX: + paths: + cc: /path/to/gcc + cxx: /path/to/g++ + f77: /path/to/gfortran + fc: /path/to/gfortran + operating_system: + name: yosemite + version: '10.10' + spec: gcc@4.5.0 + modules: 'None' """ mock_packages_config = """\ -- cgit v1.2.3-70-g09d2 From c30fe932d96b4a6fbe8845a2f6bdbfb7567ab1d2 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 25 May 2016 16:34:45 -0700 Subject: fixed mock config to use truncated versions of linux distro versions --- lib/spack/spack/test/mock_packages_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 0cdf01f1b9..23b1cf52cc 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -62,7 +62,7 @@ compilers: spec: clang@3.3 operating_system: name: redhat - version: '6.7' + version: '6' paths: cc: /path/to/clang cxx: /path/to/clang++ @@ -110,7 +110,7 @@ compilers: fc: /path/to/gfortran operating_system: name: redhat - version: '6.7' + version: '6' spec: gcc@4.5.0 modules: 'None' gcc4.5.0OSX: -- cgit v1.2.3-70-g09d2 From 0036483dedfcb75c6b893db7108a7f2b6a4c6187 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 26 May 2016 10:25:16 +0200 Subject: dealii: don't hardcode blas and mpi; minor fixes to dependencies --- var/spack/repos/builtin/packages/dealii/package.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 49dc971d3a..87fe4b5811 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -50,8 +50,8 @@ class Dealii(Package): depends_on ("blas") # Boost 1.58 is blacklisted, see https://github.com/dealii/dealii/issues/1591 # require at least 1.59 - depends_on ("boost@1.59.0:", when='~mpi') - depends_on ("boost@1.59.0:+mpi", when='+mpi') + depends_on ("boost@1.59.0:+thread+system+serialization+iostreams", when='~mpi') + depends_on ("boost@1.59.0:+mpi+thread+system+serialization+iostreams", when='+mpi') depends_on ("bzip2") depends_on ("cmake") depends_on ("lapack") @@ -63,10 +63,11 @@ class Dealii(Package): # optional dependencies depends_on ("mpi", when="+mpi") depends_on ("arpack-ng+mpi", when='+arpack+mpi') - depends_on ("doxygen", when='+doc') + 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~cxx", when='+hdf5+mpi') #FIXME NetCDF declares dependency with ~cxx, why? + 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') @@ -104,8 +105,8 @@ class Dealii(Package): (spec['lapack'].prefix.include, spec['blas'].prefix.include), '-DLAPACK_LIBRARIES=%s;%s' % - (join_path(spec['lapack'].prefix.lib,'liblapack.%s' % dsuf), # FIXME don't hardcode names - join_path(spec['blas'].prefix.lib,'libblas.%s' % dsuf)), # FIXME don't hardcode names + (spec['lapack'].lapack_shared_lib, + spec['blas'].blas_shared_lib), '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, '-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix, '-DTBB_DIR=%s' % spec['tbb'].prefix, @@ -116,9 +117,9 @@ class Dealii(Package): if '+mpi' in spec: options.extend([ '-DDEAL_II_WITH_MPI:BOOL=ON', - '-DCMAKE_C_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), # FIXME: avoid hardcoding mpi wrappers names - '-DCMAKE_CXX_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpic++'), - '-DCMAKE_Fortran_COMPILER=%s' % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + '-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc, + '-DCMAKE_CXX_COMPILER=%s' % spec['mpi'].mpicxx, + '-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc, ]) else: options.extend([ -- cgit v1.2.3-70-g09d2 From 3b675d8b700369a5b5282e56ecaf6c559e592551 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 26 May 2016 11:09:14 -0700 Subject: Changed comparison operator so that we don't get caught in an infinite loop --- lib/spack/spack/concretize.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 7a24c1135e..e30cf329f1 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -330,6 +330,8 @@ class DefaultConcretizer(object): compiler is used, defaulting to no compiler flags in the spec. Default specs set at the compiler level will still be added later. """ + + if not spec.architecture.platform_os: #Although this usually means changed, this means awaiting other changes return True @@ -340,9 +342,9 @@ class DefaultConcretizer(object): nearest = next(p for p in spec.traverse(direction='parents') if ((p.compiler == spec.compiler and p is not spec) and flag in p.compiler_flags)) - if ((not flag in spec.compiler_flags) or - sorted(spec.compiler_flags[flag]) != sorted(nearest.compiler_flags[flag])): - if flag in spec.compiler_flags: + if not flag in spec.compiler_flags or \ + not (sorted(spec.compiler_flags[flag]) >= sorted(nearest.compiler_flags[flag])): + if flag in spec.compiler_flag: spec.compiler_flags[flag] = list(set(spec.compiler_flags[flag]) | set(nearest.compiler_flags[flag])) else: -- cgit v1.2.3-70-g09d2 From b968603a57a4085b05318c295443d370f4b4c270 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 26 May 2016 11:14:05 -0700 Subject: made yaml format backwards compatible --- lib/spack/spack/architecture.py | 38 ++++++++++++++---------- lib/spack/spack/operating_systems/pre_v1.py | 17 +++++++++++ lib/spack/spack/platforms/spack_compatibility.py | 23 ++++++++++++++ 3 files changed, 62 insertions(+), 16 deletions(-) create mode 100644 lib/spack/spack/operating_systems/pre_v1.py create mode 100644 lib/spack/spack/platforms/spack_compatibility.py diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 5d16a2f5f5..86733ba418 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -90,7 +90,7 @@ from spack.util.naming import mod_to_class from spack.util.environment import get_path from spack.util.multiproc import parmap import spack.error as serr - +import spack.platforms class InvalidSysTypeError(serr.SpackError): def __init__(self, sys_type): @@ -462,21 +462,27 @@ def arch_from_dict(d): """ arch = Arch() - if d is None: - return None - platform_dict = d['platform'] - os_dict = d['platform_os'] - target_dict = d['target'] - - platform = _platform_from_dict(platform_dict) if platform_dict else None - target = _target_from_dict(target_dict) if os_dict else None - platform_os = _operating_system_from_dict(os_dict) if os_dict else None - arch.platform = platform - arch.target = target - arch.platform_os = platform_os - - arch.os_string = None - arch.target_string = None + if isinstance(d, basestring): + # We have an old spec using a string for the architecture + arch.platform = spack.platforms.spack_compatibility.SpackCompatibility() + arch.platform_os = arch.platform.operating_system('default') + arch.target = Target(d) + + arch.os_string = None + arch.target_string = None + else: + if d is None: + return None + platform_dict = d['platform'] + os_dict = d['platform_os'] + target_dict = d['target'] + + arch.platform = _platform_from_dict(platform_dict) if platform_dict else None + arch.target = _target_from_dict(target_dict) if os_dict else None + arch.platform_os = _operating_system_from_dict(os_dict) if os_dict else None + + arch.os_string = None + arch.target_string = None return arch diff --git a/lib/spack/spack/operating_systems/pre_v1.py b/lib/spack/spack/operating_systems/pre_v1.py new file mode 100644 index 0000000000..71ee557ac1 --- /dev/null +++ b/lib/spack/spack/operating_systems/pre_v1.py @@ -0,0 +1,17 @@ +import re +import os + +from spack.architecture import OperatingSystem + + +class PreV1(OperatingSystem): + """ Compute Node Linux (CNL) is the operating system used for the Cray XC + series super computers. It is a very stripped down version of GNU/Linux. + Any compilers found through this operating system will be used with + modules. If updated, user must make sure that version and name are + updated to indicate that OS has been upgraded (or downgraded) + """ + def __init__(self): + name = 'PreVersion1.0' + version = '1.0' + super(PreV1, self).__init__(name, version) diff --git a/lib/spack/spack/platforms/spack_compatibility.py b/lib/spack/spack/platforms/spack_compatibility.py new file mode 100644 index 0000000000..86cbfb3044 --- /dev/null +++ b/lib/spack/spack/platforms/spack_compatibility.py @@ -0,0 +1,23 @@ +import subprocess +from spack.architecture import Platform +from spack.operating_systems.pre_v1 + +class SpackCompatibility(Platform): + priority = 9999 + + # We don't use the normal target getters for this platform + # Instead, targets are added directly when parsing the yaml + + # OS is the spack backwards compatibility os. + front_os = 'PreVersion1.0' + back_os = 'PreVersion1.0' + default_os = 'PreVersion1.0' + + def __init__(self): + super(SpackCompatibility, self).__init__('spack_compatibility') + sc_os = spack.operating_systems.pre_v1.PreV1() + self.add_operating_system(sc_os.name, sc_os) + + @classmethod + def detect(self): + return True -- cgit v1.2.3-70-g09d2 From c0661744cccffc6ca11a82cea840e7be63736d37 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 26 May 2016 11:38:40 -0700 Subject: fixed compatibility work --- lib/spack/spack/architecture.py | 5 ++--- lib/spack/spack/operating_systems/pre_v1.py | 17 ----------------- lib/spack/spack/platforms/spack_compatibility.py | 23 ----------------------- 3 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 lib/spack/spack/operating_systems/pre_v1.py delete mode 100644 lib/spack/spack/platforms/spack_compatibility.py diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 86733ba418..a0ef4f14da 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -90,7 +90,6 @@ from spack.util.naming import mod_to_class from spack.util.environment import get_path from spack.util.multiproc import parmap import spack.error as serr -import spack.platforms class InvalidSysTypeError(serr.SpackError): def __init__(self, sys_type): @@ -464,8 +463,8 @@ def arch_from_dict(d): if isinstance(d, basestring): # We have an old spec using a string for the architecture - arch.platform = spack.platforms.spack_compatibility.SpackCompatibility() - arch.platform_os = arch.platform.operating_system('default') + arch.platform = Platform('spack_compatibility') + arch.platform_os = OperatingSystem('pre_version', '1.0') arch.target = Target(d) arch.os_string = None diff --git a/lib/spack/spack/operating_systems/pre_v1.py b/lib/spack/spack/operating_systems/pre_v1.py deleted file mode 100644 index 71ee557ac1..0000000000 --- a/lib/spack/spack/operating_systems/pre_v1.py +++ /dev/null @@ -1,17 +0,0 @@ -import re -import os - -from spack.architecture import OperatingSystem - - -class PreV1(OperatingSystem): - """ Compute Node Linux (CNL) is the operating system used for the Cray XC - series super computers. It is a very stripped down version of GNU/Linux. - Any compilers found through this operating system will be used with - modules. If updated, user must make sure that version and name are - updated to indicate that OS has been upgraded (or downgraded) - """ - def __init__(self): - name = 'PreVersion1.0' - version = '1.0' - super(PreV1, self).__init__(name, version) diff --git a/lib/spack/spack/platforms/spack_compatibility.py b/lib/spack/spack/platforms/spack_compatibility.py deleted file mode 100644 index 86cbfb3044..0000000000 --- a/lib/spack/spack/platforms/spack_compatibility.py +++ /dev/null @@ -1,23 +0,0 @@ -import subprocess -from spack.architecture import Platform -from spack.operating_systems.pre_v1 - -class SpackCompatibility(Platform): - priority = 9999 - - # We don't use the normal target getters for this platform - # Instead, targets are added directly when parsing the yaml - - # OS is the spack backwards compatibility os. - front_os = 'PreVersion1.0' - back_os = 'PreVersion1.0' - default_os = 'PreVersion1.0' - - def __init__(self): - super(SpackCompatibility, self).__init__('spack_compatibility') - sc_os = spack.operating_systems.pre_v1.PreV1() - self.add_operating_system(sc_os.name, sc_os) - - @classmethod - def detect(self): - return True -- cgit v1.2.3-70-g09d2 From 88bec814eb45ff4997229e092f234d8ce7c76664 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 26 May 2016 12:10:41 -0700 Subject: Allow 'arch=' syntax for specs to allow copying from output --- lib/spack/spack/concretize.py | 2 +- lib/spack/spack/platforms/cray_xc.py | 12 ++++++------ lib/spack/spack/platforms/linux.py | 8 ++++---- lib/spack/spack/spec.py | 18 +++++++++++------- lib/spack/spack/test/spec_semantics.py | 1 - 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index e30cf329f1..5d9715feed 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -344,7 +344,7 @@ class DefaultConcretizer(object): and flag in p.compiler_flags)) if not flag in spec.compiler_flags or \ not (sorted(spec.compiler_flags[flag]) >= sorted(nearest.compiler_flags[flag])): - if flag in spec.compiler_flag: + if flag in spec.compiler_flags: spec.compiler_flags[flag] = list(set(spec.compiler_flags[flag]) | set(nearest.compiler_flags[flag])) else: diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index 4843a47c62..e710303e23 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -9,16 +9,16 @@ class CrayXc(Platform): back_end = 'ivybridge' default = 'ivybridge' - front_os = "SuSE" - back_os = "CNL" - default_os = "CNL" + front_os = "SuSE11" + back_os = "CNL10" + default_os = "CNL10" def __init__(self): ''' Since cori doesn't have ivybridge as a front end it's better if we use CRAY_CPU_TARGET as the default. This will ensure that if we're on a XC-40 or XC-30 then we can detect the target ''' - super(CrayXc, self).__init__('crayxc') + super(CrayXc, self).__init__('cray_xc') # Handle the default here so we can check for a key error if 'CRAY_CPU_TARGET' in os.environ: @@ -37,8 +37,8 @@ class CrayXc(Platform): self.add_target('haswell', Target('haswell','craype-haswell')) - self.add_operating_system('SuSE', LinuxDistro()) - self.add_operating_system('CNL', Cnl()) + self.add_operating_system('SuSE11', LinuxDistro()) + self.add_operating_system('CNL10', Cnl()) @classmethod def detect(self): diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py index 18050ac79e..ebe018812a 100644 --- a/lib/spack/spack/platforms/linux.py +++ b/lib/spack/spack/platforms/linux.py @@ -12,10 +12,10 @@ class Linux(Platform): super(Linux, self).__init__('linux') self.add_target(self.default, Target(self.default)) linux_dist = LinuxDistro() - self.default_os = linux_dist.name - self.front_os = linux_dist.name - self.back_os = linux_dist.name - self.add_operating_system(linux_dist.name, linux_dist) + self.default_os = str(linux_dist) + self.front_os = self.default_os + self.back_os = self.default._os + self.add_operating_system(str(linux_dist), linux_dist) @classmethod def detect(self): diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 5d82af4af6..58d76fd7a9 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -538,13 +538,17 @@ class Spec(object): Known flags currently include "arch" """ valid_flags = FlagMap.valid_compiler_flags() -# if name == 'arch' or name == 'architecture': -# platform, op_sys, target = value.split('-') -# print platform, op_sys, target, '+++++++' -# self._set_platform(platform) -# self._set_os(op_sys) -# self._set_target(target) - if name == 'platform': + if name == 'arch' or name == 'architecture': + platform, op_sys, target = value.split('-') + assert(self.architecture.platform is None) + assert(self.architecture.platform_os is None) + assert(self.architecture.target is None) + assert(self.architecture.os_string is None) + assert(self.architecture.target_string is None) + self._set_platform(platform) + self._set_os(op_sys) + self._set_target(target) + elif name == 'platform': self._set_platform(value) elif name == 'os' or name == 'operating_system': if self.architecture.platform: diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index aa99ad71ed..0b2111bfe8 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -402,7 +402,6 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf', '~debug') self.check_constrain_changed('libelf', 'debug=2') self.check_constrain_changed('libelf', 'cppflags="-O3"') - self.check_constrain_changed('libelf', ' arch=bgqos_0') platform = spack.architecture.sys_type() self.check_constrain_changed('libelf', 'target='+platform.target('default_target').name) -- cgit v1.2.3-70-g09d2 From 189e8b3f349c8102772fa995fd8ee79df3c242c0 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 26 May 2016 13:17:01 -0700 Subject: fixed compiler config init logic --- lib/spack/spack/compilers/__init__.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 8fe7a17116..ea79f655b0 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -102,15 +102,18 @@ def get_compiler_config(scope=None): # configured. Avoid updating automatically if there ARE site # compilers configured but no user ones. # if (isinstance(arch, basestring) or arch == my_arch) and arch not in config: - if scope is None: - # We know no compilers were configured in any scope. - init_compiler_config() - elif scope == 'user': - # Check the site config and update the user config if - # nothing is configured at the site level. - site_config = spack.config.get_config('compilers', scope='site') - if not site_config: + if not config: + if scope is None: + # We know no compilers were configured in any scope. init_compiler_config() + config = spack.config.get_config('compilers', scope=scope) + elif scope == 'user': + # Check the site config and update the user config if + # nothing is configured at the site level. + site_config = spack.config.get_config('compilers', scope='site') + if not site_config: + init_compiler_config() + config = spack.config.get_config('compilers', scope=scope) return config -- cgit v1.2.3-70-g09d2 From 9c1da4fa4cdfe32d8a7a0026f457066b0cac7e8e Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 26 May 2016 13:58:17 -0700 Subject: Corrected parantheses wrapping --- lib/spack/spack/build_environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 073f73a91a..4483b9d132 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -366,7 +366,7 @@ def get_rpaths(pkg): if os.path.isdir(d.prefix.lib64)) # Second module is our compiler mod name. We use that to get rpaths from # module show output. - if pkg.compiler.modules and len(pkg.compiler.modules > 1): + if pkg.compiler.modules and len(pkg.compiler.modules) > 1: rpaths.append(get_path_from_module(pkg.compiler.modules[1])) return rpaths -- cgit v1.2.3-70-g09d2 From 040c122719c7f4cb97ce14668111e0c66125c8c3 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 26 May 2016 20:54:38 +0200 Subject: dealii: formatting --- var/spack/repos/builtin/packages/dealii/package.py | 134 +++++++++++---------- 1 file changed, 73 insertions(+), 61 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 87fe4b5811..867d317e4d 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -25,8 +25,10 @@ from spack import * import sys + class Dealii(Package): - """C++ software library providing well-documented tools to build finite element codes for a broad variety of PDEs.""" + """C++ software library providing well-documented tools to build finite + element codes for a broad variety of PDEs.""" homepage = "https://www.dealii.org" url = "https://github.com/dealii/dealii/releases/download/v8.4.0/dealii-8.4.0.tar.gz" @@ -36,7 +38,7 @@ class Dealii(Package): variant('mpi', default=True, description='Compile with MPI') variant('arpack', default=True, description='Compile with Arpack and PArpack (only with MPI)') variant('doc', default=False, description='Compile with documentation') - variant('gsl' , default=True, description='Compile with GSL') + variant('gsl', default=True, description='Compile with GSL') variant('hdf5', default=True, description='Compile with HDF5 (only with MPI)') variant('metis', default=True, description='Compile with Metis') variant('netcdf', default=True, description='Compile with Netcdf (only with MPI)') @@ -47,39 +49,40 @@ class Dealii(Package): variant('trilinos', default=True, description='Compile with Trilinos (only with MPI)') # required dependencies, light version - depends_on ("blas") - # Boost 1.58 is blacklisted, see https://github.com/dealii/dealii/issues/1591 - # require at least 1.59 - depends_on ("boost@1.59.0:+thread+system+serialization+iostreams", when='~mpi') - depends_on ("boost@1.59.0:+mpi+thread+system+serialization+iostreams", when='+mpi') - depends_on ("bzip2") - depends_on ("cmake") - depends_on ("lapack") - depends_on ("muparser") - depends_on ("suite-sparse") - depends_on ("tbb") - depends_on ("zlib") + depends_on("blas") + # Boost 1.58 is blacklisted, see + # https://github.com/dealii/dealii/issues/1591 + # Require at least 1.59 + 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("lapack") + depends_on("muparser") + depends_on("suite-sparse") + depends_on("tbb") + depends_on("zlib") # optional dependencies - depends_on ("mpi", when="+mpi") - depends_on ("arpack-ng+mpi", when='+arpack+mpi') - 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+mpi", when='+petsc+mpi') - depends_on ("slepc", when='+slepc+petsc+mpi') - depends_on ("trilinos", when='+trilinos+mpi') + depends_on("mpi", when="+mpi") + depends_on("arpack-ng+mpi", when='+arpack+mpi') + 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+mpi", when='+petsc+mpi') + depends_on("slepc", when='+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='@dev') + depends_on("astyle@2.04", when='@dev') def install(self, spec, prefix): options = [] @@ -97,9 +100,9 @@ class Dealii(Package): '-DDEAL_II_WITH_THREADS:BOOL=ON', '-DBOOST_DIR=%s' % spec['boost'].prefix, '-DBZIP2_DIR=%s' % spec['bzip2'].prefix, - # CMake's FindBlas/Lapack may pickup system's blas/lapack instead of Spack's. - # Be more specific to avoid this. - # Note that both lapack and blas are provided in -DLAPACK_XYZ variables + # CMake's FindBlas/Lapack may pickup system's blas/lapack instead + # of Spack's. Be more specific to avoid this. + # Note that both lapack and blas are provided in -DLAPACK_XYZ. '-DLAPACK_FOUND=true', '-DLAPACK_INCLUDE_DIRS=%s;%s' % (spec['lapack'].prefix.include, @@ -107,7 +110,7 @@ class Dealii(Package): '-DLAPACK_LIBRARIES=%s;%s' % (spec['lapack'].lapack_shared_lib, spec['blas'].blas_shared_lib), - '-DMUPARSER_DIR=%s ' % spec['muparser'].prefix, + '-DMUPARSER_DIR=%s' % spec['muparser'].prefix, '-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix, '-DTBB_DIR=%s' % spec['tbb'].prefix, '-DZLIB_DIR=%s' % spec['zlib'].prefix @@ -126,24 +129,25 @@ class Dealii(Package): '-DDEAL_II_WITH_MPI:BOOL=OFF', ]) - # Optional dependencies for which librariy names are the same as CMake variables - for library in ('gsl','hdf5','p4est','petsc','slepc','trilinos','metis'): + # Optional dependencies for which librariy names are the same as CMake + # variables: + for library in ('gsl', 'hdf5', 'p4est', 'petsc', 'slepc', 'trilinos', 'metis'): # NOQA: ignore=E501 if library in spec: options.extend([ - '-D{library}_DIR={value}'.format(library=library.upper(), value=spec[library].prefix), - '-DDEAL_II_WITH_{library}:BOOL=ON'.format(library=library.upper()) + '-D%s_DIR=%s' % (library.upper(), spec[library].prefix), + '-DDEAL_II_WITH_%s:BOOL=ON' % library.upper() ]) else: options.extend([ - '-DDEAL_II_WITH_{library}:BOOL=OFF'.format(library=library.upper()) + '-DDEAL_II_WITH_%s:BOOL=OFF' % library.upper() ]) # doxygen options.extend([ - '-DDEAL_II_COMPONENT_DOCUMENTATION=%s' % ('ON' if '+doc' in spec else 'OFF'), + '-DDEAL_II_COMPONENT_DOCUMENTATION=%s' % + ('ON' if '+doc' in spec else 'OFF'), ]) - # arpack if '+arpack' in spec: options.extend([ @@ -161,11 +165,13 @@ class Dealii(Package): options.extend([ '-DNETCDF_FOUND=true', '-DNETCDF_LIBRARIES=%s;%s' % - (join_path(spec['netcdf-cxx'].prefix.lib,'libnetcdf_c++.%s' % dsuf), - join_path(spec['netcdf'].prefix.lib,'libnetcdf.%s' % dsuf)), + (join_path(spec['netcdf-cxx'].prefix.lib, + 'libnetcdf_c++.%s' % dsuf), + join_path(spec['netcdf'].prefix.lib, + 'libnetcdf.%s' % dsuf)), '-DNETCDF_INCLUDE_DIRS=%s;%s' % (spec['netcdf-cxx'].prefix.include, - spec['netcdf'].prefix.include), + spec['netcdf'].prefix.include), ]) else: options.extend([ @@ -201,7 +207,7 @@ class Dealii(Package): with working_dir('examples/step-3'): cmake('.') make('release') - make('run',parallel=False) + make('run', parallel=False) # An example which uses Metis + PETSc # FIXME: switch step-18 to MPI @@ -214,7 +220,7 @@ class Dealii(Package): if '^petsc' in spec and '^metis' in spec: cmake('.') make('release') - make('run',parallel=False) + make('run', parallel=False) # take step-40 which can use both PETSc and Trilinos # FIXME: switch step-40 to MPI run @@ -223,43 +229,49 @@ class Dealii(Package): print('========== Step-40 PETSc ============') 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') + 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',parallel=False) + make('run', parallel=False) print('=====================================') print('========= Step-40 Trilinos ==========') print('=====================================') # change Linear Algebra to Trilinos - filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc') + filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', + ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc') if '^trilinos+hypre' in spec: make('release') - make('run',parallel=False) + make('run', parallel=False) 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') - filter_file(r'(LA::MPI::PreconditionAMG preconditioner;)', (''), 'step-40.cc') - filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)', (''), 'step-40.cc') - filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', (''), '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') + 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;)', + (''), 'step-40.cc') + filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', + (''), '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) + make('run', paralle=False) print('=====================================') print('====== Step-40 Trilinos MUMPS =======') print('=====================================') # switch to Mumps - filter_file(r'(Amesos_Superludist)', ('Amesos_Mumps'), 'step-40.cc') + filter_file(r'(Amesos_Superludist)', + ('Amesos_Mumps'), 'step-40.cc') if '^trilinos+mumps' in spec: make('release') - make('run',parallel=False) + make('run', parallel=False) print('=====================================') print('============ Step-36 ================') @@ -268,7 +280,7 @@ class Dealii(Package): if 'slepc' in spec: cmake('.') make('release') - make('run',parallel=False) + make('run', parallel=False) print('=====================================') print('============ Step-54 ================') @@ -277,7 +289,7 @@ class Dealii(Package): if 'oce' in spec: cmake('.') make('release') - make('run',parallel=False) + make('run', parallel=False) def setup_environment(self, spack_env, env): env.set('DEAL_II_DIR', self.prefix) -- cgit v1.2.3-70-g09d2 From e95eedb165c54e00d22bd6d5acfdf8c7c55d140e Mon Sep 17 00:00:00 2001 From: Joseph Ciurej Date: Thu, 26 May 2016 14:27:15 -0700 Subject: Added a style checking exemption for lambda expressions. --- .flake8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index a1e2fcc1f8..12ae2efa80 100644 --- a/.flake8 +++ b/.flake8 @@ -8,6 +8,9 @@ # - E221: multiple spaces before operator # - E241: multiple spaces after ‘,’ # +# Let people use terse Python features: +# - E731 : lambda expressions +# # Spack allows wildcard imports: # - F403: disable wildcard import # @@ -16,5 +19,5 @@ # - F999: name name be undefined or undefined from star imports. # [flake8] -ignore = E221,E241,F403,F821,F999 +ignore = E221,E241,E731,F403,F821,F999 max-line-length = 79 -- cgit v1.2.3-70-g09d2 From a2f90453f4d1ac1372f717911bd08e33d801ff31 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Thu, 26 May 2016 20:30:05 -0700 Subject: Fixed backwards compatibility for compilers.yaml config file --- bin/spack | 3 ++ lib/spack/spack/yaml_version_check.py | 55 +++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 lib/spack/spack/yaml_version_check.py diff --git a/bin/spack b/bin/spack index 3544feb10a..9b1276a866 100755 --- a/bin/spack +++ b/bin/spack @@ -138,6 +138,9 @@ def main(): import spack.util.debug as debug debug.register_interrupt_handler() + from spack.yaml_version_check import check_yaml_versions + check_yaml_versions() + spack.spack_working_dir = working_dir if args.mock: from spack.repository import RepoPath diff --git a/lib/spack/spack/yaml_version_check.py b/lib/spack/spack/yaml_version_check.py new file mode 100644 index 0000000000..7e7bae4edf --- /dev/null +++ b/lib/spack/spack/yaml_version_check.py @@ -0,0 +1,55 @@ +############################################################################## +# 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 +############################################################################## +"""Yaml Version Check is a module for ensuring that config file +formats are compatible with the current version of Spack.""" +import os.path +import os +import llnl.util.tty as tty +import spack.util.spack_yaml as syaml +import spack.config + + +def check_yaml_versions(): + check_compiler_yaml_version() + +def check_compiler_yaml_version(): + config_scopes = spack.config.config_scopes + for scope in config_scopes.values(): + file_name = os.path.join(scope.path, 'compilers.yaml') + data = None + if os.path.isfile(file_name): + with open(file_name) as f: + data = syaml.load(f) + + if data: + compilers = data['compilers'].items() + if len(compilers) > 0: + if 'operating_system' not in compilers[0][1]: + new_file = os.path.join(scope.path, '_old_compilers.yaml') + tty.warn('%s in out of date compilers format. ' + 'Moved to %s. Spack automatically generate ' + 'a compilers config file ' + % (file_name, new_file)) + os.rename(file_name, new_file) -- cgit v1.2.3-70-g09d2 From dd5a6914f161f2237a90df856126a905e305d80f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 27 May 2016 12:56:43 -0500 Subject: Undo changes to flex --- var/spack/repos/builtin/packages/flex/package.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index f41af061a5..926651010f 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -24,7 +24,6 @@ ############################################################################## from spack import * - class Flex(Package): """Flex is a tool for generating scanners.""" @@ -34,8 +33,6 @@ class Flex(Package): version('2.6.0', '5724bcffed4ebe39e9b55a9be80859ec') version('2.5.39', 'e133e9ead8ec0a58d81166b461244fde') - depends_on('bison') - def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From 023504ed645fecc7e7c12948dac890b65124c880 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 27 May 2016 12:26:59 -0700 Subject: Fixed the external modules bug --- lib/spack/spack/spec.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 58d76fd7a9..bbc1abfa9e 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1065,7 +1065,7 @@ class Spec(object): continue # If replacement is external then trim the dependencies - if replacement.external: + if replacement.external or replacement.external_module: if (spec.dependencies): changed = True spec.dependencies = DependencyMap() @@ -1082,7 +1082,8 @@ class Spec(object): feq(replacement.architecture, spec.architecture) and feq(replacement.dependencies, spec.dependencies) and feq(replacement.variants, spec.variants) and - feq(replacement.external, spec.external)): + feq(replacement.external, spec.external) and + feq(replacement.external_module, spec.external_module)): continue # Refine this spec to the candidate. This uses @@ -1653,18 +1654,9 @@ class Spec(object): # TODO: Need to make sure that comparisons can be made via classes if self.architecture and other.architecture: - print self.architecture, other.architecture if ((self.architecture.platform and other.architecture.platform and self.architecture.platform != other.architecture.platform) or (self.architecture.platform_os and other.architecture.platform_os and self.architecture.platform_os != other.architecture.platform_os) or (self.architecture.target and other.architecture.target and self.architecture.target != other.architecture.target)): - d1 = self.architecture.platform.to_dict() - d2 = other.architecture.platform.to_dict() - print d1 - print d2 - print d1==d2 - print self.architecture.platform == other.architecture.platform - print self.architecture.platform._cmp_key() - print other.architecture.platform._cmp_key() return False elif strict and ((other.architecture and not self.architecture) or (other.architecture.platform and not self.architecture.platform) or -- cgit v1.2.3-70-g09d2 From f49644cdea3b00b057f33bf0c609e3a83eb3cd65 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 27 May 2016 12:37:58 -0700 Subject: Fixed typo in linux platform --- lib/spack/spack/platforms/linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py index ebe018812a..4d8adac384 100644 --- a/lib/spack/spack/platforms/linux.py +++ b/lib/spack/spack/platforms/linux.py @@ -14,7 +14,7 @@ class Linux(Platform): linux_dist = LinuxDistro() self.default_os = str(linux_dist) self.front_os = self.default_os - self.back_os = self.default._os + self.back_os = self.default_os self.add_operating_system(str(linux_dist), linux_dist) @classmethod -- cgit v1.2.3-70-g09d2 From 0ae1298d2584403256d5ff02de039e8195116cfa Mon Sep 17 00:00:00 2001 From: Greg Lee Date: Fri, 27 May 2016 12:43:13 -0700 Subject: updated libdwarf version and dwarfdump build --- var/spack/repos/builtin/packages/libdwarf/package.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/libdwarf/package.py b/var/spack/repos/builtin/packages/libdwarf/package.py index 3f5a72116e..c9c6e9404f 100644 --- a/var/spack/repos/builtin/packages/libdwarf/package.py +++ b/var/spack/repos/builtin/packages/libdwarf/package.py @@ -41,12 +41,10 @@ class Libdwarf(Package): MIPS/IRIX C compiler.""" homepage = "http://www.prevanders.net/dwarf.html" - url = "http://www.prevanders.net/libdwarf-20130729.tar.gz" + url = "http://www.prevanders.net/libdwarf-20160507.tar.gz" list_url = homepage - version('20130729', '4cc5e48693f7b93b7aa0261e63c0e21d') - version('20130207', '64b42692e947d5180e162e46c689dfbf') - version('20130126', 'ded74a5e90edb5a12aac3c29d260c5db') + version('20160507', 'ae32d6f9ece5daf05e2d4b14822ea811') depends_on("libelf") @@ -69,7 +67,7 @@ class Libdwarf(Package): install('libdwarf.h', prefix.include) install('dwarf.h', prefix.include) - with working_dir('dwarfdump2'): + with working_dir('dwarfdump'): configure("--prefix=" + prefix) # This makefile has strings of copy commands that -- cgit v1.2.3-70-g09d2 From becec8ac7e17a9d56f1d5b0640c1f56be8f64a7f Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 28 May 2016 10:12:53 -0700 Subject: Added external module check in normalize to avoid infinite loop --- lib/spack/spack/spec.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index a505b3c12e..f8bad3ff03 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1002,11 +1002,12 @@ class Spec(object): """ # Make an index of stuff this spec already provides self_index = ProviderIndex(self.traverse(), restrict=True) - changed = False done = False + while not done: done = True + for spec in list(self.traverse()): replacement = None if spec.virtual: @@ -1329,7 +1330,7 @@ class Spec(object): # if we descend into a virtual spec, there's nothing more # to normalize. Concretize will finish resolving it later. - if self.virtual or self.external: + if self.virtual or self.external or self.external_module: return False # Combine constraints from package deps with constraints from @@ -1376,7 +1377,6 @@ 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) -- cgit v1.2.3-70-g09d2 From 98a4a9f2cc67c141deb7903f577c60c21912667c Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 28 May 2016 10:13:22 -0700 Subject: Adding test for external modules --- lib/spack/spack/test/concretize.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 963481054e..77ff026c7a 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -253,6 +253,13 @@ class ConcretizeTest(MockPackagesTest): self.assertTrue(spec['externaltool'].compiler.satisfies('gcc')) + def test_external_package_module(self): + spec = Spec('externalmodule') + spec.concretize() + self.assertEqual(spec['externalmodule'].external_module, 'external-module') + self.assertFalse('externalprereq' in spec) + self.assertTrue(spec['externalmodule'].compiler.satisfies('gcc')) + def test_nobuild_package(self): got_error = False spec = Spec('externaltool%clang') -- cgit v1.2.3-70-g09d2 From f0a9c45207eabc81b5f50b68f6dc02f807f1a221 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 28 May 2016 10:13:57 -0700 Subject: Adding external to mock config --- lib/spack/spack/test/mock_packages_test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 23b1cf52cc..5561027aac 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -137,6 +137,10 @@ packages: paths: externalvirtual@2.0%clang@3.3: /path/to/external_virtual_clang externalvirtual@1.0%gcc@4.5.0: /path/to/external_virtual_gcc + externalmodule: + buildable: False + modules: + externalmodule@1.0%gcc@4.5.0: external-module """ class MockPackagesTest(unittest.TestCase): -- cgit v1.2.3-70-g09d2 From 33e1dcc4763024db87e709b3db6ff4ee12d43dc5 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 28 May 2016 10:14:40 -0700 Subject: Adding mock package file for external module --- .../packages/externalmodule/package.py | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 var/spack/repos/builtin.mock/packages/externalmodule/package.py diff --git a/var/spack/repos/builtin.mock/packages/externalmodule/package.py b/var/spack/repos/builtin.mock/packages/externalmodule/package.py new file mode 100644 index 0000000000..f7b0da3fd9 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/externalmodule/package.py @@ -0,0 +1,37 @@ + +############################################################################## +# 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 Externalmodule(Package): + homepage = "http://somewhere.com" + url = "http://somewhere.com/module-1.0.tar.gz" + + version('1.0', '1234567890abcdef1234567890abcdef') + + depends_on('externalprereq') + + def install(self, spec, prefix): + pass -- cgit v1.2.3-70-g09d2 From 69585cb6e3b391d2771387830067d893f2e7ec32 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 28 May 2016 12:39:43 -0700 Subject: Added elcap compilers --- lib/spack/spack/test/mock_packages_test.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 5561027aac..f02bfb7a07 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -124,6 +124,28 @@ compilers: version: '10.10' spec: gcc@4.5.0 modules: 'None' + gcc4.5.0ELCAP: + paths: + cc: /path/to/gcc + cxx: /path/to/g++ + f77: /path/to/gfortran + fc: /path/to/gfortran + operating_system: + name: elcapitan + version: '10.11' + spec: gcc@4.5.0 + modules: 'None' + clang3.3ELCAP: + spec: clang@3.3 + operating_system: + name: elcapitan + version: '10.11' + paths: + cc: /path/to/clang + cxx: /path/to/clang++ + f77: None + fc: None + modules: 'None' """ mock_packages_config = """\ -- cgit v1.2.3-70-g09d2 From 22ca72e7b9870dddfd66760658a9221f4f24ffe3 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 28 May 2016 12:40:29 -0700 Subject: Added conditional skipIf to test_external_modules, darwin machines don't have tcl modules so skip this test and let user know why --- lib/spack/spack/test/concretize.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 77ff026c7a..cf2daa4be2 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import spack +import spack.architecture from spack.spec import Spec, CompilerSpec from spack.version import ver from spack.concretize import find_spec @@ -252,7 +253,8 @@ class ConcretizeTest(MockPackagesTest): self.assertFalse('externalprereq' in spec) self.assertTrue(spec['externaltool'].compiler.satisfies('gcc')) - + @unittest.skipIf(spack.architecture.sys_type().name == 'darwin', + "No tcl modules on darwin machines") def test_external_package_module(self): spec = Spec('externalmodule') spec.concretize() @@ -269,7 +271,7 @@ class ConcretizeTest(MockPackagesTest): got_error = True self.assertTrue(got_error) - + def test_external_and_virtual(self): spec = Spec('externaltest') spec.concretize() -- cgit v1.2.3-70-g09d2 From c16d7c481c700a55a592daed05424250656adb34 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 28 May 2016 23:30:56 -0500 Subject: Get glib to compile with gcc-6.1 This commit adds a patch to fix the case where gcc-6.1 emits an error for string format literal that was a warning in previous versions of gcc. The patch reference is https://bugzilla.gnome.org/show_bug.cgi?id=761550 Also ran the package file through autopep8. --- .../builtin/packages/glib/g_date_strftime.patch | 34 ++++++++++++++++++++++ var/spack/repos/builtin/packages/glib/package.py | 7 +++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 var/spack/repos/builtin/packages/glib/g_date_strftime.patch diff --git a/var/spack/repos/builtin/packages/glib/g_date_strftime.patch b/var/spack/repos/builtin/packages/glib/g_date_strftime.patch new file mode 100644 index 0000000000..532c743277 --- /dev/null +++ b/var/spack/repos/builtin/packages/glib/g_date_strftime.patch @@ -0,0 +1,34 @@ +From 00148329967adb196138372771052a3f606a6ea3 Mon Sep 17 00:00:00 2001 +From: coypu +Date: Wed, 2 Mar 2016 19:43:10 +0200 +Subject: [PATCH 2/2] gdate: Suppress string format literal warning + +Newer versions of GCC emit an error here, but we know it's safe. +https://bugzilla.gnome.org/761550 +--- + glib/gdate.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/glib/gdate.c b/glib/gdate.c +index 4aece02..92c34d2 100644 +--- a/glib/gdate.c ++++ b/glib/gdate.c +@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d, + * + * Returns: number of characters written to the buffer, or 0 the buffer was too small + */ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wformat-nonliteral" ++ + gsize + g_date_strftime (gchar *s, + gsize slen, +@@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s, + return retval; + #endif + } ++ ++#pragma GCC diagnostic pop +-- +2.7.1 + diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index b146ea63d8..e8b92020bd 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -25,20 +25,23 @@ from spack import * import sys + class Glib(Package): """The GLib package contains a low-level libraries useful for providing data structure handling for C, portability wrappers and interfaces for such runtime functionality as an event loop, threads, dynamic loading and an object system.""" homepage = "https://developer.gnome.org/glib/" - url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz" + url = "http://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.1.tar.xz" version('2.42.1', '89c4119e50e767d3532158605ee9121a') depends_on("libffi") depends_on("zlib") depends_on("pkg-config") - depends_on('gettext', sys.platform=='darwin') + depends_on('gettext', sys.platform == 'darwin') + + patch('g_date_strftime.patch') def install(self, spec, prefix): configure("--prefix=%s" % prefix) -- cgit v1.2.3-70-g09d2 From e8b4d5fb6ffe18bcb93a86d00fbfb1ed37d0db3b Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 28 May 2016 22:01:58 -0700 Subject: Performance boost: reduce instantiations of re.Scanner - Lexer is the same for every Spec parser in spack, so don't build it every time. - This improves time to import package.py files a lot, as a Lexer doesn't have to be constructed for every spc in the packages. - To concretize dealii: - Before: ~20 sec - After: ~6 sec --- lib/spack/spack/spec.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 7c09af4c21..16b61236a9 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -2015,10 +2015,13 @@ class SpecLexer(spack.parse.Lexer): (r'\s+', lambda scanner, val: None)]) +# Lexer is always the same for every parser. +_lexer = SpecLexer() + class SpecParser(spack.parse.Parser): def __init__(self): - super(SpecParser, self).__init__(SpecLexer()) + super(SpecParser, self).__init__(_lexer) self.previous = None def do_parse(self): -- cgit v1.2.3-70-g09d2 From c2ac47235fd02e34c4ea5ac9d9c65a8b313ffa41 Mon Sep 17 00:00:00 2001 From: Ali Dorostkar Date: Sun, 29 May 2016 13:22:19 +0200 Subject: additional versions for Dealii Included additional versions for Deal.II package. --- var/spack/repos/builtin/packages/dealii/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 867d317e4d..9c09b205a8 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -30,9 +30,13 @@ class Dealii(Package): """C++ software library providing well-documented tools to build finite element codes for a broad variety of PDEs.""" homepage = "https://www.dealii.org" - url = "https://github.com/dealii/dealii/releases/download/v8.4.0/dealii-8.4.0.tar.gz" + url = "https://github.com/dealii/dealii/releases/download/v8.4.1/dealii-8.4.1.tar.gz" + version('8.4.1', 'efbaf16f9ad59cfccad62302f36c3c1d') version('8.4.0', 'ac5dbf676096ff61e092ce98c80c2b00') + version('8.3.0', 'fc6cdcb16309ef4bea338a4f014de6fa') + version('8.2.1', '71c728dbec14f371297cd405776ccf08') + version('8.1.0', 'aa8fadc2ce5eb674f44f997461bf668d') version('dev', git='https://github.com/dealii/dealii.git') variant('mpi', default=True, description='Compile with MPI') -- cgit v1.2.3-70-g09d2 From 66aaaa17512dbb2a72333e62f0166557785d4dbf Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 29 May 2016 15:30:09 -0500 Subject: Add a comment regarding the reason for the patch. --- var/spack/repos/builtin/packages/glib/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index e8b92020bd..342a61a6a1 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -41,6 +41,7 @@ class Glib(Package): depends_on("pkg-config") depends_on('gettext', sys.platform == 'darwin') + # The following patch is needed for gcc-6.1 patch('g_date_strftime.patch') def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From d7e84fe07c748206afa25e8e45a2ebfac71c7cdf Mon Sep 17 00:00:00 2001 From: Ali Dorostkar Date: Mon, 30 May 2016 14:03:27 +0200 Subject: dealii, test for specific version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Specified that test case “step-40” is only to be run when using dealii version 8.4.0 or later --- var/spack/repos/builtin/packages/dealii/package.py | 93 +++++++++++----------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 9c09b205a8..c871059075 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -228,54 +228,55 @@ class Dealii(Package): # 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 PETSc ============') - 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: - make('release') - make('run', parallel=False) - - print('=====================================') - print('========= Step-40 Trilinos ==========') - print('=====================================') - # change Linear Algebra to Trilinos - filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', - ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc') - if '^trilinos+hypre' in spec: - make('release') - make('run', parallel=False) + if spec.satisfies('@8.4.0:'): + with working_dir('examples/step-40'): + print('=====================================') + print('========== Step-40 PETSc ============') + 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: + make('release') + make('run', parallel=False) + + print('=====================================') + print('========= Step-40 Trilinos ==========') + print('=====================================') + # change Linear Algebra to Trilinos + filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', + ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc') + if '^trilinos+hypre' in spec: + make('release') + make('run', parallel=False) - 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;)', - (''), 'step-40.cc') - filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', - (''), '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-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;)', + (''), 'step-40.cc') + filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', + (''), '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-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-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 ================') -- cgit v1.2.3-70-g09d2 From fe79e434592ee87fe69b65d30200794e10bf30f9 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Mon, 30 May 2016 15:46:39 +0200 Subject: limiting package to foam-extend to start --- .../repos/builtin/packages/foam-extend/package.py | 263 +++++++++++++++++++++ .../builtin/packages/openfoam-extend/package.py | 262 -------------------- 2 files changed, 263 insertions(+), 262 deletions(-) create mode 100644 var/spack/repos/builtin/packages/foam-extend/package.py delete mode 100644 var/spack/repos/builtin/packages/openfoam-extend/package.py diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py new file mode 100644 index 0000000000..4bbb065d8b --- /dev/null +++ b/var/spack/repos/builtin/packages/foam-extend/package.py @@ -0,0 +1,263 @@ +from spack import * +from spack.environment import * + +import multiprocessing +import subprocess +import re +import os + + +class FoamExtend(Package): + """The foam-extend project is a fork of the OpenFOAM open source library + for Computational Fluid Dynamics (CFD).""" + + version('3.2', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.2') + version('3.1', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.1') + version('3.0', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.0') + + variant('paraview', default=False, description='Enable ParaFOAM') + variant('scotch', default=True, description='Activate Scotch as a possible decomposition library') + variant('ptscotch', default=True, description='Activate PT-Scotch as a possible decomposition library') + variant('metis', default=True, description='Activate Metis as a possible decomposition library') + variant('parmetis', default=True, description='Activate Parmetis as a possible decomposition library') + variant('parmgridgen', default=True, description='Activate Parmgridgen support') + + supported_compilers = {'clang': 'Clang', 'gcc': 'Gcc', 'intel': 'Icc'} + + depends_on('mpi') + depends_on('cmake') + depends_on('python') + depends_on('flex@:2.5.99') + depends_on('bison') + depends_on('m4') + depends_on('hwloc') + depends_on('zlib') + + depends_on('scotch ~ metis', when='~ptscotch+scotch') + depends_on('scotch ~ metis + mpi', when='+ptscotch') + depends_on('metis@5:', when='+metis') + depends_on('parmetis', when='+parmetis') + depends_on('parmgridgen', when='+parmgridgen') + + depends_on('paraview', when='+paraview') + depends_on('qt@:4', when='+paraview') + + def _get_env(self, command): + variable_set = re.compile(r'(.+?)=(.*)') + proc = subprocess.Popen(['bash', '-c', command], + stdout=subprocess.PIPE) + env = {} + for line in proc.stdout: + match_grp = variable_set.match(line) + if match_grp: + env[match_grp.group(1)] = match_grp.group(2) + return env + + def set_arch(self): + (sysname, nodename, release, version, machine) = os.uname() + + if self.compiler.name not in self.supported_compilers: + raise RuntimeError('{0} is not a supported compiler \ + to compile OpenFOAM'.format(self.compiler.name)) + + foam_compiler = self.supported_compilers[self.compiler.name] + if sysname == 'Linux': + arch = 'linux' + if foam_compiler == 'Clang': + raise RuntimeError('OS, compiler combinaison not\ + supported ({0} {1})'.format(sysname, foam_compiler)) + elif sysname == 'Darwin': + if machine == 'x86_64': + arch = 'darwinIntel' + if foam_compiler == 'Icc': + raise RuntimeError('OS, compiler combinaison not\ + supported ({0} {1})'.format(sysname, foam_compiler)) + else: + raise RuntimeError('{0} {1} is not a \ + supported architecture'.format(sysname, machine)) + + return (arch, foam_compiler) + + def get_openfoam_environment(self, env_openfoam): + env_before = self._get_env('env') + + with working_dir(self.stage.source_path): + env_after = self._get_env('source etc/bashrc && env') + + if 'PATH' in env_after: + del env_after['PATH'] + + if 'LD_LIBRARY_PATH' in env_after: + del env_after['LD_LIBRARY_PATH'] + + for key, value in env_after.iteritems(): + if key not in env_before or not value == env_before[key]: + env_openfoam.set(key, value) + + def patch(self): + if '+parmgridgen' in self.spec: + filter_file(r'-lIMlib -lMGridGen', + r'-limlib -lmgrid', + 'src/dbns/Make/options') + filter_file(r'-lMGridGen', + r'-lmgrid', + 'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options') + + (arch, foam_compiler) = self.set_arch() + + prefs_dict = { + 'compilerInstall': 'System', + 'WM_COMPILER': foam_compiler, + 'WM_ARCH_OPTION': '64', + 'WM_PRECISION_OPTION': 'DP', + 'WM_COMPILE_OPTION': 'SPACKOpt', + 'WM_MPLIB': 'SPACK', + + 'CMAKE_DIR': self.spec['cmake'].prefix, + 'CMAKE_BIN_DIR': self.spec['cmake'].prefix.bin, + 'PYTHON_DIR': self.spec['python'].prefix, + 'PYTHON_BIN_DIR': self.spec['python'].prefix.bin, + + 'FLEX_SYSTEM': 1, + 'FLEX_DIR': self.spec['flex'].prefix, + + 'BISON_SYSTEM': 1, + 'BISON_DIR': self.spec['flex'].prefix, + + 'M4_SYSTEM': 1, + 'M4_DIR': self.spec['m4'].prefix, + + 'ZLIB_SYSTEM': 1, + 'ZLIB_DIR': self.spec['zlib'].prefix, + + 'HWLOC_SYSTEM': 1, + 'HWLOC_DIR': self.spec['hwloc'].prefix, + 'HWLOC_BIN_DIR': self.spec['hwloc'].prefix.bin, + } + + if '+scotch' in self.spec or '+ptscotch' in self.spec: + prefs_dict['SCOTCH_SYSTEM'] = 1 + prefs_dict['SCOTCH_DIR'] = self.spec['scotch'].prefix + prefs_dict['SCOTCH_BIN_DIR'] = self.spec['scotch'].prefix.bin + prefs_dict['SCOTCH_LIB_DIR'] = self.spec['scotch'].prefix.lib + prefs_dict['SCOTCH_INCLUDE_DIR'] = \ + self.spec['scotch'].prefix.include + + if '+metis' in self.spec: + prefs_dict['METIS_SYSTEM'] = 1 + prefs_dict['METIS_DIR'] = self.spec['metis'].prefix + prefs_dict['METIS_BIN_DIR'] = self.spec['metis'].prefix.bin + prefs_dict['METIS_LIB_DIR'] = self.spec['metis'].prefix.lib + prefs_dict['METIS_INCLUDE_DIR'] = self.spec['metis'].prefix.include + + if '+parmetis' in self.spec: + prefs_dict['PARMETIS_SYSTEM'] = 1 + prefs_dict['PARMETIS_DIR'] = self.spec['parmetis'].prefix + prefs_dict['PARMETIS_BIN_DIR'] = self.spec['parmetis'].prefix.bin + prefs_dict['PARMETIS_LIB_DIR'] = self.spec['parmetis'].prefix.lib + prefs_dict['PARMETIS_INCLUDE_DIR'] = \ + self.spec['parmetis'].prefix.include + + if '+parmgridgen' in self.spec: + prefs_dict['PARMGRIDGEN_SYSTEM'] = 1 + prefs_dict['PARMGRIDGEN_DIR'] = self.spec['parmgridgen'].prefix + prefs_dict['PARMGRIDGEN_BIN_DIR'] = \ + self.spec['parmgridgen'].prefix.bin + prefs_dict['PARMGRIDGEN_LIB_DIR'] = \ + self.spec['parmgridgen'].prefix.lib + prefs_dict['PARMGRIDGEN_INCLUDE_DIR'] = \ + self.spec['parmgridgen'].prefix.include + + if '+paraview' in self.spec: + prefs_dict['PARAVIEW_SYSTEM'] = 1 + prefs_dict['PARAVIEW_DIR'] = self.spec['paraview'].prefix, + prefs_dict['PARAVIEW_BIN_DIR'] = self.spec['paraview'].prefix.bin, + prefs_dict['QT_SYSTEM'] = 1 + prefs_dict['QT_DIR'] = self.spec['qt'].prefix, + prefs_dict['QT_BIN_DIR'] = self.spec['qt'].prefix.bin, + + with working_dir('.'): + with open("etc/prefs.sh", "w") as fh: + for key in sorted(prefs_dict): + fh.write('export {0}={1}\n'.format(key, prefs_dict[key])) + + with open("etc/prefs.csh", "w") as fh: + for key in sorted(prefs_dict): + fh.write('setenv {0}={1}\n'.format(key, prefs_dict[key])) + + mpi_info = [ + 'PFLAGS = -DOMPI_SKIP_MPICXX -DMPICH_IGNORE_CXX_SEEK', + 'PINC = -I{0}'.format(self.spec['mpi'].prefix.include), + 'PLIBS = -L{0} -lmpi'.format(self.spec['mpi'].prefix.lib) + ] + + arch_path = ''.join([arch, prefs_dict['WM_ARCH_OPTION'], + foam_compiler]) + option_path = ''.join([arch_path, + prefs_dict['WM_PRECISION_OPTION'], + prefs_dict['WM_COMPILE_OPTION']]) + rule_path = join_path("wmake", "rules", arch_path) + build_path = join_path(self.stage.source_path, 'lib', option_path) + install_path = \ + join_path(self.prefix, + 'foam-extend-{0}'.format(self.version.up_to(2)), + option_path) + + rpaths_foam = ' '.join([ + '{0}{1}'.format(self.compiler.cxx_rpath_arg, + install_path), + '{0}{1}'.format(self.compiler.cxx_rpath_arg, + build_path) + ]) + + compiler_flags = { + 'DBUG': rpaths_foam, + 'OPT': '-O3', + } + + with working_dir(rule_path): + with open('mplibSPACK', "w") as fh: + fh.write('\n'.join(mpi_info)) + + for comp in ['c', 'c++']: + with open('{0}SPACKOpt'.format(comp), "w") as fh: + for key, val in compiler_flags.iteritems(): + fh.write('{0}{1} = {2}\n'.format(comp, key, val)) + + def setup_environment(self, spack_env, run_env): + with working_dir(self.stage.path): + spack_env.set('FOAM_INST_DIR', os.path.abspath('.')) + + (arch, foam_compiler) = self.set_arch() + + run_env.set('FOAM_INST_DIR', self.prefix) + + def install(self, spec, prefix): + self.patch() + + env_openfoam = EnvironmentModifications() + self.get_openfoam_environment(env_openfoam) + env_openfoam.apply_modifications() + + if self.parallel: + os.environ['WM_NCOMPPROCS'] = str(self.make_jobs) \ + if self.make_jobs else str(multiprocessing.cpu_count()) + + # for key in sorted(os.environ): + # print("{0} = {1}".format(key, os.environ[key])) + + allwmake = Executable('./Allwmake') + allwmake() + + install_path = \ + join_path(self.prefix, + 'foam-extend-{0}'.format(self.version.up_to(2))) + + if '+source' in spec: + install_tree('src', join_path(install_path, 'src')) + + install_tree('lib', join_path(install_path, 'lib')) + install_tree('bin', join_path(install_path, 'bin')) + install_tree('applications', join_path(install_path, 'applications')) + install_tree('etc', join_path(install_path, 'etc')) + install_tree('wmake', join_path(install_path, 'wmake')) diff --git a/var/spack/repos/builtin/packages/openfoam-extend/package.py b/var/spack/repos/builtin/packages/openfoam-extend/package.py deleted file mode 100644 index 6af824df7e..0000000000 --- a/var/spack/repos/builtin/packages/openfoam-extend/package.py +++ /dev/null @@ -1,262 +0,0 @@ -from spack import * -from spack.environment import * - -import multiprocessing -import subprocess -import re -import os - - -class OpenfoamExtend(Package): - """OpenFOAM-extend or foam-extend""" - - version('3.2', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.2') - version('3.1', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.1') - version('3.0', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.0') - - variant('paraview', default=False, description='Enable ParaFOAM') - variant('scotch', default=True, description='Activate Scotch as a possible decomposition library') - variant('ptscotch', default=True, description='Activate PT-Scotch as a possible decomposition library') - variant('metis', default=True, description='Activate Metis as a possible decomposition library') - variant('parmetis', default=True, description='Activate Parmetis as a possible decomposition library') - variant('parmgridgen', default=True, description='Activate Parmgridgen support') - - supported_compilers = {'clang': 'Clang', 'gcc': 'Gcc', 'intel': 'Icc'} - - depends_on('mpi') - depends_on('cmake') - depends_on('python') - depends_on('flex@:2.5.99') - depends_on('bison') - depends_on('m4') - depends_on('hwloc') - depends_on('zlib') - - depends_on('scotch ~ metis', when='~ptscotch+scotch') - depends_on('scotch ~ metis + mpi', when='+ptscotch') - depends_on('metis@5:', when='+metis') - depends_on('parmetis', when='+parmetis') - depends_on('parmgridgen', when='+parmgridgen') - - depends_on('paraview', when='+paraview') - depends_on('qt@:4', when='+paraview') - - def _get_env(self, command): - variable_set = re.compile(r'(.+?)=(.*)') - proc = subprocess.Popen(['bash', '-c', command], - stdout=subprocess.PIPE) - env = {} - for line in proc.stdout: - match_grp = variable_set.match(line) - if match_grp: - env[match_grp.group(1)] = match_grp.group(2) - return env - - def set_arch(self): - (sysname, nodename, release, version, machine) = os.uname() - - if self.compiler.name not in self.supported_compilers: - raise RuntimeError('{0} is not a supported compiler \ - to compile OpenFOAM'.format(self.compiler.name)) - - foam_compiler = self.supported_compilers[self.compiler.name] - if sysname == 'Linux': - arch = 'linux' - if foam_compiler == 'Clang': - raise RuntimeError('OS, compiler combinaison not\ - supported ({0} {1})'.format(sysname, foam_compiler)) - elif sysname == 'Darwin': - if machine == 'x86_64': - arch = 'darwinIntel' - if foam_compiler == 'Icc': - raise RuntimeError('OS, compiler combinaison not\ - supported ({0} {1})'.format(sysname, foam_compiler)) - else: - raise RuntimeError('{0} {1} is not a \ - supported architecture'.format(sysname, machine)) - - return (arch, foam_compiler) - - def get_openfoam_environment(self, env_openfoam): - env_before = self._get_env('env') - - with working_dir(self.stage.source_path): - env_after = self._get_env('source etc/bashrc && env') - - if 'PATH' in env_after: - del env_after['PATH'] - - if 'LD_LIBRARY_PATH' in env_after: - del env_after['LD_LIBRARY_PATH'] - - for key, value in env_after.iteritems(): - if key not in env_before or not value == env_before[key]: - env_openfoam.set(key, value) - - def patch(self): - if '+parmgridgen' in self.spec: - filter_file(r'-lIMlib -lMGridGen', - r'-limlib -lmgrid', - 'src/dbns/Make/options') - filter_file(r'-lMGridGen', - r'-lmgrid', - 'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options') - - (arch, foam_compiler) = self.set_arch() - - prefs_dict = { - 'compilerInstall': 'System', - 'WM_COMPILER': foam_compiler, - 'WM_ARCH_OPTION': '64', - 'WM_PRECISION_OPTION': 'DP', - 'WM_COMPILE_OPTION': 'SPACKOpt', - 'WM_MPLIB': 'SPACK', - - 'CMAKE_DIR': self.spec['cmake'].prefix, - 'CMAKE_BIN_DIR': self.spec['cmake'].prefix.bin, - 'PYTHON_DIR': self.spec['python'].prefix, - 'PYTHON_BIN_DIR': self.spec['python'].prefix.bin, - - 'FLEX_SYSTEM': 1, - 'FLEX_DIR': self.spec['flex'].prefix, - - 'BISON_SYSTEM': 1, - 'BISON_DIR': self.spec['flex'].prefix, - - 'M4_SYSTEM': 1, - 'M4_DIR': self.spec['m4'].prefix, - - 'ZLIB_SYSTEM': 1, - 'ZLIB_DIR': self.spec['zlib'].prefix, - - 'HWLOC_SYSTEM': 1, - 'HWLOC_DIR': self.spec['hwloc'].prefix, - 'HWLOC_BIN_DIR': self.spec['hwloc'].prefix.bin, - } - - if '+scotch' in self.spec or '+ptscotch' in self.spec: - prefs_dict['SCOTCH_SYSTEM'] = 1 - prefs_dict['SCOTCH_DIR'] = self.spec['scotch'].prefix - prefs_dict['SCOTCH_BIN_DIR'] = self.spec['scotch'].prefix.bin - prefs_dict['SCOTCH_LIB_DIR'] = self.spec['scotch'].prefix.lib - prefs_dict['SCOTCH_INCLUDE_DIR'] = \ - self.spec['scotch'].prefix.include - - if '+metis' in self.spec: - prefs_dict['METIS_SYSTEM'] = 1 - prefs_dict['METIS_DIR'] = self.spec['metis'].prefix - prefs_dict['METIS_BIN_DIR'] = self.spec['metis'].prefix.bin - prefs_dict['METIS_LIB_DIR'] = self.spec['metis'].prefix.lib - prefs_dict['METIS_INCLUDE_DIR'] = self.spec['metis'].prefix.include - - if '+parmetis' in self.spec: - prefs_dict['PARMETIS_SYSTEM'] = 1 - prefs_dict['PARMETIS_DIR'] = self.spec['parmetis'].prefix - prefs_dict['PARMETIS_BIN_DIR'] = self.spec['parmetis'].prefix.bin - prefs_dict['PARMETIS_LIB_DIR'] = self.spec['parmetis'].prefix.lib - prefs_dict['PARMETIS_INCLUDE_DIR'] = \ - self.spec['parmetis'].prefix.include - - if '+parmgridgen' in self.spec: - prefs_dict['PARMGRIDGEN_SYSTEM'] = 1 - prefs_dict['PARMGRIDGEN_DIR'] = self.spec['parmgridgen'].prefix - prefs_dict['PARMGRIDGEN_BIN_DIR'] = \ - self.spec['parmgridgen'].prefix.bin - prefs_dict['PARMGRIDGEN_LIB_DIR'] = \ - self.spec['parmgridgen'].prefix.lib - prefs_dict['PARMGRIDGEN_INCLUDE_DIR'] = \ - self.spec['parmgridgen'].prefix.include - - if '+paraview' in self.spec: - prefs_dict['PARAVIEW_SYSTEM'] = 1 - prefs_dict['PARAVIEW_DIR'] = self.spec['paraview'].prefix, - prefs_dict['PARAVIEW_BIN_DIR'] = self.spec['paraview'].prefix.bin, - prefs_dict['QT_SYSTEM'] = 1 - prefs_dict['QT_DIR'] = self.spec['qt'].prefix, - prefs_dict['QT_BIN_DIR'] = self.spec['qt'].prefix.bin, - - with working_dir('.'): - with open("etc/prefs.sh", "w") as fh: - for key in sorted(prefs_dict): - fh.write('export {0}={1}\n'.format(key, prefs_dict[key])) - - with open("etc/prefs.csh", "w") as fh: - for key in sorted(prefs_dict): - fh.write('setenv {0}={1}\n'.format(key, prefs_dict[key])) - - mpi_info = [ - 'PFLAGS = -DOMPI_SKIP_MPICXX -DMPICH_IGNORE_CXX_SEEK', - 'PINC = -I{0}'.format(self.spec['mpi'].prefix.include), - 'PLIBS = -L{0} -lmpi'.format(self.spec['mpi'].prefix.lib) - ] - - arch_path = ''.join([arch, prefs_dict['WM_ARCH_OPTION'], - foam_compiler]) - option_path = ''.join([arch_path, - prefs_dict['WM_PRECISION_OPTION'], - prefs_dict['WM_COMPILE_OPTION']]) - rule_path = join_path("wmake", "rules", arch_path) - build_path = join_path(self.stage.source_path, 'lib', option_path) - install_path = \ - join_path(self.prefix, - 'foam-extend-{0}'.format(self.version.up_to(2)), - option_path) - - rpaths_foam = ' '.join([ - '{0}{1}'.format(self.compiler.cxx_rpath_arg, - install_path), - '{0}{1}'.format(self.compiler.cxx_rpath_arg, - build_path) - ]) - - compiler_flags = { - 'DBUG': rpaths_foam, - 'OPT': '-O3', - } - - with working_dir(rule_path): - with open('mplibSPACK', "w") as fh: - fh.write('\n'.join(mpi_info)) - - for comp in ['c', 'c++']: - with open('{0}SPACKOpt'.format(comp), "w") as fh: - for key, val in compiler_flags.iteritems(): - fh.write('{0}{1} = {2}\n'.format(comp, key, val)) - - def setup_environment(self, spack_env, run_env): - with working_dir(self.stage.path): - spack_env.set('FOAM_INST_DIR', os.path.abspath('.')) - - (arch, foam_compiler) = self.set_arch() - - run_env.set('FOAM_INST_DIR', self.prefix) - - def install(self, spec, prefix): - self.patch() - - env_openfoam = EnvironmentModifications() - self.get_openfoam_environment(env_openfoam) - env_openfoam.apply_modifications() - - if self.parallel: - os.environ['WM_NCOMPPROCS'] = str(self.make_jobs) \ - if self.make_jobs else str(multiprocessing.cpu_count()) - - # for key in sorted(os.environ): - # print("{0} = {1}".format(key, os.environ[key])) - - allwmake = Executable('./Allwmake') - allwmake() - - install_path = \ - join_path(self.prefix, - 'foam-extend-{0}'.format(self.version.up_to(2))) - - if '+source' in spec: - install_tree('src', join_path(install_path, 'src')) - - install_tree('lib', join_path(install_path, 'lib')) - install_tree('bin', join_path(install_path, 'bin')) - install_tree('applications', join_path(install_path, 'applications')) - install_tree('etc', join_path(install_path, 'etc')) - install_tree('wmake', join_path(install_path, 'wmake')) -- cgit v1.2.3-70-g09d2 From 4f591a6fe3f2fc1477d5b740d1eb9e56a37d56b3 Mon Sep 17 00:00:00 2001 From: Ali Dorostkar Date: Mon, 30 May 2016 16:42:24 +0200 Subject: Step-40 test for 8.3.0 and earlier Integrated part of step-40 to be tested for earlier versions of dealii --- var/spack/repos/builtin/packages/dealii/package.py | 44 ++++++++++++---------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index c871059075..e83347409e 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -228,29 +228,33 @@ class Dealii(Package): # take step-40 which can use both PETSc and Trilinos # FIXME: switch step-40 to MPI run - if spec.satisfies('@8.4.0:'): - with working_dir('examples/step-40'): - print('=====================================') - print('========== Step-40 PETSc ============') - 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: - make('release') - make('run', parallel=False) - - print('=====================================') - print('========= Step-40 Trilinos ==========') - print('=====================================') - # change Linear Algebra to Trilinos + with working_dir('examples/step-40'): + print('=====================================') + print('========== Step-40 PETSc ============') + 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: + make('release') + make('run', parallel=False) + + print('=====================================') + print('========= Step-40 Trilinos ==========') + print('=====================================') + # change Linear Algebra to Trilinos + if spec.satisfies('@8.4.0:'): filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc') - if '^trilinos+hypre' in spec: - make('release') - make('run', parallel=False) + 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) + if spec.satisfies('@8.4.0:'): print('=====================================') print('=== Step-40 Trilinos SuperluDist ====') print('=====================================') -- cgit v1.2.3-70-g09d2 From 4122ecbc804706b93c226f77720a0334fc020a02 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Sun, 22 May 2016 18:55:29 +0200 Subject: First try at OpenFOAM-extend --- .../builtin/packages/openfoam-extend/package.py | 262 +++++++++++++++++++++ .../repos/builtin/packages/parmgridgen/package.py | 75 ++++++ var/spack/repos/builtin/packages/scotch/package.py | 12 +- 3 files changed, 342 insertions(+), 7 deletions(-) create mode 100644 var/spack/repos/builtin/packages/openfoam-extend/package.py create mode 100644 var/spack/repos/builtin/packages/parmgridgen/package.py diff --git a/var/spack/repos/builtin/packages/openfoam-extend/package.py b/var/spack/repos/builtin/packages/openfoam-extend/package.py new file mode 100644 index 0000000000..6af824df7e --- /dev/null +++ b/var/spack/repos/builtin/packages/openfoam-extend/package.py @@ -0,0 +1,262 @@ +from spack import * +from spack.environment import * + +import multiprocessing +import subprocess +import re +import os + + +class OpenfoamExtend(Package): + """OpenFOAM-extend or foam-extend""" + + version('3.2', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.2') + version('3.1', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.1') + version('3.0', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.0') + + variant('paraview', default=False, description='Enable ParaFOAM') + variant('scotch', default=True, description='Activate Scotch as a possible decomposition library') + variant('ptscotch', default=True, description='Activate PT-Scotch as a possible decomposition library') + variant('metis', default=True, description='Activate Metis as a possible decomposition library') + variant('parmetis', default=True, description='Activate Parmetis as a possible decomposition library') + variant('parmgridgen', default=True, description='Activate Parmgridgen support') + + supported_compilers = {'clang': 'Clang', 'gcc': 'Gcc', 'intel': 'Icc'} + + depends_on('mpi') + depends_on('cmake') + depends_on('python') + depends_on('flex@:2.5.99') + depends_on('bison') + depends_on('m4') + depends_on('hwloc') + depends_on('zlib') + + depends_on('scotch ~ metis', when='~ptscotch+scotch') + depends_on('scotch ~ metis + mpi', when='+ptscotch') + depends_on('metis@5:', when='+metis') + depends_on('parmetis', when='+parmetis') + depends_on('parmgridgen', when='+parmgridgen') + + depends_on('paraview', when='+paraview') + depends_on('qt@:4', when='+paraview') + + def _get_env(self, command): + variable_set = re.compile(r'(.+?)=(.*)') + proc = subprocess.Popen(['bash', '-c', command], + stdout=subprocess.PIPE) + env = {} + for line in proc.stdout: + match_grp = variable_set.match(line) + if match_grp: + env[match_grp.group(1)] = match_grp.group(2) + return env + + def set_arch(self): + (sysname, nodename, release, version, machine) = os.uname() + + if self.compiler.name not in self.supported_compilers: + raise RuntimeError('{0} is not a supported compiler \ + to compile OpenFOAM'.format(self.compiler.name)) + + foam_compiler = self.supported_compilers[self.compiler.name] + if sysname == 'Linux': + arch = 'linux' + if foam_compiler == 'Clang': + raise RuntimeError('OS, compiler combinaison not\ + supported ({0} {1})'.format(sysname, foam_compiler)) + elif sysname == 'Darwin': + if machine == 'x86_64': + arch = 'darwinIntel' + if foam_compiler == 'Icc': + raise RuntimeError('OS, compiler combinaison not\ + supported ({0} {1})'.format(sysname, foam_compiler)) + else: + raise RuntimeError('{0} {1} is not a \ + supported architecture'.format(sysname, machine)) + + return (arch, foam_compiler) + + def get_openfoam_environment(self, env_openfoam): + env_before = self._get_env('env') + + with working_dir(self.stage.source_path): + env_after = self._get_env('source etc/bashrc && env') + + if 'PATH' in env_after: + del env_after['PATH'] + + if 'LD_LIBRARY_PATH' in env_after: + del env_after['LD_LIBRARY_PATH'] + + for key, value in env_after.iteritems(): + if key not in env_before or not value == env_before[key]: + env_openfoam.set(key, value) + + def patch(self): + if '+parmgridgen' in self.spec: + filter_file(r'-lIMlib -lMGridGen', + r'-limlib -lmgrid', + 'src/dbns/Make/options') + filter_file(r'-lMGridGen', + r'-lmgrid', + 'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options') + + (arch, foam_compiler) = self.set_arch() + + prefs_dict = { + 'compilerInstall': 'System', + 'WM_COMPILER': foam_compiler, + 'WM_ARCH_OPTION': '64', + 'WM_PRECISION_OPTION': 'DP', + 'WM_COMPILE_OPTION': 'SPACKOpt', + 'WM_MPLIB': 'SPACK', + + 'CMAKE_DIR': self.spec['cmake'].prefix, + 'CMAKE_BIN_DIR': self.spec['cmake'].prefix.bin, + 'PYTHON_DIR': self.spec['python'].prefix, + 'PYTHON_BIN_DIR': self.spec['python'].prefix.bin, + + 'FLEX_SYSTEM': 1, + 'FLEX_DIR': self.spec['flex'].prefix, + + 'BISON_SYSTEM': 1, + 'BISON_DIR': self.spec['flex'].prefix, + + 'M4_SYSTEM': 1, + 'M4_DIR': self.spec['m4'].prefix, + + 'ZLIB_SYSTEM': 1, + 'ZLIB_DIR': self.spec['zlib'].prefix, + + 'HWLOC_SYSTEM': 1, + 'HWLOC_DIR': self.spec['hwloc'].prefix, + 'HWLOC_BIN_DIR': self.spec['hwloc'].prefix.bin, + } + + if '+scotch' in self.spec or '+ptscotch' in self.spec: + prefs_dict['SCOTCH_SYSTEM'] = 1 + prefs_dict['SCOTCH_DIR'] = self.spec['scotch'].prefix + prefs_dict['SCOTCH_BIN_DIR'] = self.spec['scotch'].prefix.bin + prefs_dict['SCOTCH_LIB_DIR'] = self.spec['scotch'].prefix.lib + prefs_dict['SCOTCH_INCLUDE_DIR'] = \ + self.spec['scotch'].prefix.include + + if '+metis' in self.spec: + prefs_dict['METIS_SYSTEM'] = 1 + prefs_dict['METIS_DIR'] = self.spec['metis'].prefix + prefs_dict['METIS_BIN_DIR'] = self.spec['metis'].prefix.bin + prefs_dict['METIS_LIB_DIR'] = self.spec['metis'].prefix.lib + prefs_dict['METIS_INCLUDE_DIR'] = self.spec['metis'].prefix.include + + if '+parmetis' in self.spec: + prefs_dict['PARMETIS_SYSTEM'] = 1 + prefs_dict['PARMETIS_DIR'] = self.spec['parmetis'].prefix + prefs_dict['PARMETIS_BIN_DIR'] = self.spec['parmetis'].prefix.bin + prefs_dict['PARMETIS_LIB_DIR'] = self.spec['parmetis'].prefix.lib + prefs_dict['PARMETIS_INCLUDE_DIR'] = \ + self.spec['parmetis'].prefix.include + + if '+parmgridgen' in self.spec: + prefs_dict['PARMGRIDGEN_SYSTEM'] = 1 + prefs_dict['PARMGRIDGEN_DIR'] = self.spec['parmgridgen'].prefix + prefs_dict['PARMGRIDGEN_BIN_DIR'] = \ + self.spec['parmgridgen'].prefix.bin + prefs_dict['PARMGRIDGEN_LIB_DIR'] = \ + self.spec['parmgridgen'].prefix.lib + prefs_dict['PARMGRIDGEN_INCLUDE_DIR'] = \ + self.spec['parmgridgen'].prefix.include + + if '+paraview' in self.spec: + prefs_dict['PARAVIEW_SYSTEM'] = 1 + prefs_dict['PARAVIEW_DIR'] = self.spec['paraview'].prefix, + prefs_dict['PARAVIEW_BIN_DIR'] = self.spec['paraview'].prefix.bin, + prefs_dict['QT_SYSTEM'] = 1 + prefs_dict['QT_DIR'] = self.spec['qt'].prefix, + prefs_dict['QT_BIN_DIR'] = self.spec['qt'].prefix.bin, + + with working_dir('.'): + with open("etc/prefs.sh", "w") as fh: + for key in sorted(prefs_dict): + fh.write('export {0}={1}\n'.format(key, prefs_dict[key])) + + with open("etc/prefs.csh", "w") as fh: + for key in sorted(prefs_dict): + fh.write('setenv {0}={1}\n'.format(key, prefs_dict[key])) + + mpi_info = [ + 'PFLAGS = -DOMPI_SKIP_MPICXX -DMPICH_IGNORE_CXX_SEEK', + 'PINC = -I{0}'.format(self.spec['mpi'].prefix.include), + 'PLIBS = -L{0} -lmpi'.format(self.spec['mpi'].prefix.lib) + ] + + arch_path = ''.join([arch, prefs_dict['WM_ARCH_OPTION'], + foam_compiler]) + option_path = ''.join([arch_path, + prefs_dict['WM_PRECISION_OPTION'], + prefs_dict['WM_COMPILE_OPTION']]) + rule_path = join_path("wmake", "rules", arch_path) + build_path = join_path(self.stage.source_path, 'lib', option_path) + install_path = \ + join_path(self.prefix, + 'foam-extend-{0}'.format(self.version.up_to(2)), + option_path) + + rpaths_foam = ' '.join([ + '{0}{1}'.format(self.compiler.cxx_rpath_arg, + install_path), + '{0}{1}'.format(self.compiler.cxx_rpath_arg, + build_path) + ]) + + compiler_flags = { + 'DBUG': rpaths_foam, + 'OPT': '-O3', + } + + with working_dir(rule_path): + with open('mplibSPACK', "w") as fh: + fh.write('\n'.join(mpi_info)) + + for comp in ['c', 'c++']: + with open('{0}SPACKOpt'.format(comp), "w") as fh: + for key, val in compiler_flags.iteritems(): + fh.write('{0}{1} = {2}\n'.format(comp, key, val)) + + def setup_environment(self, spack_env, run_env): + with working_dir(self.stage.path): + spack_env.set('FOAM_INST_DIR', os.path.abspath('.')) + + (arch, foam_compiler) = self.set_arch() + + run_env.set('FOAM_INST_DIR', self.prefix) + + def install(self, spec, prefix): + self.patch() + + env_openfoam = EnvironmentModifications() + self.get_openfoam_environment(env_openfoam) + env_openfoam.apply_modifications() + + if self.parallel: + os.environ['WM_NCOMPPROCS'] = str(self.make_jobs) \ + if self.make_jobs else str(multiprocessing.cpu_count()) + + # for key in sorted(os.environ): + # print("{0} = {1}".format(key, os.environ[key])) + + allwmake = Executable('./Allwmake') + allwmake() + + install_path = \ + join_path(self.prefix, + 'foam-extend-{0}'.format(self.version.up_to(2))) + + if '+source' in spec: + install_tree('src', join_path(install_path, 'src')) + + install_tree('lib', join_path(install_path, 'lib')) + install_tree('bin', join_path(install_path, 'bin')) + install_tree('applications', join_path(install_path, 'applications')) + install_tree('etc', join_path(install_path, 'etc')) + install_tree('wmake', join_path(install_path, 'wmake')) diff --git a/var/spack/repos/builtin/packages/parmgridgen/package.py b/var/spack/repos/builtin/packages/parmgridgen/package.py new file mode 100644 index 0000000000..11b19f2ec2 --- /dev/null +++ b/var/spack/repos/builtin/packages/parmgridgen/package.py @@ -0,0 +1,75 @@ +############################################################################## +# 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 Parmgridgen(Package): + """MGRIDGEN is a serial library written entirely in ANSI C that implements + (serial) algorithms for obtaining a sequence of successive coarse grids + that are well-suited for geometric multigrid methods. + ParMGridGen is the parallel version of MGridGen + """ + + homepage = "http://www-users.cs.umn.edu/~moulitsa/software.html" + url = "http://www-users.cs.umn.edu/~moulitsa/download/ParMGridGen-1.0.tar.gz" + + version('1.0', '2872fa95b7fb91d6bd525490eed62038') + + depends_on('mpi') + + def install(self, spec, prefix): + make_opts = [ + 'make=make', + 'COPTIONS=-fPIC', + 'LDOPTIONS=-fPIC', + 'CC={0}'.format(self.compiler.cc), + 'PARCC={0}'.format(self.spec['mpi'].mpicc), + 'LD={0}'.format(self.compiler.cc), + 'PARLD={0}'.format(self.spec['mpi'].mpicc), + 'LIBDIR=-L../..', + 'PARLIBS=-L../../ -lparmgrid -lmgrid -lm', + 'LIBS=-L../../ -lmgrid -lm', + 'parallel' + ] + + make(*make_opts, parallel=False) + + include_path = join_path(self.prefix, 'include') + lib_path = join_path(self.prefix, 'lib') + bin_path = join_path(self.prefix, 'bin') + + mkdirp(include_path, lib_path, bin_path) + + install("mgridgen.h", include_path) + install("parmgridgen.h", include_path) + + install("MGridGen/IMlib/libIMlib.a", + join_path(lib_path, 'libimlib.a')) + install("libmgrid.a", lib_path) + install("libparmgrid.a", lib_path) + + install("mgridgen", bin_path) + install("parmgridgen", bin_path) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 3c2b4993ac..2f6e42c439 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -171,15 +171,13 @@ class Scotch(Package): target == 'ptscotch')) make(target, parallel=can_make_parallel) - # todo change this to take into account darwin systems - lib_ext = '.so' if '+shared' in self.spec else '.a' + lib_ext = dso_suffix if '+shared' in self.spec else 'a' # It seams easier to remove metis wrappers from the folder that will be # installed than to tweak the Makefiles if '+metis' not in self.spec: with working_dir('lib'): - lib_ext = '.so' if '+shared' in self.spec else '.a' - force_remove('libscotchmetis{0}'.format(lib_ext)) - force_remove('libptscotchparmetis{0}'.format(lib_ext)) + force_remove('libscotchmetis.{0}'.format(lib_ext)) + force_remove('libptscotchparmetis.{0}'.format(lib_ext)) with working_dir('include'): force_remove('metis.h') @@ -187,8 +185,8 @@ class Scotch(Package): if '~esmumps' in self.spec and self.spec.version < Version('6.0.0'): with working_dir('lib'): - force_remove('libesmumps{0}'.format(lib_ext)) - force_remove('libptesmumps{0}'.format(lib_ext)) + force_remove('libesmumps.{0}'.format(lib_ext)) + force_remove('libptesmumps.{0}'.format(lib_ext)) with working_dir('include'): force_remove('esmumps.h') -- cgit v1.2.3-70-g09d2 From 08c8d1d1f7cbae2449dc56b0aafc390247b2be83 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Mon, 30 May 2016 15:46:39 +0200 Subject: limiting package to foam-extend to start --- .../repos/builtin/packages/foam-extend/package.py | 263 +++++++++++++++++++++ .../builtin/packages/openfoam-extend/package.py | 262 -------------------- 2 files changed, 263 insertions(+), 262 deletions(-) create mode 100644 var/spack/repos/builtin/packages/foam-extend/package.py delete mode 100644 var/spack/repos/builtin/packages/openfoam-extend/package.py diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py new file mode 100644 index 0000000000..4bbb065d8b --- /dev/null +++ b/var/spack/repos/builtin/packages/foam-extend/package.py @@ -0,0 +1,263 @@ +from spack import * +from spack.environment import * + +import multiprocessing +import subprocess +import re +import os + + +class FoamExtend(Package): + """The foam-extend project is a fork of the OpenFOAM open source library + for Computational Fluid Dynamics (CFD).""" + + version('3.2', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.2') + version('3.1', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.1') + version('3.0', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.0') + + variant('paraview', default=False, description='Enable ParaFOAM') + variant('scotch', default=True, description='Activate Scotch as a possible decomposition library') + variant('ptscotch', default=True, description='Activate PT-Scotch as a possible decomposition library') + variant('metis', default=True, description='Activate Metis as a possible decomposition library') + variant('parmetis', default=True, description='Activate Parmetis as a possible decomposition library') + variant('parmgridgen', default=True, description='Activate Parmgridgen support') + + supported_compilers = {'clang': 'Clang', 'gcc': 'Gcc', 'intel': 'Icc'} + + depends_on('mpi') + depends_on('cmake') + depends_on('python') + depends_on('flex@:2.5.99') + depends_on('bison') + depends_on('m4') + depends_on('hwloc') + depends_on('zlib') + + depends_on('scotch ~ metis', when='~ptscotch+scotch') + depends_on('scotch ~ metis + mpi', when='+ptscotch') + depends_on('metis@5:', when='+metis') + depends_on('parmetis', when='+parmetis') + depends_on('parmgridgen', when='+parmgridgen') + + depends_on('paraview', when='+paraview') + depends_on('qt@:4', when='+paraview') + + def _get_env(self, command): + variable_set = re.compile(r'(.+?)=(.*)') + proc = subprocess.Popen(['bash', '-c', command], + stdout=subprocess.PIPE) + env = {} + for line in proc.stdout: + match_grp = variable_set.match(line) + if match_grp: + env[match_grp.group(1)] = match_grp.group(2) + return env + + def set_arch(self): + (sysname, nodename, release, version, machine) = os.uname() + + if self.compiler.name not in self.supported_compilers: + raise RuntimeError('{0} is not a supported compiler \ + to compile OpenFOAM'.format(self.compiler.name)) + + foam_compiler = self.supported_compilers[self.compiler.name] + if sysname == 'Linux': + arch = 'linux' + if foam_compiler == 'Clang': + raise RuntimeError('OS, compiler combinaison not\ + supported ({0} {1})'.format(sysname, foam_compiler)) + elif sysname == 'Darwin': + if machine == 'x86_64': + arch = 'darwinIntel' + if foam_compiler == 'Icc': + raise RuntimeError('OS, compiler combinaison not\ + supported ({0} {1})'.format(sysname, foam_compiler)) + else: + raise RuntimeError('{0} {1} is not a \ + supported architecture'.format(sysname, machine)) + + return (arch, foam_compiler) + + def get_openfoam_environment(self, env_openfoam): + env_before = self._get_env('env') + + with working_dir(self.stage.source_path): + env_after = self._get_env('source etc/bashrc && env') + + if 'PATH' in env_after: + del env_after['PATH'] + + if 'LD_LIBRARY_PATH' in env_after: + del env_after['LD_LIBRARY_PATH'] + + for key, value in env_after.iteritems(): + if key not in env_before or not value == env_before[key]: + env_openfoam.set(key, value) + + def patch(self): + if '+parmgridgen' in self.spec: + filter_file(r'-lIMlib -lMGridGen', + r'-limlib -lmgrid', + 'src/dbns/Make/options') + filter_file(r'-lMGridGen', + r'-lmgrid', + 'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options') + + (arch, foam_compiler) = self.set_arch() + + prefs_dict = { + 'compilerInstall': 'System', + 'WM_COMPILER': foam_compiler, + 'WM_ARCH_OPTION': '64', + 'WM_PRECISION_OPTION': 'DP', + 'WM_COMPILE_OPTION': 'SPACKOpt', + 'WM_MPLIB': 'SPACK', + + 'CMAKE_DIR': self.spec['cmake'].prefix, + 'CMAKE_BIN_DIR': self.spec['cmake'].prefix.bin, + 'PYTHON_DIR': self.spec['python'].prefix, + 'PYTHON_BIN_DIR': self.spec['python'].prefix.bin, + + 'FLEX_SYSTEM': 1, + 'FLEX_DIR': self.spec['flex'].prefix, + + 'BISON_SYSTEM': 1, + 'BISON_DIR': self.spec['flex'].prefix, + + 'M4_SYSTEM': 1, + 'M4_DIR': self.spec['m4'].prefix, + + 'ZLIB_SYSTEM': 1, + 'ZLIB_DIR': self.spec['zlib'].prefix, + + 'HWLOC_SYSTEM': 1, + 'HWLOC_DIR': self.spec['hwloc'].prefix, + 'HWLOC_BIN_DIR': self.spec['hwloc'].prefix.bin, + } + + if '+scotch' in self.spec or '+ptscotch' in self.spec: + prefs_dict['SCOTCH_SYSTEM'] = 1 + prefs_dict['SCOTCH_DIR'] = self.spec['scotch'].prefix + prefs_dict['SCOTCH_BIN_DIR'] = self.spec['scotch'].prefix.bin + prefs_dict['SCOTCH_LIB_DIR'] = self.spec['scotch'].prefix.lib + prefs_dict['SCOTCH_INCLUDE_DIR'] = \ + self.spec['scotch'].prefix.include + + if '+metis' in self.spec: + prefs_dict['METIS_SYSTEM'] = 1 + prefs_dict['METIS_DIR'] = self.spec['metis'].prefix + prefs_dict['METIS_BIN_DIR'] = self.spec['metis'].prefix.bin + prefs_dict['METIS_LIB_DIR'] = self.spec['metis'].prefix.lib + prefs_dict['METIS_INCLUDE_DIR'] = self.spec['metis'].prefix.include + + if '+parmetis' in self.spec: + prefs_dict['PARMETIS_SYSTEM'] = 1 + prefs_dict['PARMETIS_DIR'] = self.spec['parmetis'].prefix + prefs_dict['PARMETIS_BIN_DIR'] = self.spec['parmetis'].prefix.bin + prefs_dict['PARMETIS_LIB_DIR'] = self.spec['parmetis'].prefix.lib + prefs_dict['PARMETIS_INCLUDE_DIR'] = \ + self.spec['parmetis'].prefix.include + + if '+parmgridgen' in self.spec: + prefs_dict['PARMGRIDGEN_SYSTEM'] = 1 + prefs_dict['PARMGRIDGEN_DIR'] = self.spec['parmgridgen'].prefix + prefs_dict['PARMGRIDGEN_BIN_DIR'] = \ + self.spec['parmgridgen'].prefix.bin + prefs_dict['PARMGRIDGEN_LIB_DIR'] = \ + self.spec['parmgridgen'].prefix.lib + prefs_dict['PARMGRIDGEN_INCLUDE_DIR'] = \ + self.spec['parmgridgen'].prefix.include + + if '+paraview' in self.spec: + prefs_dict['PARAVIEW_SYSTEM'] = 1 + prefs_dict['PARAVIEW_DIR'] = self.spec['paraview'].prefix, + prefs_dict['PARAVIEW_BIN_DIR'] = self.spec['paraview'].prefix.bin, + prefs_dict['QT_SYSTEM'] = 1 + prefs_dict['QT_DIR'] = self.spec['qt'].prefix, + prefs_dict['QT_BIN_DIR'] = self.spec['qt'].prefix.bin, + + with working_dir('.'): + with open("etc/prefs.sh", "w") as fh: + for key in sorted(prefs_dict): + fh.write('export {0}={1}\n'.format(key, prefs_dict[key])) + + with open("etc/prefs.csh", "w") as fh: + for key in sorted(prefs_dict): + fh.write('setenv {0}={1}\n'.format(key, prefs_dict[key])) + + mpi_info = [ + 'PFLAGS = -DOMPI_SKIP_MPICXX -DMPICH_IGNORE_CXX_SEEK', + 'PINC = -I{0}'.format(self.spec['mpi'].prefix.include), + 'PLIBS = -L{0} -lmpi'.format(self.spec['mpi'].prefix.lib) + ] + + arch_path = ''.join([arch, prefs_dict['WM_ARCH_OPTION'], + foam_compiler]) + option_path = ''.join([arch_path, + prefs_dict['WM_PRECISION_OPTION'], + prefs_dict['WM_COMPILE_OPTION']]) + rule_path = join_path("wmake", "rules", arch_path) + build_path = join_path(self.stage.source_path, 'lib', option_path) + install_path = \ + join_path(self.prefix, + 'foam-extend-{0}'.format(self.version.up_to(2)), + option_path) + + rpaths_foam = ' '.join([ + '{0}{1}'.format(self.compiler.cxx_rpath_arg, + install_path), + '{0}{1}'.format(self.compiler.cxx_rpath_arg, + build_path) + ]) + + compiler_flags = { + 'DBUG': rpaths_foam, + 'OPT': '-O3', + } + + with working_dir(rule_path): + with open('mplibSPACK', "w") as fh: + fh.write('\n'.join(mpi_info)) + + for comp in ['c', 'c++']: + with open('{0}SPACKOpt'.format(comp), "w") as fh: + for key, val in compiler_flags.iteritems(): + fh.write('{0}{1} = {2}\n'.format(comp, key, val)) + + def setup_environment(self, spack_env, run_env): + with working_dir(self.stage.path): + spack_env.set('FOAM_INST_DIR', os.path.abspath('.')) + + (arch, foam_compiler) = self.set_arch() + + run_env.set('FOAM_INST_DIR', self.prefix) + + def install(self, spec, prefix): + self.patch() + + env_openfoam = EnvironmentModifications() + self.get_openfoam_environment(env_openfoam) + env_openfoam.apply_modifications() + + if self.parallel: + os.environ['WM_NCOMPPROCS'] = str(self.make_jobs) \ + if self.make_jobs else str(multiprocessing.cpu_count()) + + # for key in sorted(os.environ): + # print("{0} = {1}".format(key, os.environ[key])) + + allwmake = Executable('./Allwmake') + allwmake() + + install_path = \ + join_path(self.prefix, + 'foam-extend-{0}'.format(self.version.up_to(2))) + + if '+source' in spec: + install_tree('src', join_path(install_path, 'src')) + + install_tree('lib', join_path(install_path, 'lib')) + install_tree('bin', join_path(install_path, 'bin')) + install_tree('applications', join_path(install_path, 'applications')) + install_tree('etc', join_path(install_path, 'etc')) + install_tree('wmake', join_path(install_path, 'wmake')) diff --git a/var/spack/repos/builtin/packages/openfoam-extend/package.py b/var/spack/repos/builtin/packages/openfoam-extend/package.py deleted file mode 100644 index 6af824df7e..0000000000 --- a/var/spack/repos/builtin/packages/openfoam-extend/package.py +++ /dev/null @@ -1,262 +0,0 @@ -from spack import * -from spack.environment import * - -import multiprocessing -import subprocess -import re -import os - - -class OpenfoamExtend(Package): - """OpenFOAM-extend or foam-extend""" - - version('3.2', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.2') - version('3.1', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.1') - version('3.0', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.0') - - variant('paraview', default=False, description='Enable ParaFOAM') - variant('scotch', default=True, description='Activate Scotch as a possible decomposition library') - variant('ptscotch', default=True, description='Activate PT-Scotch as a possible decomposition library') - variant('metis', default=True, description='Activate Metis as a possible decomposition library') - variant('parmetis', default=True, description='Activate Parmetis as a possible decomposition library') - variant('parmgridgen', default=True, description='Activate Parmgridgen support') - - supported_compilers = {'clang': 'Clang', 'gcc': 'Gcc', 'intel': 'Icc'} - - depends_on('mpi') - depends_on('cmake') - depends_on('python') - depends_on('flex@:2.5.99') - depends_on('bison') - depends_on('m4') - depends_on('hwloc') - depends_on('zlib') - - depends_on('scotch ~ metis', when='~ptscotch+scotch') - depends_on('scotch ~ metis + mpi', when='+ptscotch') - depends_on('metis@5:', when='+metis') - depends_on('parmetis', when='+parmetis') - depends_on('parmgridgen', when='+parmgridgen') - - depends_on('paraview', when='+paraview') - depends_on('qt@:4', when='+paraview') - - def _get_env(self, command): - variable_set = re.compile(r'(.+?)=(.*)') - proc = subprocess.Popen(['bash', '-c', command], - stdout=subprocess.PIPE) - env = {} - for line in proc.stdout: - match_grp = variable_set.match(line) - if match_grp: - env[match_grp.group(1)] = match_grp.group(2) - return env - - def set_arch(self): - (sysname, nodename, release, version, machine) = os.uname() - - if self.compiler.name not in self.supported_compilers: - raise RuntimeError('{0} is not a supported compiler \ - to compile OpenFOAM'.format(self.compiler.name)) - - foam_compiler = self.supported_compilers[self.compiler.name] - if sysname == 'Linux': - arch = 'linux' - if foam_compiler == 'Clang': - raise RuntimeError('OS, compiler combinaison not\ - supported ({0} {1})'.format(sysname, foam_compiler)) - elif sysname == 'Darwin': - if machine == 'x86_64': - arch = 'darwinIntel' - if foam_compiler == 'Icc': - raise RuntimeError('OS, compiler combinaison not\ - supported ({0} {1})'.format(sysname, foam_compiler)) - else: - raise RuntimeError('{0} {1} is not a \ - supported architecture'.format(sysname, machine)) - - return (arch, foam_compiler) - - def get_openfoam_environment(self, env_openfoam): - env_before = self._get_env('env') - - with working_dir(self.stage.source_path): - env_after = self._get_env('source etc/bashrc && env') - - if 'PATH' in env_after: - del env_after['PATH'] - - if 'LD_LIBRARY_PATH' in env_after: - del env_after['LD_LIBRARY_PATH'] - - for key, value in env_after.iteritems(): - if key not in env_before or not value == env_before[key]: - env_openfoam.set(key, value) - - def patch(self): - if '+parmgridgen' in self.spec: - filter_file(r'-lIMlib -lMGridGen', - r'-limlib -lmgrid', - 'src/dbns/Make/options') - filter_file(r'-lMGridGen', - r'-lmgrid', - 'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options') - - (arch, foam_compiler) = self.set_arch() - - prefs_dict = { - 'compilerInstall': 'System', - 'WM_COMPILER': foam_compiler, - 'WM_ARCH_OPTION': '64', - 'WM_PRECISION_OPTION': 'DP', - 'WM_COMPILE_OPTION': 'SPACKOpt', - 'WM_MPLIB': 'SPACK', - - 'CMAKE_DIR': self.spec['cmake'].prefix, - 'CMAKE_BIN_DIR': self.spec['cmake'].prefix.bin, - 'PYTHON_DIR': self.spec['python'].prefix, - 'PYTHON_BIN_DIR': self.spec['python'].prefix.bin, - - 'FLEX_SYSTEM': 1, - 'FLEX_DIR': self.spec['flex'].prefix, - - 'BISON_SYSTEM': 1, - 'BISON_DIR': self.spec['flex'].prefix, - - 'M4_SYSTEM': 1, - 'M4_DIR': self.spec['m4'].prefix, - - 'ZLIB_SYSTEM': 1, - 'ZLIB_DIR': self.spec['zlib'].prefix, - - 'HWLOC_SYSTEM': 1, - 'HWLOC_DIR': self.spec['hwloc'].prefix, - 'HWLOC_BIN_DIR': self.spec['hwloc'].prefix.bin, - } - - if '+scotch' in self.spec or '+ptscotch' in self.spec: - prefs_dict['SCOTCH_SYSTEM'] = 1 - prefs_dict['SCOTCH_DIR'] = self.spec['scotch'].prefix - prefs_dict['SCOTCH_BIN_DIR'] = self.spec['scotch'].prefix.bin - prefs_dict['SCOTCH_LIB_DIR'] = self.spec['scotch'].prefix.lib - prefs_dict['SCOTCH_INCLUDE_DIR'] = \ - self.spec['scotch'].prefix.include - - if '+metis' in self.spec: - prefs_dict['METIS_SYSTEM'] = 1 - prefs_dict['METIS_DIR'] = self.spec['metis'].prefix - prefs_dict['METIS_BIN_DIR'] = self.spec['metis'].prefix.bin - prefs_dict['METIS_LIB_DIR'] = self.spec['metis'].prefix.lib - prefs_dict['METIS_INCLUDE_DIR'] = self.spec['metis'].prefix.include - - if '+parmetis' in self.spec: - prefs_dict['PARMETIS_SYSTEM'] = 1 - prefs_dict['PARMETIS_DIR'] = self.spec['parmetis'].prefix - prefs_dict['PARMETIS_BIN_DIR'] = self.spec['parmetis'].prefix.bin - prefs_dict['PARMETIS_LIB_DIR'] = self.spec['parmetis'].prefix.lib - prefs_dict['PARMETIS_INCLUDE_DIR'] = \ - self.spec['parmetis'].prefix.include - - if '+parmgridgen' in self.spec: - prefs_dict['PARMGRIDGEN_SYSTEM'] = 1 - prefs_dict['PARMGRIDGEN_DIR'] = self.spec['parmgridgen'].prefix - prefs_dict['PARMGRIDGEN_BIN_DIR'] = \ - self.spec['parmgridgen'].prefix.bin - prefs_dict['PARMGRIDGEN_LIB_DIR'] = \ - self.spec['parmgridgen'].prefix.lib - prefs_dict['PARMGRIDGEN_INCLUDE_DIR'] = \ - self.spec['parmgridgen'].prefix.include - - if '+paraview' in self.spec: - prefs_dict['PARAVIEW_SYSTEM'] = 1 - prefs_dict['PARAVIEW_DIR'] = self.spec['paraview'].prefix, - prefs_dict['PARAVIEW_BIN_DIR'] = self.spec['paraview'].prefix.bin, - prefs_dict['QT_SYSTEM'] = 1 - prefs_dict['QT_DIR'] = self.spec['qt'].prefix, - prefs_dict['QT_BIN_DIR'] = self.spec['qt'].prefix.bin, - - with working_dir('.'): - with open("etc/prefs.sh", "w") as fh: - for key in sorted(prefs_dict): - fh.write('export {0}={1}\n'.format(key, prefs_dict[key])) - - with open("etc/prefs.csh", "w") as fh: - for key in sorted(prefs_dict): - fh.write('setenv {0}={1}\n'.format(key, prefs_dict[key])) - - mpi_info = [ - 'PFLAGS = -DOMPI_SKIP_MPICXX -DMPICH_IGNORE_CXX_SEEK', - 'PINC = -I{0}'.format(self.spec['mpi'].prefix.include), - 'PLIBS = -L{0} -lmpi'.format(self.spec['mpi'].prefix.lib) - ] - - arch_path = ''.join([arch, prefs_dict['WM_ARCH_OPTION'], - foam_compiler]) - option_path = ''.join([arch_path, - prefs_dict['WM_PRECISION_OPTION'], - prefs_dict['WM_COMPILE_OPTION']]) - rule_path = join_path("wmake", "rules", arch_path) - build_path = join_path(self.stage.source_path, 'lib', option_path) - install_path = \ - join_path(self.prefix, - 'foam-extend-{0}'.format(self.version.up_to(2)), - option_path) - - rpaths_foam = ' '.join([ - '{0}{1}'.format(self.compiler.cxx_rpath_arg, - install_path), - '{0}{1}'.format(self.compiler.cxx_rpath_arg, - build_path) - ]) - - compiler_flags = { - 'DBUG': rpaths_foam, - 'OPT': '-O3', - } - - with working_dir(rule_path): - with open('mplibSPACK', "w") as fh: - fh.write('\n'.join(mpi_info)) - - for comp in ['c', 'c++']: - with open('{0}SPACKOpt'.format(comp), "w") as fh: - for key, val in compiler_flags.iteritems(): - fh.write('{0}{1} = {2}\n'.format(comp, key, val)) - - def setup_environment(self, spack_env, run_env): - with working_dir(self.stage.path): - spack_env.set('FOAM_INST_DIR', os.path.abspath('.')) - - (arch, foam_compiler) = self.set_arch() - - run_env.set('FOAM_INST_DIR', self.prefix) - - def install(self, spec, prefix): - self.patch() - - env_openfoam = EnvironmentModifications() - self.get_openfoam_environment(env_openfoam) - env_openfoam.apply_modifications() - - if self.parallel: - os.environ['WM_NCOMPPROCS'] = str(self.make_jobs) \ - if self.make_jobs else str(multiprocessing.cpu_count()) - - # for key in sorted(os.environ): - # print("{0} = {1}".format(key, os.environ[key])) - - allwmake = Executable('./Allwmake') - allwmake() - - install_path = \ - join_path(self.prefix, - 'foam-extend-{0}'.format(self.version.up_to(2))) - - if '+source' in spec: - install_tree('src', join_path(install_path, 'src')) - - install_tree('lib', join_path(install_path, 'lib')) - install_tree('bin', join_path(install_path, 'bin')) - install_tree('applications', join_path(install_path, 'applications')) - install_tree('etc', join_path(install_path, 'etc')) - install_tree('wmake', join_path(install_path, 'wmake')) -- cgit v1.2.3-70-g09d2 From 9f4e599232d614ef0611e4e89125b75d4a9d816e Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Mon, 30 May 2016 16:58:06 +0200 Subject: Ignoring the flake8 error for a line too long --- var/spack/repos/builtin/packages/foam-extend/package.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py index 4bbb065d8b..71a61afaa6 100644 --- a/var/spack/repos/builtin/packages/foam-extend/package.py +++ b/var/spack/repos/builtin/packages/foam-extend/package.py @@ -99,9 +99,10 @@ class FoamExtend(Package): filter_file(r'-lIMlib -lMGridGen', r'-limlib -lmgrid', 'src/dbns/Make/options') - filter_file(r'-lMGridGen', - r'-lmgrid', - 'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options') + filter_file( + r'-lMGridGen', + r'-lmgrid', + 'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options') # NOQA: ignore=501 (arch, foam_compiler) = self.set_arch() -- cgit v1.2.3-70-g09d2 From c4d5bd13c7596577bef119dcac2b83e213a92ce5 Mon Sep 17 00:00:00 2001 From: Ali Dorostkar Date: Mon, 30 May 2016 18:11:34 +0200 Subject: dealii, Added comment Added comment for why step-40 is done differently for dealii 8.4.0 and later --- var/spack/repos/builtin/packages/dealii/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index e83347409e..2b148da074 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -244,6 +244,8 @@ class Dealii(Package): 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:'): filter_file(r'(\/\/ #define FORCE_USE_OF_TRILINOS.*)', ('#define FORCE_USE_OF_TRILINOS'), 'step-40.cc') @@ -254,6 +256,8 @@ class Dealii(Package): 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 ====') -- cgit v1.2.3-70-g09d2 From f96c97902452761cbf2bff64d3efa1240df70771 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 30 May 2016 13:05:49 -0700 Subject: Added a conditional to check if package is external --- lib/spack/spack/concretize.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 5d9715feed..58811c3419 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -84,7 +84,8 @@ class DefaultConcretizer(object): raise NoBuildError(spec) def cmp_externals(a, b): - if a.name != b.name: + if a.name != b.name and (not a.external or a.external_module and + not b.external and b.external_module): # We're choosing between different providers, so # maintain order from provider sort return candidates.index(a) - candidates.index(b) -- cgit v1.2.3-70-g09d2 From 08a9d80ebcd239790d28904787ea5f6a9bf5fa5d Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 30 May 2016 13:07:20 -0700 Subject: Changed platform to py_platform to avoid name collisions. The naming collisions resulted in an error on linux machines --- lib/spack/spack/test/architecture.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index f5b1068435..3d08269dee 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -3,7 +3,7 @@ """ import unittest import os -import platform +import platform as py_platform import spack from spack.architecture import * from spack.spec import * @@ -61,9 +61,9 @@ class ArchitectureTest(MockPackagesTest): my_platform_class = CrayXc() elif os.path.exists('/bgsys'): my_platform_class = Bgq() - elif 'Linux' in platform.system(): + elif 'Linux' in py_platform.system(): my_platform_class = Linux() - elif 'Darwin' in platform.system(): + elif 'Darwin' in py_platform.system(): my_platform_class = Darwin() self.assertEqual(str(output_platform_class), str(my_platform_class)) -- cgit v1.2.3-70-g09d2 From 716991775d6f6541e2acf41d51ff528e4c3412c7 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 30 May 2016 13:09:41 -0700 Subject: Added extra check on linux machines, since most linux machines don't have module system --- lib/spack/spack/test/concretize.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index cf2daa4be2..67b20b4084 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -253,8 +253,9 @@ class ConcretizeTest(MockPackagesTest): self.assertFalse('externalprereq' in spec) self.assertTrue(spec['externaltool'].compiler.satisfies('gcc')) - @unittest.skipIf(spack.architecture.sys_type().name == 'darwin', - "No tcl modules on darwin machines") + @unittest.skipIf(spack.architecture.sys_type().name == 'darwin' or + spack.architecture.sys_type().name == 'linux', + "No tcl modules on darwin/linux machines") def test_external_package_module(self): spec = Spec('externalmodule') spec.concretize() -- cgit v1.2.3-70-g09d2 From b14ba3125033dc93afb9662ba87c2ca0acbbbde4 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 30 May 2016 13:22:08 -0700 Subject: Quick fix for mock compilers.yaml to work on linux machines. --- lib/spack/spack/test/mock_packages_test.py | 35 +++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index f02bfb7a07..561f319b16 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -34,8 +34,41 @@ from ordereddict_backport import OrderedDict from spack.repository import RepoPath from spack.spec import Spec +platform = spack.architecture.sys_type() + +linux_os_name = 'debian' +linux_os_version = '6' + +if platform.name == 'linux': + global linux_os_name, linux_os_version + linux_os = platform.operating_system("default_os") + linux_os_name = linux_os.name + linux_os_version = linux_os.version + mock_compiler_config = """\ compilers: + clang3.3GENLINUX: + spec: clang@3.3 + operating_system: + name: {0} + version: '{1}' + paths: + cc: /path/to/clang + cxx: /path/to/clang++ + f77: None + fc: None + modules: 'None' + gcc4.5GENLINUX: + spec: gcc@4.5.0 + operating_system: + name: {0} + version: '{1}' + paths: + cc: /path/to/gcc + cxx: /path/to/g++ + f77: None + fc: None + modules: 'None' clang3.3CNL: spec: clang@3.3 operating_system: @@ -146,7 +179,7 @@ compilers: f77: None fc: None modules: 'None' -""" +""".format(linux_os_name, linux_os_version) mock_packages_config = """\ packages: -- cgit v1.2.3-70-g09d2 From 24ee32d7b0cb209f8a17f6df7e8715fa508d0f5d Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 30 May 2016 22:02:22 -0700 Subject: More flexible reading of specs from DB, formatting. --- lib/spack/spack/database.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index e768ddf5fe..38bb7541e0 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -214,9 +214,10 @@ class Database(object): # Add dependencies from other records in the install DB to # form a full spec. - for dep_hash in spec_dict[spec.name]['dependencies'].values(): - child = self._read_spec_from_yaml(dep_hash, installs, hash_key) - spec._add_dependency(child) + if 'dependencies' in spec_dict[spec.name]: + for dep_hash in spec_dict[spec.name]['dependencies'].values(): + child = self._read_spec_from_yaml(dep_hash, installs, hash_key) + spec._add_dependency(child) # Specs from the database need to be marked concrete because # they represent actual installations. @@ -289,7 +290,8 @@ class Database(object): except Exception as e: tty.warn("Invalid database reecord:", "file: %s" % self._index_path, - "hash: %s" % hash_key, "cause: %s" % str(e)) + "hash: %s" % hash_key, + "cause: %s: %s" % (type(e).__name__, str(e))) raise self._data = data -- cgit v1.2.3-70-g09d2 From e82fb5b58f4ccdf7a4bfcda0331b4649dec3de75 Mon Sep 17 00:00:00 2001 From: Ali Dorostkar Date: Tue, 31 May 2016 08:44:46 +0200 Subject: Fixed spacing Replaced tabs with spaces --- var/spack/repos/builtin/packages/dealii/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 2b148da074..35658c75a0 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -244,8 +244,8 @@ class Dealii(Package): 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 + # 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') @@ -256,8 +256,8 @@ class Dealii(Package): make('release') make('run', parallel=False) - # the rest of the tests on step 40 only works for - # dealii version 8.4.0 and after + # 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 ====') -- cgit v1.2.3-70-g09d2 From 6f96484f83dff008ef8712c63202ee140000ff22 Mon Sep 17 00:00:00 2001 From: Ali Dorostkar Date: Tue, 31 May 2016 09:58:29 +0200 Subject: Spacing correction More spacing correction --- var/spack/repos/builtin/packages/dealii/package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 35658c75a0..54b6426d36 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -244,8 +244,8 @@ class Dealii(Package): 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 + # 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') @@ -256,8 +256,8 @@ class Dealii(Package): make('release') make('run', parallel=False) - # the rest of the tests on step 40 only works for - # dealii version 8.4.0 and after + # 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 ====') -- cgit v1.2.3-70-g09d2 From 29b85fbce045c43987dfb65e3a510044bdcbaa5c Mon Sep 17 00:00:00 2001 From: Mayeul d'Avezac Date: Tue, 31 May 2016 09:52:14 +0100 Subject: Eigen can be installed with dependencies --- var/spack/repos/builtin/packages/eigen/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py index e20fcffdd7..a429d8e2c3 100644 --- a/var/spack/repos/builtin/packages/eigen/package.py +++ b/var/spack/repos/builtin/packages/eigen/package.py @@ -42,6 +42,7 @@ class Eigen(Package): variant('scotch', default=True, description='Enables scotch backend') variant('fftw', default=True, description='Enables FFTW backend') variant('suitesparse', default=True, description='Enables SuiteSparse support') + variant('mpfr', default=True, description='Enables support for multi-precisions floating points via mpfr') # TODO : dependency on googlehash, superlu, adolc missing @@ -50,8 +51,8 @@ class Eigen(Package): depends_on('scotch', when='+scotch') depends_on('fftw', when='+fftw') depends_on('suite-sparse', when='+suitesparse') - depends_on('mpfr@2.3.0:') # Eigen 3.2.7 requires at least 2.3.0 - depends_on('gmp') + depends_on('mpfr@2.3.0:', when="+mpfr") # Eigen 3.2.7 requires at least 2.3.0 + depends_on('gmp', when="+mpfr") def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 7bdf63a0fa87cce6f9237ffae4a8903311327d54 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 31 May 2016 03:01:05 -0700 Subject: Fix some bugs in architecture. --- lib/spack/spack/architecture.py | 14 ++++++-------- lib/spack/spack/operating_systems/linux_distro.py | 13 ++++++++++--- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index a0ef4f14da..88cebc0943 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -487,25 +487,23 @@ def arch_from_dict(d): @memoized def all_platforms(): - modules = [] - + classes = [] mod_path = spack.platform_path - mod_string = "spack.platformss" + parent_module = "spack.platforms" for name in list_modules(mod_path): - mod_name = mod_string + name - path = join_path(mod_path, name) + ".py" - mod = imp.load_source(mod_name, path) + mod_name = '%s.%s' % (parent_module, name) class_name = mod_to_class(name) + mod = __import__(mod_name, fromlist=[class_name]) if not hasattr(mod, class_name): tty.die('No class %s defined in %s' % (class_name, mod_name)) cls = getattr(mod, class_name) if not inspect.isclass(cls): tty.die('%s.%s is not a class' % (mod_name, class_name)) - modules.append(cls) + classes.append(cls) - return modules + return classes @memoized def sys_type(): diff --git a/lib/spack/spack/operating_systems/linux_distro.py b/lib/spack/spack/operating_systems/linux_distro.py index d0f24d842f..2e3c72719b 100644 --- a/lib/spack/spack/operating_systems/linux_distro.py +++ b/lib/spack/spack/operating_systems/linux_distro.py @@ -1,3 +1,4 @@ +import re import platform as py_platform from spack.architecture import OperatingSystem @@ -9,7 +10,13 @@ class LinuxDistro(OperatingSystem): platform.dist() """ def __init__(self): - name = py_platform.dist()[0] - version = py_platform.dist()[1].split(".")[0] # Grabs major version from tuple + distname, version, _ = py_platform.linux_distribution( + full_distribution_name=False) - super(LinuxDistro, self).__init__(name, version) + # Grabs major version from tuple on redhat; on other platforms + # grab the first legal identifier in the version field. On + # debian you get things like 'wheezy/sid'; sid means unstable. + # We just record 'wheezy' and don't get quite so detailed. + version = re.split(r'[^\w-]', version)[0] + + super(LinuxDistro, self).__init__(distname, version) -- cgit v1.2.3-70-g09d2 From 564e7f5e5bba55d3f4f96916c054d3c3d01a35cf Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 31 May 2016 09:32:24 -0500 Subject: Don't build in parallel --- var/spack/repos/builtin/packages/hpl/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/hpl/package.py b/var/spack/repos/builtin/packages/hpl/package.py index 3d6e996323..efd5c8bb1d 100644 --- a/var/spack/repos/builtin/packages/hpl/package.py +++ b/var/spack/repos/builtin/packages/hpl/package.py @@ -43,6 +43,8 @@ class Hpl(Package): depends_on('mpi@1.1:') depends_on('blas') + parallel = False + def configure(self, spec, arch): # List of configuration options # Order is important -- cgit v1.2.3-70-g09d2 From c03c689cb225a3191a16d65d57ad69a70914f238 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 31 May 2016 12:18:17 -0400 Subject: Update HDF5 to version 1.10.0-patch1 --- var/spack/repos/builtin/packages/hdf5/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 21137ef356..e46f432be5 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -38,6 +38,7 @@ class Hdf5(Package): list_url = "http://www.hdfgroup.org/ftp/HDF5/releases" list_depth = 3 + version('1.10.0-patch1', '9180ff0ef8dc2ef3f61bd37a7404f295') version('1.10.0', 'bdc935337ee8282579cd6bc4270ad199') version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618', preferred=True) version('1.8.15', '03cccb5b33dbe975fdcd8ae9dc021f24') -- cgit v1.2.3-70-g09d2 From 817f43f92766bb37877888043eba6cecd9491f2e Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Tue, 31 May 2016 13:39:25 -0700 Subject: Fixed config format to allow default compiler flags --- lib/spack/spack/config.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index ec37bd290c..88544aa7bb 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -167,6 +167,18 @@ section_schemas = { {'type' : 'null' }]}, 'fc': { 'anyOf': [ {'type' : 'string' }, {'type' : 'null' }]}, + 'fflags': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'cppflags': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'cflags': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'cxxflags': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'ldflags': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, + 'ldlibs': { 'anyOf': [ {'type' : 'string' }, + {'type' : 'null' }]}, },},},},},},},}, 'mirrors': { -- cgit v1.2.3-70-g09d2 From 9db8dc18956520deae2f2e9a1e6827848df5bd51 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 1 Jun 2016 00:57:01 +0200 Subject: Removing extra dependencies + minor fix according to remarks on #1002 --- .../repos/builtin/packages/foam-extend/package.py | 56 +++++++++++----------- .../repos/builtin/packages/parmgridgen/package.py | 20 ++++---- 2 files changed, 37 insertions(+), 39 deletions(-) diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py index 32104fea43..9043896863 100644 --- a/var/spack/repos/builtin/packages/foam-extend/package.py +++ b/var/spack/repos/builtin/packages/foam-extend/package.py @@ -3,7 +3,6 @@ from spack.environment import * import multiprocessing import subprocess -import re import os @@ -11,6 +10,8 @@ class FoamExtend(Package): """The foam-extend project is a fork of the OpenFOAM open source library for Computational Fluid Dynamics (CFD).""" + homepage = "http://www.extend-project.de/" + version('3.2', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.2') version('3.1', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.1') version('3.0', git='http://git.code.sf.net/p/foam-extend/foam-extend-3.0') @@ -21,16 +22,13 @@ class FoamExtend(Package): variant('metis', default=True, description='Activate Metis as a possible decomposition library') variant('parmetis', default=True, description='Activate Parmetis as a possible decomposition library') variant('parmgridgen', default=True, description='Activate Parmgridgen support') + variant('source', default=True, description='Installs also the source folder') supported_compilers = {'clang': 'Clang', 'gcc': 'Gcc', 'intel': 'Icc'} depends_on('mpi') - depends_on('cmake') depends_on('python') depends_on('flex@:2.5.99') - depends_on('bison') - depends_on('m4') - depends_on('hwloc') depends_on('zlib') depends_on('scotch ~ metis', when='~ptscotch+scotch') @@ -40,17 +38,19 @@ class FoamExtend(Package): depends_on('parmgridgen', when='+parmgridgen') depends_on('paraview', when='+paraview') - depends_on('qt@:4', when='+paraview') def _get_env(self, command): - variable_set = re.compile(r'(.+?)=(.*)') proc = subprocess.Popen(['bash', '-c', command], stdout=subprocess.PIPE) env = {} for line in proc.stdout: - match_grp = variable_set.match(line) - if match_grp: - env[match_grp.group(1)] = match_grp.group(2) + try: + key, val = line.split('=', 1) + env[key] = val.strip() + except: + # it may fail due to some bash functions that are on + # multiple lines + pass return env def set_arch(self): @@ -64,13 +64,13 @@ class FoamExtend(Package): if sysname == 'Linux': arch = 'linux' if foam_compiler == 'Clang': - raise RuntimeError('OS, compiler combinaison not\ + raise RuntimeError('OS, compiler combination not\ supported ({0} {1})'.format(sysname, foam_compiler)) elif sysname == 'Darwin': if machine == 'x86_64': arch = 'darwinIntel' if foam_compiler == 'Icc': - raise RuntimeError('OS, compiler combinaison not\ + raise RuntimeError('OS, compiler combination not\ supported ({0} {1})'.format(sysname, foam_compiler)) else: raise RuntimeError('{0} {1} is not a \ @@ -80,24 +80,31 @@ class FoamExtend(Package): def get_openfoam_environment(self, env_openfoam): env_before = self._get_env('env') - + # This gets the environment set in case the etc/bashrc file is + # sourced with working_dir(self.stage.source_path): env_after = self._get_env('source etc/bashrc && env') + # Removes some PATH to not add useless information in the + # environment later on if 'PATH' in env_after: del env_after['PATH'] if 'LD_LIBRARY_PATH' in env_after: del env_after['LD_LIBRARY_PATH'] + # Checks what was set in addition to the current environment, + # that should be the variables set by the bashrc for key, value in env_after.iteritems(): if key not in env_before or not value == env_before[key]: env_openfoam.set(key, value) def patch(self): + # change names to match the package and not the one patch in + # the Third-Party of foam-extend if '+parmgridgen' in self.spec: - filter_file(r'-lIMlib -lMGridGen', - r'-limlib -lmgrid', + filter_file(r'-lMGridGen', + r'-lmgrid', 'src/dbns/Make/options') filter_file( @@ -105,6 +112,7 @@ class FoamExtend(Package): r'-lmgrid', 'src/fvAgglomerationMethods/MGridGenGamgAgglomeration/Make/options') # NOQA: ignore=501 + # Get the wmake arch and compiler (arch, foam_compiler) = self.set_arch() prefs_dict = { @@ -126,15 +134,8 @@ class FoamExtend(Package): 'BISON_SYSTEM': 1, 'BISON_DIR': self.spec['flex'].prefix, - 'M4_SYSTEM': 1, - 'M4_DIR': self.spec['m4'].prefix, - 'ZLIB_SYSTEM': 1, 'ZLIB_DIR': self.spec['zlib'].prefix, - - 'HWLOC_SYSTEM': 1, - 'HWLOC_DIR': self.spec['hwloc'].prefix, - 'HWLOC_BIN_DIR': self.spec['hwloc'].prefix.bin, } if '+scotch' in self.spec or '+ptscotch' in self.spec: @@ -178,6 +179,9 @@ class FoamExtend(Package): prefs_dict['QT_DIR'] = self.spec['qt'].prefix, prefs_dict['QT_BIN_DIR'] = self.spec['qt'].prefix.bin, + # write the prefs files to define the configuration needed, + # only the prefs.sh is used by this script but both are + # installed for end users with working_dir('.'): with open("etc/prefs.sh", "w") as fh: for key in sorted(prefs_dict): @@ -187,6 +191,9 @@ class FoamExtend(Package): for key in sorted(prefs_dict): fh.write('setenv {0}={1}\n'.format(key, prefs_dict[key])) + # Defining a different mpi and optimisation file to be able to + # make wmake get spack info with minimum modifications on + # configurations scripts mpi_info = [ 'PFLAGS = -DOMPI_SKIP_MPICXX -DMPICH_IGNORE_CXX_SEEK', 'PINC = -I{0}'.format(self.spec['mpi'].prefix.include), @@ -235,8 +242,6 @@ class FoamExtend(Package): run_env.set('FOAM_INST_DIR', self.prefix) def install(self, spec, prefix): - self.patch() - env_openfoam = EnvironmentModifications() self.get_openfoam_environment(env_openfoam) env_openfoam.apply_modifications() @@ -245,9 +250,6 @@ class FoamExtend(Package): os.environ['WM_NCOMPPROCS'] = str(self.make_jobs) \ if self.make_jobs else str(multiprocessing.cpu_count()) - # for key in sorted(os.environ): - # print("{0} = {1}".format(key, os.environ[key])) - allwmake = Executable('./Allwmake') allwmake() diff --git a/var/spack/repos/builtin/packages/parmgridgen/package.py b/var/spack/repos/builtin/packages/parmgridgen/package.py index 11b19f2ec2..c880bb5b2b 100644 --- a/var/spack/repos/builtin/packages/parmgridgen/package.py +++ b/var/spack/repos/builtin/packages/parmgridgen/package.py @@ -57,19 +57,15 @@ class Parmgridgen(Package): make(*make_opts, parallel=False) - include_path = join_path(self.prefix, 'include') - lib_path = join_path(self.prefix, 'lib') - bin_path = join_path(self.prefix, 'bin') + mkdirp(self.prefix.include, self.prefix.lib, self.prefix.bin) - mkdirp(include_path, lib_path, bin_path) - - install("mgridgen.h", include_path) - install("parmgridgen.h", include_path) + install("mgridgen.h", self.prefix.include) + install("parmgridgen.h", self.prefix.include) install("MGridGen/IMlib/libIMlib.a", - join_path(lib_path, 'libimlib.a')) - install("libmgrid.a", lib_path) - install("libparmgrid.a", lib_path) + join_path(self.prefix.lib, 'libIMlib.a')) + install("libmgrid.a", self.prefix.lib) + install("libparmgrid.a", self.prefix.lib) - install("mgridgen", bin_path) - install("parmgridgen", bin_path) + install("mgridgen", self.prefix.bin) + install("parmgridgen", self.prefix.bin) -- cgit v1.2.3-70-g09d2 From 0df0677d5bb4c5d5dce6bb9371c356af4b299170 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 1 Jun 2016 03:00:03 +0200 Subject: Adding a variant to link against the spack libraries instead of the system ones --- var/spack/repos/builtin/packages/emacs/package.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py index 4b05864a1e..b1177d6339 100644 --- a/var/spack/repos/builtin/packages/emacs/package.py +++ b/var/spack/repos/builtin/packages/emacs/package.py @@ -31,15 +31,27 @@ class Emacs(Package): version('24.5', 'd74b597503a68105e61b5b9f6d065b44') + variant('use-system-deps', default=True, description='Uses the library on the system to compile') + depends_on('ncurses') # Emacs also depends on: # GTK or other widget library # libtiff, png, etc. # For now, we assume the system provides all that stuff. # For Ubuntu 14.04 LTS: - # sudo apt-get install libgtk-3-dev libxpm-dev libtiff5-dev libjpeg8-dev libgif-dev libpng12-dev + # sudo apt-get install libgtk-3-dev libxpm-dev libtiff5-dev libjpeg8-dev libgif-dev libpng12-dev + depends_on('libtiff', when='~use-system-deps') + depends_on('libpng', when='~use-system-deps') def install(self, spec, prefix): - configure('--prefix=%s' % prefix) + if '~use-system-deps' in self.spec: + args = [ + '--with-xpm=no', + '--with-gif=no', + ] + else: + args = [] + + configure('--prefix=%s' % prefix, *args) make() make("install") -- cgit v1.2.3-70-g09d2 From cb673765c27049c965e76935e193f86660ffaf02 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 1 Jun 2016 03:02:48 +0200 Subject: Adding a version to tetgen --- var/spack/repos/builtin/packages/tetgen/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/tetgen/package.py b/var/spack/repos/builtin/packages/tetgen/package.py index 5e87ed7fba..1c536197ce 100644 --- a/var/spack/repos/builtin/packages/tetgen/package.py +++ b/var/spack/repos/builtin/packages/tetgen/package.py @@ -34,6 +34,7 @@ class Tetgen(Package): url = "http://www.tetgen.org/files/tetgen1.4.3.tar.gz" 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). -- cgit v1.2.3-70-g09d2 From 58052e6632a91a5d4549ba811ae0405942ccc0b3 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Tue, 31 May 2016 22:13:11 +0200 Subject: Adding package fenics --- var/spack/repos/builtin/packages/fenics/package.py | 175 +++++++++++++++++++++ var/spack/repos/builtin/packages/py-ply/package.py | 38 +++++ 2 files changed, 213 insertions(+) create mode 100644 var/spack/repos/builtin/packages/fenics/package.py create mode 100644 var/spack/repos/builtin/packages/py-ply/package.py diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py new file mode 100644 index 0000000000..72282994f5 --- /dev/null +++ b/var/spack/repos/builtin/packages/fenics/package.py @@ -0,0 +1,175 @@ +############################################################################## +# 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 Fenics(Package): + """FEniCS is organized as a collection of interoperable components + that together form the FEniCS Project. These components include + the problem-solving environment DOLFIN, the form compiler FFC, the + finite element tabulator FIAT, the just-in-time compiler Instant, + the code generation interface UFC, the form language UFL and a + range of additional components.""" + + homepage = "http://fenicsproject.org/" + url = "https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-1.6.0.tar.gz" + + base_url = "https://bitbucket.org/fenics-project/{pkg}/downloads/{pkg}-{version}.tar.gz" # NOQA: ignore E501 + + variant('hdf5', default=True, description='Compile with HDF5') + variant('parmetis', default=True, description='Compile with ParMETIS') + variant('scotch', default=True, description='Compile with Scotch') + variant('petsc', default=True, description='Compile with PETSc') + variant('slepc', default=True, description='Compile with SLEPc') + variant('trilinos', default=True, description='Compile with Trilinos') + variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') + variant('vtk', default=False, description='Compile with VTK') + variant('qt', default=False, description='Compile with QT') + variant('mpi', default=True, description='Enables the distributed memory support') + variant('openmp', default=True, description='Enables the shared memory support') + variant('shared', default=True, description='Enables the build of shared libraries') + variant('debug', default=False, description='Builds a debug version of the libraries') + + # not part of spack list for now + # variant('petsc4py', default=True, description='Uses PETSc4py') + # variant('slepc4py', default=True, description='Uses SLEPc4py') + # variant('pastix', default=True, description='Compile with Pastix') + + extends('python') + + depends_on('py-numpy') + depends_on('py-ply') + depends_on('py-six') + depends_on('py-sphinx@1.0.1:', when='+doc') + depends_on('eigen@3.2.0:') + depends_on('boost') + depends_on('mpi', when='+mpi') + depends_on('hdf5', when='+hdf5') + depends_on('parmetis@4.0.2:^metis+real64', when='+parmetis') + depends_on('scotch~metis', when='+scotch~mpi') + depends_on('scotch+mpi~metis', when='+scotch+mpi') + depends_on('petsc@3.4:', when='+petsc') + depends_on('slepc@3.4:', when='+slepc') + depends_on('trilinos', when='+trilinos') + depends_on('vtk', when='+vtk') + depends_on('suite-sparse', when='+suite-sparse') + depends_on('qt', when='+qt') + + # This are the build dependencies + depends_on('py-setuptools') + depends_on('cmake@2.8.12:') + depends_on('swig@3.0.3:') + + releases = [ + { + 'version': '1.6.0', + 'md5': '35cb4baf7ab4152a40fb7310b34d5800', + 'resources': { + 'ffc': '358faa3e9da62a1b1a717070217b793e', + 'fiat': 'f4509d05c911fd93cea8d288a78a6c6f', + 'instant': '5f2522eb032a5bebbad6597b6fe0732a', + 'ufl': 'c40c5f04eaa847377ab2323122284016', + } + }, + { + 'version': '1.5.0', + 'md5': '9b589a3534299a5e6d22c13c5eb30bb8', + 'resources': { + 'ffc': '343f6d30e7e77d329a400fd8e73e0b63', + 'fiat': 'da3fa4dd8177bb251e7f68ec9c7cf6c5', + 'instant': 'b744023ded27ee9df4a8d8c6698c0d58', + 'ufl': '130d7829cf5a4bd5b52bf6d0955116fd', + } + }, + ] + + for release in releases: + version(release['version'], release['md5'], url=base_url.format(pkg='dolfin', version=release['version'])) + for name, md5 in release['resources'].items(): + resource(name=name, + url=base_url.format(pkg=name, **release), + md5=md5, + destination='depends', + when='@{version}'.format(**release), + placement=name) + + def cmake_is_on(self, option): + return 'ON' if option in self.spec else 'OFF' + + def install(self, spec, prefix): + for package in ['ufl', 'ffc', 'fiat', 'instant']: + with working_dir(join_path('depends', package)): + python('setup.py', 'install', '--prefix=%s' % prefix) + + cmake_args.extend([ + '-DCMAKE_BUILD_TYPE:STRING={0}'.format( + 'Debug' if '+debug' in spec else 'RelWithDebInfo'), + '-DBUILD_SHARED_LIBS:BOOL={0}'.format( + self.cmake_is_on('+shared')), + '-DDOLFIN_SKIP_BUILD_TESTS:BOOL=ON', + '-DDOLFIN_ENABLE_OPENMP:BOOL={0}'.format( + self.cmake_is_on('+openmp')), + '-DDOLFIN_ENABLE_CHOLMOD:BOOL={0}'.format( + self.cmake_is_on('suite-sparse')), + '-DDOLFIN_ENABLE_HDF5:BOOL={0}'.format( + self.cmake_is_on('hdf5')), + '-DDOLFIN_ENABLE_MPI:BOOL={0}'.format( + self.cmake_is_on('mpi')), + '-DDOLFIN_ENABLE_PARMETIS:BOOL={0}'.format( + self.cmake_is_on('parmetis')), + '-DDOLFIN_ENABLE_PASTIX:BOOL={0}'.format( + self.cmake_is_on('pastix')), + '-DDOLFIN_ENABLE_PETSC:BOOL={0}'.format( + self.cmake_is_on('petsc')), + '-DDOLFIN_ENABLE_PETSC4PY:BOOL={0}'.format( + self.cmake_is_on('py-petsc4py')), + '-DDOLFIN_ENABLE_PYTHON:BOOL={0}'.format( + self.cmake_is_on('python')), + '-DDOLFIN_ENABLE_QT:BOOL={0}'.format( + self.cmake_is_on('qt')), + '-DDOLFIN_ENABLE_SCOTCH:BOOL={0}'.format( + self.cmake_is_on('scotch')), + '-DDOLFIN_ENABLE_SLEPC:BOOL={0}'.format( + self.cmake_is_on('slepc')), + '-DDOLFIN_ENABLE_SLEPC4PY:BOOL={0}'.format( + self.cmake_is_on('py-slepc4py')), + '-DDOLFIN_ENABLE_SPHINX:BOOL={0}'.format( + self.cmake_is_on('py-sphinx')), + '-DDOLFIN_ENABLE_TRILINOS:BOOL={0}'.format( + self.cmake_is_on('trilinos')), + '-DDOLFIN_ENABLE_UMFPACK:BOOL={0}'.format( + self.cmake_is_on('suite-sparse')), + '-DDOLFIN_ENABLE_VTK:BOOL={0}'.format( + self.cmake_is_on('vtk')), + '-DDOLFIN_ENABLE_ZLIB:BOOL={0}'.format( + self.cmake_is_on('zlib')), + ]) + cmake_args.extend(std_cmake_args) + + with working_dir('build', create=True): + cmake('..', *cmake_args) + + make() + make('install') diff --git a/var/spack/repos/builtin/packages/py-ply/package.py b/var/spack/repos/builtin/packages/py-ply/package.py new file mode 100644 index 0000000000..47cd3b5dc8 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-ply/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 PyPly(Package): + """PLY is nothing more than a straightforward lex/yacc implementation.""" + homepage = "http://www.dabeaz.com/ply" + url = "http://www.dabeaz.com/ply/ply-3.8.tar.gz" + + version('3.8', '94726411496c52c87c2b9429b12d5c50') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2 From 97bad2c1ac33139f35094727a269001e4815c227 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 1 Jun 2016 03:25:37 +0200 Subject: Corrections for flake8 --- var/spack/repos/builtin/packages/tetgen/package.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/tetgen/package.py b/var/spack/repos/builtin/packages/tetgen/package.py index 1c536197ce..c301a5b4e5 100644 --- a/var/spack/repos/builtin/packages/tetgen/package.py +++ b/var/spack/repos/builtin/packages/tetgen/package.py @@ -24,11 +24,13 @@ ############################################################################## from spack import * + class Tetgen(Package): - """TetGen is a program and library that can be used to generate tetrahedral - meshes for given 3D polyhedral domains. TetGen generates exact constrained - Delaunay tetrahedralizations, boundary conforming Delaunay meshes, and - Voronoi paritions.""" + """TetGen is a program and library that can be used to generate + tetrahedral meshes for given 3D polyhedral domains. TetGen + generates exact constrained Delaunay tetrahedralizations, + boundary conforming Delaunay meshes, and Voronoi paritions. + """ homepage = "http://www.tetgen.org" url = "http://www.tetgen.org/files/tetgen1.4.3.tar.gz" -- cgit v1.2.3-70-g09d2 From 5d4a0e4050ad0fa02ffd482a61374bde946c62b7 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 1 Jun 2016 03:28:42 +0200 Subject: Corrections for flake8 --- var/spack/repos/builtin/packages/emacs/package.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py index b1177d6339..b6d638e3c3 100644 --- a/var/spack/repos/builtin/packages/emacs/package.py +++ b/var/spack/repos/builtin/packages/emacs/package.py @@ -24,22 +24,25 @@ ############################################################################## from spack import * + class Emacs(Package): """The Emacs programmable text editor.""" + homepage = "https://www.gnu.org/software/emacs" url = "http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.gz" version('24.5', 'd74b597503a68105e61b5b9f6d065b44') variant('use-system-deps', default=True, description='Uses the library on the system to compile') - + depends_on('ncurses') # Emacs also depends on: # GTK or other widget library # libtiff, png, etc. # For now, we assume the system provides all that stuff. # For Ubuntu 14.04 LTS: - # sudo apt-get install libgtk-3-dev libxpm-dev libtiff5-dev libjpeg8-dev libgif-dev libpng12-dev + # sudo apt-get install libgtk-3-dev libxpm-dev + # libtiff5-dev libjpeg8-dev libgif-dev libpng12-dev depends_on('libtiff', when='~use-system-deps') depends_on('libpng', when='~use-system-deps') @@ -48,10 +51,10 @@ class Emacs(Package): args = [ '--with-xpm=no', '--with-gif=no', - ] + ] else: args = [] - + configure('--prefix=%s' % prefix, *args) make() make("install") -- cgit v1.2.3-70-g09d2 From d802144f39366a2cbd67554de5a099ed8ce80598 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 1 Jun 2016 03:31:29 +0200 Subject: Introduced a bug by correcting flake8 warnings --- var/spack/repos/builtin/packages/fenics/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py index 72282994f5..0845237656 100644 --- a/var/spack/repos/builtin/packages/fenics/package.py +++ b/var/spack/repos/builtin/packages/fenics/package.py @@ -123,7 +123,7 @@ class Fenics(Package): with working_dir(join_path('depends', package)): python('setup.py', 'install', '--prefix=%s' % prefix) - cmake_args.extend([ + cmake_args = [ '-DCMAKE_BUILD_TYPE:STRING={0}'.format( 'Debug' if '+debug' in spec else 'RelWithDebInfo'), '-DBUILD_SHARED_LIBS:BOOL={0}'.format( @@ -165,7 +165,8 @@ class Fenics(Package): self.cmake_is_on('vtk')), '-DDOLFIN_ENABLE_ZLIB:BOOL={0}'.format( self.cmake_is_on('zlib')), - ]) + ] + cmake_args.extend(std_cmake_args) with working_dir('build', create=True): -- cgit v1.2.3-70-g09d2 From 0451c8e55f35c58adef120a986e8782abb3155eb Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 1 Jun 2016 15:58:00 +0200 Subject: Addapting the mvapich2@2.1: configure options for slurm --- .../repos/builtin/packages/mvapich2/package.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index f4997bdfa1..e871d0cd2b 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -124,10 +124,19 @@ class Mvapich2(Package): raise RuntimeError(" %s : 'slurm' cannot be activated together with other process managers" % self.name) process_manager_options = [] + # See: http://slurm.schedmd.com/mpi_guide.html#mvapich2 if self.enabled(Mvapich2.SLURM) in spec: - process_manager_options = [ - "--with-pm=slurm" - ] + if self.version > Version('2.0'): + process_manager_options = [ + "--with-pmi=pmi2", + "--with-pm=slurm" + ] + else: + process_manager_options = [ + "--with-pmi=slurm", + "--with-pm=no" + ] + elif has_slurm_incompatible_variants: pms = [] # The variant name is equal to the process manager name in the configuration options @@ -164,6 +173,11 @@ class Mvapich2(Package): configure_args.extend(network_options) + def setup_environment(self, spack_env, run_env): + if self.enabled(Mvapich2.SLURM) in self.spec and \ + self.version > Version('2.0'): + run_env.set('SLURM_MPI_TYPE', 'pmi2') + def setup_dependent_environment(self, spack_env, run_env, extension_spec): spack_env.set('MPICH_CC', spack_cc) spack_env.set('MPICH_CXX', spack_cxx) @@ -176,7 +190,7 @@ class Mvapich2(Package): self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') - + def install(self, spec, prefix): # we'll set different configure flags depending on our environment configure_args = [ -- cgit v1.2.3-70-g09d2 From 3ab8468e732a9ca68e4a846e1ae6496757d565f2 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 1 Jun 2016 16:43:08 +0200 Subject: Correcting the flake8 warnings --- .../repos/builtin/packages/mvapich2/package.py | 72 ++++++++++++++-------- 1 file changed, 47 insertions(+), 25 deletions(-) diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index e871d0cd2b..d1944023d1 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -25,6 +25,7 @@ from spack import * import os + class Mvapich2(Package): """MVAPICH2 is an MPI implementation for Infiniband networks.""" homepage = "http://mvapich.cse.ohio-state.edu/" @@ -43,8 +44,9 @@ class Mvapich2(Package): variant('debug', default=False, description='Enables debug information and error messages at run-time') ########## - # TODO : Process managers should be grouped into the same variant, as soon as variant capabilities will be extended - # See https://groups.google.com/forum/#!topic/spack/F8-f8B4_0so + # TODO : Process managers should be grouped into the same variant, + # as soon as variant capabilities will be extended See + # https://groups.google.com/forum/#!topic/spack/F8-f8B4_0so SLURM = 'slurm' HYDRA = 'hydra' GFORKER = 'gforker' @@ -57,7 +59,8 @@ class Mvapich2(Package): ########## ########## - # TODO : Network types should be grouped into the same variant, as soon as variant capabilities will be extended + # TODO : Network types should be grouped into the same variant, as + # soon as variant capabilities will be extended PSM = 'psm' SOCK = 'sock' NEMESISIBTCP = 'nemesisibtcp' @@ -84,8 +87,8 @@ class Mvapich2(Package): @staticmethod def enabled(x): - """ - Given a variant name returns the string that means the variant is enabled + """Given a variant name returns the string that means the variant is + enabled :param x: variant name :return: @@ -93,8 +96,8 @@ class Mvapich2(Package): return '+' + x def set_build_type(self, spec, configure_args): - """ - Appends to configure_args the flags that depends only on the build type (i.e. release or debug) + """Appends to configure_args the flags that depends only on the build + type (i.e. release or debug) :param spec: spec :param configure_args: list of current configure arguments @@ -104,7 +107,8 @@ class Mvapich2(Package): "--disable-fast", "--enable-error-checking=runtime", "--enable-error-messages=all", - "--enable-g=dbg", "--enable-debuginfo" # Permits debugging with TotalView + # Permits debugging with TotalView + "--enable-g=dbg", "--enable-debuginfo" ] else: build_type_options = ["--enable-fast=all"] @@ -112,16 +116,22 @@ class Mvapich2(Package): configure_args.extend(build_type_options) def set_process_manager(self, spec, configure_args): - """ - Appends to configure_args the flags that will enable the appropriate process managers + """Appends to configure_args the flags that will enable the + appropriate process managers :param spec: spec :param configure_args: list of current configure arguments """ - # Check that slurm variant is not activated together with other pm variants - has_slurm_incompatible_variants = any(self.enabled(x) in spec for x in Mvapich2.SLURM_INCOMPATIBLE_PMS) - if self.enabled(Mvapich2.SLURM) in spec and has_slurm_incompatible_variants: - raise RuntimeError(" %s : 'slurm' cannot be activated together with other process managers" % self.name) + # Check that slurm variant is not activated together with + # other pm variants + has_slurm_incompatible_variants = \ + any(self.enabled(x) in spec + for x in Mvapich2.SLURM_INCOMPATIBLE_PMS) + + if self.enabled(Mvapich2.SLURM) in spec and \ + has_slurm_incompatible_variants: + raise RuntimeError(" %s : 'slurm' cannot be activated \ + together with other process managers" % self.name) process_manager_options = [] # See: http://slurm.schedmd.com/mpi_guide.html#mvapich2 @@ -139,7 +149,8 @@ class Mvapich2(Package): elif has_slurm_incompatible_variants: pms = [] - # The variant name is equal to the process manager name in the configuration options + # The variant name is equal to the process manager name in + # the configuration options for x in Mvapich2.SLURM_INCOMPATIBLE_PMS: if self.enabled(x) in spec: pms.append(x) @@ -155,7 +166,9 @@ class Mvapich2(Package): if self.enabled(x) in spec: count += 1 if count > 1: - raise RuntimeError('network variants are mutually exclusive (only one can be selected at a time)') + raise RuntimeError('network variants are mutually exclusive \ + (only one can be selected at a time)') + network_options = [] # From here on I can suppose that only one variant has been selected if self.enabled(Mvapich2.PSM) in spec: @@ -177,7 +190,7 @@ class Mvapich2(Package): if self.enabled(Mvapich2.SLURM) in self.spec and \ self.version > Version('2.0'): run_env.set('SLURM_MPI_TYPE', 'pmi2') - + def setup_dependent_environment(self, spack_env, run_env, extension_spec): spack_env.set('MPICH_CC', spack_cc) spack_env.set('MPICH_CXX', spack_cxx) @@ -190,9 +203,10 @@ class Mvapich2(Package): self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') - + def install(self, spec, prefix): - # we'll set different configure flags depending on our environment + # we'll set different configure flags depending on our + # environment configure_args = [ "--prefix=%s" % prefix, "--enable-shared", @@ -222,7 +236,6 @@ class Mvapich2(Package): self.filter_compilers() - def filter_compilers(self): """Run after install to make the MPI compilers use the compilers that Spack built the package with. @@ -242,8 +255,17 @@ class Mvapich2(Package): spack_f77 = os.environ['F77'] spack_fc = os.environ['FC'] - kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True } - filter_file('CC="%s"' % spack_cc , 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) - filter_file('CXX="%s"'% spack_cxx, 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) - filter_file('F77="%s"'% spack_f77, 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) - filter_file('FC="%s"' % spack_fc , 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) + kwargs = { + 'ignore_absent': True, + 'backup': False, + 'string': True + } + + filter_file('CC="%s"' % spack_cc, + 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) + filter_file('CXX="%s"' % spack_cxx, + 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) + filter_file('F77="%s"' % spack_f77, + 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) + filter_file('FC="%s"' % spack_fc, + 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) -- cgit v1.2.3-70-g09d2 From 53dcc39b725cb3887bab2ba047b23db1435e73ea Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 1 Jun 2016 17:33:54 +0200 Subject: removing useless selfs --- .../repos/builtin/packages/parmgridgen/package.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/parmgridgen/package.py b/var/spack/repos/builtin/packages/parmgridgen/package.py index c880bb5b2b..02be777c36 100644 --- a/var/spack/repos/builtin/packages/parmgridgen/package.py +++ b/var/spack/repos/builtin/packages/parmgridgen/package.py @@ -46,9 +46,9 @@ class Parmgridgen(Package): 'COPTIONS=-fPIC', 'LDOPTIONS=-fPIC', 'CC={0}'.format(self.compiler.cc), - 'PARCC={0}'.format(self.spec['mpi'].mpicc), + 'PARCC={0}'.format(spec['mpi'].mpicc), 'LD={0}'.format(self.compiler.cc), - 'PARLD={0}'.format(self.spec['mpi'].mpicc), + 'PARLD={0}'.format(spec['mpi'].mpicc), 'LIBDIR=-L../..', 'PARLIBS=-L../../ -lparmgrid -lmgrid -lm', 'LIBS=-L../../ -lmgrid -lm', @@ -57,15 +57,15 @@ class Parmgridgen(Package): make(*make_opts, parallel=False) - mkdirp(self.prefix.include, self.prefix.lib, self.prefix.bin) + mkdirp(prefix.include, prefix.lib, prefix.bin) - install("mgridgen.h", self.prefix.include) - install("parmgridgen.h", self.prefix.include) + install("mgridgen.h", prefix.include) + install("parmgridgen.h", prefix.include) install("MGridGen/IMlib/libIMlib.a", - join_path(self.prefix.lib, 'libIMlib.a')) - install("libmgrid.a", self.prefix.lib) - install("libparmgrid.a", self.prefix.lib) + join_path(prefix.lib, 'libIMlib.a')) + install("libmgrid.a", prefix.lib) + install("libparmgrid.a", prefix.lib) - install("mgridgen", self.prefix.bin) - install("parmgridgen", self.prefix.bin) + install("mgridgen", prefix.bin) + install("parmgridgen", prefix.bin) -- cgit v1.2.3-70-g09d2 From 9d04dccb79c606b3d3ca033b5365d31d9a1b0442 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 2 Jun 2016 01:20:40 -0700 Subject: Update version to correspond to master. --- lib/spack/spack/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index c7a155597f..8c6e0ba527 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -105,7 +105,7 @@ concretizer = DefaultConcretizer() # Version information from spack.version import Version -spack_version = Version("0.9") +spack_version = Version("0.9.1") # # Executables used by Spack -- cgit v1.2.3-70-g09d2 From 8b6035ab8268de726933b657837d5c1bd8d13d4e Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Fri, 3 Jun 2016 00:21:41 +0200 Subject: Making emacs dependent on internal packages --- var/spack/repos/builtin/packages/emacs/package.py | 36 ++++++++++-------- var/spack/repos/builtin/packages/giflib/package.py | 41 ++++++++++++++++++++ var/spack/repos/builtin/packages/libxpm/package.py | 44 ++++++++++++++++++++++ 3 files changed, 106 insertions(+), 15 deletions(-) create mode 100644 var/spack/repos/builtin/packages/giflib/package.py create mode 100644 var/spack/repos/builtin/packages/libxpm/package.py diff --git a/var/spack/repos/builtin/packages/emacs/package.py b/var/spack/repos/builtin/packages/emacs/package.py index b6d638e3c3..a9ebd6d42f 100644 --- a/var/spack/repos/builtin/packages/emacs/package.py +++ b/var/spack/repos/builtin/packages/emacs/package.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import llnl.util.tty as tty class Emacs(Package): @@ -33,28 +34,33 @@ class Emacs(Package): version('24.5', 'd74b597503a68105e61b5b9f6d065b44') - variant('use-system-deps', default=True, description='Uses the library on the system to compile') + variant('X', default=True, description="Enable a X toolkit (GTK+)") + variant('gtkplus', default=False, description="Enable a GTK+ as X toolkit (this variant is ignored if ~X)") depends_on('ncurses') - # Emacs also depends on: - # GTK or other widget library - # libtiff, png, etc. - # For now, we assume the system provides all that stuff. - # For Ubuntu 14.04 LTS: - # sudo apt-get install libgtk-3-dev libxpm-dev - # libtiff5-dev libjpeg8-dev libgif-dev libpng12-dev - depends_on('libtiff', when='~use-system-deps') - depends_on('libpng', when='~use-system-deps') + depends_on('libtiff', when='+X') + depends_on('libpng', when='+X') + depends_on('libxpm', when='+X') + depends_on('giflib', when='+X') + depends_on('gtkplus', when='+X+gtkplus') def install(self, spec, prefix): - if '~use-system-deps' in self.spec: + args = [] + if '+X' in spec: + if '+gtkplus' in spec: + toolkit = 'gtk{0}'.format(spec['gtkplus'].version.up_to(1)) + else: + toolkit = 'no' args = [ - '--with-xpm=no', - '--with-gif=no', + '--with-x', + '--with-x-toolkit={0}'.format(toolkit) ] else: - args = [] + args = ['--without-x'] + if '+gtkplus' in spec: + tty.warn('The variant +gtkplus is ignored if ~X is selected.') + + configure('--prefix={0}'.format(prefix), *args) - configure('--prefix=%s' % prefix, *args) make() make("install") diff --git a/var/spack/repos/builtin/packages/giflib/package.py b/var/spack/repos/builtin/packages/giflib/package.py new file mode 100644 index 0000000000..7082384b9b --- /dev/null +++ b/var/spack/repos/builtin/packages/giflib/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 Giflib(Package): + """The GIFLIB project maintains the giflib service library, which has + been pulling images out of GIFs since 1989.""" + + homepage = "http://giflib.sourceforge.net/" + url = "https://downloads.sourceforge.net/project/giflib/giflib-5.1.4.tar.bz2" + + version('5.1.4', '2c171ced93c0e83bb09e6ccad8e3ba2b') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libxpm/package.py b/var/spack/repos/builtin/packages/libxpm/package.py new file mode 100644 index 0000000000..10ca8158c2 --- /dev/null +++ b/var/spack/repos/builtin/packages/libxpm/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 Libxpm(Package): + """Xpm file format library""" + + homepage = "https://www.x.org/" + url = "https://www.x.org/archive//individual/lib/libXpm-3.5.11.tar.gz" + + version('3.5.11', '7c67c878ee048206b070bc0b24154f04') + version('3.5.10', 'a70507638d74541bf30a771f1e5938bb') + version('3.5.9', 'd6d4b0f76248a6b346eb42dfcdaa72a6') + version('3.5.8', '2d81d6633e67ac5562e2fbee126b2897') + version('3.5.7', '7bbc8f112f7143ed6961a58ce4e14558') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + + make() + make("install") -- cgit v1.2.3-70-g09d2 From 0b5ce9e16a1d7a814f1fb847f84485af741e7087 Mon Sep 17 00:00:00 2001 From: Mayeul d'Avezac Date: Fri, 3 Jun 2016 11:52:19 +0100 Subject: :lipstick: style points requested by flake8 --- var/spack/repos/builtin/packages/eigen/package.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/eigen/package.py b/var/spack/repos/builtin/packages/eigen/package.py index a429d8e2c3..9ff4107619 100644 --- a/var/spack/repos/builtin/packages/eigen/package.py +++ b/var/spack/repos/builtin/packages/eigen/package.py @@ -28,7 +28,9 @@ from spack import * class Eigen(Package): """ - Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms + Eigen is a C++ template library for linear algebra + + Matrices, vectors, numerical solvers, and related algorithms """ homepage = 'http://eigen.tuxfamily.org/' @@ -45,13 +47,12 @@ 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('metis@5:', when='+metis') depends_on('scotch', when='+scotch') depends_on('fftw', when='+fftw') depends_on('suite-sparse', when='+suitesparse') - depends_on('mpfr@2.3.0:', when="+mpfr") # Eigen 3.2.7 requires at least 2.3.0 + depends_on('mpfr@2.3.0:', when="+mpfr") depends_on('gmp', when="+mpfr") def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2 From 24d160e93ed80052ad30f99ce36b34de2872a888 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 3 Jun 2016 15:57:54 -0700 Subject: Changed how architecture looks like in spec.yaml. Now it's only three strings, platform, os, target in spec.yaml. Also did some flake8 formatting changes --- lib/spack/spack/architecture.py | 216 +++++++++++++++++++--------------------- 1 file changed, 105 insertions(+), 111 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index a0ef4f14da..ee0d2173c7 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -29,8 +29,9 @@ and the architecture platform (i.e. cray, darwin, linux, bgq, etc) classes. On a multiple architecture machine, the architecture spec field can be set to build a package against any target and operating system that is present on the -platform. On Cray platforms or any other architecture that has different front and -back end environments, the operating system will determine the method of compiler +platform. On Cray platforms or any other architecture that has different front +and back end environments, the operating system will determine the method of +compiler detection. There are two different types of compiler detection: @@ -40,44 +41,42 @@ There are two different types of compiler detection: Depending on which operating system is specified, the compiler will be detected using one of those methods. -For platforms such as linux and darwin, the operating system is autodetected and -the target is set to be x86_64. +For platforms such as linux and darwin, the operating system is autodetected +and the target is set to be x86_64. The command line syntax for specifying an architecture is as follows: target= os= If the user wishes to use the defaults, either target or os can be left out of -the command line and Spack will concretize using the default. These defaults are -set in the 'platforms/' directory which contains the different subclasses for -platforms. If the machine has multiple architectures, the user can +the command line and Spack will concretize using the default. These defaults +are set in the 'platforms/' directory which contains the different subclasses +for platforms. If the machine has multiple architectures, the user can also enter front-end, or fe or back-end or be. These settings will concretize to their respective front-end and back-end targets and operating systems. Additional platforms can be added by creating a subclass of Platform and adding it inside the platform directory. Platforms are an abstract class that are extended by subclasses. If the user -wants to add a new type of platform (such as cray_xe), they can create a subclass -and set all the class attributes such as priority, front_target ,back_target, -front_os, back_os. Platforms also contain a priority class attribute. A lower -number signifies higher priority. These numbers are arbitrarily set and can be -changed though often there isn't much need unless a new platform is added and -the user wants that to be detected first. - -Targets are created inside the platform subclasses. Most architecture (like linux, -and darwin) will have only one target (x86_64) but in the case of Cray machines, -there is both a frontend and backend processor. The user can specify which targets -are present on front-end and back-end architecture +wants to add a new type of platform (such as cray_xe), they can create a +subclass and set all the class attributes such as priority, front_target, +back_target, front_os, back_os. Platforms also contain a priority class +attribute. A lower number signifies higher priority. These numbers are +arbitrarily set and can be changed though often there isn't much need unless a +new platform is added and the user wants that to be detected first. + +Targets are created inside the platform subclasses. Most architecture +(like linux, and darwin) will have only one target (x86_64) but in the case of +Cray machines, there is both a frontend and backend processor. The user can +specify which targets are present on front-end and back-end architecture Depending on the platform, operating systems are either auto-detected or are set. The user can set the front-end and back-end operating setting by the class -attributes front_os and back_os. The operating system as described earlier, will -be responsible for compiler detection. +attributes front_os and back_os. The operating system as described earlier, +will be responsible for compiler detection. """ import os -from collections import namedtuple import imp -import platform as py_platform import inspect from llnl.util.lang import memoized, list_modules, key_ordering @@ -91,6 +90,7 @@ from spack.util.environment import get_path from spack.util.multiproc import parmap import spack.error as serr + class InvalidSysTypeError(serr.SpackError): def __init__(self, sys_type): super(InvalidSysTypeError, self).__init__( @@ -128,12 +128,6 @@ class Target(object): def __str__(self): return self.name - def to_dict(self): - d = {} - d['name'] = self.name - d['module_name'] = self.module_name - - return d @key_ordering class Platform(object): @@ -142,7 +136,7 @@ class Platform(object): is returned """ - priority = None # Subclass needs to set this number. This controls order in which platform is detected. + priority = None # Subclass sets number. Controls detection order front_end = None back_end = None default = None # The default back end target. On cray ivybridge @@ -156,19 +150,6 @@ class Platform(object): self.operating_sys = {} self.name = name - def to_dict(self): - n = {} - n['targets'] = dict((name, target.to_dict()) for (name, target) in self.targets.items()) - n['operating_systems'] = dict((name, os.to_dict()) for (name, os) in self.operating_sys.items()) - n['priority'] = self.priority - n['default_front_end_target'] = self.front_end - n['default_back_end_target'] = self.back_end - n['default_target'] = self.default - n['default_front_end_os'] = self.front_os - n['default_back_end_os'] = self.back_os - n['default_os'] = self.default_os - return {self.name: n} - def add_target(self, name, target): """Used by the platform specific subclass to list available targets. Raises an error if the platform specifies a name @@ -215,7 +196,6 @@ class Platform(object): return self.operating_sys.get(name, None) - @classmethod def detect(self): """ Subclass is responsible for implementing this method. @@ -232,8 +212,10 @@ class Platform(object): return self.name def _cmp_key(self): - t_keys = ''.join(str(t._cmp_key()) for t in sorted(self.targets.values())) - o_keys = ''.join(str(o._cmp_key()) for o in sorted(self.operating_sys.values())) + t_keys = ''.join(str(t._cmp_key()) for t in + sorted(self.targets.values())) + o_keys = ''.join(str(o._cmp_key()) for o in + sorted(self.operating_sys.values())) return (self.name, self.default, self.front_end, @@ -244,6 +226,7 @@ class Platform(object): t_keys, o_keys) + @key_ordering class OperatingSystem(object): """ Operating System will be like a class similar to platform extended @@ -265,7 +248,6 @@ class OperatingSystem(object): def _cmp_key(self): return (self.name, self.version) - def find_compilers(self, *paths): """ Return a list of compilers found in the suppied paths. @@ -293,11 +275,13 @@ class OperatingSystem(object): # compiler. We can spawn a bunch of parallel searches to reduce # the overhead of spelunking all these directories. types = spack.compilers.all_compiler_types() - compiler_lists = parmap(lambda cmp_cls: self.find_compiler(cmp_cls, *filtered_path), types) + compiler_lists = parmap(lambda cmp_cls: + self.find_compiler(cmp_cls, *filtered_path), + types) # ensure all the version calls we made are cached in the parent # process, as well. This speeds up Spack a lot. - clist = reduce(lambda x,y: x+y, compiler_lists) + clist = reduce(lambda x, y: x+y, compiler_lists) return clist def find_compiler(self, cmp_cls, *path): @@ -338,7 +322,7 @@ class OperatingSystem(object): # prefer the one with more compilers. prev_paths = [prev.cc, prev.cxx, prev.f77, prev.fc] - newcount = len([p for p in paths if p is not None]) + newcount = len([p for p in paths if p is not None]) prevcount = len([p for p in prev_paths if p is not None]) # Don't add if it's not an improvement over prev compiler. @@ -349,14 +333,7 @@ class OperatingSystem(object): return list(compilers.values()) - def to_dict(self): - d = {} - d['name'] = self.name - d['version'] = self.version - return d - -#NOTE: Key error caused because Architecture has no comparison method @key_ordering class Arch(object): "Architecture is now a class to help with setting attributes" @@ -376,10 +353,11 @@ class Arch(object): @property def concrete(self): - return all( (self.platform is not None, isinstance(self.platform, Platform), - self.platform_os is not None, isinstance(self.platform_os, OperatingSystem), - self.target is not None, isinstance(self.target, Target) ) ) - + return all((self.platform is not None, + isinstance(self.platform, Platform), + self.platform_os is not None, + isinstance(self.platform_os, OperatingSystem), + self.target is not None, isinstance(self.target, Target))) def __str__(self): if self.platform or self.platform_os or self.target: @@ -388,71 +366,75 @@ class Arch(object): else: os_name = str(self.platform_os) - return (str(self.platform) +"-"+ + return (str(self.platform) + "-" + os_name + "-" + str(self.target)) else: return '' def _cmp_key(self): - platform = self.platform.name if isinstance(self.platform, Platform) else self.platform - os = self.platform_os.name if isinstance(self.platform_os, OperatingSystem) else self.platform_os - target = self.target.name if isinstance(self.target, Target) else self.target - return (platform, os, target) + if isinstance(self.platform, Platform): + platform = self.platform.name + else: + platform = self.platform + if isinstance(self.platform_os, OperatingSystem): + platform_os = self.platform_os.name + else: + platform_os = self.platform_os + if isinstance(self.target, Target): + target = self.target.name + else: + target = self.target + print (platform, platform_os, target) + return (platform, platform_os, target) def to_dict(self): d = {} - platform = self.platform - platform_os = self.platform_os - target = self.target - - d['platform'] = self.platform.to_dict() if self.platform else None - d['platform_os'] = self.platform_os.to_dict() if self.platform_os else None - d['target'] = self.target.to_dict() if self.target else None + d['platform'] = str(self.platform) if self.platform else None + d['platform_os'] = str(self.platform_os) if self.platform_os else None + d['target'] = str(self.target) if self.target else None return d -def _target_from_dict(target_dict): +def _target_from_dict(target_name, platform=None): """ Creates new instance of target and assigns all the attributes of that target from the dictionary """ - target = Target.__new__(Target) - target.name = target_dict['name'] - target.module_name = target_dict['module_name'] - if 'platform_name' in target_dict: - target.platform_name = target_dict['platform_name'] - return target - -def _operating_system_from_dict(os_dict): + if not platform: + platform = sys_type() + return platform.target(target_name) + + +def _operating_system_from_dict(os_name, platform=None): """ uses platform's operating system method to grab the constructed operating systems that are valid on the platform. """ -# NOTE: Might need a better way to create operating system objects - operating_system = OperatingSystem.__new__(OperatingSystem) - operating_system.name = os_dict['name'] - operating_system.version = os_dict['version'] - return operating_system + if not platform: + platform = sys_type() + if isinstance(os_name, spack.util.spack_yaml.syaml_dict): + name = os_name['name'] + version = os_name['version'] + return platform.operating_system(name+version) + else: + return platform.operating_system(os_name) + -def _platform_from_dict(platform_dict): +def _platform_from_dict(platform_name): """ Constructs a platform from a dictionary. """ - platform = Platform.__new__(Platform) - name, p_dict = platform_dict.items()[0] - platform.name = name - platform.targets = {} - for name, t_dict in p_dict['targets'].items(): - platform.add_target(name, _target_from_dict(t_dict)) - platform.operating_sys = {} - for name, o_dict in p_dict['operating_systems'].items(): - platform.add_operating_system(name, _operating_system_from_dict(o_dict)) - platform.priority = p_dict['priority'] - platform.front_end = p_dict['default_front_end_target'] - platform.back_end = p_dict['default_back_end_target'] - platform.default = p_dict['default_target'] - platform.front_os = p_dict['default_front_end_os'] - platform.back_os = p_dict['default_back_end_os'] - platform.default_os = p_dict['default_os'] - - return platform + platform_path = spack.platform_path + mod_string = "spack.platforms" + + for p in list_modules(platform_path): + if platform_name == p: + mod_name = mod_string + platform_name + path = join_path(platform_path, platform_name) + ".py" + mod = imp.load_source(mod_name, path) + platform_class = mod_to_class(platform_name) + cls = getattr(mod, platform_class) + platform = cls() + return platform + return None + def arch_from_dict(d): """ Uses _platform_from_dict, _operating_system_from_dict, _target_from_dict @@ -472,19 +454,30 @@ def arch_from_dict(d): else: if d is None: return None - platform_dict = d['platform'] - os_dict = d['platform_os'] - target_dict = d['target'] + platform_name = d['platform'] + os_name = d['platform_os'] + target_name = d['target'] - arch.platform = _platform_from_dict(platform_dict) if platform_dict else None - arch.target = _target_from_dict(target_dict) if os_dict else None - arch.platform_os = _operating_system_from_dict(os_dict) if os_dict else None + if platform_name: + arch.platform = _platform_from_dict(platform_name) + else: + arch.platform = None + if target_name: + arch.target = _target_from_dict(target_name, arch.platform) + else: + arch.target = None + if os_name: + arch.platform_os = _operating_system_from_dict(os_name, + arch.platform) + else: + arch.platform_os = None arch.os_string = None arch.target_string = None return arch + @memoized def all_platforms(): modules = [] @@ -507,6 +500,7 @@ def all_platforms(): return modules + @memoized def sys_type(): """ Gather a list of all available subclasses of platforms. -- cgit v1.2.3-70-g09d2 From 30c204a0a5ca116d2e6ab1ab177e103a5857ca4e Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 3 Jun 2016 16:16:59 -0700 Subject: Made a merge commit earlier with Todd fixing all_platforms, but changed how architecture looks in spec.yaml. Just three strings. Also made some flake8 formatting changes --- lib/spack/spack/architecture.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index e74e72d6cd..818731cbf8 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -384,7 +384,6 @@ class Arch(object): target = self.target.name else: target = self.target - print (platform, platform_os, target) return (platform, platform_os, target) def to_dict(self): @@ -421,19 +420,10 @@ def _operating_system_from_dict(os_name, platform=None): def _platform_from_dict(platform_name): """ Constructs a platform from a dictionary. """ - platform_path = spack.platform_path - mod_string = "spack.platforms" - - for p in list_modules(platform_path): - if platform_name == p: - mod_name = mod_string + platform_name - path = join_path(platform_path, platform_name) + ".py" - mod = imp.load_source(mod_name, path) - platform_class = mod_to_class(platform_name) - cls = getattr(mod, platform_class) - platform = cls() - return platform - return None + platform_list = all_platforms() + for p in platform_list: + if platform_name.replace("_", "").lower() == p.__name__.lower(): + return p() def arch_from_dict(d): -- cgit v1.2.3-70-g09d2 From 0e71b5dde8fb8c235122b16368cb075a35be9bfb Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 10:07:13 +0200 Subject: unit test : update dictionary extending lists --- lib/spack/spack/test/modules.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index c73badf8f2..0465c3e67f 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -27,6 +27,7 @@ from contextlib import contextmanager import StringIO import spack.modules +import unittest from spack.test.mock_packages_test import MockPackagesTest FILE_REGISTRY = collections.defaultdict(StringIO.StringIO) @@ -100,6 +101,33 @@ configuration_conflicts = { } } +class HelperFunctionsTests(unittest.TestCase): + def test_update_dictionary_extending_list(self): + target = { + 'foo': { + 'a': 1, + 'b': 2, + 'd': 4 + }, + 'bar': [1, 2, 4], + 'baz': 'foobar' + } + update = { + 'foo': { + 'c': 3, + }, + 'bar': [3], + 'baz': 'foobaz', + 'newkey': { + 'd': 4 + } + } + spack.modules.update_dictionary_extending_lists(target, update) + self.assertTrue(len(target) == 4) + self.assertTrue(len(target['foo']) == 4) + self.assertTrue(len(target['bar']) == 4) + self.assertEqual(target['baz'], 'foobaz') + class TclTests(MockPackagesTest): def setUp(self): -- cgit v1.2.3-70-g09d2 From 2207ab8f23d099f535e95eec6b604862a86e7275 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 10:44:37 +0200 Subject: unit test : inspect_path --- lib/spack/spack/test/modules.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 0465c3e67f..94d508853c 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -101,6 +101,7 @@ configuration_conflicts = { } } + class HelperFunctionsTests(unittest.TestCase): def test_update_dictionary_extending_list(self): target = { @@ -128,6 +129,14 @@ class HelperFunctionsTests(unittest.TestCase): self.assertTrue(len(target['bar']) == 4) self.assertEqual(target['baz'], 'foobaz') + def test_inspect_path(self): + env = spack.modules.inspect_path('/usr') + names = [item.name for item in env] + self.assertTrue('PATH' in names) + self.assertTrue('LIBRARY_PATH' in names) + self.assertTrue('LD_LIBRARY_PATH' in names) + self.assertTrue('CPATH' in names) + class TclTests(MockPackagesTest): def setUp(self): -- cgit v1.2.3-70-g09d2 From 97e28348165d88040fbdc1772c69ae3d06c7378f Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 11:20:35 +0200 Subject: unit test : wrong tag for dependencies --- lib/spack/spack/test/modules.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 94d508853c..9320f6673f 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -163,6 +163,7 @@ class TclTests(MockPackagesTest): spec = spack.spec.Spec('mpich@3.0.4 arch=x86-linux') content = self.get_modulefile_content(spec) self.assertTrue('module-whatis "mpich @3.0.4"' in content) + self.assertRaises(TypeError, spack.modules.dependencies, spec, 'non-existing-tag') def test_autoload(self): spack.modules.CONFIGURATION = configuration_autoload_direct -- cgit v1.2.3-70-g09d2 From a3f39c23157cd094d50b3b661be6574cd1814305 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 11:23:23 +0200 Subject: autopep8 : fixed style issues --- lib/spack/spack/test/modules.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 9320f6673f..d76e0cd054 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -103,6 +103,7 @@ configuration_conflicts = { class HelperFunctionsTests(unittest.TestCase): + def test_update_dictionary_extending_list(self): target = { 'foo': { @@ -139,6 +140,7 @@ class HelperFunctionsTests(unittest.TestCase): class TclTests(MockPackagesTest): + def setUp(self): super(TclTests, self).setUp() self.configuration_obj = spack.modules.CONFIGURATION @@ -163,7 +165,8 @@ class TclTests(MockPackagesTest): spec = spack.spec.Spec('mpich@3.0.4 arch=x86-linux') content = self.get_modulefile_content(spec) self.assertTrue('module-whatis "mpich @3.0.4"' in content) - self.assertRaises(TypeError, spack.modules.dependencies, spec, 'non-existing-tag') + self.assertRaises(TypeError, spack.modules.dependencies, + spec, 'non-existing-tag') def test_autoload(self): spack.modules.CONFIGURATION = configuration_autoload_direct -- cgit v1.2.3-70-g09d2 From 408aa10210384490348d997069dce02fe61d336d Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 16:18:15 +0200 Subject: unit test : whitelist --- lib/spack/spack/test/modules.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index d76e0cd054..098777c48b 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -84,7 +84,8 @@ configuration_alter_environment = { configuration_blacklist = { 'enable': ['tcl'], 'tcl': { - 'blacklist': ['callpath'], + 'whitelist': ['zmpi'], + 'blacklist': ['callpath', 'mpi'], 'all': { 'autoload': 'direct' } @@ -207,6 +208,7 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_blacklist spec = spack.spec.Spec('mpileaks arch=x86-linux') content = self.get_modulefile_content(spec) + print('\n'.join(content)) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 1) self.assertEqual(len([x for x in content if 'module load ' in x]), 1) -- cgit v1.2.3-70-g09d2 From 09b1daa7b971eaac221cbd1c043df8f46a38fa33 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 16:23:41 +0200 Subject: unit test : write a blacklisted module --- lib/spack/spack/test/modules.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 098777c48b..46d6824acd 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -211,6 +211,9 @@ class TclTests(MockPackagesTest): print('\n'.join(content)) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 1) self.assertEqual(len([x for x in content if 'module load ' in x]), 1) + spec = spack.spec.Spec('callpath arch=x86-linux') + # Returns a StringIO instead of a string as no module file was written + self.assertRaises(AttributeError, self.get_modulefile_content, spec) def test_conflicts(self): spack.modules.CONFIGURATION = configuration_conflicts -- cgit v1.2.3-70-g09d2 From 422d3d4db60f7e00fdbda452c94bfb5d155f304e Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 16:46:15 +0200 Subject: unit test : write a whitelisted module --- lib/spack/spack/test/modules.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 46d6824acd..7fb1c6a921 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -214,6 +214,11 @@ class TclTests(MockPackagesTest): spec = spack.spec.Spec('callpath arch=x86-linux') # Returns a StringIO instead of a string as no module file was written self.assertRaises(AttributeError, self.get_modulefile_content, spec) + spec = spack.spec.Spec('zmpi arch=x86-linux') + content = self.get_modulefile_content(spec) + print('\n'.join(content)) + self.assertEqual(len([x for x in content if 'is-loaded' in x]), 1) + self.assertEqual(len([x for x in content if 'module load ' in x]), 1) def test_conflicts(self): spack.modules.CONFIGURATION = configuration_conflicts -- cgit v1.2.3-70-g09d2 From ffa6fed3a3205d15d6c9ff8ca8c92cbecdbe2a0c Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 17:20:06 +0200 Subject: unit test : custom module file load --- lib/spack/spack/test/modules.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 7fb1c6a921..bf5555d9d4 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -75,8 +75,13 @@ configuration_alter_environment = { 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']} }, 'arch=x86-linux': { - 'environment': {'set': {'FOO': 'foo'}, - 'unset': ['BAR']} + 'environment': { + 'set': {'FOO': 'foo'}, + 'unset': ['BAR'] + } + }, + 'arch=x64-linux': { + 'load': ['foo/bar'] } } } @@ -203,6 +208,8 @@ class TclTests(MockPackagesTest): self.assertEqual( len([x for x in content if 'setenv FOO "foo"' in x]), 0) self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 0) + self.assertEqual(len([x for x in content if 'is-loaded foo/bar' in x]), 1) + self.assertEqual(len([x for x in content if 'module load foo/bar' in x]), 1) def test_blacklist(self): spack.modules.CONFIGURATION = configuration_blacklist -- cgit v1.2.3-70-g09d2 From 2d6db06fca54aa840593a1dbb4e99e8f0e58bbce Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 17:24:27 +0200 Subject: unit test : prerequisites --- lib/spack/spack/test/modules.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index bf5555d9d4..99cc280d27 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -68,6 +68,24 @@ configuration_autoload_all = { } } +configuration_prerequisites_direct = { + 'enable': ['tcl'], + 'tcl': { + 'all': { + 'prerequisites': 'direct' + } + } +} + +configuration_prerequisites_all = { + 'enable': ['tcl'], + 'tcl': { + 'all': { + 'prerequisites': 'all' + } + } +} + configuration_alter_environment = { 'enable': ['tcl'], 'tcl': { @@ -187,6 +205,17 @@ class TclTests(MockPackagesTest): self.assertEqual(len([x for x in content if 'is-loaded' in x]), 5) self.assertEqual(len([x for x in content if 'module load ' in x]), 5) + def test_prerequisites(self): + spack.modules.CONFIGURATION = configuration_prerequisites_direct + spec = spack.spec.Spec('mpileaks arch=x86-linux') + content = self.get_modulefile_content(spec) + self.assertEqual(len([x for x in content if 'prereq' in x]), 2) + + spack.modules.CONFIGURATION = configuration_prerequisites_all + spec = spack.spec.Spec('mpileaks arch=x86-linux') + content = self.get_modulefile_content(spec) + self.assertEqual(len([x for x in content if 'prereq' in x]), 5) + def test_alter_environment(self): spack.modules.CONFIGURATION = configuration_alter_environment spec = spack.spec.Spec('mpileaks arch=x86-linux') -- cgit v1.2.3-70-g09d2 From d43cfefa43b47942388003b30ab7fd52b3035fde Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 17:24:52 +0200 Subject: autopep8 --- lib/spack/spack/test/modules.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 99cc280d27..05a3349480 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -237,8 +237,10 @@ class TclTests(MockPackagesTest): self.assertEqual( len([x for x in content if 'setenv FOO "foo"' in x]), 0) self.assertEqual(len([x for x in content if 'unsetenv BAR' in x]), 0) - self.assertEqual(len([x for x in content if 'is-loaded foo/bar' in x]), 1) - self.assertEqual(len([x for x in content if 'module load foo/bar' in x]), 1) + self.assertEqual( + len([x for x in content if 'is-loaded foo/bar' in x]), 1) + self.assertEqual( + len([x for x in content if 'module load foo/bar' in x]), 1) def test_blacklist(self): spack.modules.CONFIGURATION = configuration_blacklist -- cgit v1.2.3-70-g09d2 From 669caefccb431a79dcdb1d3743afbac86c84630a Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 18:00:18 +0200 Subject: unit test : wrong naming scheme in conflict --- lib/spack/spack/test/modules.py | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 05a3349480..f695bf75f1 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -125,6 +125,16 @@ configuration_conflicts = { } } +configuration_wrong_conflicts = { + 'enable': ['tcl'], + 'tcl': { + 'naming_scheme': '{name}/{version}-{compiler.name}', + 'all': { + 'conflict': ['{name}/{compiler.name}'] + } + } +} + class HelperFunctionsTests(unittest.TestCase): @@ -268,3 +278,45 @@ class TclTests(MockPackagesTest): len([x for x in content if x == 'conflict mpileaks']), 1) self.assertEqual( len([x for x in content if x == 'conflict intel/14.0.1']), 1) + + spack.modules.CONFIGURATION = configuration_wrong_conflicts + self.assertRaises(SystemExit, self.get_modulefile_content, spec) + +configuration_dotkit = { + 'enable': ['dotkit'], + 'dotkit': { + 'all': { + 'prerequisites': 'direct' + } + } +} + + +class DotkitTests(MockPackagesTest): + + def setUp(self): + super(DotkitTests, self).setUp() + self.configuration_obj = spack.modules.CONFIGURATION + spack.modules.open = mock_open + # Make sure that a non-mocked configuration will trigger an error + spack.modules.CONFIGURATION = None + + def tearDown(self): + del spack.modules.open + spack.modules.CONFIGURATION = self.configuration_obj + super(DotkitTests, self).tearDown() + + def get_modulefile_content(self, spec): + spec.concretize() + generator = spack.modules.Dotkit(spec) + generator.write() + content = FILE_REGISTRY[generator.file_name].split('\n') + return content + + def test_dotkit(self): + spack.modules.CONFIGURATION = configuration_dotkit + spec = spack.spec.Spec('mpileaks arch=x86-linux') + content = self.get_modulefile_content(spec) + print('\n'.join(content)) + self.assertTrue('#c spack' in content) + self.assertTrue('#d mpileaks @2.3' in content) -- cgit v1.2.3-70-g09d2 From 02cadb882b60b33a86b2ffc4d3e2320c16e66c7b Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 18:09:06 +0200 Subject: unit test : suffixes --- lib/spack/spack/test/modules.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index f695bf75f1..7f4643409e 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -135,6 +135,17 @@ configuration_wrong_conflicts = { } } +configuration_suffix = { + 'enable': ['tcl'], + 'tcl': { + 'mpileaks': { + 'suffixes': { + '+debug': 'foo', + '~debug': 'bar' + } + } + } +} class HelperFunctionsTests(unittest.TestCase): @@ -282,6 +293,20 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_wrong_conflicts self.assertRaises(SystemExit, self.get_modulefile_content, spec) + + def test_suffixes(self): + spack.modules.CONFIGURATION = configuration_suffix + spec = spack.spec.Spec('mpileaks+debug arch=x86-linux') + spec.concretize() + generator = spack.modules.TclModule(spec) + self.assertTrue('foo' in generator.use_name) + + spec = spack.spec.Spec('mpileaks~debug arch=x86-linux') + spec.concretize() + generator = spack.modules.TclModule(spec) + self.assertTrue('bar' in generator.use_name) + + configuration_dotkit = { 'enable': ['dotkit'], 'dotkit': { -- cgit v1.2.3-70-g09d2 From bdd874eb7fad2e193cb1186a499b9cd742632f62 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 4 Jun 2016 18:09:28 +0200 Subject: autopep8 --- lib/spack/spack/test/modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 7f4643409e..bb83ea9059 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -147,6 +147,7 @@ configuration_suffix = { } } + class HelperFunctionsTests(unittest.TestCase): def test_update_dictionary_extending_list(self): @@ -293,7 +294,6 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_wrong_conflicts self.assertRaises(SystemExit, self.get_modulefile_content, spec) - def test_suffixes(self): spack.modules.CONFIGURATION = configuration_suffix spec = spack.spec.Spec('mpileaks+debug arch=x86-linux') -- cgit v1.2.3-70-g09d2 From f751d681771499b1da46216f46beb0a074fa73e7 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 6 Jun 2016 09:03:32 -0700 Subject: Passing architecture to functions to find compiler. We can use the platform name if provided to find the operating system. Also changed error to operating system instead of target since operating system is now in charge of compiler finding. --- lib/spack/spack/compilers/__init__.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index ea79f655b0..d923d77da8 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -220,10 +220,11 @@ def find(compiler_spec, scope=None): @_auto_compiler_spec -def compilers_for_spec(compiler_spec, scope=None): +def compilers_for_spec(compiler_spec, scope=None, **kwargs): """This gets all compilers that satisfy the supplied CompilerSpec. Returns an empty list if none are found. """ + platform = kwargs.get("platform", None) config = all_compilers_config(scope) def get_compilers(cspec): @@ -253,7 +254,7 @@ def compilers_for_spec(compiler_spec, scope=None): mods = [] if 'operating_system' in items: - operating_system = spack.architecture._operating_system_from_dict( items['operating_system'] ) + operating_system = spack.architecture._operating_system_from_dict(items['operating_system'], platform) else: operating_system = None @@ -275,12 +276,13 @@ def compilers_for_spec(compiler_spec, scope=None): @_auto_compiler_spec -def compiler_for_spec(compiler_spec, operating_system): +def compiler_for_spec(compiler_spec, arch): """Get the compiler that satisfies compiler_spec. compiler_spec must be concrete.""" + operating_system = arch.platform_os assert(compiler_spec.concrete) - compilers = [c for c in compilers_for_spec(compiler_spec) + compilers = [c for c in compilers_for_spec(compiler_spec, platform=arch.platform) if c.operating_system == operating_system] if len(compilers) < 1: raise NoCompilerForSpecError(compiler_spec, operating_system) @@ -334,7 +336,7 @@ class NoCompilersError(spack.error.SpackError): class NoCompilerForSpecError(spack.error.SpackError): def __init__(self, compiler_spec, target): - super(NoCompilerForSpecError, self).__init__("No compilers for target %s satisfy spec %s" % ( + super(NoCompilerForSpecError, self).__init__("No compilers for operating system %s satisfy spec %s" % ( target, compiler_spec)) class CompilerSpecInsufficientlySpecificError(spack.error.SpackError): -- cgit v1.2.3-70-g09d2 From c7b48f6fef92167b55d901e47a50e3f704fd65ec Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 6 Jun 2016 09:04:24 -0700 Subject: Passing full arch for proper compiler spec so that we can use the platform to get the operating system --- lib/spack/spack/concretize.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 58811c3419..1f37455c77 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -280,10 +280,12 @@ class DefaultConcretizer(object): # Only use a matching compiler if it is of the proper style # Takes advantage of the proper logic already existing in compiler_for_spec # Should think whether this can be more efficient - def _proper_compiler_style(cspec, architecture): - compilers = spack.compilers.compilers_for_spec(cspec) - return filter(lambda c: c.operating_system == - architecture.platform_os, compilers) + def _proper_compiler_style(cspec, arch): + platform = arch.platform + compilers = spack.compilers.compilers_for_spec(cspec, + platform=platform) + return filter(lambda c: c.operating_system == + arch.platform_os, compilers) #return compilers @@ -368,7 +370,7 @@ class DefaultConcretizer(object): # Include the compiler flag defaults from the config files # This ensures that spack will detect conflicts that stem from a change # in default compiler flags. - compiler = spack.compilers.compiler_for_spec(spec.compiler, spec.architecture.platform_os) + compiler = spack.compilers.compiler_for_spec(spec.compiler, spec.architecture) for flag in compiler.flags: if flag not in spec.compiler_flags: spec.compiler_flags[flag] = compiler.flags[flag] -- cgit v1.2.3-70-g09d2 From 5b023bb0a1b2eef9d950cb660b466d2ab0e04349 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 6 Jun 2016 09:05:14 -0700 Subject: Passing through full arch instead of just operating sysystem so that we can use the platform to get the operating system --- lib/spack/spack/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 0edb70e4ca..1a6c289bc7 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -682,7 +682,7 @@ class Package(object): if not self.spec.concrete: raise ValueError("Can only get a compiler for a concrete package.") return spack.compilers.compiler_for_spec(self.spec.compiler, - self.spec.architecture.platform_os) + self.spec.architecture) def url_version(self, version): """ -- cgit v1.2.3-70-g09d2 From 864191b6ed9fbd95e549b2f4852dc92113c6a190 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 6 Jun 2016 09:06:58 -0700 Subject: Got rid of unnecessary global keyword --- lib/spack/spack/test/mock_packages_test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 561f319b16..9c586bd8ce 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -40,7 +40,6 @@ linux_os_name = 'debian' linux_os_version = '6' if platform.name == 'linux': - global linux_os_name, linux_os_version linux_os = platform.operating_system("default_os") linux_os_name = linux_os.name linux_os_version = linux_os.version -- cgit v1.2.3-70-g09d2 From 835982faedc0d728356600836caf2dd4690a9c5b Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 6 Jun 2016 09:08:59 -0700 Subject: Changed OS name to CNL10 so that we properly find the compilers for the test platform --- lib/spack/spack/platforms/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/platforms/test.py b/lib/spack/spack/platforms/test.py index 3a4f9d5f2d..8fa2585a7a 100644 --- a/lib/spack/spack/platforms/test.py +++ b/lib/spack/spack/platforms/test.py @@ -10,8 +10,8 @@ class Test(Platform): back_end = 'x86_64' default = 'x86_64' - back_os = 'CNL' - default_os = 'CNL' + back_os = 'CNL10' + default_os = 'CNL10' def __init__(self): super(Test, self).__init__('test') -- cgit v1.2.3-70-g09d2 From 196737c2173a7b5748b3ad59e349611ec4f6b23c Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 6 Jun 2016 10:29:19 -0700 Subject: Changed to passing full architecture spec to function rather than just platform_os so we can grab the operating system from the platform getters --- lib/spack/spack/spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 89c03a13b7..7718adb72c 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1124,7 +1124,7 @@ class Spec(object): for s in self.traverse(root=False): if s.external_module: - compiler = spack.compilers.compiler_for_spec(s.compiler, s.architecture.platform_os) + compiler = spack.compilers.compiler_for_spec(s.compiler, s.architecture) for mod in compiler.modules: load_module(mod) -- cgit v1.2.3-70-g09d2 From de1ec4be8b0c7bc8c36e88a460e64b3be38cff35 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Mon, 6 Jun 2016 12:26:13 -0700 Subject: change source archive caching to omit digest from name and instead calculate and compare the checksum. This achieves the original goal of discarding stale cache files without preserving multiple files for the same version. --- lib/spack/spack/fetch_strategy.py | 23 +++++++++++++++++++++-- lib/spack/spack/mirror.py | 8 +------- lib/spack/spack/package.py | 9 --------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 4bbf7bb34c..fde2a8805e 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -343,7 +343,7 @@ class URLFetchStrategy(FetchStrategy): def __repr__(self): url = self.url if self.url else "no url" - return "URLFetchStrategy<%s>" % url + return "%s<%s>" % (self.__class__.__name__, url) def __str__(self): if self.url: @@ -352,6 +352,25 @@ class URLFetchStrategy(FetchStrategy): return "[no url]" +class URLMirrorFetchStrategy(URLFetchStrategy): + """The resource associated with a URL at a mirror may be out of date. + """ + def __init__(self, *args, **kwargs): + super(URLMirrorFetchStrategy, self).__init__(*args, **kwargs) + + @_needs_stage + def fetch(self): + super(URLMirrorFetchStrategy, self).fetch() + if self.digest: + try: + self.check() + except ChecksumError: + # Future fetchers will assume they don't need to download if the + # file remains + os.remove(self.archive_file) + raise + + class VCSFetchStrategy(FetchStrategy): def __init__(self, name, *rev_types, **kwargs): super(VCSFetchStrategy, self).__init__() @@ -816,7 +835,7 @@ class FsCache(object): def fetcher(self, targetPath, digest): url = "file://" + join_path(self.root, targetPath) - return URLFetchStrategy(url, digest) + return URLMirrorFetchStrategy(url, digest) class FetchError(spack.error.SpackError): diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py index 81a2f6afb7..0bbcfba6b4 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirror.py @@ -61,13 +61,7 @@ def mirror_archive_filename(spec, fetcher): # Otherwise we'll make a .tar.gz ourselves ext = 'tar.gz' - tokens = [spec.package.name, spec.version] - digests = spec.package.digests - if digests: - # If a package has multiple digests, any one is sufficient to identify it - digestType, digest = sorted(digests.iteritems())[0] - tokens.extend([digestType, digest]) - filename = '-'.join(str(t) for t in tokens) + filename = "%s-%s" % (spec.package.name, spec.version) if ext: filename += ".%s" % ext return filename diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 70ec243726..cbf50e56f6 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -413,15 +413,6 @@ class Package(object): raise ValueError("Can only get of package with concrete version.") return self.spec.versions[0] - @property - def digests(self): - """All digests for the concretized package version.""" - versionInfo = self.versions[self.version] - digests = {} - if 'md5' in versionInfo: - digests['md5'] = versionInfo['md5'] - return digests - @memoized def version_urls(self): """Return a list of URLs for different versions of this -- cgit v1.2.3-70-g09d2 From 4925be0bc4b63571eb9a9cb63e65409bebcc2c66 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 7 Jun 2016 13:22:47 -0700 Subject: Load external modules --- lib/spack/spack/build_environment.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 4483b9d132..7c65091d49 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -384,6 +384,13 @@ def parent_class_modules(cls): return result +def load_external_modules(pkg): + """ traverse the spec list and find any specs that have external modules. + """ + for dep in list(pkg.spec.traverse()): + if dep.external_module: + load_module(dep.external_module) + def setup_package(pkg): """Execute all environment setup routines.""" spack_env = EnvironmentModifications() @@ -407,7 +414,7 @@ def setup_package(pkg): set_compiler_environment_variables(pkg, spack_env) set_build_environment_variables(pkg, spack_env) - + 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): -- cgit v1.2.3-70-g09d2 From 5715799d4ee1c39d11106bb78a034e6affac474c Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Tue, 7 Jun 2016 14:15:28 -0700 Subject: Added to_dict back into operating system --- lib/spack/spack/architecture.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 818731cbf8..1f25bc14ea 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -195,6 +195,7 @@ class Platform(object): name = self.back_os return self.operating_sys.get(name, None) + @classmethod def detect(self): @@ -333,6 +334,12 @@ class OperatingSystem(object): return list(compilers.values()) + def to_dict(self): + d = {} + d['name'] = self.name + d['version'] = self.version + + return d @key_ordering class Arch(object): @@ -410,7 +417,8 @@ def _operating_system_from_dict(os_name, platform=None): """ if not platform: platform = sys_type() - if isinstance(os_name, spack.util.spack_yaml.syaml_dict): + if isinstance(os_name, spack.util.spack_yaml.syaml_dict) or \ + isinstance(os_name, dict): name = os_name['name'] version = os_name['version'] return platform.operating_system(name+version) -- cgit v1.2.3-70-g09d2 From a2754894ea67e0e751121411ff92d60ca68ab089 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Tue, 7 Jun 2016 16:26:54 -0700 Subject: (1) FsCache store now takes a fetcher vs. just a copy command (2) use [1] to conditionally cache resource: only save it if there is a feature which identifies it uniquely (for example do not cache a repository if it pulls the latest state vs. a particular tag/commit) --- lib/spack/spack/fetch_strategy.py | 16 ++++++++++++++-- lib/spack/spack/stage.py | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index fde2a8805e..3221716b91 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -828,10 +828,22 @@ class FsCache(object): def __init__(self, root): self.root = os.path.abspath(root) - def store(self, copyCmd, relativeDst): + def store(self, fetcher, relativeDst): + unique = False + uidGroups = [['tag', 'commit'], ['digest'], ['revision']] + for grp in uidGroups: + try: + unique |= any(getattr(fetcher, x) for x in grp) + except AttributeError: + pass + if unique: + break + if not unique: + return + dst = join_path(self.root, relativeDst) mkdirp(os.path.dirname(dst)) - copyCmd(dst) + fetcher.archive(dst) def fetcher(self, targetPath, digest): url = "file://" + join_path(self.root, targetPath) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index f28934d10a..b08cce43b8 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -337,7 +337,7 @@ class Stage(object): def cache_local(self): - spack.cache.store(self.fetcher.archive, self.mirror_path) + spack.cache.store(self.fetcher, self.mirror_path) def expand_archive(self): -- cgit v1.2.3-70-g09d2 From 25b2f7b1d75d404b4e06443969cdcb3e125123e6 Mon Sep 17 00:00:00 2001 From: Greg Lee Date: Tue, 7 Jun 2016 20:02:38 -0700 Subject: put older versions back + version-specific dwarfdump dir --- var/spack/repos/builtin/packages/libdwarf/package.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/libdwarf/package.py b/var/spack/repos/builtin/packages/libdwarf/package.py index c9c6e9404f..0e2e702b1c 100644 --- a/var/spack/repos/builtin/packages/libdwarf/package.py +++ b/var/spack/repos/builtin/packages/libdwarf/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os # Only build certain parts of dwarf because the other ones break. dwarf_dirs = ['libdwarf', 'dwarfdump2'] @@ -45,7 +44,9 @@ class Libdwarf(Package): list_url = homepage version('20160507', 'ae32d6f9ece5daf05e2d4b14822ea811') - + version('20130729', '4cc5e48693f7b93b7aa0261e63c0e21d') + version('20130207', '64b42692e947d5180e162e46c689dfbf') + version('20130126', 'ded74a5e90edb5a12aac3c29d260c5db') depends_on("libelf") parallel = False @@ -67,7 +68,11 @@ class Libdwarf(Package): install('libdwarf.h', prefix.include) install('dwarf.h', prefix.include) - with working_dir('dwarfdump'): + if spec.satisfies('@20130126:20130729'): + dwarfdump_dir = 'dwarfdump2' + else: + dwarfdump_dir = 'dwarfdump' + with working_dir(dwarfdump_dir): configure("--prefix=" + prefix) # This makefile has strings of copy commands that -- cgit v1.2.3-70-g09d2 From 2262bc95f1139e8599b061474569fab69d57a7f4 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 7 Jun 2016 22:04:11 -0500 Subject: new package: r-packrat Manage the R packages your project depends on in an isolated, portable, and reproducible way. https://github.com/rstudio/packrat/ --- .../repos/builtin/packages/r-packrat/package.py | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-packrat/package.py diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py new file mode 100644 index 0000000000..f7cebf9d49 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-packrat/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 RPackrat(Package): + """Manage the R packages your project depends on in an isolated, portable, + and reproducible way.""" + + homepage = 'https://github.com/rstudio/packrat/' + url = "https://cran.r-project.org/src/contrib/packrat_0.4.7-1.tar.gz" + + version('0.4.7-1', '80c2413269b292ade163a70ba5053e84') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', + '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) -- cgit v1.2.3-70-g09d2 From bb57b82794bf8434904235af42ad15914eff24ee Mon Sep 17 00:00:00 2001 From: Greg Lee Date: Tue, 7 Jun 2016 20:15:02 -0700 Subject: flake8 fixes --- var/spack/repos/builtin/packages/libdwarf/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/libdwarf/package.py b/var/spack/repos/builtin/packages/libdwarf/package.py index 0e2e702b1c..594271f655 100644 --- a/var/spack/repos/builtin/packages/libdwarf/package.py +++ b/var/spack/repos/builtin/packages/libdwarf/package.py @@ -27,6 +27,7 @@ from spack import * # Only build certain parts of dwarf because the other ones break. dwarf_dirs = ['libdwarf', 'dwarfdump2'] + class Libdwarf(Package): """The DWARF Debugging Information Format is of interest to programmers working on compilers and debuggers (and any one @@ -51,7 +52,6 @@ class Libdwarf(Package): parallel = False - def install(self, spec, prefix): # dwarf build does not set arguments for ar properly make.add_default_arg('ARFLAGS=rcs') -- cgit v1.2.3-70-g09d2 From 738720a000ab200cf93532de506eda71b1d582e5 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 7 Jun 2016 23:20:46 -0500 Subject: new package: r-devtools This PR brings in the R devtools package and it dependencies. --- var/spack/repos/builtin/packages/r-R6/package.py | 45 ++++++++++++++++++ var/spack/repos/builtin/packages/r-curl/package.py | 50 ++++++++++++++++++++ .../repos/builtin/packages/r-devtools/package.py | 49 +++++++++++++++++++ .../repos/builtin/packages/r-digest/package.py | 55 ++++++++++++++++++++++ .../repos/builtin/packages/r-git2r/package.py | 45 ++++++++++++++++++ var/spack/repos/builtin/packages/r-httr/package.py | 48 +++++++++++++++++++ .../repos/builtin/packages/r-jsonlite/package.py | 49 +++++++++++++++++++ .../repos/builtin/packages/r-memoise/package.py | 43 +++++++++++++++++ var/spack/repos/builtin/packages/r-mime/package.py | 41 ++++++++++++++++ .../repos/builtin/packages/r-openssl/package.py | 51 ++++++++++++++++++++ .../repos/builtin/packages/r-rstudioapi/package.py | 41 ++++++++++++++++ .../repos/builtin/packages/r-whisker/package.py | 41 ++++++++++++++++ .../repos/builtin/packages/r-withr/package.py | 43 +++++++++++++++++ 13 files changed, 601 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-R6/package.py create mode 100644 var/spack/repos/builtin/packages/r-curl/package.py create mode 100644 var/spack/repos/builtin/packages/r-devtools/package.py create mode 100644 var/spack/repos/builtin/packages/r-digest/package.py create mode 100644 var/spack/repos/builtin/packages/r-git2r/package.py create mode 100644 var/spack/repos/builtin/packages/r-httr/package.py create mode 100644 var/spack/repos/builtin/packages/r-jsonlite/package.py create mode 100644 var/spack/repos/builtin/packages/r-memoise/package.py create mode 100644 var/spack/repos/builtin/packages/r-mime/package.py create mode 100644 var/spack/repos/builtin/packages/r-openssl/package.py create mode 100644 var/spack/repos/builtin/packages/r-rstudioapi/package.py create mode 100644 var/spack/repos/builtin/packages/r-whisker/package.py create mode 100644 var/spack/repos/builtin/packages/r-withr/package.py diff --git a/var/spack/repos/builtin/packages/r-R6/package.py b/var/spack/repos/builtin/packages/r-R6/package.py new file mode 100644 index 0000000000..9dd8aebb75 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-R6/package.py @@ -0,0 +1,45 @@ +############################################################################## +# 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 RR6(Package): + """The R6 package allows the creation of classes with reference semantics, + similar to R's built-in reference classes. Compared to reference classes, + R6 classes are simpler and lighter-weight, and they are not built on S4 + classes so they do not require the methods package. These classes allow + public and private members, and they support inheritance, even when the + classes are defined in different packages.""" + + homepage = "https://github.com/wch/R6/" + url = "https://cran.r-project.org/src/contrib/R6_2.1.2.tar.gz" + + version('2.1.2', 'b6afb9430e48707be87638675390e457') + + 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-curl/package.py b/var/spack/repos/builtin/packages/r-curl/package.py new file mode 100644 index 0000000000..38ceeba5e4 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-curl/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 RCurl(Package): + """The curl() and curl_download() functions provide highly configurable + drop-in replacements for base url() and download.file() with better + performance, support for encryption (https, ftps), gzip compression, + authentication, and other libcurl goodies. The core of the package + implements a framework for performing fully customized requests where data + can be processed either in memory, on disk, or streaming via the callback + or connection interfaces. Some knowledge of libcurl is recommended; for a + more-user-friendly web client see the 'httr' package which builds on this + package with http specific tools and logic.""" + + homepage = "https://github.com/jeroenooms/curl" + url = "https://cran.r-project.org/src/contrib/curl_0.9.7.tar.gz" + + version('0.9.7', 'a101f7de948cb828fef571c730f39217') + + extends('R') + + depends_on('curl') + + 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-devtools/package.py b/var/spack/repos/builtin/packages/r-devtools/package.py new file mode 100644 index 0000000000..785f90107a --- /dev/null +++ b/var/spack/repos/builtin/packages/r-devtools/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 RDevtools(Package): + """Collection of package development tools.""" + + homepage = "https://github.com/hadley/devtools" + url = "https://cran.r-project.org/src/contrib/devtools_1.11.1.tar.gz" + + version('1.11.1', '242672ee27d24dddcbdaac88c586b6c2') + + extends('R') + + depends_on('r-httr') + depends_on('r-memoise') + depends_on('r-whisker') + depends_on('r-digest') + depends_on('r-rstudioapi') + depends_on('r-jsonlite') + depends_on('r-git2r') + depends_on('r-withr') + + 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-digest/package.py b/var/spack/repos/builtin/packages/r-digest/package.py new file mode 100644 index 0000000000..8d6569e176 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-digest/package.py @@ -0,0 +1,55 @@ +############################################################################## +# 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 RDigest(Package): + """Implementation of a function 'digest()' for the creation of hash digests + of arbitrary R objects (using the md5, sha-1, sha-256, crc32, xxhash and + murmurhash algorithms) permitting easy comparison of R language objects, as + well as a function 'hmac()' to create hash-based message authentication + code. The md5 algorithm by Ron Rivest is specified in RFC 1321, the sha-1 + and sha-256 algorithms are specified in FIPS-180-1 and FIPS-180-2, and the + crc32 algorithm is described in + ftp://ftp.rocksoft.com/cliens/rocksoft/papers/crc_v3.txt. For md5, sha-1, + sha-256 and aes, this package uses small standalone implementations that + were provided by Christophe Devine. For crc32, code from the zlib library + is used. For sha-512, an implementation by Aaron D. Gifford is used. For + xxhash, the implementation by Yann Collet is used. For murmurhash, an + implementation by Shane Day is used. Please note that this package is not + meant to be deployed for cryptographic purposes for which more + comprehensive (and widely tested) libraries such as OpenSSL should be + used.""" + + homepage = "http://dirk.eddelbuettel.com/code/digest.html" + url = "https://cran.r-project.org/src/contrib/digest_0.6.9.tar.gz" + + version('0.6.9', '48048ce6c466bdb124716e45ba4a0e83') + + 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-git2r/package.py b/var/spack/repos/builtin/packages/r-git2r/package.py new file mode 100644 index 0000000000..cf3a401903 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-git2r/package.py @@ -0,0 +1,45 @@ +############################################################################## +# 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 RGit2r(Package): + """Interface to the 'libgit2' library, which is a pure C implementation of + the 'Git' core methods. Provides access to 'Git' repositories to extract + data and running some basic 'Git' commands.""" + + homepage = "https://github.com/ropensci/git2r" + url = "https://cran.r-project.org/src/contrib/git2r_0.15.0.tar.gz" + + version('0.15.0', '57658b3298f9b9aadc0dd77b4ef6a1e1') + + extends('R') + + depends_on('zlib') + depends_on('openssl') + + 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-httr/package.py b/var/spack/repos/builtin/packages/r-httr/package.py new file mode 100644 index 0000000000..d10f9e6776 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-httr/package.py @@ -0,0 +1,48 @@ +############################################################################## +# 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 RHttr(Package): + """Useful tools for working with HTTP organised by HTTP verbs (GET(), + POST(), etc). Configuration functions make it easy to control additional + request components (authenticate(), add_headers() and so on).""" + + homepage = "https://github.com/hadley/httr" + url = "https://cran.r-project.org/src/contrib/httr_1.1.0.tar.gz" + + version('1.1.0', '5ffbbc5c2529e49f00aaa521a2b35600') + + extends('R') + + depends_on('r-jsonlite') + depends_on('r-mime') + depends_on('r-curl') + depends_on('r-openssl') + 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-jsonlite/package.py b/var/spack/repos/builtin/packages/r-jsonlite/package.py new file mode 100644 index 0000000000..c8a458fa17 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-jsonlite/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 RJsonlite(Package): + """A fast JSON parser and generator optimized for statistical data and the + web. Started out as a fork of 'RJSONIO', but has been completely rewritten + in recent versions. The package offers flexible, robust, high performance + tools for working with JSON in R and is particularly powerful for building + pipelines and interacting with a web API. The implementation is based on + the mapping described in the vignette (Ooms, 2014). In addition to + converting JSON data from/to R objects, 'jsonlite' contains functions to + stream, validate, and prettify JSON data. The unit tests included with the + package verify that all edge cases are encoded and decoded consistently for + use with dynamic data in systems and applications.""" + + homepage = "https://github.com/jeroenooms/jsonlite" + url = "https://cran.r-project.org/src/contrib/jsonlite_0.9.21.tar.gz" + + version('0.9.21', '4fc382747f88a79ff0718a0d06bed45d') + + 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-memoise/package.py b/var/spack/repos/builtin/packages/r-memoise/package.py new file mode 100644 index 0000000000..7dfda78b8a --- /dev/null +++ b/var/spack/repos/builtin/packages/r-memoise/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 RMemoise(Package): + """Cache the results of a function so that when you call it again with the + same arguments it returns the pre-computed value.""" + + homepage = "https://github.com/hadley/memoise" + url = "https://cran.r-project.org/src/contrib/memoise_1.0.0.tar.gz" + + version('1.0.0', 'd31145292e2a88ae9a504cab1602e4ac') + + extends('R') + + depends_on('r-digest') + + 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-mime/package.py b/var/spack/repos/builtin/packages/r-mime/package.py new file mode 100644 index 0000000000..442280ae44 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mime/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 RMime(Package): + """Guesses the MIME type from a filename extension using the data derived + from /etc/mime.types in UNIX-type systems.""" + + homepage = "https://github.com/yihui/mime" + url = "https://cran.r-project.org/src/contrib/mime_0.4.tar.gz" + + version('0.4', '789cb33e41db2206c6fc7c3e9fbc2c02') + + 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-openssl/package.py b/var/spack/repos/builtin/packages/r-openssl/package.py new file mode 100644 index 0000000000..8105f421dc --- /dev/null +++ b/var/spack/repos/builtin/packages/r-openssl/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 ROpenssl(Package): + """Bindings to OpenSSL libssl and libcrypto, plus custom SSH pubkey + parsers. Supports RSA, DSA and EC curves P-256, P-384 and P-521. + Cryptographic signatures can either be created and verified manually or via + x509 certificates. AES can be used in cbc, ctr or gcm mode for symmetric + encryption; RSA for asymmetric (public key) encryption or EC for Diffie + Hellman. High-level envelope functions combine RSA and AES for encrypting + arbitrary sized data. Other utilities include key generators, hash + functions (md5, sha1, sha256, etc), base64 encoder, a secure random number + generator, and 'bignum' math methods for manually performing crypto + calculations on large multibyte integers.""" + + homepage = "https://github.com/jeroenooms/openssl#readme" + url = "https://cran.r-project.org/src/contrib/openssl_0.9.4.tar.gz" + + version('0.9.4', '82a890e71ed0e74499878bedacfb8ccb') + + extends('R') + + depends_on('openssl') + + 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-rstudioapi/package.py b/var/spack/repos/builtin/packages/r-rstudioapi/package.py new file mode 100644 index 0000000000..50c92ee1c2 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rstudioapi/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 RRstudioapi(Package): + """Access the RStudio API (if available) and provide informative error + messages when it's not.""" + + homepage = "https://cran.r-project.org/web/packages/rstudioapi/index.html" + url = "https://cran.r-project.org/src/contrib/rstudioapi_0.5.tar.gz" + + version('0.5', '6ce1191da74e7bcbf06b61339486b3ba') + + 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-whisker/package.py b/var/spack/repos/builtin/packages/r-whisker/package.py new file mode 100644 index 0000000000..d2af271441 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-whisker/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 RWhisker(Package): + """logicless templating, reuse templates in many programming languages + including R""" + + homepage = "http://github.com/edwindj/whisker" + url = "https://cran.r-project.org/src/contrib/whisker_0.3-2.tar.gz" + + version('0.3-2', 'c4b9bf9a22e69ce003fe68663ab5e8e6') + + 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-withr/package.py b/var/spack/repos/builtin/packages/r-withr/package.py new file mode 100644 index 0000000000..418d15e1e8 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-withr/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 RWithr(Package): + """A set of functions to run code 'with' safely and temporarily modified + global state. Many of these functions were originally a part of the + 'devtools' package, this provides a simple package with limited + dependencies to provide access to these functions.""" + + homepage = "http://github.com/jimhester/withr" + url = "https://cran.r-project.org/src/contrib/withr_1.0.1.tar.gz" + + version('1.0.1', 'ac38af2c6f74027c9592dd8f0acb7598') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', + '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) -- cgit v1.2.3-70-g09d2 From ad0cfa41aa970887771d3cb5a84ae41f7800432b Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 7 Jun 2016 23:37:49 -0500 Subject: Fix flake8 errors --- var/spack/repos/builtin/packages/r-R6/package.py | 4 ++-- var/spack/repos/builtin/packages/r-curl/package.py | 4 ++-- var/spack/repos/builtin/packages/r-devtools/package.py | 4 ++-- var/spack/repos/builtin/packages/r-digest/package.py | 4 ++-- var/spack/repos/builtin/packages/r-git2r/package.py | 4 ++-- var/spack/repos/builtin/packages/r-httr/package.py | 4 ++-- var/spack/repos/builtin/packages/r-jsonlite/package.py | 4 ++-- var/spack/repos/builtin/packages/r-memoise/package.py | 4 ++-- var/spack/repos/builtin/packages/r-mime/package.py | 4 ++-- var/spack/repos/builtin/packages/r-openssl/package.py | 4 ++-- var/spack/repos/builtin/packages/r-rstudioapi/package.py | 4 ++-- var/spack/repos/builtin/packages/r-whisker/package.py | 4 ++-- var/spack/repos/builtin/packages/r-withr/package.py | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-R6/package.py b/var/spack/repos/builtin/packages/r-R6/package.py index 9dd8aebb75..30f489b3fd 100644 --- a/var/spack/repos/builtin/packages/r-R6/package.py +++ b/var/spack/repos/builtin/packages/r-R6/package.py @@ -41,5 +41,5 @@ class RR6(Package): extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-curl/package.py b/var/spack/repos/builtin/packages/r-curl/package.py index 38ceeba5e4..23d75880a7 100644 --- a/var/spack/repos/builtin/packages/r-curl/package.py +++ b/var/spack/repos/builtin/packages/r-curl/package.py @@ -46,5 +46,5 @@ class RCurl(Package): depends_on('curl') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-devtools/package.py b/var/spack/repos/builtin/packages/r-devtools/package.py index 785f90107a..5c73eab936 100644 --- a/var/spack/repos/builtin/packages/r-devtools/package.py +++ b/var/spack/repos/builtin/packages/r-devtools/package.py @@ -45,5 +45,5 @@ class RDevtools(Package): depends_on('r-withr') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-digest/package.py b/var/spack/repos/builtin/packages/r-digest/package.py index 8d6569e176..a42e82f1ae 100644 --- a/var/spack/repos/builtin/packages/r-digest/package.py +++ b/var/spack/repos/builtin/packages/r-digest/package.py @@ -51,5 +51,5 @@ class RDigest(Package): extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-git2r/package.py b/var/spack/repos/builtin/packages/r-git2r/package.py index cf3a401903..272dcbad93 100644 --- a/var/spack/repos/builtin/packages/r-git2r/package.py +++ b/var/spack/repos/builtin/packages/r-git2r/package.py @@ -41,5 +41,5 @@ class RGit2r(Package): depends_on('openssl') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-httr/package.py b/var/spack/repos/builtin/packages/r-httr/package.py index d10f9e6776..0f379512a5 100644 --- a/var/spack/repos/builtin/packages/r-httr/package.py +++ b/var/spack/repos/builtin/packages/r-httr/package.py @@ -44,5 +44,5 @@ class RHttr(Package): depends_on('r-R6') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-jsonlite/package.py b/var/spack/repos/builtin/packages/r-jsonlite/package.py index c8a458fa17..777506b984 100644 --- a/var/spack/repos/builtin/packages/r-jsonlite/package.py +++ b/var/spack/repos/builtin/packages/r-jsonlite/package.py @@ -45,5 +45,5 @@ class RJsonlite(Package): extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-memoise/package.py b/var/spack/repos/builtin/packages/r-memoise/package.py index 7dfda78b8a..ca74ab02a2 100644 --- a/var/spack/repos/builtin/packages/r-memoise/package.py +++ b/var/spack/repos/builtin/packages/r-memoise/package.py @@ -39,5 +39,5 @@ class RMemoise(Package): depends_on('r-digest') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-mime/package.py b/var/spack/repos/builtin/packages/r-mime/package.py index 442280ae44..ac52d785b1 100644 --- a/var/spack/repos/builtin/packages/r-mime/package.py +++ b/var/spack/repos/builtin/packages/r-mime/package.py @@ -37,5 +37,5 @@ class RMime(Package): extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-openssl/package.py b/var/spack/repos/builtin/packages/r-openssl/package.py index 8105f421dc..fd6ad84aa3 100644 --- a/var/spack/repos/builtin/packages/r-openssl/package.py +++ b/var/spack/repos/builtin/packages/r-openssl/package.py @@ -47,5 +47,5 @@ class ROpenssl(Package): depends_on('openssl') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-rstudioapi/package.py b/var/spack/repos/builtin/packages/r-rstudioapi/package.py index 50c92ee1c2..83424392c9 100644 --- a/var/spack/repos/builtin/packages/r-rstudioapi/package.py +++ b/var/spack/repos/builtin/packages/r-rstudioapi/package.py @@ -37,5 +37,5 @@ class RRstudioapi(Package): extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-whisker/package.py b/var/spack/repos/builtin/packages/r-whisker/package.py index d2af271441..f534568ec7 100644 --- a/var/spack/repos/builtin/packages/r-whisker/package.py +++ b/var/spack/repos/builtin/packages/r-whisker/package.py @@ -37,5 +37,5 @@ class RWhisker(Package): extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-withr/package.py b/var/spack/repos/builtin/packages/r-withr/package.py index 418d15e1e8..a9f0cb600f 100644 --- a/var/spack/repos/builtin/packages/r-withr/package.py +++ b/var/spack/repos/builtin/packages/r-withr/package.py @@ -39,5 +39,5 @@ class RWithr(Package): extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From bb19dffb266ab63ff8733051a4461ecdb85bd18f Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 7 Jun 2016 23:40:12 -0500 Subject: Fix flake8 error. --- var/spack/repos/builtin/packages/r-packrat/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py index f7cebf9d49..c9b02a284e 100644 --- a/var/spack/repos/builtin/packages/r-packrat/package.py +++ b/var/spack/repos/builtin/packages/r-packrat/package.py @@ -37,5 +37,5 @@ class RPackrat(Package): extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', - '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From e124c86a4fe515ed4497fafac4bd877e22e2e25a Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 8 Jun 2016 14:17:46 +0200 Subject: Corrected the shared libraries and tests in mumps package --- var/spack/repos/builtin/packages/mumps/package.py | 92 ++++++++++++----------- 1 file changed, 50 insertions(+), 42 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 92c45c9b95..652c85a031 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -23,7 +23,11 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os, sys, glob +import os +import sys +import glob +import subprocess + class Mumps(Package): """MUMPS: a MUltifrontal Massively Parallel sparse direct Solver""" @@ -54,6 +58,8 @@ class Mumps(Package): depends_on('scalapack', when='+mpi') depends_on('mpi', when='+mpi') + patch('mumps-shared.patch', when='+shared') + # this function is not a patch function because in case scalapack # is needed it uses self.spec['scalapack'].fc_link set by the # setup_dependent_environment in scalapck. This happen after patch @@ -116,43 +122,39 @@ class Mumps(Package): if '+mpi' in self.spec: makefile_conf.extend( - ["CC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpicc'), - "FC = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), - "FL = %s" % join_path(self.spec['mpi'].prefix.bin, 'mpif90'), + ["CC = %s" % self.spec['mpi'].mpicc, + "FC = %s" % self.spec['mpi'].mpif90, "SCALAP = %s" % self.spec['scalapack'].fc_link, "MUMPS_TYPE = par"]) else: makefile_conf.extend( ["CC = cc", "FC = fc", - "FL = fc", "MUMPS_TYPE = seq"]) # TODO: change the value to the correct one according to the # compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER - makefile_conf.append("CDEFS = -DAdd_") + makefile_conf.extend([ + 'CDEFS = -DAdd_', + 'FL = $(FC)', + ]) if '+shared' in self.spec: + makefile_conf.append('SHLIBEXT = .%s' % dso_suffix) if sys.platform == 'darwin': - # Building dylibs with mpif90 causes segfaults on 10.8 and 10.10. Use gfortran. (Homebrew) - makefile_conf.extend([ - 'LIBEXT=.dylib', - 'AR=%s -dynamiclib -Wl,-install_name -Wl,%s/$(notdir $@) -undefined dynamic_lookup -o ' % (os.environ['FC'],prefix.lib), - 'RANLIB=echo' - ]) + makefile_conf.append( + 'LDFLAGS = -dynamiclib -Wl,-install_name -Wl,{0}/$(notdir $@) {1}{0} -undefined dynamic_lookup'.format(prefix.lib, self.compiler.fc_rpath_arg) + ) else: - makefile_conf.extend([ - 'LIBEXT=.so', - 'AR=$(FL) -shared -Wl,-soname -Wl,%s/$(notdir $@) -o' % prefix.lib, - 'RANLIB=echo' - ]) - else: - makefile_conf.extend([ - 'LIBEXT = .a', - 'AR = ar vr', - 'RANLIB = ranlib' - ]) + makefile_conf.append( + 'LDFLAGS = -shared {1}{0}'.format(prefix.lib, self.compiler.fc_rpath_arg) + ) + makefile_conf.extend([ + 'LIBEXT = .a', + 'AR = ar vr ', + 'RANLIB = ranlib' + ]) makefile_inc_template = join_path(os.path.dirname(self.module.__file__), 'Makefile.inc') @@ -172,38 +174,44 @@ class Mumps(Package): # the choice to compile ?examples is to have kind of a sanity # check on the libraries generated. if '+float' in spec: - make_libs.append('sexamples') + make_libs.append('s') if '+complex' in spec: - make_libs.append('cexamples') + make_libs.append('c') if '+double' in spec: - make_libs.append('dexamples') + make_libs.append('d') if '+complex' in spec: - make_libs.append('zexamples') + make_libs.append('z') self.write_makefile_inc() - # Build fails in parallel - make(*make_libs, parallel=False) + make('mumps_lib', parallel=False) + make(*make_libs) install_tree('lib', prefix.lib) install_tree('include', prefix.include) if '~mpi' in spec: - lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so' - lib_suffix = lib_dsuffix if '+shared' in spec else '.a' - install('libseq/libmpiseq%s' % lib_suffix, prefix.lib) - for f in glob.glob(join_path('libseq','*.h')): - install(f, prefix.include) + install('libseq/libmpiseq.a', prefix.lib) + if '+shared' in spec: + install('libseq/libmpiseq.{0}'.format(dso_suffix), prefix.lib) + install('libseq/mpi.h', prefix.include) + install('libseq/mpif.h', prefix.include) # FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI # FIXME: use something like numdiff to compare blessed output with the current + # TODO: test the installed mumps and not the one in stage + for t in make_libs: + make('{0}examples'.format(t)) + with working_dir('examples'): - if '+float' in spec: - os.system('./ssimpletest < input_simpletest_real') - if '+complex' in spec: - os.system('./csimpletest < input_simpletest_real') - if '+double' in spec: - os.system('./dsimpletest < input_simpletest_real') - if '+complex' in spec: - os.system('./zsimpletest < input_simpletest_cmplx') + for t in make_libs: + input_file = 'input_simpletest_{0}'.format( + 'real' if t in ['s', 'd'] else 'cmplx') + with open(input_file) as input: + test = './{0}simpletest'.format(t) + ret = subprocess.call(test, + stdin=input) + if ret is not 0: + raise RuntimeError( + 'The test {0} did not pass'.format(test)) -- cgit v1.2.3-70-g09d2 From 498c098d11814311e7fbca0084e5298d28d30ce6 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 8 Jun 2016 14:57:54 +0200 Subject: Cleaning flake warnings in mumps package --- var/spack/repos/builtin/packages/mumps/package.py | 75 +++++++++++++---------- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index 652c85a031..c3cd01a2aa 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -25,7 +25,6 @@ from spack import * import os import sys -import glob import subprocess @@ -48,7 +47,6 @@ class Mumps(Package): variant('idx64', default=False, description='Use int64_t/integer*8 as default index type') variant('shared', default=True, description='Build shared libraries') - depends_on('scotch + esmumps', when='~ptscotch+scotch') depends_on('scotch + esmumps + mpi', when='+ptscotch') depends_on('metis@5:', when='+metis') @@ -59,50 +57,63 @@ class Mumps(Package): depends_on('mpi', when='+mpi') patch('mumps-shared.patch', when='+shared') - + # this function is not a patch function because in case scalapack # is needed it uses self.spec['scalapack'].fc_link set by the # setup_dependent_environment in scalapck. This happen after patch # end before install # def patch(self): def write_makefile_inc(self): - if ('+parmetis' in self.spec or '+ptscotch' in self.spec) and '+mpi' not in self.spec: - raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi') + if (('+parmetis' in self.spec or + '+ptscotch' in self.spec)) and '+mpi' not in self.spec: + raise RuntimeError('You cannot use the variants parmetis or ptscotch without mpi') # NOQA: E501 - makefile_conf = ["LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib] + makefile_conf = [ + "LIBBLAS = -L%s -lblas" % self.spec['blas'].prefix.lib + ] orderings = ['-Dpord'] if '+ptscotch' in self.spec or '+scotch' in self.spec: join_lib = ' -l%s' % ('pt' if '+ptscotch' in self.spec else '') - makefile_conf.extend( - ["ISCOTCH = -I%s" % self.spec['scotch'].prefix.include, - "LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib, - join_lib, - join_lib.join(['esmumps', 'scotch', 'scotcherr']))]) + makefile_conf.extend([ + "ISCOTCH = -I%s" % self.spec['scotch'].prefix.include, + "LSCOTCH = -L%s %s%s" % (self.spec['scotch'].prefix.lib, + join_lib, + join_lib.join(['esmumps', + 'scotch', + 'scotcherr'])) + ]) orderings.append('-Dscotch') if '+ptscotch' in self.spec: orderings.append('-Dptscotch') if '+parmetis' in self.spec and '+metis' in self.spec: - libname = 'parmetis' if '+parmetis' in self.spec else 'metis' - makefile_conf.extend( - ["IMETIS = -I%s" % self.spec['parmetis'].prefix.include, - "LMETIS = -L%s -l%s -L%s -l%s" % (self.spec['parmetis'].prefix.lib, 'parmetis',self.spec['metis'].prefix.lib, 'metis')]) + makefile_conf.extend([ + "IMETIS = -I%s" % self.spec['parmetis'].prefix.include, + "LMETIS = -L%s -l%s -L%s -l%s" % ( + self.spec['parmetis'].prefix.lib, 'parmetis', + self.spec['metis'].prefix.lib, 'metis') + ]) orderings.append('-Dparmetis') elif '+metis' in self.spec: - makefile_conf.extend( - ["IMETIS = -I%s" % self.spec['metis'].prefix.include, - "LMETIS = -L%s -l%s" % (self.spec['metis'].prefix.lib, 'metis')]) + makefile_conf.extend([ + "IMETIS = -I%s" % self.spec['metis'].prefix.include, + "LMETIS = -L%s -l%s" % (self.spec['metis'].prefix.lib, + 'metis') + ]) orderings.append('-Dmetis') makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings))) - # when building shared libs need -fPIC, otherwise - # /usr/bin/ld: graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC + # when building shared libs need -fPIC, otherwise /usr/bin/ld: + # graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can + # not be used when making a shared object; recompile with + # -fPIC fpic = '-fPIC' if '+shared' in self.spec else '' + # TODO: test this part, it needs a full blas, scalapack and # partitionning environment with 64bit integers if '+idx64' in self.spec: @@ -110,7 +121,7 @@ class Mumps(Package): # the fortran compilation flags most probably are # working only for intel and gnu compilers this is # perhaps something the compiler should provide - ['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic,'-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'), + ['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic, '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'), # NOQA: E501 'OPTL = %s -O ' % fpic, 'OPTC = %s -O -DINTSIZE64' % fpic]) else: @@ -119,7 +130,6 @@ class Mumps(Package): 'OPTL = %s -O ' % fpic, 'OPTC = %s -O ' % fpic]) - if '+mpi' in self.spec: makefile_conf.extend( ["CC = %s" % self.spec['mpi'].mpicc, @@ -143,11 +153,13 @@ class Mumps(Package): makefile_conf.append('SHLIBEXT = .%s' % dso_suffix) if sys.platform == 'darwin': makefile_conf.append( - 'LDFLAGS = -dynamiclib -Wl,-install_name -Wl,{0}/$(notdir $@) {1}{0} -undefined dynamic_lookup'.format(prefix.lib, self.compiler.fc_rpath_arg) + 'LDFLAGS = -dynamiclib -Wl,-install_name -Wl,{0}/$(notdir $@) {1}{0} -undefined dynamic_lookup'.format(prefix.lib, self.compiler.fc_rpath_arg) # NOQA: E501 ) else: makefile_conf.append( - 'LDFLAGS = -shared {1}{0}'.format(prefix.lib, self.compiler.fc_rpath_arg) + 'LDFLAGS = -shared {0}{1}'.format( + self.compiler.fc_rpath_arg, + prefix.lib) ) makefile_conf.extend([ @@ -156,8 +168,9 @@ class Mumps(Package): 'RANLIB = ranlib' ]) - makefile_inc_template = join_path(os.path.dirname(self.module.__file__), - 'Makefile.inc') + makefile_inc_template = \ + join_path(os.path.dirname(self.module.__file__), + 'Makefile.inc') with open(makefile_inc_template, "r") as fh: makefile_conf.extend(fh.read().split('\n')) @@ -166,8 +179,6 @@ class Mumps(Package): makefile_inc = '\n'.join(makefile_conf) fh.write(makefile_inc) - - def install(self, spec, prefix): make_libs = [] @@ -191,15 +202,17 @@ class Mumps(Package): install_tree('lib', prefix.lib) install_tree('include', prefix.include) - if '~mpi' in spec: + if '~mpi' in spec: install('libseq/libmpiseq.a', prefix.lib) if '+shared' in spec: install('libseq/libmpiseq.{0}'.format(dso_suffix), prefix.lib) install('libseq/mpi.h', prefix.include) install('libseq/mpif.h', prefix.include) - # FIXME: extend the tests to mpirun -np 2 (or alike) when build with MPI - # FIXME: use something like numdiff to compare blessed output with the current + # FIXME: extend the tests to mpirun -np 2 (or alike) when + # build with MPI + # FIXME: use something like numdiff to compare blessed output + # with the current # TODO: test the installed mumps and not the one in stage for t in make_libs: make('{0}examples'.format(t)) -- cgit v1.2.3-70-g09d2 From 165411f4a5bae4d398630664f863def130492a22 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 8 Jun 2016 15:15:39 +0200 Subject: bug fix in the +mpi case --- var/spack/repos/builtin/packages/mumps/package.py | 29 ++++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index c3cd01a2aa..8a90ef72d0 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -133,7 +133,7 @@ class Mumps(Package): if '+mpi' in self.spec: makefile_conf.extend( ["CC = %s" % self.spec['mpi'].mpicc, - "FC = %s" % self.spec['mpi'].mpif90, + "FC = %s" % self.spec['mpi'].mpifc, "SCALAP = %s" % self.spec['scalapack'].fc_link, "MUMPS_TYPE = par"]) else: @@ -214,17 +214,18 @@ class Mumps(Package): # FIXME: use something like numdiff to compare blessed output # with the current # TODO: test the installed mumps and not the one in stage - for t in make_libs: - make('{0}examples'.format(t)) - - with working_dir('examples'): + if '~mpi' in spec: for t in make_libs: - input_file = 'input_simpletest_{0}'.format( - 'real' if t in ['s', 'd'] else 'cmplx') - with open(input_file) as input: - test = './{0}simpletest'.format(t) - ret = subprocess.call(test, - stdin=input) - if ret is not 0: - raise RuntimeError( - 'The test {0} did not pass'.format(test)) + make('{0}examples'.format(t)) + + with working_dir('examples'): + for t in make_libs: + input_file = 'input_simpletest_{0}'.format( + 'real' if t in ['s', 'd'] else 'cmplx') + with open(input_file) as input: + test = './{0}simpletest'.format(t) + ret = subprocess.call(test, + stdin=input) + if ret is not 0: + raise RuntimeError( + 'The test {0} did not pass'.format(test)) -- cgit v1.2.3-70-g09d2 From f4a39457de662376b5f9da300a06e2dff91b1aeb Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 8 Jun 2016 15:35:15 +0200 Subject: lmod : updated package and dependencies --- lib/spack/spack/version.py | 11 ++++++ var/spack/repos/builtin/packages/lmod/package.py | 16 ++++---- .../builtin/packages/lua-luafilesystem/package.py | 46 ++++++++++++++++++++++ var/spack/repos/builtin/packages/lua/package.py | 6 ++- 4 files changed, 69 insertions(+), 10 deletions(-) create mode 100644 var/spack/repos/builtin/packages/lua-luafilesystem/package.py diff --git a/lib/spack/spack/version.py b/lib/spack/spack/version.py index 247f6d2362..d86bcef3e0 100644 --- a/lib/spack/spack/version.py +++ b/lib/spack/spack/version.py @@ -124,6 +124,17 @@ class Version(object): # last element of separators is '' self.separators = tuple(re.split(segment_regex, string)[1:-1]) + @property + def dotted(self): + return '.'.join(str(x) for x in self.version) + + @property + def underscored(self): + return '_'.join(str(x) for x in self.version) + + @property + def dashed(self): + return '-'.join(str(x) for x in self.version) def up_to(self, index): """Return a version string up to the specified component, exclusive. diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py index 0a8b9b4577..9084c34881 100644 --- a/var/spack/repos/builtin/packages/lmod/package.py +++ b/var/spack/repos/builtin/packages/lmod/package.py @@ -34,17 +34,17 @@ class Lmod(Package): variable. Modulefiles for Library packages provide environment variables that specify where the library and header files can be found. """ - homepage = "https://www.tacc.utexas.edu/research-development/tacc-projects/lmod" - url = "http://sourceforge.net/projects/lmod/files/Lmod-6.0.1.tar.bz2/download" + homepage = 'https://www.tacc.utexas.edu/research-development/tacc-projects/lmod' + url = 'https://github.com/TACC/Lmod/archive/6.4.1.tar.gz' + version('6.4.1', '7978ba777c8aa41a4d8c05fec5f780f4') + version('6.3.7', '0fa4d5a24c41cae03776f781aa2dedc1', preferred=True) version('6.0.1', '91abf52fe5033bd419ffe2842ebe7af9') - depends_on("lua@5.2:") + depends_on('lua@5.2:') + depends_on('lua-luaposix') + depends_on('lua-luafilesystem') def install(self, spec, prefix): - # Add our lua to PATH - os.environ['PATH'] = spec['lua'].prefix.bin + ';' + os.environ['PATH'] - configure('--prefix=%s' % prefix) - make() - make("install") + make('install') diff --git a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py new file mode 100644 index 0000000000..14278bbe72 --- /dev/null +++ b/var/spack/repos/builtin/packages/lua-luafilesystem/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 LuaLuafilesystem(Package): + """ + LuaFileSystem is a Lua library developed to complement the set of functions related to file + systems offered by the standard Lua distribution. + + LuaFileSystem offers a portable way to access the underlying directory structure and file attributes. LuaFileSystem + is free software and uses the same license as Lua 5.1 + """ + homepage = 'http://keplerproject.github.io/luafilesystem' + url = 'https://github.com/keplerproject/luafilesystem/archive/v_1_6_3.tar.gz' + + version('1_6_3', 'd0552c7e5a082f5bb2865af63fb9dc95') + + extends('lua') + + def install(self, spec, prefix): + version = self.spec.version + rockspec_format = join_path(self.stage.path, 'luafilesystem-v_{version.underscored}', 'rockspecs', 'luafilesystem-{version.dotted}-1.rockspec') + luarocks('--tree=' + prefix, 'install', rockspec_format.format(version=self.spec.version)) \ No newline at end of file diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 170f90516a..320e25899e 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -105,6 +105,9 @@ class Lua(Package): spack_env.set('LUA_PATH', ';'.join(lua_patterns), separator=';') spack_env.set('LUA_CPATH', ';'.join(lua_cpatterns), separator=';') + # Add LUA to PATH for dependent packages + spack_env.prepend_path('PATH', self.prefix.bin) + # For run time environment set only the path for extension_spec and # prepend it to LUAPATH if extension_spec.package.extends(self.spec): @@ -153,5 +156,4 @@ class Lua(Package): """ # Lua extension builds can have lua and luarocks executable functions module.lua = Executable(join_path(self.spec.prefix.bin, 'lua')) - module.luarocks = Executable(join_path(self.spec.prefix.bin, - 'luarocks')) + module.luarocks = Executable(join_path(self.spec.prefix.bin, 'luarocks')) -- cgit v1.2.3-70-g09d2 From 4a61efe641c9bf987a62bff729334c7cce3f141b Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 8 Jun 2016 16:21:09 +0200 Subject: lmod : fixed issues with LUA_PATH during installation --- var/spack/repos/builtin/packages/lmod/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py index 9084c34881..e50c2cfc4b 100644 --- a/var/spack/repos/builtin/packages/lmod/package.py +++ b/var/spack/repos/builtin/packages/lmod/package.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class Lmod(Package): """ @@ -38,13 +38,19 @@ class Lmod(Package): url = 'https://github.com/TACC/Lmod/archive/6.4.1.tar.gz' version('6.4.1', '7978ba777c8aa41a4d8c05fec5f780f4') - version('6.3.7', '0fa4d5a24c41cae03776f781aa2dedc1', preferred=True) + version('6.3.7', '0fa4d5a24c41cae03776f781aa2dedc1') version('6.0.1', '91abf52fe5033bd419ffe2842ebe7af9') depends_on('lua@5.2:') depends_on('lua-luaposix') depends_on('lua-luafilesystem') + parallel = False + + def setup_environment(self, spack_env, run_env): + stage_lua_path = join_path(self.stage.path, 'Lmod-{version}', 'src', '?.lua') + spack_env.append_path('LUA_PATH', stage_lua_path.format(version=self.version), separator=';') + def install(self, spec, prefix): configure('--prefix=%s' % prefix) make('install') -- cgit v1.2.3-70-g09d2 From 564483936f32abfd5ee79dea6263af4bd6e9bb9d Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 8 Jun 2016 16:33:49 +0200 Subject: qa : fixed flake8 issues --- lib/spack/spack/version.py | 147 +++++++-------------- var/spack/repos/builtin/packages/lmod/package.py | 8 +- .../builtin/packages/lua-luafilesystem/package.py | 19 ++- var/spack/repos/builtin/packages/lua/package.py | 5 +- 4 files changed, 68 insertions(+), 111 deletions(-) diff --git a/lib/spack/spack/version.py b/lib/spack/spack/version.py index d86bcef3e0..858d581472 100644 --- a/lib/spack/spack/version.py +++ b/lib/spack/spack/version.py @@ -43,16 +43,16 @@ be called on any of the types:: intersection concrete """ -import os -import sys import re from bisect import bisect_left from functools import wraps + from functools_backport import total_ordering # Valid version characters VALID_VERSION = r'[A-Za-z0-9_.-]' + def int_if_int(string): """Convert a string to int if possible. Otherwise, return a string.""" try: @@ -62,10 +62,11 @@ def int_if_int(string): def coerce_versions(a, b): - """Convert both a and b to the 'greatest' type between them, in this order: + """ + Convert both a and b to the 'greatest' type between them, in this order: Version < VersionRange < VersionList - This is used to simplify comparison operations below so that we're always - comparing things that are of the same type. + This is used to simplify comparison operations below so that we're always + comparing things that are of the same type. """ order = (Version, VersionRange, VersionList) ta, tb = type(a), type(b) @@ -105,6 +106,7 @@ def coerced(method): @total_ordering class Version(object): """Class to represent versions""" + def __init__(self, string): string = str(string) @@ -142,15 +144,12 @@ class Version(object): """ return '.'.join(str(x) for x in self[:index]) - def lowest(self): return self - def highest(self): return self - @coerced def satisfies(self, other): """A Version 'satisfies' another if it is at least as specific and has a @@ -158,11 +157,10 @@ class Version(object): gcc@4.7 so that when a user asks to build with gcc@4.7, we can find a suitable compiler. """ - nself = len(self.version) + nself = len(self.version) nother = len(other.version) return nother <= nself and self.version[:nother] == other.version - def wildcard(self): """Create a regex that will match variants of this version string.""" def a_or_n(seg): @@ -192,28 +190,22 @@ class Version(object): wc += '(?:[a-z]|alpha|beta)?)?' * (len(segments) - 1) return wc - def __iter__(self): return iter(self.version) - def __getitem__(self, idx): return tuple(self.version[idx]) - def __repr__(self): return self.string - def __str__(self): return self.string - @property def concrete(self): return self - @coerced def __lt__(self, other): """Version comparison is designed for consistency with the way RPM @@ -246,28 +238,23 @@ class Version(object): # If the common prefix is equal, the one with more segments is bigger. return len(self.version) < len(other.version) - @coerced def __eq__(self, other): return (other is not None and type(other) == Version and self.version == other.version) - def __ne__(self, other): return not (self == other) - def __hash__(self): return hash(self.version) - @coerced def __contains__(self, other): if other is None: return False return other.version[:len(self.version)] == self.version - def is_predecessor(self, other): """True if the other version is the immediate predecessor of this one. That is, NO versions v exist such that: @@ -280,16 +267,13 @@ class Version(object): ol = other.version[-1] return type(sl) == int and type(ol) == int and (ol - sl == 1) - def is_successor(self, other): return other.is_predecessor(self) - @coerced def overlaps(self, other): return self in other or other in self - @coerced def union(self, other): if self == other or other in self: @@ -299,7 +283,6 @@ class Version(object): else: return VersionList([self, other]) - @coerced def intersection(self, other): if self == other: @@ -310,6 +293,7 @@ class Version(object): @total_ordering class VersionRange(object): + def __init__(self, start, end): if isinstance(start, basestring): start = Version(start) @@ -321,15 +305,12 @@ class VersionRange(object): if start and end and end < start: raise ValueError("Invalid Version range: %s" % self) - def lowest(self): return self.start - def highest(self): return self.end - @coerced def __lt__(self, other): """Sort VersionRanges lexicographically so that they are ordered first @@ -342,28 +323,24 @@ class VersionRange(object): s, o = self, other if s.start != o.start: - return s.start is None or (o.start is not None and s.start < o.start) + return s.start is None or (o.start is not None and s.start < o.start) # NOQA: ignore=E501 return (s.end != o.end and o.end is None or (s.end is not None and s.end < o.end)) - @coerced def __eq__(self, other): return (other is not None and type(other) == VersionRange and self.start == other.start and self.end == other.end) - def __ne__(self, other): return not (self == other) - @property def concrete(self): return self.start if self.start == self.end else None - @coerced def __contains__(self, other): if other is None: @@ -384,57 +361,55 @@ class VersionRange(object): other.end in self.end))) return in_upper - @coerced def satisfies(self, other): - """A VersionRange satisfies another if some version in this range - would satisfy some version in the other range. To do this it must - either: - a) Overlap with the other range - b) The start of this range satisfies the end of the other range. - - This is essentially the same as overlaps(), but overlaps assumes - that its arguments are specific. That is, 4.7 is interpreted as - 4.7.0.0.0.0... . This funciton assumes that 4.7 woudl be satisfied - by 4.7.3.5, etc. - - Rationale: - If a user asks for gcc@4.5:4.7, and a package is only compatible with - gcc@4.7.3:4.8, then that package should be able to build under the - constraints. Just using overlaps() would not work here. - - Note that we don't need to check whether the end of this range - would satisfy the start of the other range, because overlaps() - already covers that case. - - Note further that overlaps() is a symmetric operation, while - satisfies() is not. + """ + A VersionRange satisfies another if some version in this range + would satisfy some version in the other range. To do this it must + either: + a) Overlap with the other range + b) The start of this range satisfies the end of the other range. + + This is essentially the same as overlaps(), but overlaps assumes + that its arguments are specific. That is, 4.7 is interpreted as + 4.7.0.0.0.0... . This funciton assumes that 4.7 woudl be satisfied + by 4.7.3.5, etc. + + Rationale: + If a user asks for gcc@4.5:4.7, and a package is only compatible with + gcc@4.7.3:4.8, then that package should be able to build under the + constraints. Just using overlaps() would not work here. + + Note that we don't need to check whether the end of this range + would satisfy the start of the other range, because overlaps() + already covers that case. + + Note further that overlaps() is a symmetric operation, while + satisfies() is not. """ return (self.overlaps(other) or # if either self.start or other.end are None, then this can't # satisfy, or overlaps() would've taken care of it. self.start and other.end and self.start.satisfies(other.end)) - @coerced def overlaps(self, other): - return ((self.start == None or other.end is None or + return ((self.start is None or other.end is None or self.start <= other.end or other.end in self.start or self.start in other.end) and - (other.start is None or self.end == None or + (other.start is None or self.end is None or other.start <= self.end or other.start in self.end or self.end in other.start)) - @coerced def union(self, other): if not self.overlaps(other): if (self.end is not None and other.start is not None and - self.end.is_predecessor(other.start)): + self.end.is_predecessor(other.start)): return VersionRange(self.start, other.end) if (other.end is not None and self.start is not None and - other.end.is_predecessor(self.start)): + other.end.is_predecessor(self.start)): return VersionRange(other.start, self.end) return VersionList([self, other]) @@ -453,13 +428,12 @@ class VersionRange(object): else: end = self.end # TODO: See note in intersection() about < and in discrepancy. - if not other.end in self.end: + if other.end not in self.end: if end in other.end or other.end > self.end: end = other.end return VersionRange(start, end) - @coerced def intersection(self, other): if self.overlaps(other): @@ -481,7 +455,7 @@ class VersionRange(object): # 1.6 < 1.6.5 = True (lexicographic) # Should 1.6 NOT be less than 1.6.5? Hm. # Here we test (not end in other.end) first to avoid paradox. - if other.end is not None and not end in other.end: + if other.end is not None and end not in other.end: if other.end < end or other.end in end: end = other.end @@ -490,15 +464,12 @@ class VersionRange(object): else: return VersionList() - def __hash__(self): return hash((self.start, self.end)) - def __repr__(self): return self.__str__() - def __str__(self): out = "" if self.start: @@ -512,6 +483,7 @@ class VersionRange(object): @total_ordering class VersionList(object): """Sorted, non-redundant list of Versions and VersionRanges.""" + def __init__(self, vlist=None): self.versions = [] if vlist is not None: @@ -526,7 +498,6 @@ class VersionList(object): for v in vlist: self.add(ver(v)) - def add(self, version): if type(version) in (Version, VersionRange): # This normalizes single-value version ranges. @@ -535,9 +506,9 @@ class VersionList(object): i = bisect_left(self, version) - while i-1 >= 0 and version.overlaps(self[i-1]): - version = version.union(self[i-1]) - del self.versions[i-1] + while i - 1 >= 0 and version.overlaps(self[i - 1]): + version = version.union(self[i - 1]) + del self.versions[i - 1] i -= 1 while i < len(self) and version.overlaps(self[i]): @@ -553,7 +524,6 @@ class VersionList(object): else: raise TypeError("Can't add %s to VersionList" % type(version)) - @property def concrete(self): if len(self) == 1: @@ -561,11 +531,9 @@ class VersionList(object): else: return None - def copy(self): return VersionList(self) - def lowest(self): """Get the lowest version in the list.""" if not self: @@ -573,7 +541,6 @@ class VersionList(object): else: return self[0].lowest() - def highest(self): """Get the highest version in the list.""" if not self: @@ -581,7 +548,6 @@ class VersionList(object): else: return self[-1].highest() - @coerced def overlaps(self, other): if not other or not self: @@ -597,14 +563,12 @@ class VersionList(object): o += 1 return False - def to_dict(self): """Generate human-readable dict for YAML.""" if self.concrete: - return { 'version' : str(self[0]) } + return {'version': str(self[0])} else: - return { 'versions' : [str(v) for v in self] } - + return {'versions': [str(v) for v in self]} @staticmethod def from_dict(dictionary): @@ -616,7 +580,6 @@ class VersionList(object): else: raise ValueError("Dict must have 'version' or 'versions' in it.") - @coerced def satisfies(self, other, strict=False): """A VersionList satisfies another if some version in the list @@ -644,20 +607,17 @@ class VersionList(object): o += 1 return False - @coerced def update(self, other): for v in other.versions: self.add(v) - @coerced def union(self, other): result = self.copy() result.update(other) return result - @coerced def intersection(self, other): # TODO: make this faster. This is O(n^2). @@ -667,7 +627,6 @@ class VersionList(object): result.add(s.intersection(o)) return result - @coerced def intersect(self, other): """Intersect this spec's list with other. @@ -689,50 +648,40 @@ class VersionList(object): if i == 0: if version not in self[0]: return False - elif all(version not in v for v in self[i-1:]): + elif all(version not in v for v in self[i - 1:]): return False return True - def __getitem__(self, index): return self.versions[index] - def __iter__(self): return iter(self.versions) - def __reversed__(self): return reversed(self.versions) - def __len__(self): return len(self.versions) - @coerced def __eq__(self, other): return other is not None and self.versions == other.versions - def __ne__(self, other): return not (self == other) - @coerced def __lt__(self, other): return other is not None and self.versions < other.versions - def __hash__(self): return hash(tuple(self.versions)) - def __str__(self): return ",".join(str(v) for v in self.versions) - def __repr__(self): return str(self.versions) @@ -741,7 +690,7 @@ def _string_to_version(string): """Converts a string to a Version, VersionList, or VersionRange. This is private. Client code should use ver(). """ - string = string.replace(' ','') + string = string.replace(' ', '') if ',' in string: return VersionList(string.split(',')) @@ -749,7 +698,7 @@ def _string_to_version(string): elif ':' in string: s, e = string.split(':') start = Version(s) if s else None - end = Version(e) if e else None + end = Version(e) if e else None return VersionRange(start, end) else: diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py index e50c2cfc4b..7d75866d52 100644 --- a/var/spack/repos/builtin/packages/lmod/package.py +++ b/var/spack/repos/builtin/packages/lmod/package.py @@ -34,7 +34,7 @@ class Lmod(Package): variable. Modulefiles for Library packages provide environment variables that specify where the library and header files can be found. """ - homepage = 'https://www.tacc.utexas.edu/research-development/tacc-projects/lmod' + homepage = 'https://www.tacc.utexas.edu/research-development/tacc-projects/lmod' # NOQA: ignore=E501 url = 'https://github.com/TACC/Lmod/archive/6.4.1.tar.gz' version('6.4.1', '7978ba777c8aa41a4d8c05fec5f780f4') @@ -48,8 +48,10 @@ class Lmod(Package): parallel = False def setup_environment(self, spack_env, run_env): - stage_lua_path = join_path(self.stage.path, 'Lmod-{version}', 'src', '?.lua') - spack_env.append_path('LUA_PATH', stage_lua_path.format(version=self.version), separator=';') + stage_lua_path = join_path( + self.stage.path, 'Lmod-{version}', 'src', '?.lua') + spack_env.append_path('LUA_PATH', stage_lua_path.format( + version=self.version), separator=';') def install(self, spec, prefix): configure('--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py index 14278bbe72..a61b9dd675 100644 --- a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py +++ b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py @@ -27,11 +27,13 @@ from spack import * class LuaLuafilesystem(Package): """ - LuaFileSystem is a Lua library developed to complement the set of functions related to file - systems offered by the standard Lua distribution. + LuaFileSystem is a Lua library developed to complement the set of + functions related to file systems offered by the standard Lua distribution. - LuaFileSystem offers a portable way to access the underlying directory structure and file attributes. LuaFileSystem - is free software and uses the same license as Lua 5.1 + LuaFileSystem offers a portable way to access the underlying directory + structure and file attributes. + + LuaFileSystem is free software and uses the same license as Lua 5.1 """ homepage = 'http://keplerproject.github.io/luafilesystem' url = 'https://github.com/keplerproject/luafilesystem/archive/v_1_6_3.tar.gz' @@ -41,6 +43,9 @@ class LuaLuafilesystem(Package): extends('lua') def install(self, spec, prefix): - version = self.spec.version - rockspec_format = join_path(self.stage.path, 'luafilesystem-v_{version.underscored}', 'rockspecs', 'luafilesystem-{version.dotted}-1.rockspec') - luarocks('--tree=' + prefix, 'install', rockspec_format.format(version=self.spec.version)) \ No newline at end of file + rockspec_fmt = join_path(self.stage.path, + 'luafilesystem-v_{version.underscored}', + 'rockspecs', + 'luafilesystem-{version.dotted}-1.rockspec') + luarocks('--tree=' + prefix, 'install', + rockspec_fmt.format(version=self.spec.version)) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 320e25899e..8ce4a7b94d 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -57,7 +57,7 @@ class Lua(Package): placement='luarocks') def install(self, spec, prefix): - if spec.satisfies("arch=darwin-i686") or spec.satisfies("arch=darwin-x86_64"): + if spec.satisfies("arch=darwin-i686") or spec.satisfies("arch=darwin-x86_64"): # NOQA: ignore=E501 target = 'macosx' else: target = 'linux' @@ -156,4 +156,5 @@ class Lua(Package): """ # Lua extension builds can have lua and luarocks executable functions module.lua = Executable(join_path(self.spec.prefix.bin, 'lua')) - module.luarocks = Executable(join_path(self.spec.prefix.bin, 'luarocks')) + module.luarocks = Executable( + join_path(self.spec.prefix.bin, 'luarocks')) -- cgit v1.2.3-70-g09d2 From 2d21693b9d98219db29eac4ceb9163f32aaf51e4 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Wed, 8 Jun 2016 17:09:13 +0200 Subject: Missing file to patch mumps --- .../builtin/packages/mumps/mumps-shared.patch | 119 +++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mumps/mumps-shared.patch diff --git a/var/spack/repos/builtin/packages/mumps/mumps-shared.patch b/var/spack/repos/builtin/packages/mumps/mumps-shared.patch new file mode 100644 index 0000000000..592f48037c --- /dev/null +++ b/var/spack/repos/builtin/packages/mumps/mumps-shared.patch @@ -0,0 +1,119 @@ +diff -Naur MUMPS_5.0.1/libseq/Makefile MUMPS_5.0.1.new/libseq/Makefile +--- MUMPS_5.0.1/libseq/Makefile 2015-07-23 19:08:32.000000000 +0200 ++++ MUMPS_5.0.1.new/libseq/Makefile 2016-06-07 10:41:16.585179151 +0200 +@@ -8,11 +8,15 @@ + + include ../Makefile.inc + +-libmpiseq: libmpiseq$(PLAT)$(LIBEXT) ++libmpiseq: libmpiseq$(PLAT)$(LIBEXT) libmpiseq$(PLAT)$(SHLIBEXT) + + libmpiseq$(PLAT)$(LIBEXT): mpi.o mpic.o elapse.o + $(AR)$@ mpi.o mpic.o elapse.o + $(RANLIB) $@ ++ ++libmpiseq$(PLAT)$(SHLIBEXT): mpi.o mpic.o elapse.o ++ $(FC) $(LDFLAGS) $^ -o libmpiseq$(PLAT)$(SHLIBEXT) ++ + .f.o: + $(FC) $(OPTF) -c $*.f $(OUTF)$*.o + .c.o: +diff -Naur MUMPS_5.0.1/Makefile MUMPS_5.0.1.new/Makefile +--- MUMPS_5.0.1/Makefile 2015-07-23 19:08:29.000000000 +0200 ++++ MUMPS_5.0.1.new/Makefile 2016-06-07 10:50:21.863281217 +0200 +@@ -51,7 +51,7 @@ + dexamples: d + (cd examples ; $(MAKE) d) + +-requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) ++requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT)$(LIBEXT) $(libdir)/libpord$(PLAT)$(SHLIBEXT) + + # dummy MPI library (sequential version) + +@@ -62,16 +62,25 @@ + $(libdir)/libpord$(PLAT)$(LIBEXT): + if [ "$(LPORDDIR)" != "" ] ; then \ + cd $(LPORDDIR); \ +- $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT); \ ++ $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT) PLAT=$(PLAT) SHLIBEXT=$(SHLIBEXT); \ + fi; + if [ "$(LPORDDIR)" != "" ] ; then \ + cp $(LPORDDIR)/libpord$(LIBEXT) $@; \ + fi; + ++$(libdir)/libpord$(PLAT)$(SHLIBEXT): ++ if [ "$(LPORDDIR)" != "" ] ; then \ ++ cd $(LPORDDIR); \ ++ $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT) PLAT=$(PLAT) SHLIBEXT=$(SHLIBEXT) libpord$(PLAT)$(SHLIBEXT); \ ++ fi; ++ if [ "$(LPORDDIR)" != "" ] ; then \ ++ cp $(LPORDDIR)/libpord$(PLAT)$(SHLIBEXT) $@; \ ++ fi; ++ + clean: + (cd src; $(MAKE) clean) + (cd examples; $(MAKE) clean) +- (cd $(libdir); $(RM) *$(PLAT)$(LIBEXT)) ++ (cd $(libdir); $(RM) *$(PLAT)$(LIBEXT) *$(PLAT)$(SHLIBEXT)) + (cd libseq; $(MAKE) clean) + if [ "$(LPORDDIR)" != "" ] ; then \ + cd $(LPORDDIR); $(MAKE) realclean; \ +diff -Naur MUMPS_5.0.1/PORD/lib/Makefile MUMPS_5.0.1.new/PORD/lib/Makefile +--- MUMPS_5.0.1/PORD/lib/Makefile 2015-07-23 19:08:29.000000000 +0200 ++++ MUMPS_5.0.1.new/PORD/lib/Makefile 2016-06-07 10:49:48.889000958 +0200 +@@ -13,7 +13,7 @@ + + OBJS = graph.o gbipart.o gbisect.o ddcreate.o ddbisect.o nestdiss.o \ + multisector.o gelim.o bucket.o tree.o \ +- symbfac.o interface.o sort.o minpriority.o ++ symbfac.o interface.o sort.o minpriority.o + + # Note: numfac.c read.c mapping.c triangular.c matrix.c kernel.c + # were not direcly used by MUMPS and have been removed from the +@@ -24,12 +24,15 @@ + .c.o: + $(CC) $(COPTIONS) -c $*.c $(OUTC)$*.o + +-libpord$(LIBEXT):$(OBJS) ++libpord$(PLAT)$(LIBEXT):$(OBJS) + $(AR)$@ $(OBJS) + $(RANLIB) $@ + ++libpord$(PLAT)$(SHLIBEXT): $(OBJS) ++ $(CC) $(LDFLAGS) $(OBJS) -o libpord$(PLAT)$(SHLIBEXT) ++ + clean: + rm -f *.o + + realclean: +- rm -f *.o libpord.a ++ rm -f *.o libpord$(PLAT)$(SHLIBEXT) libpord$(PLAT)$(LIBEXT) +diff -Naur MUMPS_5.0.1/src/Makefile MUMPS_5.0.1.new/src/Makefile +--- MUMPS_5.0.1/src/Makefile 2015-07-23 19:08:29.000000000 +0200 ++++ MUMPS_5.0.1.new/src/Makefile 2016-06-07 10:40:52.534703722 +0200 +@@ -24,7 +24,10 @@ + include $(topdir)/Makefile.inc + + mumps_lib: $(libdir)/libmumps_common$(PLAT)$(LIBEXT) \ +- $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT) ++ $(libdir)/libmumps_common$(PLAT)$(SHLIBEXT) \ ++ $(libdir)/lib$(ARITH)mumps$(PLAT)$(LIBEXT) \ ++ $(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT) ++ + + OBJS_COMMON_MOD = \ + ana_omp_m.o\ +@@ -162,6 +165,13 @@ + $(AR)$@ $? + $(RANLIB) $@ + ++$(libdir)/libmumps_common$(PLAT)$(SHLIBEXT): $(OBJS_COMMON_MOD) $(OBJS_COMMON_OTHER) ++ $(FC) $(LDFLAGS) $^ -L$(libdir) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS) -o $(libdir)/libmumps_common$(PLAT)$(SHLIBEXT) ++ ++ ++$(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT): $(OBJS_MOD) $(OBJS_OTHER) ++ $(FC) $(LDFLAGS) $^ -L$(libdir) -lmumps_common$(PLAT) $(LORDERINGS) $(LIBS) $(LIBBLAS) $(LIBOTHERS) -o $(libdir)/lib$(ARITH)mumps$(PLAT)$(SHLIBEXT) ++ + # Dependencies between modules: + $(ARITH)mumps_load.o: $(ARITH)mumps_comm_buffer.o \ + $(ARITH)mumps_struc_def.o \ -- cgit v1.2.3-70-g09d2 From 42a10d56905727529065d2c492f4c8dc9e4f73cb Mon Sep 17 00:00:00 2001 From: James Riley Wynne III Date: Wed, 8 Jun 2016 12:43:05 -0400 Subject: Fixes issue #438 --- var/spack/repos/builtin/packages/boost/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 2f2965eb12..6da86d6da4 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -109,6 +109,7 @@ class Boost(Package): variant('multithreaded', default=True, description="Build multi-threaded versions of libraries") variant('singlethreaded', default=True, description="Build single-threaded versions of libraries") variant('icu_support', default=False, description="Include ICU support (for regex/locale libraries)") + variant('graph', default=False, description="Build the Boost Graph library") depends_on('icu', when='+icu_support') depends_on('python', when='+python') @@ -235,6 +236,10 @@ class Boost(Package): withLibs.remove('chrono') if not spec.satisfies('@1.43.0:'): withLibs.remove('random') + + if '+graph' in spec and '+mpi' in spec: + withLibs.remove('graph') + withLibs.append('graph_parallel') # to make Boost find the user-config.jam env['BOOST_BUILD_PATH'] = './' -- cgit v1.2.3-70-g09d2 From 3b71d78f3cddeb1b622b9a49146adadbd1b1d9dc Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Wed, 8 Jun 2016 09:57:56 -0700 Subject: rename URLMirrorFetchStrategy to CacheURLFetchStrategy since it isnt used to manage all mirror URLs - just the cache (the specific behavior that a URL may refer to a stale resource doesn't necessarily apply to mirrors) --- lib/spack/spack/fetch_strategy.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 3221716b91..2607d0a7f4 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -352,15 +352,14 @@ class URLFetchStrategy(FetchStrategy): return "[no url]" -class URLMirrorFetchStrategy(URLFetchStrategy): - """The resource associated with a URL at a mirror may be out of date. - """ +class CacheURLFetchStrategy(URLFetchStrategy): + """The resource associated with a cache URL may be out of date.""" def __init__(self, *args, **kwargs): - super(URLMirrorFetchStrategy, self).__init__(*args, **kwargs) + super(CacheURLFetchStrategy, self).__init__(*args, **kwargs) @_needs_stage def fetch(self): - super(URLMirrorFetchStrategy, self).fetch() + super(CacheURLFetchStrategy, self).fetch() if self.digest: try: self.check() @@ -847,7 +846,7 @@ class FsCache(object): def fetcher(self, targetPath, digest): url = "file://" + join_path(self.root, targetPath) - return URLMirrorFetchStrategy(url, digest) + return CacheURLFetchStrategy(url, digest) class FetchError(spack.error.SpackError): -- cgit v1.2.3-70-g09d2 From 4b9707f8ea3ef947239f6f269aa57849295dd294 Mon Sep 17 00:00:00 2001 From: James Riley Wynne III Date: Wed, 8 Jun 2016 14:36:45 -0400 Subject: Fixed flake8 formatting problems --- var/spack/repos/builtin/packages/boost/package.py | 74 ++++++++++++----------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 6da86d6da4..8a49672824 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -27,7 +27,7 @@ import spack import sys import os -import sys + class Boost(Package): """Boost provides free peer-reviewed portable C++ source @@ -75,23 +75,23 @@ class Boost(Package): version('1.34.0', 'ed5b9291ffad776f8757a916e1726ad0') default_install_libs = set(['atomic', - 'chrono', - 'date_time', - 'filesystem', - 'graph', - 'iostreams', - 'locale', - 'log', - 'math', - 'program_options', - 'random', - 'regex', - 'serialization', - 'signals', - 'system', - 'test', - 'thread', - 'wave']) + 'chrono', + 'date_time', + 'filesystem', + 'graph', + 'iostreams', + 'locale', + 'log', + 'math', + 'program_options', + 'random', + 'regex', + 'serialization', + 'signals', + 'system', + 'test', + 'thread', + 'wave']) # mpi/python are not installed by default because they pull in many # dependencies and/or because there is a great deal of customization @@ -121,12 +121,15 @@ class Boost(Package): patch('boost_11856.patch', when='@1.60.0%gcc@4.4.7') def url_for_version(self, version): - """Handle Boost's weird URLs, which write the version two different ways.""" + """ + Handle Boost's weird URLs, + which write the version two different ways. + """ parts = [str(p) for p in Version(version)] dots = ".".join(parts) underscores = "_".join(parts) - return "http://downloads.sourceforge.net/project/boost/boost/%s/boost_%s.tar.bz2" % ( - dots, underscores) + return "http://downloads.sourceforge.net/project/boost" \ + "/boost/%s/boost_%s.tar.bz2" % (dots, underscores) def determine_toolset(self, spec): if spec.satisfies("arch=darwin-x86_64"): @@ -150,20 +153,20 @@ class Boost(Package): if '+python' in spec: options.append('--with-python=%s' % - join_path(spec['python'].prefix.bin, 'python')) + join_path(spec['python'].prefix.bin, 'python')) with open('user-config.jam', 'w') as f: compiler_wrapper = join_path(spack.build_env_path, 'c++') f.write("using {0} : : {1} ;\n".format(boostToolsetId, - compiler_wrapper)) + compiler_wrapper)) if '+mpi' in spec: f.write('using mpi : %s ;\n' % - join_path(spec['mpi'].prefix.bin, 'mpicxx')) + join_path(spec['mpi'].prefix.bin, 'mpicxx')) if '+python' in spec: f.write('using python : %s : %s ;\n' % - (spec['python'].version, - join_path(spec['python'].prefix.bin, 'python'))) + (spec['python'].version, + join_path(spec['python'].prefix.bin, 'python'))) def determine_b2_options(self, spec, options): if '+debug' in spec: @@ -179,8 +182,7 @@ class Boost(Package): '-s', 'BZIP2_INCLUDE=%s' % spec['bzip2'].prefix.include, '-s', 'BZIP2_LIBPATH=%s' % spec['bzip2'].prefix.lib, '-s', 'ZLIB_INCLUDE=%s' % spec['zlib'].prefix.include, - '-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib, - ]) + '-s', 'ZLIB_LIBPATH=%s' % spec['zlib'].prefix.lib]) linkTypes = ['static'] if '+shared' in spec: @@ -192,7 +194,8 @@ class Boost(Package): if '+singlethreaded' in spec: threadingOpts.append('single') if not threadingOpts: - raise RuntimeError("At least one of {singlethreaded, multithreaded} must be enabled") + raise RuntimeError("""At least one of {singlethreaded, + multithreaded} must be enabled""") options.extend([ 'toolset=%s' % self.determine_toolset(spec), @@ -203,9 +206,9 @@ class Boost(Package): def install(self, spec, prefix): # On Darwin, Boost expects the Darwin libtool. However, one of the - # dependencies may have pulled in Spack's GNU libtool, and these two are - # not compatible. We thus create a symlink to Darwin's libtool and add - # it at the beginning of PATH. + # dependencies may have pulled in Spack's GNU libtool, and these two + # are not compatible. We thus create a symlink to Darwin's libtool + # and add it at the beginning of PATH. if sys.platform == 'darwin': newdir = os.path.abspath('darwin-libtool') mkdirp(newdir) @@ -218,7 +221,8 @@ class Boost(Package): withLibs.append(lib) if not withLibs: # if no libraries are specified for compilation, then you dont have - # to configure/build anything, just copy over to the prefix directory. + # to configure/build anything, just copy over to the prefix + # directory. src = join_path(self.stage.source_path, 'boost') mkdirp(join_path(prefix, 'include')) dst = join_path(prefix, 'include', 'boost') @@ -236,7 +240,6 @@ class Boost(Package): withLibs.remove('chrono') if not spec.satisfies('@1.43.0:'): withLibs.remove('random') - if '+graph' in spec and '+mpi' in spec: withLibs.remove('graph') withLibs.append('graph_parallel') @@ -264,6 +267,7 @@ class Boost(Package): for threadingOpt in threadingOpts: b2('install', 'threading=%s' % threadingOpt, *b2_options) - # The shared libraries are not installed correctly on Darwin; correct this + # The shared libraries are not installed correctly + # on Darwin; correct this if (sys.platform == 'darwin') and ('+shared' in spec): fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-70-g09d2 From 65896ff2ed809776e54f012a622b13a450c64ea6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 8 Jun 2016 14:11:14 -0500 Subject: Add Armadillo and SuperLU packages --- .../repos/builtin/packages/armadillo/package.py | 67 ++++++++++++++++++++++ var/spack/repos/builtin/packages/arpack/package.py | 40 +++++++------ .../repos/builtin/packages/superlu/package.py | 55 ++++++++++++++++++ 3 files changed, 146 insertions(+), 16 deletions(-) create mode 100644 var/spack/repos/builtin/packages/armadillo/package.py create mode 100644 var/spack/repos/builtin/packages/superlu/package.py diff --git a/var/spack/repos/builtin/packages/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py new file mode 100644 index 0000000000..b3e5994e30 --- /dev/null +++ b/var/spack/repos/builtin/packages/armadillo/package.py @@ -0,0 +1,67 @@ +############################################################################## +# 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 Armadillo(Package): + """Armadillo is a high quality linear algebra library (matrix maths) + for the C++ language, aiming towards a good balance between speed and + ease of use.""" + + homepage = "http://arma.sourceforge.net/" + url = "http://sourceforge.net/projects/arma/files/armadillo-7.200.1.tar.xz" + + version('7.200.1', 'ed86d6df0058979e107502e1fe3e469e') + + variant('hdf5', default=False, description='Include HDF5 support') + + depends_on('arpack') + depends_on('blas') + depends_on('lapack') + depends_on('superlu@5.2:') + depends_on('hdf5', when='+hdf5') + + def install(self, spec, prefix): + cmake_args = [ + # ARPACK support + '-DARPACK_LIBRARY={0}/libarpack.a'.format( + spec['arpack'].prefix.lib), + # BLAS support + '-DBLAS_LIBRARY={0}'.format(spec['blas'].blas_shared_lib), + # LAPACK support + '-DLAPACK_LIBRARY={0}'.format(spec['lapack'].lapack_shared_lib), + # SuperLU support + '-DSuperLU_INCLUDE_DIR={0}'.format(spec['superlu'].prefix.include), + '-DSuperLU_LIBRARY={0}/libsuperlu.a'.format( + spec['superlu'].prefix.lib64), + # HDF5 support + '-DDETECT_HDF5={0}'.format('ON' if '+hdf5' in spec else 'OFF') + ] + + cmake_args.extend(std_cmake_args) + cmake('.', *cmake_args) + + make() + make('install') diff --git a/var/spack/repos/builtin/packages/arpack/package.py b/var/spack/repos/builtin/packages/arpack/package.py index 75158776fe..91b5f06a4a 100644 --- a/var/spack/repos/builtin/packages/arpack/package.py +++ b/var/spack/repos/builtin/packages/arpack/package.py @@ -24,12 +24,12 @@ ############################################################################## from spack import * import os -import shutil + class Arpack(Package): """A collection of Fortran77 subroutines designed to solve large scale - eigenvalue problems. - """ + eigenvalue problems.""" + homepage = "http://www.caam.rice.edu/software/ARPACK/" url = "http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz" @@ -39,27 +39,35 @@ class Arpack(Package): depends_on('lapack') def patch(self): - # Filter the cray makefile to make a spack one. - shutil.move('ARMAKES/ARmake.CRAY', 'ARmake.inc') makefile = FileFilter('ARmake.inc') - # Be sure to use Spack F77 wrapper - makefile.filter('^FC.*', 'FC = f77') - makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g') + # Section 1: Paths and Libraries + + # Change the build directory + makefile.filter('^home.*', 'home = %s' % os.getcwd()) + + # Use external BLAS/LAPACK + makefile.filter('^BLASdir.*', + 'BLASdir = %s' % self.spec['blas'].prefix) + makefile.filter('^LAPACKdir.*', + 'LAPACKdir = %s' % self.spec['lapack'].prefix) + + # Do not include the platform in the library name + makefile.filter('^PLAT.*', 'PLAT = ') + makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = $(home)/libarpack.a') - # Set up some variables. - makefile.filter('^PLAT.*', 'PLAT = ') - makefile.filter('^home.*', 'home = %s' % os.getcwd()) - makefile.filter('^BLASdir.*', 'BLASdir = %s' % self.spec['blas'].prefix) - makefile.filter('^LAPACKdir.*', 'LAPACKdir = %s' % self.spec['lapack'].prefix) + # Section 2: Compilers - # build the library in our own prefix. - makefile.filter('^ARPACKLIB.*', 'ARPACKLIB = %s/libarpack.a' % os.getcwd()) + # Be sure to use the Spack compiler wrapper + makefile.filter('^FC.*', 'FC = {0}'.format(os.environ['F77'])) + makefile.filter('^FFLAGS.*', 'FFLAGS = -O2 -g -fPIC') + if not which('ranlib'): + makefile.filter('^RANLIB.*', 'RANLIB = touch') def install(self, spec, prefix): with working_dir('SRC'): make('all') - mkdirp(prefix.lib) + mkdir(prefix.lib) install('libarpack.a', prefix.lib) diff --git a/var/spack/repos/builtin/packages/superlu/package.py b/var/spack/repos/builtin/packages/superlu/package.py new file mode 100644 index 0000000000..91e8693924 --- /dev/null +++ b/var/spack/repos/builtin/packages/superlu/package.py @@ -0,0 +1,55 @@ +############################################################################## +# 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 Superlu(Package): + """SuperLU is a general purpose library for the direct solution of large, + sparse, nonsymmetric systems of linear equations on high performance + machines. SuperLU is designed for sequential machines.""" + + homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu" + url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_5.2.1.tar.gz" + + version('5.2.1', '3a1a9bff20cb06b7d97c46d337504447') + + depends_on('blas') + + def install(self, spec, prefix): + cmake_args = [ + '-DCMAKE_C_FLAGS=-fPIC', + '-DCMAKE_Fortran_FLAGS=-fPIC', + # BLAS support + '-Denable_blaslib=OFF', + '-DBLAS_blas_LIBRARY={0}'.format(spec['blas'].blas_shared_lib) + ] + + cmake_args.extend(std_cmake_args) + + with working_dir('spack-build', create=True): + cmake('..', *cmake_args) + + make() + make('install') -- cgit v1.2.3-70-g09d2 From 7ce08c4216189d747352c1319f921e823785daa8 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 8 Jun 2016 13:51:31 -0600 Subject: Remove last two remaining from external imports --- lib/spack/spack/cmd/repo.py | 2 +- lib/spack/spack/repository.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/cmd/repo.py b/lib/spack/spack/cmd/repo.py index 399237b169..cbd8f4784e 100644 --- a/lib/spack/spack/cmd/repo.py +++ b/lib/spack/spack/cmd/repo.py @@ -26,7 +26,7 @@ import os import re import shutil -from external import argparse +import argparse import llnl.util.tty as tty from llnl.util.filesystem import join_path, mkdirp diff --git a/lib/spack/spack/repository.py b/lib/spack/spack/repository.py index 70134964ad..2c160a5f45 100644 --- a/lib/spack/spack/repository.py +++ b/lib/spack/spack/repository.py @@ -30,7 +30,7 @@ import imp import re import traceback from bisect import bisect_left -from external import yaml +import yaml import llnl.util.tty as tty from llnl.util.filesystem import * -- cgit v1.2.3-70-g09d2 From 4952c4c7def96caef2b47160f8b9e08392ae348d Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 8 Jun 2016 14:22:26 -0600 Subject: Also remove from external from bin/spack --- bin/spack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/spack b/bin/spack index 3544feb10a..dac48437a6 100755 --- a/bin/spack +++ b/bin/spack @@ -77,7 +77,7 @@ import llnl.util.tty as tty from llnl.util.tty.color import * import spack from spack.error import SpackError -from external import argparse +import argparse # Command parsing parser = argparse.ArgumentParser( -- cgit v1.2.3-70-g09d2 From e3ca5e66765d06eca9ec40fed215bd82c4bdd49c Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 8 Jun 2016 16:23:04 -0600 Subject: Add patch to compile pcre with Intel 16.0.3 compiler --- var/spack/repos/builtin/packages/pcre/intel.patch | 12 ++++++++++++ var/spack/repos/builtin/packages/pcre/package.py | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/pcre/intel.patch diff --git a/var/spack/repos/builtin/packages/pcre/intel.patch b/var/spack/repos/builtin/packages/pcre/intel.patch new file mode 100644 index 0000000000..f160f55e1b --- /dev/null +++ b/var/spack/repos/builtin/packages/pcre/intel.patch @@ -0,0 +1,12 @@ +diff -up pcre-8.38/pcrecpp.cc.intel pcre-8.38/pcrecpp.cc +--- pcre-8.38/pcrecpp.cc.intel 2014-09-15 07:48:59.000000000 -0600 ++++ pcre-8.38/pcrecpp.cc 2016-06-08 16:16:56.702721214 -0600 +@@ -66,7 +66,7 @@ Arg RE::no_arg((void*)NULL); + // inclusive test if we ever needed it. (Note that not only the + // __attribute__ syntax, but also __USER_LABEL_PREFIX__, are + // gnu-specific.) +-#if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__) ++#if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__) && !defined(__INTEL_COMPILER) + # define ULP_AS_STRING(x) ULP_AS_STRING_INTERNAL(x) + # define ULP_AS_STRING_INTERNAL(x) #x + # define USER_LABEL_PREFIX_STR ULP_AS_STRING(__USER_LABEL_PREFIX__) diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py index 7a9f3b911d..b75a50736a 100644 --- a/var/spack/repos/builtin/packages/pcre/package.py +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -34,6 +34,8 @@ class Pcre(Package): version('8.36', 'b767bc9af0c20bc9c1fe403b0d41ad97') version('8.38', '00aabbfe56d5a48b270f999b508c5ad2') + patch("intel.patch") + def install(self, spec, prefix): configure("--prefix=%s" % prefix) make() -- cgit v1.2.3-70-g09d2 From 454acf58af0ea22b6f14f7527226234303d40e99 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 8 Jun 2016 16:49:42 -0600 Subject: Add additional blank line for flake8 --- var/spack/repos/builtin/packages/pcre/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py index b75a50736a..8e0f83110e 100644 --- a/var/spack/repos/builtin/packages/pcre/package.py +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Pcre(Package): """The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression -- cgit v1.2.3-70-g09d2 From 2a4d440003c467f34b072d3128ce4869dc5cd5d2 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 8 Jun 2016 19:14:01 -0400 Subject: Add quotes around file name $input_log will expand to file names with special characters (e.g. "@"), thus bash requires quotes. --- lib/spack/env/cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/env/cc b/lib/spack/env/cc index 9758b74f37..a604785904 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -324,8 +324,8 @@ fi if [[ $SPACK_DEBUG == TRUE ]]; then input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.in.log" output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_SHORT_SPEC.out.log" - echo "[$mode] $command $input_command" >> $input_log - echo "[$mode] ${full_command[@]}" >> $output_log + echo "[$mode] $command $input_command" >> "$input_log" + echo "[$mode] ${full_command[@]}" >> "$output_log" fi exec "${full_command[@]}" -- cgit v1.2.3-70-g09d2 From 915115386af09583dc7dfff094b259990179bb4a Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Thu, 9 Jun 2016 18:30:28 -0600 Subject: Package serf also depends on zlib. + Add zlib as a required dependency. + Point scons build system to the spack provided zlib installation. --- var/spack/repos/builtin/packages/serf/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py index 3b1d08889c..7ca72096aa 100644 --- a/var/spack/repos/builtin/packages/serf/package.py +++ b/var/spack/repos/builtin/packages/serf/package.py @@ -36,6 +36,7 @@ class Serf(Package): depends_on('scons') depends_on('expat') depends_on('openssl') + depends_on('zlib') def install(self, spec, prefix): scons = which("scons") @@ -44,8 +45,10 @@ class Serf(Package): options.append('APR=%s' % spec['apr'].prefix) options.append('APU=%s' % spec['apr-util'].prefix) options.append('OPENSSL=%s' % spec['openssl'].prefix) - options.append('LINKFLAGS=-L%s/lib' % spec['expat'].prefix) - options.append('CPPFLAGS=-I%s/include' % spec['expat'].prefix) + options.append('LINKFLAGS=-L%s/lib -L%s/lib' % + ( spec['expat'].prefix, spec['zlib'].prefix )) + options.append('CPPFLAGS=-I%s/include -I%s/include' % + ( spec['expat'].prefix, spec['zlib'].prefix )) scons(*options) scons('install') -- cgit v1.2.3-70-g09d2 From 883f601bca7c6c8f26937b295dadfd2f6a4f023e Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Thu, 9 Jun 2016 19:18:25 -0600 Subject: Fix style issues. --- var/spack/repos/builtin/packages/serf/package.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py index 7ca72096aa..817db68241 100644 --- a/var/spack/repos/builtin/packages/serf/package.py +++ b/var/spack/repos/builtin/packages/serf/package.py @@ -24,8 +24,10 @@ ############################################################################## from spack import * + class Serf(Package): - """Apache Serf - a high performance C-based HTTP client library built upon the Apache Portable Runtime (APR) library""" + """Apache Serf - a high performance C-based HTTP client library + built upon the Apache Portable Runtime (APR) library""" homepage = 'https://serf.apache.org/' url = 'https://archive.apache.org/dist/serf/serf-1.3.8.tar.bz2' @@ -46,9 +48,9 @@ class Serf(Package): options.append('APU=%s' % spec['apr-util'].prefix) options.append('OPENSSL=%s' % spec['openssl'].prefix) options.append('LINKFLAGS=-L%s/lib -L%s/lib' % - ( spec['expat'].prefix, spec['zlib'].prefix )) + (spec['expat'].prefix, spec['zlib'].prefix)) options.append('CPPFLAGS=-I%s/include -I%s/include' % - ( spec['expat'].prefix, spec['zlib'].prefix )) + (spec['expat'].prefix, spec['zlib'].prefix)) scons(*options) scons('install') -- cgit v1.2.3-70-g09d2 From 85502e34f9d8a0a91267247d9b72287012befd0f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 10 Jun 2016 14:35:19 -0500 Subject: CMake knows how to create PIC --- var/spack/repos/builtin/packages/superlu/package.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/superlu/package.py b/var/spack/repos/builtin/packages/superlu/package.py index 91e8693924..c634c1d1ba 100644 --- a/var/spack/repos/builtin/packages/superlu/package.py +++ b/var/spack/repos/builtin/packages/superlu/package.py @@ -39,8 +39,7 @@ class Superlu(Package): def install(self, spec, prefix): cmake_args = [ - '-DCMAKE_C_FLAGS=-fPIC', - '-DCMAKE_Fortran_FLAGS=-fPIC', + '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', # BLAS support '-Denable_blaslib=OFF', '-DBLAS_blas_LIBRARY={0}'.format(spec['blas'].blas_shared_lib) -- cgit v1.2.3-70-g09d2 From 992bcac7949883b74a9250d5835ac6d9de28a6c0 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 10 Jun 2016 16:26:02 -0700 Subject: changed compiler yaml format --- lib/spack/spack/compilers/__init__.py | 34 ++++++------ lib/spack/spack/config.py | 24 +++------ lib/spack/spack/test/config.py | 84 +++++++++++++----------------- lib/spack/spack/test/mock_packages_test.py | 72 +++++++++---------------- lib/spack/spack/yaml_version_check.py | 4 +- 5 files changed, 87 insertions(+), 131 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index d923d77da8..3cf8f2297f 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -73,16 +73,14 @@ def _to_dict(compiler): d = {} d['spec'] = str(compiler.spec) d['paths'] = dict( (attr, getattr(compiler, attr, None)) for attr in _path_instance_vars ) - d['operating_system'] = compiler.operating_system.to_dict() + d['operating_system'] = str(compiler.operating_system) d['modules'] = compiler.modules - if not compiler.alias: - yaml_text = yaml.dump( - d, default_flow_style=True, width=sys.maxint) - sha = hashlib.sha1(yaml_text) - compiler.alias = base64.b32encode(sha.digest()).lower()[:8] + if compiler.alias: + d['alias'] = compiler.alias + return { - compiler.alias: d + 'compiler': d } @@ -91,11 +89,11 @@ def get_compiler_config(scope=None): """ def init_compiler_config(): """Compiler search used when Spack has no compilers.""" - config = {} compilers = find_compilers() + compilers_dict = [] for compiler in compilers: - config.update(_to_dict(compiler)) - spack.config.update_config('compilers', config, scope=scope) + compilers_dict.append(_to_dict(compiler)) + spack.config.update_config('compilers', compilers_dict, scope=scope) config = spack.config.get_config('compilers', scope=scope) # Update the configuration if there are currently no compilers @@ -127,7 +125,7 @@ def add_compilers_to_config(compilers, scope=None): """ compiler_config = get_compiler_config(scope) for compiler in compilers: - compiler_config = _to_dict(compiler) + compiler_config.append(_to_dict(compiler)) spack.config.update_config('compilers', compiler_config, scope) @@ -167,8 +165,8 @@ def all_compilers_config(scope=None): def all_compilers(scope=None): # Return compiler specs from the merged config. - return [spack.spec.CompilerSpec(s['spec']) - for s in all_compilers_config(scope).values()] + return [spack.spec.CompilerSpec(s['compiler']['spec']) + for s in all_compilers_config(scope)] def default_compiler(): @@ -230,11 +228,10 @@ def compilers_for_spec(compiler_spec, scope=None, **kwargs): def get_compilers(cspec): compilers = [] - for aka, cmp in config.items(): - if cmp['spec'] != str(cspec): + for items in config: + if items['compiler']['spec'] != str(cspec): continue - items = cmp - alias = aka + items = items['compiler'] if not ('paths' in items and all(n in items['paths'] for n in _path_instance_vars)): raise InvalidCompilerConfigurationError(cspec) @@ -258,6 +255,9 @@ def compilers_for_spec(compiler_spec, scope=None, **kwargs): else: operating_system = None + + alias = items['alias'] if 'alias' in items else None + flags = {} for f in spack.spec.FlagMap.valid_compiler_flags(): if f in items: diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index ec04c81787..e51016998c 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -146,11 +146,9 @@ section_schemas = { 'additionalProperties': False, 'patternProperties': { 'compilers:?': { # optional colon for overriding site config. - 'type': 'object', - 'default': {}, - 'additionalProperties': False, - 'patternProperties': { - r'\w[\w-]*': { # alias + 'type': 'array', + 'items': { + 'compiler': { 'type': 'object', 'additionalProperties': False, 'required': ['paths', 'spec', 'modules', 'operating_system'], @@ -180,15 +178,10 @@ section_schemas = { {'type' : 'null' }]}, 'ldlibs': { 'anyOf': [ {'type' : 'string' }, {'type' : 'null' }]}}}, - 'spec': { 'type': 'string'},#r'\w[\w-]*@\w[\w-]*' - 'operating_system': { - 'type': 'object', - 'required': ['name', 'version'], - 'additionalProperties': False, - 'properties': { - 'name': {'type': 'string'}, - 'version': {'type': 'string'} - }}, + 'spec': { 'type': 'string'}, + 'operating_system': { 'type': 'string'}, + 'alias': { 'anyOf': [ {'type' : 'string'}, + {'type' : 'null' }]}, 'modules': { 'anyOf': [ {'type' : 'string'}, {'type' : 'null' }, {'type': 'array'}, @@ -591,8 +584,7 @@ def _merge_yaml(dest, source): # Source list is prepended (for precedence) if they_are(list): - seen = set(source) - dest[:] = source + [x for x in dest if x not in seen] + dest[:] = source + [x for x in dest if x not in source] return dest # Source dict is merged into dest. diff --git a/lib/spack/spack/test/config.py b/lib/spack/spack/test/config.py index 8fffc09437..252d77e66b 100644 --- a/lib/spack/spack/test/config.py +++ b/lib/spack/spack/test/config.py @@ -32,8 +32,8 @@ from ordereddict_backport import OrderedDict from spack.test.mock_packages_test import * # Some sample compiler config data -a_comps = { - 'gcc473': { +a_comps = [ + {'compiler': { 'paths': { "cc" : "/gcc473", "cxx": "/g++473", @@ -42,12 +42,9 @@ a_comps = { }, 'modules': None, 'spec': 'gcc@4.7.3', - 'operating_system': { - 'name': 'CNL', - 'version': '10' - } - }, - 'gcc450': { + 'operating_system': 'CNL10' + }}, + {'compiler': { 'paths': { "cc" : "/gcc450", "cxx": "/g++450", @@ -56,12 +53,9 @@ a_comps = { }, 'modules': None, 'spec': 'gcc@4.5.0', - 'operating_system': { - 'name': 'CNL', - 'version': '10' - } - }, - 'clang33': { + 'operating_system': 'CNL10' + }}, + {'compiler': { 'paths': { "cc" : "", "cxx": "", @@ -69,15 +63,12 @@ a_comps = { "fc" : '' }, 'modules': None, 'spec': 'clang@3.3', - 'operating_system': { - 'name': 'CNL', - 'version': '10' - } - } -} - -b_comps = { - 'icc100': { + 'operating_system': 'CNL10' + }} +] + +b_comps = [ + {'compiler': { 'paths': { "cc" : "/icc100", "cxx": "/icp100", @@ -86,12 +77,9 @@ b_comps = { }, 'modules': None, 'spec': 'icc@10.0', - 'operating_system': { - 'name': 'CNL', - 'version': '10' - } - }, - 'icc111': { + 'operating_system': 'CNL10' + }}, + {'compiler': { 'paths': { "cc" : "/icc111", "cxx": "/icp111", @@ -100,12 +88,9 @@ b_comps = { }, 'modules': None, 'spec': 'icc@11.1', - 'operating_system': { - 'name': 'CNL', - 'version': '10' - } - }, - 'clang33': { + 'operating_system': 'CNL10' + }}, + {'compiler': { 'paths': { "cc" : "", "cxx": "", @@ -113,12 +98,9 @@ b_comps = { "fc" : '' }, 'modules': None, 'spec': 'clang@3.3', - 'operating_system': { - 'name': 'CNL', - 'version': '10' - } - } -} + 'operating_system': 'CNL10' + }} +] # Some Sample repo data repos_low = [ "/some/path" ] @@ -143,15 +125,21 @@ class ConfigTest(MockPackagesTest): config = spack.config.get_config('compilers') compiler_list = ['cc', 'cxx', 'f77', 'fc'] param_list = ['modules', 'paths', 'spec', 'operating_system'] - for alias, compiler in config.items(): - if compiler['spec'] in compiler_names: + for compiler in config: + conf = compiler['compiler'] + if conf['spec'] in compiler_names: + comp = None + for c in comps: + if c['compiler']['spec'] == conf['spec']: + comp = c['compiler'] + break + if not comp: + self.fail('Bad config spec') for p in param_list: - expected = comps[alias][p] - actual = config[alias][p] - self.assertEqual(expected, actual) + self.assertEqual(conf[p], comp[p]) for c in compiler_list: - expected = comps[alias]['paths'][c] - actual = config[alias]['paths'][c] + expected = comp['paths'][c] + actual = conf['paths'][c] self.assertEqual(expected, actual) def test_write_list_in_memory(self): diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index 9c586bd8ce..a56bd8ebdc 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -46,132 +46,108 @@ if platform.name == 'linux': mock_compiler_config = """\ compilers: - clang3.3GENLINUX: +- compiler: spec: clang@3.3 - operating_system: - name: {0} - version: '{1}' + operating_system: {0}{1} paths: cc: /path/to/clang cxx: /path/to/clang++ f77: None fc: None modules: 'None' - gcc4.5GENLINUX: +- compiler: spec: gcc@4.5.0 - operating_system: - name: {0} - version: '{1}' + operating_system: {0}{1} paths: cc: /path/to/gcc cxx: /path/to/g++ f77: None fc: None modules: 'None' - clang3.3CNL: +- compiler: spec: clang@3.3 - operating_system: - name: CNL - version: '10' + operating_system: CNL10 paths: cc: /path/to/clang cxx: /path/to/clang++ f77: None fc: None modules: 'None' - clang3.3SUSE: +- compiler: spec: clang@3.3 - operating_system: - name: SuSE - version: '11' + operating_system: SuSE11 paths: cc: /path/to/clang cxx: /path/to/clang++ f77: None fc: None modules: 'None' - clang3.3RHL: +- compiler: spec: clang@3.3 - operating_system: - name: redhat - version: '6' + operating_system: redhat6 paths: cc: /path/to/clang cxx: /path/to/clang++ f77: None fc: None modules: 'None' - clang3.3OSX: +- compiler: spec: clang@3.3 - operating_system: - name: yosemite - version: '10.10' + operating_system: yosemite paths: cc: /path/to/clang cxx: /path/to/clang++ f77: None fc: None modules: 'None' - gcc4.5.0CNL: +- compiler: paths: cc: /path/to/gcc cxx: /path/to/g++ f77: /path/to/gfortran fc: /path/to/gfortran - operating_system: - name: CNL - version: '10' + operating_system: CNL10 spec: gcc@4.5.0 modules: 'None' - gcc4.5.0SUSE: +- compiler: paths: cc: /path/to/gcc cxx: /path/to/g++ f77: /path/to/gfortran fc: /path/to/gfortran - operating_system: - name: SuSE - version: '11' + operating_system: SuSE11 spec: gcc@4.5.0 modules: 'None' - gcc4.5.0RHL: +- compiler: paths: cc: /path/to/gcc cxx: /path/to/g++ f77: /path/to/gfortran fc: /path/to/gfortran - operating_system: - name: redhat - version: '6' + operating_system: redhat6 spec: gcc@4.5.0 modules: 'None' - gcc4.5.0OSX: +- compiler: paths: cc: /path/to/gcc cxx: /path/to/g++ f77: /path/to/gfortran fc: /path/to/gfortran - operating_system: - name: yosemite - version: '10.10' + operating_system: yosemite spec: gcc@4.5.0 modules: 'None' - gcc4.5.0ELCAP: +- compiler: paths: cc: /path/to/gcc cxx: /path/to/g++ f77: /path/to/gfortran fc: /path/to/gfortran - operating_system: - name: elcapitan - version: '10.11' + operating_system: elcapitan spec: gcc@4.5.0 modules: 'None' - clang3.3ELCAP: +- compiler: spec: clang@3.3 - operating_system: - name: elcapitan - version: '10.11' + operating_system: elcapitan paths: cc: /path/to/clang cxx: /path/to/clang++ diff --git a/lib/spack/spack/yaml_version_check.py b/lib/spack/spack/yaml_version_check.py index 7e7bae4edf..5930eefafa 100644 --- a/lib/spack/spack/yaml_version_check.py +++ b/lib/spack/spack/yaml_version_check.py @@ -44,9 +44,9 @@ def check_compiler_yaml_version(): data = syaml.load(f) if data: - compilers = data['compilers'].items() + compilers = data['compilers'] if len(compilers) > 0: - if 'operating_system' not in compilers[0][1]: + if 'operating_system' not in compilers[0]['compiler']: new_file = os.path.join(scope.path, '_old_compilers.yaml') tty.warn('%s in out of date compilers format. ' 'Moved to %s. Spack automatically generate ' -- cgit v1.2.3-70-g09d2 From eb9b00b210b3c58dc1ea4fdf2b59cd1922266561 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 11 Jun 2016 12:44:21 +0200 Subject: versions : added unit tests for the new properties --- lib/spack/spack/test/versions.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/spack/spack/test/versions.py b/lib/spack/spack/test/versions.py index a026403e2e..892073feab 100644 --- a/lib/spack/spack/test/versions.py +++ b/lib/spack/spack/test/versions.py @@ -423,3 +423,11 @@ class VersionsTest(unittest.TestCase): self.assert_satisfies('4.8.0', '4.2, 4.3:4.8') self.assert_satisfies('4.8.2', '4.2, 4.3:4.8') + + def test_formatted_strings(self): + versions = '1.2.3', '1_2_3', '1-2-3' + for item in versions: + v = Version(item) + self.assertEqual(v.dotted, '1.2.3') + self.assertEqual(v.dashed, '1-2-3') + self.assertEqual(v.underscored, '1_2_3') \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 3737169450228643848572ba2605d9f20aba2039 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 11 Jun 2016 12:57:46 +0200 Subject: qa : fixed style and a bug reported by flake8 lib/spack/spack/test/versions.py:313: [F811] redefinition of unused 'test_union_with_containment' from line 306 Flake8 found errors. --- lib/spack/spack/test/versions.py | 48 +++------------------------------------- 1 file changed, 3 insertions(+), 45 deletions(-) diff --git a/lib/spack/spack/test/versions.py b/lib/spack/spack/test/versions.py index 892073feab..4624f901c8 100644 --- a/lib/spack/spack/test/versions.py +++ b/lib/spack/spack/test/versions.py @@ -43,7 +43,6 @@ class VersionsTest(unittest.TestCase): self.assertFalse(a > b) self.assertFalse(a >= b) - def assert_ver_gt(self, a, b): a, b = ver(a), ver(b) self.assertTrue(a > b) @@ -53,7 +52,6 @@ class VersionsTest(unittest.TestCase): self.assertFalse(a < b) self.assertFalse(a <= b) - def assert_ver_eq(self, a, b): a, b = ver(a), ver(b) self.assertFalse(a > b) @@ -63,55 +61,43 @@ class VersionsTest(unittest.TestCase): self.assertFalse(a < b) self.assertTrue(a <= b) - def assert_in(self, needle, haystack): self.assertTrue(ver(needle) in ver(haystack)) - def assert_not_in(self, needle, haystack): self.assertFalse(ver(needle) in ver(haystack)) - def assert_canonical(self, canonical_list, version_list): self.assertEqual(ver(canonical_list), ver(version_list)) - def assert_overlaps(self, v1, v2): self.assertTrue(ver(v1).overlaps(ver(v2))) - def assert_no_overlap(self, v1, v2): self.assertFalse(ver(v1).overlaps(ver(v2))) - def assert_satisfies(self, v1, v2): self.assertTrue(ver(v1).satisfies(ver(v2))) - def assert_does_not_satisfy(self, v1, v2): self.assertFalse(ver(v1).satisfies(ver(v2))) - def check_intersection(self, expected, a, b): self.assertEqual(ver(expected), ver(a).intersection(ver(b))) - def check_union(self, expected, a, b): self.assertEqual(ver(expected), ver(a).union(ver(b))) - def test_two_segments(self): self.assert_ver_eq('1.0', '1.0') self.assert_ver_lt('1.0', '2.0') self.assert_ver_gt('2.0', '1.0') - def test_three_segments(self): self.assert_ver_eq('2.0.1', '2.0.1') self.assert_ver_lt('2.0', '2.0.1') self.assert_ver_gt('2.0.1', '2.0') - def test_alpha(self): # TODO: not sure whether I like this. 2.0.1a is *usually* # TODO: less than 2.0.1, but special-casing it makes version @@ -120,7 +106,6 @@ class VersionsTest(unittest.TestCase): self.assert_ver_gt('2.0.1a', '2.0.1') self.assert_ver_lt('2.0.1', '2.0.1a') - def test_patch(self): self.assert_ver_eq('5.5p1', '5.5p1') self.assert_ver_lt('5.5p1', '5.5p2') @@ -129,7 +114,6 @@ class VersionsTest(unittest.TestCase): self.assert_ver_lt('5.5p1', '5.5p10') self.assert_ver_gt('5.5p10', '5.5p1') - def test_num_alpha_with_no_separator(self): self.assert_ver_lt('10xyz', '10.1xyz') self.assert_ver_gt('10.1xyz', '10xyz') @@ -137,7 +121,6 @@ class VersionsTest(unittest.TestCase): self.assert_ver_lt('xyz10', 'xyz10.1') self.assert_ver_gt('xyz10.1', 'xyz10') - def test_alpha_with_dots(self): self.assert_ver_eq('xyz.4', 'xyz.4') self.assert_ver_lt('xyz.4', '8') @@ -145,30 +128,25 @@ class VersionsTest(unittest.TestCase): self.assert_ver_lt('xyz.4', '2') self.assert_ver_gt('2', 'xyz.4') - def test_nums_and_patch(self): self.assert_ver_lt('5.5p2', '5.6p1') self.assert_ver_gt('5.6p1', '5.5p2') self.assert_ver_lt('5.6p1', '6.5p1') self.assert_ver_gt('6.5p1', '5.6p1') - def test_rc_versions(self): self.assert_ver_gt('6.0.rc1', '6.0') self.assert_ver_lt('6.0', '6.0.rc1') - def test_alpha_beta(self): self.assert_ver_gt('10b2', '10a1') self.assert_ver_lt('10a2', '10b2') - def test_double_alpha(self): self.assert_ver_eq('1.0aa', '1.0aa') self.assert_ver_lt('1.0a', '1.0aa') self.assert_ver_gt('1.0aa', '1.0a') - def test_padded_numbers(self): self.assert_ver_eq('10.0001', '10.0001') self.assert_ver_eq('10.0001', '10.1') @@ -176,24 +154,20 @@ class VersionsTest(unittest.TestCase): self.assert_ver_lt('10.0001', '10.0039') self.assert_ver_gt('10.0039', '10.0001') - def test_close_numbers(self): self.assert_ver_lt('4.999.9', '5.0') self.assert_ver_gt('5.0', '4.999.9') - def test_date_stamps(self): self.assert_ver_eq('20101121', '20101121') self.assert_ver_lt('20101121', '20101122') self.assert_ver_gt('20101122', '20101121') - def test_underscores(self): self.assert_ver_eq('2_0', '2_0') self.assert_ver_eq('2.0', '2_0') self.assert_ver_eq('2_0', '2.0') - def test_rpm_oddities(self): self.assert_ver_eq('1b.fc17', '1b.fc17') self.assert_ver_lt('1b.fc17', '1.fc17') @@ -202,7 +176,6 @@ class VersionsTest(unittest.TestCase): self.assert_ver_gt('1g.fc17', '1.fc17') self.assert_ver_lt('1.fc17', '1g.fc17') - # Stuff below here is not taken from RPM's tests and is # unique to spack def test_version_ranges(self): @@ -214,7 +187,6 @@ class VersionsTest(unittest.TestCase): self.assert_ver_lt('1.2:1.4', '1.5:1.6') self.assert_ver_gt('1.5:1.6', '1.2:1.4') - def test_contains(self): self.assert_in('1.3', '1.2:1.4') self.assert_in('1.2.5', '1.2:1.4') @@ -233,7 +205,6 @@ class VersionsTest(unittest.TestCase): self.assert_in('1.4.1', '1.2.7:1.4') self.assert_not_in('1.4.1', '1.2.7:1.4.0') - def test_in_list(self): self.assert_in('1.2', ['1.5', '1.2', '1.3']) self.assert_in('1.2.5', ['1.5', '1.2:1.3']) @@ -245,7 +216,6 @@ class VersionsTest(unittest.TestCase): self.assert_not_in('1.2.5:1.5', ['1.5', '1.2:1.3']) self.assert_not_in('1.1:1.2.5', ['1.5', '1.2:1.3']) - def test_ranges_overlap(self): self.assert_overlaps('1.2', '1.2') self.assert_overlaps('1.2.1', '1.2.1') @@ -262,7 +232,6 @@ class VersionsTest(unittest.TestCase): self.assert_overlaps(':', '1.6:1.9') self.assert_overlaps('1.6:1.9', ':') - def test_overlap_with_containment(self): self.assert_in('1.6.5', '1.6') self.assert_in('1.6.5', ':1.6') @@ -273,7 +242,6 @@ class VersionsTest(unittest.TestCase): self.assert_not_in(':1.6', '1.6.5') self.assert_in('1.6.5', ':1.6') - def test_lists_overlap(self): self.assert_overlaps('1.2b:1.7,5', '1.6:1.9,1') self.assert_overlaps('1,2,3,4,5', '3,4,5,6,7') @@ -287,7 +255,6 @@ class VersionsTest(unittest.TestCase): self.assert_no_overlap('1,2,3,4,5', '6,7') self.assert_no_overlap('1,2,3,4,5', '6:7') - def test_canonicalize_list(self): self.assert_canonical(['1.2', '1.3', '1.4'], ['1.2', '1.3', '1.3', '1.4']) @@ -316,7 +283,6 @@ class VersionsTest(unittest.TestCase): self.assert_canonical([':'], [':,1.3, 1.3.1,1.3.9,1.4 : 1.5 , 1.3 : 1.4']) - def test_intersection(self): self.check_intersection('2.5', '1.0:2.5', '2.5:3.0') @@ -325,12 +291,11 @@ class VersionsTest(unittest.TestCase): self.check_intersection('0:1', ':', '0:1') self.check_intersection(['1.0', '2.5:2.7'], - ['1.0:2.7'], ['2.5:3.0','1.0']) + ['1.0:2.7'], ['2.5:3.0', '1.0']) self.check_intersection(['2.5:2.7'], - ['1.1:2.7'], ['2.5:3.0','1.0']) + ['1.1:2.7'], ['2.5:3.0', '1.0']) self.check_intersection(['0:1'], [':'], ['0:1']) - def test_intersect_with_containment(self): self.check_intersection('1.6.5', '1.6.5', ':1.6') self.check_intersection('1.6.5', ':1.6', '1.6.5') @@ -338,7 +303,6 @@ class VersionsTest(unittest.TestCase): self.check_intersection('1.6:1.6.5', ':1.6.5', '1.6') self.check_intersection('1.6:1.6.5', '1.6', ':1.6.5') - def test_union_with_containment(self): self.check_union(':1.6', '1.6.5', ':1.6') self.check_union(':1.6', ':1.6', '1.6.5') @@ -346,8 +310,6 @@ class VersionsTest(unittest.TestCase): self.check_union(':1.6', ':1.6.5', '1.6') self.check_union(':1.6', '1.6', ':1.6.5') - - def test_union_with_containment(self): self.check_union(':', '1.0:', ':2.0') self.check_union('1:4', '1:3', '2:4') @@ -356,7 +318,6 @@ class VersionsTest(unittest.TestCase): # Tests successor/predecessor case. self.check_union('1:4', '1:2', '3:4') - def test_basic_version_satisfaction(self): self.assert_satisfies('4.7.3', '4.7.3') @@ -372,7 +333,6 @@ class VersionsTest(unittest.TestCase): self.assert_does_not_satisfy('4.8', '4.9') self.assert_does_not_satisfy('4', '4.9') - def test_basic_version_satisfaction_in_lists(self): self.assert_satisfies(['4.7.3'], ['4.7.3']) @@ -388,7 +348,6 @@ class VersionsTest(unittest.TestCase): self.assert_does_not_satisfy(['4.8'], ['4.9']) self.assert_does_not_satisfy(['4'], ['4.9']) - def test_version_range_satisfaction(self): self.assert_satisfies('4.7b6', '4.3:4.7') self.assert_satisfies('4.3.0', '4.3:4.7') @@ -400,7 +359,6 @@ class VersionsTest(unittest.TestCase): self.assert_satisfies('4.7b6', '4.3:4.7') self.assert_does_not_satisfy('4.8.0', '4.3:4.7') - def test_version_range_satisfaction_in_lists(self): self.assert_satisfies(['4.7b6'], ['4.3:4.7']) self.assert_satisfies(['4.3.0'], ['4.3:4.7']) @@ -430,4 +388,4 @@ class VersionsTest(unittest.TestCase): v = Version(item) self.assertEqual(v.dotted, '1.2.3') self.assertEqual(v.dashed, '1-2-3') - self.assertEqual(v.underscored, '1_2_3') \ No newline at end of file + self.assertEqual(v.underscored, '1_2_3') -- cgit v1.2.3-70-g09d2 From 6c0ea77d1d5e349329ad36aecaadff13c0ccf6c4 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 11 Jun 2016 15:36:43 -0500 Subject: Add list_url for older versions. --- var/spack/repos/builtin/packages/r-packrat/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py index c9b02a284e..1fa62da5d4 100644 --- a/var/spack/repos/builtin/packages/r-packrat/package.py +++ b/var/spack/repos/builtin/packages/r-packrat/package.py @@ -30,7 +30,8 @@ class RPackrat(Package): and reproducible way.""" homepage = 'https://github.com/rstudio/packrat/' - url = "https://cran.r-project.org/src/contrib/packrat_0.4.7-1.tar.gz" + url = "https://cran.r-project.org/src/contrib/packrat_0.4.7-1.tar.gz" + list_url = 'https://cran.r-project.org/src/contrib/Archive/packrat' version('0.4.7-1', '80c2413269b292ade163a70ba5053e84') -- cgit v1.2.3-70-g09d2 From 953b65abccf392e2a565fe9c1b3c1101f0cb5b66 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 11 Jun 2016 16:41:39 -0400 Subject: Do not pass "/usr" or "/usr/local" as path to configure --- var/spack/repos/builtin/packages/openmpi/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 4e465e1784..0638628a6c 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -142,7 +142,7 @@ class Openmpi(Package): ]) if '+verbs' in spec: path = _verbs_dir() - if path is not None: + if path is not None and path not in ('/usr', '/usr/local'): config_args.append('--with-%s=%s' % (self.verbs, path)) else: config_args.append('--with-%s' % self.verbs) -- cgit v1.2.3-70-g09d2 From 0e9f8bd38d4d660db2a03d235535d2d964a7ddec Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 11 Jun 2016 15:53:28 -0500 Subject: Add list_url for old versions. --- var/spack/repos/builtin/packages/r-R6/package.py | 3 ++- var/spack/repos/builtin/packages/r-curl/package.py | 3 ++- var/spack/repos/builtin/packages/r-devtools/package.py | 3 ++- var/spack/repos/builtin/packages/r-digest/package.py | 3 ++- var/spack/repos/builtin/packages/r-git2r/package.py | 3 ++- var/spack/repos/builtin/packages/r-httr/package.py | 3 ++- var/spack/repos/builtin/packages/r-jsonlite/package.py | 3 ++- var/spack/repos/builtin/packages/r-memoise/package.py | 3 ++- var/spack/repos/builtin/packages/r-mime/package.py | 3 ++- var/spack/repos/builtin/packages/r-openssl/package.py | 3 ++- var/spack/repos/builtin/packages/r-rstudioapi/package.py | 3 ++- var/spack/repos/builtin/packages/r-whisker/package.py | 3 ++- var/spack/repos/builtin/packages/r-withr/package.py | 3 ++- 13 files changed, 26 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-R6/package.py b/var/spack/repos/builtin/packages/r-R6/package.py index 30f489b3fd..0b75888e79 100644 --- a/var/spack/repos/builtin/packages/r-R6/package.py +++ b/var/spack/repos/builtin/packages/r-R6/package.py @@ -34,7 +34,8 @@ class RR6(Package): classes are defined in different packages.""" homepage = "https://github.com/wch/R6/" - url = "https://cran.r-project.org/src/contrib/R6_2.1.2.tar.gz" + url = "https://cran.r-project.org/src/contrib/R6_2.1.2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/R6" version('2.1.2', 'b6afb9430e48707be87638675390e457') diff --git a/var/spack/repos/builtin/packages/r-curl/package.py b/var/spack/repos/builtin/packages/r-curl/package.py index 23d75880a7..c6e8f22a94 100644 --- a/var/spack/repos/builtin/packages/r-curl/package.py +++ b/var/spack/repos/builtin/packages/r-curl/package.py @@ -37,7 +37,8 @@ class RCurl(Package): package with http specific tools and logic.""" homepage = "https://github.com/jeroenooms/curl" - url = "https://cran.r-project.org/src/contrib/curl_0.9.7.tar.gz" + url = "https://cran.r-project.org/src/contrib/curl_0.9.7.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RCurl" version('0.9.7', 'a101f7de948cb828fef571c730f39217') diff --git a/var/spack/repos/builtin/packages/r-devtools/package.py b/var/spack/repos/builtin/packages/r-devtools/package.py index 5c73eab936..5f0b7b8779 100644 --- a/var/spack/repos/builtin/packages/r-devtools/package.py +++ b/var/spack/repos/builtin/packages/r-devtools/package.py @@ -29,7 +29,8 @@ class RDevtools(Package): """Collection of package development tools.""" homepage = "https://github.com/hadley/devtools" - url = "https://cran.r-project.org/src/contrib/devtools_1.11.1.tar.gz" + url = "https://cran.r-project.org/src/contrib/devtools_1.11.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/devtools" version('1.11.1', '242672ee27d24dddcbdaac88c586b6c2') diff --git a/var/spack/repos/builtin/packages/r-digest/package.py b/var/spack/repos/builtin/packages/r-digest/package.py index a42e82f1ae..1d11afb139 100644 --- a/var/spack/repos/builtin/packages/r-digest/package.py +++ b/var/spack/repos/builtin/packages/r-digest/package.py @@ -44,7 +44,8 @@ class RDigest(Package): used.""" homepage = "http://dirk.eddelbuettel.com/code/digest.html" - url = "https://cran.r-project.org/src/contrib/digest_0.6.9.tar.gz" + url = "https://cran.r-project.org/src/contrib/digest_0.6.9.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/digest" version('0.6.9', '48048ce6c466bdb124716e45ba4a0e83') diff --git a/var/spack/repos/builtin/packages/r-git2r/package.py b/var/spack/repos/builtin/packages/r-git2r/package.py index 272dcbad93..1f08379d6e 100644 --- a/var/spack/repos/builtin/packages/r-git2r/package.py +++ b/var/spack/repos/builtin/packages/r-git2r/package.py @@ -31,7 +31,8 @@ class RGit2r(Package): data and running some basic 'Git' commands.""" homepage = "https://github.com/ropensci/git2r" - url = "https://cran.r-project.org/src/contrib/git2r_0.15.0.tar.gz" + url = "https://cran.r-project.org/src/contrib/git2r_0.15.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/git2r" version('0.15.0', '57658b3298f9b9aadc0dd77b4ef6a1e1') diff --git a/var/spack/repos/builtin/packages/r-httr/package.py b/var/spack/repos/builtin/packages/r-httr/package.py index 0f379512a5..77ec34ab03 100644 --- a/var/spack/repos/builtin/packages/r-httr/package.py +++ b/var/spack/repos/builtin/packages/r-httr/package.py @@ -31,7 +31,8 @@ class RHttr(Package): request components (authenticate(), add_headers() and so on).""" homepage = "https://github.com/hadley/httr" - url = "https://cran.r-project.org/src/contrib/httr_1.1.0.tar.gz" + url = "https://cran.r-project.org/src/contrib/httr_1.1.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/httr" version('1.1.0', '5ffbbc5c2529e49f00aaa521a2b35600') diff --git a/var/spack/repos/builtin/packages/r-jsonlite/package.py b/var/spack/repos/builtin/packages/r-jsonlite/package.py index 777506b984..6e231ed345 100644 --- a/var/spack/repos/builtin/packages/r-jsonlite/package.py +++ b/var/spack/repos/builtin/packages/r-jsonlite/package.py @@ -38,7 +38,8 @@ class RJsonlite(Package): use with dynamic data in systems and applications.""" homepage = "https://github.com/jeroenooms/jsonlite" - url = "https://cran.r-project.org/src/contrib/jsonlite_0.9.21.tar.gz" + url = "https://cran.r-project.org/src/contrib/jsonlite_0.9.21.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/jsonlite" version('0.9.21', '4fc382747f88a79ff0718a0d06bed45d') diff --git a/var/spack/repos/builtin/packages/r-memoise/package.py b/var/spack/repos/builtin/packages/r-memoise/package.py index ca74ab02a2..6a0fb78650 100644 --- a/var/spack/repos/builtin/packages/r-memoise/package.py +++ b/var/spack/repos/builtin/packages/r-memoise/package.py @@ -30,7 +30,8 @@ class RMemoise(Package): same arguments it returns the pre-computed value.""" homepage = "https://github.com/hadley/memoise" - url = "https://cran.r-project.org/src/contrib/memoise_1.0.0.tar.gz" + url = "https://cran.r-project.org/src/contrib/memoise_1.0.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/memoise" version('1.0.0', 'd31145292e2a88ae9a504cab1602e4ac') diff --git a/var/spack/repos/builtin/packages/r-mime/package.py b/var/spack/repos/builtin/packages/r-mime/package.py index ac52d785b1..fb079f44c5 100644 --- a/var/spack/repos/builtin/packages/r-mime/package.py +++ b/var/spack/repos/builtin/packages/r-mime/package.py @@ -30,7 +30,8 @@ class RMime(Package): from /etc/mime.types in UNIX-type systems.""" homepage = "https://github.com/yihui/mime" - url = "https://cran.r-project.org/src/contrib/mime_0.4.tar.gz" + url = "https://cran.r-project.org/src/contrib/mime_0.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/mime" version('0.4', '789cb33e41db2206c6fc7c3e9fbc2c02') diff --git a/var/spack/repos/builtin/packages/r-openssl/package.py b/var/spack/repos/builtin/packages/r-openssl/package.py index fd6ad84aa3..3e77923d76 100644 --- a/var/spack/repos/builtin/packages/r-openssl/package.py +++ b/var/spack/repos/builtin/packages/r-openssl/package.py @@ -38,7 +38,8 @@ class ROpenssl(Package): calculations on large multibyte integers.""" homepage = "https://github.com/jeroenooms/openssl#readme" - url = "https://cran.r-project.org/src/contrib/openssl_0.9.4.tar.gz" + url = "https://cran.r-project.org/src/contrib/openssl_0.9.4.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/openssl" version('0.9.4', '82a890e71ed0e74499878bedacfb8ccb') diff --git a/var/spack/repos/builtin/packages/r-rstudioapi/package.py b/var/spack/repos/builtin/packages/r-rstudioapi/package.py index 83424392c9..0ef2d9b987 100644 --- a/var/spack/repos/builtin/packages/r-rstudioapi/package.py +++ b/var/spack/repos/builtin/packages/r-rstudioapi/package.py @@ -30,7 +30,8 @@ class RRstudioapi(Package): messages when it's not.""" homepage = "https://cran.r-project.org/web/packages/rstudioapi/index.html" - url = "https://cran.r-project.org/src/contrib/rstudioapi_0.5.tar.gz" + url = "https://cran.r-project.org/src/contrib/rstudioapi_0.5.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/rstudioapi" version('0.5', '6ce1191da74e7bcbf06b61339486b3ba') diff --git a/var/spack/repos/builtin/packages/r-whisker/package.py b/var/spack/repos/builtin/packages/r-whisker/package.py index f534568ec7..f338d150f1 100644 --- a/var/spack/repos/builtin/packages/r-whisker/package.py +++ b/var/spack/repos/builtin/packages/r-whisker/package.py @@ -30,7 +30,8 @@ class RWhisker(Package): including R""" homepage = "http://github.com/edwindj/whisker" - url = "https://cran.r-project.org/src/contrib/whisker_0.3-2.tar.gz" + url = "https://cran.r-project.org/src/contrib/whisker_0.3-2.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/whisker" version('0.3-2', 'c4b9bf9a22e69ce003fe68663ab5e8e6') diff --git a/var/spack/repos/builtin/packages/r-withr/package.py b/var/spack/repos/builtin/packages/r-withr/package.py index a9f0cb600f..5ce7437c84 100644 --- a/var/spack/repos/builtin/packages/r-withr/package.py +++ b/var/spack/repos/builtin/packages/r-withr/package.py @@ -32,7 +32,8 @@ class RWithr(Package): dependencies to provide access to these functions.""" homepage = "http://github.com/jimhester/withr" - url = "https://cran.r-project.org/src/contrib/withr_1.0.1.tar.gz" + url = "https://cran.r-project.org/src/contrib/withr_1.0.1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/withr" version('1.0.1', 'ac38af2c6f74027c9592dd8f0acb7598') -- cgit v1.2.3-70-g09d2 From 59c9816dbf6e8979a6cfcb28ecb244e92f70f2e6 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 11 Jun 2016 16:01:23 -0500 Subject: Make quotations in variables consistent. --- var/spack/repos/builtin/packages/r-packrat/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-packrat/package.py b/var/spack/repos/builtin/packages/r-packrat/package.py index 1fa62da5d4..9520952bd7 100644 --- a/var/spack/repos/builtin/packages/r-packrat/package.py +++ b/var/spack/repos/builtin/packages/r-packrat/package.py @@ -29,9 +29,9 @@ class RPackrat(Package): """Manage the R packages your project depends on in an isolated, portable, and reproducible way.""" - homepage = 'https://github.com/rstudio/packrat/' + homepage = "https://github.com/rstudio/packrat/" url = "https://cran.r-project.org/src/contrib/packrat_0.4.7-1.tar.gz" - list_url = 'https://cran.r-project.org/src/contrib/Archive/packrat' + list_url = "https://cran.r-project.org/src/contrib/Archive/packrat" version('0.4.7-1', '80c2413269b292ade163a70ba5053e84') -- cgit v1.2.3-70-g09d2 From a6681f2d7f0c3ff1a1ec359751710e98d2d52b63 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sun, 12 Jun 2016 15:06:17 +0200 Subject: environment modules : added function to construct them from source files --- lib/spack/spack/environment.py | 76 +++++++++++++++++++++++++++- lib/spack/spack/test/data/sourceme_first.sh | 3 ++ lib/spack/spack/test/data/sourceme_second.sh | 3 ++ lib/spack/spack/test/environment.py | 39 +++++++++++++- 4 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 lib/spack/spack/test/data/sourceme_first.sh create mode 100644 lib/spack/spack/test/data/sourceme_second.sh diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index af642dcc9b..87759b36e1 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -26,7 +26,9 @@ import collections import inspect import os import os.path - +import subprocess +import shlex +import json class NameModifier(object): def __init__(self, name, **kwargs): @@ -240,6 +242,78 @@ class EnvironmentModifications(object): for x in actions: x.execute() + @staticmethod + def from_sourcing_files(*args, **kwargs): + """ + Creates an instance of EnvironmentModifications that, if executed, + has the same effect on the environment as sourcing the files passed as + parameters + + Args: + *args: list of files to be sourced + + Returns: + instance of EnvironmentModifications + """ + env = EnvironmentModifications() + # Check if the files are actually there + if not all(os.path.isfile(file) for file in args): + raise RuntimeError('trying to source non-existing files') + # Relevant kwd parameters and formats + info = dict(kwargs) + info.setdefault('shell', '/bin/bash') + info.setdefault('shell_options', '-c') + info.setdefault('source_command', 'source') + info.setdefault('suppress_output', '&> /dev/null') + info.setdefault('concatenate_on_success', '&&') + + shell = '{shell}'.format(**info) + shell_options = '{shell_options}'.format(**info) + source_file = '{source_command} {file} {concatenate_on_success}' + dump_environment = 'python -c "import os, json; print json.dumps(dict(os.environ))"' + # Construct the command that will be executed + command = [source_file.format(file=file, **info) for file in args] + command.append(dump_environment) + command = ' '.join(command) + command = [ + shell, + shell_options, + command + ] + + # Try to source all the files, + proc = subprocess.Popen(command, stdout=subprocess.PIPE, env=os.environ) + proc.wait() + if proc.returncode != 0: + raise RuntimeError('sourcing files returned a non-zero exit code') + output = ''.join([line for line in proc.stdout]) + # Construct a dictionary with all the variables in the environment + after_source_env = dict(json.loads(output)) + + # Filter variables that are due to how we source + after_source_env.pop('SHLVL') + after_source_env.pop('_') + after_source_env.pop('PWD') + + # Fill the EnvironmentModifications instance + this_environment = dict(os.environ) + # New variables + new_variables = set(after_source_env) - set(this_environment) + for x in new_variables: + env.set(x, after_source_env[x]) + # Variables that have been unset + unset_variables = set(this_environment) - set(after_source_env) + for x in unset_variables: + env.unset(x) + # Variables that have been modified + common_variables = set(this_environment).intersection(set(after_source_env)) + modified_variables = [x for x in common_variables if this_environment[x] != after_source_env[x]] + for x in modified_variables: + # TODO : we may be smarter here, and try to parse if we could compose append_path + # TODO : and prepend_path to modify the value + env.set(x, after_source_env[x]) + return env + def concatenate_paths(paths, separator=':'): """ diff --git a/lib/spack/spack/test/data/sourceme_first.sh b/lib/spack/spack/test/data/sourceme_first.sh new file mode 100644 index 0000000000..800f639ac8 --- /dev/null +++ b/lib/spack/spack/test/data/sourceme_first.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +export NEW_VAR='new' +export UNSET_ME='overridden' diff --git a/lib/spack/spack/test/data/sourceme_second.sh b/lib/spack/spack/test/data/sourceme_second.sh new file mode 100644 index 0000000000..db88b8334a --- /dev/null +++ b/lib/spack/spack/test/data/sourceme_second.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +export PATH_LIST='/path/first:/path/second:/path/third:/path/fourth' +unset EMPTY_PATH_LIST \ No newline at end of file diff --git a/lib/spack/spack/test/environment.py b/lib/spack/spack/test/environment.py index ded1539e18..34b4485f8e 100644 --- a/lib/spack/spack/test/environment.py +++ b/lib/spack/spack/test/environment.py @@ -24,7 +24,10 @@ ############################################################################## import unittest import os -from spack.environment import EnvironmentModifications + +from spack import spack_root +from llnl.util.filesystem import join_path +from spack.environment import EnvironmentModifications, SetEnv, UnsetEnv class EnvironmentTest(unittest.TestCase): @@ -95,3 +98,37 @@ class EnvironmentTest(unittest.TestCase): self.assertEqual(len(copy_construct), 2) for x, y in zip(env, copy_construct): assert x is y + + def test_source_files(self): + datadir = join_path(spack_root, 'lib', 'spack', 'spack', 'test', 'data') + files = [ + join_path(datadir, 'sourceme_first.sh'), + join_path(datadir, 'sourceme_second.sh') + ] + env = EnvironmentModifications.from_sourcing_files(*files) + modifications = env.group_by_name() + + self.assertEqual(len(modifications), 4) + # Set new variables + self.assertEqual(len(modifications['NEW_VAR']), 1) + self.assertTrue(isinstance(modifications['NEW_VAR'][0], SetEnv)) + self.assertEqual(modifications['NEW_VAR'][0].value, 'new') + # Unset variables + self.assertEqual(len(modifications['EMPTY_PATH_LIST']), 1) + self.assertTrue(isinstance(modifications['EMPTY_PATH_LIST'][0], UnsetEnv)) + # Modified variables + self.assertEqual(len(modifications['UNSET_ME']), 1) + self.assertTrue(isinstance(modifications['UNSET_ME'][0], SetEnv)) + self.assertEqual(modifications['UNSET_ME'][0].value, 'overridden') + + self.assertEqual(len(modifications['PATH_LIST']), 1) + self.assertTrue(isinstance(modifications['PATH_LIST'][0], SetEnv)) + self.assertEqual(modifications['PATH_LIST'][0].value, '/path/first:/path/second:/path/third:/path/fourth') + + # TODO : with reference to the TODO in spack/environment.py + # TODO : remove the above and insert + # self.assertEqual(len(modifications['PATH_LIST']), 2) + # self.assertTrue(isinstance(modifications['PATH_LIST'][0], PrependPath)) + # self.assertEqual(modifications['PATH_LIST'][0].value, '/path/first') + # self.assertTrue(isinstance(modifications['PATH_LIST'][1], AppendPath)) + # self.assertEqual(modifications['PATH_LIST'][1].value, '/path/fourth') -- cgit v1.2.3-70-g09d2 From 5300ffac7f1e4f77fcb1ba52083d4a7ba7183467 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sun, 12 Jun 2016 15:11:26 +0200 Subject: qa : fixed flak8 checks --- lib/spack/spack/environment.py | 25 ++++++++++++++++++------- lib/spack/spack/test/environment.py | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 87759b36e1..623bfa6ed2 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -24,13 +24,14 @@ ############################################################################## import collections import inspect +import json import os import os.path import subprocess -import shlex -import json + class NameModifier(object): + def __init__(self, name, **kwargs): self.name = name self.args = {'name': name} @@ -38,6 +39,7 @@ class NameModifier(object): class NameValueModifier(object): + def __init__(self, name, value, **kwargs): self.name = name self.value = value @@ -47,23 +49,27 @@ class NameValueModifier(object): class SetEnv(NameValueModifier): + def execute(self): os.environ[self.name] = str(self.value) class UnsetEnv(NameModifier): + def execute(self): # Avoid throwing if the variable was not set os.environ.pop(self.name, None) class SetPath(NameValueModifier): + def execute(self): string_path = concatenate_paths(self.value, separator=self.separator) os.environ[self.name] = string_path class AppendPath(NameValueModifier): + def execute(self): environment_value = os.environ.get(self.name, '') directories = environment_value.split( @@ -73,6 +79,7 @@ class AppendPath(NameValueModifier): class PrependPath(NameValueModifier): + def execute(self): environment_value = os.environ.get(self.name, '') directories = environment_value.split( @@ -82,6 +89,7 @@ class PrependPath(NameValueModifier): class RemovePath(NameValueModifier): + def execute(self): environment_value = os.environ.get(self.name, '') directories = environment_value.split( @@ -270,7 +278,7 @@ class EnvironmentModifications(object): shell = '{shell}'.format(**info) shell_options = '{shell_options}'.format(**info) source_file = '{source_command} {file} {concatenate_on_success}' - dump_environment = 'python -c "import os, json; print json.dumps(dict(os.environ))"' + dump_environment = 'python -c "import os, json; print json.dumps(dict(os.environ))"' # NOQA: ignore=E501 # Construct the command that will be executed command = [source_file.format(file=file, **info) for file in args] command.append(dump_environment) @@ -282,7 +290,8 @@ class EnvironmentModifications(object): ] # Try to source all the files, - proc = subprocess.Popen(command, stdout=subprocess.PIPE, env=os.environ) + proc = subprocess.Popen( + command, stdout=subprocess.PIPE, env=os.environ) proc.wait() if proc.returncode != 0: raise RuntimeError('sourcing files returned a non-zero exit code') @@ -306,10 +315,12 @@ class EnvironmentModifications(object): for x in unset_variables: env.unset(x) # Variables that have been modified - common_variables = set(this_environment).intersection(set(after_source_env)) - modified_variables = [x for x in common_variables if this_environment[x] != after_source_env[x]] + common_variables = set(this_environment).intersection( + set(after_source_env)) + modified_variables = [x for x in common_variables if this_environment[x] != after_source_env[x]] # NOQA: ignore=E501 for x in modified_variables: - # TODO : we may be smarter here, and try to parse if we could compose append_path + # TODO : we may be smarter here, and try to parse + # TODO : if we could compose append_path # TODO : and prepend_path to modify the value env.set(x, after_source_env[x]) return env diff --git a/lib/spack/spack/test/environment.py b/lib/spack/spack/test/environment.py index 34b4485f8e..31a85f9ee3 100644 --- a/lib/spack/spack/test/environment.py +++ b/lib/spack/spack/test/environment.py @@ -31,12 +31,13 @@ from spack.environment import EnvironmentModifications, SetEnv, UnsetEnv class EnvironmentTest(unittest.TestCase): + def setUp(self): os.environ.clear() os.environ['UNSET_ME'] = 'foo' os.environ['EMPTY_PATH_LIST'] = '' os.environ['PATH_LIST'] = '/path/second:/path/third' - os.environ['REMOVE_PATH_LIST'] = '/a/b:/duplicate:/a/c:/remove/this:/a/d:/duplicate/:/f/g' + os.environ['REMOVE_PATH_LIST'] = '/a/b:/duplicate:/a/c:/remove/this:/a/d:/duplicate/:/f/g' # NOQA: ignore=E501 def test_set(self): env = EnvironmentModifications() @@ -77,9 +78,18 @@ class EnvironmentTest(unittest.TestCase): env.remove_path('REMOVE_PATH_LIST', '/duplicate/') env.apply_modifications() - self.assertEqual('/path/first:/path/second:/path/third:/path/last', os.environ['PATH_LIST']) - self.assertEqual('/path/first:/path/middle:/path/last', os.environ['EMPTY_PATH_LIST']) - self.assertEqual('/path/first:/path/middle:/path/last', os.environ['NEWLY_CREATED_PATH_LIST']) + self.assertEqual( + '/path/first:/path/second:/path/third:/path/last', + os.environ['PATH_LIST'] + ) + self.assertEqual( + '/path/first:/path/middle:/path/last', + os.environ['EMPTY_PATH_LIST'] + ) + self.assertEqual( + '/path/first:/path/middle:/path/last', + os.environ['NEWLY_CREATED_PATH_LIST'] + ) self.assertEqual('/a/b:/a/c:/a/d:/f/g', os.environ['REMOVE_PATH_LIST']) def test_extra_arguments(self): @@ -100,7 +110,8 @@ class EnvironmentTest(unittest.TestCase): assert x is y def test_source_files(self): - datadir = join_path(spack_root, 'lib', 'spack', 'spack', 'test', 'data') + datadir = join_path(spack_root, 'lib', 'spack', + 'spack', 'test', 'data') files = [ join_path(datadir, 'sourceme_first.sh'), join_path(datadir, 'sourceme_second.sh') @@ -115,7 +126,8 @@ class EnvironmentTest(unittest.TestCase): self.assertEqual(modifications['NEW_VAR'][0].value, 'new') # Unset variables self.assertEqual(len(modifications['EMPTY_PATH_LIST']), 1) - self.assertTrue(isinstance(modifications['EMPTY_PATH_LIST'][0], UnsetEnv)) + self.assertTrue(isinstance( + modifications['EMPTY_PATH_LIST'][0], UnsetEnv)) # Modified variables self.assertEqual(len(modifications['UNSET_ME']), 1) self.assertTrue(isinstance(modifications['UNSET_ME'][0], SetEnv)) @@ -123,12 +135,19 @@ class EnvironmentTest(unittest.TestCase): self.assertEqual(len(modifications['PATH_LIST']), 1) self.assertTrue(isinstance(modifications['PATH_LIST'][0], SetEnv)) - self.assertEqual(modifications['PATH_LIST'][0].value, '/path/first:/path/second:/path/third:/path/fourth') + self.assertEqual( + modifications['PATH_LIST'][0].value, + '/path/first:/path/second:/path/third:/path/fourth' + ) # TODO : with reference to the TODO in spack/environment.py # TODO : remove the above and insert # self.assertEqual(len(modifications['PATH_LIST']), 2) - # self.assertTrue(isinstance(modifications['PATH_LIST'][0], PrependPath)) + # self.assertTrue( + # isinstance(modifications['PATH_LIST'][0], PrependPath) + # ) # self.assertEqual(modifications['PATH_LIST'][0].value, '/path/first') - # self.assertTrue(isinstance(modifications['PATH_LIST'][1], AppendPath)) + # self.assertTrue( + # isinstance(modifications['PATH_LIST'][1], AppendPath) + # ) # self.assertEqual(modifications['PATH_LIST'][1].value, '/path/fourth') -- cgit v1.2.3-70-g09d2 From 30c9d976f6e7b74b6713215e8f7c7924a9f43f43 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sun, 12 Jun 2016 18:49:12 +0200 Subject: environment : added more logic to treat append and prepend path --- lib/spack/spack/environment.py | 60 ++++++++++++++++++++++++---- lib/spack/spack/test/data/sourceme_second.sh | 2 +- lib/spack/spack/test/environment.py | 33 +++++++-------- 3 files changed, 68 insertions(+), 27 deletions(-) diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 623bfa6ed2..cfba060459 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -1,4 +1,4 @@ -############################################################################## +# # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # @@ -21,7 +21,7 @@ # 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 -############################################################################## +# import collections import inspect import json @@ -100,6 +100,7 @@ class RemovePath(NameValueModifier): class EnvironmentModifications(object): + """ Keeps track of requests to modify the current environment. @@ -315,14 +316,57 @@ class EnvironmentModifications(object): for x in unset_variables: env.unset(x) # Variables that have been modified - common_variables = set(this_environment).intersection( - set(after_source_env)) + common_variables = set(this_environment).intersection(set(after_source_env)) # NOQA: ignore=E501 modified_variables = [x for x in common_variables if this_environment[x] != after_source_env[x]] # NOQA: ignore=E501 + + def return_separator_if_any(first_value, second_value): + separators = ':', ';' + for separator in separators: + if separator in first_value and separator in second_value: + return separator + return None + for x in modified_variables: - # TODO : we may be smarter here, and try to parse - # TODO : if we could compose append_path - # TODO : and prepend_path to modify the value - env.set(x, after_source_env[x]) + current = this_environment[x] + modified = after_source_env[x] + sep = return_separator_if_any(current, modified) + if sep is None: + # We just need to set the variable to the new value + env.set(x, after_source_env[x]) + else: + current_list = current.split(sep) + modified_list = modified.split(sep) + # Paths that have been removed + remove_list = [ + ii for ii in current_list if ii not in modified_list] + # Check that nothing has been added in the middle of vurrent + # list + remaining_list = [ + ii for ii in current_list if ii in modified_list] + start = modified_list.index(remaining_list[0]) + end = modified_list.index(remaining_list[-1]) + search = sep.join(modified_list[start:end + 1]) + if search not in current: + # We just need to set the variable to the new value + env.set(x, after_source_env[x]) + break + else: + try: + prepend_list = modified_list[:start] + except KeyError: + prepend_list = [] + try: + append_list = modified_list[end + 1:] + except KeyError: + append_list = [] + + for item in remove_list: + env.remove_path(x, item) + for item in append_list: + env.append_path(x, item) + for item in prepend_list: + env.prepend_path(x, item) + return env diff --git a/lib/spack/spack/test/data/sourceme_second.sh b/lib/spack/spack/test/data/sourceme_second.sh index db88b8334a..9955a0e6d6 100644 --- a/lib/spack/spack/test/data/sourceme_second.sh +++ b/lib/spack/spack/test/data/sourceme_second.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -export PATH_LIST='/path/first:/path/second:/path/third:/path/fourth' +export PATH_LIST='/path/first:/path/second:/path/fourth' unset EMPTY_PATH_LIST \ No newline at end of file diff --git a/lib/spack/spack/test/environment.py b/lib/spack/spack/test/environment.py index 31a85f9ee3..219c68e5a8 100644 --- a/lib/spack/spack/test/environment.py +++ b/lib/spack/spack/test/environment.py @@ -27,7 +27,9 @@ import os from spack import spack_root from llnl.util.filesystem import join_path -from spack.environment import EnvironmentModifications, SetEnv, UnsetEnv +from spack.environment import EnvironmentModifications +from spack.environment import SetEnv, UnsetEnv +from spack.environment import RemovePath, PrependPath, AppendPath class EnvironmentTest(unittest.TestCase): @@ -133,21 +135,16 @@ class EnvironmentTest(unittest.TestCase): self.assertTrue(isinstance(modifications['UNSET_ME'][0], SetEnv)) self.assertEqual(modifications['UNSET_ME'][0].value, 'overridden') - self.assertEqual(len(modifications['PATH_LIST']), 1) - self.assertTrue(isinstance(modifications['PATH_LIST'][0], SetEnv)) - self.assertEqual( - modifications['PATH_LIST'][0].value, - '/path/first:/path/second:/path/third:/path/fourth' + self.assertEqual(len(modifications['PATH_LIST']), 3) + self.assertTrue( + isinstance(modifications['PATH_LIST'][0], RemovePath) ) - - # TODO : with reference to the TODO in spack/environment.py - # TODO : remove the above and insert - # self.assertEqual(len(modifications['PATH_LIST']), 2) - # self.assertTrue( - # isinstance(modifications['PATH_LIST'][0], PrependPath) - # ) - # self.assertEqual(modifications['PATH_LIST'][0].value, '/path/first') - # self.assertTrue( - # isinstance(modifications['PATH_LIST'][1], AppendPath) - # ) - # self.assertEqual(modifications['PATH_LIST'][1].value, '/path/fourth') + self.assertEqual(modifications['PATH_LIST'][0].value, '/path/third') + self.assertTrue( + isinstance(modifications['PATH_LIST'][1], AppendPath) + ) + self.assertEqual(modifications['PATH_LIST'][1].value, '/path/fourth') + self.assertTrue( + isinstance(modifications['PATH_LIST'][2], PrependPath) + ) + self.assertEqual(modifications['PATH_LIST'][2].value, '/path/first') -- cgit v1.2.3-70-g09d2 From b89bcdff62e10223a737c0ac26feb996c8202941 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Sun, 12 Jun 2016 19:48:45 -0600 Subject: Make Boost an optional feature of Trilinos. I have been unable to build Boost with some toolset/platform combinations. The users I support don't need the Boost features in Trilinos, so I have been manually hacking trilinos/package.py to disable boost. I would like to propose that these changes be added to the released version. + Add boost as a variant, default to true so there is no change to existing behavior. + Move the CMake configure options related to Boost into a conditional block that is triggered by "if '+boost' in spec". --- var/spack/repos/builtin/packages/trilinos/package.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 1eaec86405..28c0bea7c6 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -58,11 +58,12 @@ class Trilinos(Package): variant('python', default=False, description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds a debug version of the libraries') + variant('boost', default=True, description='Compile with Boost') # Everything should be compiled with -fpic depends_on('blas') depends_on('lapack') - depends_on('boost') + depends_on('boost', when='+boost') depends_on('matio') depends_on('glm') depends_on('swig') @@ -121,9 +122,6 @@ class Trilinos(Package): '-DTPL_ENABLE_LAPACK=ON', '-DLAPACK_LIBRARY_NAMES=lapack', '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix, - '-DTPL_ENABLE_Boost:BOOL=ON', - '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, - '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib, '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', '-DTrilinos_ENABLE_CXX11:BOOL=ON', '-DTPL_ENABLE_Netcdf:BOOL=ON', @@ -131,6 +129,14 @@ class Trilinos(Package): '-DTPL_ENABLE_HDF5:BOOL=%s' % ('ON' if '+hdf5' in spec else 'OFF'), ]) + if '+boost' in spec: + options.extend([ + '-DTPL_ENABLE_Boost:BOOL=ON', + '-DBoost_INCLUDE_DIRS:PATH=%s' % spec['boost'].prefix.include, + '-DBoost_LIBRARY_DIRS:PATH=%s' % spec['boost'].prefix.lib + ]) + else: + options.extend(['-DTPL_ENABLE_Boost:BOOL=OFF']) # Fortran lib libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) options.extend([ -- cgit v1.2.3-70-g09d2 From 31d2c386875364a9524727279575955ec32972cd Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Sun, 12 Jun 2016 19:56:29 -0600 Subject: Update formatting to meet code style requirements. --- .../repos/builtin/packages/trilinos/package.py | 193 ++++++++++++--------- 1 file changed, 113 insertions(+), 80 deletions(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 28c0bea7c6..6913d79dcc 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -23,18 +23,23 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os, sys, glob +import os +import sys -# Trilinos is complicated to build, as an inspiration a couple of links to other repositories which build it: +# Trilinos is complicated to build, as an inspiration a couple of links to +# other repositories which build it: # https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/t/trilinos.py#L111 # https://github.com/koecher/candi/blob/master/deal.II-toolchain/packages/trilinos.package # https://gitlab.com/configurations/cluster-config/blob/master/trilinos.sh -# https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb -# and some relevant documentation/examples: +# https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb and some +# relevant documentation/examples: # https://github.com/trilinos/Trilinos/issues/175 + + class Trilinos(Package): - """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented - software framework for the solution of large-scale, complex multi-physics engineering and scientific problems. + """The Trilinos Project is an effort to develop algorithms and enabling + technologies within an object-oriented software framework for the solution + of large-scale, complex multi-physics engineering and scientific problems. A unique design feature of Trilinos is its focus on packages. """ homepage = "https://trilinos.org/" @@ -54,7 +59,8 @@ class Trilinos(Package): variant('hypre', default=True, description='Compile with Hypre preconditioner') variant('hdf5', default=True, description='Compile with HDF5') variant('suite-sparse', default=True, description='Compile with SuiteSparse solvers') - # not everyone has py-numpy activated, keep it disabled by default to avoid configure errors + # not everyone has py-numpy activated, keep it disabled by default to avoid + # configure errors variant('python', default=False, description='Build python wrappers') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Builds a debug version of the libraries') @@ -67,37 +73,37 @@ class Trilinos(Package): depends_on('matio') depends_on('glm') depends_on('swig') - depends_on('metis@5:',when='+metis') - depends_on('suite-sparse',when='+suite-sparse') + depends_on('metis@5:', when='+metis') + depends_on('suite-sparse', when='+suite-sparse') # MPI related dependencies depends_on('mpi') depends_on('netcdf+mpi') - depends_on('parmetis',when='+metis') - # Trilinos' Tribits config system is limited which makes it - # very tricky to link Amesos with static MUMPS, see + depends_on('parmetis', when='+metis') + # Trilinos' Tribits config system is limited which makes it very tricky to + # link Amesos with static MUMPS, see # https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html - # One could work it out by getting linking flags from mpif90 --showme:link (or alike) - # and adding results to -DTrilinos_EXTRA_LINK_FLAGS - # together with Blas and Lapack and ScaLAPACK and Blacs and -lgfortran and - # it may work at the end. But let's avoid all this by simply using shared libs - depends_on('mumps@5.0:+mpi+shared',when='+mumps') - depends_on('scalapack',when='+mumps') - depends_on('superlu-dist',when='+superlu-dist') - depends_on('hypre~internal-superlu',when='+hypre') - depends_on('hdf5+mpi',when='+hdf5') - - depends_on('python',when='+python') + # One could work it out by getting linking flags from mpif90 --showme:link + # (or alike) and adding results to -DTrilinos_EXTRA_LINK_FLAGS together + # with Blas and Lapack and ScaLAPACK and Blacs and -lgfortran and it may + # work at the end. But let's avoid all this by simply using shared libs + depends_on('mumps@5.0:+mpi+shared', when='+mumps') + depends_on('scalapack', when='+mumps') + depends_on('superlu-dist', when='+superlu-dist') + depends_on('hypre~internal-superlu', when='+hypre') + depends_on('hdf5+mpi', when='+hdf5') + depends_on('python', when='+python') patch('umfpack_from_suitesparse.patch') # check that the combination of variants makes sense def variants_check(self): if '+superlu-dist' in self.spec and self.spec.satisfies('@:11.4.3'): - # For Trilinos v11 we need to force SuperLUDist=OFF, - # since only the deprecated SuperLUDist v3.3 together with an Amesos patch - # is working. - raise RuntimeError('The superlu-dist variant can only be used with Trilinos @12.0.1:') + # For Trilinos v11 we need to force SuperLUDist=OFF, since only the + # deprecated SuperLUDist v3.3 together with an Amesos patch is + # working. + raise RuntimeError('The superlu-dist variant can only be used' + + ' with Trilinos @12.0.1:') def install(self, spec, prefix): self.variants_check() @@ -107,27 +113,32 @@ class Trilinos(Package): options.extend(std_cmake_args) mpi_bin = spec['mpi'].prefix.bin - options.extend(['-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', - '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON', - '-DTrilinos_VERBOSE_CONFIGURE:BOOL=OFF', - '-DTrilinos_ENABLE_TESTS:BOOL=OFF', - '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', - '-DCMAKE_BUILD_TYPE:STRING=%s' % ('DEBUG' if '+debug' in spec else 'RELEASE'), - '-DBUILD_SHARED_LIBS:BOOL=%s' % ('ON' if '+shared' in spec else 'OFF'), - '-DTPL_ENABLE_MPI:BOOL=ON', - '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, - '-DTPL_ENABLE_BLAS=ON', - '-DBLAS_LIBRARY_NAMES=blas', # FIXME: don't hardcode names - '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib, - '-DTPL_ENABLE_LAPACK=ON', - '-DLAPACK_LIBRARY_NAMES=lapack', - '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix, - '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', - '-DTrilinos_ENABLE_CXX11:BOOL=ON', - '-DTPL_ENABLE_Netcdf:BOOL=ON', - '-DTPL_ENABLE_HYPRE:BOOL=%s' % ('ON' if '+hypre' in spec else 'OFF'), - '-DTPL_ENABLE_HDF5:BOOL=%s' % ('ON' if '+hdf5' in spec else 'OFF'), - ]) + options.extend([ + '-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=ON', + '-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON', + '-DTrilinos_VERBOSE_CONFIGURE:BOOL=OFF', + '-DTrilinos_ENABLE_TESTS:BOOL=OFF', + '-DTrilinos_ENABLE_EXAMPLES:BOOL=OFF', + '-DCMAKE_BUILD_TYPE:STRING=%s' % ( + 'DEBUG' if '+debug' in spec else 'RELEASE'), + '-DBUILD_SHARED_LIBS:BOOL=%s' % ( + 'ON' if '+shared' in spec else 'OFF'), + '-DTPL_ENABLE_MPI:BOOL=ON', + '-DMPI_BASE_DIR:PATH=%s' % spec['mpi'].prefix, + '-DTPL_ENABLE_BLAS=ON', + '-DBLAS_LIBRARY_NAMES=blas', # FIXME: don't hardcode names + '-DBLAS_LIBRARY_DIRS=%s' % spec['blas'].prefix.lib, + '-DTPL_ENABLE_LAPACK=ON', + '-DLAPACK_LIBRARY_NAMES=lapack', + '-DLAPACK_LIBRARY_DIRS=%s' % spec['lapack'].prefix, + '-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON', + '-DTrilinos_ENABLE_CXX11:BOOL=ON', + '-DTPL_ENABLE_Netcdf:BOOL=ON', + '-DTPL_ENABLE_HYPRE:BOOL=%s' % ( + 'ON' if '+hypre' in spec else 'OFF'), + '-DTPL_ENABLE_HDF5:BOOL=%s' % ( + 'ON' if '+hdf5' in spec else 'OFF'), + ]) if '+boost' in spec: options.extend([ @@ -137,29 +148,40 @@ class Trilinos(Package): ]) else: options.extend(['-DTPL_ENABLE_Boost:BOOL=OFF']) + # Fortran lib - libgfortran = os.path.dirname (os.popen('%s --print-file-name libgfortran.a' % join_path(mpi_bin,'mpif90') ).read()) + libgfortran = os.path.dirname(os.popen( + '%s --print-file-name libgfortran.a' % + join_path(mpi_bin, 'mpif90')).read()) options.extend([ - '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % libgfortran, + '-DTrilinos_EXTRA_LINK_FLAGS:STRING=-L%s/ -lgfortran' % ( + libgfortran), '-DTrilinos_ENABLE_Fortran=ON' ]) # for build-debug only: - #options.extend([ - # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' - #]) + # options.extend([ + # '-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE' + # ]) # suite-sparse related if '+suite-sparse' in spec: options.extend([ - '-DTPL_ENABLE_Cholmod:BOOL=OFF', # FIXME: Trilinos seems to be looking for static libs only, patch CMake TPL file? - #'-DTPL_ENABLE_Cholmod:BOOL=ON', - #'-DCholmod_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, - #'-DCholmod_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, + # FIXME: Trilinos seems to be looking for static libs only, + # patch CMake TPL file? + '-DTPL_ENABLE_Cholmod:BOOL=OFF', + # '-DTPL_ENABLE_Cholmod:BOOL=ON', + # '-DCholmod_LIBRARY_DIRS:PATH=%s' % ( + # spec['suite-sparse'].prefix.lib, + # '-DCholmod_INCLUDE_DIRS:PATH=%s' % ( + # spec['suite-sparse'].prefix.include, '-DTPL_ENABLE_UMFPACK:BOOL=ON', - '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % spec['suite-sparse'].prefix.lib, - '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % spec['suite-sparse'].prefix.include, - '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;suitesparseconfig' + '-DUMFPACK_LIBRARY_DIRS:PATH=%s' % ( + spec['suite-sparse'].prefix.lib), + '-DUMFPACK_INCLUDE_DIRS:PATH=%s' % ( + spec['suite-sparse'].prefix.include), + '-DUMFPACK_LIBRARY_NAMES=umfpack;amd;colamd;cholmod;' + + 'suitesparseconfig' ]) else: options.extend([ @@ -175,9 +197,11 @@ class Trilinos(Package): '-DMETIS_LIBRARY_NAMES=metis', '-DTPL_METIS_INCLUDE_DIRS=%s' % spec['metis'].prefix.include, '-DTPL_ENABLE_ParMETIS:BOOL=ON', - '-DParMETIS_LIBRARY_DIRS=%s;%s' % (spec['parmetis'].prefix.lib,spec['metis'].prefix.lib), + '-DParMETIS_LIBRARY_DIRS=%s;%s' % ( + spec['parmetis'].prefix.lib, spec['metis'].prefix.lib), '-DParMETIS_LIBRARY_NAMES=parmetis;metis', - '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include + '-DTPL_ParMETIS_INCLUDE_DIRS=%s' % ( + spec['parmetis'].prefix.include) ]) else: options.extend([ @@ -190,11 +214,14 @@ class Trilinos(Package): options.extend([ '-DTPL_ENABLE_MUMPS:BOOL=ON', '-DMUMPS_LIBRARY_DIRS=%s' % spec['mumps'].prefix.lib, - '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord', # order is important! + # order is important! + '-DMUMPS_LIBRARY_NAMES=dmumps;mumps_common;pord', '-DTPL_ENABLE_SCALAPACK:BOOL=ON', - '-DSCALAPACK_LIBRARY_NAMES=scalapack' # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + # FIXME: for MKL it's mkl_scalapack_lp64;mkl_blacs_mpich_lp64 + '-DSCALAPACK_LIBRARY_NAMES=scalapack' ]) - # see https://github.com/trilinos/Trilinos/blob/master/packages/amesos/README-MUMPS + # see + # https://github.com/trilinos/Trilinos/blob/master/packages/amesos/README-MUMPS cxx_flags.extend([ '-DMUMPS_5_0' ]) @@ -207,16 +234,20 @@ class Trilinos(Package): # superlu-dist: if '+superlu-dist' in spec: # Amesos, conflicting types of double and complex SLU_D - # see https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html - # and https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html + # see + # https://trilinos.org/pipermail/trilinos-users/2015-March/004731.html + # and + # https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html options.extend([ '-DTeuchos_ENABLE_COMPLEX:BOOL=OFF', '-DKokkosTSQR_ENABLE_Complex:BOOL=OFF' ]) options.extend([ '-DTPL_ENABLE_SuperLUDist:BOOL=ON', - '-DSuperLUDist_LIBRARY_DIRS=%s' % spec['superlu-dist'].prefix.lib, - '-DSuperLUDist_INCLUDE_DIRS=%s' % spec['superlu-dist'].prefix.include + '-DSuperLUDist_LIBRARY_DIRS=%s' % + spec['superlu-dist'].prefix.lib, + '-DSuperLUDist_INCLUDE_DIRS=%s' % + spec['superlu-dist'].prefix.include ]) if spec.satisfies('^superlu-dist@4.0:'): options.extend([ @@ -227,7 +258,6 @@ class Trilinos(Package): '-DTPL_ENABLE_SuperLUDist:BOOL=OFF', ]) - # python if '+python' in spec: options.extend([ @@ -254,23 +284,26 @@ class Trilinos(Package): '-DTrilinos_ENABLE_FEI=OFF' ]) - with working_dir('spack-build', create=True): cmake('..', *options) make() make('install') - # When trilinos is built with Python, libpytrilinos is included through - # cmake configure files. Namely, Trilinos_LIBRARIES in TrilinosConfig.cmake - # contains pytrilinos. This leads to a run-time error: - # Symbol not found: _PyBool_Type - # and prevents Trilinos to be used in any C++ code, which links executable - # against the libraries listed in Trilinos_LIBRARIES. - # See https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509 + # When trilinos is built with Python, libpytrilinos is included + # through cmake configure files. Namely, Trilinos_LIBRARIES in + # TrilinosConfig.cmake contains pytrilinos. This leads to a + # run-time error: Symbol not found: _PyBool_Type and prevents + # Trilinos to be used in any C++ code, which links executable + # against the libraries listed in Trilinos_LIBRARIES. See + # https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509 # A workaround it to remove PyTrilinos from the COMPONENTS_LIST : if '+python' in self.spec: - filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)', (r'\1\3'), '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib) + filter_file(r'(SET\(COMPONENTS_LIST.*)(PyTrilinos;)(.*)', + (r'\1\3'), + '%s/cmake/Trilinos/TrilinosConfig.cmake' % + prefix.lib) - # The shared libraries are not installed correctly on Darwin; correct this + # The shared libraries are not installed correctly on Darwin; + # correct this if (sys.platform == 'darwin') and ('+shared' in spec): fix_darwin_install_name(prefix.lib) -- cgit v1.2.3-70-g09d2 From 1601cf1b148bf326f84ebaeb142f2951c99fb788 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 21:46:11 -0500 Subject: Patch binutils This commit adds a patch to update symbol versions from linker scripts. This is seen with libmysqlclient.so which has to maintain compatibility across two versions. Only one can be the default. https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=544ddf9322b1b83982e5cb84a54d084ee7e718ea --- .../repos/builtin/packages/binutils/package.py | 1 + .../packages/binutils/update_symbol-2.26.patch | 104 +++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 var/spack/repos/builtin/packages/binutils/update_symbol-2.26.patch diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 9e4cc98ae6..7ecb219df5 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -46,6 +46,7 @@ class Binutils(Package): patch('binutilskrell-2.24.patch', when='@2.24+krellpatch') patch('cr16.patch') + patch('update_symbol-2.26.patch', when='@2.26') variant('libiberty', default=False, description='Also install libiberty.') diff --git a/var/spack/repos/builtin/packages/binutils/update_symbol-2.26.patch b/var/spack/repos/builtin/packages/binutils/update_symbol-2.26.patch new file mode 100644 index 0000000000..2601f63a6b --- /dev/null +++ b/var/spack/repos/builtin/packages/binutils/update_symbol-2.26.patch @@ -0,0 +1,104 @@ +From 544ddf9322b1b83982e5cb84a54d084ee7e718ea Mon Sep 17 00:00:00 2001 +From: H.J. Lu +Date: Wed, 24 Feb 2016 15:13:35 -0800 +Subject: [PATCH] Update symbol version for symbol from linker script + +We need to update symbol version for symbols from linker script. + +Backport from master + +bfd/ + + PR ld/19698 + * elflink.c (bfd_elf_record_link_assignment): Set versioned if + symbol version is unknown. + +ld/ + + PR ld/19698 + * testsuite/ld-elf/pr19698.d: New file. + * testsuite/ld-elf/pr19698.s: Likewise. + * testsuite/ld-elf/pr19698.t: Likewise. +--- + bfd/ChangeLog | 9 +++++++++ + bfd/elflink.c | 13 +++++++++++++ + ld/ChangeLog | 10 ++++++++++ + ld/testsuite/ld-elf/pr19698.d | 10 ++++++++++ + ld/testsuite/ld-elf/pr19698.s | 5 +++++ + ld/testsuite/ld-elf/pr19698.t | 11 +++++++++++ + 6 files changed, 58 insertions(+), 0 deletions(-) + create mode 100644 ld/testsuite/ld-elf/pr19698.d + create mode 100644 ld/testsuite/ld-elf/pr19698.s + create mode 100644 ld/testsuite/ld-elf/pr19698.t + +diff --git a/bfd/elflink.c b/bfd/elflink.c +index ae8d148..8fcaadd 100644 +--- a/bfd/elflink.c ++++ b/bfd/elflink.c +@@ -555,6 +555,19 @@ bfd_elf_record_link_assignment (bfd *output_bfd, + if (h == NULL) + return provide; + ++ if (h->versioned == unknown) ++ { ++ /* Set versioned if symbol version is unknown. */ ++ char *version = strrchr (name, ELF_VER_CHR); ++ if (version) ++ { ++ if (version > name && version[-1] != ELF_VER_CHR) ++ h->versioned = versioned_hidden; ++ else ++ h->versioned = versioned; ++ } ++ } ++ + switch (h->root.type) + { + case bfd_link_hash_defined: +diff --git a/ld/testsuite/ld-elf/pr19698.d b/ld/testsuite/ld-elf/pr19698.d +new file mode 100644 +index 0000000..a39f67a +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr19698.d +@@ -0,0 +1,10 @@ ++#ld: -shared $srcdir/$subdir/pr19698.t ++#readelf : --dyn-syms --wide ++#target: *-*-linux* *-*-gnu* *-*-solaris* ++ ++Symbol table '\.dynsym' contains [0-9]+ entries: ++#... ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@VERS.1 ++#... ++ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@@VERS.2 ++#pass +diff --git a/ld/testsuite/ld-elf/pr19698.s b/ld/testsuite/ld-elf/pr19698.s +new file mode 100644 +index 0000000..875dca4 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr19698.s +@@ -0,0 +1,5 @@ ++ .text ++ .globl foo ++ .type foo, %function ++foo: ++ .byte 0 +diff --git a/ld/testsuite/ld-elf/pr19698.t b/ld/testsuite/ld-elf/pr19698.t +new file mode 100644 +index 0000000..09d9125 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr19698.t +@@ -0,0 +1,11 @@ ++"foo@VERS.1" = foo; ++ ++VERSION { ++VERS.2 { ++ global: ++ foo; ++}; ++ ++VERS.1 { ++}; ++} +-- +1.7.1 + -- cgit v1.2.3-70-g09d2 From 8ff7cbb9cef11181df46c626c298299321ba43c9 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 21:57:03 -0500 Subject: Run binutils/package.py through autopep8. --- var/spack/repos/builtin/packages/binutils/package.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 7ecb219df5..15e6f1ecc1 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -24,11 +24,12 @@ ############################################################################## from spack import * + class Binutils(Package): """GNU binutils, which contain the linker, assembler, objdump and others""" - homepage = "http://www.gnu.org/software/binutils/" - url="https://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2" + homepage = "http://www.gnu.org/software/binutils/" + url = "https://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2" version('2.26', '64146a0faa3b411ba774f47d41de239f') version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66') @@ -40,8 +41,10 @@ class Binutils(Package): depends_on('flex') depends_on('bison') - # Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell - variant('krellpatch', default=False, description="build with openspeedshop based patch.") + # Add a patch that creates binutils libiberty_pic.a which is preferred by + # OpenSpeedShop and cbtf-krell + variant('krellpatch', default=False, + description="build with openspeedshop based patch.") variant('gold', default=True, description="build the gold linker") patch('binutilskrell-2.24.patch', when='@2.24+krellpatch') -- cgit v1.2.3-70-g09d2 From bdb9af63ed2128d7cad25f3788eb9ab7e7a43e1b Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 21:58:41 -0500 Subject: Add version 9.5.3 and add readline as a dependency. --- var/spack/repos/builtin/packages/postgresql/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/postgresql/package.py b/var/spack/repos/builtin/packages/postgresql/package.py index 9362234881..a3a3bfa64a 100644 --- a/var/spack/repos/builtin/packages/postgresql/package.py +++ b/var/spack/repos/builtin/packages/postgresql/package.py @@ -34,8 +34,10 @@ class Postgresql(Package): url = "http://ftp.postgresql.org/pub/source/v9.3.4/postgresql-9.3.4.tar.bz2" version('9.3.4', 'd0a41f54c377b2d2fab4a003b0dac762') + version('9.5.3', '3f0c388566c688c82b01a0edf1e6b7a0') - depends_on("openssl") + depends_on('openssl') + depends_on('readline') def install(self, spec, prefix): configure("--prefix=%s" % prefix, -- cgit v1.2.3-70-g09d2 From 4dcb15cf6d7ae2f6874972f1f9c339c056875500 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 22:00:49 -0500 Subject: Ran through autopep8 and cleaned up. --- var/spack/repos/builtin/packages/postgresql/package.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/postgresql/package.py b/var/spack/repos/builtin/packages/postgresql/package.py index a3a3bfa64a..caf3768362 100644 --- a/var/spack/repos/builtin/packages/postgresql/package.py +++ b/var/spack/repos/builtin/packages/postgresql/package.py @@ -24,12 +24,13 @@ ############################################################################## from spack import * + class Postgresql(Package): - """PostgreSQL is a powerful, open source object-relational - database system. It has more than 15 years of active - development and a proven architecture that has earned it a - strong reputation for reliability, data integrity, and - correctness.""" + """PostgreSQL is a powerful, open source object-relational database system. + It has more than 15 years of active development and a proven architecture + that has earned it a strong reputation for reliability, data integrity, and + correctness.""" + homepage = "http://www.postgresql.org/" url = "http://ftp.postgresql.org/pub/source/v9.3.4/postgresql-9.3.4.tar.bz2" -- cgit v1.2.3-70-g09d2 From 7727f6fc7e0938db3773cd1aeeb44a18f4d691ab Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 22:02:46 -0500 Subject: New package - libaio --- var/spack/repos/builtin/packages/libaio/package.py | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libaio/package.py diff --git a/var/spack/repos/builtin/packages/libaio/package.py b/var/spack/repos/builtin/packages/libaio/package.py new file mode 100644 index 0000000000..735ced047b --- /dev/null +++ b/var/spack/repos/builtin/packages/libaio/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 Libaio(Package): + """This is the linux native Asynchronous I/O interface library.""" + + homepage = "https://git.fedorahosted.org/cgit/libaio.git" + url = "https://git.fedorahosted.org/cgit/libaio.git/snapshot/libaio-0.3.110-1.tar.gz" + + version('0.3.110-1', 'eb6b1b435afadb5b80c5dd80984249f6') + + def install(self, spec, prefix): + # libaio is not supported on OS X + if spec.satisfies('arch=darwin-x86_64'): + # create a dummy directory + mkdir(prefix.lib) + return + + make('prefix={0}'.format(prefix), 'install') -- cgit v1.2.3-70-g09d2 From 5d3965c7a6276ca328a7ff86f5084bb51806dfd3 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 22:03:24 -0500 Subject: New package - unixODBC --- .../repos/builtin/packages/unixODBC/package.py | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 var/spack/repos/builtin/packages/unixODBC/package.py diff --git a/var/spack/repos/builtin/packages/unixODBC/package.py b/var/spack/repos/builtin/packages/unixODBC/package.py new file mode 100644 index 0000000000..15de127b7e --- /dev/null +++ b/var/spack/repos/builtin/packages/unixODBC/package.py @@ -0,0 +1,42 @@ +############################################################################## +# 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 Unixodbc(Package): + """ODBC is an open specification for providing application developers with + a predictable API with which to access Data Sources. Data Sources include + SQL Servers and any Data Source with an ODBC Driver.""" + + homepage = "http://www.unixodbc.org/" + url = "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.4.tar.gz" + + version('2.3.4', 'bd25d261ca1808c947cb687e2034be81') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix)) + + make() + make('install') -- cgit v1.2.3-70-g09d2 From b05a56564886bb54b147a83dea9d91ead04a2a0e Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 22:04:09 -0500 Subject: New package - mariadb --- .../repos/builtin/packages/mariadb/package.py | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mariadb/package.py diff --git a/var/spack/repos/builtin/packages/mariadb/package.py b/var/spack/repos/builtin/packages/mariadb/package.py new file mode 100644 index 0000000000..d9df200d02 --- /dev/null +++ b/var/spack/repos/builtin/packages/mariadb/package.py @@ -0,0 +1,59 @@ +############################################################################## +# 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 Mariadb(Package): + """MariaDB turns data into structured information in a wide array of + applications, ranging from banking to websites. It is an enhanced, drop-in + replacement for MySQL. MariaDB is used because it is fast, scalable and + robust, with a rich ecosystem of storage engines, plugins and many other + tools make it very versatile for a wide variety of use cases.""" + + homepage = "https://mariadb.org/about/" + url = "https://downloads.mariadb.org/f/mariadb-10.1.14/source/mariadb-10.1.14.tar.gz" + + version('10.1.14', '294925531e0fd2f0461e3894496a5adc') + version('5.5.49', '67b5a499a5f158b2a586e6e3bfb4f304') + + variant('nonblocking', default=True, description='Allow non blocking ' + 'operations in the mariadb client library.') + + depends_on('boost') + depends_on('cmake') + depends_on('jemalloc') + depends_on('libaio') + depends_on('libedit') + depends_on('libevent', when='+nonblocking') + depends_on('ncurses') + depends_on('zlib') + + def install(self, spec, prefix): + with working_dir('spack-build', create=True): + + cmake('..', *std_cmake_args) + + make() + make('install') -- cgit v1.2.3-70-g09d2 From a7a640bfb800599b433835cd06aeac9851e866f3 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 22:04:37 -0500 Subject: New package - rDBI --- var/spack/repos/builtin/packages/r-DBI/package.py | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-DBI/package.py diff --git a/var/spack/repos/builtin/packages/r-DBI/package.py b/var/spack/repos/builtin/packages/r-DBI/package.py new file mode 100644 index 0000000000..a1e06d5100 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-DBI/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 RDbi(Package): + """A database interface definition for communication between R and + relational database management systems. All classes in this package are + virtual and need to be extended by the various R/DBMS implementations.""" + + homepage = "https://github.com/rstats-db/DBI" + url = "https://cran.r-project.org/src/contrib/DBI_0.4-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/DBI" + + version('0.4-1', 'c7ee8f1c5037c2284e99c62698d0f087') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From bfb0985c38c480644a69eaac3262e122915d9884 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 22:05:10 -0500 Subject: New package - r-RMySQL --- .../repos/builtin/packages/r-RMySQL/package.py | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-RMySQL/package.py diff --git a/var/spack/repos/builtin/packages/r-RMySQL/package.py b/var/spack/repos/builtin/packages/r-RMySQL/package.py new file mode 100644 index 0000000000..774c166f8b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-RMySQL/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 RRmysql(Package): + """Implements 'DBI' Interface to 'MySQL' and 'MariaDB' Databases.""" + + homepage = "https://github.com/rstats-db/rmysql" + url = "https://cran.r-project.org/src/contrib/RMySQL_0.10.9.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RMySQL" + + version('0.10.9', '3628200a1864ac3005cfd55cc7cde17a') + + extends('R') + + depends_on('r-DBI') + depends_on('mariadb') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From 77e8096a6fb1f7531d0654b10ce616c04cee9187 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 22:05:26 -0500 Subject: New package - r-RODBC --- .../repos/builtin/packages/r-RODBC/package.py | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-RODBC/package.py diff --git a/var/spack/repos/builtin/packages/r-RODBC/package.py b/var/spack/repos/builtin/packages/r-RODBC/package.py new file mode 100644 index 0000000000..9cc9aebd9a --- /dev/null +++ b/var/spack/repos/builtin/packages/r-RODBC/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 RRodbc(Package): + """An ODBC database interface.""" + + homepage = "https://cran.rstudio.com/web/packages/RODBC/" + url = "https://cran.rstudio.com/src/contrib/RODBC_1.3-13.tar.gz" + list_url = "https://cran.rstudio.com/src/contrib/Archive/RODBC" + + version('1.3-13', 'c52ef9139c2ed85adc53ad6effa7d68e') + + extends('R') + + depends_on('unixODBC') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From b96b32e9ec8721c5acd3d1d99f7c074ac92debbc Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 22:05:45 -0500 Subject: New package - r-RPostgreSQL --- .../builtin/packages/r-RPostgreSQL/package.py | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-RPostgreSQL/package.py diff --git a/var/spack/repos/builtin/packages/r-RPostgreSQL/package.py b/var/spack/repos/builtin/packages/r-RPostgreSQL/package.py new file mode 100644 index 0000000000..83c9b85525 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-RPostgreSQL/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 RRpostgresql(Package): + """Database interface and PostgreSQL driver for R This package provides a + Database Interface (DBI) compliant driver for R to access PostgreSQL + database systems. In order to build and install this package from source, + PostgreSQL itself must be present your system to provide PostgreSQL + functionality via its libraries and header files. These files are provided + as postgresql-devel package under some Linux distributions. On Microsoft + Windows system the attached libpq library source will be used. A wiki and + issue tracking system for the package are available at Google Code at + https://code.google.com/p/rpostgresql/.""" + + homepage = "https://code.google.com/p/rpostgresql/" + url = "https://cran.r-project.org/src/contrib/RPostgreSQL_0.4-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RPostgreSQL" + + version('0.4-1', 'e7b22e212afbb2cbb88bab937f93e55a') + + extends('R') + + depends_on('r-DBI') + depends_on('postgresql') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From d398ebe21f35684d8aec227904d8fd3155d4ea10 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 12 Jun 2016 22:06:06 -0500 Subject: New package - r-RSQLite --- .../repos/builtin/packages/r-RSQLite/package.py | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-RSQLite/package.py diff --git a/var/spack/repos/builtin/packages/r-RSQLite/package.py b/var/spack/repos/builtin/packages/r-RSQLite/package.py new file mode 100644 index 0000000000..9602f6d927 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-RSQLite/package.py @@ -0,0 +1,45 @@ +############################################################################## +# 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 RRsqlite(Package): + """This package embeds the SQLite database engine in R and provides an + interface compliant with the DBI package. The source for the SQLite engine + (version 3.8.6) is included.""" + + homepage = "https://github.com/rstats-db/RSQLite" + url = "https://cran.r-project.org/src/contrib/RSQLite_1.0.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RSQLite" + + version('1.0.0', 'e6cbe2709612b687c13a10d30c7bad45') + + extends('R') + + depends_on('r-DBI') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From 52160bff187a7d33f6e6041417ced2968e9c13ea Mon Sep 17 00:00:00 2001 From: David Boehme Date: Mon, 13 Jun 2016 11:47:28 -0700 Subject: Use https for github --- var/spack/repos/builtin/packages/caliper/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py index 4b8fe0d8af..a424c73859 100644 --- a/var/spack/repos/builtin/packages/caliper/package.py +++ b/var/spack/repos/builtin/packages/caliper/package.py @@ -34,7 +34,7 @@ class Caliper(Package): homepage = "https://github.com/LLNL/Caliper" url = "" - version('master', git='ssh://git@github.com:LLNL/Caliper.git') + version('master', git='https://github.com/LLNL/Caliper.git') variant('mpi', default=False, description='Enable MPI function wrappers.') -- cgit v1.2.3-70-g09d2 From 427fa7fd0a798c2ae6842f4e7227437e7462e4d4 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 13 Jun 2016 17:26:01 -0500 Subject: New package - rJava --- .../repos/builtin/packages/r-rJava/package.py | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-rJava/package.py diff --git a/var/spack/repos/builtin/packages/r-rJava/package.py b/var/spack/repos/builtin/packages/r-rJava/package.py new file mode 100644 index 0000000000..47804bd7fc --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rJava/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 RRjava(Package): + """Low-level interface to Java VM very much like .C/.Call and friends. + Allows creation of objects, calling methods and accessing fields.""" + + homepage = "http://www.rforge.net/rJava/" + url = "https://cran.r-project.org/src/contrib/rJava_0.9-8.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/rJava" + + version('0.9-8', '51ae0d690ceed056ebe7c4be71fc6c7a') + + extends('R') + + depends_on('jdk') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From 450b082dafcc92ec38d344d74dc4945a05fd3d9f Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 13 Jun 2016 17:35:35 -0500 Subject: Do not need to depend on jdk here because R itself does. --- var/spack/repos/builtin/packages/r-rJava/package.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-rJava/package.py b/var/spack/repos/builtin/packages/r-rJava/package.py index 47804bd7fc..0ce0942602 100644 --- a/var/spack/repos/builtin/packages/r-rJava/package.py +++ b/var/spack/repos/builtin/packages/r-rJava/package.py @@ -37,8 +37,6 @@ class RRjava(Package): extends('R') - depends_on('jdk') - def install(self, spec, prefix): R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), self.stage.source_path) -- cgit v1.2.3-70-g09d2 From 3c234a7d3b09edbe6c7715ae9c542ef805bbf052 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 13 Jun 2016 17:36:50 -0500 Subject: New package - r-XLConnectJars --- .../builtin/packages/r-XLConnectJars/package.py | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-XLConnectJars/package.py diff --git a/var/spack/repos/builtin/packages/r-XLConnectJars/package.py b/var/spack/repos/builtin/packages/r-XLConnectJars/package.py new file mode 100644 index 0000000000..12f72e7468 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-XLConnectJars/package.py @@ -0,0 +1,42 @@ +############################################################################## +# 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 RXlconnectjars(Package): + """Provides external JAR dependencies for the XLConnect package.""" + + homepage = "http://miraisolutions.wordpress.com/" + url = "https://cran.r-project.org/src/contrib/XLConnectJars_0.2-9.tar.gz" + + version('0.2-9', 'e6d6b1acfede26acaa616ee421bd30fb') + + extends('R') + + depends_on('r-rJava') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From 5cd09af0662612ecdf7e28e1c6feabdc62afe85c Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 13 Jun 2016 17:48:44 -0500 Subject: New package - r-XLConnect --- .../repos/builtin/packages/r-XLConnect/package.py | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-XLConnect/package.py diff --git a/var/spack/repos/builtin/packages/r-XLConnect/package.py b/var/spack/repos/builtin/packages/r-XLConnect/package.py new file mode 100644 index 0000000000..919291a023 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-XLConnect/package.py @@ -0,0 +1,45 @@ +############################################################################## +# 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 RXlconnect(Package): + """Provides comprehensive functionality to read, write and format Excel + data.""" + + homepage = "http://miraisolutions.wordpress.com/" + url = "https://cran.r-project.org/src/contrib/XLConnect_0.2-11.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/XLConnect" + + version('0.2-11', '9d1769a103cda05665df399cc335017d') + + extends('R') + + depends_on('r-XLConnectJars') + depends_on('r-rJava') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From 4767185082738f6f4d8e2c12586a910d337dce93 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 13 Jun 2016 17:48:59 -0500 Subject: New package - r-xlsx --- var/spack/repos/builtin/packages/r-xlsx/package.py | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-xlsx/package.py diff --git a/var/spack/repos/builtin/packages/r-xlsx/package.py b/var/spack/repos/builtin/packages/r-xlsx/package.py new file mode 100644 index 0000000000..0aac6cdd1f --- /dev/null +++ b/var/spack/repos/builtin/packages/r-xlsx/package.py @@ -0,0 +1,45 @@ +############################################################################## +# 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 RXlsx(Package): + """Provide R functions to read/write/format Excel 2007 and Excel + 97/2000/XP/2003 file formats.""" + + homepage = "http://code.google.com/p/rexcel/" + url = "https://cran.rstudio.com/src/contrib/xlsx_0.5.7.tar.gz" + list_url = "https://cran.rstudio.com/src/contrib/Archive/xlsx" + + version('0.5.7', '36b1b16f29c54b6089b1dae923180dd5') + + extends('R') + + depends_on('r-rJava') + depends_on('r-xlsxjars') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From 94d0f21823f2fa6338aa0be6ae8d90646aada875 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 13 Jun 2016 17:50:06 -0500 Subject: New package - r-xlsxjars --- .../repos/builtin/packages/r-xlsxjars/package.py | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-xlsxjars/package.py diff --git a/var/spack/repos/builtin/packages/r-xlsxjars/package.py b/var/spack/repos/builtin/packages/r-xlsxjars/package.py new file mode 100644 index 0000000000..cff6e7427e --- /dev/null +++ b/var/spack/repos/builtin/packages/r-xlsxjars/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 RXlsxjars(Package): + """The xlsxjars package collects all the external jars required for the + xlxs package. This release corresponds to POI 3.10.1.""" + + homepage = "https://cran.rstudio.com/web/packages/xlsxjars/index.html" + url = "https://cran.rstudio.com/src/contrib/xlsxjars_0.6.1.tar.gz" + list_url = "https://cran.rstudio.com/src/contrib/Archive/xlsxjars" + + version('0.6.1', '5a1721d5733cb42f3a29e3f353e39166') + + extends('R') + + depends_on('r-rJava') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From 5ba5ef6c469845a7f0d2bdd43172aba110dff9e0 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 13 Jun 2016 17:50:27 -0500 Subject: Add list_url for older versions. --- var/spack/repos/builtin/packages/r-XLConnectJars/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/r-XLConnectJars/package.py b/var/spack/repos/builtin/packages/r-XLConnectJars/package.py index 12f72e7468..bb4e39d5f3 100644 --- a/var/spack/repos/builtin/packages/r-XLConnectJars/package.py +++ b/var/spack/repos/builtin/packages/r-XLConnectJars/package.py @@ -30,6 +30,7 @@ class RXlconnectjars(Package): homepage = "http://miraisolutions.wordpress.com/" url = "https://cran.r-project.org/src/contrib/XLConnectJars_0.2-9.tar.gz" + list_url ="https://cran.r-project.org/src/contrib/Archive/XLConnectJars" version('0.2-9', 'e6d6b1acfede26acaa616ee421bd30fb') -- cgit v1.2.3-70-g09d2 From 8861c99333c748037926dbdef51d4a7974d5f1cf Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 13 Jun 2016 22:50:07 -0500 Subject: New package - r-foreign --- .../repos/builtin/packages/r-foreign/package.py | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-foreign/package.py diff --git a/var/spack/repos/builtin/packages/r-foreign/package.py b/var/spack/repos/builtin/packages/r-foreign/package.py new file mode 100644 index 0000000000..df38fc5680 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-foreign/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 RForeign(Package): + """Functions for reading and writing data stored by some versions of Epi + Info, Minitab, S, SAS, SPSS, Stata, Systat and Weka and for reading and + writing some dBase files.""" + + homepage = "https://cran.r-project.org/web/packages/foreign/index.html" + url = "https://cran.r-project.org/src/contrib/foreign_0.8-66.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/foreign" + + version('0.8-66', 'ff12190f4631dca31e30ca786c2c8f62') + + extends('R') + + def install(self, spec, prefix): + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From e226837d332ef33e195b039dba1dd090e8b56182 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 13 Jun 2016 23:04:26 -0500 Subject: Fix flake8 error. --- var/spack/repos/builtin/packages/r-XLConnectJars/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/r-XLConnectJars/package.py b/var/spack/repos/builtin/packages/r-XLConnectJars/package.py index bb4e39d5f3..15d08cc5af 100644 --- a/var/spack/repos/builtin/packages/r-XLConnectJars/package.py +++ b/var/spack/repos/builtin/packages/r-XLConnectJars/package.py @@ -30,7 +30,7 @@ class RXlconnectjars(Package): homepage = "http://miraisolutions.wordpress.com/" url = "https://cran.r-project.org/src/contrib/XLConnectJars_0.2-9.tar.gz" - list_url ="https://cran.r-project.org/src/contrib/Archive/XLConnectJars" + list_url = "https://cran.r-project.org/src/contrib/Archive/XLConnectJars" version('0.2-9', 'e6d6b1acfede26acaa616ee421bd30fb') -- cgit v1.2.3-70-g09d2 From e6ec3729260b666483b02e38501671bf32ec3af5 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 14 Jun 2016 09:59:48 -0400 Subject: Add packages c-blosc and hdf5-blosc c-blosc provides the Blosc compression filter, and hdf5-blosc provides a plugin for HDF5 to use that filter. --- .../repos/builtin/packages/c-blosc/package.py | 47 +++++++++++++ .../repos/builtin/packages/hdf5-blosc/package.py | 77 ++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 var/spack/repos/builtin/packages/c-blosc/package.py create mode 100644 var/spack/repos/builtin/packages/hdf5-blosc/package.py diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py new file mode 100644 index 0000000000..16e8c89811 --- /dev/null +++ b/var/spack/repos/builtin/packages/c-blosc/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 CBlosc(Package): + """Blosc, an extremely fast, multi-threaded, meta-compressor library""" + homepage = "http://www.blosc.org" + url = "https://github.com/Blosc/c-blosc/archive/v1.9.2.tar.gz" + + version('1.9.2', 'dd2d83069d74b36b8093f1c6b49defc5') + version('1.9.1', '7d708d3daadfacf984a87b71b1734ce2') + version('1.9.0', 'e4c1dc8e2c468e5cfa2bf05eeee5357a') + version('1.8.1', 'd73d5be01359cf271e9386c90dcf5b05') + version('1.8.0', '5b92ecb287695ba20cc33d30bf221c4f') + + depends_on("cmake") + depends_on("snappy") + depends_on("zlib") + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py new file mode 100644 index 0000000000..897c079e4e --- /dev/null +++ b/var/spack/repos/builtin/packages/hdf5-blosc/package.py @@ -0,0 +1,77 @@ +############################################################################## +# 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 +############################################################################## + +import os +import shutil +import sys + +from spack import * + +class Hdf5Blosc(Package): + """Blosc filter for HDF5""" + homepage = "https://github.com/Blosc/hdf5-blosc" + url = "https://github.com/Blosc/hdf5-blosc/archive/master.zip" + + version('master', '02c04acbf4bec66ec8a35bf157d1c9de') + + depends_on("c-blosc") + depends_on("hdf5") + depends_on("libtool") + + parallel = False + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") + if sys.platform == 'darwin': + fix_darwin_install_name(prefix.lib) + + # Build and install plugin manually + # The plugin requires at least HDF5 1.8.11: + if spec['hdf5'].satisfies('@1.8.11:'): + # The plugin does not yet work with Windows: + if sys.platform not in ('win32', 'cygwin'): + # cc = which('cc') + libtool = Executable(join_path(spec['libtool'].prefix.bin, + 'libtool')) + with working_dir('src'): + libtool('--mode=compile', '--tag=CC', + 'cc', '-g', '-O', '-c', 'blosc_plugin.c') + libtool('--mode=link', '--tag=CC', + 'cc', '-g', '-O', + '-rpath', prefix.lib, + '-o', 'libblosc_plugin.la', 'blosc_plugin.lo') + shlibext = 'so' if sys.platform!='darwin' else 'dylib' + shlib0 = 'libblosc_plugin.0.%s' % shlibext + shutil.copyfile(join_path('.libs', shlib0), + join_path(prefix.lib, shlib0)) + shlib = 'libblosc_plugin.%s' % shlibext + os.symlink(shlib0, join_path(prefix.lib, shlib)) + + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + spack_env.append_path('HDF5_PLUGIN_PATH', self.spec.prefix.lib) + run_env.append_path('HDF5_PLUGIN_PATH', self.spec.prefix.lib) -- cgit v1.2.3-70-g09d2 From ca5180f7a24d08d49f046a4efa8ef5b48201211d Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 14 Jun 2016 17:03:00 -0400 Subject: Correct Blosc install on Darwin --- .../repos/builtin/packages/c-blosc/package.py | 4 + .../repos/builtin/packages/hdf5-blosc/package.py | 177 +++++++++++++++++---- 2 files changed, 153 insertions(+), 28 deletions(-) diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py index 16e8c89811..dee332be14 100644 --- a/var/spack/repos/builtin/packages/c-blosc/package.py +++ b/var/spack/repos/builtin/packages/c-blosc/package.py @@ -23,6 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## +import sys + from spack import * class CBlosc(Package): @@ -45,3 +47,5 @@ class CBlosc(Package): make() make("install") + if sys.platform == 'darwin': + fix_darwin_install_name(prefix.lib) diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py index 897c079e4e..680bc41c41 100644 --- a/var/spack/repos/builtin/packages/hdf5-blosc/package.py +++ b/var/spack/repos/builtin/packages/hdf5-blosc/package.py @@ -43,35 +43,156 @@ class Hdf5Blosc(Package): parallel = False def install(self, spec, prefix): - cmake('.', *std_cmake_args) + # The included cmake recipe doesn"t work for Darwin + # cmake(".", *std_cmake_args) + # + # make() + # make("install") + # if sys.platform == "darwin": + # fix_darwin_install_name(prefix.lib) - make() - make("install") - if sys.platform == 'darwin': - fix_darwin_install_name(prefix.lib) + libtool = Executable(join_path(spec["libtool"].prefix.bin, "libtool")) + if "+mpi" in spec["hdf5"]: + cc = "mpicc" + else: + cc = "cc" + shlibext = "so" if sys.platform!="darwin" else "dylib" + mkdirp(prefix.include) + mkdirp(prefix.lib) - # Build and install plugin manually - # The plugin requires at least HDF5 1.8.11: - if spec['hdf5'].satisfies('@1.8.11:'): - # The plugin does not yet work with Windows: - if sys.platform not in ('win32', 'cygwin'): - # cc = which('cc') - libtool = Executable(join_path(spec['libtool'].prefix.bin, - 'libtool')) - with working_dir('src'): - libtool('--mode=compile', '--tag=CC', - 'cc', '-g', '-O', '-c', 'blosc_plugin.c') - libtool('--mode=link', '--tag=CC', - 'cc', '-g', '-O', - '-rpath', prefix.lib, - '-o', 'libblosc_plugin.la', 'blosc_plugin.lo') - shlibext = 'so' if sys.platform!='darwin' else 'dylib' - shlib0 = 'libblosc_plugin.0.%s' % shlibext - shutil.copyfile(join_path('.libs', shlib0), - join_path(prefix.lib, shlib0)) - shlib = 'libblosc_plugin.%s' % shlibext - os.symlink(shlib0, join_path(prefix.lib, shlib)) + # Build and install filter + with working_dir("src"): + libtool("--mode=compile", "--tag=CC", + "cc", "-g", "-O", + "-c", "blosc_filter.c") + libtool("--mode=link", "--tag=CC", + "cc", "-g", "-O", + "-rpath", prefix.lib, + "-o", "libblosc_filter.la", + "blosc_filter.lo", + "-L%s" % spec["c-blosc"].prefix.lib, "-lblosc", + "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5") + shlib0 = "libblosc_filter.0.%s" % shlibext + shlib = "libblosc_filter.%s" % shlibext + shutil.copyfile(join_path(".libs", shlib0), + join_path(prefix.lib, shlib0)) + os.symlink(shlib0, join_path(prefix.lib, shlib)) + + # Build and install plugin + # The plugin requires at least HDF5 1.8.11: + if spec["hdf5"].satisfies("@1.8.11:"): + libtool("--mode=compile", "--tag=CC", + "cc", "-g", "-O", + "-c", "blosc_plugin.c") + libtool("--mode=link", "--tag=CC", + "cc", "-g", "-O", + "-rpath", prefix.lib, + "-o", "libblosc_plugin.la", + "blosc_plugin.lo", + "-L%s" % prefix.lib, "-lblosc_filter", + "-L%s" % spec["c-blosc"].prefix.lib, "-lblosc", + "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5") + shlib0 = "libblosc_plugin.0.%s" % shlibext + shlib = "libblosc_plugin.%s" % shlibext + shutil.copyfile(join_path(".libs", shlib0), + join_path(prefix.lib, shlib0)) + os.symlink(shlib0, join_path(prefix.lib, shlib)) + + self.check_install(spec) + def check_install(self, spec): + "Build and run a small program to test the installed HDF5 Blosc plugin" + print "Checking HDF5-Blosc plugin..." + checkdir = "spack-check" + with working_dir(checkdir, create=True): + source = r"""\ +#include +#include +#include +#include + +#define FILTER_BLOSC 32001 /* Blosc filter ID registered with the HDF group */ + +int main(int argc, char **argv) { + herr_t herr; + hid_t file = H5Fcreate("file.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + assert(file >= 0); + hsize_t dims[3] = {10, 10, 10}; + hid_t space = H5Screate_simple(3, dims, NULL); + assert(space >= 0); + hid_t create_proplist = H5Pcreate(H5P_DATASET_CREATE); + assert(create_proplist >= 0); + herr = H5Pset_chunk(create_proplist, 3, dims); + assert(herr >= 0); + herr = H5Pset_filter(create_proplist, FILTER_BLOSC, H5Z_FLAG_OPTIONAL, 0, + NULL); + assert(herr >= 0); + htri_t all_filters_avail = H5Pall_filters_avail(create_proplist); + assert(all_filters_avail > 0); + hid_t dataset = H5Dcreate(file, "dataset", H5T_NATIVE_DOUBLE, space, + H5P_DEFAULT, create_proplist, H5P_DEFAULT); + assert(dataset >= 0); + double data[10][10][10]; + for (int k=0; k<10; ++k) { + for (int j=0; j<10; ++j) { + for (int i=0; i<10; ++i) { + data[k][j][i] = 1.0 / (1.0 + i + j + k); + } + } + } + herr = H5Dwrite(dataset, H5T_NATIVE_DOUBLE, space, space, H5P_DEFAULT, + &data[0][0][0]); + assert(herr >= 0); + herr = H5Pclose(create_proplist); + assert(herr >= 0); + herr = H5Dclose(dataset); + assert(herr >= 0); + herr = H5Sclose(space); + assert(herr >= 0); + herr = H5Fclose(file); + assert(herr >= 0); + printf("Done.\n"); + return 0; +} +""" + expected = """\ +Done. +""" + with open("check.c", "w") as f: + f.write(source) + if "+mpi" in spec["hdf5"]: + cc = which("mpicc") + else: + cc = which("cc") + # TODO: Automate these path and library settings + cc("-c", "-I%s" % spec["hdf5"].prefix.include, "check.c") + cc("-o", "check", "check.o", + "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5") + try: + check = Executable("./check") + output = check(return_output=True) + except: + output = "" + success = output == expected + if not success: + print "Produced output does not match expected output." + print "Expected output:" + print "-"*80 + print expected + print "-"*80 + print "Produced output:" + print "-"*80 + print output + print "-"*80 + print "Environment:" + env = which("env") + env() + raise RuntimeError("HDF5 Blosc plugin check failed") + shutil.rmtree(checkdir) + + def setup_environment(self, spack_env, run_env): + spack_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib) + run_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib) def setup_dependent_environment(self, spack_env, run_env, dependent_spec): - spack_env.append_path('HDF5_PLUGIN_PATH', self.spec.prefix.lib) - run_env.append_path('HDF5_PLUGIN_PATH', self.spec.prefix.lib) + spack_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib) + run_env.append_path("HDF5_PLUGIN_PATH", self.spec.prefix.lib) -- cgit v1.2.3-70-g09d2 From 05d7378da57f51a26830a61a88228fb8fc7d3108 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 14 Jun 2016 17:13:20 -0400 Subject: Install shared libraries correctly on Linux --- .../repos/builtin/packages/hdf5-blosc/package.py | 28 ++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py index 680bc41c41..50f380083c 100644 --- a/var/spack/repos/builtin/packages/hdf5-blosc/package.py +++ b/var/spack/repos/builtin/packages/hdf5-blosc/package.py @@ -29,6 +29,21 @@ import sys from spack import * +def _install_shlib(name, src, dst): + """Install a shared library from directory src to directory dst""" + if sys.platform == "darwin": + shlib0 = name + ".0.dylib" + shlib = name + ".dylib" + shutil.copyfile(join_path(src, shlib0), join_path(dst, shlib0)) + os.symlink(shlib0, join_path(dst, shlib)) + else: + shlib000 = name + ".so.0.0.0" + shlib0 = name + ".so.0" + shlib = name + ".dylib" + shutil.copyfile(join_path(src, shlib000), join_path(dst, shlib000)) + os.symlink(shlib000, join_path(dst, shlib0)) + os.symlink(shlib0, join_path(dst, shlib)) + class Hdf5Blosc(Package): """Blosc filter for HDF5""" homepage = "https://github.com/Blosc/hdf5-blosc" @@ -72,11 +87,7 @@ class Hdf5Blosc(Package): "blosc_filter.lo", "-L%s" % spec["c-blosc"].prefix.lib, "-lblosc", "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5") - shlib0 = "libblosc_filter.0.%s" % shlibext - shlib = "libblosc_filter.%s" % shlibext - shutil.copyfile(join_path(".libs", shlib0), - join_path(prefix.lib, shlib0)) - os.symlink(shlib0, join_path(prefix.lib, shlib)) + _install_shlib("libblosc_filter", ".libs", prefix.lib) # Build and install plugin # The plugin requires at least HDF5 1.8.11: @@ -92,13 +103,10 @@ class Hdf5Blosc(Package): "-L%s" % prefix.lib, "-lblosc_filter", "-L%s" % spec["c-blosc"].prefix.lib, "-lblosc", "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5") - shlib0 = "libblosc_plugin.0.%s" % shlibext - shlib = "libblosc_plugin.%s" % shlibext - shutil.copyfile(join_path(".libs", shlib0), - join_path(prefix.lib, shlib0)) - os.symlink(shlib0, join_path(prefix.lib, shlib)) + _install_shlib("libblosc_plugin", ".libs", prefix.lib) self.check_install(spec) + def check_install(self, spec): "Build and run a small program to test the installed HDF5 Blosc plugin" print "Checking HDF5-Blosc plugin..." -- cgit v1.2.3-70-g09d2 From b59d4f243bc012f6673a53be75d197c16e5e7a06 Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 15 Jun 2016 13:16:29 +0200 Subject: openmpi, mvapich2, mpich : filtered out "--Wl,--enable-new-dtag" in wrappers, as it turns RPATH into RUNPATH Apart from that turned `os.path.join` into `join_path` and `os.environ` into `env` in the packages --- var/spack/repos/builtin/packages/mpich/package.py | 28 +++++---- .../repos/builtin/packages/mvapich2/package.py | 24 +++++--- .../repos/builtin/packages/openmpi/package.py | 67 ++++++++++------------ 3 files changed, 62 insertions(+), 57 deletions(-) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 164d9db541..e7ae63ef70 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os class Mpich(Package): @@ -102,18 +101,25 @@ class Mpich(Package): be bound to whatever compiler they were built with. """ bin = self.prefix.bin - mpicc = os.path.join(bin, 'mpicc') - mpicxx = os.path.join(bin, 'mpicxx') - mpif77 = os.path.join(bin, 'mpif77') - mpif90 = os.path.join(bin, 'mpif90') - - spack_cc = os.environ['CC'] - spack_cxx = os.environ['CXX'] - spack_f77 = os.environ['F77'] - spack_fc = os.environ['FC'] - + mpicc = join_path(bin, 'mpicc') + mpicxx = join_path(bin, 'mpicxx') + mpif77 = join_path(bin, 'mpif77') + mpif90 = join_path(bin, 'mpif90') + + spack_cc = env['CC'] + spack_cxx = env['CXX'] + spack_f77 = env['F77'] + spack_fc = env['FC'] + + # Substitute Spack compile wrappers for the real + # underlying compiler kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True } filter_file('CC="%s"' % spack_cc , 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) filter_file('CXX="%s"'% spack_cxx, 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) filter_file('F77="%s"'% spack_f77, 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) filter_file('FC="%s"' % spack_fc , 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) + + # Remove this linking flag if present + # (it turns RPATH into RUNPATH) + for wrapper in (mpicc, mpicxx, mpif77, mpif90): + filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs) diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index d1944023d1..131d430cf2 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os class Mvapich2(Package): @@ -245,15 +244,15 @@ class Mvapich2(Package): be bound to whatever compiler they were built with. """ bin = self.prefix.bin - mpicc = os.path.join(bin, 'mpicc') - mpicxx = os.path.join(bin, 'mpicxx') - mpif77 = os.path.join(bin, 'mpif77') - mpif90 = os.path.join(bin, 'mpif90') + mpicc = join_path(bin, 'mpicc') + mpicxx = join_path(bin, 'mpicxx') + mpif77 = join_path(bin, 'mpif77') + mpif90 = join_path(bin, 'mpif90') - spack_cc = os.environ['CC'] - spack_cxx = os.environ['CXX'] - spack_f77 = os.environ['F77'] - spack_fc = os.environ['FC'] + spack_cc = env['CC'] + spack_cxx = env['CXX'] + spack_f77 = env['F77'] + spack_fc = env['FC'] kwargs = { 'ignore_absent': True, @@ -261,6 +260,8 @@ class Mvapich2(Package): 'string': True } + # Substitute Spack compile wrappers for the real + # underlying compiler filter_file('CC="%s"' % spack_cc, 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) filter_file('CXX="%s"' % spack_cxx, @@ -269,3 +270,8 @@ class Mvapich2(Package): 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) filter_file('FC="%s"' % spack_fc, 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) + + # Remove this linking flag if present + # (it turns RPATH into RUNPATH) + for wrapper in (mpicc, mpicxx, mpif77, mpif90): + filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 4e465e1784..e3d9a28b4a 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -173,40 +173,33 @@ class Openmpi(Package): be bound to whatever compiler they were built with. """ kwargs = {'ignore_absent': True, 'backup': False, 'string': False} - dir = os.path.join(self.prefix, 'share/openmpi/') - - cc_wrappers = ['mpicc-vt-wrapper-data.txt', 'mpicc-wrapper-data.txt', - 'ortecc-wrapper-data.txt', 'shmemcc-wrapper-data.txt'] - - cxx_wrappers = ['mpic++-vt-wrapper-data.txt', 'mpic++-wrapper-data.txt', - 'ortec++-wrapper-data.txt'] - - fc_wrappers = ['mpifort-vt-wrapper-data.txt', - 'mpifort-wrapper-data.txt', 'shmemfort-wrapper-data.txt'] - - for wrapper in cc_wrappers: - filter_file('compiler=.*', 'compiler=%s' % self.compiler.cc, - os.path.join(dir, wrapper), **kwargs) - - for wrapper in cxx_wrappers: - filter_file('compiler=.*', 'compiler=%s' % self.compiler.cxx, - os.path.join(dir, wrapper), **kwargs) - - for wrapper in fc_wrappers: - filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc, - os.path.join(dir, wrapper), **kwargs) - - # These are symlinks in newer versions, so check that here - f77_wrappers = ['mpif77-vt-wrapper-data.txt', 'mpif77-wrapper-data.txt'] - f90_wrappers = ['mpif90-vt-wrapper-data.txt', 'mpif90-wrapper-data.txt'] - - for wrapper in f77_wrappers: - path = os.path.join(dir, wrapper) - if not os.path.islink(path): - filter_file('compiler=.*', 'compiler=%s' % self.compiler.f77, - path, **kwargs) - for wrapper in f90_wrappers: - path = os.path.join(dir, wrapper) - if not os.path.islink(path): - filter_file('compiler=.*', 'compiler=%s' % self.compiler.fc, - path, **kwargs) + wrapper_basepath = join_path(self.prefix, 'share', 'openmpi') + + wrappers = [ + ('mpicc-vt-wrapper-data.txt', self.compiler.cc), + ('mpicc-wrapper-data.txt', self.compiler.cc), + ('ortecc-wrapper-data.txt', self.compiler.cc), + ('shmemcc-wrapper-data.txt', self.compiler.cc), + ('mpic++-vt-wrapper-data.txt', self.compiler.cxx), + ('mpic++-wrapper-data.txt', self.compiler.cxx), + ('ortec++-wrapper-data.txt', self.compiler.cxx), + ('mpifort-vt-wrapper-data.txt', self.compiler.fc), + ('mpifort-wrapper-data.txt', self.compiler.fc), + ('shmemfort-wrapper-data.txt', self.compiler.fc), + ('mpif90-vt-wrapper-data.txt', self.compiler.fc), + ('mpif90-wrapper-data.txt', self.compiler.fc), + ('mpif77-vt-wrapper-data.txt', self.compiler.f77), + ('mpif77-wrapper-data.txt', self.compiler.f77) + ] + + for wrapper_name, compiler in wrappers: + wrapper = join_path(wrapper_basepath, wrapper_name) + if not os.path.islink(wrapper): + # Substitute Spack compile wrappers for the real + # underlying compiler + match = 'compiler=.*' + substitute = 'compiler={compiler}'.format(compiler=compiler) + filter_file(match, substitute, wrapper, **kwargs) + # Remove this linking flag if present + # (it turns RPATH into RUNPATH) + filter_file('-Wl,--enable-new-dtags', '', wrapper, **kwargs) -- cgit v1.2.3-70-g09d2 From b09bee81584aa38e78596f3f7f8f4cc09a4418ca Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 15 Jun 2016 13:29:30 +0200 Subject: qa : fixed flake8 issues --- var/spack/repos/builtin/packages/mpich/package.py | 32 +++++++++++--------- .../repos/builtin/packages/openmpi/package.py | 35 +++++++++++++--------- 2 files changed, 39 insertions(+), 28 deletions(-) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index e7ae63ef70..511beafbbd 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -29,8 +29,8 @@ class Mpich(Package): """MPICH is a high performance and widely portable implementation of the Message Passing Interface (MPI) standard.""" homepage = "http://www.mpich.org" - url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" - list_url = "http://www.mpich.org/static/downloads/" + url = "http://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz" + list_url = "http://www.mpich.org/static/downloads/" list_depth = 2 version('3.2', 'f414cfa77099cd1fa1a5ae4e22db508a') @@ -41,7 +41,8 @@ class Mpich(Package): version('3.1', '5643dd176499bfb7d25079aaff25f2ec') version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0') - variant('verbs', default=False, description='Build support for OpenFabrics verbs.') + variant('verbs', default=False, + description='Build support for OpenFabrics verbs.') variant('pmi', default=True, description='Build with PMI support') variant('hydra', default=True, description='Build the hydra process manager') @@ -56,9 +57,9 @@ class Mpich(Package): spack_env.set('MPICH_FC', spack_fc) def setup_dependent_package(self, module, dep_spec): - self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') - self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') def install(self, spec, prefix): @@ -91,7 +92,6 @@ class Mpich(Package): self.filter_compilers() - def filter_compilers(self): """Run after install to make the MPI compilers use the compilers that Spack built the package with. @@ -101,23 +101,27 @@ class Mpich(Package): be bound to whatever compiler they were built with. """ bin = self.prefix.bin - mpicc = join_path(bin, 'mpicc') + mpicc = join_path(bin, 'mpicc') mpicxx = join_path(bin, 'mpicxx') mpif77 = join_path(bin, 'mpif77') mpif90 = join_path(bin, 'mpif90') - spack_cc = env['CC'] + spack_cc = env['CC'] spack_cxx = env['CXX'] spack_f77 = env['F77'] - spack_fc = env['FC'] + spack_fc = env['FC'] # Substitute Spack compile wrappers for the real # underlying compiler - kwargs = { 'ignore_absent' : True, 'backup' : False, 'string' : True } - filter_file('CC="%s"' % spack_cc , 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) - filter_file('CXX="%s"'% spack_cxx, 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) - filter_file('F77="%s"'% spack_f77, 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) - filter_file('FC="%s"' % spack_fc , 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) + kwargs = {'ignore_absent': True, 'backup': False, 'string': True} + filter_file('CC="%s"' % spack_cc, + 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) + filter_file('CXX="%s"' % spack_cxx, + 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) + filter_file('F77="%s"' % spack_f77, + 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) + filter_file('FC="%s"' % spack_fc, + 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) # Remove this linking flag if present # (it turns RPATH into RUNPATH) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index e3d9a28b4a..ab71b4b503 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -72,20 +72,27 @@ class Openmpi(Package): patch('configure.patch', when="@1.10.0:1.10.1") variant('psm', default=False, description='Build support for the PSM library.') - variant('psm2', default=False, description='Build support for the Intel PSM2 library.') - variant('pmi', default=False, description='Build support for PMI-based launchers') - variant('verbs', default=_verbs_dir() is not None, description='Build support for OpenFabrics verbs.') + variant('psm2', default=False, + description='Build support for the Intel PSM2 library.') + variant('pmi', default=False, + description='Build support for PMI-based launchers') + variant('verbs', default=_verbs_dir() is not None, + description='Build support for OpenFabrics verbs.') variant('mxm', default=False, description='Build Mellanox Messaging support') - variant('thread_multiple', default=False, description='Enable MPI_THREAD_MULTIPLE support') + variant('thread_multiple', default=False, + description='Enable MPI_THREAD_MULTIPLE support') # TODO : variant support for alps, loadleveler is missing - variant('tm', default=False, description='Build TM (Torque, PBSPro, and compatible) support') - variant('slurm', default=False, description='Build SLURM scheduler component') + variant('tm', default=False, + description='Build TM (Torque, PBSPro, and compatible) support') + variant('slurm', default=False, + description='Build SLURM scheduler component') variant('sqlite3', default=False, description='Build sqlite3 support') - variant('vt', default=True, description='Build support for contributed package vt') + variant('vt', default=True, + description='Build support for contributed package vt') # TODO : support for CUDA is missing @@ -96,8 +103,7 @@ class Openmpi(Package): depends_on('sqlite', when='+sqlite3') def url_for_version(self, version): - return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) - + return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) # NOQA: ignore=E501 def setup_dependent_environment(self, spack_env, run_env, dependent_spec): spack_env.set('OMPI_CC', spack_cc) @@ -106,14 +112,15 @@ class Openmpi(Package): spack_env.set('OMPI_F77', spack_f77) def setup_dependent_package(self, module, dep_spec): - self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') + self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') - self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') + self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') @property def verbs(self): - # Up through version 1.6, this option was previously named --with-openib + # Up through version 1.6, this option was previously named + # --with-openib if self.spec.satisfies('@:1.6'): return 'openib' # In version 1.7, it was renamed to be --with-verbs @@ -135,7 +142,7 @@ class Openmpi(Package): '--with-psm2' if '+psm2' in spec else '--without-psm2', '--with-mxm' if '+mxm' in spec else '--without-mxm', # Other options - '--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple', + '--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple', # NOQA: ignore=E501 '--with-pmi' if '+pmi' in spec else '--without-pmi', '--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3', '--enable-vt' if '+vt' in spec else '--disable-vt' @@ -153,7 +160,7 @@ class Openmpi(Package): # use this for LANL builds, but for LLNL builds, we need: # "--with-platform=contrib/platform/llnl/optimized" if self.version == ver("1.6.5") and '+lanl' in spec: - config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") + config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") # NOQA: ignore=E501 if not self.compiler.f77 and not self.compiler.fc: config_args.append("--enable-mpi-fortran=no") -- cgit v1.2.3-70-g09d2 From a860a3d6145e6c35fd1b523b2f8166a0db1ed4b2 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 14 Jun 2016 15:54:58 +0200 Subject: superlu-dist: avoid harcoding blas/lapack/mpi; remove preferred version --- lib/spack/llnl/util/filesystem.py | 15 ++++++++++++++- var/spack/repos/builtin/packages/superlu-dist/package.py | 13 ++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 6661a80f27..431289488d 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -28,7 +28,7 @@ __all__ = ['set_install_permissions', 'install', 'install_tree', 'traverse_tree' 'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink', 'set_executable', 'copy_mode', 'unset_executable_mode', 'remove_dead_links', 'remove_linked_tree', 'find_library_path', - 'fix_darwin_install_name'] + 'fix_darwin_install_name','to_link_flags'] import os import glob @@ -424,6 +424,19 @@ def fix_darwin_install_name(path): break +def to_link_flags(library): + """Transforms a path to a into linking flags -L -l. + + Return: + A string of linking flags. + """ + dir = os.path.dirname(library) + # Asume libXYZ.suffix + name = os.path.basename(library)[3:].split(".")[0] + res = '-L%s -l%s' % (dir,name) + return res + + def find_library_path(libname, *paths): """Searches for a file called in each path. diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 6c06b5497c..d24f03c230 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -31,8 +31,7 @@ class SuperluDist(Package): url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz" version('5.0.0', '2b53baf1b0ddbd9fcf724992577f0670') - # default to version 4.3 since petsc and trilinos are not tested with 5.0. - version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae', preferred=True) + version('4.3', 'ee66c84e37b4f7cc557771ccc3dc43ae') version('4.2', 'ae9fafae161f775fbac6eba11e530a65') version('4.1', '4edee38cc29f687bd0c8eb361096a455') version('4.0', 'c0b98b611df227ae050bc1635c6940e0') @@ -47,10 +46,10 @@ class SuperluDist(Package): makefile_inc = [] makefile_inc.extend([ 'PLAT = _mac_x', - 'DSuperLUroot = %s' % self.stage.source_path, #self.stage.path, prefix + 'DSuperLUroot = %s' % self.stage.source_path, 'DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist.a', 'BLASDEF = -DUSE_VENDOR_BLAS', - 'BLASLIB = -L%s -llapack %s -lblas' % (spec['lapack'].prefix.lib, spec['blas'].prefix.lib), # FIXME: avoid hardcoding blas/lapack lib names + 'BLASLIB = %s %s' % (to_link_flags(spec['lapack'].lapack_shared_lib),to_link_flags(spec['blas'].blas_shared_lib)), 'METISLIB = -L%s -lmetis' % spec['metis'].prefix.lib, 'PARMETISLIB = -L%s -lparmetis' % spec['parmetis'].prefix.lib, 'FLIBS =', @@ -58,12 +57,12 @@ class SuperluDist(Package): 'ARCH = ar', 'ARCHFLAGS = cr', 'RANLIB = true', - 'CC = mpicc', # FIXME avoid hardcoding MPI compiler names + 'CC = %s' % spec['mpi'].mpicc, 'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %(spec['parmetis'].prefix.include, spec['metis'].prefix.include), 'NOOPTS = -fPIC -std=c99', - 'FORTRAN = mpif77', + 'FORTRAN = %s' % spec['mpi'].mpif77, 'F90FLAGS = -O2', - 'LOADER = mpif77', + 'LOADER = %s' % spec['mpi'].mpif77, 'LOADOPTS =', 'CDEFS = -DAdd_' ]) -- cgit v1.2.3-70-g09d2 From 9ceb8fea78dfa19526eb258eaacf5c4c8373a093 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 14 Jun 2016 15:56:21 +0200 Subject: petsc: add 3.6.4 and 3.7.2; specify superlu-dist version dependency --- var/spack/repos/builtin/packages/petsc/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 6456a1aabf..697dc56214 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -35,6 +35,8 @@ class Petsc(Package): homepage = "http://www.mcs.anl.gov/petsc/index.html" url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz" + version('3.7.2', '50da49867ce7a49e7a0c1b37f4ec7b34') + version('3.6.4', '7632da2375a3df35b8891c9526dbdde7') version('3.6.3', '91dd3522de5a5ef039ff8f50800db606') version('3.5.3', 'd4fd2734661e89f18ac6014b5dd1ef2f') version('3.5.2', 'ad170802b3b058b5deb9cd1f968e7e13') @@ -72,7 +74,8 @@ class Petsc(Package): # Also PETSc prefer to build it without internal superlu, likely due to conflict in headers # see https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py depends_on('hypre~internal-superlu', when='+hypre+mpi~complex') - depends_on('superlu-dist', when='+superlu-dist+mpi') + depends_on('superlu-dist@:4.3', when='@:3.6.4+superlu-dist+mpi') + depends_on('superlu-dist@5.0.0:', when='@3.7:+superlu-dist+mpi') depends_on('mumps+mpi', when='+mumps+mpi') depends_on('scalapack', when='+mumps+mpi') -- cgit v1.2.3-70-g09d2 From 5358ffbe5a9cbad3af1f5c37a9a239b0e7422bc9 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 14 Jun 2016 15:58:36 +0200 Subject: slepc: add 3.6.3 and 3.7.1; specify petsc version dependency --- var/spack/repos/builtin/packages/slepc/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py index c148a579ec..2ce72ffa69 100644 --- a/var/spack/repos/builtin/packages/slepc/package.py +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -34,11 +34,14 @@ class Slepc(Package): homepage = "http://www.grycap.upv.es/slepc" url = "http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz" + version('3.7.1', '670216f263e3074b21e0623c01bc0f562fdc0bffcd7bd42dd5d8edbe73a532c2') + version('3.6.3', '384939d009546db37bc05ed81260c8b5ba451093bf891391d32eb7109ccff876') version('3.6.2', '2ab4311bed26ccf7771818665991b2ea3a9b15f97e29fd13911ab1293e8e65df') variant('arpack', default=False, description='Enables Arpack wrappers') - depends_on('petsc') + depends_on('petsc@3.7:', when='@3.7.1:') + depends_on('petsc@3.6.3:3.6.4', when='@3.6.2:3.6.3') depends_on('arpack-ng~mpi',when='+arpack^petsc~mpi') depends_on('arpack-ng+mpi',when='+arpack^petsc+mpi') -- cgit v1.2.3-70-g09d2 From 4d40f86bd30e747a1fba518cab4a8acb760a61c7 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 14 Jun 2016 15:58:59 +0200 Subject: trilinos: add 12.6.2 and 12.6.3 --- var/spack/repos/builtin/packages/trilinos/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 6913d79dcc..cebcf1d360 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -45,6 +45,8 @@ class Trilinos(Package): homepage = "https://trilinos.org/" url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz" + version('12.6.3', '960f5f4d3f7c3da818e5a5fb4684559eff7e0c25f959ef576561b8a52f0e4d1e') + version('12.6.2', '0c076090508170ddee5efeed317745027f9418319720dc40a072e478775279f9') version('12.6.1', 'adcf2d3aab74cdda98f88fee19cd1442604199b0515ee3da4d80cbe8f37d00e4') version('12.4.2', '7c830f7f0f68b8ad324690603baf404e') version('12.2.1', '6161926ea247863c690e927687f83be9') -- cgit v1.2.3-70-g09d2 From d04dc8440f61df77f79bd1fd3bb5cd799e83e4f0 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 14 Jun 2016 15:59:49 +0200 Subject: dealii: specify petsc/slepc version dependencies --- var/spack/repos/builtin/packages/dealii/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 54b6426d36..d459976cfe 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -80,8 +80,8 @@ class Dealii(Package): depends_on("netcdf-cxx", when='+netcdf+mpi') depends_on("oce", when='+oce') depends_on("p4est", when='+p4est+mpi') - depends_on("petsc+mpi", when='+petsc+mpi') - depends_on("slepc", when='+slepc+petsc+mpi') + depends_on("petsc@:3.6.4+mpi", when='+petsc+mpi') # FIXME: update after 3.7 is supported upstream + depends_on("slepc@:3.6.3", when='+slepc+petsc+mpi') depends_on("trilinos", when='+trilinos+mpi') # developer dependnecies -- cgit v1.2.3-70-g09d2 From d0d83cfe1e3f40867bd09b38240aaea5222c33eb Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 14 Jun 2016 16:00:37 +0200 Subject: slepc: build by default with Arpack --- var/spack/repos/builtin/packages/slepc/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py index 2ce72ffa69..a14ede39c4 100644 --- a/var/spack/repos/builtin/packages/slepc/package.py +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -38,7 +38,7 @@ class Slepc(Package): version('3.6.3', '384939d009546db37bc05ed81260c8b5ba451093bf891391d32eb7109ccff876') version('3.6.2', '2ab4311bed26ccf7771818665991b2ea3a9b15f97e29fd13911ab1293e8e65df') - variant('arpack', default=False, description='Enables Arpack wrappers') + variant('arpack', default=True, description='Enables Arpack wrappers') depends_on('petsc@3.7:', when='@3.7.1:') depends_on('petsc@3.6.3:3.6.4', when='@3.6.2:3.6.3') -- cgit v1.2.3-70-g09d2 From 36decbfa69e4eda472556ad6e813e14366443de2 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 15 Jun 2016 12:21:05 -0400 Subject: tty: do not break long words These "words" tend to be file paths which are best left unbroken. Fixes #1057. --- lib/spack/llnl/util/tty/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/spack/llnl/util/tty/__init__.py b/lib/spack/llnl/util/tty/__init__.py index c638b113fd..ee81e11a20 100644 --- a/lib/spack/llnl/util/tty/__init__.py +++ b/lib/spack/llnl/util/tty/__init__.py @@ -64,12 +64,14 @@ def info(message, *args, **kwargs): format = kwargs.get('format', '*b') stream = kwargs.get('stream', sys.stdout) wrap = kwargs.get('wrap', False) + break_long_words = kwargs.get('break_long_words', False) cprint("@%s{==>} %s" % (format, cescape(str(message))), stream=stream) for arg in args: if wrap: lines = textwrap.wrap( - str(arg), initial_indent=indent, subsequent_indent=indent) + str(arg), initial_indent=indent, subsequent_indent=indent, + break_long_words=break_long_words) for line in lines: stream.write(line + '\n') else: -- cgit v1.2.3-70-g09d2 From 3d3a26cd9ab37ecbc936fe7b5937fb4f00d2594a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 15 Jun 2016 18:31:10 +0200 Subject: flake8 fixes for filesystem.py --- lib/spack/llnl/util/filesystem.py | 65 ++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 431289488d..d72e8bae92 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -22,28 +22,28 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -__all__ = ['set_install_permissions', 'install', 'install_tree', 'traverse_tree', - 'expand_user', 'working_dir', 'touch', 'touchp', 'mkdirp', - 'force_remove', 'join_path', 'ancestor', 'can_access', 'filter_file', - 'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink', - 'set_executable', 'copy_mode', 'unset_executable_mode', - 'remove_dead_links', 'remove_linked_tree', 'find_library_path', - 'fix_darwin_install_name','to_link_flags'] - import os import glob -import sys import re import shutil import stat import errno import getpass from contextlib import contextmanager, closing -from tempfile import NamedTemporaryFile import subprocess import llnl.util.tty as tty -from spack.util.compression import ALLOWED_ARCHIVE_TYPES + +__all__ = ['set_install_permissions', 'install', 'install_tree', + 'traverse_tree', + 'expand_user', 'working_dir', 'touch', 'touchp', 'mkdirp', + 'force_remove', 'join_path', 'ancestor', 'can_access', + 'filter_file', + 'FileFilter', 'change_sed_delimiter', 'is_exe', 'force_symlink', + 'set_executable', 'copy_mode', 'unset_executable_mode', + 'remove_dead_links', 'remove_linked_tree', 'find_library_path', + 'fix_darwin_install_name', 'to_link_flags'] + def filter_file(regex, repl, *filenames, **kwargs): """Like sed, but uses python regular expressions. @@ -69,6 +69,7 @@ def filter_file(regex, repl, *filenames, **kwargs): # Allow strings to use \1, \2, etc. for replacement, like sed if not callable(repl): unescaped = repl.replace(r'\\', '\\') + def replace_groups_with_groupid(m): def groupid_to_group(x): return m.group(int(x.group(1))) @@ -157,9 +158,12 @@ def set_install_permissions(path): def copy_mode(src, dest): src_mode = os.stat(src).st_mode dest_mode = os.stat(dest).st_mode - if src_mode & stat.S_IXUSR: dest_mode |= stat.S_IXUSR - if src_mode & stat.S_IXGRP: dest_mode |= stat.S_IXGRP - if src_mode & stat.S_IXOTH: dest_mode |= stat.S_IXOTH + if src_mode & stat.S_IXUSR: + dest_mode |= stat.S_IXUSR + if src_mode & stat.S_IXGRP: + dest_mode |= stat.S_IXGRP + if src_mode & stat.S_IXOTH: + dest_mode |= stat.S_IXOTH os.chmod(dest, dest_mode) @@ -224,9 +228,10 @@ def force_remove(*paths): for path in paths: try: os.remove(path) - except OSError, e: + except OSError: pass + @contextmanager def working_dir(dirname, **kwargs): if kwargs.get('create', False): @@ -240,7 +245,7 @@ def working_dir(dirname, **kwargs): def touch(path): """Creates an empty file at the specified path.""" - with open(path, 'a') as file: + with open(path, 'a'): os.utime(path, None) @@ -253,7 +258,7 @@ def touchp(path): def force_symlink(src, dest): try: os.symlink(src, dest) - except OSError as e: + except OSError: os.remove(dest) os.symlink(src, dest) @@ -275,7 +280,7 @@ def ancestor(dir, n=1): def can_access(file_name): """True if we have read/write access to the file.""" - return os.access(file_name, os.R_OK|os.W_OK) + return os.access(file_name, os.R_OK | os.W_OK) def traverse_tree(source_root, dest_root, rel_path='', **kwargs): @@ -343,13 +348,14 @@ def traverse_tree(source_root, dest_root, rel_path='', **kwargs): # Treat as a directory if os.path.isdir(source_child) and ( - follow_links or not os.path.islink(source_child)): + follow_links or not os.path.islink(source_child)): # When follow_nonexisting isn't set, don't descend into dirs # in source that do not exist in dest if follow_nonexisting or os.path.exists(dest_child): - tuples = traverse_tree(source_root, dest_root, rel_child, **kwargs) - for t in tuples: yield t + tuples = traverse_tree(source_root, dest_root, rel_child, **kwargs) # NOQA: ignore=E501 + for t in tuples: + yield t # Treat as a file. elif not ignore(os.path.join(rel_path, f)): @@ -379,6 +385,7 @@ def remove_dead_links(root): if not os.path.exists(real_path): os.unlink(path) + def remove_linked_tree(path): """ Removes a directory and its contents. If the directory is a @@ -402,25 +409,25 @@ def fix_darwin_install_name(path): Fix install name of dynamic libraries on Darwin to have full path. There are two parts of this task: (i) use install_name('-id',...) to change install name of a single lib; - (ii) use install_name('-change',...) to change the cross linking between libs. - The function assumes that all libraries are in one folder and currently won't - follow subfolders. + (ii) use install_name('-change',...) to change the cross linking between + libs. The function assumes that all libraries are in one folder and + currently won't follow subfolders. Args: path: directory in which .dylib files are alocated """ - libs = glob.glob(join_path(path,"*.dylib")) + libs = glob.glob(join_path(path, "*.dylib")) for lib in libs: # fix install name first: - subprocess.Popen(["install_name_tool", "-id",lib,lib], stdout=subprocess.PIPE).communicate()[0] - long_deps = subprocess.Popen(["otool", "-L",lib], stdout=subprocess.PIPE).communicate()[0].split('\n') + subprocess.Popen(["install_name_tool", "-id", lib, lib], stdout=subprocess.PIPE).communicate()[0] # NOQA: ignore=E501 + long_deps = subprocess.Popen(["otool", "-L", lib], stdout=subprocess.PIPE).communicate()[0].split('\n') # NOQA: ignore=E501 deps = [dep.partition(' ')[0][1::] for dep in long_deps[2:-1]] # fix all dependencies: for dep in deps: for loc in libs: if dep == os.path.basename(loc): - subprocess.Popen(["install_name_tool", "-change",dep,loc,lib], stdout=subprocess.PIPE).communicate()[0] + subprocess.Popen(["install_name_tool", "-change", dep, loc, lib], stdout=subprocess.PIPE).communicate()[0] # NOQA: ignore=E501 break @@ -433,7 +440,7 @@ def to_link_flags(library): dir = os.path.dirname(library) # Asume libXYZ.suffix name = os.path.basename(library)[3:].split(".")[0] - res = '-L%s -l%s' % (dir,name) + res = '-L%s -l%s' % (dir, name) return res -- cgit v1.2.3-70-g09d2 From 6d714e4425d91370548d0ff6f138959149a82386 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 15 Jun 2016 18:31:39 +0200 Subject: flake8 fixes for superlu-dist --- .../repos/builtin/packages/superlu-dist/package.py | 36 +++++++++++++--------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index d24f03c230..e51d7224d9 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -25,8 +25,10 @@ from spack import * import glob + class SuperluDist(Package): - """A general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations on high performance machines.""" + """A general purpose library for the direct solution of large, sparse, + nonsymmetric systems of linear equations on high performance machines.""" homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/" url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz" @@ -36,11 +38,11 @@ class SuperluDist(Package): version('4.1', '4edee38cc29f687bd0c8eb361096a455') version('4.0', 'c0b98b611df227ae050bc1635c6940e0') - depends_on ('mpi') - depends_on ('blas') - depends_on ('lapack') - depends_on ('parmetis') - depends_on ('metis@5:') + depends_on('mpi') + depends_on('blas') + depends_on('lapack') + depends_on('parmetis') + depends_on('metis@5:') def install(self, spec, prefix): makefile_inc = [] @@ -49,25 +51,28 @@ class SuperluDist(Package): 'DSuperLUroot = %s' % self.stage.source_path, 'DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist.a', 'BLASDEF = -DUSE_VENDOR_BLAS', - 'BLASLIB = %s %s' % (to_link_flags(spec['lapack'].lapack_shared_lib),to_link_flags(spec['blas'].blas_shared_lib)), + 'BLASLIB = %s %s' % + (to_link_flags(spec['lapack'].lapack_shared_lib), + to_link_flags(spec['blas'].blas_shared_lib)), 'METISLIB = -L%s -lmetis' % spec['metis'].prefix.lib, 'PARMETISLIB = -L%s -lparmetis' % spec['parmetis'].prefix.lib, 'FLIBS =', - 'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)', + 'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)', # NOQA: ignore=E501 'ARCH = ar', 'ARCHFLAGS = cr', 'RANLIB = true', 'CC = %s' % spec['mpi'].mpicc, - 'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %(spec['parmetis'].prefix.include, spec['metis'].prefix.include), + 'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' % + (spec['parmetis'].prefix.include, + spec['metis'].prefix.include), 'NOOPTS = -fPIC -std=c99', 'FORTRAN = %s' % spec['mpi'].mpif77, 'F90FLAGS = -O2', 'LOADER = %s' % spec['mpi'].mpif77, 'LOADOPTS =', 'CDEFS = -DAdd_' - ]) + ]) - #with working_dir('src'): with open('make.inc', 'w') as fh: fh.write('\n'.join(makefile_inc)) @@ -82,9 +87,10 @@ class SuperluDist(Package): mkdirp(headers_location) mkdirp(prefix.lib) - headers = glob.glob(join_path(self.stage.source_path, 'SRC','*.h')) + headers = glob.glob(join_path(self.stage.source_path, 'SRC', '*.h')) for h in headers: - install(h,headers_location) + install(h, headers_location) - superludist_lib = join_path(self.stage.source_path, 'lib/libsuperlu_dist.a') - install(superludist_lib,self.prefix.lib) + superludist_lib = join_path(self.stage.source_path, + 'lib/libsuperlu_dist.a') + install(superludist_lib, self.prefix.lib) -- cgit v1.2.3-70-g09d2 From 6390acc660cfa1a402cd89ee9c2f7688ea1d6229 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 15 Jun 2016 18:32:42 +0200 Subject: flake8 fixes for petsc --- var/spack/repos/builtin/packages/petsc/package.py | 45 +++++++++++++---------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 697dc56214..8dd1d8d2b9 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -28,8 +28,9 @@ from spack import * class Petsc(Package): """ - PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applications - modeled by partial differential equations. + PETSc is a suite of data structures and routines for the scalable + (parallel) solution of scientific applications modeled by partial + differential equations. """ homepage = "http://www.mcs.anl.gov/petsc/index.html" @@ -71,8 +72,9 @@ class Petsc(Package): depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('parmetis', when='+metis+mpi') # Hypre does not support complex numbers. - # Also PETSc prefer to build it without internal superlu, likely due to conflict in headers - # see https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py + # Also PETSc prefer to build it without internal superlu, likely due to + # conflict in headers see + # https://bitbucket.org/petsc/petsc/src/90564b43f6b05485163c147b464b5d6d28cde3ef/config/BuildSystem/config/packages/hypre.py # NOQA: ignore=E501 depends_on('hypre~internal-superlu', when='+hypre+mpi~complex') depends_on('superlu-dist@:4.3', when='@:3.6.4+superlu-dist+mpi') depends_on('superlu-dist@5.0.0:', when='@3.7:+superlu-dist+mpi') @@ -83,17 +85,17 @@ class Petsc(Package): if '~mpi' in self.spec: compiler_opts = [ '--with-cc=%s' % os.environ['CC'], - '--with-cxx=%s' % (os.environ['CXX'] if self.compiler.cxx is not None else '0'), - '--with-fc=%s' % (os.environ['FC'] if self.compiler.fc is not None else '0'), + '--with-cxx=%s' % (os.environ['CXX'] if self.compiler.cxx is not None else '0'), # NOQA: ignore=E501 + '--with-fc=%s' % (os.environ['FC'] if self.compiler.fc is not None else '0'), # NOQA: ignore=E501 '--with-mpi=0' ] - error_message_fmt = '\t{library} support requires "+mpi" to be activated' + error_message_fmt = '\t{library} support requires "+mpi" to be activated' # NOQA: ignore=E501 - # If mpi is disabled (~mpi), it's an error to have any of these enabled. - # This generates a list of any such errors. + # If mpi is disabled (~mpi), it's an error to have any of these + # enabled. This generates a list of any such errors. errors = [error_message_fmt.format(library=x) - for x in ('hdf5', 'hypre', 'parmetis','mumps','superlu-dist') - if ('+'+x) in self.spec] + for x in ('hdf5', 'hypre', 'parmetis', 'mumps', 'superlu-dist') # NOQA: ignore=E501 + if ('+' + x) in self.spec] if errors: errors = ['incompatible variants given'] + errors raise RuntimeError('\n'.join(errors)) @@ -108,26 +110,31 @@ class Petsc(Package): options = ['--with-ssl=0'] options.extend(self.mpi_dependent_options()) options.extend([ - '--with-precision=%s' % ('double' if '+double' in spec else 'single'), - '--with-scalar-type=%s' % ('complex' if '+complex' in spec else 'real'), + '--with-precision=%s' % ('double' if '+double' in spec else 'single'), # NOQA: ignore=E501 + '--with-scalar-type=%s' % ('complex' if '+complex' in spec else 'real'), # NOQA: ignore=E501 '--with-shared-libraries=%s' % ('1' if '+shared' in spec else '0'), '--with-debugging=%s' % ('1' if '+debug' in spec else '0'), '--with-blas-lapack-dir=%s' % spec['lapack'].prefix ]) # Activates library support if needed - for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis','mumps','scalapack'): + for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis', + 'mumps', 'scalapack'): options.append( - '--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0')) + '--with-{library}={value}'.format(library=library, value=('1' if library in spec else '0')) # NOQA: ignore=E501 ) if library in spec: options.append( - '--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix) + '--with-{library}-dir={path}'.format(library=library, path=spec[library].prefix) # NOQA: ignore=E501 ) - # PETSc does not pick up SuperluDist from the dir as they look for superlu_dist_4.1.a + # PETSc does not pick up SuperluDist from the dir as they look for + # superlu_dist_4.1.a if 'superlu-dist' in spec: options.extend([ - '--with-superlu_dist-include=%s' % spec['superlu-dist'].prefix.include, - '--with-superlu_dist-lib=%s' % join_path(spec['superlu-dist'].prefix.lib, 'libsuperlu_dist.a'), + '--with-superlu_dist-include=%s' % + spec['superlu-dist'].prefix.include, + '--with-superlu_dist-lib=%s' % + join_path(spec['superlu-dist'].prefix.lib, + 'libsuperlu_dist.a'), '--with-superlu_dist=1' ]) else: -- cgit v1.2.3-70-g09d2 From e76083205f09cd19feae91c6779fc70f229af2b6 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 15 Jun 2016 18:33:08 +0200 Subject: flake8 fixes for slepc --- var/spack/repos/builtin/packages/slepc/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py index a14ede39c4..d3739bf6a6 100644 --- a/var/spack/repos/builtin/packages/slepc/package.py +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -42,8 +42,8 @@ class Slepc(Package): depends_on('petsc@3.7:', when='@3.7.1:') depends_on('petsc@3.6.3:3.6.4', when='@3.6.2:3.6.3') - depends_on('arpack-ng~mpi',when='+arpack^petsc~mpi') - depends_on('arpack-ng+mpi',when='+arpack^petsc+mpi') + depends_on('arpack-ng~mpi', when='+arpack^petsc~mpi') + depends_on('arpack-ng+mpi', when='+arpack^petsc+mpi') def install(self, spec, prefix): # set SLEPC_DIR for installation @@ -67,7 +67,7 @@ class Slepc(Package): configure('--prefix=%s' % prefix, *options) make('MAKE_NP=%s' % make_jobs, parallel=False) - #FIXME: + # FIXME: # make('test') make('install') -- cgit v1.2.3-70-g09d2 From 5fe531050c33f874882adcbe3a657628fe8cd517 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 15 Jun 2016 18:33:34 +0200 Subject: flake8 fixes for dealii --- var/spack/repos/builtin/packages/dealii/package.py | 33 +++++++++++----------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index d459976cfe..23ec74abed 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -80,7 +80,7 @@ class Dealii(Package): 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 + 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("trilinos", when='+trilinos+mpi') @@ -108,12 +108,11 @@ class Dealii(Package): # of Spack's. Be more specific to avoid this. # Note that both lapack and blas are provided in -DLAPACK_XYZ. '-DLAPACK_FOUND=true', - '-DLAPACK_INCLUDE_DIRS=%s;%s' % - (spec['lapack'].prefix.include, - spec['blas'].prefix.include), - '-DLAPACK_LIBRARIES=%s;%s' % - (spec['lapack'].lapack_shared_lib, - spec['blas'].blas_shared_lib), + '-DLAPACK_INCLUDE_DIRS=%s;%s' % ( + spec['lapack'].prefix.include, spec['blas'].prefix.include), + '-DLAPACK_LIBRARIES=%s;%s' % ( + spec['lapack'].lapack_shared_lib, + spec['blas'].blas_shared_lib), '-DMUPARSER_DIR=%s' % spec['muparser'].prefix, '-DUMFPACK_DIR=%s' % spec['suite-sparse'].prefix, '-DTBB_DIR=%s' % spec['tbb'].prefix, @@ -168,14 +167,14 @@ class Dealii(Package): if '+netcdf' in spec: options.extend([ '-DNETCDF_FOUND=true', - '-DNETCDF_LIBRARIES=%s;%s' % - (join_path(spec['netcdf-cxx'].prefix.lib, - 'libnetcdf_c++.%s' % dsuf), - join_path(spec['netcdf'].prefix.lib, - 'libnetcdf.%s' % dsuf)), - '-DNETCDF_INCLUDE_DIRS=%s;%s' % - (spec['netcdf-cxx'].prefix.include, - spec['netcdf'].prefix.include), + '-DNETCDF_LIBRARIES=%s;%s' % ( + join_path(spec['netcdf-cxx'].prefix.lib, + 'libnetcdf_c++.%s' % dsuf), + join_path(spec['netcdf'].prefix.lib, + 'libnetcdf.%s' % dsuf)), + '-DNETCDF_INCLUDE_DIRS=%s;%s' % ( + spec['netcdf-cxx'].prefix.include, + spec['netcdf'].prefix.include), ]) else: options.extend([ @@ -266,9 +265,9 @@ class Dealii(Package): 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;)', + filter_file(r'(LA::MPI::PreconditionAMG::AdditionalData data;)', # NOQA: ignore=E501 (''), 'step-40.cc') - filter_file(r'(preconditioner.initialize\(system_matrix, data\);)', + 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') -- cgit v1.2.3-70-g09d2 From 0e04e65ae0108437e6bf5d3e2233cdbc775fd136 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 15 Jun 2016 18:44:59 +0200 Subject: trilinos: specify superlu-dist version dependency --- var/spack/repos/builtin/packages/trilinos/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index cebcf1d360..3a53ac5c01 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -91,7 +91,8 @@ class Trilinos(Package): # work at the end. But let's avoid all this by simply using shared libs depends_on('mumps@5.0:+mpi+shared', when='+mumps') depends_on('scalapack', when='+mumps') - depends_on('superlu-dist', when='+superlu-dist') + depends_on('superlu-dist@:4.3', when='@:12.6.1+superlu-dist') + depends_on('superlu-dist', when='@12.6.2:+superlu-dist') depends_on('hypre~internal-superlu', when='+hypre') depends_on('hdf5+mpi', when='+hdf5') depends_on('python', when='+python') -- cgit v1.2.3-70-g09d2 From 716f12dd580cb6f78f085d94e5a45679ba6c8041 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 15 Jun 2016 12:48:40 -0400 Subject: reindex: preserve 'explicit' flags Look up in the old database whether the spec was explicit or not and preserve it into the new database. Fixes #1050. --- lib/spack/spack/database.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index e768ddf5fe..59d577f0c7 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -309,7 +309,11 @@ class Database(object): for spec in directory_layout.all_specs(): # Create a spec for each known package and add it. path = directory_layout.path_for_spec(spec) - self._add(spec, path, directory_layout) + old_info = old_data.get(spec.dag_hash()) + explicit = False + if old_info is not None: + explicit = old_info.explicit + self._add(spec, path, directory_layout, explicit=explicit) self._check_ref_counts() -- cgit v1.2.3-70-g09d2 From 9d99042fed2abad1ccb22669bc1dfa298d495768 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 3 Jun 2016 15:12:10 -0500 Subject: Add Psi4 package --- var/spack/repos/builtin/packages/boost/package.py | 2 +- var/spack/repos/builtin/packages/psi4/package.py | 84 +++++++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/psi4/package.py diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 8a49672824..d833054e33 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -25,7 +25,6 @@ from spack import * import spack import sys - import os @@ -91,6 +90,7 @@ class Boost(Package): 'system', 'test', 'thread', + 'timer', 'wave']) # mpi/python are not installed by default because they pull in many diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py new file mode 100644 index 0000000000..5c2ce369c9 --- /dev/null +++ b/var/spack/repos/builtin/packages/psi4/package.py @@ -0,0 +1,84 @@ +############################################################################## +# 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 Psi4(Package): + """Psi4 is an open-source suite of ab initio quantum chemistry + programs designed for efficient, high-accuracy simulations of + a variety of molecular properties.""" + + homepage = "http://www.psicode.org/" + url = "https://github.com/psi4/psi4/archive/0.5.tar.gz" + + version('0.5', '53041b8a9be3958384171d0d22f9fdd0') + + variant('mpi', default=True, description='Enable MPI parallelization') + + # Required dependencies + depends_on('python@2.7:') + depends_on('py-numpy') + depends_on('blas') + depends_on('lapack') + depends_on('cmake@3.0:') + depends_on('boost@1.55.0:+chrono+filesystem~mpi+python+regex+serialization+system+timer+thread', when='~mpi') + depends_on('boost@1.55.0:+chrono+filesystem+mpi+python+regex+serialization+system+timer+thread', when='+mpi') + + # Optional dependencies + depends_on('mpi', when='+mpi') + # TODO: add packages for these + # depends_on('perl') + # depends_on('erd') + # depends_on('pcm-solver') + # depends_on('chemps2') + + def install(self, spec, prefix): + cmake_args = [ + '-DBLAS_TYPE={0}'.format(spec['blas'].name.upper()), + '-DBLAS_LIBRARIES={0}'.format(spec['blas'].blas_shared_lib), + '-DLAPACK_TYPE={0}'.format(spec['lapack'].name.upper()), + '-DLAPACK_LIBRARIES={0}'.format(spec['lapack'].lapack_shared_lib), + '-DBOOST_INCLUDEDIR={0}'.format(spec['boost'].prefix.include), + '-DBOOST_LIBRARYDIR={0}'.format(spec['boost'].prefix.lib), + '-DENABLE_CHEMPS2=OFF' + ] + + if '+mpi' in spec: + cmake_args.extend([ + '-DENABLE_MPI=ON' + #'-DMPI_C_COMPILER={0}'.format(spec['mpi'].mpicc) + #'-DMPI_C_INCLUDE_PATH={0}'.format(spec['mpi'].prefix.include), + ]) + else: + cmake_args.append('-DENABLE_MPI=OFF') + + cmake_args.extend(std_cmake_args) + + with working_dir('spack-build', create=True): + cmake('..', *cmake_args) + + make() + #ctest() + make('install') -- cgit v1.2.3-70-g09d2 From deb4f919cf64717036ee0c8c1b6cb00d46b579aa Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 13 Jun 2016 16:14:16 -0500 Subject: Psi4 tweaks --- var/spack/repos/builtin/packages/psi4/package.py | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py index 5c2ce369c9..e02dc65fd4 100644 --- a/var/spack/repos/builtin/packages/psi4/package.py +++ b/var/spack/repos/builtin/packages/psi4/package.py @@ -38,13 +38,13 @@ class Psi4(Package): variant('mpi', default=True, description='Enable MPI parallelization') # Required dependencies - depends_on('python@2.7:') - depends_on('py-numpy') depends_on('blas') depends_on('lapack') - depends_on('cmake@3.0:') - depends_on('boost@1.55.0:+chrono+filesystem~mpi+python+regex+serialization+system+timer+thread', when='~mpi') - depends_on('boost@1.55.0:+chrono+filesystem+mpi+python+regex+serialization+system+timer+thread', when='+mpi') + depends_on('boost+chrono+filesystem~mpi+python+regex+serialization+system+timer+thread', when='~mpi') + depends_on('boost+chrono+filesystem+mpi+python+regex+serialization+system+timer+thread', when='+mpi') + depends_on('python') + depends_on('cmake') + depends_on('py-numpy') # Optional dependencies depends_on('mpi', when='+mpi') @@ -62,23 +62,15 @@ class Psi4(Package): '-DLAPACK_LIBRARIES={0}'.format(spec['lapack'].lapack_shared_lib), '-DBOOST_INCLUDEDIR={0}'.format(spec['boost'].prefix.include), '-DBOOST_LIBRARYDIR={0}'.format(spec['boost'].prefix.lib), + '-DENABLE_MPI={0}'.format('ON' if '+mpi' in spec else 'OFF'), '-DENABLE_CHEMPS2=OFF' ] - if '+mpi' in spec: - cmake_args.extend([ - '-DENABLE_MPI=ON' - #'-DMPI_C_COMPILER={0}'.format(spec['mpi'].mpicc) - #'-DMPI_C_INCLUDE_PATH={0}'.format(spec['mpi'].prefix.include), - ]) - else: - cmake_args.append('-DENABLE_MPI=OFF') - cmake_args.extend(std_cmake_args) with working_dir('spack-build', create=True): cmake('..', *cmake_args) make() - #ctest() + # ctest() make('install') -- cgit v1.2.3-70-g09d2 From 9cf1257be4b6203f5a90ee5b410902daafa53d7b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 14 Jun 2016 11:19:05 -0500 Subject: Filter compilers --- var/spack/repos/builtin/packages/psi4/package.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py index e02dc65fd4..4bd47302ab 100644 --- a/var/spack/repos/builtin/packages/psi4/package.py +++ b/var/spack/repos/builtin/packages/psi4/package.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import os class Psi4(Package): @@ -74,3 +75,26 @@ class Psi4(Package): make() # ctest() make('install') + + self.filter_compilers() + + def filter_compilers(self): + """Run after install to tell the configuration files to + use the compilers that Spack built the package with. + + If this isn't done, they'll have PLUGIN_CXX set to + Spack's generic cxx. We want it to be bound to + whatever compiler it was built with.""" + + kwargs = {'ignore_absent': True, 'backup': False, 'string': True} + + cc_files = ['bin/psi4-config'] + cxx_files = ['bin/psi4-config', 'include/psi4/psiconfig.h'] + + for filename in cc_files: + filter_file(os.environ['CC'], self.compiler.cc, + os.path.join(self.prefix, filename), **kwargs) + + for filename in cxx_files: + filter_file(os.environ['CXX'], self.compiler.cxx, + os.path.join(self.prefix, filename), **kwargs) -- cgit v1.2.3-70-g09d2 From 7b97ea248a355d0dd763facd808722dfb1632f14 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 15 Jun 2016 09:33:13 -0500 Subject: More template filtering --- var/spack/repos/builtin/packages/psi4/package.py | 26 +++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py index 4bd47302ab..74f1554336 100644 --- a/var/spack/repos/builtin/packages/psi4/package.py +++ b/var/spack/repos/builtin/packages/psi4/package.py @@ -73,12 +73,12 @@ class Psi4(Package): cmake('..', *cmake_args) make() - # ctest() + ctest() make('install') - self.filter_compilers() + self.filter_compilers(spec) - def filter_compilers(self): + def filter_compilers(self, spec): """Run after install to tell the configuration files to use the compilers that Spack built the package with. @@ -90,6 +90,7 @@ class Psi4(Package): cc_files = ['bin/psi4-config'] cxx_files = ['bin/psi4-config', 'include/psi4/psiconfig.h'] + template = 'share/psi4/plugin/Makefile.template' for filename in cc_files: filter_file(os.environ['CC'], self.compiler.cc, @@ -98,3 +99,22 @@ class Psi4(Package): for filename in cxx_files: filter_file(os.environ['CXX'], self.compiler.cxx, os.path.join(self.prefix, filename), **kwargs) + + # The binary still keeps track of the compiler used to install Psi4 + # and uses it when creating a plugin template + filter_file('@PLUGIN_CXX@', self.compiler.cxx, + os.path.join(self.prefix, template), **kwargs) + + # The binary links to the build include directory instead of the + # installation include directory: + # https://github.com/psi4/psi4/issues/410 + filter_file('@PLUGIN_INCLUDES@', '-I{0}'.format( + ' -I'.join( + spec['psi4'].prefix.include, + spec['boost'].prefix.include, + spec['lapack'].prefix.include, + spec['blas'].prefix.include, + spec['python'].prefix.include, + '/usr/include' + ) + ), os.path.join(self.prefix, template), **kwargs) -- cgit v1.2.3-70-g09d2 From 44e188f1111ce4251a756d92cae7c5a7e0ed41fe Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 15 Jun 2016 13:55:51 -0500 Subject: Remove MPI support, fix INCLUDE filters --- var/spack/repos/builtin/packages/psi4/package.py | 37 ++++++++++-------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/var/spack/repos/builtin/packages/psi4/package.py b/var/spack/repos/builtin/packages/psi4/package.py index 74f1554336..fc77ba7412 100644 --- a/var/spack/repos/builtin/packages/psi4/package.py +++ b/var/spack/repos/builtin/packages/psi4/package.py @@ -36,19 +36,15 @@ class Psi4(Package): version('0.5', '53041b8a9be3958384171d0d22f9fdd0') - variant('mpi', default=True, description='Enable MPI parallelization') - # Required dependencies depends_on('blas') depends_on('lapack') - depends_on('boost+chrono+filesystem~mpi+python+regex+serialization+system+timer+thread', when='~mpi') - depends_on('boost+chrono+filesystem+mpi+python+regex+serialization+system+timer+thread', when='+mpi') + depends_on('boost+chrono+filesystem+python+regex+serialization+system+timer+thread') depends_on('python') depends_on('cmake') depends_on('py-numpy') # Optional dependencies - depends_on('mpi', when='+mpi') # TODO: add packages for these # depends_on('perl') # depends_on('erd') @@ -63,7 +59,6 @@ class Psi4(Package): '-DLAPACK_LIBRARIES={0}'.format(spec['lapack'].lapack_shared_lib), '-DBOOST_INCLUDEDIR={0}'.format(spec['boost'].prefix.include), '-DBOOST_LIBRARYDIR={0}'.format(spec['boost'].prefix.lib), - '-DENABLE_MPI={0}'.format('ON' if '+mpi' in spec else 'OFF'), '-DENABLE_CHEMPS2=OFF' ] @@ -73,12 +68,11 @@ class Psi4(Package): cmake('..', *cmake_args) make() - ctest() make('install') - self.filter_compilers(spec) + self.filter_compilers(spec, prefix) - def filter_compilers(self, spec): + def filter_compilers(self, spec, prefix): """Run after install to tell the configuration files to use the compilers that Spack built the package with. @@ -94,27 +88,28 @@ class Psi4(Package): for filename in cc_files: filter_file(os.environ['CC'], self.compiler.cc, - os.path.join(self.prefix, filename), **kwargs) + os.path.join(prefix, filename), **kwargs) for filename in cxx_files: filter_file(os.environ['CXX'], self.compiler.cxx, - os.path.join(self.prefix, filename), **kwargs) + os.path.join(prefix, filename), **kwargs) # The binary still keeps track of the compiler used to install Psi4 # and uses it when creating a plugin template filter_file('@PLUGIN_CXX@', self.compiler.cxx, - os.path.join(self.prefix, template), **kwargs) + os.path.join(prefix, template), **kwargs) # The binary links to the build include directory instead of the # installation include directory: # https://github.com/psi4/psi4/issues/410 filter_file('@PLUGIN_INCLUDES@', '-I{0}'.format( - ' -I'.join( - spec['psi4'].prefix.include, - spec['boost'].prefix.include, - spec['lapack'].prefix.include, - spec['blas'].prefix.include, - spec['python'].prefix.include, - '/usr/include' - ) - ), os.path.join(self.prefix, template), **kwargs) + ' -I'.join([ + os.path.join(spec['psi4'].prefix.include, 'psi4'), + os.path.join(spec['boost'].prefix.include, 'boost'), + os.path.join(spec['python'].prefix.include, 'python{0}'.format( + spec['python'].version.up_to(2))), + spec['lapack'].prefix.include, + spec['blas'].prefix.include, + '/usr/include' + ]) + ), os.path.join(prefix, template), **kwargs) -- cgit v1.2.3-70-g09d2 From daa46105a71f99946b26e1fa9836f0bb27897ceb Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 15 Jun 2016 21:37:12 +0200 Subject: mpich based providers : shortened filter_compilers --- var/spack/repos/builtin/packages/mpich/package.py | 17 ++++----------- .../repos/builtin/packages/mvapich2/package.py | 24 +++++----------------- 2 files changed, 9 insertions(+), 32 deletions(-) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 511beafbbd..ea1844aea0 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -106,22 +106,13 @@ class Mpich(Package): mpif77 = join_path(bin, 'mpif77') mpif90 = join_path(bin, 'mpif90') - spack_cc = env['CC'] - spack_cxx = env['CXX'] - spack_f77 = env['F77'] - spack_fc = env['FC'] - # Substitute Spack compile wrappers for the real # underlying compiler kwargs = {'ignore_absent': True, 'backup': False, 'string': True} - filter_file('CC="%s"' % spack_cc, - 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) - filter_file('CXX="%s"' % spack_cxx, - 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) - filter_file('F77="%s"' % spack_f77, - 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) - filter_file('FC="%s"' % spack_fc, - 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) + filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs) + filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs) + filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs) + filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs) # Remove this linking flag if present # (it turns RPATH into RUNPATH) diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 131d430cf2..34bace10d6 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -249,27 +249,13 @@ class Mvapich2(Package): mpif77 = join_path(bin, 'mpif77') mpif90 = join_path(bin, 'mpif90') - spack_cc = env['CC'] - spack_cxx = env['CXX'] - spack_f77 = env['F77'] - spack_fc = env['FC'] - - kwargs = { - 'ignore_absent': True, - 'backup': False, - 'string': True - } - # Substitute Spack compile wrappers for the real # underlying compiler - filter_file('CC="%s"' % spack_cc, - 'CC="%s"' % self.compiler.cc, mpicc, **kwargs) - filter_file('CXX="%s"' % spack_cxx, - 'CXX="%s"' % self.compiler.cxx, mpicxx, **kwargs) - filter_file('F77="%s"' % spack_f77, - 'F77="%s"' % self.compiler.f77, mpif77, **kwargs) - filter_file('FC="%s"' % spack_fc, - 'FC="%s"' % self.compiler.fc, mpif90, **kwargs) + kwargs = {'ignore_absent': True, 'backup': False, 'string': True} + filter_file(env['CC'], self.compiler.cc, mpicc, **kwargs) + filter_file(env['CXX'], self.compiler.cxx, mpicxx, **kwargs) + filter_file(env['F77'], self.compiler.f77, mpif77, **kwargs) + filter_file(env['FC'], self.compiler.fc, mpif90, **kwargs) # Remove this linking flag if present # (it turns RPATH into RUNPATH) -- cgit v1.2.3-70-g09d2 From ea80c8d3c3a0690dcb357840cfb0db824f44fdc9 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 15 Jun 2016 14:38:53 -0500 Subject: Ignore E501 for depends_on and extends --- share/spack/qa/run-flake8 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/spack/qa/run-flake8 b/share/spack/qa/run-flake8 index 44eb0167fb..57534eb6e2 100755 --- a/share/spack/qa/run-flake8 +++ b/share/spack/qa/run-flake8 @@ -29,6 +29,8 @@ for file in $changed; do 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 + perl -i -pe 's/^(\s*depends_on\(.*\).*)$/\1 # NOQA: ignore=E501/' $file + perl -i -pe 's/^(\s*extends\(.*\).*)$/\1 # NOQA: ignore=E501/' $file # Exempt '@when' decorated functions from redefinition errors. perl -i -pe 's/^(\s*\@when\(.*\).*)$/\1 # NOQA: ignore=F811/' $file -- cgit v1.2.3-70-g09d2 From a7ab064a9e2361bd92bd80826908efc6122075d5 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 15 Jun 2016 18:05:23 -0400 Subject: Update OpenMPI to 1.10.3 --- var/spack/repos/builtin/packages/openmpi/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 0638628a6c..fe06afd9fb 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -61,6 +61,7 @@ class Openmpi(Package): list_url = "http://www.open-mpi.org/software/ompi/" list_depth = 3 + version('1.10.3', 'e2fe4513200e2aaa1500b762342c674b') version('1.10.2', 'b2f43d9635d2d52826e5ef9feb97fd4c') version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e') version('1.10.0', '280cf952de68369cebaca886c5ce0304') -- cgit v1.2.3-70-g09d2 From 2fc9ac4036eb017164cc6ac6f19e50dab5008759 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Wed, 15 Jun 2016 16:39:39 -0700 Subject: Two minor fixes --- lib/spack/spack/compilers/__init__.py | 10 +++++----- lib/spack/spack/yaml_version_check.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index ea79f655b0..c76dd252d0 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -74,7 +74,7 @@ def _to_dict(compiler): d['spec'] = str(compiler.spec) d['paths'] = dict( (attr, getattr(compiler, attr, None)) for attr in _path_instance_vars ) d['operating_system'] = compiler.operating_system.to_dict() - d['modules'] = compiler.modules + d['modules'] = compiler.modules if compiler.modules else [] if not compiler.alias: yaml_text = yaml.dump( @@ -141,11 +141,11 @@ def remove_compiler_from_config(compiler_spec, scope=None): - scope: configuration scope to modify. """ compiler_config = get_compiler_config(scope) - matches = [(a,c) for (a,c) in compiler_config.items() if c['spec'] == compiler_spec] + matches = [(a,c) for (a,c) in compiler_config.items() if c['spec'] == compiler_spec] if len(matches) == 1: del compiler_config[matches[0][0]] else: - CompilerSpecInsufficientlySpecificError(compiler_spec) + CompilerSpecInsufficientlySpecificError(compiler_spec) spack.config.update_config('compilers', compiler_config, scope) @@ -234,7 +234,7 @@ def compilers_for_spec(compiler_spec, scope=None): continue items = cmp alias = aka - + if not ('paths' in items and all(n in items['paths'] for n in _path_instance_vars)): raise InvalidCompilerConfigurationError(cspec) @@ -309,7 +309,7 @@ def all_os_classes(): this platform """ classes = [] - + platform = spack.architecture.sys_type() for os_class in platform.operating_sys.values(): classes.append(os_class) diff --git a/lib/spack/spack/yaml_version_check.py b/lib/spack/spack/yaml_version_check.py index 7e7bae4edf..2d3d78ed39 100644 --- a/lib/spack/spack/yaml_version_check.py +++ b/lib/spack/spack/yaml_version_check.py @@ -46,10 +46,10 @@ def check_compiler_yaml_version(): if data: compilers = data['compilers'].items() if len(compilers) > 0: - if 'operating_system' not in compilers[0][1]: + if (not isinstance(compilers, list)) or 'operating_system' not in compilers[0][1]: new_file = os.path.join(scope.path, '_old_compilers.yaml') - tty.warn('%s in out of date compilers format. ' + tty.warn('%s in out of date compilers format. ' 'Moved to %s. Spack automatically generate ' - 'a compilers config file ' + 'a compilers config file ' % (file_name, new_file)) os.rename(file_name, new_file) -- cgit v1.2.3-70-g09d2 From 1724ff565877eb36267d6947c0d900609b1bd198 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Wed, 15 Jun 2016 20:21:02 -0700 Subject: do not create shebang.bak file --- lib/spack/spack/hooks/sbang.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/spack/spack/hooks/sbang.py b/lib/spack/spack/hooks/sbang.py index 83d67ea225..601c2420b5 100644 --- a/lib/spack/spack/hooks/sbang.py +++ b/lib/spack/spack/hooks/sbang.py @@ -34,6 +34,7 @@ import spack.modules # here, as it is the shortest I could find on a modern OS. shebang_limit = 127 + def shebang_too_long(path): """Detects whether a file has a shebang line that is too long.""" with open(path, 'r') as script: @@ -57,16 +58,10 @@ def filter_shebang(path): if original.startswith(new_sbang_line): return - backup = path + ".shebang.bak" - os.rename(path, backup) - with open(path, 'w') as new_file: new_file.write(new_sbang_line) new_file.write(original) - copy_mode(backup, path) - unset_executable_mode(backup) - tty.warn("Patched overly long shebang in %s" % path) -- cgit v1.2.3-70-g09d2 From d4df4375d561dfd7d31069e2801a9405ab06be63 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Wed, 15 Jun 2016 20:32:08 -0700 Subject: removed unused import per flake8 report --- lib/spack/spack/hooks/sbang.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/spack/spack/hooks/sbang.py b/lib/spack/spack/hooks/sbang.py index 601c2420b5..cb0ad42b14 100644 --- a/lib/spack/spack/hooks/sbang.py +++ b/lib/spack/spack/hooks/sbang.py @@ -24,7 +24,6 @@ ############################################################################## import os -from llnl.util.filesystem import * import llnl.util.tty as tty import spack -- cgit v1.2.3-70-g09d2 From c90cc465f581514d18fc4fc95649f015cb178079 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 16 Jun 2016 00:54:59 -0700 Subject: Add `__contains__` to arch to satsify old packages. --- lib/spack/spack/architecture.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 1f25bc14ea..df0ab5c14d 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -195,7 +195,7 @@ class Platform(object): name = self.back_os return self.operating_sys.get(name, None) - + @classmethod def detect(self): @@ -206,12 +206,15 @@ class Platform(object): """ raise NotImplementedError() + def __repr__(self): return self.__str__() + def __str__(self): return self.name + def _cmp_key(self): t_keys = ''.join(str(t._cmp_key()) for t in sorted(self.targets.values())) @@ -338,7 +341,6 @@ class OperatingSystem(object): d = {} d['name'] = self.name d['version'] = self.version - return d @key_ordering @@ -378,6 +380,11 @@ class Arch(object): else: return '' + + def __contains__(self, string): + return string in str(self) + + def _cmp_key(self): if isinstance(self.platform, Platform): platform = self.platform.name -- cgit v1.2.3-70-g09d2 From f3d6818d5c09766946652266188c7210c56f027c Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 16 Jun 2016 00:55:39 -0700 Subject: be more tolerant when parsing new specs. --- lib/spack/spack/spec.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 7718adb72c..54219ec1b4 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -526,7 +526,12 @@ class Spec(object): """ valid_flags = FlagMap.valid_compiler_flags() if name == 'arch' or name == 'architecture': - platform, op_sys, target = value.split('-') + parts = value.split('-') + if len(parts) == 3: + platform, op_sys, target = parts + else: + platform, op_sys, target = None, None, value + assert(self.architecture.platform is None) assert(self.architecture.platform_os is None) assert(self.architecture.target is None) @@ -596,11 +601,13 @@ class Spec(object): def _set_os(self, value): """Called by the parser to set the architecture operating system""" - self.architecture.platform_os = self.architecture.platform.operating_system(value) + if self.architecture.platform: + self.architecture.platform_os = self.architecture.platform.operating_system(value) def _set_target(self, value): """Called by the parser to set the architecture target""" - self.architecture.target = self.architecture.platform.target(value) + if self.architecture.platform: + self.architecture.target = self.architecture.platform.target(value) def _add_dependency(self, spec): """Called by the parser to add another spec as a dependency.""" @@ -1063,7 +1070,7 @@ class Spec(object): feq(replacement.architecture, spec.architecture) and feq(replacement.dependencies, spec.dependencies) and feq(replacement.variants, spec.variants) and - feq(replacement.external, spec.external) and + feq(replacement.external, spec.external) and feq(replacement.external_module, spec.external_module)): continue # Refine this spec to the candidate. This uses @@ -1468,7 +1475,7 @@ class Spec(object): if self.architecture.target != other.architecture.target: raise UnsatisfiableArchitectureSpecError(self.architecture, other.architecture) - + changed = False if self.compiler is not None and other.compiler is not None: @@ -1619,7 +1626,7 @@ class Spec(object): # Architecture satisfaction is currently just string equality. # If not strict, None means unconstrained. if self.architecture and other.architecture: - if ((self.architecture.platform and other.architecture.platform and self.architecture.platform != other.architecture.platform) or + if ((self.architecture.platform and other.architecture.platform and self.architecture.platform != other.architecture.platform) or (self.architecture.platform_os and other.architecture.platform_os and self.architecture.platform_os != other.architecture.platform_os) or (self.architecture.target and other.architecture.target and self.architecture.target != other.architecture.target)): return False -- cgit v1.2.3-70-g09d2 From 40d25d90629f41114c2e0b86bb659f0f4dec7bb5 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 16 Jun 2016 00:56:53 -0700 Subject: Add libxcb dependencies. Fix up packages to get py-basemap and stat to build. --- .../repos/builtin/packages/binutils/package.py | 3 +- var/spack/repos/builtin/packages/boost/package.py | 2 +- .../builtin/packages/libpthread-stubs/package.py | 39 +++++++++++++++++++ var/spack/repos/builtin/packages/libxau/package.py | 44 ++++++++++++++++++++++ var/spack/repos/builtin/packages/libxcb/package.py | 7 ++-- .../repos/builtin/packages/openssl/package.py | 2 +- .../builtin/packages/xorg-util-macros/package.py | 38 +++++++++++++++++++ var/spack/repos/builtin/packages/xproto/package.py | 41 ++++++++++++++++++++ 8 files changed, 170 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/libpthread-stubs/package.py create mode 100644 var/spack/repos/builtin/packages/libxau/package.py create mode 100644 var/spack/repos/builtin/packages/xorg-util-macros/package.py create mode 100644 var/spack/repos/builtin/packages/xproto/package.py diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 9e4cc98ae6..5f305abb02 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -30,8 +30,9 @@ class Binutils(Package): url="https://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2" + # 2.26 is incompatible with py-pillow build for some reason. version('2.26', '64146a0faa3b411ba774f47d41de239f') - version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66') + version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66', preferred=True) version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b') version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e') version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764') diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 2f2965eb12..1f216a146a 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -128,7 +128,7 @@ class Boost(Package): dots, underscores) def determine_toolset(self, spec): - if spec.satisfies("arch=darwin-x86_64"): + if spec.satisfies("platform=darwin"): return 'darwin' toolsets = {'g++': 'gcc', diff --git a/var/spack/repos/builtin/packages/libpthread-stubs/package.py b/var/spack/repos/builtin/packages/libpthread-stubs/package.py new file mode 100644 index 0000000000..4bcca43c24 --- /dev/null +++ b/var/spack/repos/builtin/packages/libpthread-stubs/package.py @@ -0,0 +1,39 @@ +############################################################################## +# 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 LibpthreadStubs(Package): + """The libpthread-stubs package provides weak aliases for pthread + functions not provided in libc or otherwise available by + default. """ + homepage = "http://xcb.freedesktop.org/" + url = "http://xcb.freedesktop.org/dist/libpthread-stubs-0.1.tar.bz2" + + version('0.3', 'e8fa31b42e13f87e8f5a7a2b731db7ee') + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libxau/package.py b/var/spack/repos/builtin/packages/libxau/package.py new file mode 100644 index 0000000000..55816ecdbd --- /dev/null +++ b/var/spack/repos/builtin/packages/libxau/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 Libxau(Package): + """The libXau package contains a library implementing the X11 + Authorization Protocol. This is useful for restricting client + access to the display.""" + homepage = "http://xcb.freedesktop.org/" + url = "http://ftp.x.org/pub/individual/lib/libXau-1.0.8.tar.bz2" + + version('1.0.8', '685f8abbffa6d145c0f930f00703b21b') + + depends_on('xproto') + + def install(self, spec, prefix): + # FIXME: Modify the configure line to suit your build system here. + configure('--prefix=%s' % prefix) + + # FIXME: Add logic to build and install here + make() + make("install") diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index 0f39bb0f1d..746d4567e2 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -35,18 +35,19 @@ class Libxcb(Package): version('1.11', '1698dd837d7e6e94d029dbe8b3a82deb') version('1.11.1', '118623c15a96b08622603a71d8789bf3') + depends_on("python") depends_on("xcb-proto") depends_on("pkg-config") - - # depends_on('pthread') # Ubuntu: apt-get install libpthread-stubs0-dev - # depends_on('xau') # Ubuntu: apt-get install libxau-dev + depends_on("libpthread-stubs") + depends_on('libxau') def patch(self): filter_file('typedef struct xcb_auth_info_t {', 'typedef struct {', 'src/xcb.h') def install(self, spec, prefix): + env['PKG_CONFIG_PATH'] = env['PKG_CONFIG_PATH'] + ':/usr/lib64/pkgconfig' configure("--prefix=%s" % prefix) make() diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 34ab0703ad..377bffe723 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -100,7 +100,7 @@ class Openssl(Package): # in the environment, then this will override what is set in the # Makefile, leading to build errors. env.pop('APPS', None) - if spec.satisfies("arch=darwin-x86_64") or spec.satisfies("arch=ppc64"): + if spec.satisfies("target=x86_64") or spec.satisfies("target=ppc64"): # This needs to be done for all 64-bit architectures (except Linux, # where it happens automatically?) env['KERNEL_BITS'] = '64' diff --git a/var/spack/repos/builtin/packages/xorg-util-macros/package.py b/var/spack/repos/builtin/packages/xorg-util-macros/package.py new file mode 100644 index 0000000000..963d93442f --- /dev/null +++ b/var/spack/repos/builtin/packages/xorg-util-macros/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 XorgUtilMacros(Package): + """The util-macros package contains the m4 macros used by all of the Xorg packages.""" + + homepage = "http://www.example.com" + url = "http://ftp.x.org/pub/individual/util/util-macros-1.19.0.tar.bz2" + + version('1.19.0', '1cf984125e75f8204938d998a8b6c1e1') + + def install(self, spec, prefix): + configure("--prefix=%s" % prefix) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/xproto/package.py b/var/spack/repos/builtin/packages/xproto/package.py new file mode 100644 index 0000000000..7be6defb83 --- /dev/null +++ b/var/spack/repos/builtin/packages/xproto/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 Xproto(Package): + """The Xorg protocol headers provide the header files required to + build the system, and to allow other applications to build against + the installed X Window system.""" + homepage = "http://www.x.org/" + url = "https://www.x.org/archive//individual/proto/xproto-7.0.29.tar.gz" + + version('7.0.29', '16a78dd2c5ad73011105c96235f6a0af') + + depends_on("xorg-util-macros") + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix) + make() + make("install") -- cgit v1.2.3-70-g09d2 From 76dfaa71a7f59d8c94c415819c57cb191a0e4a4a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 16 Jun 2016 01:47:20 -0700 Subject: fix up packages for new architecture. --- var/spack/repos/builtin/packages/espresso/package.py | 2 +- var/spack/repos/builtin/packages/libpciaccess/package.py | 2 +- var/spack/repos/builtin/packages/llvm/package.py | 12 ++++++------ var/spack/repos/builtin/packages/lua/package.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index ef6a3ccc7b..63a5560137 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -87,7 +87,7 @@ class Espresso(Package): configure(*options) make('all') - if spec.architecture.startswith('darwin'): + if spec.satisfies('platform=darwin'): mkdirp(prefix.bin) for filename in glob("bin/*.x"): install(filename, prefix.bin) diff --git a/var/spack/repos/builtin/packages/libpciaccess/package.py b/var/spack/repos/builtin/packages/libpciaccess/package.py index 42e8711a7d..91cef95cec 100644 --- a/var/spack/repos/builtin/packages/libpciaccess/package.py +++ b/var/spack/repos/builtin/packages/libpciaccess/package.py @@ -37,7 +37,7 @@ class Libpciaccess(Package): def install(self, spec, prefix): # libpciaccess does not support OS X - if spec.satisfies('arch=darwin-x86_64'): + if spec.satisfies('platform=darwin'): # create a dummy directory mkdir(prefix.lib) return diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index c32f66590a..7a6ea7401c 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -267,16 +267,16 @@ class Llvm(Package): if '+all_targets' not in spec: # all is default on cmake targets = ['CppBackend', 'NVPTX', 'AMDGPU'] - if 'x86' in spec.architecture.lower(): + if 'x86' in spec.architecture.target.lower(): targets.append('X86') - elif 'arm' in spec.architecture.lower(): + elif 'arm' in spec.architecture.target.lower(): targets.append('ARM') - elif 'aarch64' in spec.architecture.lower(): + elif 'aarch64' in spec.architecture.target.lower(): targets.append('AArch64') - elif 'sparc' in spec.architecture.lower(): + elif 'sparc' in spec.architecture.target.lower(): targets.append('sparc') - elif ('ppc' in spec.architecture.lower() or - 'power' in spec.architecture.lower()): + elif ('ppc' in spec.architecture.target.lower() or + 'power' in spec.architecture.target.lower()): targets.append('PowerPC') cmake_args.append('-DLLVM_TARGETS_TO_BUILD:Bool=' + ';'.join(targets)) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 170f90516a..1424cf1a17 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -57,7 +57,7 @@ class Lua(Package): placement='luarocks') def install(self, spec, prefix): - if spec.satisfies("arch=darwin-i686") or spec.satisfies("arch=darwin-x86_64"): + if spec.satisfies("platform=darwin"): target = 'macosx' else: target = 'linux' -- cgit v1.2.3-70-g09d2 From 88b671f8b1a82ec9d9365c296d77e251a821a66c Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 16 Jun 2016 02:06:19 -0700 Subject: Just call old os "unknown" --- lib/spack/spack/architecture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index df0ab5c14d..4485bbe840 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -451,7 +451,7 @@ def arch_from_dict(d): if isinstance(d, basestring): # We have an old spec using a string for the architecture arch.platform = Platform('spack_compatibility') - arch.platform_os = OperatingSystem('pre_version', '1.0') + arch.platform_os = OperatingSystem('unknown', '') arch.target = Target(d) arch.os_string = None -- cgit v1.2.3-70-g09d2 From 8d9ffcf5650adaca13e85b158022c8b8fed72caf Mon Sep 17 00:00:00 2001 From: alalazo Date: Thu, 16 Jun 2016 11:22:26 +0200 Subject: espresso : updated to 5.4.0, added Parallel=False --- var/spack/repos/builtin/packages/espresso/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index ef6a3ccc7b..7359978ce1 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -34,6 +34,11 @@ class Espresso(Package): homepage = 'http://quantum-espresso.org' url = 'http://www.qe-forge.org/gf/download/frsrelease/204/912/espresso-5.3.0.tar.gz' + version( + '5.4.0', + '8bb78181b39bd084ae5cb7a512c1cfe7', + url='http://www.qe-forge.org/gf/download/frsrelease/211/968/espresso-5.4.0.tar.gz' + ) version('5.3.0', '6848fcfaeb118587d6be36bd10b7f2c3') variant('mpi', default=True, description='Build Quantum-ESPRESSO with mpi support') @@ -49,6 +54,10 @@ class Espresso(Package): depends_on('fftw+mpi', when='+mpi') depends_on('scalapack', when='+scalapack+mpi') # TODO : + mpi needed to avoid false dependencies installation + # Spurious problems running in parallel the Makefile + # generated by qe configure + parallel = False + def check_variants(self, spec): error = 'you cannot ask for \'+{variant}\' when \'+mpi\' is not active' if '+scalapack' in spec and '~mpi' in spec: -- cgit v1.2.3-70-g09d2 From a1cbb73f8b18f30b30e4ba68e54dfc859d6cd0fa Mon Sep 17 00:00:00 2001 From: alalazo Date: Thu, 16 Jun 2016 11:24:18 +0200 Subject: qa : fixed flake8 issues --- var/spack/repos/builtin/packages/espresso/package.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/espresso/package.py b/var/spack/repos/builtin/packages/espresso/package.py index 7359978ce1..30966d8de9 100644 --- a/var/spack/repos/builtin/packages/espresso/package.py +++ b/var/spack/repos/builtin/packages/espresso/package.py @@ -26,10 +26,13 @@ from spack import * import os + class Espresso(Package): """ - QE is an integrated suite of Open-Source computer codes for electronic-structure calculations and materials - modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials. + QE is an integrated suite of Open-Source computer codes for + electronic-structure calculations and materials modeling at + the nanoscale. It is based on density-functional theory, plane + waves, and pseudopotentials. """ homepage = 'http://quantum-espresso.org' url = 'http://www.qe-forge.org/gf/download/frsrelease/204/912/espresso-5.3.0.tar.gz' @@ -41,10 +44,10 @@ class Espresso(Package): ) version('5.3.0', '6848fcfaeb118587d6be36bd10b7f2c3') - variant('mpi', default=True, description='Build Quantum-ESPRESSO with mpi support') + variant('mpi', default=True, description='Builds with mpi support') variant('openmp', default=False, description='Enables openMP support') variant('scalapack', default=True, description='Enables scalapack support') - variant('elpa', default=True, description='Use elpa as an eigenvalue solver') + variant('elpa', default=True, description='Uses elpa as an eigenvalue solver') depends_on('blas') depends_on('lapack') @@ -52,7 +55,8 @@ class Espresso(Package): depends_on('mpi', when='+mpi') depends_on('fftw~mpi', when='~mpi') depends_on('fftw+mpi', when='+mpi') - depends_on('scalapack', when='+scalapack+mpi') # TODO : + mpi needed to avoid false dependencies installation + # TODO : + mpi needed to avoid false dependencies installation + depends_on('scalapack', when='+scalapack+mpi') # Spurious problems running in parallel the Makefile # generated by qe configure @@ -102,4 +106,3 @@ class Espresso(Package): install(filename, prefix.bin) else: make('install') - -- cgit v1.2.3-70-g09d2 From 17b868381f95fa324f7c6327c0977b303975de76 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 16 Jun 2016 02:55:33 -0700 Subject: Fixes #460: Do not show variants by default in spack find. This does two things: 1. By default `spack find` no longer shows variants. You have to supply `-v` to get that 2. This improves the `colify` implementation so that it no longer pads the rightmost column. This avoids the issue where if one spec was too long in the output, *all* specs would have space padding added to that width, and it would look like the output of `spack find` was double spaced. This no longer happens -- the one bad line wraps around and the other lines are now single-spaced when you use `-v` with boost. --- lib/spack/llnl/util/tty/colify.py | 9 +++++++-- lib/spack/spack/cmd/find.py | 19 +++++++++++++------ lib/spack/spack/cmd/uninstall.py | 13 ++++++++++--- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/lib/spack/llnl/util/tty/colify.py b/lib/spack/llnl/util/tty/colify.py index 429ba45882..81a83691d7 100644 --- a/lib/spack/llnl/util/tty/colify.py +++ b/lib/spack/llnl/util/tty/colify.py @@ -198,8 +198,13 @@ def colify(elts, **options): for col in xrange(cols): elt = col * rows + row width = config.widths[col] + cextra(elts[elt]) - fmt = '%%-%ds' % width - output.write(fmt % elts[elt]) + if col < cols - 1: + fmt = '%%-%ds' % width + output.write(fmt % elts[elt]) + else: + # Don't pad the rightmost column (sapces can wrap on + # small teriminals if one line is overlong) + output.write(elts[elt]) output.write("\n") row += 1 diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index 9649bc7435..3ec671f93f 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -86,6 +86,11 @@ def setup_parser(subparser): action='store_true', dest='missing', help='Show missing dependencies as well as installed specs.') + subparser.add_argument( + '-v', '--variants', + action='store_true', + dest='variants', + help='Show variants in output (can be long)') subparser.add_argument('-M', '--only-missing', action='store_true', dest='only_missing', @@ -107,6 +112,8 @@ def display_specs(specs, **kwargs): mode = kwargs.get('mode', 'short') hashes = kwargs.get('long', False) namespace = kwargs.get('namespace', False) + flags = kwargs.get('show_flags', False) + variants = kwargs.get('variants', False) hlen = 7 if kwargs.get('very_long', False): @@ -114,10 +121,9 @@ def display_specs(specs, **kwargs): hlen = None nfmt = '.' if namespace else '_' - format_string = '$%s$@$+' % nfmt - flags = kwargs.get('show_flags', False) - if flags: - format_string = '$%s$@$%%+$+' % nfmt + ffmt = '$%+' if flags else '' + vfmt = '$+' if variants else '' + format_string = '$%s$@%s%s' % (nfmt, ffmt, vfmt) # Make a dict with specs keyed by architecture and compiler. index = index_by(specs, ('architecture', 'compiler')) @@ -163,7 +169,7 @@ def display_specs(specs, **kwargs): string = "" if hashes: string += gray_hash(s, hlen) + ' ' - string += s.format('$-%s$@$+' % nfmt, color=True) + string += s.format('$-%s$@%s' % (nfmt, vfmt), color=True) return string @@ -238,4 +244,5 @@ def find(parser, args): long=args.long, very_long=args.very_long, show_flags=args.show_flags, - namespace=args.namespace) + namespace=args.namespace, + variants=args.variants) diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 9fdf3045b2..a6f08d09ed 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -39,6 +39,13 @@ error_message = """You can either: b) use spack uninstall -a to uninstall ALL matching specs. """ +# Arguments for display_specs when we find ambiguity +display_args = { + 'long': True, + 'show_flags': True, + 'variants':True +} + def ask_for_confirmation(message): while True: @@ -92,7 +99,7 @@ def concretize_specs(specs, allow_multiple_matches=False, force=False): if not allow_multiple_matches and len(matching) > 1: tty.error("%s matches multiple packages:" % spec) print() - display_specs(matching, long=True, show_flags=True) + display_specs(matching, **display_args) print() has_errors = True @@ -172,7 +179,7 @@ def uninstall(parser, args): tty.error("Will not uninstall %s" % spec.format("$_$@$%@$#", color=True)) print('') print("The following packages depend on it:") - display_specs(lst, long=True) + display_specs(lst, **display_args) print('') has_error = True elif args.dependents: @@ -186,7 +193,7 @@ def uninstall(parser, args): if not args.yes_to_all: tty.msg("The following packages will be uninstalled : ") print('') - display_specs(uninstall_list, long=True, show_flags=True) + display_specs(uninstall_list, **display_args) print('') ask_for_confirmation('Do you want to proceed ? ') -- cgit v1.2.3-70-g09d2 From 6b037706023c6cc138709d4cbca91d81d32cc4c4 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 16 Jun 2016 09:44:37 -0700 Subject: Added str method to mac_osx so that whenever we try to access darwins different operating systems we can grab the name correctly. This avoids having to worry whether we have a version attached to it or not. --- lib/spack/spack/operating_systems/mac_osx.py | 9 ++++----- lib/spack/spack/platforms/darwin.py | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/operating_systems/mac_osx.py b/lib/spack/spack/operating_systems/mac_osx.py index a9de03d2cc..3cf9b4e12e 100644 --- a/lib/spack/spack/operating_systems/mac_osx.py +++ b/lib/spack/spack/operating_systems/mac_osx.py @@ -21,9 +21,8 @@ class MacOsx(OperatingSystem): "10.11": "elcapitan"} mac_ver = py_platform.mac_ver()[0][:-2] - try: - name = mac_releases[mac_ver] - except KeyError: - name = "mac_os" - + name = mac_releases.get(mac_ver, "mac_osx") super(MacOsx, self).__init__(name, mac_ver) + + def __str__(self): + return self.name diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py index 7901f82d06..8c8af83d55 100644 --- a/lib/spack/spack/platforms/darwin.py +++ b/lib/spack/spack/platforms/darwin.py @@ -13,11 +13,11 @@ class Darwin(Platform): self.add_target(self.default, Target(self.default)) mac_os = MacOsx() - self.default_os = mac_os.name - self.front_os = mac_os.name - self.back_os = mac_os.name + self.default_os = str(mac_os) + self.front_os = str(mac_os) + self.back_os = str(mac_os) - self.add_operating_system(mac_os.name, mac_os) + self.add_operating_system(str(mac_os), mac_os) @classmethod def detect(self): -- cgit v1.2.3-70-g09d2 From a5aa159d9d0fc97cc9ae882e7325f19438ce597a Mon Sep 17 00:00:00 2001 From: alalazo Date: Thu, 16 Jun 2016 19:23:16 +0200 Subject: flake8: ignore F405 --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 12ae2efa80..286522bc48 100644 --- a/.flake8 +++ b/.flake8 @@ -19,5 +19,5 @@ # - F999: name name be undefined or undefined from star imports. # [flake8] -ignore = E221,E241,E731,F403,F821,F999 +ignore = E221,E241,E731,F403,F821,F999,F405 max-line-length = 79 -- cgit v1.2.3-70-g09d2 From c7dfa1699a2898250e51bdcccc4eb568161a7c1c Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 16 Jun 2016 10:43:12 -0700 Subject: rename Mac OS X to macos --- lib/spack/spack/operating_systems/mac_os.py | 29 ++++++++++++++++++++++++++++ lib/spack/spack/operating_systems/mac_osx.py | 28 --------------------------- lib/spack/spack/platforms/darwin.py | 6 +++--- lib/spack/spack/test/operating_system.py | 13 +++++-------- 4 files changed, 37 insertions(+), 39 deletions(-) create mode 100644 lib/spack/spack/operating_systems/mac_os.py delete mode 100644 lib/spack/spack/operating_systems/mac_osx.py diff --git a/lib/spack/spack/operating_systems/mac_os.py b/lib/spack/spack/operating_systems/mac_os.py new file mode 100644 index 0000000000..f35b3ca577 --- /dev/null +++ b/lib/spack/spack/operating_systems/mac_os.py @@ -0,0 +1,29 @@ +import platform as py_platform +from spack.architecture import OperatingSystem + +class MacOs(OperatingSystem): + """This class represents the macOS operating system. This will be + auto detected using the python platform.mac_ver. The macOS + platform will be represented using the major version operating + system name, i.e el capitan, yosemite...etc. + """ + + def __init__(self): + """ Autodetects the mac version from a dictionary. Goes back as + far as 10.6 snowleopard. If the user has an older mac then + the version will just be a generic mac_os. + """ + mac_releases = {'10.6': "snowleopard", + "10.7": "lion", + "10.8": "mountainlion", + "10.9": "mavericks", + "10.10": "yosemite", + "10.11": "elcapitan", + "10.12": "sierra"} + + mac_ver = py_platform.mac_ver()[0][:-2] + name = mac_releases.get(mac_ver, "macos") + super(MacOs, self).__init__(name, mac_ver) + + def __str__(self): + return self.name diff --git a/lib/spack/spack/operating_systems/mac_osx.py b/lib/spack/spack/operating_systems/mac_osx.py deleted file mode 100644 index 3cf9b4e12e..0000000000 --- a/lib/spack/spack/operating_systems/mac_osx.py +++ /dev/null @@ -1,28 +0,0 @@ -import platform as py_platform -from spack.architecture import OperatingSystem - -class MacOsx(OperatingSystem): - """ This class represents the MAC_OSX operating system. This will be auto - detected using the python platform.mac_ver. The MAC_OSX platform - will be represented using the major version operating system name, i.e - el capitan, yosemite...etc. - """ - - def __init__(self): - """ Autodetects the mac version from a dictionary. Goes back as - far as 10.6 snowleopard. If the user has an older mac then - the version will just be a generic mac_os. - """ - mac_releases = {'10.6': "snowleopard", - "10.7": "lion", - "10.8": "mountainlion", - "10.9": "mavericks", - "10.10": "yosemite", - "10.11": "elcapitan"} - - mac_ver = py_platform.mac_ver()[0][:-2] - name = mac_releases.get(mac_ver, "mac_osx") - super(MacOsx, self).__init__(name, mac_ver) - - def __str__(self): - return self.name diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py index 8c8af83d55..d47dd640f9 100644 --- a/lib/spack/spack/platforms/darwin.py +++ b/lib/spack/spack/platforms/darwin.py @@ -1,6 +1,6 @@ import subprocess from spack.architecture import Platform, Target -from spack.operating_systems.mac_osx import MacOsx +from spack.operating_systems.mac_os import MacOs class Darwin(Platform): priority = 89 @@ -11,8 +11,8 @@ class Darwin(Platform): def __init__(self): super(Darwin, self).__init__('darwin') self.add_target(self.default, Target(self.default)) - mac_os = MacOsx() - + mac_os = MacOs() + self.default_os = str(mac_os) self.front_os = str(mac_os) self.back_os = str(mac_os) diff --git a/lib/spack/spack/test/operating_system.py b/lib/spack/spack/test/operating_system.py index 205408db3f..ed5f6ff8ad 100644 --- a/lib/spack/spack/test/operating_system.py +++ b/lib/spack/spack/test/operating_system.py @@ -10,7 +10,7 @@ from spack.platforms.cray_xc import CrayXc from spack.platforms.linux import Linux from spack.platforms.darwin import Darwin from spack.operating_system.linux_distro import LinuxDistro -from spack.operating_system.mac_osx import MacOSX +from spack.operating_system.mac_os import MacOs from spack.operating_system.cnl import ComputeNodeLinux class TestOperatingSystem(unittest.TestCase): @@ -27,12 +27,12 @@ class TestOperatingSystem(unittest.TestCase): def test_cray_front_end_operating_system(self): self.assertIsInstance(self.cray_operating_sys, LinuxDistro) - + def test_cray_front_end_compiler_strategy(self): self.assertEquals(self.cray_operating_sys.compiler_strategy, "PATH") def test_cray_back_end_operating_system(self): - self.assertIsInstance(self.cray_back_os,ComputeNodeLinux) + self.assertIsInstance(self.cray_back_os,ComputeNodeLinux) def test_cray_back_end_compiler_strategy(self): self.assertEquals(self.cray_back_os.compiler_strategy, "MODULES") @@ -43,16 +43,13 @@ class TestOperatingSystem(unittest.TestCase): def test_linux_compiler_strategy(self): self.assertEquals(self.linux_operating_sys.compiler_strategy, "PATH") - + def test_cray_front_end_compiler_list(self): """ Operating systems will now be in charge of finding compilers. So, depending on which operating system you want to build for - or which operating system you are on, then you could detect + or which operating system you are on, then you could detect compilers in a certain way. Cray linux environment on the front end is just a regular linux distro whereas the Cray linux compute node is a stripped down version which modules are important """ self.assertEquals(True, False) - - - -- cgit v1.2.3-70-g09d2 From 8867adf9428dedd42dfc92efece2a3f7498400e0 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 16 Jun 2016 10:43:36 -0700 Subject: simplify instance check. --- lib/spack/spack/architecture.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 4485bbe840..cbac7b41d6 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -424,8 +424,7 @@ def _operating_system_from_dict(os_name, platform=None): """ if not platform: platform = sys_type() - if isinstance(os_name, spack.util.spack_yaml.syaml_dict) or \ - isinstance(os_name, dict): + if isinstance(os_name, dict): name = os_name['name'] version = os_name['version'] return platform.operating_system(name+version) -- cgit v1.2.3-70-g09d2 From f60ae61652397c614b2e6100eb17dcdc5a99164b Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 16 Jun 2016 10:44:15 -0700 Subject: remove dead code, cleanup. --- lib/spack/spack/test/architecture.py | 19 ++++--------- lib/spack/spack/test/spec_semantics.py | 49 +++++++++++++++------------------- 2 files changed, 26 insertions(+), 42 deletions(-) diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index 3d08269dee..a6847c5744 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -23,7 +23,7 @@ class ArchitectureTest(MockPackagesTest): def tearDown(self): super(ArchitectureTest, self).tearDown() - + def test_dict_functions_for_architecture(self): arch = Arch() arch.platform = spack.architecture.sys_type() @@ -46,14 +46,6 @@ class ArchitectureTest(MockPackagesTest): self.assertTrue( isinstance(new_arch.target, Target) ) -# def test_platform_class_and_compiler_strategies(self): -# a = CrayXc() -# t = a.operating_system('default_os') -# self.assertEquals(t.compiler_strategy, 'MODULES') -# b = Linux() -# s = b.operating_system('default_os') -# self.assertEquals(s.compiler_strategy, 'PATH') - def test_sys_type(self): output_platform_class = sys_type() my_arch_class = None @@ -101,12 +93,12 @@ class ArchitectureTest(MockPackagesTest): def test_user_input_combination(self): os_list = self.platform.operating_sys.keys() - target_list = self.platform.targets.keys() + target_list = self.platform.targets.keys() additional = ["fe", "be", "frontend", "backend"] os_list.extend(additional) - target_list.extend(additional) - + target_list.extend(additional) + combinations = itertools.product(os_list, target_list) results = [] for arch in combinations: @@ -117,5 +109,4 @@ class ArchitectureTest(MockPackagesTest): results.append(spec.architecture.target == self.platform.target(t)) res = all(results) - self.assertTrue(res) - + self.assertTrue(res) diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 0b2111bfe8..9876bfd5a8 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -108,7 +108,8 @@ class SpecSematicsTest(MockPackagesTest): def test_satisfies_namespaced_dep(self): - """Ensure spec from same or unspecified namespace satisfies namespace constraint.""" + """Ensure spec from same or unspecified namespace satisfies namespace + constraint.""" self.check_satisfies('mpileaks ^builtin.mock.mpich', '^mpich') self.check_satisfies('mpileaks ^builtin.mock.mpich', '^mpi') @@ -141,29 +142,17 @@ class SpecSematicsTest(MockPackagesTest): def test_satisfies_architecture(self): platform = spack.architecture.sys_type() - self.check_satisfies('foo platform=test target=frontend os=frontend', 'platform=test target=frontend os=frontend') - self.check_satisfies('foo platform=test target=backend os=backend', 'platform=test target=backend', 'platform=test os=backend') - self.check_satisfies('foo platform=test target=default_target os=default_os','platform=test target=default_target os=default_os') + self.check_satisfies( + 'foo platform=test target=frontend os=frontend', + 'platform=test target=frontend os=frontend') + self.check_satisfies( + 'foo platform=test target=backend os=backend', + 'platform=test target=backend', 'platform=test os=backend') + self.check_satisfies( + 'foo platform=test target=default_target os=default_os', + 'platform=test target=default_target os=default_os') -#ifdef NEW - #def test_satisfies_architecture(self): - # self.check_satisfies('foo arch=chaos_5_x86_64_ib', ' arch=chaos_5_x86_64_ib') - # self.check_satisfies('foo arch=bgqos_0', ' arch=bgqos_0') - - # self.check_unsatisfiable('foo arch=bgqos_0', ' arch=chaos_5_x86_64_ib') - # self.check_unsatisfiable('foo arch=chaos_5_x86_64_ib', ' arch=bgqos_0') -#els#e /* not NEW */ - #def test_satisfies_target(self): - # platform = spack.architecture.sys_type() - # targets = platform.targets.values() - # for target in targets: - # self.check_satisfies('foo='+target.name, '='+target.name) -#end#if /* not NEW */ - - # for i in range(1,len(targets)): - # self.check_unsatisfiable('foo='+targets[i-1].name, '='+targets[i].name) - def test_satisfies_dependencies(self): self.check_satisfies('mpileaks^mpich', '^mpich') self.check_satisfies('mpileaks^zmpi', '^zmpi') @@ -176,10 +165,14 @@ class SpecSematicsTest(MockPackagesTest): self.check_satisfies('mpileaks^mpich@2.0', '^mpich@1:3') self.check_unsatisfiable('mpileaks^mpich@1.2', '^mpich@2.0') - self.check_satisfies('mpileaks^mpich@2.0^callpath@1.5', '^mpich@1:3^callpath@1.4:1.6') - self.check_unsatisfiable('mpileaks^mpich@4.0^callpath@1.5', '^mpich@1:3^callpath@1.4:1.6') - self.check_unsatisfiable('mpileaks^mpich@2.0^callpath@1.7', '^mpich@1:3^callpath@1.4:1.6') - self.check_unsatisfiable('mpileaks^mpich@4.0^callpath@1.7', '^mpich@1:3^callpath@1.4:1.6') + self.check_satisfies( + 'mpileaks^mpich@2.0^callpath@1.5', '^mpich@1:3^callpath@1.4:1.6') + self.check_unsatisfiable( + 'mpileaks^mpich@4.0^callpath@1.5', '^mpich@1:3^callpath@1.4:1.6') + self.check_unsatisfiable( + 'mpileaks^mpich@2.0^callpath@1.7', '^mpich@1:3^callpath@1.4:1.6') + self.check_unsatisfiable( + 'mpileaks^mpich@4.0^callpath@1.7', '^mpich@1:3^callpath@1.4:1.6') def test_satisfies_virtual_dependencies(self): @@ -390,7 +383,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_invalid_constraint('libelf debug=2', 'libelf debug=1') self.check_invalid_constraint('libelf cppflags="-O3"', 'libelf cppflags="-O2"') - self.check_invalid_constraint('libelf platform=test target=be os=be', + self.check_invalid_constraint('libelf platform=test target=be os=be', 'libelf target=fe os=fe') def test_constrain_changed(self): @@ -402,7 +395,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf', '~debug') self.check_constrain_changed('libelf', 'debug=2') self.check_constrain_changed('libelf', 'cppflags="-O3"') - + platform = spack.architecture.sys_type() self.check_constrain_changed('libelf', 'target='+platform.target('default_target').name) self.check_constrain_changed('libelf', 'os='+platform.operating_system('default_os').name) -- cgit v1.2.3-70-g09d2 From 005827ab234e4fdb8d8e298baa99573bb570e4c8 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 16 Jun 2016 12:12:29 -0700 Subject: Replace 2.6-incompatible skipIf with a conditional. - skipIf doesn't work with Python 2.6. --- lib/spack/spack/test/concretize.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index 67b20b4084..ab201f406a 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -253,10 +253,14 @@ class ConcretizeTest(MockPackagesTest): self.assertFalse('externalprereq' in spec) self.assertTrue(spec['externaltool'].compiler.satisfies('gcc')) - @unittest.skipIf(spack.architecture.sys_type().name == 'darwin' or - spack.architecture.sys_type().name == 'linux', - "No tcl modules on darwin/linux machines") + def test_external_package_module(self): + # No tcl modules on darwin/linux machines + # TODO: improved way to check for this. + if (spack.architecture.sys_type().name == 'darwin' or + spack.architecture.sys_type().name == 'linux'): + return + spec = Spec('externalmodule') spec.concretize() self.assertEqual(spec['externalmodule'].external_module, 'external-module') @@ -272,7 +276,7 @@ class ConcretizeTest(MockPackagesTest): got_error = True self.assertTrue(got_error) - + def test_external_and_virtual(self): spec = Spec('externaltest') spec.concretize() -- cgit v1.2.3-70-g09d2 From df84fe0b58522597c9c16e59ceeabb9c3163c1ea Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Thu, 16 Jun 2016 18:10:38 -0700 Subject: Added init_config parameter so we don't initialize the config when user runs spack compiler add. Should ONLY add what user specifies. Find compilers takes in paths parameter. --- lib/spack/spack/cmd/compiler.py | 6 +++-- lib/spack/spack/compilers/__init__.py | 44 +++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 030aa77c30..94d83512e1 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -77,10 +77,12 @@ def compiler_add(args): paths = get_path('PATH') compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) - if c.spec not in spack.compilers.all_compilers(scope=args.scope)] + if c.spec not in spack.compilers.all_compilers(scope=args.scope, + init_config=False)] if compilers: - spack.compilers.add_compilers_to_config(compilers, scope=args.scope) + spack.compilers.add_compilers_to_config(compilers, scope=args.scope, + init_config=False) n = len(compilers) s = 's' if n > 1 else '' filename = spack.config.get_config_filename(args.scope, 'compilers') diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 4b546c2cbf..6de2d87b32 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -79,12 +79,10 @@ def _to_dict(compiler): if compiler.alias: d['alias'] = compiler.alias - return { - 'compiler': d - } + return {'compiler': d} -def get_compiler_config(scope=None): +def get_compiler_config(scope=None, init_config=True): """Return the compiler configuration for the specified architecture. """ def init_compiler_config(): @@ -100,7 +98,8 @@ def get_compiler_config(scope=None): # configured. Avoid updating automatically if there ARE site # compilers configured but no user ones. # if (isinstance(arch, basestring) or arch == my_arch) and arch not in config: - if not config: + empty_config = [] + if not config and init_config: if scope is None: # We know no compilers were configured in any scope. init_compiler_config() @@ -112,18 +111,20 @@ def get_compiler_config(scope=None): if not site_config: init_compiler_config() config = spack.config.get_config('compilers', scope=scope) - - return config + return config + else: + return empty_config -def add_compilers_to_config(compilers, scope=None): +def add_compilers_to_config(compilers, scope=None, init_config=True): """Add compilers to the config for the specified architecture. Arguments: - compilers: a list of Compiler objects. - scope: configuration scope to modify. """ - compiler_config = get_compiler_config(scope) + compiler_config = get_compiler_config(scope, init_config) + print compiler_config for compiler in compilers: compiler_config.append(_to_dict(compiler)) @@ -148,25 +149,23 @@ def remove_compiler_from_config(compiler_spec, scope=None): spack.config.update_config('compilers', compiler_config, scope) _cache_config_file = {} - -def all_compilers_config(scope=None): +def all_compilers_config(scope=None, init_config=True): """Return a set of specs for all the compiler versions currently available to build with. These are instances of CompilerSpec. """ # Get compilers for this architecture. global _cache_config_file #Create a cache of the config file so we don't load all the time. - if not _cache_config_file: - _cache_config_file = get_compiler_config(scope) + _cache_config_file = get_compiler_config(scope, init_config) return _cache_config_file - else: return _cache_config_file -def all_compilers(scope=None): + +def all_compilers(scope=None, init_config=True): # Return compiler specs from the merged config. return [spack.spec.CompilerSpec(s['compiler']['spec']) - for s in all_compilers_config(scope)] + for s in all_compilers_config(scope, init_config)] def default_compiler(): @@ -181,7 +180,13 @@ def default_compiler(): return sorted(versions)[-1] -def find_compilers(): +def find_compilers(*paths): + """ Call find compilers help and return the list it finds using + the operating system method (PATHS, MODULES) """ + return _find_compilers(*paths) + + +def _find_compilers(*paths): """Return a list of compilers found in the suppied paths. This invokes the find_compilers() method for each operating system associated with the host platform, and appends @@ -190,9 +195,8 @@ def find_compilers(): # Find compilers for each operating system class oss = all_os_classes() compiler_lists = [] - for os in oss: - compiler_lists.extend(os.find_compilers()) - + for o in oss: + compiler_lists.extend(o.find_compilers(*paths)) return compiler_lists def supported_compilers(): -- cgit v1.2.3-70-g09d2 From 64acbbfcf03393eab99301f1e7843618c5547cf0 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 28 May 2016 20:19:45 -0500 Subject: Clean up R package files - remove unused imports - apply pep8 - reformat text strings --- var/spack/repos/builtin/packages/R/package.py | 44 ++++++++++++--------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 0177fe1a2b..727cd38461 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -22,28 +22,22 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -import functools -import glob -import inspect import os -import re -from contextlib import closing -import spack -from llnl.util.lang import match_predicate from spack import * from spack.util.environment import * class R(Package): - """ - R is 'GNU S', a freely available language and environment for statistical computing and graphics which provides a - wide variety of statistical and graphical techniques: linear and nonlinear modelling, statistical tests, time series - analysis, classification, clustering, etc. Please consult the R project homepage for further information. - """ + """R is 'GNU S', a freely available language and environment for + statistical computing and graphics which provides a wide variety of + statistical and graphical techniques: linear and nonlinear modelling, + statistical tests, time series analysis, classification, clustering, etc. + Please consult the R project homepage for further information.""" + homepage = "https://www.r-project.org" url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz" - + extendable = True version('3.2.3', '1ba3dac113efab69e706902810cc2970') @@ -53,7 +47,8 @@ class R(Package): version('3.1.3', '53a85b884925aa6b5811dfc361d73fc4') version('3.1.2', '3af29ec06704cbd08d4ba8d69250ae74') - variant('external-lapack', default=False, description='Links to externally installed BLAS/LAPACK') + variant('external-lapack', default=False, + description='Links to externally installed BLAS/LAPACK') # Virtual dependencies depends_on('blas', when='+external-lapack') @@ -106,25 +101,24 @@ class R(Package): r_libs_path = ':'.join(r_libs_path) spack_env.set('R_LIBS', r_libs_path) - # For run time environment set only the path for extension_spec and prepend it to R_LIBS + # For run time environment set only the path for extension_spec and + # prepend it to R_LIBS if extension_spec.package.extends(self.spec): - run_env.prepend_path('R_LIBS', os.path.join(extension_spec.prefix, self.r_lib_dir)) - + run_env.prepend_path('R_LIBS', os.path.join( + extension_spec.prefix, self.r_lib_dir)) def setup_dependent_package(self, module, ext_spec): - """ - Called before R modules' install() methods. - - In most cases, extensions will only need to have one line:: - - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) - """ + """Called before R modules' install() methods. In most cases, + extensions will only need to have one line: + R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % + self.stage.archive_file)""" # R extension builds can have a global R executable function module.R = Executable(join_path(self.spec.prefix.bin, 'R')) # Add variable for library directry module.r_lib_dir = os.path.join(ext_spec.prefix, self.r_lib_dir) - # Make the site packages directory for extensions, if it does not exist already. + # Make the site packages directory for extensions, if it does not exist + # already. if ext_spec.package.is_extension: mkdirp(module.r_lib_dir) -- cgit v1.2.3-70-g09d2 From 6649f9edc226742b4184b73106df5496ad66406a Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 28 May 2016 22:25:32 -0500 Subject: Add version 3.3.0 of R This commit adds the 3.3.0 version of R and adds dependencies on curl and pcre. --- var/spack/repos/builtin/packages/R/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 727cd38461..f4728bfd64 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.0', '5a7506c8813432d1621c9725e86baf7a') version('3.2.3', '1ba3dac113efab69e706902810cc2970') version('3.2.2', '57cef5c2e210a5454da1979562a10e5b') version('3.2.1', 'c2aac8b40f84e08e7f8c9068de9239a3') @@ -67,6 +68,8 @@ class R(Package): depends_on('freetype') depends_on('tcl') depends_on('tk') + depends_on('curl') + depends_on('pcre') def install(self, spec, prefix): rlibdir = join_path(prefix, 'rlib') -- cgit v1.2.3-70-g09d2 From cb3505769b57e9f7c06f42faf8b88dfb40db7ec9 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 28 May 2016 22:31:47 -0500 Subject: Clean up R extensions Run the existing R extension packages through autopep8 to clean up. --- var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 6 ++++-- var/spack/repos/builtin/packages/r-abind/package.py | 6 ++++-- var/spack/repos/builtin/packages/r-filehash/package.py | 6 ++++-- var/spack/repos/builtin/packages/r-magic/package.py | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index 0d3b6a3e57..1d994cc2ef 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -24,15 +24,17 @@ ############################################################################## from spack import * + class RBiocgenerics(Package): """S4 generic functions needed by many Bioconductor packages.""" homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html' - url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" + url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" version('0.16.1', 'c2148ffd86fc6f1f819c7f68eb2c744f', expand=False) extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) + R('CMD', 'INSTALL', '--library=%s' % + self.module.r_lib_dir, '%s' % self.stage.archive_file) diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py index 34a1eee79f..f9ac684aa4 100644 --- a/var/spack/repos/builtin/packages/r-abind/package.py +++ b/var/spack/repos/builtin/packages/r-abind/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class RAbind(Package): """Combine multidimensional arrays into a single array. This is a generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and @@ -31,7 +32,7 @@ class RAbind(Package): 'afill' for manipulating, extracting and replacing data in arrays.""" homepage = "https://cran.r-project.org/" - url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" + url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5', expand=False) @@ -39,4 +40,5 @@ class RAbind(Package): def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) + R('CMD', 'INSTALL', '--library=%s' % + self.module.r_lib_dir, '%s' % self.stage.archive_file) diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py index fffae68019..e59ba18fa3 100644 --- a/var/spack/repos/builtin/packages/r-filehash/package.py +++ b/var/spack/repos/builtin/packages/r-filehash/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class RFilehash(Package): """Implements a simple key-value style database where character string keys are associated with data values that are stored on the disk. A simple @@ -36,11 +37,12 @@ class RFilehash(Package): parties for use in the 'filehash' framework.""" homepage = 'https://cran.r-project.org/' - url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" + url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" version('2.3', '01fffafe09b148ccadc9814c103bdc2f', expand=False) extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) + R('CMD', 'INSTALL', '--library=%s' % + self.module.r_lib_dir, '%s' % self.stage.archive_file) diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py index f86917ec0c..ec4b9b9e41 100644 --- a/var/spack/repos/builtin/packages/r-magic/package.py +++ b/var/spack/repos/builtin/packages/r-magic/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class RMagic(Package): """A collection of efficient, vectorized algorithms for the creation and investigation of magic squares and hypercubes, including a variety of @@ -31,7 +32,7 @@ class RMagic(Package): arrays.""" homepage = "https://cran.r-project.org/" - url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" + url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029', expand=False) @@ -40,4 +41,5 @@ class RMagic(Package): depends_on('r-abind') def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file) + R('CMD', 'INSTALL', '--library=%s' % + self.module.r_lib_dir, '%s' % self.stage.archive_file) -- cgit v1.2.3-70-g09d2 From fe256870b47d8b0381c918e54a45c46229506bad Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 29 May 2016 15:26:34 -0500 Subject: Add variant for UTF support to pcre This will build PCRE with UTF support by default. That seems to be reasonable for most environments. --- var/spack/repos/builtin/packages/pcre/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py index 8e0f83110e..53b23a203d 100644 --- a/var/spack/repos/builtin/packages/pcre/package.py +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -29,6 +29,7 @@ class Pcre(Package): """The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.""" + homepage = "http://www.pcre.org""" url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2" @@ -37,7 +38,14 @@ class Pcre(Package): patch("intel.patch") + variant('utf', default=True, + description='Enable support for UTF-8/16/32, incompatible with EBCDIC.') + def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + configure_args = ['--prefix=%s' % prefix] + if '+utf' in spec: + configure_args.append('--enable-utf') + + configure(*configure_args) make() make("install") -- cgit v1.2.3-70-g09d2 From 8704a4ed35b5868a62cde613d85c3eeae27e5a5e Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 29 May 2016 16:06:03 -0500 Subject: Use configure_args rather than options Replaced 'options' with 'configure_args'. That seems like a better name and is consistent with the packaging guide. --- var/spack/repos/builtin/packages/R/package.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index f4728bfd64..af520082ec 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -73,15 +73,15 @@ class R(Package): def install(self, spec, prefix): rlibdir = join_path(prefix, 'rlib') - options = ['--prefix=%s' % prefix, - '--libdir=%s' % rlibdir, - '--enable-R-shlib', - '--enable-BLAS-shlib', - '--enable-R-framework=no'] + configure_args = ['--prefix=%s' % prefix, + '--libdir=%s' % rlibdir, + '--enable-R-shlib', + '--enable-BLAS-shlib', + '--enable-R-framework=no'] if '+external-lapack' in spec: - options.extend(['--with-blas', '--with-lapack']) + configure_args.extend(['--with-blas', '--with-lapack']) - configure(*options) + configure(*configure_args) make() make('install') @@ -111,7 +111,7 @@ class R(Package): extension_spec.prefix, self.r_lib_dir)) def setup_dependent_package(self, module, ext_spec): - """Called before R modules' install() methods. In most cases, + """Called before R modules' install() methods. In most cases, extensions will only need to have one line: R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)""" -- cgit v1.2.3-70-g09d2 From 37dc13edaf92c9fa45c0b82c736f5b40ed8172f7 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 29 May 2016 17:03:38 -0500 Subject: Update version of BiocGenerics The BioConductor repositories only keep the most recent version so this has to be bumped. --- var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index 1d994cc2ef..16a8027e3c 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -31,7 +31,7 @@ class RBiocgenerics(Package): homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html' url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" - version('0.16.1', 'c2148ffd86fc6f1f819c7f68eb2c744f', expand=False) + version('0.18.0', 'baaff00eb2c2b15396fed2f7f43e634c', expand=False) extends('R') -- cgit v1.2.3-70-g09d2 From 0e64c25ffc09d764eaeb11ffb0db93bb8baaf34a Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 29 May 2016 17:40:26 -0500 Subject: Fix flake8 errors Use Bioconductor provided Short URL for homepage in BiocGenerics. Wrap description text for utf variant in pcre. --- var/spack/repos/builtin/packages/pcre/package.py | 3 ++- var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/pcre/package.py b/var/spack/repos/builtin/packages/pcre/package.py index 53b23a203d..a43729a1ac 100644 --- a/var/spack/repos/builtin/packages/pcre/package.py +++ b/var/spack/repos/builtin/packages/pcre/package.py @@ -39,7 +39,8 @@ class Pcre(Package): patch("intel.patch") variant('utf', default=True, - description='Enable support for UTF-8/16/32, incompatible with EBCDIC.') + description='Enable support for UTF-8/16/32, ' + 'incompatible with EBCDIC.') def install(self, spec, prefix): configure_args = ['--prefix=%s' % prefix] diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index 16a8027e3c..d509bc3d84 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -28,8 +28,8 @@ from spack import * class RBiocgenerics(Package): """S4 generic functions needed by many Bioconductor packages.""" - homepage = 'https://www.bioconductor.org/packages/release/bioc/html/BiocGenerics.html' - url = "https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.16.1.tar.gz" + homepage = 'https://bioconductor.org/packages/BiocGenerics/' + url = 'https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.18.0.tar.gz' version('0.18.0', 'baaff00eb2c2b15396fed2f7f43e634c', expand=False) -- cgit v1.2.3-70-g09d2 From 7213b123245895ab3fe588c7b5656b68f648b99d Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 5 Jun 2016 20:12:11 -0500 Subject: Tweak how R packages are built. Add bzip2 as a dependency to base R. Switch from installing the R packages from tar files to installing from the extracted directory. This is more in line with a standard install and also allows installing from VCS. Use the Bioconductor version for BiocGenerics and future Bioconductor packages. Suffix the package with 'bioc-$version' to indicate which Bioconductor release the package is a part of. This is actually more important than the actual version attached to individual packages although those are subject to change within the Bioconductor branch. --- var/spack/repos/builtin/packages/R/package.py | 1 + var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 11 +++++++---- var/spack/repos/builtin/packages/r-abind/package.py | 4 ++-- var/spack/repos/builtin/packages/r-filehash/package.py | 4 ++-- var/spack/repos/builtin/packages/r-magic/package.py | 4 ++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index af520082ec..74dd95e5c2 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -61,6 +61,7 @@ class R(Package): depends_on('icu') depends_on('glib') depends_on('zlib') + depends_on('bzip2') depends_on('libtiff') depends_on('jpeg') depends_on('cairo') diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index d509bc3d84..ffd578a42c 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -29,12 +29,15 @@ class RBiocgenerics(Package): """S4 generic functions needed by many Bioconductor packages.""" homepage = 'https://bioconductor.org/packages/BiocGenerics/' - url = 'https://www.bioconductor.org/packages/release/bioc/src/contrib/BiocGenerics_0.18.0.tar.gz' - - version('0.18.0', 'baaff00eb2c2b15396fed2f7f43e634c', expand=False) + version('bioc-3.3', + git='https://github.com/Bioconductor-mirror/BiocGenerics.git', + branch='release-3.3') + version('bioc-3.2', + git='https://github.com/Bioconductor-mirror/BiocGenerics.git', + branch='release-3.2') extends('R') def install(self, spec, prefix): R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.archive_file) + self.module.r_lib_dir, '%s' % self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py index f9ac684aa4..b67a06d9b5 100644 --- a/var/spack/repos/builtin/packages/r-abind/package.py +++ b/var/spack/repos/builtin/packages/r-abind/package.py @@ -34,11 +34,11 @@ class RAbind(Package): homepage = "https://cran.r-project.org/" url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" - version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5', expand=False) + version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5') extends('R') def install(self, spec, prefix): R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.archive_file) + self.module.r_lib_dir, '%s' % self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py index e59ba18fa3..924066e063 100644 --- a/var/spack/repos/builtin/packages/r-filehash/package.py +++ b/var/spack/repos/builtin/packages/r-filehash/package.py @@ -39,10 +39,10 @@ class RFilehash(Package): homepage = 'https://cran.r-project.org/' url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" - version('2.3', '01fffafe09b148ccadc9814c103bdc2f', expand=False) + version('2.3', '01fffafe09b148ccadc9814c103bdc2f') extends('R') def install(self, spec, prefix): R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.archive_file) + self.module.r_lib_dir, '%s' % self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py index ec4b9b9e41..31dab3b8af 100644 --- a/var/spack/repos/builtin/packages/r-magic/package.py +++ b/var/spack/repos/builtin/packages/r-magic/package.py @@ -34,7 +34,7 @@ class RMagic(Package): homepage = "https://cran.r-project.org/" url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" - version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029', expand=False) + version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029') extends('R') @@ -42,4 +42,4 @@ class RMagic(Package): def install(self, spec, prefix): R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.archive_file) + self.module.r_lib_dir, '%s' % self.stage.source_path) -- cgit v1.2.3-70-g09d2 From 7da405e630b6b0e65f4ec8d551a4ed988f32ac74 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 6 Jun 2016 17:06:50 -0500 Subject: Add validator for bioconductor packages This commit adds a validator function to make sure the versions of R and bioconductor are in sync. --- var/spack/repos/builtin/packages/r-BiocGenerics/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py index ffd578a42c..5a6ce72a4b 100644 --- a/var/spack/repos/builtin/packages/r-BiocGenerics/package.py +++ b/var/spack/repos/builtin/packages/r-BiocGenerics/package.py @@ -38,6 +38,19 @@ class RBiocgenerics(Package): extends('R') + def validate(self, spec): + """ + Checks that the version of R is appropriate for the Bioconductor + version. + """ + if spec.satisfies('@bioc-3.3'): + if not spec.satisfies('^R@3.3.0:3.3.9'): + raise InstallError('Must use R-3.3 for Bioconductor-3.3') + elif spec.satisfies('@bioc-3.2'): + if not spec.satisfies('^R@3.2.0:3.2.9'): + raise InstallError('Must use R-3.2 for Bioconductor-3.2') + def install(self, spec, prefix): + self.validate(spec) R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.source_path) -- cgit v1.2.3-70-g09d2 From 4850b9d4d1446f96732e27053df50c16629ec448 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 6 Jun 2016 17:30:35 -0500 Subject: Make install comment consistent with actual call. --- var/spack/repos/builtin/packages/R/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index 74dd95e5c2..c7d8f89906 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -115,7 +115,7 @@ class R(Package): """Called before R modules' install() methods. In most cases, extensions will only need to have one line: R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % - self.stage.archive_file)""" + self.stage.source_path)""" # R extension builds can have a global R executable function module.R = Executable(join_path(self.spec.prefix.bin, 'R')) -- cgit v1.2.3-70-g09d2 From a813f03955397140104b7d926f0fddf925e672bc Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 11 Jun 2016 16:18:54 -0500 Subject: Add list_url for old versions. --- var/spack/repos/builtin/packages/r-abind/package.py | 8 ++++---- var/spack/repos/builtin/packages/r-filehash/package.py | 7 ++++--- var/spack/repos/builtin/packages/r-magic/package.py | 7 ++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/r-abind/package.py b/var/spack/repos/builtin/packages/r-abind/package.py index b67a06d9b5..96f623a096 100644 --- a/var/spack/repos/builtin/packages/r-abind/package.py +++ b/var/spack/repos/builtin/packages/r-abind/package.py @@ -32,13 +32,13 @@ class RAbind(Package): 'afill' for manipulating, extracting and replacing data in arrays.""" homepage = "https://cran.r-project.org/" - url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" + url = "https://cran.r-project.org/src/contrib/abind_1.4-3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/abind" version('1.4-3', '10fcf80c677b991bf263d38be35a1fc5') extends('R') def install(self, spec, prefix): - - R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-filehash/package.py b/var/spack/repos/builtin/packages/r-filehash/package.py index 924066e063..a09b458eaf 100644 --- a/var/spack/repos/builtin/packages/r-filehash/package.py +++ b/var/spack/repos/builtin/packages/r-filehash/package.py @@ -37,12 +37,13 @@ class RFilehash(Package): parties for use in the 'filehash' framework.""" homepage = 'https://cran.r-project.org/' - url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" + url = "https://cran.r-project.org/src/contrib/filehash_2.3.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/filehash" version('2.3', '01fffafe09b148ccadc9814c103bdc2f') extends('R') def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) diff --git a/var/spack/repos/builtin/packages/r-magic/package.py b/var/spack/repos/builtin/packages/r-magic/package.py index 31dab3b8af..f6ba97740b 100644 --- a/var/spack/repos/builtin/packages/r-magic/package.py +++ b/var/spack/repos/builtin/packages/r-magic/package.py @@ -32,7 +32,8 @@ class RMagic(Package): arrays.""" homepage = "https://cran.r-project.org/" - url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" + url = "https://cran.r-project.org/src/contrib/magic_1.5-6.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/magic" version('1.5-6', 'a68e5ced253b2196af842e1fc84fd029') @@ -41,5 +42,5 @@ class RMagic(Package): depends_on('r-abind') def install(self, spec, prefix): - R('CMD', 'INSTALL', '--library=%s' % - self.module.r_lib_dir, '%s' % self.stage.source_path) + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path) -- cgit v1.2.3-70-g09d2 From 8970785d33e07105f47bca390d846127d7e5ce7b Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 13 Jun 2016 17:22:44 -0500 Subject: Add 'jdk' as a dependency. Add jdk as a dependency so that R has support for java and allow packages that need java to work. --- var/spack/repos/builtin/packages/R/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py index c7d8f89906..001dde5329 100644 --- a/var/spack/repos/builtin/packages/R/package.py +++ b/var/spack/repos/builtin/packages/R/package.py @@ -71,6 +71,7 @@ class R(Package): depends_on('tk') depends_on('curl') depends_on('pcre') + depends_on('jdk') def install(self, spec, prefix): rlibdir = join_path(prefix, 'rlib') -- cgit v1.2.3-70-g09d2 From a660c60eb1997317fe0e99054a99cc1cea1d3a56 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 10 Jun 2016 09:24:52 -0500 Subject: Add py-sncosmo package --- .../repos/builtin/packages/py-astropy/package.py | 35 +++++++++----- .../repos/builtin/packages/py-emcee/package.py | 41 ++++++++++++++++ .../repos/builtin/packages/py-h5py/package.py | 31 +++++++++---- .../repos/builtin/packages/py-iminuit/package.py | 54 ++++++++++++++++++++++ .../repos/builtin/packages/py-nestle/package.py | 44 ++++++++++++++++++ .../repos/builtin/packages/py-sncosmo/package.py | 51 ++++++++++++++++++++ 6 files changed, 234 insertions(+), 22 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-emcee/package.py create mode 100644 var/spack/repos/builtin/packages/py-iminuit/package.py create mode 100644 var/spack/repos/builtin/packages/py-nestle/package.py create mode 100644 var/spack/repos/builtin/packages/py-sncosmo/package.py diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py index 86875bbcae..09d1688f4b 100644 --- a/var/spack/repos/builtin/packages/py-astropy/package.py +++ b/var/spack/repos/builtin/packages/py-astropy/package.py @@ -24,29 +24,40 @@ ############################################################################## from spack import * + class PyAstropy(Package): - """ - The Astropy Project is a community effort to develop a single core + """The Astropy Project is a community effort to develop a single core package for Astronomy in Python and foster interoperability between - Python astronomy packages. - """ + Python astronomy packages.""" + homepage = 'http://www.astropy.org/' + url = 'https://pypi.python.org/packages/source/a/astropy/astropy-1.1.2.tar.gz' + version('1.1.2', 'cbe32023b5b1177d1e2498a0d00cda51') version('1.1.post1', 'b52919f657a37d45cc45f5cb0f58c44d') - def url_for_version(self, version): - return 'https://pypi.python.org/packages/source/a/astropy/astropy-{0}.tar.gz'.format(version) - - extends('python') + # Required dependencies + extends('python@2.6.5:2.7,3.3:') + depends_on('py-numpy@1.6.0:') + # Optional dependencies depends_on('cfitsio') depends_on('expat') depends_on('py-h5py') - depends_on('py-numpy') + depends_on('py-pyyaml') depends_on('py-scipy') + depends_on('py-matplotlib') + depends_on('py-pytz') + depends_on('py-scikit-image') + depends_on('py-pandas') + + # TODO: Add packages + # depends_on('py-beautiful-soup') + # depends_on('py-xmllint') + # depends_on('py-wcsaxes') + # depends_on('py-objgraph') def install(self, spec, prefix): python('setup.py', 'build', '--use-system-cfitsio', - '--use-system-expat') - python('setup.py', 'install', '--prefix=' + prefix) - + '--use-system-expat') + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-emcee/package.py b/var/spack/repos/builtin/packages/py-emcee/package.py new file mode 100644 index 0000000000..d57ef4bd76 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-emcee/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 PyEmcee(Package): + """emcee is an MIT licensed pure-Python implementation of Goodman & Weare's + Affine Invariant Markov chain Monte Carlo (MCMC) Ensemble sampler.""" + + homepage = "http://dan.iel.fm/emcee/current/" + url = "https://pypi.python.org/packages/source/e/emcee/emcee-2.1.0.tar.gz" + + version('2.1.0', 'c6b6fad05c824d40671d4a4fc58dfff7') + + extends('python') + depends_on('py-numpy') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py index a8eb027ba5..a92fc3c9c7 100644 --- a/var/spack/repos/builtin/packages/py-h5py/package.py +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -23,23 +23,34 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import re + class PyH5py(Package): - """The h5py package provides both a high- and low-level interface to the HDF5 library from Python.""" + """The h5py package provides both a high- and low-level interface to the + HDF5 library from Python.""" + homepage = "https://pypi.python.org/pypi/h5py" url = "https://pypi.python.org/packages/source/h/h5py/h5py-2.4.0.tar.gz" - version('2.4.0', '80c9a94ae31f84885cc2ebe1323d6758') + version('2.6.0', 'ec476211bd1de3f5ac150544189b0bf4') version('2.5.0', '6e4301b5ad5da0d51b0a1e5ac19e3b74') + version('2.4.0', '80c9a94ae31f84885cc2ebe1323d6758') - extends('python', ignore=lambda f: re.match(r'bin/cy*', f)) - depends_on('hdf5') - depends_on('py-numpy') + variant('mpi', default=False, description='Build with MPI support') + + extends('python', ignore=r'bin/cy.*') + depends_on('hdf5@1.8.4:+mpi', when='+mpi') + depends_on('hdf5@1.8.4:~mpi', when='~mpi') + depends_on('py-numpy@1.6.1:') depends_on('py-cython') - depends_on('py-six') - depends_on('py-pkgconfig') + depends_on('mpi', when='+mpi') def install(self, spec, prefix): - python('setup.py', 'configure', '--hdf5=%s' % spec['hdf5'].prefix) - python('setup.py', 'install', '--prefix=%s' % prefix) + python('setup.py', 'configure', + '--hdf5={0}'.format(spec['hdf5'].prefix)) + + if '+mpi' in spec: + env['CC'] = spec['mpi'].mpicc + python('setup.py', 'configure', '--mpi') + + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-iminuit/package.py b/var/spack/repos/builtin/packages/py-iminuit/package.py new file mode 100644 index 0000000000..5a42268a73 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-iminuit/package.py @@ -0,0 +1,54 @@ +############################################################################## +# 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 PyIminuit(Package): + """Interactive IPython-Friendly Minimizer based on SEAL Minuit2.""" + + homepage = "https://pypi.python.org/pypi/iminuit" + url = "https://pypi.python.org/packages/source/i/iminuit/iminuit-1.2.tar.gz" + + version('1.2', '4701ec472cae42015e26251703e6e984') + + # Required dependencies + extends('python@2.7:2.8,3.4:') + depends_on('py-setuptools') + + # Optional dependencies + depends_on('py-numpy') + depends_on('py-matplotlib') + + def install(self, spec, prefix): + site_packages = '{0}/lib/python{1}/site-packages'.format( + prefix, spec['python'].version.up_to(2)) + + # site-packages directory must already exist + mkdirp(site_packages) + + # PYTHONPATH must include site-packages directory + env['PYTHONPATH'] += ':{0}'.format(site_packages) + + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-nestle/package.py b/var/spack/repos/builtin/packages/py-nestle/package.py new file mode 100644 index 0000000000..38fa0561db --- /dev/null +++ b/var/spack/repos/builtin/packages/py-nestle/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 PyNestle(Package): + """Nested sampling algorithms for evaluating Bayesian evidence.""" + + homepage = "http://kbarbary.github.io/nestle/" + url = "https://pypi.python.org/packages/source/n/nestle/nestle-0.1.1.tar.gz" + + version('0.1.1', '4875c0f9a0a8e263c1d7f5fa6ce604c5') + + # Required dependencies + extends('python') + depends_on('py-numpy@1.6:') + + # Optional dependencies + depends_on('py-scipy') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-sncosmo/package.py b/var/spack/repos/builtin/packages/py-sncosmo/package.py new file mode 100644 index 0000000000..d40623ffa1 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-sncosmo/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 PySncosmo(Package): + """SNCosmo is a Python library for high-level supernova cosmology + analysis.""" + + homepage = "http://sncosmo.readthedocs.io/" + url = "https://pypi.python.org/packages/source/s/sncosmo/sncosmo-1.2.0.tar.gz" + + version('1.2.0', '028e6d1dc84ab1c17d2f3b6378b2cb1e') + + # Required dependencies + # py-sncosmo binaries are duplicates of those from py-astropy + extends('python@2.6:2.7,3.3:', ignore=r'bin/*') + depends_on('py-numpy') + depends_on('py-scipy') + depends_on('py-astropy') + + # Recommended dependencies + depends_on('py-matplotlib') + depends_on('py-iminuit') + depends_on('py-emcee') + depends_on('py-nestle') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) -- cgit v1.2.3-70-g09d2 From 4eeaff175cc6c9fd15a7d2455e1e0663ad147aca Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 10 Jun 2016 14:29:57 -0500 Subject: Allow packages to build --- var/spack/repos/builtin/packages/py-astropy/package.py | 3 ++- var/spack/repos/builtin/packages/py-h5py/package.py | 4 +++- var/spack/repos/builtin/packages/py-iminuit/package.py | 12 ++---------- var/spack/repos/builtin/packages/py-sncosmo/package.py | 3 ++- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py index 09d1688f4b..bac794e551 100644 --- a/var/spack/repos/builtin/packages/py-astropy/package.py +++ b/var/spack/repos/builtin/packages/py-astropy/package.py @@ -60,4 +60,5 @@ class PyAstropy(Package): def install(self, spec, prefix): python('setup.py', 'build', '--use-system-cfitsio', '--use-system-expat') - python('setup.py', 'install', '--prefix={0}'.format(prefix)) + python('setup.py', 'install', '--single-version-externally-managed', + '--root=/', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py index a92fc3c9c7..1b8675ecf2 100644 --- a/var/spack/repos/builtin/packages/py-h5py/package.py +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -39,6 +39,7 @@ class PyH5py(Package): variant('mpi', default=False, description='Build with MPI support') extends('python', ignore=r'bin/cy.*') + depends_on('hdf5@1.8.4:+mpi', when='+mpi') depends_on('hdf5@1.8.4:~mpi', when='~mpi') depends_on('py-numpy@1.6.1:') @@ -53,4 +54,5 @@ class PyH5py(Package): env['CC'] = spec['mpi'].mpicc python('setup.py', 'configure', '--mpi') - python('setup.py', 'install', '--prefix={0}'.format(prefix)) + python('setup.py', 'install', '--single-version-externally-managed', + '--root=/', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-iminuit/package.py b/var/spack/repos/builtin/packages/py-iminuit/package.py index 5a42268a73..557cf19c19 100644 --- a/var/spack/repos/builtin/packages/py-iminuit/package.py +++ b/var/spack/repos/builtin/packages/py-iminuit/package.py @@ -42,13 +42,5 @@ class PyIminuit(Package): depends_on('py-matplotlib') def install(self, spec, prefix): - site_packages = '{0}/lib/python{1}/site-packages'.format( - prefix, spec['python'].version.up_to(2)) - - # site-packages directory must already exist - mkdirp(site_packages) - - # PYTHONPATH must include site-packages directory - env['PYTHONPATH'] += ':{0}'.format(site_packages) - - python('setup.py', 'install', '--prefix={0}'.format(prefix)) + python('setup.py', 'install', '--single-version-externally-managed', + '--root=/', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-sncosmo/package.py b/var/spack/repos/builtin/packages/py-sncosmo/package.py index d40623ffa1..58c4625a4f 100644 --- a/var/spack/repos/builtin/packages/py-sncosmo/package.py +++ b/var/spack/repos/builtin/packages/py-sncosmo/package.py @@ -48,4 +48,5 @@ class PySncosmo(Package): depends_on('py-nestle') def install(self, spec, prefix): - python('setup.py', 'install', '--prefix={0}'.format(prefix)) + python('setup.py', 'install', '--single-version-externally-managed', + '--root=/', '--prefix={0}'.format(prefix)) -- cgit v1.2.3-70-g09d2 From b2aa78d6ab569f5dac65b665c2f9b2962b72fdbb Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 10 Jun 2016 17:08:50 -0500 Subject: Remove version constraints --- var/spack/repos/builtin/packages/py-astropy/package.py | 7 +++---- var/spack/repos/builtin/packages/py-h5py/package.py | 3 +-- var/spack/repos/builtin/packages/py-iminuit/package.py | 5 ++--- var/spack/repos/builtin/packages/py-nestle/package.py | 2 +- var/spack/repos/builtin/packages/py-sncosmo/package.py | 5 ++--- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py index bac794e551..e3776caf70 100644 --- a/var/spack/repos/builtin/packages/py-astropy/package.py +++ b/var/spack/repos/builtin/packages/py-astropy/package.py @@ -37,8 +37,8 @@ class PyAstropy(Package): version('1.1.post1', 'b52919f657a37d45cc45f5cb0f58c44d') # Required dependencies - extends('python@2.6.5:2.7,3.3:') - depends_on('py-numpy@1.6.0:') + extends('python') + depends_on('py-numpy') # Optional dependencies depends_on('cfitsio') @@ -60,5 +60,4 @@ class PyAstropy(Package): def install(self, spec, prefix): python('setup.py', 'build', '--use-system-cfitsio', '--use-system-expat') - python('setup.py', 'install', '--single-version-externally-managed', - '--root=/', '--prefix={0}'.format(prefix)) + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py index 1b8675ecf2..1379513197 100644 --- a/var/spack/repos/builtin/packages/py-h5py/package.py +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -54,5 +54,4 @@ class PyH5py(Package): env['CC'] = spec['mpi'].mpicc python('setup.py', 'configure', '--mpi') - python('setup.py', 'install', '--single-version-externally-managed', - '--root=/', '--prefix={0}'.format(prefix)) + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-iminuit/package.py b/var/spack/repos/builtin/packages/py-iminuit/package.py index 557cf19c19..ffc5a5bd14 100644 --- a/var/spack/repos/builtin/packages/py-iminuit/package.py +++ b/var/spack/repos/builtin/packages/py-iminuit/package.py @@ -34,7 +34,7 @@ class PyIminuit(Package): version('1.2', '4701ec472cae42015e26251703e6e984') # Required dependencies - extends('python@2.7:2.8,3.4:') + extends('python') depends_on('py-setuptools') # Optional dependencies @@ -42,5 +42,4 @@ class PyIminuit(Package): depends_on('py-matplotlib') def install(self, spec, prefix): - python('setup.py', 'install', '--single-version-externally-managed', - '--root=/', '--prefix={0}'.format(prefix)) + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-nestle/package.py b/var/spack/repos/builtin/packages/py-nestle/package.py index 38fa0561db..16506e3eca 100644 --- a/var/spack/repos/builtin/packages/py-nestle/package.py +++ b/var/spack/repos/builtin/packages/py-nestle/package.py @@ -35,7 +35,7 @@ class PyNestle(Package): # Required dependencies extends('python') - depends_on('py-numpy@1.6:') + depends_on('py-numpy') # Optional dependencies depends_on('py-scipy') diff --git a/var/spack/repos/builtin/packages/py-sncosmo/package.py b/var/spack/repos/builtin/packages/py-sncosmo/package.py index 58c4625a4f..8976413ab9 100644 --- a/var/spack/repos/builtin/packages/py-sncosmo/package.py +++ b/var/spack/repos/builtin/packages/py-sncosmo/package.py @@ -36,7 +36,7 @@ class PySncosmo(Package): # Required dependencies # py-sncosmo binaries are duplicates of those from py-astropy - extends('python@2.6:2.7,3.3:', ignore=r'bin/*') + extends('python', ignore=r'bin/*') depends_on('py-numpy') depends_on('py-scipy') depends_on('py-astropy') @@ -48,5 +48,4 @@ class PySncosmo(Package): depends_on('py-nestle') def install(self, spec, prefix): - python('setup.py', 'install', '--single-version-externally-managed', - '--root=/', '--prefix={0}'.format(prefix)) + python('setup.py', 'install', '--prefix={0}'.format(prefix)) -- cgit v1.2.3-70-g09d2 From 24f65c502e54cc8767d47bafa827c7434c81bd07 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 13 Jun 2016 12:31:18 -0500 Subject: Add additional Astropy dependencies --- .../repos/builtin/packages/py-astropy/package.py | 12 +++--- .../builtin/packages/py-beautifulsoup4/package.py | 41 +++++++++++++++++++++ .../repos/builtin/packages/py-wcsaxes/package.py | 43 ++++++++++++++++++++++ 3 files changed, 89 insertions(+), 7 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-beautifulsoup4/package.py create mode 100644 var/spack/repos/builtin/packages/py-wcsaxes/package.py diff --git a/var/spack/repos/builtin/packages/py-astropy/package.py b/var/spack/repos/builtin/packages/py-astropy/package.py index e3776caf70..a9962777dc 100644 --- a/var/spack/repos/builtin/packages/py-astropy/package.py +++ b/var/spack/repos/builtin/packages/py-astropy/package.py @@ -41,21 +41,19 @@ class PyAstropy(Package): depends_on('py-numpy') # Optional dependencies - depends_on('cfitsio') - depends_on('expat') depends_on('py-h5py') + depends_on('py-beautifulsoup4') depends_on('py-pyyaml') depends_on('py-scipy') + depends_on('libxml2') depends_on('py-matplotlib') depends_on('py-pytz') depends_on('py-scikit-image') depends_on('py-pandas') - # TODO: Add packages - # depends_on('py-beautiful-soup') - # depends_on('py-xmllint') - # depends_on('py-wcsaxes') - # depends_on('py-objgraph') + # System dependencies + depends_on('cfitsio') + depends_on('expat') def install(self, spec, prefix): python('setup.py', 'build', '--use-system-cfitsio', diff --git a/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py b/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py new file mode 100644 index 0000000000..64368fe70d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-beautifulsoup4/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 PyBeautifulsoup4(Package): + """Beautiful Soup is a Python library for pulling data out of HTML and + XML files. It works with your favorite parser to provide idiomatic ways + of navigating, searching, and modifying the parse tree.""" + + homepage = "https://www.crummy.com/software/BeautifulSoup" + url = "https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-4.4.1.tar.gz" + + version('4.4.1', '8fbd9a7cac0704645fa20d1419036815') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-wcsaxes/package.py b/var/spack/repos/builtin/packages/py-wcsaxes/package.py new file mode 100644 index 0000000000..b0adbe3658 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-wcsaxes/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 PyWcsaxes(Package): + """WCSAxes is a framework for making plots of Astronomical data + in Matplotlib.""" + + homepage = "http://wcsaxes.readthedocs.io/en/latest/index.html" + url = "https://github.com/astrofrog/wcsaxes/archive/v0.8.tar.gz" + + version('0.8', 'de1c60fdae4c330bf5ddb9f1ab5ab920') + + extends('python', ignore=r'bin/pbr') + depends_on('py-numpy') + depends_on('py-matplotlib') + depends_on('py-astropy') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) -- cgit v1.2.3-70-g09d2 From 80d444624b433d1059bed6580c24fb87db331016 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 15 Jun 2016 16:42:50 -0500 Subject: Fix activation of sites.py for sncosmo --- var/spack/repos/builtin/packages/py-h5py/package.py | 13 ++++++++++--- var/spack/repos/builtin/packages/py-iminuit/package.py | 1 + var/spack/repos/builtin/packages/py-sncosmo/package.py | 2 +- var/spack/repos/builtin/packages/python/package.py | 7 +++---- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py index 1379513197..0180b658f5 100644 --- a/var/spack/repos/builtin/packages/py-h5py/package.py +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -38,14 +38,21 @@ class PyH5py(Package): variant('mpi', default=False, description='Build with MPI support') - extends('python', ignore=r'bin/cy.*') + 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-numpy@1.6.1:') - depends_on('py-cython') depends_on('mpi', when='+mpi') + # Build and runtime dependencies + depends_on('py-numpy@1.6.1:') + + # Runtime dependencies + depends_on('py-six') + def install(self, spec, prefix): python('setup.py', 'configure', '--hdf5={0}'.format(spec['hdf5'].prefix)) diff --git a/var/spack/repos/builtin/packages/py-iminuit/package.py b/var/spack/repos/builtin/packages/py-iminuit/package.py index ffc5a5bd14..47751a702d 100644 --- a/var/spack/repos/builtin/packages/py-iminuit/package.py +++ b/var/spack/repos/builtin/packages/py-iminuit/package.py @@ -40,6 +40,7 @@ class PyIminuit(Package): # Optional dependencies depends_on('py-numpy') depends_on('py-matplotlib') + depends_on('py-cython') def install(self, spec, prefix): python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-sncosmo/package.py b/var/spack/repos/builtin/packages/py-sncosmo/package.py index 8976413ab9..82ae2a2e69 100644 --- a/var/spack/repos/builtin/packages/py-sncosmo/package.py +++ b/var/spack/repos/builtin/packages/py-sncosmo/package.py @@ -36,7 +36,7 @@ class PySncosmo(Package): # Required dependencies # py-sncosmo binaries are duplicates of those from py-astropy - extends('python', ignore=r'bin/*') + extends('python', ignore=r'bin/.*') depends_on('py-numpy') depends_on('py-scipy') depends_on('py-astropy') diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 86c12498e1..d6d5fac4b1 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -167,14 +167,13 @@ class Python(Package): ignore_arg = args.get('ignore', lambda f: False) # Always ignore easy-install.pth, as it needs to be merged. - patterns = [r'easy-install\.pth$'] + patterns = [r'site-packages/easy-install\.pth$'] # Ignore pieces of setuptools installed by other packages. if ext_pkg.name != 'py-setuptools': - patterns.append(r'/site[^/]*\.pyc?$') - patterns.append(r'setuptools\.pth') patterns.append(r'bin/easy_install[^/]*$') - patterns.append(r'setuptools.*egg$') + patterns.append(r'site-packages/setuptools\.pth$') + patterns.append(r'site-packages/site[^/]*\.pyc?$') if ext_pkg.name != 'py-numpy': patterns.append(r'bin/f2py$') -- cgit v1.2.3-70-g09d2 From fe5eec5230dd86e2ed247a178a54230f631c1c60 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Fri, 17 Jun 2016 09:16:03 -0700 Subject: 'find and 'add' are options for adding compilers via command line --- lib/spack/spack/cmd/compiler.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 94d83512e1..3a496492ff 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -69,7 +69,7 @@ def setup_parser(subparser): help="Configuration scope to read from.") -def compiler_add(args): +def compiler_find(args): """Search either $PATH or a list of paths OR MODULES for compilers and add them to Spack's configuration.""" paths = args.add_paths @@ -79,7 +79,6 @@ def compiler_add(args): compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) if c.spec not in spack.compilers.all_compilers(scope=args.scope, init_config=False)] - if compilers: spack.compilers.add_compilers_to_config(compilers, scope=args.scope, init_config=False) @@ -139,9 +138,10 @@ def compiler_list(args): def compiler(parser, args): - action = { 'add' : compiler_add, - 'remove' : compiler_remove, - 'rm' : compiler_remove, - 'info' : compiler_info, - 'list' : compiler_list } + action = {'add' : compiler_find, + 'find' : compiler_find, + 'remove' : compiler_remove, + 'rm' : compiler_remove, + 'info' : compiler_info, + 'list' : compiler_list } action[args.compiler_command](args) -- cgit v1.2.3-70-g09d2 From 448f8c43d44dfe8dc3b38e5a637fc560535a10d0 Mon Sep 17 00:00:00 2001 From: "Robert D. French" Date: Tue, 7 Jun 2016 11:42:15 -0400 Subject: Added working Ferret spec Fixed ferret spec. It builds now Made ferret spec more flake8-y Fixed homepage and info text about Ferret Removed vim swap file Reverted changes to netcdf-fortran spec and added netcdf~mpi dependency to ferret spec to compensate for it Fixed flake8 issues! --- var/spack/repos/builtin/packages/ferret/package.py | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ferret/package.py diff --git a/var/spack/repos/builtin/packages/ferret/package.py b/var/spack/repos/builtin/packages/ferret/package.py new file mode 100644 index 0000000000..15ddfcee16 --- /dev/null +++ b/var/spack/repos/builtin/packages/ferret/package.py @@ -0,0 +1,103 @@ +############################################################################## +# 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 * +import os + + +class Ferret(Package): + """Ferret is an interactive computer visualization and analysis environment + designed to meet the needs of oceanographers and meteorologists + analyzing large and complex gridded data sets.""" + homepage = "http://ferret.noaa.gov/Ferret/" + url = "ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.tar.gz" + + version('6.96', '51722027c864369f41bab5751dfff8cc', + url="ftp://ftp.pmel.noaa.gov/ferret/pub/source/fer_source.tar.gz") + + depends_on("hdf5~mpi~fortran") + depends_on("netcdf~mpi") + depends_on("netcdf-fortran") + depends_on("readline") + depends_on("zlib") + + def patch(self): + hdf5_prefix = self.spec['hdf5'].prefix + netcdff_prefix = self.spec['netcdf-fortran'].prefix + readline_prefix = self.spec['readline'].prefix + libz_prefix = self.spec['zlib'].prefix + + filter_file(r'^BUILDTYPE.+', + 'BUILDTYPE = x86_64-linux', + 'FERRET/site_specific.mk') + filter_file(r'^INSTALL_FER_DIR.+', + 'INSTALL_FER_DIR = %s' % self.spec.prefix, + 'FERRET/site_specific.mk') + filter_file(r'^HDF5_DIR.+', + 'HDF5_DIR = %s' % hdf5_prefix, + 'FERRET/site_specific.mk') + filter_file(r'^NETCDF4_DIR.+', + 'NETCDF4_DIR = %s' % netcdff_prefix, + 'FERRET/site_specific.mk') + filter_file(r'^READLINE_DIR.+', + 'READLINE_DIR = %s' % readline_prefix, + 'FERRET/site_specific.mk') + filter_file(r'^LIBZ_DIR.+', + 'LIBZ_DIR = %s' % libz_prefix, + 'FERRET/site_specific.mk') + filter_file(r'^JAVA_HOME.+', + ' ', + 'FERRET/site_specific.mk') + filter_file(r'-lm', + '-lgfortran -lm', + 'FERRET/platform_specific.mk.x86_64-linux') + + def install(self, spec, prefix): + hdf5_prefix = spec['hdf5'].prefix + netcdff_prefix = spec['netcdf-fortran'].prefix + netcdf_prefix = spec['netcdf'].prefix + libz_prefix = spec['zlib'].prefix + ln = which('ln') + ln('-sf', + hdf5_prefix + '/lib', + hdf5_prefix + '/lib64') + ln('-sf', + netcdff_prefix + '/lib', + netcdff_prefix + '/lib64') + ln('-sf', + netcdf_prefix + '/lib/libnetcdf.a', + netcdff_prefix + '/lib/libnetcdf.a') + ln('-sf', + netcdf_prefix + '/lib/libnetcdf.la', + netcdff_prefix + '/lib/libnetcdf.la') + ln('-sf', + libz_prefix + '/lib', + libz_prefix + '/lib64') + os.environ['LDFLAGS'] = '-lquadmath' + with working_dir('FERRET', create=False): + os.environ['LD_X11'] = '-L/usr/lib/X11 -lX11' + os.environ['HOSTTYPE'] = 'x86_64-linux' + make(parallel=False) + make("install") -- cgit v1.2.3-70-g09d2 From 536fa73d5f1e0a676d3db68097bbdbab8ba424cd Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 17 Jun 2016 13:33:09 -0500 Subject: Python flake8 overhaul --- var/spack/repos/builtin/packages/python/package.py | 190 ++++++++++++--------- 1 file changed, 114 insertions(+), 76 deletions(-) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index d6d5fac4b1..b6a62bf742 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -22,9 +22,6 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -import functools -import glob -import inspect import os import re from contextlib import closing @@ -37,11 +34,10 @@ from spack.util.environment import * class Python(Package): """The Python programming language.""" + homepage = "http://www.python.org" url = "http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz" - extendable = True - version('3.5.1', 'be78e48cdfc1a7ad90efff146dce6cfe') version('3.5.0', 'a56c0c0b45d75a0ec9c6dee933c41c36') version('2.7.11', '6b6076ec9e93f05dd63e47eb9c15728b', preferred=True) @@ -49,6 +45,8 @@ class Python(Package): version('2.7.9', '5eebcaa0030dc4061156d3429657fb83') version('2.7.8', 'd4bca0159acb0b44a781292b5231936f') + extendable = True + depends_on("openssl") depends_on("bzip2") depends_on("readline") @@ -64,39 +62,63 @@ class Python(Package): # Rest of install is pretty standard except setup.py needs to # be able to read the CPPFLAGS and LDFLAGS as it scans for the # library and headers to build - configure_args= [ - "--prefix=%s" % prefix, - "--with-threads", - "--enable-shared", - "CPPFLAGS=-I%s/include -I%s/include -I%s/include -I%s/include -I%s/include -I%s/include" % ( - spec['openssl'].prefix, spec['bzip2'].prefix, - spec['readline'].prefix, spec['ncurses'].prefix, - spec['sqlite'].prefix, spec['zlib'].prefix), - "LDFLAGS=-L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib" % ( - spec['openssl'].prefix, spec['bzip2'].prefix, - spec['readline'].prefix, spec['ncurses'].prefix, - spec['sqlite'].prefix, spec['zlib'].prefix) - ] + cppflags = ' -I'.join([ + spec['openssl'].prefix.include, spec['bzip2'].prefix.include, + spec['readline'].prefix.include, spec['ncurses'].prefix.include, + spec['sqlite'].prefix.include, spec['zlib'].prefix.include + ]) + + ldflags = ' -L'.join([ + spec['openssl'].prefix.lib, spec['bzip2'].prefix.lib, + spec['readline'].prefix.lib, spec['ncurses'].prefix.lib, + spec['sqlite'].prefix.lib, spec['zlib'].prefix.lib + ]) + + config_args = [ + "--prefix={0}".format(prefix), + "--with-threads", + "--enable-shared", + "CPPFLAGS=-I{0}".format(cppflags), + "LDFLAGS=-L{0}".format(ldflags) + ] + if spec.satisfies('@3:'): - configure_args.append('--without-ensurepip') - configure(*configure_args) + config_args.append('--without-ensurepip') + + configure(*config_args) + make() make("install") - # Modify compiler paths in configuration files. This is necessary for - # building site packages outside of spack - filter_file(r'([/s]=?)([\S=]*)/lib/spack/env(/[^\s/]*)?/(\S*)(\s)', - (r'\4\5'), - join_path(prefix.lib, 'python%d.%d' % self.version[:2], '_sysconfigdata.py')) + 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.""" + + kwargs = {'ignore_absent': True, 'backup': False, 'string': True} - python3_version = '' + dirname = join_path(prefix.lib, + 'python{0}'.format(self.version.up_to(2))) + + config = 'config' if spec.satisfies('@3:'): - python3_version = '-%d.%dm' % self.version[:2] - makefile_filepath = join_path(prefix.lib, 'python%d.%d' % self.version[:2], 'config%s' % python3_version, 'Makefile') - filter_file(r'([/s]=?)([\S=]*)/lib/spack/env(/[^\s/]*)?/(\S*)(\s)', - (r'\4\5'), - makefile_filepath) + config = 'config-{0}m'.format(self.version.up_to(2)) + + files = [ + '_sysconfigdata.py', + join_path(config, 'Makefile') + ] + for filename in files: + filter_file(env['CC'], self.compiler.cc, + join_path(dirname, filename), **kwargs) + filter_file(env['CXX'], self.compiler.cxx, + join_path(dirname, filename), **kwargs) # ======================================================================== # Set up environment to make install easy for python extensions. @@ -104,57 +126,59 @@ class Python(Package): @property def python_lib_dir(self): - return os.path.join('lib', 'python%d.%d' % self.version[:2]) - + return join_path('lib', 'python{0}'.format(self.version.up_to(2))) @property def python_include_dir(self): - return os.path.join('include', 'python%d.%d' % self.version[:2]) - + return join_path('include', 'python{0}'.format(self.version.up_to(2))) @property def site_packages_dir(self): - return os.path.join(self.python_lib_dir, 'site-packages') - + return join_path(self.python_lib_dir, 'site-packages') def setup_dependent_environment(self, spack_env, run_env, extension_spec): - # TODO: do this only for actual extensions. + """Set PYTHONPATH to include site-packages dir for the + extension and any other python extensions it depends on.""" - # Set PYTHONPATH to include site-packages dir for the - # extension and any other python extensions it depends on. python_paths = [] for d in extension_spec.traverse(): if d.package.extends(self.spec): - python_paths.append(os.path.join(d.prefix, self.site_packages_dir)) + python_paths.append(join_path(d.prefix, + self.site_packages_dir)) pythonpath = ':'.join(python_paths) spack_env.set('PYTHONPATH', pythonpath) - # For run time environment set only the path for extension_spec and prepend it to PYTHONPATH + # For run time environment set only the path for + # extension_spec and prepend it to PYTHONPATH if extension_spec.package.extends(self.spec): - run_env.prepend_path('PYTHONPATH', os.path.join(extension_spec.prefix, self.site_packages_dir)) - + run_env.prepend_path('PYTHONPATH', join_path( + extension_spec.prefix, self.site_packages_dir)) def setup_dependent_package(self, module, ext_spec): - """ - Called before python modules' install() methods. + """Called before python modules' install() methods. In most cases, extensions will only need to have one line:: - python('setup.py', 'install', '--prefix=%s' % prefix) - """ + python('setup.py', 'install', '--prefix={0}'.format(prefix))""" + # Python extension builds can have a global python executable function - if self.version >= Version("3.0.0") and self.version < Version("4.0.0"): - module.python = Executable(join_path(self.spec.prefix.bin, 'python3')) + if Version("3.0.0") <= self.version < Version("4.0.0"): + module.python = Executable(join_path(self.spec.prefix.bin, + 'python3')) else: - module.python = Executable(join_path(self.spec.prefix.bin, 'python')) + module.python = Executable(join_path(self.spec.prefix.bin, + 'python')) # Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs. - module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir) - module.python_include_dir = os.path.join(ext_spec.prefix, self.python_include_dir) - module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir) - - # Make the site packages directory for extensions, if it does not exist already. + module.python_lib_dir = join_path(ext_spec.prefix, + self.python_lib_dir) + module.python_include_dir = join_path(ext_spec.prefix, + self.python_include_dir) + module.site_packages_dir = join_path(ext_spec.prefix, + self.site_packages_dir) + + # Make the site packages directory for extensions if ext_spec.package.is_extension: mkdirp(module.site_packages_dir) @@ -170,21 +194,25 @@ class Python(Package): patterns = [r'site-packages/easy-install\.pth$'] # Ignore pieces of setuptools installed by other packages. + # Must include directory name or it will remove all site*.py files. if ext_pkg.name != 'py-setuptools': - patterns.append(r'bin/easy_install[^/]*$') - patterns.append(r'site-packages/setuptools\.pth$') - patterns.append(r'site-packages/site[^/]*\.pyc?$') + patterns.extend([ + r'bin/easy_install[^/]*$', + r'site-packages/setuptools[^/]*\.egg$', + r'site-packages/setuptools\.pth$', + r'site-packages/site[^/]*\.pyc?$', + r'site-packages/__pycache__/site[^/]*\.pyc?$' + ]) if ext_pkg.name != 'py-numpy': patterns.append(r'bin/f2py$') return match_predicate(ignore_arg, patterns) - def write_easy_install_pth(self, exts): paths = [] for ext in sorted(exts.values()): - ext_site_packages = os.path.join(ext.prefix, self.site_packages_dir) - easy_pth = "%s/easy-install.pth" % ext_site_packages + ext_site_packages = join_path(ext.prefix, self.site_packages_dir) + easy_pth = join_path(ext_site_packages, "easy-install.pth") if not os.path.isfile(easy_pth): continue @@ -194,15 +222,18 @@ class Python(Package): line = line.rstrip() # Skip lines matching these criteria - if not line: continue - if re.search(r'^(import|#)', line): continue - if (ext.name != 'py-setuptools' and - re.search(r'setuptools.*egg$', line)): continue + if not line: + continue + if re.search(r'^(import|#)', line): + continue + if ((ext.name != 'py-setuptools' and + re.search(r'setuptools.*egg$', line))): + continue paths.append(line) - site_packages = os.path.join(self.prefix, self.site_packages_dir) - main_pth = "%s/easy-install.pth" % site_packages + site_packages = join_path(self.prefix, self.site_packages_dir) + main_pth = join_path(site_packages, "easy-install.pth") if not paths: if os.path.isfile(main_pth): @@ -210,15 +241,22 @@ class Python(Package): else: with closing(open(main_pth, 'w')) as f: - f.write("import sys; sys.__plen = len(sys.path)\n") + f.write(""" +import sys +sys.__plen = len(sys.path) +""") for path in paths: - f.write("%s\n" % path) - f.write("import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; " - "p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)\n") - + f.write("{0}\n".format(path)) + f.write(""" +new = sys.path[sys.__plen:] +del sys.path[sys.__plen:] +p = getattr(sys, '__egginsert', 0) +sys.path[p:p] = new +sys.__egginsert = p + len(new) +""") def activate(self, ext_pkg, **args): - ignore=self.python_ignore(ext_pkg, args) + ignore = self.python_ignore(ext_pkg, args) args.update(ignore=ignore) super(Python, self).activate(ext_pkg, **args) @@ -227,12 +265,12 @@ class Python(Package): exts[ext_pkg.name] = ext_pkg.spec self.write_easy_install_pth(exts) - def deactivate(self, ext_pkg, **args): args.update(ignore=self.python_ignore(ext_pkg, args)) super(Python, self).deactivate(ext_pkg, **args) exts = spack.install_layout.extension_map(self.spec) - if ext_pkg.name in exts: # Make deactivate idempotent. + # Make deactivate idempotent + if ext_pkg.name in exts: del exts[ext_pkg.name] self.write_easy_install_pth(exts) -- cgit v1.2.3-70-g09d2 From a4ac99877a512249fa7d126f48716d590cfa80a9 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Fri, 17 Jun 2016 12:00:35 -0700 Subject: cmd/list: adding description search and glob by default --- lib/spack/spack/cmd/list.py | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index 1e3699cee0..5406283b05 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -28,7 +28,7 @@ import argparse from llnl.util.tty.colify import colify import spack -import fnmatch +import fnmatch, re description ="List available spack packages" @@ -39,20 +39,41 @@ def setup_parser(subparser): subparser.add_argument( '-i', '--insensitive', action='store_true', default=False, help='Filtering will be case insensitive.') + subparser.add_argument( + '-s', '--search_description', action='store_true', default=False, + help='Filtering will also search the description for a match.') def list(parser, args): # Start with all package names. - pkgs = spack.repo.all_package_names() + pkgs = set(spack.repo.all_package_names()) # filter if a filter arg was provided if args.filter: - def match(p, f): - if args.insensitive: - p = p.lower() - f = f.lower() - return fnmatch.fnmatchcase(p, f) - pkgs = [p for p in pkgs if any(match(p, f) for f in args.filter)] + filters = [] + for f in args.filter: + if '*' not in f and '?' not in f: + filters.append('*' + f + '*') + else: + filters.append(f) + + res = [re.compile(fnmatch.translate(f), + flags=re.I if args.insensitive else 0) + for f in filters] + + if args.search_description: + def match(p, f): + if f.match(p): + return True + + pkg = spack.repo.get(p) + if pkg.__doc__: + return f.match(pkg.__doc__) + return False + else: + def match(p, f): + return f.match(p) + pkgs = [p for p in pkgs if any(match(p, f) for f in res)] # sort before displaying. sorted_packages = sorted(pkgs, key=lambda s:s.lower()) -- cgit v1.2.3-70-g09d2 From 0743ef4d0ba6632992fee3657f0d89200d4e481b Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Fri, 17 Jun 2016 13:32:28 -0700 Subject: fixing flake8 issues --- lib/spack/spack/cmd/list.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index 5406283b05..d1c19b45c6 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -28,9 +28,11 @@ import argparse from llnl.util.tty.colify import colify import spack -import fnmatch, re +import fnmatch +import re + +description = "List available spack packages" -description ="List available spack packages" def setup_parser(subparser): subparser.add_argument( @@ -76,10 +78,10 @@ def list(parser, args): pkgs = [p for p in pkgs if any(match(p, f) for f in res)] # sort before displaying. - sorted_packages = sorted(pkgs, key=lambda s:s.lower()) + sorted_packages = sorted(pkgs, key=lambda s: s.lower()) # Print all the package names in columns - indent=0 + indent = 0 if sys.stdout.isatty(): tty.msg("%d packages." % len(sorted_packages)) colify(sorted_packages, indent=indent) -- cgit v1.2.3-70-g09d2 From 8770f2a0ea14c7145e87bfd08ca7149ae3838127 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Fri, 17 Jun 2016 13:42:27 -0700 Subject: fixing last flake8 issue --- lib/spack/spack/cmd/list.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index d1c19b45c6..228ab76780 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -52,16 +52,14 @@ def list(parser, args): # filter if a filter arg was provided if args.filter: - filters = [] + res = [] for f in args.filter: if '*' not in f and '?' not in f: - filters.append('*' + f + '*') + r = fnmatch.translate('*' + f + '*') else: - filters.append(f) - - res = [re.compile(fnmatch.translate(f), - flags=re.I if args.insensitive else 0) - for f in filters] + r = fnmatch.translate(f) + rc = re.compile(r, flags=re.I if args.insensitive else 0) + res.append(rc) if args.search_description: def match(p, f): -- cgit v1.2.3-70-g09d2 From 652a5eb5924415bd7d8c9d568f33f7dab211d998 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 17 Jun 2016 18:09:03 -0500 Subject: Allow py-pillow to link to Spack-built libraries --- .../repos/builtin/packages/py-pillow/package.py | 136 +++++++++++++-------- 1 file changed, 86 insertions(+), 50 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py index cdbc57e0a5..5784b9f181 100644 --- a/var/spack/repos/builtin/packages/py-pillow/package.py +++ b/var/spack/repos/builtin/packages/py-pillow/package.py @@ -23,77 +23,113 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class PyPillow(Package): - """Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.""" + """Pillow is a fork of the Python Imaging Library (PIL). It adds image + processing capabilities to your Python interpreter. This library supports + many file formats, and provides powerful image processing and graphics + capabilities.""" - homepage = "https://python-pillow.github.io/" + homepage = "https://python-pillow.org/" url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.tar.gz" + version('3.2.0', '7cfd093c11205d9e2ebe3c51dfcad510') version('3.0.0', 'fc8ac44e93da09678eac7e30c9b7377d') - provides('PIL') # These defaults correspond to Pillow defaults - variant('jpeg', default=True, description='Provide JPEG functionality') - variant('zlib', default=True, description='Access to compressed PNGs') - variant('tiff', default=False, description='Access to TIFF files') + variant('jpeg', default=True, description='Provide JPEG functionality') + variant('zlib', default=True, description='Access to compressed PNGs') + variant('tiff', default=False, description='Access to TIFF files') variant('freetype', default=False, description='Font related services') - variant('tk', default=False, description='Support for tkinter bitmap and photo images') - variant('lcms', default=False, description='Color management') + variant('lcms', default=False, description='Color management') + variant('tk', default=False, description='Support for tkinter bitmap and photo images') + variant('jpeg2000', default=False, description='Provide JPEG 2000 functionality') # Spack does not (yet) support these modes of building - # variant('webp', default=False, description='') - # variant('webpmux', default=False, description='') - # variant('jpeg2000', default=False, description='') + # variant('webp', default=False, description='Provide the WebP format') + # variant('webpmux', default=False, description='WebP metadata, relies on WebP support') + # variant('imagequant', default=False, description='Provide improved color quantization') + + provides('PIL') + # Required dependencies extends('python') - depends_on('binutils') depends_on('py-setuptools') - depends_on('jpeg', when='+jpeg') # BUG: It will use the system libjpeg anyway + # Recommended dependencies + depends_on('jpeg', when='+jpeg') depends_on('zlib', when='+zlib') - depends_on('tiff', when='+tiff') + + # Optional dependencies + depends_on('libtiff', when='+tiff') depends_on('freetype', when='+freetype') - depends_on('lcms', when='+lcms') - depends_on('tcl', when='+tk') - depends_on('tk', when='+tk') + depends_on('lcms', when='+lcms') + depends_on('tcl', when='+tk') + depends_on('tk', when='+tk') + depends_on('openjpeg', when='+jpeg2000') - def install(self, spec, prefix): - libpath=[] + # Spack does not (yet) support these modes of building + # depends_on('webp', when='+webp') + # depends_on('webpmux', when='+webpmux') + # depends_on('imagequant', when='+imagequant') + + def patch(self): + """Patch setup.py to provide lib and include directories + for dependencies.""" + + spec = self.spec + setup = FileFilter('setup.py') if '+jpeg' in spec: - libpath.append(join_path(spec['jpeg'].prefix, 'lib')) + setup.filter('JPEG_ROOT = None', + 'JPEG_ROOT = ("{0}", "{1}")'.format( + spec['jpeg'].prefix.lib, + spec['jpeg'].prefix.include)) if '+zlib' in spec: - libpath.append(join_path(spec['zlib'].prefix, 'lib')) + setup.filter('ZLIB_ROOT = None', + 'ZLIB_ROOT = ("{0}", "{1}")'.format( + spec['zlib'].prefix.lib, + spec['zlib'].prefix.include)) if '+tiff' in spec: - libpath.append(join_path(spec['tiff'].prefix, 'lib')) + setup.filter('TIFF_ROOT = None', + 'TIFF_ROOT = ("{0}", "{1}")'.format( + spec['libtiff'].prefix.lib, + spec['libtiff'].prefix.include)) if '+freetype' in spec: - libpath.append(join_path(spec['freetype'].prefix, 'lib')) + setup.filter('FREETYPE_ROOT = None', + 'FREETYPE_ROOT = ("{0}", "{1}")'.format( + spec['freetype'].prefix.lib, + spec['freetype'].prefix.include)) if '+lcms' in spec: - libpath.append(join_path(spec['lcms'].prefix, 'lib')) - - # This has not been tested, and likely needs some other treatment. - #if '+tk' in spec: - # libpath.append(join_path(spec['tcl'].prefix, 'lib')) - # libpath.append(join_path(spec['tk'].prefix, 'lib')) - - # -------- Building - cmd = ['build_ext', - '--%s-jpeg' % ('enable' if '+jpeg' in spec else 'disable'), - '--%s-zlib' % ('enable' if '+zlib' in spec else 'disable'), - '--%s-tiff' % ('enable' if '+tiff' in spec else 'disable'), - '--%s-freetype' % ('enable' if '+freetype' in spec else 'disable'), - '--%s-lcms' % ('enable' if '+lcms' in spec else 'disable'), - '-L'+':'.join(libpath) # NOTE: This does not make it find libjpeg - ] - - #if '+tk' in spec: - # cmd.extend(['--enable-tcl', '--enable-tk']) - #else: - # cmd.extend(['--disable-tcl', '--disable-tk']) - - # --------- Installation - cmd.extend(['install', '--prefix=%s' % prefix]) - - python('setup.py', *cmd) + setup.filter('LCMS_ROOT = None', + 'LCMS_ROOT = ("{0}", "{1}")'.format( + spec['lcms'].prefix.lib, + spec['lcms'].prefix.include)) + if '+tk' in spec: + setup.filter('TCL_ROOT = None', + 'TCL_ROOT = ("{0}", "{1}")'.format( + spec['tcl'].prefix.lib, + spec['tcl'].prefix.include)) + if '+jpeg2000' in spec: + setup.filter('JPEG2K_ROOT = None', + 'JPEG2K_ROOT = ("{0}", "{1}")'.format( + spec['openjpeg'].prefix.lib, + spec['openjpeg'].prefix.include)) + + def install(self, spec, prefix): + build_args = [ + '--{0}-jpeg'.format('enable' if '+jpeg' in spec else 'disable'), + '--{0}-zlib'.format('enable' if '+zlib' in spec else 'disable'), + '--{0}-tiff'.format('enable' if '+tiff' in spec else 'disable'), + '--{0}-freetype'.format( + 'enable' if '+freetype' in spec else 'disable'), + '--{0}-lcms'.format('enable' if '+lcms' in spec else 'disable'), + '--{0}-tk'.format('enable' if '+tk' in spec else 'disable'), + '--{0}-tcl'.format('enable' if '+tk' in spec else 'disable'), + '--{0}-jpeg2000'.format( + 'enable' if '+jpeg2000' in spec else 'disable') + ] + + python('setup.py', 'build_ext', *build_args) + python('setup.py', 'install', '--prefix={0}'.format(prefix)) -- cgit v1.2.3-70-g09d2 From c703bfb54d0452418fea95839226fb5bab7e5893 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 18 Jun 2016 00:48:08 -0700 Subject: Got rid of init_config flag since we don't need it. Instead we update the cache config if there are any changes --- lib/spack/spack/compilers/__init__.py | 40 +++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 6de2d87b32..0543ce8af1 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -52,6 +52,7 @@ from spack.util.environment import get_path _imported_compilers_module = 'spack.compilers' _path_instance_vars = ['cc', 'cxx', 'f77', 'fc'] _other_instance_vars = ['modules', 'operating_system'] +_cache_config_file = [] # TODO: customize order in config file if platform.system() == 'Darwin': @@ -82,7 +83,7 @@ def _to_dict(compiler): return {'compiler': d} -def get_compiler_config(scope=None, init_config=True): +def get_compiler_config(scope=None): """Return the compiler configuration for the specified architecture. """ def init_compiler_config(): @@ -97,9 +98,7 @@ def get_compiler_config(scope=None, init_config=True): # Update the configuration if there are currently no compilers # configured. Avoid updating automatically if there ARE site # compilers configured but no user ones. -# if (isinstance(arch, basestring) or arch == my_arch) and arch not in config: - empty_config = [] - if not config and init_config: + if not config: if scope is None: # We know no compilers were configured in any scope. init_compiler_config() @@ -112,11 +111,13 @@ def get_compiler_config(scope=None, init_config=True): init_compiler_config() config = spack.config.get_config('compilers', scope=scope) return config + elif config: + return config else: - return empty_config + return [] # Return empty list which we will later append to. -def add_compilers_to_config(compilers, scope=None, init_config=True): +def add_compilers_to_config(compilers, scope=None): """Add compilers to the config for the specified architecture. Arguments: @@ -124,10 +125,10 @@ def add_compilers_to_config(compilers, scope=None, init_config=True): - scope: configuration scope to modify. """ compiler_config = get_compiler_config(scope, init_config) - print compiler_config for compiler in compilers: compiler_config.append(_to_dict(compiler)) - + global _cache_config_file + _cache_config_file = compiler_config spack.config.update_config('compilers', compiler_config, scope) @@ -140,32 +141,35 @@ def remove_compiler_from_config(compiler_spec, scope=None): - scope: configuration scope to modify. """ compiler_config = get_compiler_config(scope) - matches = [(a,c) for (a,c) in compiler_config.items() if c['spec'] == compiler_spec] - if len(matches) == 1: - del compiler_config[matches[0][0]] - else: + config_length = len(compiler_config) + + filtered_compiler_config = [comp for comp in compiler_config + if spack.spec.CompilerSpec(comp['compiler']['spec']) != compiler_spec] + # Need a better way for this + global _cache_config_file + _cache_config_file = filtered_compiler_config # Update the cache for changes + if len(filtered_compiler_config) == config_length: # No items removed CompilerSpecInsufficientlySpecificError(compiler_spec) + spack.config.update_config('compilers', filtered_compiler_config, scope) - spack.config.update_config('compilers', compiler_config, scope) -_cache_config_file = {} -def all_compilers_config(scope=None, init_config=True): +def all_compilers_config(scope=None): """Return a set of specs for all the compiler versions currently available to build with. These are instances of CompilerSpec. """ # Get compilers for this architecture. global _cache_config_file #Create a cache of the config file so we don't load all the time. if not _cache_config_file: - _cache_config_file = get_compiler_config(scope, init_config) + _cache_config_file = get_compiler_config(scope) return _cache_config_file else: return _cache_config_file -def all_compilers(scope=None, init_config=True): +def all_compilers(scope=None): # Return compiler specs from the merged config. return [spack.spec.CompilerSpec(s['compiler']['spec']) - for s in all_compilers_config(scope, init_config)] + for s in all_compilers_config(scope)] def default_compiler(): -- cgit v1.2.3-70-g09d2 From a33077b77fc83bf2cb7e78f0724922fc61137898 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 18 Jun 2016 13:07:14 +0200 Subject: unit tests : fixed test_alter_environment --- lib/spack/spack/test/modules.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 59ee607826..889c09c730 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -93,17 +93,14 @@ configuration_alter_environment = { 'filter': {'environment_blacklist': ['CMAKE_PREFIX_PATH']} }, 'platform=test target=x86_64': { - 'environment': {'set': {'FOO': 'foo'}, - 'unset': ['BAR']} - 'arch=x86-linux': { 'environment': { 'set': {'FOO': 'foo'}, 'unset': ['BAR'] } }, - 'arch=x64-linux': { + 'platform=test target=x86_32': { 'load': ['foo/bar'] - } + } } } @@ -246,7 +243,6 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_alter_environment spec = spack.spec.Spec('mpileaks platform=test target=x86_64') content = self.get_modulefile_content(spec) - print content self.assertEqual( len([x for x in content @@ -257,7 +253,6 @@ class TclTests(MockPackagesTest): spec = spack.spec.Spec('libdwarf %clang platform=test target=x86_32') content = self.get_modulefile_content(spec) - print content self.assertEqual( len([x for x in content -- cgit v1.2.3-70-g09d2 From 670669ef808a9a737e760ced8a9fd1d000f360b9 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 18 Jun 2016 13:10:35 +0200 Subject: qa : fixed flake8 issues --- lib/spack/spack/test/modules.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 889c09c730..443e4d13a6 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -100,7 +100,7 @@ configuration_alter_environment = { }, 'platform=test target=x86_32': { 'load': ['foo/bar'] - } + } } } @@ -201,7 +201,6 @@ class TclTests(MockPackagesTest): def get_modulefile_content(self, spec): spec.concretize() - print spec, '&&&&&' generator = spack.modules.TclModule(spec) generator.write() content = FILE_REGISTRY[generator.file_name].split('\n') @@ -269,7 +268,6 @@ class TclTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_blacklist spec = spack.spec.Spec('mpileaks') content = self.get_modulefile_content(spec) - print('\n'.join(content)) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 1) self.assertEqual(len([x for x in content if 'module load ' in x]), 1) spec = spack.spec.Spec('callpath arch=x86-linux') @@ -277,7 +275,6 @@ class TclTests(MockPackagesTest): self.assertRaises(AttributeError, self.get_modulefile_content, spec) spec = spack.spec.Spec('zmpi arch=x86-linux') content = self.get_modulefile_content(spec) - print('\n'.join(content)) self.assertEqual(len([x for x in content if 'is-loaded' in x]), 1) self.assertEqual(len([x for x in content if 'module load ' in x]), 1) @@ -343,6 +340,5 @@ class DotkitTests(MockPackagesTest): spack.modules.CONFIGURATION = configuration_dotkit spec = spack.spec.Spec('mpileaks arch=x86-linux') content = self.get_modulefile_content(spec) - print('\n'.join(content)) self.assertTrue('#c spack' in content) self.assertTrue('#d mpileaks @2.3' in content) -- cgit v1.2.3-70-g09d2 From 9e0c20c794cea3d54fc16ea7470035384985f1c6 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sat, 18 Jun 2016 13:39:08 +0200 Subject: environment : filter the current environment Previously only the environment obtained after sourcing the file was filtered. This caused the appeareance of spurious unset commands in the list. --- lib/spack/spack/environment.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index cfba060459..30c6228ca4 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -297,16 +297,18 @@ class EnvironmentModifications(object): if proc.returncode != 0: raise RuntimeError('sourcing files returned a non-zero exit code') output = ''.join([line for line in proc.stdout]) - # Construct a dictionary with all the variables in the environment + # Construct a dictionary with all the variables in the new environment after_source_env = dict(json.loads(output)) + this_environment = dict(os.environ) - # Filter variables that are due to how we source - after_source_env.pop('SHLVL') - after_source_env.pop('_') - after_source_env.pop('PWD') + # Filter variables that are not related to sourcing a file + to_be_filtered = 'SHLVL', '_', 'PWD', 'OLDPWD' + for d in after_source_env, this_environment: + for name in to_be_filtered: + d.pop(name, None) # Fill the EnvironmentModifications instance - this_environment = dict(os.environ) + # New variables new_variables = set(after_source_env) - set(this_environment) for x in new_variables: -- cgit v1.2.3-70-g09d2 From ccb62b46204531fa4ceeadd3b1722b0bb0e30f4f Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 18 Jun 2016 10:49:39 -0700 Subject: Getting rid of no longer used init_config arg --- lib/spack/spack/cmd/compiler.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index 3a496492ff..c95045ef85 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -77,11 +77,9 @@ def compiler_find(args): paths = get_path('PATH') compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) - if c.spec not in spack.compilers.all_compilers(scope=args.scope, - init_config=False)] + if c.spec not in spack.compilers.all_compilers(scope=args.scope)] if compilers: - spack.compilers.add_compilers_to_config(compilers, scope=args.scope, - init_config=False) + spack.compilers.add_compilers_to_config(compilers, scope=args.scope) n = len(compilers) s = 's' if n > 1 else '' filename = spack.config.get_config_filename(args.scope, 'compilers') @@ -94,7 +92,6 @@ def compiler_find(args): def compiler_remove(args): cspec = CompilerSpec(args.compiler_spec) compilers = spack.compilers.compilers_for_spec(cspec, scope=args.scope) - if not compilers: tty.die("No compilers match spec %s" % cspec) elif not args.all and len(compilers) > 1: -- cgit v1.2.3-70-g09d2 From 36275f8e6eec5b7238e17743a3ec9a2aff371941 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 18 Jun 2016 10:50:55 -0700 Subject: More clean up of init_config, also no need for a different find_compilers function. --- lib/spack/spack/compilers/__init__.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 0543ce8af1..ae72b743b2 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -124,7 +124,7 @@ def add_compilers_to_config(compilers, scope=None): - compilers: a list of Compiler objects. - scope: configuration scope to modify. """ - compiler_config = get_compiler_config(scope, init_config) + compiler_config = get_compiler_config(scope) for compiler in compilers: compiler_config.append(_to_dict(compiler)) global _cache_config_file @@ -185,12 +185,6 @@ def default_compiler(): def find_compilers(*paths): - """ Call find compilers help and return the list it finds using - the operating system method (PATHS, MODULES) """ - return _find_compilers(*paths) - - -def _find_compilers(*paths): """Return a list of compilers found in the suppied paths. This invokes the find_compilers() method for each operating system associated with the host platform, and appends @@ -203,6 +197,7 @@ def _find_compilers(*paths): compiler_lists.extend(o.find_compilers(*paths)) return compiler_lists + def supported_compilers(): """Return a set of names of compilers supported by Spack. -- cgit v1.2.3-70-g09d2 From 15e6b88a8b5f1e7ae1d06b4b4edc1126b4d68420 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 18 Jun 2016 10:51:38 -0700 Subject: Adding new tests for compiler command for spack's test suite --- lib/spack/spack/test/cmd/test_compiler_cmd.py | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lib/spack/spack/test/cmd/test_compiler_cmd.py diff --git a/lib/spack/spack/test/cmd/test_compiler_cmd.py b/lib/spack/spack/test/cmd/test_compiler_cmd.py new file mode 100644 index 0000000000..81bc7aacf2 --- /dev/null +++ b/lib/spack/spack/test/cmd/test_compiler_cmd.py @@ -0,0 +1,34 @@ +import spack.spec +import spack.cmd.compiler +import spack.compilers +from spack.test.mock_packages_test import * + + +class MockArgs(object): + def __init__(self, add_paths=[], scope=None, compiler_spec=None, all=None): + self.add_paths = add_paths + self.scope = scope + self.compiler_spec = compiler_spec + self.all = all + + +class CompilerCmdTest(MockPackagesTest): + """ Test compiler commands for add and remove """ + + def test_compiler_remove(self): + args = MockArgs(all=True, compiler_spec='gcc@4.5.0') + spack.cmd.compiler.compiler_remove(args) + compilers = spack.compilers.all_compilers() + self.assertTrue(spack.spec.CompilerSpec("gcc@4.5.0") not in compilers) + + def test_compiler_add(self): + # Probably not a good a assumption but might try finding local + # compilers + # installed in /usr + compilers = spack.compilers.all_compilers() + s = set(compilers) + args = MockArgs(add_paths=["/usr"]) + spack.cmd.compiler.compiler_find(args) + new_compilers = spack.compilers.all_compilers() + new_compiler = [x for x in new_compilers if x not in s] + self.assertTrue(new_compiler) -- cgit v1.2.3-70-g09d2 From 64c83638fff9716477ecbc3d87989b6b8437b05f Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Sat, 18 Jun 2016 11:11:46 -0700 Subject: Adding test to list of test_names --- lib/spack/spack/test/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/test/__init__.py b/lib/spack/spack/test/__init__.py index 97f142e746..fb91f24721 100644 --- a/lib/spack/spack/test/__init__.py +++ b/lib/spack/spack/test/__init__.py @@ -40,7 +40,7 @@ test_names = ['architecture', 'versions', 'url_parse', 'url_substitution', 'pack 'cc', 'link_tree', 'spec_yaml', 'optional_deps', 'make_executable', 'configure_guess', 'lock', 'database', 'namespace_trie', 'yaml', 'sbang', 'environment', 'cmd.find', - 'cmd.uninstall', 'cmd.test_install'] + 'cmd.uninstall', 'cmd.test_install', 'cmd.test_compiler_cmd'] def list_tests(): -- cgit v1.2.3-70-g09d2 From 1cc04cff27273bdad8962f2edd854f1d18481545 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 19 Jun 2016 11:59:10 +0200 Subject: openblas: raise an error without Fortran compiler --- var/spack/repos/builtin/packages/openblas/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 22e49daaa7..d09ebd6739 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -48,6 +48,13 @@ class Openblas(Package): patch('make.patch') def install(self, spec, prefix): + # As of 06/2016 there is no mechanism to specify that packages which + # depends on Blas/Lapack need C or/and Fortran symbols. For now + # require both. + if self.compiler.f77 is None: + raise InstallError('OpenBLAS requires both C and Fortran ', + 'compilers!') + # Configure fails to pick up fortran from FC=/abs/path/to/f77, but # works fine with FC=/abs/path/to/gfortran. # When mixing compilers make sure that -- cgit v1.2.3-70-g09d2 From cf4a34c657b05bfbb71ec69d1521f265a156de57 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 19 Jun 2016 11:59:29 +0200 Subject: openmpi: raise an error without Fortran compiler --- var/spack/repos/builtin/packages/openmpi/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 0638628a6c..be3d1342fc 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -121,6 +121,13 @@ class Openmpi(Package): return 'verbs' def install(self, spec, prefix): + # As of 06/2016 there is no mechanism to specify that packages which + # depends on MPI need C or/and Fortran implementation. For now + # require both. + if (self.compiler.f77 is None) or (self.compiler.fc is None): + raise InstallError('OpenMPI requires both C and Fortran ', + 'compilers!') + config_args = ["--prefix=%s" % prefix, "--with-hwloc=%s" % spec['hwloc'].prefix, "--enable-shared", -- cgit v1.2.3-70-g09d2 From 973caa3a07a886e1c4fd7bb36363fc738a72da00 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 20 Jun 2016 11:10:13 -0400 Subject: modules.yaml: use the right envvar for pkg-config Fixes #1072. --- etc/spack/modules.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/spack/modules.yaml b/etc/spack/modules.yaml index 99be5e7b6d..5f31cdd5c0 100644 --- a/etc/spack/modules.yaml +++ b/etc/spack/modules.yaml @@ -22,8 +22,8 @@ modules: include: - CPATH lib/pkgconfig: - - PKGCONFIG + - PKG_CONFIG_PATH lib64/pkgconfig: - - PKGCONFIG + - PKG_CONFIG_PATH '': - CMAKE_PREFIX_PATH -- cgit v1.2.3-70-g09d2 From 83b0c167284545338dffb44e09a9e6057cfb19a6 Mon Sep 17 00:00:00 2001 From: "Robert.French" Date: Mon, 20 Jun 2016 15:07:55 +0000 Subject: Tmux 2.2 with PEP8 Tmux 2.2 Provide variant to skip utempter Remove utempter variant; 2.2 doesn't need it Flake8ify --- var/spack/repos/builtin/packages/tmux/package.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py index c46425c0d3..573ee38a79 100644 --- a/var/spack/repos/builtin/packages/tmux/package.py +++ b/var/spack/repos/builtin/packages/tmux/package.py @@ -24,26 +24,33 @@ ############################################################################## from spack import * + class Tmux(Package): """tmux is a terminal multiplexer. What is a terminal multiplexer? It lets - you switch easily between several programs in one terminal, detach them (they - keep running in the background) and reattach them to a different terminal. And - do a lot more. + you switch easily between several programs in one terminal, detach them + (they keep running in the background) and reattach them to a different + terminal. And do a lot more. """ homepage = "http://tmux.github.io" - url = "https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz" + url = "https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz" version('1.9a', 'b07601711f96f1d260b390513b509a2d') version('2.1', '74a2855695bccb51b6e301383ad4818c') + version('2.2', 'bd95ee7205e489c62c616bb7af040099') depends_on('libevent') depends_on('ncurses') def install(self, spec, prefix): + pkg_config_path = ':'.join([ + spec['libevent'].prefix, + spec['ncurses'].prefix + ]) + configure( "--prefix=%s" % prefix, - "PKG_CONFIG_PATH=%s:%s" % (spec['libevent'].prefix, spec['ncurses'].prefix)) + "PKG_CONFIG_PATH=%s" % pkg_config_path) make() make("install") -- cgit v1.2.3-70-g09d2 From 84e21703bde307c920e83e6cd4452feaacbaf5f2 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 20 Jun 2016 09:28:24 -0700 Subject: Test no longer assumes compilers exist in /usr. - makes a fake gcc instead, and tests that. --- lib/spack/spack/test/cmd/test_compiler_cmd.py | 67 +++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/test/cmd/test_compiler_cmd.py b/lib/spack/spack/test/cmd/test_compiler_cmd.py index 81bc7aacf2..d89814154b 100644 --- a/lib/spack/spack/test/cmd/test_compiler_cmd.py +++ b/lib/spack/spack/test/cmd/test_compiler_cmd.py @@ -1,8 +1,16 @@ +import os +import shutil +from tempfile import mkdtemp + +from llnl.util.filesystem import set_executable, mkdirp + import spack.spec import spack.cmd.compiler import spack.compilers +from spack.version import Version from spack.test.mock_packages_test import * +test_version = '4.5-spacktest' class MockArgs(object): def __init__(self, add_paths=[], scope=None, compiler_spec=None, all=None): @@ -12,23 +20,62 @@ class MockArgs(object): self.all = all +def make_mock_compiler(): + """Make a directory containing a fake, but detectable compiler.""" + mock_compiler_dir = mkdtemp() + bin_dir = os.path.join(mock_compiler_dir, 'bin') + mkdirp(bin_dir) + + gcc_path = os.path.join(bin_dir, 'gcc') + gxx_path = os.path.join(bin_dir, 'g++') + gfortran_path = os.path.join(bin_dir, 'gfortran') + + with open(gcc_path, 'w') as f: + f.write("""\ +#!/bin/sh + +for arg in "$@"; do + if [ "$arg" = -dumpversion ]; then + echo '%s' + fi +done +""" % test_version) + + # Create some mock compilers in the temporary directory + set_executable(gcc_path) + shutil.copy(gcc_path, gxx_path) + shutil.copy(gcc_path, gfortran_path) + + return mock_compiler_dir + + class CompilerCmdTest(MockPackagesTest): """ Test compiler commands for add and remove """ + def test_compiler_remove(self): args = MockArgs(all=True, compiler_spec='gcc@4.5.0') spack.cmd.compiler.compiler_remove(args) compilers = spack.compilers.all_compilers() self.assertTrue(spack.spec.CompilerSpec("gcc@4.5.0") not in compilers) + def test_compiler_add(self): - # Probably not a good a assumption but might try finding local - # compilers - # installed in /usr - compilers = spack.compilers.all_compilers() - s = set(compilers) - args = MockArgs(add_paths=["/usr"]) - spack.cmd.compiler.compiler_find(args) - new_compilers = spack.compilers.all_compilers() - new_compiler = [x for x in new_compilers if x not in s] - self.assertTrue(new_compiler) + # compilers available by default. + old_compilers = set(spack.compilers.all_compilers()) + + # add our new compiler and find again. + compiler_dir = make_mock_compiler() + + try: + args = MockArgs(add_paths=[compiler_dir]) + spack.cmd.compiler.compiler_find(args) + + # ensure new compiler is in there + new_compilers = set(spack.compilers.all_compilers()) + new_compiler = new_compilers - old_compilers + self.assertTrue(new_compiler) + self.assertTrue(new_compiler.pop().version == Version(test_version)) + + finally: + shutil.rmtree(compiler_dir, ignore_errors=True) -- cgit v1.2.3-70-g09d2 From 2220784eda80546415e39c783785f2435986a08a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 26 May 2016 15:22:17 -0500 Subject: Add scons support, .zip support, and Cantera package --- lib/spack/spack/build_environment.py | 3 +- lib/spack/spack/cmd/create.py | 166 ++++++++++++++------- .../repos/builtin/packages/cantera/package.py | 149 ++++++++++++++++++ .../repos/builtin/packages/py-3to2/package.py | 40 +++++ .../repos/builtin/packages/py-unittest2/package.py | 41 +++++ .../builtin/packages/py-unittest2py3k/package.py | 42 ++++++ var/spack/repos/builtin/packages/serf/package.py | 2 - .../repos/builtin/packages/sundials/package.py | 105 ++++++++++++- .../repos/builtin/packages/superlu-mt/package.py | 135 +++++++++++++++++ 9 files changed, 618 insertions(+), 65 deletions(-) create mode 100644 var/spack/repos/builtin/packages/cantera/package.py create mode 100644 var/spack/repos/builtin/packages/py-3to2/package.py create mode 100644 var/spack/repos/builtin/packages/py-unittest2/package.py create mode 100644 var/spack/repos/builtin/packages/py-unittest2py3k/package.py create mode 100644 var/spack/repos/builtin/packages/superlu-mt/package.py diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 7c65091d49..c72dc1a4dd 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -290,7 +290,7 @@ def set_module_variables_for_package(pkg, module): """Populate the module scope of install() with some useful functions. This makes things easier for package writers. """ - # number of jobs spack will to build with. + # number of jobs spack will build with. jobs = multiprocessing.cpu_count() if not pkg.parallel: jobs = 1 @@ -303,6 +303,7 @@ def set_module_variables_for_package(pkg, module): # TODO: make these build deps that can be installed if not found. m.make = MakeExecutable('make', jobs) m.gmake = MakeExecutable('gmake', jobs) + m.scons = MakeExecutable('scons', jobs) # easy shortcut to os.environ m.env = os.environ diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 41bfa741f6..fa7ffb3923 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -1,4 +1,3 @@ -_copyright = """\ ############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. @@ -23,10 +22,8 @@ _copyright = """\ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -""" import string import os -import hashlib import re from ordereddict_backport import OrderedDict @@ -41,16 +38,37 @@ import spack.util.web from spack.spec import Spec from spack.util.naming import * from spack.repository import Repo, RepoError -import spack.util.crypto as crypto from spack.util.executable import which -from spack.stage import Stage description = "Create a new package file from an archive URL" -package_template = string.Template( - _copyright + """ +package_template = string.Template("""\ +############################################################################## +# 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 +############################################################################## # # This is a template package file for Spack. We've put "FIXME" # next to all the things you'll want to change. Once you've handled @@ -68,8 +86,10 @@ package_template = string.Template( # from spack import * + class ${class_name}(Package): ""\"FIXME: put a proper description of your package here.""\" + # FIXME: add a proper url for your package's homepage here. homepage = "http://www.example.com" url = "${url}" @@ -80,12 +100,10 @@ ${versions} # depends_on("foo") def install(self, spec, prefix): - # FIXME: Modify the configure line to suit your build system here. + # FIXME: Modify the installation instructions here ${configure} - - # FIXME: Add logic to build and install here - make() - make("install") + ${build} + ${install} """) @@ -120,39 +138,78 @@ def setup_parser(subparser): class ConfigureGuesser(object): def __call__(self, stage): - """Try to guess the type of build system used by the project, and return - an appropriate configure line. - """ - autotools = "configure('--prefix=%s' % prefix)" - cmake = "cmake('.', *std_cmake_args)" - python = "python('setup.py', 'install', '--prefix=%s' % prefix)" - r = "R('CMD', 'INSTALL', '--library=%s' % self.module.r_lib_dir, '%s' % self.stage.archive_file)" - - config_lines = ((r'/configure$', 'autotools', autotools), - (r'/CMakeLists.txt$', 'cmake', cmake), - (r'/setup.py$', 'python', python), - (r'/NAMESPACE$', 'r', r)) - - # Peek inside the tarball. - tar = which('tar') - output = tar( - "--exclude=*/*/*", "-tf", stage.archive_file, output=str) - lines = output.split("\n") - - # Set the configure line to the one that matched. - for pattern, bs, cl in config_lines: + """Try to guess the type of build system used by the project. Set the + appropriate default configure, build, and install instructions.""" + + # Default configure instructions + configureDict = { + 'autotools': "configure('--prefix={0}'.format(prefix))", + 'cmake': "cmake('.', *std_cmake_args)", + 'scons': "", + 'python': "", + 'r': "", + 'unknown': "# FIXME: Unknown build system" + } + + # Default build instructions + buildDict = { + 'autotools': "make()", + 'cmake': "make()", + 'scons': "scons('prefix={0}'.format(prefix))", + 'python': "", + 'r': "", + 'unknown': "make()", + } + + # Default install instructions + installDict = { + 'autotools': "make('install')", + 'cmake': "make('install')", + 'scons': "scons('install')", + 'python': "python('setup.py', 'install', " + + "'--prefix={0}'.format(prefix))", + 'r': "R('CMD', 'INSTALL', '--library={0}'.format(" + + "self.module.r_lib_dir), self.stage.archive_file)", + 'unknown': "make('install')", + } + + # A list of clues that give us an idea of the build system a package + # uses. If the regular expression matches a file contained in the + # archive, the corresponding build system is assumed. + clues = [ + (r'/configure$', 'autotools'), + (r'/CMakeLists.txt$', 'cmake'), + (r'/SConstruct$', 'scons'), + (r'/setup.py$', 'python'), + (r'/NAMESPACE$', 'r') + ] + + # Peek inside the compressed file. + output = '' + if stage.archive_file.endswith(('.tar', '.tar.gz', '.tar.bz2', + '.tgz', '.tbz2')): + tar = which('tar') + output = tar('--exclude=*/*/*', '-tf', + stage.archive_file, output=str) + elif stage.archive_file.endswith('.gz'): + gunzip = which('gunzip') + output = gunzip('-l', stage.archive_file, output=str) + elif stage.archive_file.endswith('.zip'): + unzip = which('unzip') + output = unzip('-l', stage.archive_file, output=str) + lines = output.split('\n') + + # Determine the build system based on the files contained + # in the archive. + build_system = 'unknown' + for pattern, bs in clues: if any(re.search(pattern, l) for l in lines): - config_line = cl build_system = bs - break - else: - # None matched -- just put both, with cmake commented out - config_line = "# FIXME: Spack couldn't guess one, so here are some options:\n" - config_line += " # " + autotools + "\n" - config_line += " # " + cmake - build_system = 'unknown' - self.configure = config_line + self.configure = configureDict[build_system] + self.build = buildDict[build_system] + self.install = installDict[build_system] + self.build_system = build_system @@ -168,7 +225,7 @@ def guess_name_and_version(url, args): else: try: name = spack.url.parse_name(url, version) - except spack.url.UndetectableNameError, e: + except spack.url.UndetectableNameError: # Use a user-supplied name if one is present tty.die("Couldn't guess a name for this package. Try running:", "", "spack create --name ") @@ -182,7 +239,8 @@ def guess_name_and_version(url, args): def find_repository(spec, args): # figure out namespace for spec if spec.namespace and args.namespace and spec.namespace != args.namespace: - tty.die("Namespaces '%s' and '%s' do not match." % (spec.namespace, args.namespace)) + tty.die("Namespaces '%s' and '%s' do not match." % (spec.namespace, + args.namespace)) if not spec.namespace and args.namespace: spec.namespace = args.namespace @@ -193,8 +251,8 @@ def find_repository(spec, args): try: repo = Repo(repo_path) if spec.namespace and spec.namespace != repo.namespace: - tty.die("Can't create package with namespace %s in repo with namespace %s" - % (spec.namespace, repo.namespace)) + tty.die("Can't create package with namespace %s in repo with " + "namespace %s" % (spec.namespace, repo.namespace)) except RepoError as e: tty.die(str(e)) else: @@ -214,11 +272,7 @@ def find_repository(spec, args): def fetch_tarballs(url, name, version): """Try to find versions of the supplied archive by scraping the web. - - Prompts the user to select how many to download if many are found. - - - """ + Prompts the user to select how many to download if many are found.""" versions = spack.util.web.find_versions_of_archive(url) rkeys = sorted(versions.keys(), reverse=True) versions = OrderedDict(zip(rkeys, (versions[v] for v in rkeys))) @@ -226,11 +280,11 @@ def fetch_tarballs(url, name, version): archives_to_fetch = 1 if not versions: # If the fetch failed for some reason, revert to what the user provided - versions = { version : url } + versions = {version: url} elif len(versions) > 1: tty.msg("Found %s versions of %s:" % (len(versions), name), *spack.cmd.elide_list( - ["%-10s%s" % (v,u) for v, u in versions.iteritems()])) + ["%-10s%s" % (v, u) for v, u in versions.iteritems()])) print archives_to_fetch = tty.get_number( "Include how many checksums in the package file?", @@ -292,10 +346,12 @@ def create(parser, args): pkg_file.write( package_template.substitute( name=name, - configure=guesser.configure, class_name=mod_to_class(name), url=url, - versions=make_version_calls(ver_hash_tuples))) + versions=make_version_calls(ver_hash_tuples), + configure=guesser.configure, + build=guesser.build, + install=guesser.install)) # If everything checks out, go ahead and edit. spack.editor(pkg_path) diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py new file mode 100644 index 0000000000..a55f883560 --- /dev/null +++ b/var/spack/repos/builtin/packages/cantera/package.py @@ -0,0 +1,149 @@ +############################################################################## +# 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 * +import spack +import os + + +class Cantera(Package): + """Cantera is a suite of object-oriented software tools for problems + involving chemical kinetics, thermodynamics, and/or transport processes.""" + + homepage = "http://www.cantera.org/docs/sphinx/html/index.html" + url = "https://github.com/Cantera/cantera/archive/v2.2.1.tar.gz" + + version('2.2.1', '9d1919bdef39ddec54485fc8a741a3aa') + + variant('lapack', default=True, description='Build with external BLAS/LAPACK libraries') + variant('threadsafe', default=True, description='Build threadsafe, requires Boost') + variant('sundials', default=True, description='Build with external Sundials') + variant('python', default=False, description='Build the Cantera Python module') + variant('matlab', default=False, description='Build the Cantera Matlab toolbox') + + # Required dependencies + depends_on('scons') + + # Recommended dependencies + depends_on('blas', when='+lapack') + depends_on('lapack', when='+lapack') + depends_on('boost', when='+threadsafe') + depends_on('sundials', when='+sundials') # must be compiled with -fPIC + + # 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') + # 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') + + # Matlab toolbox dependencies + # TODO: add Matlab package + # TODO: allow packages to extend multiple other packages + #extends('matlab', when='+matlab') + + def install(self, spec, prefix): + # Required options + options = [ + 'prefix={0}'.format(prefix), + 'CC={0}'.format(os.environ['CC']), + 'CXX={0}'.format(os.environ['CXX']), + 'F77={0}'.format(os.environ['F77']), + 'FORTRAN={0}'.format(os.environ['FC']), + 'cc_flags=-fPIC', + # Allow Spack environment variables to propagate through to SCons + 'env_vars=all' + ] + + # BLAS/LAPACK support + if '+lapack' in spec: + options.extend([ + 'blas_lapack_libs=lapack,blas', + 'blas_lapack_dir={0}'.format(spec['lapack'].prefix.lib) + ]) + + # Threadsafe build, requires Boost + if '+threadsafe' in spec: + options.extend([ + 'build_thread_safe=yes', + 'boost_inc_dir={0}'.format(spec['boost'].prefix.include), + 'boost_lib_dir={0}'.format(spec['boost'].prefix.lib), + 'boost_thread_lib=boost_thread-mt' + ]) + else: + options.append('build_thread_safe=no') + + # Sundials support + if '+sundials' in spec: + options.extend([ + 'use_sundials=y', + 'sundials_include={0}'.format(spec['sundials'].prefix.include), + 'sundials_libdir={0}'.format(spec['sundials'].prefix.lib), + 'sundials_license={0}'.format( + join_path(spec['sundials'].prefix, 'LICENSE')) + ]) + else: + options.append('use_sundials=n') + + # Python module + if '+python' in spec: + options.extend([ + 'python_package=full', + 'python_cmd={0}'.format( + join_path(spec['python'].prefix.bin, 'python')), + 'python_array_home={0}'.format(spec['py-numpy'].prefix) + ]) + if spec['python'].satisfies('@3'): + options.extend([ + 'python3_package=y', + 'python3_cmd={0}'.format( + join_path(spec['python'].prefix.bin, 'python')), + 'python3_array_home={0}'.format(spec['py-numpy'].prefix) + ]) + else: + options.append('python3_package=n') + else: + options.append('python_package=none') + options.append('python3_package=n') + + # Matlab toolbox + if '+matlab' in spec: + options.extend([ + 'matlab_toolbox=y', + 'matlab_path={0}'.format(spec['matlab'].prefix) + ]) + else: + options.append('matlab_toolbox=n') + + scons('build', *options) + + if '+python' in spec: + # Tests will always fail if Python dependencies aren't built + #scons('test') # TODO: 3 expected failures, not sure what's wrong + pass + + scons('install') diff --git a/var/spack/repos/builtin/packages/py-3to2/package.py b/var/spack/repos/builtin/packages/py-3to2/package.py new file mode 100644 index 0000000000..577662e583 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-3to2/package.py @@ -0,0 +1,40 @@ +############################################################################## +# 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 Py3to2(Package): + """lib3to2 is a set of fixers that are intended to backport code written + for Python version 3.x into Python version 2.x.""" + + homepage = "https://pypi.python.org/pypi/3to2" + url = "https://pypi.python.org/packages/8f/ab/58a363eca982c40e9ee5a7ca439e8ffc5243dde2ae660ba1ffdd4868026b/3to2-1.1.1.zip" + + version('1.1.1', 'cbeed28e350dbdaef86111ace3052824') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-unittest2/package.py b/var/spack/repos/builtin/packages/py-unittest2/package.py new file mode 100644 index 0000000000..c9b0ad5cdf --- /dev/null +++ b/var/spack/repos/builtin/packages/py-unittest2/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 PyUnittest2(Package): + """unittest2 is a backport of the new features added to the unittest + testing framework in Python 2.7 and onwards.""" + + homepage = "https://pypi.python.org/pypi/unittest2" + url = "https://pypi.python.org/packages/7f/c4/2b0e2d185d9d60772c10350d9853646832609d2f299a8300ab730f199db4/unittest2-1.1.0.tar.gz" + + version('1.1.0', 'f72dae5d44f091df36b6b513305ea000') + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/py-unittest2py3k/package.py b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py new file mode 100644 index 0000000000..b2c7510d94 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py @@ -0,0 +1,42 @@ +############################################################################## +# 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 PyUnittest2py3k(Package): + """unittest2 is a backport of the new features added to the unittest + testing framework in Python 2.7 and 3.2. This is a Python 3 compatible + version of unittest2.""" + + homepage = "https://pypi.python.org/pypi/unittest2py3k" + url = "https://pypi.python.org/packages/4e/3d/d44421e8d828af1399c1509c196db92e2a58f3764b01a0ee928d7025d1ca/unittest2py3k-0.5.1.tar.gz" + + version('0.5.1', '8824ff92044310d9365f90d892bf0f09') + + extends('python') + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py index 817db68241..074d3d64b2 100644 --- a/var/spack/repos/builtin/packages/serf/package.py +++ b/var/spack/repos/builtin/packages/serf/package.py @@ -41,8 +41,6 @@ class Serf(Package): depends_on('zlib') def install(self, spec, prefix): - scons = which("scons") - options = ['PREFIX=%s' % prefix] options.append('APR=%s' % spec['apr'].prefix) options.append('APU=%s' % spec['apr-util'].prefix) diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py index ba2340f74c..a31cf5fde4 100644 --- a/var/spack/repos/builtin/packages/sundials/package.py +++ b/var/spack/repos/builtin/packages/sundials/package.py @@ -24,16 +24,107 @@ ############################################################################## from spack import * + class Sundials(Package): - """SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers)""" + """SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation + Solvers)""" + homepage = "http://computation.llnl.gov/casc/sundials/" - url = "http://computation.llnl.gov/casc/sundials/download/code/sundials-2.5.0.tar.gz" + url = "http://computation.llnl.gov/projects/sundials-suite-nonlinear-differential-algebraic-equation-solvers/download/sundials-2.6.2.tar.gz" + + version('2.6.2', '3deeb0ede9f514184c6bd83ecab77d95') - version('2.5.0', 'aba8b56eec600de3109cfb967aa3ba0f') + variant('mpi', default=True, description='Enable MPI support') + variant('lapack', default=True, description='Build with external BLAS/LAPACK libraries') + variant('klu', default=True, description='Build with SuiteSparse KLU libraries') + variant('superlu', default=True, description='Build with SuperLU_MT libraries') + variant('openmp', default=False, description='Enable OpenMP support') + variant('pthread', default=True, description='Enable POSIX threads support') - depends_on("mpi") + depends_on('mpi', when='+mpi') + depends_on('blas', when='+lapack') + depends_on('lapack', when='+lapack') + depends_on('suite-sparse', when='+klu') + depends_on('superlu-mt+openmp', when='+superlu+openmp') + depends_on('superlu-mt+pthread', when='+superlu+pthread') def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make() - make("install") + cmake_args = std_cmake_args + cmake_args.extend([ + '-DBUILD_SHARED_LIBS=ON', + '-DCMAKE_C_FLAGS=-fPIC' + ]) + + # MPI support + if '+mpi' in spec: + cmake_args.extend([ + '-DMPI_ENABLE=ON', + '-DMPI_MPICC={0}'.format(spec['mpi'].mpicc), + '-DMPI_MPIF77={0}'.format(spec['mpi'].mpif77) + ]) + else: + cmake_args.append('-DMPI_ENABLE=OFF') + + # Building with LAPACK and BLAS + if '+lapack' in spec: + cmake_args.extend([ + '-DLAPACK_ENABLE=ON', + '-DLAPACK_LIBRARIES={0};{1}'.format( + spec['lapack'].lapack_shared_lib, + spec['blas'].blas_shared_lib + ) + ]) + else: + cmake_args.append('-DLAPACK_ENABLE=OFF') + + # Building with KLU + if '+klu' in spec: + cmake_args.extend([ + '-DKLU_ENABLE=ON', + '-DKLU_INCLUDE_DIR={0}'.format( + spec['suite-sparse'].prefix.include), + '-DKLU_LIBRARY_DIR={0}'.format( + spec['suite-sparse'].prefix.lib) + ]) + else: + cmake_args.append('-DKLU_ENABLE=OFF') + + # Building with SuperLU_MT + if '+superlu' in spec: + cmake_args.extend([ + '-DSUPERLUMT_ENABLE=ON', + '-DSUPERLUMT_INCLUDE_DIR={0}'.format( + spec['superlu-mt'].prefix.include), + '-DSUPERLUMT_LIBRARY_DIR={0}'.format( + spec['superlu-mt'].prefix.lib) + ]) + if '+openmp' in spec: + cmake_args.append('-DSUPERLUMT_THREAD_TYPE=OpenMP') + elif '+pthread' in spec: + cmake_args.append('-DSUPERLUMT_THREAD_TYPE=Pthread') + else: + msg = 'You must choose either +openmp or +pthread when ' + msg += 'building with SuperLU_MT' + raise RuntimeError(msg) + else: + cmake_args.append('-DSUPERLUMT_ENABLE=OFF') + + # OpenMP support + if '+openmp' in spec: + cmake_args.append('-DOPENMP_ENABLE=ON') + else: + cmake_args.append('-DOPENMP_ENABLE=OFF') + + # POSIX threads support + if '+pthread' in spec: + cmake_args.append('-DPTHREAD_ENABLE=ON') + else: + cmake_args.append('-DPTHREAD_ENABLE=OFF') + + with working_dir('build', create=True): + cmake('..', *cmake_args) + + make() + make('install') + + install('LICENSE', prefix) diff --git a/var/spack/repos/builtin/packages/superlu-mt/package.py b/var/spack/repos/builtin/packages/superlu-mt/package.py new file mode 100644 index 0000000000..5eee4bf5d9 --- /dev/null +++ b/var/spack/repos/builtin/packages/superlu-mt/package.py @@ -0,0 +1,135 @@ +############################################################################## +# 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 * +import spack +import glob +import os + + +class SuperluMt(Package): + """SuperLU is a general purpose library for the direct solution of large, + sparse, nonsymmetric systems of linear equations on high performance + machines. SuperLU_MT is designed for shared memory parallel machines.""" + + homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/#superlu_mt" + url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_mt_3.1.tar.gz" + + version('3.1', '06ac62f1b4b7d17123fffa0d0c315e91') + + variant('blas', default=True, description='Build with external BLAS library') + + # Must choose one or the other + variant('openmp', default=False, description='Build with OpenMP support') + variant('pthread', default=True, description='Build with POSIX threads support') + + # NOTE: must link with a single-threaded BLAS library + depends_on('blas', when='+blas') + + # Cannot be built in parallel + parallel = False + + def configure(self, spec): + # Validate chosen variants + if '+openmp' in spec and '+pthread' in spec: + msg = 'You cannot choose both +openmp and +pthread' + raise RuntimeError(msg) + if '~openmp' in spec and '~pthread' in spec: + msg = 'You must choose either +openmp or +pthread' + raise RuntimeError(msg) + + # List of configuration options + config = [] + + # The machine (platform) identifier to append to the library names + if '+openmp' in spec: + # OpenMP + config.extend([ + 'PLAT = _OPENMP', + 'TMGLIB = libtmglib.a', + 'MPLIB = {0}'.format(self.compiler.openmp_flag), + 'CFLAGS = {0}'.format(self.compiler.openmp_flag), + 'FFLAGS = {0}'.format(self.compiler.openmp_flag) + ]) + elif '+pthread' in spec: + # POSIX threads + config.extend([ + 'PLAT = _PTHREAD', + 'TMGLIB = libtmglib$(PLAT).a', + 'MPLIB = -lpthread' + ]) + + # The BLAS library + # NOTE: must link with a single-threaded BLAS library + if '+blas' in spec: + config.extend([ + 'BLASDEF = -DUSE_VENDOR_BLAS', + 'BLASLIB = -L{0} -lblas'.format(spec['blas'].prefix.lib) + ]) + else: + config.append('BLASLIB = ../lib/libblas$(PLAT).a') + + # Generic options + config.extend([ + # The name of the libraries to be created/linked to + 'SUPERLULIB = libsuperlu_mt$(PLAT).a', + 'MATHLIB = -lm', + # The archiver and the flag(s) to use when building archives + 'ARCH = ar', + 'ARCHFLAGS = cr', + 'RANLIB = {0}'.format('ranlib' if which('ranlib') else 'echo'), + # Definitions used by CPP + 'PREDEFS = -D_$(PLAT)', + # Compilers and flags + 'CC = {0}'.format(os.environ['CC']), + 'CFLAGS += $(PREDEFS) -D_LONGINT', + 'NOOPTS = -O0', + 'FORTRAN = {0}'.format(os.environ['FC']), + 'LOADER = {0}'.format(os.environ['CC']), + # C preprocessor defs for compilation + 'CDEFS = -DAdd_' + ]) + + # Write configuration options to include file + with open('make.inc', 'w') as inc: + for option in config: + inc.write('{0}\n'.format(option)) + + def install(self, spec, prefix): + # Set up make include file manually + self.configure(spec) + + # BLAS needs to be compiled separately if using internal BLAS library + if '+blas' not in spec: + make('blaslib') + + make() + + # Install manually + install_tree('lib', prefix.lib) + + headers = glob.glob(join_path('SRC', '*.h')) + mkdir(prefix.include) + for h in headers: + install(h, prefix.include) -- cgit v1.2.3-70-g09d2 From a21e845ce7e4b7050a3ef28149b349ff0a4ec58e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 26 May 2016 16:19:23 -0500 Subject: Flake8 --- lib/spack/spack/build_environment.py | 30 +++++++++++++--------- .../repos/builtin/packages/cantera/package.py | 9 +++---- var/spack/repos/builtin/packages/serf/package.py | 3 ++- .../repos/builtin/packages/superlu-mt/package.py | 1 - 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index c72dc1a4dd..9e06f9f9cc 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -63,7 +63,7 @@ from llnl.util.filesystem import * import spack from spack.environment import EnvironmentModifications, validate from spack.util.environment import * -from spack.util.executable import Executable, which +from spack.util.executable import Executable # # This can be set by the user to globally disable parallel builds. @@ -88,7 +88,6 @@ SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR' dso_suffix = 'dylib' if sys.platform == 'darwin' else 'so' - class MakeExecutable(Executable): """Special callable executable object for make so the user can specify parallel or not on a per-invocation basis. Using @@ -177,11 +176,13 @@ def set_compiler_environment_variables(pkg, env): flags = pkg.spec.compiler_flags # Set compiler variables used by CMake and autotools - assert all(key in compiler.link_paths for key in ('cc', 'cxx', 'f77', 'fc')) + assert all(key in compiler.link_paths for key in ( + 'cc', 'cxx', 'f77', 'fc')) # Populate an object with the list of environment modifications # and return it - # TODO : add additional kwargs for better diagnostics, like requestor, ttyout, ttyerr, etc. + # TODO : add additional kwargs for better diagnostics, like requestor, + # ttyout, ttyerr, etc. link_dir = spack.build_env_path env.set('CC', join_path(link_dir, compiler.link_paths['cc'])) env.set('CXX', join_path(link_dir, compiler.link_paths['cxx'])) @@ -233,7 +234,8 @@ def set_build_environment_variables(pkg, env): # handled by putting one in the /case-insensitive # directory. Add that to the path too. env_paths = [] - for item in [spack.build_env_path, join_path(spack.build_env_path, pkg.compiler.name)]: + for item in [spack.build_env_path, join_path(spack.build_env_path, + pkg.compiler.name)]: env_paths.append(item) ci = join_path(item, 'case-insensitive') if os.path.isdir(ci): @@ -246,7 +248,8 @@ def set_build_environment_variables(pkg, env): # Prefixes of all of the package's dependencies go in SPACK_DEPENDENCIES dep_prefixes = [d.prefix for d in pkg.spec.traverse(root=False)] env.set_path(SPACK_DEPENDENCIES, dep_prefixes) - env.set_path('CMAKE_PREFIX_PATH', dep_prefixes) # Add dependencies to CMAKE_PREFIX_PATH + # Add dependencies to CMAKE_PREFIX_PATH + env.set_path('CMAKE_PREFIX_PATH', dep_prefixes) # Install prefix env.set(SPACK_PREFIX, pkg.prefix) @@ -262,7 +265,8 @@ def set_build_environment_variables(pkg, env): env.unset('DYLD_LIBRARY_PATH') # Add bin directories from dependencies to the PATH for the build. - bin_dirs = reversed(filter(os.path.isdir, ['%s/bin' % prefix for prefix in dep_prefixes])) + bin_dirs = reversed(filter(os.path.isdir, + ['%s/bin' % prefix for prefix in dep_prefixes])) for item in bin_dirs: env.prepend_path('PATH', item) @@ -326,7 +330,8 @@ def set_module_variables_for_package(pkg, module): # Set up CMake rpath m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE') - m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH=%s' % ":".join(get_rpaths(pkg))) + m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH=%s' % \ + ":".join(get_rpaths(pkg))) # Put spack compiler paths in module scope. link_dir = spack.build_env_path @@ -373,13 +378,13 @@ def get_rpaths(pkg): def parent_class_modules(cls): - """Get list of super class modules that are all descend from spack.Package""" + """Get list of super class modules that all descend from spack.Package""" if not issubclass(cls, spack.Package) or issubclass(spack.Package, cls): return [] result = [] module = sys.modules.get(cls.__module__) if module: - result = [ module ] + result = [module] for c in cls.__bases__: result.extend(parent_class_modules(c)) return result @@ -411,7 +416,8 @@ def setup_package(pkg): # throwaway environment, but it is kind of dirty. # # TODO: Think about how to avoid this fix and do something cleaner. - for s in pkg.spec.traverse(): s.package.spec = s + for s in pkg.spec.traverse(): + s.package.spec = s set_compiler_environment_variables(pkg, spack_env) set_build_environment_variables(pkg, spack_env) @@ -499,7 +505,7 @@ def fork(pkg, function): # message. Just make the parent exit with an error code. pid, returncode = os.waitpid(pid, 0) if returncode != 0: - raise InstallError("Installation process had nonzero exit code.".format(str(returncode))) + raise InstallError("Installation process had nonzero exit code.") class InstallError(spack.error.SpackError): diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py index a55f883560..ddaeb2b070 100644 --- a/var/spack/repos/builtin/packages/cantera/package.py +++ b/var/spack/repos/builtin/packages/cantera/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import spack import os @@ -58,13 +57,13 @@ class Cantera(Package): depends_on('py-cython', when='+python') depends_on('py-3to2', when='+python') # 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') + # depends_on('py-unittest2', when='+python^python@2.6') + # depends_on('py-unittest2py3k', when='+python^python@3.1') # Matlab toolbox dependencies # TODO: add Matlab package # TODO: allow packages to extend multiple other packages - #extends('matlab', when='+matlab') + # extends('matlab', when='+matlab') def install(self, spec, prefix): # Required options @@ -143,7 +142,7 @@ class Cantera(Package): if '+python' in spec: # Tests will always fail if Python dependencies aren't built - #scons('test') # TODO: 3 expected failures, not sure what's wrong + # scons('test') # TODO: 3 expected failures, not sure what's wrong pass scons('install') diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py index 074d3d64b2..ff6fd2da9b 100644 --- a/var/spack/repos/builtin/packages/serf/package.py +++ b/var/spack/repos/builtin/packages/serf/package.py @@ -28,10 +28,11 @@ from spack import * class Serf(Package): """Apache Serf - a high performance C-based HTTP client library built upon the Apache Portable Runtime (APR) library""" + homepage = 'https://serf.apache.org/' url = 'https://archive.apache.org/dist/serf/serf-1.3.8.tar.bz2' - version('1.3.8', '1d45425ca324336ce2f4ae7d7b4cfbc5567c5446') + version('1.3.8', '1d45425ca324336ce2f4ae7d7b4cfbc5567c5446') depends_on('apr') depends_on('apr-util') diff --git a/var/spack/repos/builtin/packages/superlu-mt/package.py b/var/spack/repos/builtin/packages/superlu-mt/package.py index 5eee4bf5d9..5a9429d6e5 100644 --- a/var/spack/repos/builtin/packages/superlu-mt/package.py +++ b/var/spack/repos/builtin/packages/superlu-mt/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import spack import glob import os -- cgit v1.2.3-70-g09d2 From 9500f2718b7ab9d430dbff2fc10bca1179c61b7b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 26 May 2016 16:33:35 -0500 Subject: More Flake8 --- lib/spack/spack/build_environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 9e06f9f9cc..901ba1608d 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -330,7 +330,7 @@ def set_module_variables_for_package(pkg, module): # Set up CMake rpath m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE') - m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH=%s' % \ + m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH=%s' % ":".join(get_rpaths(pkg))) # Put spack compiler paths in module scope. -- cgit v1.2.3-70-g09d2 From 81ac3b62fc4d21a677bea654402f3684b7edbc20 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 27 May 2016 12:39:42 -0500 Subject: Filter compilers and link boost properly --- .../repos/builtin/packages/cantera/package.py | 54 ++++++++++++++++++++-- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py index ddaeb2b070..bc8c132ffc 100644 --- a/var/spack/repos/builtin/packages/cantera/package.py +++ b/var/spack/repos/builtin/packages/cantera/package.py @@ -91,7 +91,7 @@ class Cantera(Package): 'build_thread_safe=yes', 'boost_inc_dir={0}'.format(spec['boost'].prefix.include), 'boost_lib_dir={0}'.format(spec['boost'].prefix.lib), - 'boost_thread_lib=boost_thread-mt' + 'boost_thread_lib=boost_thread-mt,boost_system-mt' ]) else: options.append('build_thread_safe=no') @@ -142,7 +142,55 @@ class Cantera(Package): if '+python' in spec: # Tests will always fail if Python dependencies aren't built - # scons('test') # TODO: 3 expected failures, not sure what's wrong - pass + scons('test', parallel=False) scons('install') + + self.filter_compilers() + + def filter_compilers(self): + """Run after install to tell the Makefile and SConstruct files to use + the compilers that Spack built the package with. + + If this isn't done, they'll have CC, CXX, F77, and FC set to Spack's + generic cc, c++, f77, and f90. We want them to be bound to whatever + compiler they were built with.""" + + kwargs = {'ignore_absent': True, 'backup': False, 'string': True} + dirname = os.path.join(self.prefix, 'share/cantera/samples') + + cc_files = [ + 'cxx/rankine/Makefile', 'cxx/NASA_coeffs/Makefile', + 'cxx/kinetics1/Makefile', 'cxx/flamespeed/Makefile', + 'cxx/combustor/Makefile', 'f77/SConstruct' + ] + + cxx_files = [ + 'cxx/rankine/Makefile', 'cxx/NASA_coeffs/Makefile', + 'cxx/kinetics1/Makefile', 'cxx/flamespeed/Makefile', + 'cxx/combustor/Makefile' + ] + + f77_files = [ + 'f77/Makefile', 'f77/SConstruct' + ] + + fc_files = [ + 'f90/Makefile', 'f90/SConstruct' + ] + + for filename in cc_files: + filter_file(os.environ['CC'], self.compiler.cc, + os.path.join(dirname, filename), **kwargs) + + for filename in cxx_files: + filter_file(os.environ['CXX'], self.compiler.cxx, + os.path.join(dirname, filename), **kwargs) + + for filename in f77_files: + filter_file(os.environ['F77'], self.compiler.f77, + os.path.join(dirname, filename), **kwargs) + + for filename in fc_files: + filter_file(os.environ['FC'], self.compiler.fc, + os.path.join(dirname, filename), **kwargs) -- cgit v1.2.3-70-g09d2 From 79fae306f6077f637875f2b7df393ae9be95ca9b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 3 Jun 2016 10:50:31 -0500 Subject: Add extensions for Python/R and more configurable install --- lib/spack/spack/cmd/create.py | 102 +++++++++++++++++++++++------------------- 1 file changed, 56 insertions(+), 46 deletions(-) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index fa7ffb3923..62e7f97f2a 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -88,22 +88,19 @@ from spack import * class ${class_name}(Package): - ""\"FIXME: put a proper description of your package here.""\" + ""\"FIXME: Put a proper description of your package here.""\" - # FIXME: add a proper url for your package's homepage here. + # FIXME: Add a proper url for your package's homepage here. homepage = "http://www.example.com" url = "${url}" ${versions} - +${extends} # FIXME: Add dependencies if this package requires them. # depends_on("foo") def install(self, spec, prefix): - # FIXME: Modify the installation instructions here - ${configure} - ${build} - ${install} +${install} """) @@ -138,39 +135,47 @@ def setup_parser(subparser): class ConfigureGuesser(object): def __call__(self, stage): - """Try to guess the type of build system used by the project. Set the - appropriate default configure, build, and install instructions.""" - - # Default configure instructions - configureDict = { - 'autotools': "configure('--prefix={0}'.format(prefix))", - 'cmake': "cmake('.', *std_cmake_args)", - 'scons': "", - 'python': "", - 'r': "", - 'unknown': "# FIXME: Unknown build system" - } - - # Default build instructions - buildDict = { - 'autotools': "make()", - 'cmake': "make()", - 'scons': "scons('prefix={0}'.format(prefix))", - 'python': "", - 'r': "", - 'unknown': "make()", - } + """Try to guess the type of build system used by the project. + Set the appropriate default installation instructions and any + necessary extensions for Python and R.""" - # Default install instructions + # Default installation instructions installDict = { - 'autotools': "make('install')", - 'cmake': "make('install')", - 'scons': "scons('install')", - 'python': "python('setup.py', 'install', " + - "'--prefix={0}'.format(prefix))", - 'r': "R('CMD', 'INSTALL', '--library={0}'.format(" + - "self.module.r_lib_dir), self.stage.archive_file)", - 'unknown': "make('install')", + 'autotools': """\ + # FIXME: Modify the configure line to suit your build system here. + configure('--prefix={0}'.format(prefix)) + + # FIXME: Add logic to build and install here. + make() + make('install')""", + + 'cmake': """\ + with working_dir('spack-build', create=True): + # FIXME: Modify the cmake line to suit your build system here. + cmake('..', *std_cmake_args) + + # FIXME: Add logic to build and install here. + make() + make('install')""", + + 'scons': """\ + # FIXME: Add logic to build and install here. + scons('prefix={0}'.format(prefix)) + scons('install')""", + + 'python': """\ + # FIXME: Add logic to build and install here. + python('setup.py', 'install', '--prefix={0}'.format(prefix))""", + + 'R': """\ + # FIXME: Add logic to build and install here. + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),""" + + " self.stage.archive_file)""", + + 'unknown': """\ + # FIXME: Unknown build system + make() + make('install')""" } # A list of clues that give us an idea of the build system a package @@ -181,7 +186,7 @@ class ConfigureGuesser(object): (r'/CMakeLists.txt$', 'cmake'), (r'/SConstruct$', 'scons'), (r'/setup.py$', 'python'), - (r'/NAMESPACE$', 'r') + (r'/NAMESPACE$', 'R') ] # Peek inside the compressed file. @@ -206,12 +211,18 @@ class ConfigureGuesser(object): if any(re.search(pattern, l) for l in lines): build_system = bs - self.configure = configureDict[build_system] - self.build = buildDict[build_system] - self.install = installDict[build_system] - self.build_system = build_system + # Set any necessary extensions for Python and R + extensions = '' + if build_system in ['python', 'R']: + extensions = "\n extends('{0}')\n".format(build_system) + + self.extends = extensions + + # Set the appropriate default installation instructions + self.install = installDict[build_system] + def guess_name_and_version(url, args): # Try to deduce name and version of the new package from the URL @@ -331,7 +342,7 @@ def create(parser, args): name = 'py-%s' % name # Prepend 'r-' to R package names, by convention. - if guesser.build_system == 'r': + if guesser.build_system == 'R': name = 'r-%s' % name # Create a directory for the new package. @@ -349,8 +360,7 @@ def create(parser, args): class_name=mod_to_class(name), url=url, versions=make_version_calls(ver_hash_tuples), - configure=guesser.configure, - build=guesser.build, + extends=guesser.extends, install=guesser.install)) # If everything checks out, go ahead and edit. -- cgit v1.2.3-70-g09d2 From 5a55bb3f8de9707de43512c5f2ae41072baeb630 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 3 Jun 2016 14:22:56 -0500 Subject: Modify R installation template --- lib/spack/spack/cmd/create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 62e7f97f2a..c976b98b17 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -170,7 +170,7 @@ class ConfigureGuesser(object): 'R': """\ # FIXME: Add logic to build and install here. R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),""" + - " self.stage.archive_file)""", + " self.stage.source_path)""", 'unknown': """\ # FIXME: Unknown build system -- cgit v1.2.3-70-g09d2 From 7e1ee463ca677e3209c800a6c3b111dd8851b78d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 6 Jun 2016 13:25:37 -0500 Subject: Install examples for sundials --- .../repos/builtin/packages/cantera/package.py | 1 + .../repos/builtin/packages/sundials/package.py | 53 ++++++++++++++++++++-- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py index bc8c132ffc..e9e5da4486 100644 --- a/var/spack/repos/builtin/packages/cantera/package.py +++ b/var/spack/repos/builtin/packages/cantera/package.py @@ -142,6 +142,7 @@ class Cantera(Package): if '+python' in spec: # Tests will always fail if Python dependencies aren't built + # In addition, 3 of the tests fail when run in parallel scons('test', parallel=False) scons('install') diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py index a31cf5fde4..c55198a850 100644 --- a/var/spack/repos/builtin/packages/sundials/package.py +++ b/var/spack/repos/builtin/packages/sundials/package.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import os class Sundials(Package): @@ -30,14 +31,14 @@ class Sundials(Package): Solvers)""" homepage = "http://computation.llnl.gov/casc/sundials/" - url = "http://computation.llnl.gov/projects/sundials-suite-nonlinear-differential-algebraic-equation-solvers/download/sundials-2.6.2.tar.gz" + url = "http://computation.llnl.gov/projects/sundials-suite-nonlinear-differential-algebraic-equation-solvers/download/sundials-2.6.2.tar.gz" version('2.6.2', '3deeb0ede9f514184c6bd83ecab77d95') variant('mpi', default=True, description='Enable MPI support') variant('lapack', default=True, description='Build with external BLAS/LAPACK libraries') - variant('klu', default=True, description='Build with SuiteSparse KLU libraries') - variant('superlu', default=True, description='Build with SuperLU_MT libraries') + variant('klu', default=False, description='Build with SuiteSparse KLU libraries') + variant('superlu', default=False, description='Build with SuperLU_MT libraries') variant('openmp', default=False, description='Enable OpenMP support') variant('pthread', default=True, description='Enable POSIX threads support') @@ -49,10 +50,14 @@ class Sundials(Package): depends_on('superlu-mt+pthread', when='+superlu+pthread') def install(self, spec, prefix): - cmake_args = std_cmake_args + cmake_args = std_cmake_args[:] cmake_args.extend([ '-DBUILD_SHARED_LIBS=ON', - '-DCMAKE_C_FLAGS=-fPIC' + '-DCMAKE_C_FLAGS=-fPIC', + '-DCMAKE_Fortran_FLAGS=-fPIC', + '-DEXAMPLES_ENABLE=ON', + '-DEXAMPLES_INSTALL=ON', + '-DFCMIX_ENABLE=ON' ]) # MPI support @@ -128,3 +133,41 @@ class Sundials(Package): make('install') install('LICENSE', prefix) + + self.filter_compilers() + + def filter_compilers(self): + """Run after install to tell the Makefiles to use + the compilers that Spack built the package with. + + If this isn't done, they'll have CC, CPP, and F77 set to + Spack's generic cc and f77. We want them to be bound to + whatever compiler they were built with.""" + + kwargs = {'ignore_absent': True, 'backup': False, 'string': True} + dirname = os.path.join(self.prefix, 'examples') + + cc_files = [ + 'arkode/C_serial/Makefile', 'arkode/C_parallel/Makefile', + 'cvode/serial/Makefile', 'cvode/parallel/Makefile', + 'cvodes/serial/Makefile', 'cvodes/parallel/Makefile', + 'ida/serial/Makefile', 'ida/parallel/Makefile', + 'idas/serial/Makefile', 'idas/parallel/Makefile', + 'kinsol/serial/Makefile', 'kinsol/parallel/Makefile', + 'nvector/serial/Makefile', 'nvector/parallel/Makefile', + 'nvector/pthreads/Makefile' + ] + + f77_files = [ + 'arkode/F77_serial/Makefile', 'cvode/fcmix_serial/Makefile', + 'ida/fcmix_serial/Makefile', 'ida/fcmix_pthreads/Makefile', + 'kinsol/fcmix_serial/Makefile' + ] + + for filename in cc_files: + filter_file(os.environ['CC'], self.compiler.cc, + os.path.join(dirname, filename), **kwargs) + + for filename in f77_files: + filter_file(os.environ['F77'], self.compiler.f77, + os.path.join(dirname, filename), **kwargs) -- cgit v1.2.3-70-g09d2 From 98d03c74e114137537ee1865244c389d687aa5d6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 6 Jun 2016 15:31:04 -0500 Subject: Add support for less common compression schemes --- lib/spack/spack/cmd/create.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index c976b98b17..dc927757fb 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -190,18 +190,19 @@ class ConfigureGuesser(object): ] # Peek inside the compressed file. - output = '' - if stage.archive_file.endswith(('.tar', '.tar.gz', '.tar.bz2', - '.tgz', '.tbz2')): - tar = which('tar') - output = tar('--exclude=*/*/*', '-tf', + if stage.archive_file.endswith('.zip'): + try: + unzip = which('unzip') + output = unzip('-l', stage.archive_file, output=str) + except: + output = '' + else: + try: + tar = which('tar') + output = tar('--exclude=*/*/*', '-tf', stage.archive_file, output=str) - elif stage.archive_file.endswith('.gz'): - gunzip = which('gunzip') - output = gunzip('-l', stage.archive_file, output=str) - elif stage.archive_file.endswith('.zip'): - unzip = which('unzip') - output = unzip('-l', stage.archive_file, output=str) + except: + output = '' lines = output.split('\n') # Determine the build system based on the files contained -- cgit v1.2.3-70-g09d2 From 5dfc2052bdb2f255a02e747eae9874c6645176fb Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 6 Jun 2016 15:42:30 -0500 Subject: Flake8 change --- lib/spack/spack/cmd/create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index dc927757fb..bc835668c2 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -200,7 +200,7 @@ class ConfigureGuesser(object): try: tar = which('tar') output = tar('--exclude=*/*/*', '-tf', - stage.archive_file, output=str) + stage.archive_file, output=str) except: output = '' lines = output.split('\n') -- cgit v1.2.3-70-g09d2 From c9eb5f81735dbb0c79e5d1294c410399cdeeb01a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 10 Jun 2016 14:48:29 -0500 Subject: Use non-checksummed PyPi download URLs --- var/spack/repos/builtin/packages/py-3to2/package.py | 2 +- var/spack/repos/builtin/packages/py-unittest2/package.py | 2 +- var/spack/repos/builtin/packages/py-unittest2py3k/package.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-3to2/package.py b/var/spack/repos/builtin/packages/py-3to2/package.py index 577662e583..1071a3c209 100644 --- a/var/spack/repos/builtin/packages/py-3to2/package.py +++ b/var/spack/repos/builtin/packages/py-3to2/package.py @@ -30,7 +30,7 @@ class Py3to2(Package): for Python version 3.x into Python version 2.x.""" homepage = "https://pypi.python.org/pypi/3to2" - url = "https://pypi.python.org/packages/8f/ab/58a363eca982c40e9ee5a7ca439e8ffc5243dde2ae660ba1ffdd4868026b/3to2-1.1.1.zip" + url = "https://pypi.python.org/packages/source/3/3to2/3to2-1.1.1.zip" version('1.1.1', 'cbeed28e350dbdaef86111ace3052824') diff --git a/var/spack/repos/builtin/packages/py-unittest2/package.py b/var/spack/repos/builtin/packages/py-unittest2/package.py index c9b0ad5cdf..f669a500ec 100644 --- a/var/spack/repos/builtin/packages/py-unittest2/package.py +++ b/var/spack/repos/builtin/packages/py-unittest2/package.py @@ -30,7 +30,7 @@ class PyUnittest2(Package): testing framework in Python 2.7 and onwards.""" homepage = "https://pypi.python.org/pypi/unittest2" - url = "https://pypi.python.org/packages/7f/c4/2b0e2d185d9d60772c10350d9853646832609d2f299a8300ab730f199db4/unittest2-1.1.0.tar.gz" + url = "https://pypi.python.org/packages/source/u/unittest2/unittest2-1.1.0.tar.gz" version('1.1.0', 'f72dae5d44f091df36b6b513305ea000') diff --git a/var/spack/repos/builtin/packages/py-unittest2py3k/package.py b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py index b2c7510d94..ca857395fb 100644 --- a/var/spack/repos/builtin/packages/py-unittest2py3k/package.py +++ b/var/spack/repos/builtin/packages/py-unittest2py3k/package.py @@ -31,7 +31,7 @@ class PyUnittest2py3k(Package): version of unittest2.""" homepage = "https://pypi.python.org/pypi/unittest2py3k" - url = "https://pypi.python.org/packages/4e/3d/d44421e8d828af1399c1509c196db92e2a58f3764b01a0ee928d7025d1ca/unittest2py3k-0.5.1.tar.gz" + url = "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-0.5.1.tar.gz" version('0.5.1', '8824ff92044310d9365f90d892bf0f09') -- cgit v1.2.3-70-g09d2 From afff40e584364a0707ee1bee54b8f72b0335c6e5 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 15 Jun 2016 10:50:43 -0500 Subject: Flake8 fix for R templates --- lib/spack/spack/cmd/create.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index bc835668c2..2d3cfbb9ca 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -169,8 +169,8 @@ class ConfigureGuesser(object): 'R': """\ # FIXME: Add logic to build and install here. - R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir),""" + - " self.stage.source_path)""", + R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), + self.stage.source_path)""", 'unknown': """\ # FIXME: Unknown build system -- cgit v1.2.3-70-g09d2 From 28b2e36230625a26868122b15c18253192b9ba1d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 15 Jun 2016 10:54:08 -0500 Subject: Add ctest executable --- lib/spack/spack/build_environment.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 901ba1608d..66faee1409 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -321,6 +321,7 @@ def set_module_variables_for_package(pkg, module): # TODO: Currently, everything is a link dependency, but tools like # TODO: this shouldn't be. m.cmake = Executable('cmake') + m.ctest = Executable('ctest') # standard CMake arguments m.std_cmake_args = ['-DCMAKE_INSTALL_PREFIX=%s' % pkg.prefix, -- cgit v1.2.3-70-g09d2 From be407f531e0589dca82a6d5c7c52a59b5e0a8a3b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 15 Jun 2016 11:01:18 -0500 Subject: Move around extension logic --- lib/spack/spack/cmd/create.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 2d3cfbb9ca..8cbb367f86 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -214,6 +214,9 @@ class ConfigureGuesser(object): self.build_system = build_system + # Set the appropriate default installation instructions + self.install = installDict[build_system] + # Set any necessary extensions for Python and R extensions = '' if build_system in ['python', 'R']: @@ -221,9 +224,6 @@ class ConfigureGuesser(object): self.extends = extensions - # Set the appropriate default installation instructions - self.install = installDict[build_system] - def guess_name_and_version(url, args): # Try to deduce name and version of the new package from the URL -- cgit v1.2.3-70-g09d2 From aa86488fd9809ced16704e4bd4d607c89d6dda75 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 20 Jun 2016 12:47:17 -0500 Subject: Flake8 --- lib/spack/spack/build_environment.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 66faee1409..c5efa97c7b 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -112,12 +112,13 @@ class MakeExecutable(Executable): return super(MakeExecutable, self).__call__(*args, **kwargs) + def load_module(mod): """Takes a module name and removes modules until it is possible to load that module. It then loads the provided module. Depends on the modulecmd implementation of modules used in cray and lmod. """ - #Create an executable of the module command that will output python code + # Create an executable of the module command that will output python code modulecmd = which('modulecmd') modulecmd.add_default_arg('python') @@ -128,11 +129,13 @@ def load_module(mod): text = modulecmd('show', mod, output=str, error=str).split() for i, word in enumerate(text): if word == 'conflict': - exec(compile(modulecmd('unload', text[i+1], output=str, error=str), '', 'exec')) + exec(compile(modulecmd('unload', text[i + 1], output=str, + error=str), '', 'exec')) # Load the module now that there are no conflicts load = modulecmd('load', mod, output=str, error=str) exec(compile(load, '', 'exec')) + def get_path_from_module(mod): """Inspects a TCL module for entries that indicate the absolute path at which the library supported by said module can be found. @@ -145,7 +148,7 @@ def get_path_from_module(mod): text = modulecmd('show', mod, output=str, error=str).split('\n') # If it lists its package directory, return that for line in text: - if line.find(mod.upper()+'_DIR') >= 0: + if line.find(mod.upper() + '_DIR') >= 0: words = line.split() return words[2] @@ -153,23 +156,24 @@ def get_path_from_module(mod): for line in text: rpath = line.find('-rpath/') if rpath >= 0: - return line[rpath+6:line.find('/lib')] + return line[rpath + 6:line.find('/lib')] # If it lists a -L instruction, use that for line in text: L = line.find('-L/') if L >= 0: - return line[L+2:line.find('/lib')] + return line[L + 2:line.find('/lib')] # If it sets the LD_LIBRARY_PATH or CRAY_LD_LIBRARY_PATH, use that for line in text: - if line.find('LD_LIBRARY_PATH') >= 0: + if line.find('LD_LIBRARY_PATH') >= 0: words = line.split() path = words[2] return path[:path.find('/lib')] # Unable to find module path return None + def set_compiler_environment_variables(pkg, env): assert(pkg.spec.concrete) compiler = pkg.compiler @@ -281,8 +285,7 @@ def set_build_environment_variables(pkg, env): for directory in ('lib', 'lib64', 'share'): pcdir = join_path(pre, directory, 'pkgconfig') if os.path.isdir(pcdir): - #pkg_config_dirs.append(pcdir) - env.prepend_path('PKG_CONFIG_PATH',pcdir) + env.prepend_path('PKG_CONFIG_PATH', pcdir) if pkg.spec.architecture.target.module_name: load_module(pkg.spec.architecture.target.module_name) @@ -372,7 +375,7 @@ def get_rpaths(pkg): rpaths.extend(d.prefix.lib64 for d in pkg.spec.dependencies.values() if os.path.isdir(d.prefix.lib64)) # Second module is our compiler mod name. We use that to get rpaths from - # module show output. + # module show output. if pkg.compiler.modules and len(pkg.compiler.modules) > 1: rpaths.append(get_path_from_module(pkg.compiler.modules[1])) return rpaths @@ -397,7 +400,8 @@ def load_external_modules(pkg): for dep in list(pkg.spec.traverse()): if dep.external_module: load_module(dep.external_module) - + + def setup_package(pkg): """Execute all environment setup routines.""" spack_env = EnvironmentModifications() -- cgit v1.2.3-70-g09d2 From 0377f3580b0985bd65fb64e82a6fbb9b397b56ab Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 20 Jun 2016 10:53:19 -0700 Subject: switching argument naming --- lib/spack/spack/cmd/list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index 228ab76780..9ce63fa1a4 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -42,7 +42,7 @@ def setup_parser(subparser): '-i', '--insensitive', action='store_true', default=False, help='Filtering will be case insensitive.') subparser.add_argument( - '-s', '--search_description', action='store_true', default=False, + '-d', '--search-description', action='store_true', default=False, help='Filtering will also search the description for a match.') -- cgit v1.2.3-70-g09d2 From fe301135021a9f64069a9bf2e3a074c8d4b712ef Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 20 Jun 2016 10:57:10 -0700 Subject: Adding init_config back. Don't initalize config rather let compiler_find do all the work. spack compiler list and spack compilers can do the work --- lib/spack/spack/cmd/compiler.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index c95045ef85..ff26bc6ba2 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -76,8 +76,13 @@ def compiler_find(args): if not paths: paths = get_path('PATH') - compilers = [c for c in spack.compilers.find_compilers(*args.add_paths) - if c.spec not in spack.compilers.all_compilers(scope=args.scope)] + # Don't initialize compilers config via compilers.get_compiler_config. + # Just let compiler_find do the + # entire process and return an empty config from all_compilers + # Default for any other process is init_config=True + compilers = [c for c in spack.compilers.find_compilers(*paths) + if c.spec not in spack.compilers.all_compilers( + scope=args.scope, init_config=False)] if compilers: spack.compilers.add_compilers_to_config(compilers, scope=args.scope) n = len(compilers) -- cgit v1.2.3-70-g09d2 From 1303b5a6a9e83a572c5a02ddfde1c2353ca60d41 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 20 Jun 2016 10:57:58 -0700 Subject: Adding more init_config as args to all_compilers,all_compilers_config, and get_compiler_config --- lib/spack/spack/compilers/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index ae72b743b2..c4b41394e0 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -83,7 +83,7 @@ def _to_dict(compiler): return {'compiler': d} -def get_compiler_config(scope=None): +def get_compiler_config(scope=None, init_config=True): """Return the compiler configuration for the specified architecture. """ def init_compiler_config(): @@ -98,7 +98,7 @@ def get_compiler_config(scope=None): # Update the configuration if there are currently no compilers # configured. Avoid updating automatically if there ARE site # compilers configured but no user ones. - if not config: + if not config and init_config: if scope is None: # We know no compilers were configured in any scope. init_compiler_config() @@ -153,23 +153,23 @@ def remove_compiler_from_config(compiler_spec, scope=None): spack.config.update_config('compilers', filtered_compiler_config, scope) -def all_compilers_config(scope=None): +def all_compilers_config(scope=None, init_config=True): """Return a set of specs for all the compiler versions currently available to build with. These are instances of CompilerSpec. """ # Get compilers for this architecture. global _cache_config_file #Create a cache of the config file so we don't load all the time. if not _cache_config_file: - _cache_config_file = get_compiler_config(scope) + _cache_config_file = get_compiler_config(scope, init_config) return _cache_config_file else: return _cache_config_file -def all_compilers(scope=None): +def all_compilers(scope=None, init_config=True): # Return compiler specs from the merged config. return [spack.spec.CompilerSpec(s['compiler']['spec']) - for s in all_compilers_config(scope)] + for s in all_compilers_config(scope, init_config)] def default_compiler(): -- cgit v1.2.3-70-g09d2 From 88888f5ba02cd63cdd43d42912d368cb9f323557 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 20 Jun 2016 10:58:20 -0700 Subject: Got rid of unnecessary module arg --- lib/spack/spack/compilers/gcc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py index 3f552eaece..2fae6688db 100644 --- a/lib/spack/spack/compilers/gcc.py +++ b/lib/spack/spack/compilers/gcc.py @@ -77,9 +77,9 @@ class Gcc(Compiler): return get_compiler_version( fc, '-dumpversion', # older gfortran versions don't have simple dumpversion output. - r'(?:GNU Fortran \(GCC\))?(\d+\.\d+(?:\.\d+)?)', module) + r'(?:GNU Fortran \(GCC\))?(\d+\.\d+(?:\.\d+)?)') @classmethod def f77_version(cls, f77): - return cls.fc_version(f77, module) + return cls.fc_version(f77) -- cgit v1.2.3-70-g09d2 From 6180e6c047ba09a8c7359ba9327ca6a332b4e073 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 20 Jun 2016 11:33:56 -0700 Subject: automatic case-insensitive like smartsearch, docs New documentation for the new options, also case insensitive by default unless the user includes an upper-case character in their pattern. --- lib/spack/docs/basic_usage.rst | 25 +++++++++++++++++++++---- lib/spack/spack/cmd/list.py | 3 ++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index 50c48b802b..f4d42c23ad 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -24,12 +24,29 @@ Spack can install: .. command-output:: spack list -The packages are listed by name in alphabetical order. You can also -do wildcats searches using ``*``: +The packages are listed by name in alphabetical order. If you specify a +pattern to match, it will follow this set of rules. A pattern with no +wildcards, ``*`` or ``?``, will be treated as though it started and ended iwth +``*``, so ``util`` is equivalent to ``*util*``. A pattern with no capitol +letters will be treated as case-insensitive. You can also add the ``-i`` flag +to specify a case insensitive search, or ``-d`` to search the description of +the package in addition to the name. Some examples: -.. command-output:: spack list m* +All packages whose names contain "sql" case insensitive: -.. command-output:: spack list *util* +.. command-output:: spack list sql + +All packages whose names start with a capitol M: + +.. command-output:: spack list M* + +All packages whose names or descriptions contain Documentation: + +.. command-output:: spack list -d Documentation + +All packages whose names contain documentation case insensitive: + +.. command-output:: spack list -d documentation .. _spack-info: diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index 9ce63fa1a4..974c4778ab 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -58,7 +58,8 @@ def list(parser, args): r = fnmatch.translate('*' + f + '*') else: r = fnmatch.translate(f) - rc = re.compile(r, flags=re.I if args.insensitive else 0) + rc = re.compile(r, flags=re.I if args.insensitive or not any( + l.isupper() for l in f) else 0) res.append(rc) if args.search_description: -- cgit v1.2.3-70-g09d2 From ac728d3e60ef9ef8c52333449592c5933b9c59ce Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 20 Jun 2016 11:38:39 -0700 Subject: fixing capitol->capital typos --- lib/spack/docs/basic_usage.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index f4d42c23ad..ceec8c7723 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -27,7 +27,7 @@ Spack can install: The packages are listed by name in alphabetical order. If you specify a pattern to match, it will follow this set of rules. A pattern with no wildcards, ``*`` or ``?``, will be treated as though it started and ended iwth -``*``, so ``util`` is equivalent to ``*util*``. A pattern with no capitol +``*``, so ``util`` is equivalent to ``*util*``. A pattern with no capital letters will be treated as case-insensitive. You can also add the ``-i`` flag to specify a case insensitive search, or ``-d`` to search the description of the package in addition to the name. Some examples: @@ -36,7 +36,7 @@ All packages whose names contain "sql" case insensitive: .. command-output:: spack list sql -All packages whose names start with a capitol M: +All packages whose names start with a capital M: .. command-output:: spack list M* -- cgit v1.2.3-70-g09d2 From f6aa864bc42f2ed517a836f398fb5ee00a2494b3 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 20 Jun 2016 11:41:36 -0700 Subject: adding quotes to make sure the glob is interpreted correctly --- lib/spack/docs/basic_usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index ceec8c7723..f103f7f5a5 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -38,7 +38,7 @@ All packages whose names contain "sql" case insensitive: All packages whose names start with a capital M: -.. command-output:: spack list M* +.. command-output:: spack list 'M*' All packages whose names or descriptions contain Documentation: -- cgit v1.2.3-70-g09d2 From 45482187b473d3b613700bb29af82748a54c4d1a Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Mon, 20 Jun 2016 11:42:35 -0700 Subject: one more typo issue --- lib/spack/docs/basic_usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index f103f7f5a5..ec193e767d 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -26,7 +26,7 @@ Spack can install: The packages are listed by name in alphabetical order. If you specify a pattern to match, it will follow this set of rules. A pattern with no -wildcards, ``*`` or ``?``, will be treated as though it started and ended iwth +wildcards, ``*`` or ``?``, will be treated as though it started and ended with ``*``, so ``util`` is equivalent to ``*util*``. A pattern with no capital letters will be treated as case-insensitive. You can also add the ``-i`` flag to specify a case insensitive search, or ``-d`` to search the description of -- cgit v1.2.3-70-g09d2 From b86e3047f34ab24ef8ff4586c433fcf79580aeca Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 20 Jun 2016 20:46:11 +0200 Subject: openmpi : revert part of #1079 (OpenMPI can be built without fortran) Building OpenMPI without fortran is possible, and was already handled. Raising an install error we effectively renounce at clang+OpenMPI. build_environment : sets 'CC', 'CXX', and similar variables only if a compiler is found --- lib/spack/spack/build_environment.py | 8 +++--- .../repos/builtin/packages/openmpi/package.py | 31 +++++++++++++++------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 7c65091d49..bdad0f8b33 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -183,20 +183,20 @@ def set_compiler_environment_variables(pkg, env): # and return it # TODO : add additional kwargs for better diagnostics, like requestor, ttyout, ttyerr, etc. link_dir = spack.build_env_path - env.set('CC', join_path(link_dir, compiler.link_paths['cc'])) - env.set('CXX', join_path(link_dir, compiler.link_paths['cxx'])) - env.set('F77', join_path(link_dir, compiler.link_paths['f77'])) - env.set('FC', join_path(link_dir, compiler.link_paths['fc'])) # Set SPACK compiler variables so that our wrapper knows what to call if compiler.cc: env.set('SPACK_CC', compiler.cc) + env.set('CC', join_path(link_dir, compiler.link_paths['cc'])) if compiler.cxx: env.set('SPACK_CXX', compiler.cxx) + env.set('CXX', join_path(link_dir, compiler.link_paths['cxx'])) if compiler.f77: env.set('SPACK_F77', compiler.f77) + env.set('F77', join_path(link_dir, compiler.link_paths['f77'])) if compiler.fc: env.set('SPACK_FC', compiler.fc) + env.set('FC', join_path(link_dir, compiler.link_paths['fc'])) # Set SPACK compiler rpath flags so that our wrapper knows what to use env.set('SPACK_CC_RPATH_ARG', compiler.cc_rpath_arg) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 695fb82f62..588d862d96 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -24,6 +24,8 @@ ############################################################################## import os +import llnl.util.tty as tty + from spack import * @@ -118,6 +120,21 @@ class Openmpi(Package): self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') + def setup_environment(self, spack_env, run_env): + # As of 06/2016 there is no mechanism to specify that packages which + # depends on MPI need C or/and Fortran implementation. For now + # require both. + if (self.compiler.f77 is None) or (self.compiler.fc is None): + tty.warn('OpenMPI : FORTRAN compiler not found') + tty.warn('OpenMPI : FORTRAN bindings will be disabled') + spack_env.unset('FC') + spack_env.unset('F77') + # Setting an attribute here and using it in the 'install' + # method is needed to ensure tty.warn is actually displayed + # to user and not redirected to spack-build.out + self.config_extra = ['--enable-mpi-fortran=none', + '--disable-oshmem-fortran'] + @property def verbs(self): # Up through version 1.6, this option was previously named @@ -129,17 +146,14 @@ class Openmpi(Package): return 'verbs' def install(self, spec, prefix): - # As of 06/2016 there is no mechanism to specify that packages which - # depends on MPI need C or/and Fortran implementation. For now - # require both. - if (self.compiler.f77 is None) or (self.compiler.fc is None): - raise InstallError('OpenMPI requires both C and Fortran ', - 'compilers!') - config_args = ["--prefix=%s" % prefix, "--with-hwloc=%s" % spec['hwloc'].prefix, "--enable-shared", "--enable-static"] + + if getattr(self, 'config_extra', None) is not None: + config_args.extend(self.config_extra) + # Variant based arguments config_args.extend([ # Schedulers @@ -170,9 +184,6 @@ class Openmpi(Package): if self.version == ver("1.6.5") and '+lanl' in spec: config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") # NOQA: ignore=E501 - if not self.compiler.f77 and not self.compiler.fc: - config_args.append("--enable-mpi-fortran=no") - configure(*config_args) make() make("install") -- cgit v1.2.3-70-g09d2 From 5aa3131385843dbf69c121bf7a134469a312a0ec Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 20 Jun 2016 21:11:33 +0200 Subject: qa : fixed flake8 issues --- lib/spack/spack/build_environment.py | 106 ++++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 45 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index bdad0f8b33..3fcfb151b8 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -75,20 +75,19 @@ SPACK_NO_PARALLEL_MAKE = 'SPACK_NO_PARALLEL_MAKE' # set_build_environment_variables and used to pass parameters to # Spack's compiler wrappers. # -SPACK_ENV_PATH = 'SPACK_ENV_PATH' -SPACK_DEPENDENCIES = 'SPACK_DEPENDENCIES' -SPACK_PREFIX = 'SPACK_PREFIX' -SPACK_INSTALL = 'SPACK_INSTALL' -SPACK_DEBUG = 'SPACK_DEBUG' -SPACK_SHORT_SPEC = 'SPACK_SHORT_SPEC' -SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR' +SPACK_ENV_PATH = 'SPACK_ENV_PATH' +SPACK_DEPENDENCIES = 'SPACK_DEPENDENCIES' +SPACK_PREFIX = 'SPACK_PREFIX' +SPACK_INSTALL = 'SPACK_INSTALL' +SPACK_DEBUG = 'SPACK_DEBUG' +SPACK_SHORT_SPEC = 'SPACK_SHORT_SPEC' +SPACK_DEBUG_LOG_DIR = 'SPACK_DEBUG_LOG_DIR' # Platform-specific library suffix. dso_suffix = 'dylib' if sys.platform == 'darwin' else 'so' - class MakeExecutable(Executable): """Special callable executable object for make so the user can specify parallel or not on a per-invocation basis. Using @@ -99,6 +98,7 @@ class MakeExecutable(Executable): Note that if the SPACK_NO_PARALLEL_MAKE env var is set it overrides everything. """ + def __init__(self, name, jobs): super(MakeExecutable, self).__init__(name) self.jobs = jobs @@ -113,12 +113,13 @@ class MakeExecutable(Executable): return super(MakeExecutable, self).__call__(*args, **kwargs) + def load_module(mod): """Takes a module name and removes modules until it is possible to load that module. It then loads the provided module. Depends on the modulecmd implementation of modules used in cray and lmod. """ - #Create an executable of the module command that will output python code + # Create an executable of the module command that will output python code modulecmd = which('modulecmd') modulecmd.add_default_arg('python') @@ -129,11 +130,13 @@ def load_module(mod): text = modulecmd('show', mod, output=str, error=str).split() for i, word in enumerate(text): if word == 'conflict': - exec(compile(modulecmd('unload', text[i+1], output=str, error=str), '', 'exec')) + exec(compile(modulecmd('unload', text[ + i + 1], output=str, error=str), '', 'exec')) # Load the module now that there are no conflicts load = modulecmd('load', mod, output=str, error=str) exec(compile(load, '', 'exec')) + def get_path_from_module(mod): """Inspects a TCL module for entries that indicate the absolute path at which the library supported by said module can be found. @@ -146,7 +149,7 @@ def get_path_from_module(mod): text = modulecmd('show', mod, output=str, error=str).split('\n') # If it lists its package directory, return that for line in text: - if line.find(mod.upper()+'_DIR') >= 0: + if line.find(mod.upper() + '_DIR') >= 0: words = line.split() return words[2] @@ -154,34 +157,37 @@ def get_path_from_module(mod): for line in text: rpath = line.find('-rpath/') if rpath >= 0: - return line[rpath+6:line.find('/lib')] + return line[rpath + 6:line.find('/lib')] # If it lists a -L instruction, use that for line in text: L = line.find('-L/') if L >= 0: - return line[L+2:line.find('/lib')] + return line[L + 2:line.find('/lib')] # If it sets the LD_LIBRARY_PATH or CRAY_LD_LIBRARY_PATH, use that for line in text: - if line.find('LD_LIBRARY_PATH') >= 0: + if line.find('LD_LIBRARY_PATH') >= 0: words = line.split() path = words[2] return path[:path.find('/lib')] # Unable to find module path return None + def set_compiler_environment_variables(pkg, env): assert(pkg.spec.concrete) compiler = pkg.compiler flags = pkg.spec.compiler_flags # Set compiler variables used by CMake and autotools - assert all(key in compiler.link_paths for key in ('cc', 'cxx', 'f77', 'fc')) + assert all(key in compiler.link_paths for key in ( + 'cc', 'cxx', 'f77', 'fc')) # Populate an object with the list of environment modifications # and return it - # TODO : add additional kwargs for better diagnostics, like requestor, ttyout, ttyerr, etc. + # TODO : add additional kwargs for better diagnostics, like requestor, + # ttyout, ttyerr, etc. link_dir = spack.build_env_path # Set SPACK compiler variables so that our wrapper knows what to call @@ -233,7 +239,8 @@ def set_build_environment_variables(pkg, env): # handled by putting one in the /case-insensitive # directory. Add that to the path too. env_paths = [] - for item in [spack.build_env_path, join_path(spack.build_env_path, pkg.compiler.name)]: + compiler_specific = join_path(spack.build_env_path, pkg.compiler.name) + for item in [spack.build_env_path, compiler_specific]: env_paths.append(item) ci = join_path(item, 'case-insensitive') if os.path.isdir(ci): @@ -246,7 +253,8 @@ def set_build_environment_variables(pkg, env): # Prefixes of all of the package's dependencies go in SPACK_DEPENDENCIES dep_prefixes = [d.prefix for d in pkg.spec.traverse(root=False)] env.set_path(SPACK_DEPENDENCIES, dep_prefixes) - env.set_path('CMAKE_PREFIX_PATH', dep_prefixes) # Add dependencies to CMAKE_PREFIX_PATH + # Add dependencies to CMAKE_PREFIX_PATH + env.set_path('CMAKE_PREFIX_PATH', dep_prefixes) # Install prefix env.set(SPACK_PREFIX, pkg.prefix) @@ -262,7 +270,8 @@ def set_build_environment_variables(pkg, env): env.unset('DYLD_LIBRARY_PATH') # Add bin directories from dependencies to the PATH for the build. - bin_dirs = reversed(filter(os.path.isdir, ['%s/bin' % prefix for prefix in dep_prefixes])) + bin_dirs = reversed( + filter(os.path.isdir, ['%s/bin' % prefix for prefix in dep_prefixes])) for item in bin_dirs: env.prepend_path('PATH', item) @@ -277,8 +286,8 @@ def set_build_environment_variables(pkg, env): for directory in ('lib', 'lib64', 'share'): pcdir = join_path(pre, directory, 'pkgconfig') if os.path.isdir(pcdir): - #pkg_config_dirs.append(pcdir) - env.prepend_path('PKG_CONFIG_PATH',pcdir) + # pkg_config_dirs.append(pcdir) + env.prepend_path('PKG_CONFIG_PATH', pcdir) if pkg.spec.architecture.target.module_name: load_module(pkg.spec.architecture.target.module_name) @@ -301,7 +310,7 @@ def set_module_variables_for_package(pkg, module): m.make_jobs = jobs # TODO: make these build deps that can be installed if not found. - m.make = MakeExecutable('make', jobs) + m.make = MakeExecutable('make', jobs) m.gmake = MakeExecutable('gmake', jobs) # easy shortcut to os.environ @@ -325,33 +334,34 @@ def set_module_variables_for_package(pkg, module): # Set up CMake rpath m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE') - m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH=%s' % ":".join(get_rpaths(pkg))) + m.std_cmake_args.append('-DCMAKE_INSTALL_RPATH=%s' % + ":".join(get_rpaths(pkg))) # Put spack compiler paths in module scope. link_dir = spack.build_env_path - m.spack_cc = join_path(link_dir, pkg.compiler.link_paths['cc']) + m.spack_cc = join_path(link_dir, pkg.compiler.link_paths['cc']) m.spack_cxx = join_path(link_dir, pkg.compiler.link_paths['cxx']) m.spack_f77 = join_path(link_dir, pkg.compiler.link_paths['f77']) - m.spack_fc = join_path(link_dir, pkg.compiler.link_paths['fc']) + m.spack_fc = join_path(link_dir, pkg.compiler.link_paths['fc']) # Emulate some shell commands for convenience - m.pwd = os.getcwd - m.cd = os.chdir - m.mkdir = os.mkdir - m.makedirs = os.makedirs - m.remove = os.remove - m.removedirs = os.removedirs - m.symlink = os.symlink - - m.mkdirp = mkdirp - m.install = install + m.pwd = os.getcwd + m.cd = os.chdir + m.mkdir = os.mkdir + m.makedirs = os.makedirs + m.remove = os.remove + m.removedirs = os.removedirs + m.symlink = os.symlink + + m.mkdirp = mkdirp + m.install = install m.install_tree = install_tree - m.rmtree = shutil.rmtree - m.move = shutil.move + m.rmtree = shutil.rmtree + m.move = shutil.move # Useful directories within the prefix are encapsulated in # a Prefix object. - m.prefix = pkg.prefix + m.prefix = pkg.prefix # Platform-specific library suffix. m.dso_suffix = dso_suffix @@ -365,20 +375,22 @@ def get_rpaths(pkg): rpaths.extend(d.prefix.lib64 for d in pkg.spec.dependencies.values() if os.path.isdir(d.prefix.lib64)) # Second module is our compiler mod name. We use that to get rpaths from - # module show output. + # module show output. if pkg.compiler.modules and len(pkg.compiler.modules) > 1: rpaths.append(get_path_from_module(pkg.compiler.modules[1])) return rpaths def parent_class_modules(cls): - """Get list of super class modules that are all descend from spack.Package""" + """ + Get list of super class modules that are all descend from spack.Package + """ if not issubclass(cls, spack.Package) or issubclass(spack.Package, cls): return [] result = [] module = sys.modules.get(cls.__module__) if module: - result = [ module ] + result = [module] for c in cls.__bases__: result.extend(parent_class_modules(c)) return result @@ -390,11 +402,12 @@ def load_external_modules(pkg): for dep in list(pkg.spec.traverse()): if dep.external_module: load_module(dep.external_module) - + + def setup_package(pkg): """Execute all environment setup routines.""" spack_env = EnvironmentModifications() - run_env = EnvironmentModifications() + run_env = EnvironmentModifications() # Before proceeding, ensure that specs and packages are consistent # @@ -410,7 +423,8 @@ def setup_package(pkg): # throwaway environment, but it is kind of dirty. # # TODO: Think about how to avoid this fix and do something cleaner. - for s in pkg.spec.traverse(): s.package.spec = s + for s in pkg.spec.traverse(): + s.package.spec = s set_compiler_environment_variables(pkg, spack_env) set_build_environment_variables(pkg, spack_env) @@ -498,7 +512,9 @@ def fork(pkg, function): # message. Just make the parent exit with an error code. pid, returncode = os.waitpid(pid, 0) if returncode != 0: - raise InstallError("Installation process had nonzero exit code.".format(str(returncode))) + message = "Installation process had nonzero exit code : {code}" + strcode = str(returncode) + raise InstallError(message.format(code=strcode)) class InstallError(spack.error.SpackError): -- cgit v1.2.3-70-g09d2 From 4c4f3e974723210ca15e00e44daff3ad1e1098e7 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 20 Jun 2016 14:46:28 -0700 Subject: Add init_config to compiler_find method --- lib/spack/spack/cmd/compiler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index ff26bc6ba2..c325628ebf 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -84,7 +84,8 @@ def compiler_find(args): if c.spec not in spack.compilers.all_compilers( scope=args.scope, init_config=False)] if compilers: - spack.compilers.add_compilers_to_config(compilers, scope=args.scope) + spack.compilers.add_compilers_to_config(compilers, scope=args.scope, + init_config=False) n = len(compilers) s = 's' if n > 1 else '' filename = spack.config.get_config_filename(args.scope, 'compilers') -- cgit v1.2.3-70-g09d2 From d515877d91300c6fb57e84f83011ded15737ca73 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Mon, 20 Jun 2016 14:54:26 -0700 Subject: Add init_config args in compilers/__init__ --- lib/spack/spack/compilers/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index c4b41394e0..a70d42982f 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -93,7 +93,7 @@ def get_compiler_config(scope=None, init_config=True): for compiler in compilers: compilers_dict.append(_to_dict(compiler)) spack.config.update_config('compilers', compilers_dict, scope=scope) - + config = spack.config.get_config('compilers', scope=scope) # Update the configuration if there are currently no compilers # configured. Avoid updating automatically if there ARE site @@ -117,14 +117,14 @@ def get_compiler_config(scope=None, init_config=True): return [] # Return empty list which we will later append to. -def add_compilers_to_config(compilers, scope=None): +def add_compilers_to_config(compilers, scope=None, init_config=True): """Add compilers to the config for the specified architecture. Arguments: - compilers: a list of Compiler objects. - scope: configuration scope to modify. """ - compiler_config = get_compiler_config(scope) + compiler_config = get_compiler_config(scope, init_config) for compiler in compilers: compiler_config.append(_to_dict(compiler)) global _cache_config_file -- cgit v1.2.3-70-g09d2 From 70a25c45871656b0e4007ffe5912bd6e51a5e4dd Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 20 Jun 2016 17:17:25 -0700 Subject: Change --insensitive to --sensitive in `spack list` --- lib/spack/spack/cmd/list.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/cmd/list.py b/lib/spack/spack/cmd/list.py index 974c4778ab..c921efd1bd 100644 --- a/lib/spack/spack/cmd/list.py +++ b/lib/spack/spack/cmd/list.py @@ -39,8 +39,9 @@ def setup_parser(subparser): 'filter', nargs=argparse.REMAINDER, help='Optional glob patterns to filter results.') subparser.add_argument( - '-i', '--insensitive', action='store_true', default=False, - help='Filtering will be case insensitive.') + '-s', '--sensitive', action='store_true', default=False, + help='Use case-sensitive filtering. Default is case sensitive, ' + 'unless the query contains a capital letter.') subparser.add_argument( '-d', '--search-description', action='store_true', default=False, help='Filtering will also search the description for a match.') @@ -58,8 +59,11 @@ def list(parser, args): r = fnmatch.translate('*' + f + '*') else: r = fnmatch.translate(f) - rc = re.compile(r, flags=re.I if args.insensitive or not any( - l.isupper() for l in f) else 0) + + re_flags = re.I + if any(l.isupper for l in f) or args.sensitive: + re_flags = 0 + rc = re.compile(r, flags=re_flags) res.append(rc) if args.search_description: -- cgit v1.2.3-70-g09d2 From 77cd474a2d129bf0df932a09e1e50ae05c6f7eff Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 20 Jun 2016 20:10:44 -0500 Subject: Make all packages lowercase. --- var/spack/repos/builtin/packages/r-DBI/package.py | 43 ------------------ .../repos/builtin/packages/r-RMySQL/package.py | 44 ------------------ .../repos/builtin/packages/r-RODBC/package.py | 43 ------------------ .../builtin/packages/r-RPostgreSQL/package.py | 52 ---------------------- .../repos/builtin/packages/r-RSQLite/package.py | 45 ------------------- .../repos/builtin/packages/r-XLConnect/package.py | 45 ------------------- .../builtin/packages/r-XLConnectJars/package.py | 43 ------------------ var/spack/repos/builtin/packages/r-dbi/package.py | 43 ++++++++++++++++++ .../repos/builtin/packages/r-rJava/package.py | 42 ----------------- .../repos/builtin/packages/r-rjava/package.py | 42 +++++++++++++++++ .../repos/builtin/packages/r-rmysql/package.py | 44 ++++++++++++++++++ .../repos/builtin/packages/r-rodbc/package.py | 43 ++++++++++++++++++ .../builtin/packages/r-rpostgresql/package.py | 52 ++++++++++++++++++++++ .../repos/builtin/packages/r-rsqlite/package.py | 45 +++++++++++++++++++ .../repos/builtin/packages/r-xlconnect/package.py | 45 +++++++++++++++++++ .../builtin/packages/r-xlconnectjars/package.py | 43 ++++++++++++++++++ .../repos/builtin/packages/unixODBC/package.py | 42 ----------------- .../repos/builtin/packages/unixodbc/package.py | 42 +++++++++++++++++ 18 files changed, 399 insertions(+), 399 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/r-DBI/package.py delete mode 100644 var/spack/repos/builtin/packages/r-RMySQL/package.py delete mode 100644 var/spack/repos/builtin/packages/r-RODBC/package.py delete mode 100644 var/spack/repos/builtin/packages/r-RPostgreSQL/package.py delete mode 100644 var/spack/repos/builtin/packages/r-RSQLite/package.py delete mode 100644 var/spack/repos/builtin/packages/r-XLConnect/package.py delete mode 100644 var/spack/repos/builtin/packages/r-XLConnectJars/package.py create mode 100644 var/spack/repos/builtin/packages/r-dbi/package.py delete mode 100644 var/spack/repos/builtin/packages/r-rJava/package.py create mode 100644 var/spack/repos/builtin/packages/r-rjava/package.py create mode 100644 var/spack/repos/builtin/packages/r-rmysql/package.py create mode 100644 var/spack/repos/builtin/packages/r-rodbc/package.py create mode 100644 var/spack/repos/builtin/packages/r-rpostgresql/package.py create mode 100644 var/spack/repos/builtin/packages/r-rsqlite/package.py create mode 100644 var/spack/repos/builtin/packages/r-xlconnect/package.py create mode 100644 var/spack/repos/builtin/packages/r-xlconnectjars/package.py delete mode 100644 var/spack/repos/builtin/packages/unixODBC/package.py create mode 100644 var/spack/repos/builtin/packages/unixodbc/package.py diff --git a/var/spack/repos/builtin/packages/r-DBI/package.py b/var/spack/repos/builtin/packages/r-DBI/package.py deleted file mode 100644 index a1e06d5100..0000000000 --- a/var/spack/repos/builtin/packages/r-DBI/package.py +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -# 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 RDbi(Package): - """A database interface definition for communication between R and - relational database management systems. All classes in this package are - virtual and need to be extended by the various R/DBMS implementations.""" - - homepage = "https://github.com/rstats-db/DBI" - url = "https://cran.r-project.org/src/contrib/DBI_0.4-1.tar.gz" - list_url = "https://cran.r-project.org/src/contrib/Archive/DBI" - - version('0.4-1', 'c7ee8f1c5037c2284e99c62698d0f087') - - 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-RMySQL/package.py b/var/spack/repos/builtin/packages/r-RMySQL/package.py deleted file mode 100644 index 774c166f8b..0000000000 --- a/var/spack/repos/builtin/packages/r-RMySQL/package.py +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# 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 RRmysql(Package): - """Implements 'DBI' Interface to 'MySQL' and 'MariaDB' Databases.""" - - homepage = "https://github.com/rstats-db/rmysql" - url = "https://cran.r-project.org/src/contrib/RMySQL_0.10.9.tar.gz" - list_url = "https://cran.r-project.org/src/contrib/Archive/RMySQL" - - version('0.10.9', '3628200a1864ac3005cfd55cc7cde17a') - - extends('R') - - depends_on('r-DBI') - depends_on('mariadb') - - 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-RODBC/package.py b/var/spack/repos/builtin/packages/r-RODBC/package.py deleted file mode 100644 index 9cc9aebd9a..0000000000 --- a/var/spack/repos/builtin/packages/r-RODBC/package.py +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -# 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 RRodbc(Package): - """An ODBC database interface.""" - - homepage = "https://cran.rstudio.com/web/packages/RODBC/" - url = "https://cran.rstudio.com/src/contrib/RODBC_1.3-13.tar.gz" - list_url = "https://cran.rstudio.com/src/contrib/Archive/RODBC" - - version('1.3-13', 'c52ef9139c2ed85adc53ad6effa7d68e') - - extends('R') - - depends_on('unixODBC') - - 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-RPostgreSQL/package.py b/var/spack/repos/builtin/packages/r-RPostgreSQL/package.py deleted file mode 100644 index 83c9b85525..0000000000 --- a/var/spack/repos/builtin/packages/r-RPostgreSQL/package.py +++ /dev/null @@ -1,52 +0,0 @@ -############################################################################## -# 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 RRpostgresql(Package): - """Database interface and PostgreSQL driver for R This package provides a - Database Interface (DBI) compliant driver for R to access PostgreSQL - database systems. In order to build and install this package from source, - PostgreSQL itself must be present your system to provide PostgreSQL - functionality via its libraries and header files. These files are provided - as postgresql-devel package under some Linux distributions. On Microsoft - Windows system the attached libpq library source will be used. A wiki and - issue tracking system for the package are available at Google Code at - https://code.google.com/p/rpostgresql/.""" - - homepage = "https://code.google.com/p/rpostgresql/" - url = "https://cran.r-project.org/src/contrib/RPostgreSQL_0.4-1.tar.gz" - list_url = "https://cran.r-project.org/src/contrib/Archive/RPostgreSQL" - - version('0.4-1', 'e7b22e212afbb2cbb88bab937f93e55a') - - extends('R') - - depends_on('r-DBI') - depends_on('postgresql') - - 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-RSQLite/package.py b/var/spack/repos/builtin/packages/r-RSQLite/package.py deleted file mode 100644 index 9602f6d927..0000000000 --- a/var/spack/repos/builtin/packages/r-RSQLite/package.py +++ /dev/null @@ -1,45 +0,0 @@ -############################################################################## -# 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 RRsqlite(Package): - """This package embeds the SQLite database engine in R and provides an - interface compliant with the DBI package. The source for the SQLite engine - (version 3.8.6) is included.""" - - homepage = "https://github.com/rstats-db/RSQLite" - url = "https://cran.r-project.org/src/contrib/RSQLite_1.0.0.tar.gz" - list_url = "https://cran.r-project.org/src/contrib/Archive/RSQLite" - - version('1.0.0', 'e6cbe2709612b687c13a10d30c7bad45') - - extends('R') - - depends_on('r-DBI') - - 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-XLConnect/package.py b/var/spack/repos/builtin/packages/r-XLConnect/package.py deleted file mode 100644 index 919291a023..0000000000 --- a/var/spack/repos/builtin/packages/r-XLConnect/package.py +++ /dev/null @@ -1,45 +0,0 @@ -############################################################################## -# 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 RXlconnect(Package): - """Provides comprehensive functionality to read, write and format Excel - data.""" - - homepage = "http://miraisolutions.wordpress.com/" - url = "https://cran.r-project.org/src/contrib/XLConnect_0.2-11.tar.gz" - list_url = "https://cran.r-project.org/src/contrib/Archive/XLConnect" - - version('0.2-11', '9d1769a103cda05665df399cc335017d') - - extends('R') - - depends_on('r-XLConnectJars') - depends_on('r-rJava') - - 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-XLConnectJars/package.py b/var/spack/repos/builtin/packages/r-XLConnectJars/package.py deleted file mode 100644 index 15d08cc5af..0000000000 --- a/var/spack/repos/builtin/packages/r-XLConnectJars/package.py +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################## -# 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 RXlconnectjars(Package): - """Provides external JAR dependencies for the XLConnect package.""" - - homepage = "http://miraisolutions.wordpress.com/" - url = "https://cran.r-project.org/src/contrib/XLConnectJars_0.2-9.tar.gz" - list_url = "https://cran.r-project.org/src/contrib/Archive/XLConnectJars" - - version('0.2-9', 'e6d6b1acfede26acaa616ee421bd30fb') - - extends('R') - - depends_on('r-rJava') - - 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-dbi/package.py b/var/spack/repos/builtin/packages/r-dbi/package.py new file mode 100644 index 0000000000..a1e06d5100 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-dbi/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 RDbi(Package): + """A database interface definition for communication between R and + relational database management systems. All classes in this package are + virtual and need to be extended by the various R/DBMS implementations.""" + + homepage = "https://github.com/rstats-db/DBI" + url = "https://cran.r-project.org/src/contrib/DBI_0.4-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/DBI" + + version('0.4-1', 'c7ee8f1c5037c2284e99c62698d0f087') + + 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-rJava/package.py b/var/spack/repos/builtin/packages/r-rJava/package.py deleted file mode 100644 index 0ce0942602..0000000000 --- a/var/spack/repos/builtin/packages/r-rJava/package.py +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################## -# 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 RRjava(Package): - """Low-level interface to Java VM very much like .C/.Call and friends. - Allows creation of objects, calling methods and accessing fields.""" - - homepage = "http://www.rforge.net/rJava/" - url = "https://cran.r-project.org/src/contrib/rJava_0.9-8.tar.gz" - list_url = "https://cran.r-project.org/src/contrib/Archive/rJava" - - version('0.9-8', '51ae0d690ceed056ebe7c4be71fc6c7a') - - 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-rjava/package.py b/var/spack/repos/builtin/packages/r-rjava/package.py new file mode 100644 index 0000000000..0ce0942602 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rjava/package.py @@ -0,0 +1,42 @@ +############################################################################## +# 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 RRjava(Package): + """Low-level interface to Java VM very much like .C/.Call and friends. + Allows creation of objects, calling methods and accessing fields.""" + + homepage = "http://www.rforge.net/rJava/" + url = "https://cran.r-project.org/src/contrib/rJava_0.9-8.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/rJava" + + version('0.9-8', '51ae0d690ceed056ebe7c4be71fc6c7a') + + 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-rmysql/package.py b/var/spack/repos/builtin/packages/r-rmysql/package.py new file mode 100644 index 0000000000..774c166f8b --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rmysql/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 RRmysql(Package): + """Implements 'DBI' Interface to 'MySQL' and 'MariaDB' Databases.""" + + homepage = "https://github.com/rstats-db/rmysql" + url = "https://cran.r-project.org/src/contrib/RMySQL_0.10.9.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RMySQL" + + version('0.10.9', '3628200a1864ac3005cfd55cc7cde17a') + + extends('R') + + depends_on('r-DBI') + depends_on('mariadb') + + 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-rodbc/package.py b/var/spack/repos/builtin/packages/r-rodbc/package.py new file mode 100644 index 0000000000..9cc9aebd9a --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rodbc/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 RRodbc(Package): + """An ODBC database interface.""" + + homepage = "https://cran.rstudio.com/web/packages/RODBC/" + url = "https://cran.rstudio.com/src/contrib/RODBC_1.3-13.tar.gz" + list_url = "https://cran.rstudio.com/src/contrib/Archive/RODBC" + + version('1.3-13', 'c52ef9139c2ed85adc53ad6effa7d68e') + + extends('R') + + depends_on('unixODBC') + + 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-rpostgresql/package.py b/var/spack/repos/builtin/packages/r-rpostgresql/package.py new file mode 100644 index 0000000000..83c9b85525 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rpostgresql/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 RRpostgresql(Package): + """Database interface and PostgreSQL driver for R This package provides a + Database Interface (DBI) compliant driver for R to access PostgreSQL + database systems. In order to build and install this package from source, + PostgreSQL itself must be present your system to provide PostgreSQL + functionality via its libraries and header files. These files are provided + as postgresql-devel package under some Linux distributions. On Microsoft + Windows system the attached libpq library source will be used. A wiki and + issue tracking system for the package are available at Google Code at + https://code.google.com/p/rpostgresql/.""" + + homepage = "https://code.google.com/p/rpostgresql/" + url = "https://cran.r-project.org/src/contrib/RPostgreSQL_0.4-1.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RPostgreSQL" + + version('0.4-1', 'e7b22e212afbb2cbb88bab937f93e55a') + + extends('R') + + depends_on('r-DBI') + depends_on('postgresql') + + 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-rsqlite/package.py b/var/spack/repos/builtin/packages/r-rsqlite/package.py new file mode 100644 index 0000000000..9602f6d927 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-rsqlite/package.py @@ -0,0 +1,45 @@ +############################################################################## +# 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 RRsqlite(Package): + """This package embeds the SQLite database engine in R and provides an + interface compliant with the DBI package. The source for the SQLite engine + (version 3.8.6) is included.""" + + homepage = "https://github.com/rstats-db/RSQLite" + url = "https://cran.r-project.org/src/contrib/RSQLite_1.0.0.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/RSQLite" + + version('1.0.0', 'e6cbe2709612b687c13a10d30c7bad45') + + extends('R') + + depends_on('r-DBI') + + 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-xlconnect/package.py b/var/spack/repos/builtin/packages/r-xlconnect/package.py new file mode 100644 index 0000000000..919291a023 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-xlconnect/package.py @@ -0,0 +1,45 @@ +############################################################################## +# 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 RXlconnect(Package): + """Provides comprehensive functionality to read, write and format Excel + data.""" + + homepage = "http://miraisolutions.wordpress.com/" + url = "https://cran.r-project.org/src/contrib/XLConnect_0.2-11.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/XLConnect" + + version('0.2-11', '9d1769a103cda05665df399cc335017d') + + extends('R') + + depends_on('r-XLConnectJars') + depends_on('r-rJava') + + 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-xlconnectjars/package.py b/var/spack/repos/builtin/packages/r-xlconnectjars/package.py new file mode 100644 index 0000000000..15d08cc5af --- /dev/null +++ b/var/spack/repos/builtin/packages/r-xlconnectjars/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 RXlconnectjars(Package): + """Provides external JAR dependencies for the XLConnect package.""" + + homepage = "http://miraisolutions.wordpress.com/" + url = "https://cran.r-project.org/src/contrib/XLConnectJars_0.2-9.tar.gz" + list_url = "https://cran.r-project.org/src/contrib/Archive/XLConnectJars" + + version('0.2-9', 'e6d6b1acfede26acaa616ee421bd30fb') + + extends('R') + + depends_on('r-rJava') + + 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/unixODBC/package.py b/var/spack/repos/builtin/packages/unixODBC/package.py deleted file mode 100644 index 15de127b7e..0000000000 --- a/var/spack/repos/builtin/packages/unixODBC/package.py +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################## -# 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 Unixodbc(Package): - """ODBC is an open specification for providing application developers with - a predictable API with which to access Data Sources. Data Sources include - SQL Servers and any Data Source with an ODBC Driver.""" - - homepage = "http://www.unixodbc.org/" - url = "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.4.tar.gz" - - version('2.3.4', 'bd25d261ca1808c947cb687e2034be81') - - def install(self, spec, prefix): - configure('--prefix={0}'.format(prefix)) - - make() - make('install') diff --git a/var/spack/repos/builtin/packages/unixodbc/package.py b/var/spack/repos/builtin/packages/unixodbc/package.py new file mode 100644 index 0000000000..15de127b7e --- /dev/null +++ b/var/spack/repos/builtin/packages/unixodbc/package.py @@ -0,0 +1,42 @@ +############################################################################## +# 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 Unixodbc(Package): + """ODBC is an open specification for providing application developers with + a predictable API with which to access Data Sources. Data Sources include + SQL Servers and any Data Source with an ODBC Driver.""" + + homepage = "http://www.unixodbc.org/" + url = "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.4.tar.gz" + + version('2.3.4', 'bd25d261ca1808c947cb687e2034be81') + + def install(self, spec, prefix): + configure('--prefix={0}'.format(prefix)) + + make() + make('install') -- cgit v1.2.3-70-g09d2 From 0521b9bb32387dd533d76dbb09f5226d865d8c06 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 21 Jun 2016 00:08:12 -0700 Subject: Fix merge error. --- lib/spack/spack/build_environment.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 83468be8e6..60703a9df9 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -130,13 +130,8 @@ def load_module(mod): text = modulecmd('show', mod, output=str, error=str).split() for i, word in enumerate(text): if word == 'conflict': -<<<<<<< HEAD - exec(compile(modulecmd('unload', text[ - i + 1], output=str, error=str), '', 'exec')) -======= exec(compile(modulecmd('unload', text[i + 1], output=str, error=str), '', 'exec')) ->>>>>>> aa86488fd9809ced16704e4bd4d607c89d6dda75 # Load the module now that there are no conflicts load = modulecmd('load', mod, output=str, error=str) exec(compile(load, '', 'exec')) @@ -244,13 +239,8 @@ def set_build_environment_variables(pkg, env): # handled by putting one in the /case-insensitive # directory. Add that to the path too. env_paths = [] -<<<<<<< HEAD compiler_specific = join_path(spack.build_env_path, pkg.compiler.name) for item in [spack.build_env_path, compiler_specific]: -======= - for item in [spack.build_env_path, join_path(spack.build_env_path, - pkg.compiler.name)]: ->>>>>>> aa86488fd9809ced16704e4bd4d607c89d6dda75 env_paths.append(item) ci = join_path(item, 'case-insensitive') if os.path.isdir(ci): @@ -280,13 +270,8 @@ def set_build_environment_variables(pkg, env): env.unset('DYLD_LIBRARY_PATH') # Add bin directories from dependencies to the PATH for the build. -<<<<<<< HEAD bin_dirs = reversed( filter(os.path.isdir, ['%s/bin' % prefix for prefix in dep_prefixes])) -======= - bin_dirs = reversed(filter(os.path.isdir, - ['%s/bin' % prefix for prefix in dep_prefixes])) ->>>>>>> aa86488fd9809ced16704e4bd4d607c89d6dda75 for item in bin_dirs: env.prepend_path('PATH', item) @@ -301,10 +286,6 @@ def set_build_environment_variables(pkg, env): for directory in ('lib', 'lib64', 'share'): pcdir = join_path(pre, directory, 'pkgconfig') if os.path.isdir(pcdir): -<<<<<<< HEAD - # pkg_config_dirs.append(pcdir) -======= ->>>>>>> aa86488fd9809ced16704e4bd4d607c89d6dda75 env.prepend_path('PKG_CONFIG_PATH', pcdir) if pkg.spec.architecture.target.module_name: @@ -402,13 +383,9 @@ def get_rpaths(pkg): def parent_class_modules(cls): -<<<<<<< HEAD """ Get list of super class modules that are all descend from spack.Package """ -======= - """Get list of super class modules that all descend from spack.Package""" ->>>>>>> aa86488fd9809ced16704e4bd4d607c89d6dda75 if not issubclass(cls, spack.Package) or issubclass(spack.Package, cls): return [] result = [] -- cgit v1.2.3-70-g09d2 From 58cff1290dccce42fef418c0a7e42222a02f38b9 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 21 Jun 2016 00:19:28 -0700 Subject: Make environment test less sensitive to user config files. --- lib/spack/spack/test/environment.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/environment.py b/lib/spack/spack/test/environment.py index f3644cb0b7..2396961888 100644 --- a/lib/spack/spack/test/environment.py +++ b/lib/spack/spack/test/environment.py @@ -123,7 +123,12 @@ class EnvironmentTest(unittest.TestCase): env = EnvironmentModifications.from_sourcing_files(*files) modifications = env.group_by_name() - self.assertEqual(len(modifications), 4) + # This is sensitive to the user's environment; can include + # spurious entries for things like PS1 + # + # TODO: figure out how to make a bit more robust. + self.assertTrue(len(modifications) >= 4) + # Set new variables self.assertEqual(len(modifications['NEW_VAR']), 1) self.assertTrue(isinstance(modifications['NEW_VAR'][0], SetEnv)) -- cgit v1.2.3-70-g09d2 From 4041f45b6c387ab07c3e9681d5b3423eb31739a2 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Mon, 20 Jun 2016 16:17:07 -0700 Subject: fixed conflicts in python package --- var/spack/repos/builtin/packages/cairo/package.py | 1 + var/spack/repos/builtin/packages/freetype/package.py | 2 +- var/spack/repos/builtin/packages/harfbuzz/package.py | 2 ++ var/spack/repos/builtin/packages/python/package.py | 3 +++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py index 5c7c2fae22..f2aba08ef1 100644 --- a/var/spack/repos/builtin/packages/cairo/package.py +++ b/var/spack/repos/builtin/packages/cairo/package.py @@ -34,6 +34,7 @@ class Cairo(Package): depends_on("libpng") depends_on("glib") depends_on("pixman") + depends_on("freetype") depends_on("fontconfig@2.10.91:") # Require newer version of fontconfig. def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/freetype/package.py b/var/spack/repos/builtin/packages/freetype/package.py index 897c011396..f0b9a40a21 100644 --- a/var/spack/repos/builtin/packages/freetype/package.py +++ b/var/spack/repos/builtin/packages/freetype/package.py @@ -34,7 +34,7 @@ class Freetype(Package): depends_on('libpng') def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + configure("--prefix=%s" % prefix, "--with-harfbuzz=no") make() make("install") diff --git a/var/spack/repos/builtin/packages/harfbuzz/package.py b/var/spack/repos/builtin/packages/harfbuzz/package.py index e4c1b80de3..e26f2843b5 100644 --- a/var/spack/repos/builtin/packages/harfbuzz/package.py +++ b/var/spack/repos/builtin/packages/harfbuzz/package.py @@ -34,6 +34,8 @@ class Harfbuzz(Package): depends_on("glib") depends_on("icu") depends_on("freetype") + depends_on("cairo") + depends_on("zlib") def patch(self): change_sed_delimiter('@', ';', 'src/Makefile.in') diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index b6a62bf742..15133baea3 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -203,8 +203,11 @@ class Python(Package): r'site-packages/site[^/]*\.pyc?$', r'site-packages/__pycache__/site[^/]*\.pyc?$' ]) + if ext_pkg.name != 'py-pygments': + patterns.append(r'bin/pygmentize$') if ext_pkg.name != 'py-numpy': patterns.append(r'bin/f2py$') + patterns.append(r'bin/f2py3$') return match_predicate(ignore_arg, patterns) -- cgit v1.2.3-70-g09d2 From 8f3954c1bdc329f2cb09e5e5baa140419222df8f Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Mon, 20 Jun 2016 20:21:10 -0700 Subject: flake 8 fixes for cairo, freetype, and harfbuzz --- var/spack/repos/builtin/packages/cairo/package.py | 8 +++++--- var/spack/repos/builtin/packages/freetype/package.py | 3 ++- var/spack/repos/builtin/packages/harfbuzz/package.py | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/cairo/package.py b/var/spack/repos/builtin/packages/cairo/package.py index f2aba08ef1..ddb8d2fd03 100644 --- a/var/spack/repos/builtin/packages/cairo/package.py +++ b/var/spack/repos/builtin/packages/cairo/package.py @@ -24,8 +24,10 @@ ############################################################################## from spack import * + class Cairo(Package): - """Cairo is a 2D graphics library with support for multiple output devices.""" + """Cairo is a 2D graphics library with support for multiple output + devices.""" homepage = "http://cairographics.org" url = "http://cairographics.org/releases/cairo-1.14.0.tar.xz" @@ -35,11 +37,11 @@ class Cairo(Package): depends_on("glib") depends_on("pixman") depends_on("freetype") - depends_on("fontconfig@2.10.91:") # Require newer version of fontconfig. + depends_on("fontconfig@2.10.91:") # Require newer version of fontconfig. def install(self, spec, prefix): configure("--prefix=%s" % prefix, - "--disable-trace", # can cause problems with libiberty + "--disable-trace", # can cause problems with libiberty "--enable-tee") make() make("install") diff --git a/var/spack/repos/builtin/packages/freetype/package.py b/var/spack/repos/builtin/packages/freetype/package.py index f0b9a40a21..dd181623d0 100644 --- a/var/spack/repos/builtin/packages/freetype/package.py +++ b/var/spack/repos/builtin/packages/freetype/package.py @@ -24,12 +24,13 @@ ############################################################################## from spack import * + class Freetype(Package): """Font package""" homepage = "http://http://www.freetype.org" url = "http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz" - version('2.5.3' , 'cafe9f210e45360279c730d27bf071e9') + version('2.5.3', 'cafe9f210e45360279c730d27bf071e9') depends_on('libpng') diff --git a/var/spack/repos/builtin/packages/harfbuzz/package.py b/var/spack/repos/builtin/packages/harfbuzz/package.py index e26f2843b5..f8d73d651b 100644 --- a/var/spack/repos/builtin/packages/harfbuzz/package.py +++ b/var/spack/repos/builtin/packages/harfbuzz/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Harfbuzz(Package): """The Harfbuzz package contains an OpenType text shaping engine.""" homepage = "http://www.freedesktop.org/wiki/Software/HarfBuzz/" -- cgit v1.2.3-70-g09d2 From e0fbf14f9907aec7eef5e813febca6d3c0e335c9 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Tue, 21 Jun 2016 09:23:58 -0700 Subject: consolidated f2py regex --- var/spack/repos/builtin/packages/python/package.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 15133baea3..8033c52b91 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -206,8 +206,7 @@ class Python(Package): if ext_pkg.name != 'py-pygments': patterns.append(r'bin/pygmentize$') if ext_pkg.name != 'py-numpy': - patterns.append(r'bin/f2py$') - patterns.append(r'bin/f2py3$') + patterns.append(r'bin/f2py3?$') return match_predicate(ignore_arg, patterns) -- cgit v1.2.3-70-g09d2 From 2efc67da607f29b9246ad70cb74a4ba5f35f8107 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 21 Jun 2016 14:50:33 -0500 Subject: Remove +tk variant, provide pil --- .../repos/builtin/packages/openjpeg/package.py | 2 + var/spack/repos/builtin/packages/py-pil/package.py | 7 ++- .../repos/builtin/packages/py-pillow/package.py | 61 ++++++++++------------ 3 files changed, 36 insertions(+), 34 deletions(-) diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py index 9b2063593a..41ca3b44fb 100644 --- a/var/spack/repos/builtin/packages/openjpeg/package.py +++ b/var/spack/repos/builtin/packages/openjpeg/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Openjpeg(Package): """ OpenJPEG is an open-source JPEG 2000 codec written in C language. @@ -42,6 +43,7 @@ class Openjpeg(Package): version('1.5.2', '545f98923430369a6b046ef3632ef95c') version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e') + depends_on('cmake') def install(self, spec, prefix): cmake('.', *std_cmake_args) diff --git a/var/spack/repos/builtin/packages/py-pil/package.py b/var/spack/repos/builtin/packages/py-pil/package.py index dc4418fdfe..2b3cce26d3 100644 --- a/var/spack/repos/builtin/packages/py-pil/package.py +++ b/var/spack/repos/builtin/packages/py-pil/package.py @@ -24,14 +24,19 @@ ############################################################################## from spack import * + class PyPil(Package): - """The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.""" + """The Python Imaging Library (PIL) adds image processing capabilities + to your Python interpreter. This library supports many file formats, + and provides powerful image processing and graphics capabilities.""" homepage = "http://www.pythonware.com/products/pil/" url = "http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz" version('1.1.7', 'fc14a54e1ce02a0225be8854bfba478e') + provides('pil') + extends('python') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py index 5784b9f181..987ff383da 100644 --- a/var/spack/repos/builtin/packages/py-pillow/package.py +++ b/var/spack/repos/builtin/packages/py-pillow/package.py @@ -34,27 +34,35 @@ class PyPillow(Package): homepage = "https://python-pillow.org/" url = "https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.tar.gz" - version('3.2.0', '7cfd093c11205d9e2ebe3c51dfcad510') + # TODO: This version should be deleted once the next release comes out. + # TODO: It fixes a bug that prevented us from linking to Tk/Tcl. + # TODO: Tk/Tcl support is necessary for tkinter bitmap and photo images. + # TODO: If you require this support, run the following command: + # TODO: `spack install py-pillow@3.3.0.dev0 ^python+tk` + version('3.3.0.dev0', git='https://github.com/python-pillow/Pillow.git', + commit='30eced62868141a6c859a4370efd40b9434a7c3f') + + version('3.2.0', '7cfd093c11205d9e2ebe3c51dfcad510', preferred=True) version('3.0.0', 'fc8ac44e93da09678eac7e30c9b7377d') + provides('pil') + # These defaults correspond to Pillow defaults - variant('jpeg', default=True, description='Provide JPEG functionality') - variant('zlib', default=True, description='Access to compressed PNGs') - variant('tiff', default=False, description='Access to TIFF files') + variant('jpeg', default=True, description='Provide JPEG functionality') + variant('zlib', default=True, description='Access to compressed PNGs') + variant('tiff', default=False, description='Access to TIFF files') variant('freetype', default=False, description='Font related services') - variant('lcms', default=False, description='Color management') - variant('tk', default=False, description='Support for tkinter bitmap and photo images') + variant('lcms', default=False, description='Color management') variant('jpeg2000', default=False, description='Provide JPEG 2000 functionality') # Spack does not (yet) support these modes of building - # variant('webp', default=False, description='Provide the WebP format') - # variant('webpmux', default=False, description='WebP metadata, relies on WebP support') + # variant('webp', default=False, description='Provide the WebP format') + # variant('webpmux', default=False, description='WebP metadata, relies on WebP support') # variant('imagequant', default=False, description='Provide improved color quantization') - provides('PIL') - # Required dependencies extends('python') + depends_on('binutils') depends_on('py-setuptools') # Recommended dependencies @@ -62,16 +70,14 @@ class PyPillow(Package): depends_on('zlib', when='+zlib') # Optional dependencies - depends_on('libtiff', when='+tiff') + depends_on('libtiff', when='+tiff') depends_on('freetype', when='+freetype') - depends_on('lcms', when='+lcms') - depends_on('tcl', when='+tk') - depends_on('tk', when='+tk') + depends_on('lcms', when='+lcms') depends_on('openjpeg', when='+jpeg2000') # Spack does not (yet) support these modes of building - # depends_on('webp', when='+webp') - # depends_on('webpmux', when='+webpmux') + # depends_on('webp', when='+webp') + # depends_on('webpmux', when='+webpmux') # depends_on('imagequant', when='+imagequant') def patch(self): @@ -106,11 +112,6 @@ class PyPillow(Package): 'LCMS_ROOT = ("{0}", "{1}")'.format( spec['lcms'].prefix.lib, spec['lcms'].prefix.include)) - if '+tk' in spec: - setup.filter('TCL_ROOT = None', - 'TCL_ROOT = ("{0}", "{1}")'.format( - spec['tcl'].prefix.lib, - spec['tcl'].prefix.include)) if '+jpeg2000' in spec: setup.filter('JPEG2K_ROOT = None', 'JPEG2K_ROOT = ("{0}", "{1}")'.format( @@ -118,18 +119,12 @@ class PyPillow(Package): spec['openjpeg'].prefix.include)) def install(self, spec, prefix): - build_args = [ - '--{0}-jpeg'.format('enable' if '+jpeg' in spec else 'disable'), - '--{0}-zlib'.format('enable' if '+zlib' in spec else 'disable'), - '--{0}-tiff'.format('enable' if '+tiff' in spec else 'disable'), - '--{0}-freetype'.format( - 'enable' if '+freetype' in spec else 'disable'), - '--{0}-lcms'.format('enable' if '+lcms' in spec else 'disable'), - '--{0}-tk'.format('enable' if '+tk' in spec else 'disable'), - '--{0}-tcl'.format('enable' if '+tk' in spec else 'disable'), - '--{0}-jpeg2000'.format( - 'enable' if '+jpeg2000' in spec else 'disable') - ] + def variant_to_flag(variant): + able = 'enable' if '+{0}'.format(variant) in spec else 'disable' + return '--{0}-{1}'.format(able, variant) + + variants = ['jpeg', 'zlib', 'tiff', 'freetype', 'lcms', 'jpeg2000'] + build_args = list(map(variant_to_flag, variants)) python('setup.py', 'build_ext', *build_args) python('setup.py', 'install', '--prefix={0}'.format(prefix)) -- cgit v1.2.3-70-g09d2 From 66089c89aa85369f1e19ae1636ed307e82fdb708 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 21 Jun 2016 14:55:49 -0500 Subject: Depend on pil --- var/spack/repos/builtin/packages/openjpeg/package.py | 4 ++-- var/spack/repos/builtin/packages/py-basemap/package.py | 8 +++++--- var/spack/repos/builtin/packages/py-scikit-image/package.py | 7 +++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py index 41ca3b44fb..1d00edb06d 100644 --- a/var/spack/repos/builtin/packages/openjpeg/package.py +++ b/var/spack/repos/builtin/packages/openjpeg/package.py @@ -37,9 +37,9 @@ class Openjpeg(Package): homepage = "https://github.com/uclouvain/openjpeg" url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz" - version('2.1' , '3e1c451c087f8462955426da38aa3b3d') + version('2.1', '3e1c451c087f8462955426da38aa3b3d') version('2.0.1', '105876ed43ff7dbb2f90b41b5a43cfa5') - version('2.0' , 'cdf266530fee8af87454f15feb619609') + version('2.0', 'cdf266530fee8af87454f15feb619609') version('1.5.2', '545f98923430369a6b046ef3632ef95c') version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e') diff --git a/var/spack/repos/builtin/packages/py-basemap/package.py b/var/spack/repos/builtin/packages/py-basemap/package.py index 95d02bce91..13f604bacd 100644 --- a/var/spack/repos/builtin/packages/py-basemap/package.py +++ b/var/spack/repos/builtin/packages/py-basemap/package.py @@ -23,10 +23,12 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os + class PyBasemap(Package): - """The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python.""" + """The matplotlib basemap toolkit is a library for plotting + 2D data on maps in Python.""" + homepage = "http://matplotlib.org/basemap/" url = "https://downloads.sourceforge.net/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz" @@ -36,7 +38,7 @@ class PyBasemap(Package): depends_on('py-setuptools') depends_on('py-numpy') depends_on('py-matplotlib+gui') - depends_on('py-pillow') + depends_on('pil') depends_on("geos") def install(self, spec, prefix): 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 0479e9eb0a..4c8fd0942a 100644 --- a/var/spack/repos/builtin/packages/py-scikit-image/package.py +++ b/var/spack/repos/builtin/packages/py-scikit-image/package.py @@ -24,8 +24,11 @@ ############################################################################## from spack import * + class PyScikitImage(Package): - """Image processing algorithms for SciPy, including IO, morphology, filtering, warping, color manipulation, object detection, etc.""" + """Image processing algorithms for SciPy, including IO, morphology, + filtering, warping, color manipulation, object detection, etc.""" + homepage = "http://scikit-image.org/" url = "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-0.12.3.tar.gz" @@ -34,7 +37,7 @@ class PyScikitImage(Package): extends('python', ignore=r'bin/.*\.py$') depends_on('py-dask') - depends_on('py-pillow') + depends_on('pil') depends_on('py-networkx') depends_on('py-six') depends_on('py-scipy') -- cgit v1.2.3-70-g09d2 From a7ffb2c1a4526acf11edbf121770adcb058fc228 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 21 Jun 2016 15:21:53 -0500 Subject: Flake8 --- .../repos/builtin/packages/py-pillow/package.py | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pillow/package.py b/var/spack/repos/builtin/packages/py-pillow/package.py index 987ff383da..25cf412b31 100644 --- a/var/spack/repos/builtin/packages/py-pillow/package.py +++ b/var/spack/repos/builtin/packages/py-pillow/package.py @@ -57,8 +57,8 @@ class PyPillow(Package): # Spack does not (yet) support these modes of building # variant('webp', default=False, description='Provide the WebP format') - # variant('webpmux', default=False, description='WebP metadata, relies on WebP support') - # variant('imagequant', default=False, description='Provide improved color quantization') + # variant('webpmux', default=False, description='WebP metadata, relies on WebP support') # NOQA: ignore=E501 + # variant('imagequant', default=False, description='Provide improved color quantization') # NOQA: ignore=E501 # Required dependencies extends('python') @@ -90,33 +90,33 @@ class PyPillow(Package): if '+jpeg' in spec: setup.filter('JPEG_ROOT = None', 'JPEG_ROOT = ("{0}", "{1}")'.format( - spec['jpeg'].prefix.lib, - spec['jpeg'].prefix.include)) + spec['jpeg'].prefix.lib, + spec['jpeg'].prefix.include)) if '+zlib' in spec: setup.filter('ZLIB_ROOT = None', 'ZLIB_ROOT = ("{0}", "{1}")'.format( - spec['zlib'].prefix.lib, - spec['zlib'].prefix.include)) + spec['zlib'].prefix.lib, + spec['zlib'].prefix.include)) if '+tiff' in spec: setup.filter('TIFF_ROOT = None', 'TIFF_ROOT = ("{0}", "{1}")'.format( - spec['libtiff'].prefix.lib, - spec['libtiff'].prefix.include)) + spec['libtiff'].prefix.lib, + spec['libtiff'].prefix.include)) if '+freetype' in spec: setup.filter('FREETYPE_ROOT = None', 'FREETYPE_ROOT = ("{0}", "{1}")'.format( - spec['freetype'].prefix.lib, - spec['freetype'].prefix.include)) + spec['freetype'].prefix.lib, + spec['freetype'].prefix.include)) if '+lcms' in spec: setup.filter('LCMS_ROOT = None', 'LCMS_ROOT = ("{0}", "{1}")'.format( - spec['lcms'].prefix.lib, - spec['lcms'].prefix.include)) + spec['lcms'].prefix.lib, + spec['lcms'].prefix.include)) if '+jpeg2000' in spec: setup.filter('JPEG2K_ROOT = None', 'JPEG2K_ROOT = ("{0}", "{1}")'.format( - spec['openjpeg'].prefix.lib, - spec['openjpeg'].prefix.include)) + spec['openjpeg'].prefix.lib, + spec['openjpeg'].prefix.include)) def install(self, spec, prefix): def variant_to_flag(variant): -- cgit v1.2.3-70-g09d2 From 060fb596f7897b0da14a0bcb601a644e489ac140 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 22 Jun 2016 09:52:17 -0500 Subject: Add latest version of netcdf-fortran --- var/spack/repos/builtin/packages/netcdf-fortran/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/package.py b/var/spack/repos/builtin/packages/netcdf-fortran/package.py index 3d1951ceee..e52ff1af87 100644 --- a/var/spack/repos/builtin/packages/netcdf-fortran/package.py +++ b/var/spack/repos/builtin/packages/netcdf-fortran/package.py @@ -24,12 +24,14 @@ ############################################################################## from spack import * + class NetcdfFortran(Package): """Fortran interface for NetCDF4""" homepage = "http://www.unidata.ucar.edu/software/netcdf" url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.4.3.tar.gz" + version('4.4.4', 'e855c789cd72e1b8bc1354366bf6ac72') version('4.4.3', 'bfd4ae23a34635b273d3eb0d91cbde9e') depends_on('netcdf') -- cgit v1.2.3-70-g09d2 From e398c0dc5bdec54ee06ffa7694502b9a73af4011 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 22 Jun 2016 11:00:00 -0400 Subject: Update Julia to 0.4.6 --- var/spack/repos/builtin/packages/julia/package.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index 69b52130e9..c2700a8149 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -32,10 +32,14 @@ class Julia(Package): version('master', git='https://github.com/JuliaLang/julia.git', branch='master') + version('release-0.4', + git='https://github.com/JuliaLang/julia.git', branch='release-0.4') + version('0.4.6', 'd88db18c579049c23ab8ef427ccedf5d', preferred=True) version('0.4.5', '69141ff5aa6cee7c0ec8c85a34aa49a6') version('0.4.3', '8a4a59fd335b05090dd1ebefbbe5aaac') - patch('gc.patch') + patch('gc.patch', when='@0.4:0.4.5') + patch('gc.patch', when='@release-0.4') patch('openblas.patch', when='@0.4:0.4.5') # Build-time dependencies: @@ -92,11 +96,6 @@ class Julia(Package): depends_on("mpi") def install(self, spec, prefix): - if '@master' in spec: - # Julia needs to know the offset from a specific commit - git = which('git') - git('fetch', '--unshallow') - # Explicitly setting CC, CXX, or FC breaks building libuv, one # of Julia's dependencies. This might be a Darwin-specific # problem. Given how Spack sets up compilers, Julia should -- cgit v1.2.3-70-g09d2 From b66f5b6231107606aad757cfe2bd65fb7ff6d886 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 22 Jun 2016 10:05:20 -0500 Subject: Add latest version of cURL --- var/spack/repos/builtin/packages/curl/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/curl/package.py b/var/spack/repos/builtin/packages/curl/package.py index e3de6ee5a1..79570205fa 100644 --- a/var/spack/repos/builtin/packages/curl/package.py +++ b/var/spack/repos/builtin/packages/curl/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Curl(Package): """cURL is an open source command line tool and library for transferring data with URL syntax""" @@ -31,6 +32,7 @@ class Curl(Package): homepage = "http://curl.haxx.se" url = "http://curl.haxx.se/download/curl-7.46.0.tar.bz2" + version('7.49.1', '6bb1f7af5b58b30e4e6414b8c1abccab') version('7.47.1', '9ea3123449439bbd960cd25cf98796fb') version('7.46.0', '9979f989a2a9930d10f1b3deeabc2148') version('7.45.0', '62c1a352b28558f25ba6209214beadc8') -- cgit v1.2.3-70-g09d2 From f29b55957ac00b440a7c8b0f609ee5380c32d5db Mon Sep 17 00:00:00 2001 From: alalazo Date: Wed, 22 Jun 2016 17:08:02 +0200 Subject: documentation : removed references to never implemented features --- lib/spack/docs/configuration.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/spack/docs/configuration.rst b/lib/spack/docs/configuration.rst index c613071c65..a6f876b2aa 100644 --- a/lib/spack/docs/configuration.rst +++ b/lib/spack/docs/configuration.rst @@ -140,7 +140,6 @@ Here's an example packages.yaml file that sets preferred packages: packages: dyninst: compiler: [gcc@4.9] - variants: +debug gperftools: version: [2.2, 2.4, 2.3] all: @@ -150,8 +149,8 @@ Here's an example packages.yaml file that sets preferred packages: At a high level, this example is specifying how packages should be -concretized. The dyninst package should prefer using gcc 4.9 and -be built with debug options. The gperftools package should prefer version +concretized. The dyninst package should prefer using gcc 4.9. +The gperftools package should prefer version 2.2 over 2.4. Every package on the system should prefer mvapich for its MPI and gcc 4.4.7 (except for Dyninst, which overrides this by preferring gcc 4.9). These options are used to fill in implicit defaults. Any of them can be overwritten @@ -160,7 +159,7 @@ on the command line if explicitly requested. Each packages.yaml file begins with the string ``packages:`` and package names are specified on the next level. The special string ``all`` applies settings to each package. Underneath each package name is -one or more components: ``compiler``, ``variants``, ``version``, +one or more components: ``compiler``, ``version``, or ``providers``. Each component has an ordered list of spec ``constraints``, with earlier entries in the list being preferred over later entries. -- cgit v1.2.3-70-g09d2 From c904a42c5b7e905bd793e90d1deb4b32023404f2 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 22 Jun 2016 11:09:45 -0400 Subject: Address flake errors --- var/spack/repos/builtin/packages/julia/package.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index c2700a8149..99d138dcff 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -22,8 +22,9 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## + from spack import * -import os + class Julia(Package): """The Julia Language: A fresh approach to technical computing""" @@ -101,15 +102,16 @@ class Julia(Package): # problem. Given how Spack sets up compilers, Julia should # still use Spack's compilers, even if we don't specify them # explicitly. - options = [#"CC=cc", - #"CXX=c++", - #"FC=fc", - #"USE_SYSTEM_ARPACK=1", - #"USE_SYSTEM_FFTW=1", - #"USE_SYSTEM_GMP=1", - #"USE_SYSTEM_MPFR=1", - #TODO "USE_SYSTEM_PCRE=1", - "prefix=%s" % prefix] + options = [ + # "CC=cc", + # "CXX=c++", + # "FC=fc", + # "USE_SYSTEM_ARPACK=1", + # "USE_SYSTEM_FFTW=1", + # "USE_SYSTEM_GMP=1", + # "USE_SYSTEM_MPFR=1", + # "USE_SYSTEM_PCRE=1", + "prefix=%s" % prefix] with open('Make.user', 'w') as f: f.write('\n'.join(options) + '\n') make() -- cgit v1.2.3-70-g09d2 From ff3e56cf9abacc567b2e68c1881ba108dccfb06c Mon Sep 17 00:00:00 2001 From: "Robert.French" Date: Wed, 22 Jun 2016 15:24:32 +0000 Subject: Import which from spack.util.executable; Fixes #1095 --- lib/spack/spack/build_environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 60703a9df9..99c4cae020 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -63,7 +63,7 @@ from llnl.util.filesystem import * import spack from spack.environment import EnvironmentModifications, validate from spack.util.environment import * -from spack.util.executable import Executable +from spack.util.executable import Executable, which # # This can be set by the user to globally disable parallel builds. -- cgit v1.2.3-70-g09d2 From ffe9e77e36ca2c64ff8d2ebdc14c6b04d1184d15 Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Wed, 22 Jun 2016 12:08:28 -0400 Subject: Improved Spack database errors to help users fix them. --- lib/spack/spack/database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index f941346bb1..9b0e88b9ad 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -631,11 +631,11 @@ class WriteTransaction(_Transaction): class CorruptDatabaseError(SpackError): def __init__(self, path, msg=''): super(CorruptDatabaseError, self).__init__( - "Spack database is corrupt: %s. %s" % (path, msg)) + "Spack database is corrupt: %s. %s. Try running `spack reindex` to fix." % (path, msg)) class InvalidDatabaseVersionError(SpackError): def __init__(self, expected, found): super(InvalidDatabaseVersionError, self).__init__( - "Expected database version %s but found version %s" % + "Expected database version %s but found version %s. Try running `spack reindex` to fix." % (expected, found)) -- cgit v1.2.3-70-g09d2 From 10810482bc308e5a4f6d201c201a56b91dc9bd64 Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Wed, 22 Jun 2016 14:03:32 -0400 Subject: Update database.py PEP8 --- lib/spack/spack/database.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index 9b0e88b9ad..a4bbff3d5a 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -631,11 +631,13 @@ class WriteTransaction(_Transaction): class CorruptDatabaseError(SpackError): def __init__(self, path, msg=''): super(CorruptDatabaseError, self).__init__( - "Spack database is corrupt: %s. %s. Try running `spack reindex` to fix." % (path, msg)) + "Spack database is corrupt: %s. %s." + \ + "Try running `spack reindex` to fix." % (path, msg)) class InvalidDatabaseVersionError(SpackError): def __init__(self, expected, found): super(InvalidDatabaseVersionError, self).__init__( - "Expected database version %s but found version %s. Try running `spack reindex` to fix." % + "Expected database version %s but found version %s." + \ + "Try running `spack reindex` to fix." % (expected, found)) -- cgit v1.2.3-70-g09d2 From 8f846d507d7523d5ce6f0a90b33d9409bab2a72c Mon Sep 17 00:00:00 2001 From: Elizabeth Fischer Date: Wed, 22 Jun 2016 15:36:04 -0400 Subject: Added --prefix to module command. --- lib/spack/spack/cmd/module.py | 48 ++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py index b79737ab22..443e95a3c2 100644 --- a/lib/spack/spack/cmd/module.py +++ b/lib/spack/spack/cmd/module.py @@ -1,49 +1,45 @@ ############################################################################## -# Copyright (c) 2013, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. -# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# 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 General Public License (as published by -# the Free Software Foundation) version 2.1 dated February 1999. +# 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 General Public License for more details. +# 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 +# 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 ############################################################################## -import sys +from __future__ import print_function import os import shutil -import argparse +import sys import llnl.util.tty as tty -from llnl.util.lang import partition_list -from llnl.util.filesystem import mkdirp - import spack.cmd +from llnl.util.filesystem import mkdirp from spack.modules import module_types from spack.util.string import * -from spack.spec import Spec - -description ="Manipulate modules and dotkits." +description = "Manipulate modules and dotkits." def setup_parser(subparser): sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='module_command') - refresh_parser = sp.add_parser('refresh', help='Regenerate all module files.') + sp.add_parser('refresh', help='Regenerate all module files.') find_parser = sp.add_parser('find', help='Find module files for packages.') find_parser.add_argument( @@ -56,6 +52,10 @@ def setup_parser(subparser): '-s', '--shell', action='store_true', dest='shell', help='Generate shell script (instead of input for module command)') + find_parser.add_argument( + '-p', '--prefix', dest='prefix', + help='Prepend to module names when issuing module load commands') + find_parser.add_argument('spec', nargs='+', help='spec to find a module file for.') @@ -66,6 +66,9 @@ def module_find(mtype, flags, spec_array): matches any. If it does, check whether there is a module file of type there, and print out the name that the user should type to use that package's module. + prefix: + Prepend this to module names when issuing "module load" commands. + Some systems seem to need it. """ # -------------------------------------- @@ -88,7 +91,8 @@ def module_find(mtype, flags, spec_array): # -------------------------------------- if mtype not in module_types: - tty.die("Invalid module type: '%s'. Options are %s" % (mtype, comma_or(module_types))) + tty.die("Invalid module type: '%s'. Options are %s" % + (mtype, comma_or(module_types))) raw_specs = spack.cmd.parse_specs(spec_array) modules = set() # Modules we will load @@ -123,10 +127,10 @@ def module_find(mtype, flags, spec_array): module_cmd = {'tcl' : 'module load', 'dotkit' : 'dotkit use'}[mtype] for spec,mod in modules_unique: if flags.shell: - print '# %s' % spec.format() - print '%s %s' % (module_cmd, mod.use_name) + print('# %s' % spec.format()) + print('%s %s%s' % (module_cmd, flags.prefix, mod.use_name)) else: - print mod.use_name + print(mod.use_name) def module_refresh(): """Regenerate all module files for installed packages known to @@ -139,11 +143,9 @@ def module_refresh(): shutil.rmtree(cls.path, ignore_errors=False) mkdirp(cls.path) for spec in specs: - tty.debug(" Writing file for %s" % spec) cls(spec).write() - def module(parser, args): if args.module_command == 'refresh': module_refresh() -- cgit v1.2.3-70-g09d2 From 3f4bf04dde0b28425f7de5642c7211799bda8264 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 22 Jun 2016 14:40:51 -0500 Subject: Fix self-check for hdf5@1.10.0-patch1 --- var/spack/repos/builtin/packages/hdf5/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index e46f432be5..74fc006fe9 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -164,7 +164,7 @@ int main(int argc, char **argv) { """ expected = """\ HDF5 version {version} {version} -""".format(version=str(spec.version)) +""".format(version=str(spec.version.up_to(3))) with open("check.c", 'w') as f: f.write(source) if '+mpi' in spec: -- cgit v1.2.3-70-g09d2 From d566510a400e1067b8662dfdb00d3d3ec7e43b2f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 22 Jun 2016 15:22:42 -0500 Subject: Flake8 and url_for_version fixes --- var/spack/repos/builtin/packages/hdf5/package.py | 27 +++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 74fc006fe9..51a5823aa5 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -70,7 +70,8 @@ class Hdf5(Package): raise RuntimeError(msg) if '+threadsafe' in spec and ('+cxx' in spec or '+fortran' in spec): - raise RuntimeError("cannot use variant +threadsafe with either +cxx or +fortran") + msg = 'cannot use variant +threadsafe with either +cxx or +fortran' + raise RuntimeError(msg) def install(self, spec, prefix): self.validate(spec) @@ -185,24 +186,30 @@ HDF5 version {version} {version} if not success: print "Produced output does not match expected output." print "Expected output:" - print '-'*80 + print '-' * 80 print expected - print '-'*80 + print '-' * 80 print "Produced output:" - print '-'*80 + print '-' * 80 print output - print '-'*80 + print '-' * 80 raise RuntimeError("HDF5 install check failed") shutil.rmtree(checkdir) def url_for_version(self, version): - v = str(version) + base_url = "http://www.hdfgroup.org/ftp/HDF5/releases" if version == Version("1.2.2"): - return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + ".tar.gz" + return "{0}/hdf5-{1}.tar.gz".format(base_url, version) + elif version < Version("1.6.6"): + return "{0}/hdf5-{1}/hdf5-{2}.tar.gz".format( + base_url, version.up_to(2), version) elif version < Version("1.7"): - return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + ".tar.gz" + return "{0}/hdf5-{1}/hdf5-{2}/src/hdf5-{2}.tar.gz".format( + base_url, version.up_to(2), version) elif version < Version("1.10"): - return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" + return "{0}/hdf5-{1}/src/hdf5-{1}.tar.gz".format( + base_url, version) else: - return "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-" + version.up_to(2) + "/hdf5-" + v + "/src/hdf5-" + v + ".tar.gz" + return "{0}/hdf5-{1}/hdf5-{2}/src/hdf5-{2}.tar.gz".format( + base_url, version.up_to(2), version) -- cgit v1.2.3-70-g09d2 From 27e9bc6d028e3ee8b4890c226594e25bcfc370eb Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 23 Jun 2016 00:03:23 -0700 Subject: Make sbang handle lua - use --! instead of #! for patched lua scripts. --- bin/sbang | 11 +++++++++++ lib/spack/spack/hooks/sbang.py | 7 ++++++- lib/spack/spack/test/sbang.py | 23 ++++++++++++++++++----- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/bin/sbang b/bin/sbang index f6b6d35e8a..1ea5f06592 100755 --- a/bin/sbang +++ b/bin/sbang @@ -79,6 +79,15 @@ # Obviously, for this to work, `sbang` needs to have a short enough # path that *it* will run without hitting OS limits. # +# For Lua, scripts the second line can't start with #!, as # is not +# the comment character in lua (even though lua ignores #! on the +# *first* line of a script). So, instrument a lua script like this, +# using -- instead of # on the second line: +# +# 1 #!/bin/bash /path/to/sbang +# 2 --!/long/path/to/lua with arguments +# 3 +# 4 print "success!" # # How it works # ----------------------------- @@ -95,6 +104,8 @@ lines=0 while read line && ((lines < 2)) ; do if [[ "$line" = '#!'* ]]; then interpreter="${line#\#!}" + elif [[ "$line" = '--!'*lua* ]]; then + interpreter="${line#--!}" fi lines=$((lines+1)) done < "$script" diff --git a/lib/spack/spack/hooks/sbang.py b/lib/spack/spack/hooks/sbang.py index cb0ad42b14..3a957c6e0e 100644 --- a/lib/spack/spack/hooks/sbang.py +++ b/lib/spack/spack/hooks/sbang.py @@ -23,6 +23,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os +import re import llnl.util.tty as tty @@ -57,11 +58,15 @@ def filter_shebang(path): if original.startswith(new_sbang_line): return + # Use --! instead of #! on second line for lua. + if re.search(r'^#!(/[^/]*)*lua\b', original): + original = re.sub(r'^#', '--', original) + with open(path, 'w') as new_file: new_file.write(new_sbang_line) new_file.write(original) - tty.warn("Patched overly long shebang in %s" % path) + tty.warn("Patched overlong shebang in %s" % path) def filter_shebangs_in_directory(directory): diff --git a/lib/spack/spack/test/sbang.py b/lib/spack/spack/test/sbang.py index 6aea1a68c7..ed54ff90b0 100644 --- a/lib/spack/spack/test/sbang.py +++ b/lib/spack/spack/test/sbang.py @@ -34,10 +34,12 @@ from llnl.util.filesystem import * from spack.hooks.sbang import filter_shebangs_in_directory import spack -short_line = "#!/this/is/short/bin/bash\n" -long_line = "#!/this/" + ('x' * 200) + "/is/long\n" -sbang_line = '#!/bin/bash %s/bin/sbang\n' % spack.spack_root -last_line = "last!\n" +short_line = "#!/this/is/short/bin/bash\n" +long_line = "#!/this/" + ('x' * 200) + "/is/long\n" +lua_line = "#!/this/" + ('x' * 200) + "/is/lua\n" +lua_line_patched = "--!/this/" + ('x' * 200) + "/is/lua\n" +sbang_line = '#!/bin/bash %s/bin/sbang\n' % spack.spack_root +last_line = "last!\n" class SbangTest(unittest.TestCase): def setUp(self): @@ -59,6 +61,12 @@ class SbangTest(unittest.TestCase): f.write(long_line) f.write(last_line) + # Lua script with long shebang + self.lua_shebang = os.path.join(self.tempdir, 'lua') + with open(self.lua_shebang, 'w') as f: + f.write(lua_line) + f.write(last_line) + # Script already using sbang. self.has_shebang = os.path.join(self.tempdir, 'shebang') with open(self.has_shebang, 'w') as f: @@ -71,7 +79,6 @@ class SbangTest(unittest.TestCase): shutil.rmtree(self.tempdir, ignore_errors=True) - def test_shebang_handling(self): filter_shebangs_in_directory(self.tempdir) @@ -86,6 +93,12 @@ class SbangTest(unittest.TestCase): self.assertEqual(f.readline(), long_line) self.assertEqual(f.readline(), last_line) + # Make sure this got patched. + with open(self.lua_shebang, 'r') as f: + self.assertEqual(f.readline(), sbang_line) + self.assertEqual(f.readline(), lua_line_patched) + self.assertEqual(f.readline(), last_line) + # Make sure this is untouched with open(self.has_shebang, 'r') as f: self.assertEqual(f.readline(), sbang_line) -- cgit v1.2.3-70-g09d2 From 8921bf455215ebdf180136586a4fb25db501c8ef Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 23 Jun 2016 10:08:40 -0500 Subject: Add MPI environment variables to packages --- var/spack/repos/builtin/packages/mpich/package.py | 5 +++++ var/spack/repos/builtin/packages/mvapich2/package.py | 5 +++++ var/spack/repos/builtin/packages/openmpi/package.py | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index ea1844aea0..90670ee517 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -50,6 +50,11 @@ class Mpich(Package): provides('mpi@:1.3', when='@1:') def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + spack_env.set('MPICC', join_path(self.prefix.bin, 'mpicc')) + spack_env.set('MPICXX', join_path(self.prefix.bin, 'mpic++')) + spack_env.set('MPIF77', join_path(self.prefix.bin, 'mpif77')) + spack_env.set('MPIF90', join_path(self.prefix.bin, 'mpif90')) + spack_env.set('MPICH_CC', spack_cc) spack_env.set('MPICH_CXX', spack_cxx) spack_env.set('MPICH_F77', spack_f77) diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 34bace10d6..da386445bb 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -191,6 +191,11 @@ class Mvapich2(Package): run_env.set('SLURM_MPI_TYPE', 'pmi2') def setup_dependent_environment(self, spack_env, run_env, extension_spec): + spack_env.set('MPICC', join_path(self.prefix.bin, 'mpicc')) + spack_env.set('MPICXX', join_path(self.prefix.bin, 'mpicxx')) + spack_env.set('MPIF77', join_path(self.prefix.bin, 'mpif77')) + spack_env.set('MPIF90', join_path(self.prefix.bin, 'mpif90')) + spack_env.set('MPICH_CC', spack_cc) spack_env.set('MPICH_CXX', spack_cxx) spack_env.set('MPICH_F77', spack_f77) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 588d862d96..15c8eefe96 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -109,6 +109,11 @@ class Openmpi(Package): return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version) # NOQA: ignore=E501 def setup_dependent_environment(self, spack_env, run_env, dependent_spec): + spack_env.set('MPICC', join_path(self.prefix.bin, 'mpicc')) + spack_env.set('MPICXX', join_path(self.prefix.bin, 'mpic++')) + spack_env.set('MPIF77', join_path(self.prefix.bin, 'mpif77')) + spack_env.set('MPIF90', join_path(self.prefix.bin, 'mpif90')) + spack_env.set('OMPI_CC', spack_cc) spack_env.set('OMPI_CXX', spack_cxx) spack_env.set('OMPI_FC', spack_fc) -- cgit v1.2.3-70-g09d2 From 71a297f12108fa0628ffe205ee40811d8b5a51a6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 23 Jun 2016 16:44:41 -0500 Subject: Fix backup logic in filter_file --- lib/spack/llnl/util/filesystem.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index d72e8bae92..e800c6717a 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -48,7 +48,7 @@ __all__ = ['set_install_permissions', 'install', 'install_tree', def filter_file(regex, repl, *filenames, **kwargs): """Like sed, but uses python regular expressions. - Filters every line of file through regex and replaces the file + Filters every line of each file through regex and replaces the file with a filtered version. Preserves mode of filtered files. As with re.sub, ``repl`` can be either a string or a callable. @@ -59,7 +59,7 @@ def filter_file(regex, repl, *filenames, **kwargs): Keyword Options: string[=False] If True, treat regex as a plain string. - backup[=True] Make a backup files suffixed with ~ + backup[=True] Make backup file(s) suffixed with ~ ignore_absent[=False] Ignore any files that don't exist. """ string = kwargs.get('string', False) @@ -80,26 +80,26 @@ def filter_file(regex, repl, *filenames, **kwargs): regex = re.escape(regex) for filename in filenames: - backup = filename + "~" + backup_filename = filename + "~" if ignore_absent and not os.path.exists(filename): continue - shutil.copy(filename, backup) + shutil.copy(filename, backup_filename) try: - with closing(open(backup)) as infile: + with closing(open(backup_filename)) as infile: with closing(open(filename, 'w')) as outfile: for line in infile: foo = re.sub(regex, repl, line) outfile.write(foo) except: # clean up the original file on failure. - shutil.move(backup, filename) + shutil.move(backup_filename, filename) raise finally: if not backup: - shutil.rmtree(backup, ignore_errors=True) + os.remove(backup_filename) class FileFilter(object): @@ -114,7 +114,7 @@ class FileFilter(object): def change_sed_delimiter(old_delim, new_delim, *filenames): """Find all sed search/replace commands and change the delimiter. e.g., if the file contains seds that look like 's///', you can - call change_sed_delimeter('/', '@', file) to change the + call change_sed_delimiter('/', '@', file) to change the delimiter to '@'. NOTE that this routine will fail if the delimiter is ' or ". @@ -179,7 +179,7 @@ def install(src, dest): """Manually install a file to a particular location.""" tty.debug("Installing %s to %s" % (src, dest)) - # Expand dsst to its eventual full path if it is a directory. + # Expand dest to its eventual full path if it is a directory. if os.path.isdir(dest): dest = join_path(dest, os.path.basename(src)) @@ -219,7 +219,7 @@ def mkdirp(*paths): if not os.path.exists(path): os.makedirs(path) elif not os.path.isdir(path): - raise OSError(errno.EEXIST, "File alredy exists", path) + raise OSError(errno.EEXIST, "File already exists", path) def force_remove(*paths): @@ -309,7 +309,7 @@ def traverse_tree(source_root, dest_root, rel_path='', **kwargs): Optional args: - order=[pre|post] -- Whether to do pre- or post-order traveral. + order=[pre|post] -- Whether to do pre- or post-order traversal. ignore= -- Predicate indicating which files to ignore. @@ -414,7 +414,7 @@ def fix_darwin_install_name(path): currently won't follow subfolders. Args: - path: directory in which .dylib files are alocated + path: directory in which .dylib files are located """ libs = glob.glob(join_path(path, "*.dylib")) @@ -438,7 +438,7 @@ def to_link_flags(library): A string of linking flags. """ dir = os.path.dirname(library) - # Asume libXYZ.suffix + # Assume libXYZ.suffix name = os.path.basename(library)[3:].split(".")[0] res = '-L%s -l%s' % (dir, name) return res -- cgit v1.2.3-70-g09d2 From 2c6c21a3bf6acb7345e46f55141ced829912dcfc Mon Sep 17 00:00:00 2001 From: mwilliammyers Date: Thu, 23 Jun 2016 15:54:20 -0600 Subject: Add new package py-protobuf --- .../repos/builtin/packages/py-protobuf/package.py | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-protobuf/package.py diff --git a/var/spack/repos/builtin/packages/py-protobuf/package.py b/var/spack/repos/builtin/packages/py-protobuf/package.py new file mode 100644 index 0000000000..da3a65c22e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-protobuf/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 PyProtobuf(Package): + """Protocol buffers are Google's language-neutral, platform-neutral, + extensible mechanism for serializing structured data - think XML, but + smaller, faster, and simpler. You define how you want your data to be + structured once, then you can use special generated source code to easily + write and read your structured data to and from a variety of data streams + and using a variety of languages.""" + + homepage = 'https://developers.google.com/protocol-buffers/' + url = 'https://pypi.python.org/packages/source/p/protobuf/protobuf-3.0.0b2.tar.gz' + + version('3.0.0b2', 'f0d3bd2394345a9af4a277cd0302ae83') + version('2.6.1', '6bf843912193f70073db7f22e2ea55e2') + version('2.5.0', '338813f3629d59e9579fed9035ecd457') + version('2.4.1', '72f5141d20ab1bcae6b1e00acfb1068a') + version('2.3.0', 'bb020c962f252fe81bfda8fb433bafdd') + + extends('python') + + depends_on('py-setuptools') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) -- cgit v1.2.3-70-g09d2 From 055f7f4ab61603dfd8634319a919b5a0daba06bc Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 24 Jun 2016 12:33:53 -0700 Subject: Add package_dir method to `package.py`. --- lib/spack/spack/package.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 98fd51b262..6a61b3d52b 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -397,6 +397,12 @@ class Package(object): if self.is_extension: spack.repo.get(self.extendee_spec)._check_extendable() + @property + def package_dir(self): + """Return the directory where the package.py file lives.""" + return os.path.dirname(self.module.__file__) + + @property def global_license_dir(self): """Returns the directory where global license files for all @@ -687,7 +693,7 @@ class Package(object): """Get the spack.compiler.Compiler object used to build this package""" if not self.spec.concrete: raise ValueError("Can only get a compiler for a concrete package.") - return spack.compilers.compiler_for_spec(self.spec.compiler, + return spack.compilers.compiler_for_spec(self.spec.compiler, self.spec.architecture) def url_version(self, version): -- cgit v1.2.3-70-g09d2 From ea88d9cfe9b13a5335b367d74a9008f60a5d9c53 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 24 Jun 2016 16:43:31 -0500 Subject: Make spack create automatically add dependencies for build system --- lib/spack/spack/cmd/create.py | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 8cbb367f86..71bd196598 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -95,9 +95,9 @@ class ${class_name}(Package): url = "${url}" ${versions} -${extends} - # FIXME: Add dependencies if this package requires them. - # depends_on("foo") + + # FIXME: Add additional dependencies if required. + ${dependencies} def install(self, spec, prefix): ${install} @@ -136,8 +136,17 @@ def setup_parser(subparser): class ConfigureGuesser(object): def __call__(self, stage): """Try to guess the type of build system used by the project. - Set the appropriate default installation instructions and any - necessary extensions for Python and R.""" + Set any necessary build dependencies or extensions. + Set the appropriate default installation instructions.""" + + # Build dependencies and extensions + dependenciesDict = { + 'autotools': "# depends_on('foo')", + 'cmake': "depends_on('cmake')", + 'scons': "depends_on('scons')", + 'python': "extends('python')", + 'R': "extends('R')" + } # Default installation instructions installDict = { @@ -214,16 +223,12 @@ class ConfigureGuesser(object): self.build_system = build_system + # Set any necessary build dependencies or extensions. + self.dependencies = dependenciesDict[build_system] + # Set the appropriate default installation instructions self.install = installDict[build_system] - # Set any necessary extensions for Python and R - extensions = '' - if build_system in ['python', 'R']: - extensions = "\n extends('{0}')\n".format(build_system) - - self.extends = extensions - def guess_name_and_version(url, args): # Try to deduce name and version of the new package from the URL @@ -361,7 +366,7 @@ def create(parser, args): class_name=mod_to_class(name), url=url, versions=make_version_calls(ver_hash_tuples), - extends=guesser.extends, + dependencies=guesser.dependencies, install=guesser.install)) # If everything checks out, go ahead and edit. -- cgit v1.2.3-70-g09d2 From acd90145539191595b51189195816668ba51b3bd Mon Sep 17 00:00:00 2001 From: alalazo Date: Sun, 26 Jun 2016 17:36:33 +0200 Subject: autotools : set Executable() in dependent modules --- .../repos/builtin/packages/autoconf/package.py | 28 ++++++++++++++++++---- .../repos/builtin/packages/automake/package.py | 20 ++++++++++++---- .../repos/builtin/packages/libtool/package.py | 23 +++++++++++++----- 3 files changed, 56 insertions(+), 15 deletions(-) diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py index d920855a2f..770ceed48b 100644 --- a/var/spack/repos/builtin/packages/autoconf/package.py +++ b/var/spack/repos/builtin/packages/autoconf/package.py @@ -24,18 +24,36 @@ ############################################################################## from spack import * + class Autoconf(Package): - """Autoconf -- system configuration part of autotools""" - homepage = "https://www.gnu.org/software/autoconf/" - url = "http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz" + """ + Autoconf -- system configuration part of autotools + """ + homepage = 'https://www.gnu.org/software/autoconf/' + url = 'http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz' version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b') version('2.62', '6c1f3b3734999035d77da5024aab4fbd') - depends_on("m4") + depends_on('m4') + + def _make_executable(self, name): + return Executable(join_path(self.prefix.bin, name)) + + def setup_dependent_package(self, module, dependent_spec): + # Autoconf is very likely to be a build dependency, + # so we add the tools it provides to the dependent module + executables = ['autoconf', + 'autoheader', + 'autom4te', + 'autoreconf', + 'autoscan', + 'autoupdate', + 'ifnames'] + for name in executables: + setattr(module, name, self._make_executable(name)) def install(self, spec, prefix): configure("--prefix=%s" % prefix) - make() make("install") diff --git a/var/spack/repos/builtin/packages/automake/package.py b/var/spack/repos/builtin/packages/automake/package.py index 331b364496..78b0a5b34f 100644 --- a/var/spack/repos/builtin/packages/automake/package.py +++ b/var/spack/repos/builtin/packages/automake/package.py @@ -24,10 +24,13 @@ ############################################################################## from spack import * + class Automake(Package): - """Automake -- make file builder part of autotools""" - homepage = "http://www.gnu.org/software/automake/" - url = "http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz" + """ + Automake -- make file builder part of autotools + """ + homepage = 'http://www.gnu.org/software/automake/' + url = 'http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz' version('1.15', '716946a105ca228ab545fc37a70df3a3') version('1.14.1', 'd052a3e884631b9c7892f2efce542d75') @@ -35,8 +38,17 @@ class Automake(Package): depends_on('autoconf') + def _make_executable(self, name): + return Executable(join_path(self.prefix.bin, name)) + + def setup_dependent_package(self, module, dependent_spec): + # Automake is very likely to be a build dependency, + # so we add the tools it provides to the dependent module + executables = ['aclocal', 'automake'] + for name in executables: + setattr(module, name, self._make_executable(name)) + def install(self, spec, prefix): configure("--prefix=%s" % prefix) - make() make("install") diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index 90e7b3b643..05db3c07c9 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -25,17 +25,28 @@ from spack import * class Libtool(Package): - """libtool -- library building part of autotools""" - homepage = "https://www.gnu.org/software/libtool/" - url = "http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz" + """ + libtool -- library building part of autotools + """ + homepage = 'https://www.gnu.org/software/libtool/' + url = 'http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz' - version('2.4.6' , 'addf44b646ddb4e3919805aa88fa7c5e') - version('2.4.2' , 'd2f3b7d4627e69e13514a40e72a24d50') + version('2.4.6', 'addf44b646ddb4e3919805aa88fa7c5e') + version('2.4.2', 'd2f3b7d4627e69e13514a40e72a24d50') depends_on('m4') + def _make_executable(self, name): + return Executable(join_path(self.prefix.bin, name)) + + def setup_dependent_package(self, module, dependent_spec): + # Automake is very likely to be a build dependency, + # so we add the tools it provides to the dependent module + executables = ['libtoolize', 'libtool'] + for name in executables: + setattr(module, name, self._make_executable(name)) + def install(self, spec, prefix): configure("--prefix=%s" % prefix) - make() make("install") -- cgit v1.2.3-70-g09d2 From e5b36583b524ed8da30b480f5e1720e0d039875c Mon Sep 17 00:00:00 2001 From: alalazo Date: Sun, 26 Jun 2016 17:36:53 +0200 Subject: swift : added package --- var/spack/repos/builtin/packages/swift/package.py | 79 +++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 var/spack/repos/builtin/packages/swift/package.py diff --git a/var/spack/repos/builtin/packages/swift/package.py b/var/spack/repos/builtin/packages/swift/package.py new file mode 100644 index 0000000000..6e34dc7e10 --- /dev/null +++ b/var/spack/repos/builtin/packages/swift/package.py @@ -0,0 +1,79 @@ +############################################################################## +# 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 * + +import spack.environment +import llnl.util.tty as tty + +# Needed to be able to download from the Durham gitlab repository +tty.warn('Setting "GIT_SSL_NO_VERIFY=1"') +tty.warn('This is needed to clone SWIFT repository') +gitlab_env = spack.environment.EnvironmentModifications() +gitlab_env.set('GIT_SSL_NO_VERIFY', 1) +gitlab_env.apply_modifications() + + +class Swift(Package): + """ + SPH With Inter-dependent Fine-grained Tasking (SWIFT) provides + astrophysicists with a state of the art framework to perform + particle based simulations. + """ + + homepage = 'http://icc.dur.ac.uk/swift/' + url = 'http://gitlab.cosma.dur.ac.uk/swift/swiftsim/repository/archive.tar.gz?ref=v0.3.0' + + version('0.3.0', git='https://gitlab.cosma.dur.ac.uk/swift/swiftsim.git', tag='v0.3.0') + + variant('mpi', default=True, description='Enable distributed memory parallelism') + + # Build dependencies + depends_on('autoconf') + depends_on('automake') + depends_on('libtool') + depends_on('m4') + # link-time / run-time dependencies + depends_on('mpi', when='+mpi') + depends_on('metis') + depends_on('hdf5~mpi', when='~mpi') + depends_on('hdf5+mpi', when='+mpi') + + def install(self, spec, prefix): + # Generate configure from configure.ac + # and Makefile.am + libtoolize() + aclocal() + autoconf() + autogen = Executable('./autogen.sh') + autogen() + + # Configure and install + options = ['--prefix=%s' % prefix, + '--enable-mpi' if '+mpi' in spec else '--disable-mpi', + '--enable-optimization'] + configure(*options) + make() + make("install") -- cgit v1.2.3-70-g09d2 From a2ba60f6a8adfc19e7d6ca621f0f9cab21afec61 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sun, 26 Jun 2016 17:38:48 +0200 Subject: qa : flake8 issues --- var/spack/repos/builtin/packages/libtool/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index 05db3c07c9..0e410a5061 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -24,6 +24,7 @@ ############################################################################## from spack import * + class Libtool(Package): """ libtool -- library building part of autotools -- cgit v1.2.3-70-g09d2 From 11863d2de3e764f56b595e33a1ac98e9539553c6 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sun, 26 Jun 2016 21:56:06 +0200 Subject: packages : moved adios and mxml into builtin repo --- var/spack/packages/adios/package.py | 38 ----------------------- var/spack/packages/mxml/package.py | 26 ---------------- var/spack/repos/builtin/packages/adios/package.py | 38 +++++++++++++++++++++++ var/spack/repos/builtin/packages/mxml/package.py | 26 ++++++++++++++++ 4 files changed, 64 insertions(+), 64 deletions(-) delete mode 100644 var/spack/packages/adios/package.py delete mode 100644 var/spack/packages/mxml/package.py create mode 100644 var/spack/repos/builtin/packages/adios/package.py create mode 100644 var/spack/repos/builtin/packages/mxml/package.py diff --git a/var/spack/packages/adios/package.py b/var/spack/packages/adios/package.py deleted file mode 100644 index 260dcbe851..0000000000 --- a/var/spack/packages/adios/package.py +++ /dev/null @@ -1,38 +0,0 @@ -import os - -from spack import * -class Adios(Package): - """The Adaptable IO System (ADIOS) provides a simple, - flexible way for scientists to describe the - data in their code that may need to be written, - read, or processed outside of the running simulation - """ - - homepage = "http://www.olcf.ornl.gov/center-projects/adios/" - url = "http://users.nccs.gov/~pnorbert/adios-1.9.0.tar.gz" - - version('1.9.0', 'dbf5cb10e32add2f04c9b4052b7ffa76') - - # Lots of setting up here for this package - # module swap PrgEnv-intel PrgEnv-$COMP - # module load cray-netcdf/4.3.3.1 - # module load cray-hdf5/1.8.14 - # module load python/2.7.10 - depends_on('hdf5') - depends_on('mxml') - - def install(self, spec, prefix): - configure_args = ["--prefix=%s" % prefix, - "--with-mxml=%s" % spec['mxml'].prefix, - "--with-hdf5=%s" % spec['hdf5'].prefix, - "--with-netcdf=%s" % os.environ["NETCDF_DIR"], - "--with-infiniband=no", - "MPICC=cc","MPICXX=CC","MPIFC=ftn", - "CPPFLAGS=-DMPICH_IGNORE_CXX_SEEK"] - - if spec.satisfies('%gcc'): - configure_args.extend(["CC=gcc", "CXX=g++", "FC=gfortran"]) - - configure(*configure_args) - make() - make("install") diff --git a/var/spack/packages/mxml/package.py b/var/spack/packages/mxml/package.py deleted file mode 100644 index f79251d312..0000000000 --- a/var/spack/packages/mxml/package.py +++ /dev/null @@ -1,26 +0,0 @@ -import os -from spack import * - -class Mxml(Package): - """Mini-XML is a small XML library that you can use to read and write XML - and XML-like data files in your application without requiring large - non-standard libraries - """ - - homepage = "http://www.msweet.org" - url = "http://www.msweet.org/files/project3/mxml-2.9.tar.gz" - - version('2.9', 'e21cad0f7aacd18f942aa0568a8dee19') - version('2.8', 'd85ee6d30de053581242c4a86e79a5d2') - version('2.7', '76f2ae49bf0f5745d5cb5d9507774dc9') - version('2.6', '68977789ae64985dddbd1a1a1652642e') - version('2.5', 'f706377fba630b39fa02fd63642b17e5') - - # module swap PrgEnv-intel PrgEnv-$COMP (Can use whatever compiler you want to use) - # Case statement to change CC and CXX flags - - def install(self, spec, prefix): - configure('--prefix=%s' % prefix, "--disable-shared", 'CFLAGS=-static') - make() - make("install") - diff --git a/var/spack/repos/builtin/packages/adios/package.py b/var/spack/repos/builtin/packages/adios/package.py new file mode 100644 index 0000000000..260dcbe851 --- /dev/null +++ b/var/spack/repos/builtin/packages/adios/package.py @@ -0,0 +1,38 @@ +import os + +from spack import * +class Adios(Package): + """The Adaptable IO System (ADIOS) provides a simple, + flexible way for scientists to describe the + data in their code that may need to be written, + read, or processed outside of the running simulation + """ + + homepage = "http://www.olcf.ornl.gov/center-projects/adios/" + url = "http://users.nccs.gov/~pnorbert/adios-1.9.0.tar.gz" + + version('1.9.0', 'dbf5cb10e32add2f04c9b4052b7ffa76') + + # Lots of setting up here for this package + # module swap PrgEnv-intel PrgEnv-$COMP + # module load cray-netcdf/4.3.3.1 + # module load cray-hdf5/1.8.14 + # module load python/2.7.10 + depends_on('hdf5') + depends_on('mxml') + + def install(self, spec, prefix): + configure_args = ["--prefix=%s" % prefix, + "--with-mxml=%s" % spec['mxml'].prefix, + "--with-hdf5=%s" % spec['hdf5'].prefix, + "--with-netcdf=%s" % os.environ["NETCDF_DIR"], + "--with-infiniband=no", + "MPICC=cc","MPICXX=CC","MPIFC=ftn", + "CPPFLAGS=-DMPICH_IGNORE_CXX_SEEK"] + + if spec.satisfies('%gcc'): + configure_args.extend(["CC=gcc", "CXX=g++", "FC=gfortran"]) + + configure(*configure_args) + make() + make("install") diff --git a/var/spack/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py new file mode 100644 index 0000000000..f79251d312 --- /dev/null +++ b/var/spack/repos/builtin/packages/mxml/package.py @@ -0,0 +1,26 @@ +import os +from spack import * + +class Mxml(Package): + """Mini-XML is a small XML library that you can use to read and write XML + and XML-like data files in your application without requiring large + non-standard libraries + """ + + homepage = "http://www.msweet.org" + url = "http://www.msweet.org/files/project3/mxml-2.9.tar.gz" + + version('2.9', 'e21cad0f7aacd18f942aa0568a8dee19') + version('2.8', 'd85ee6d30de053581242c4a86e79a5d2') + version('2.7', '76f2ae49bf0f5745d5cb5d9507774dc9') + version('2.6', '68977789ae64985dddbd1a1a1652642e') + version('2.5', 'f706377fba630b39fa02fd63642b17e5') + + # module swap PrgEnv-intel PrgEnv-$COMP (Can use whatever compiler you want to use) + # Case statement to change CC and CXX flags + + def install(self, spec, prefix): + configure('--prefix=%s' % prefix, "--disable-shared", 'CFLAGS=-static') + make() + make("install") + -- cgit v1.2.3-70-g09d2 From 9de05031889bca759f9d8b249d86930fe93ac1d0 Mon Sep 17 00:00:00 2001 From: alalazo Date: Sun, 26 Jun 2016 22:00:10 +0200 Subject: qa : flake8 issues --- var/spack/repos/builtin/packages/adios/package.py | 23 +++++++++++++---------- var/spack/repos/builtin/packages/mxml/package.py | 15 ++++++++------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/var/spack/repos/builtin/packages/adios/package.py b/var/spack/repos/builtin/packages/adios/package.py index 260dcbe851..9e0452ba6f 100644 --- a/var/spack/repos/builtin/packages/adios/package.py +++ b/var/spack/repos/builtin/packages/adios/package.py @@ -1,15 +1,18 @@ import os from spack import * + + class Adios(Package): - """The Adaptable IO System (ADIOS) provides a simple, - flexible way for scientists to describe the - data in their code that may need to be written, - read, or processed outside of the running simulation """ - + The Adaptable IO System (ADIOS) provides a simple, + flexible way for scientists to describe the + data in their code that may need to be written, + read, or processed outside of the running simulation + """ + homepage = "http://www.olcf.ornl.gov/center-projects/adios/" - url = "http://users.nccs.gov/~pnorbert/adios-1.9.0.tar.gz" + url = "http://users.nccs.gov/~pnorbert/adios-1.9.0.tar.gz" version('1.9.0', 'dbf5cb10e32add2f04c9b4052b7ffa76') @@ -22,13 +25,13 @@ class Adios(Package): depends_on('mxml') def install(self, spec, prefix): - configure_args = ["--prefix=%s" % prefix, - "--with-mxml=%s" % spec['mxml'].prefix, + configure_args = ["--prefix=%s" % prefix, + "--with-mxml=%s" % spec['mxml'].prefix, "--with-hdf5=%s" % spec['hdf5'].prefix, "--with-netcdf=%s" % os.environ["NETCDF_DIR"], "--with-infiniband=no", - "MPICC=cc","MPICXX=CC","MPIFC=ftn", - "CPPFLAGS=-DMPICH_IGNORE_CXX_SEEK"] + "MPICC=cc", "MPICXX=CC", "MPIFC=ftn", + "CPPFLAGS=-DMPICH_IGNORE_CXX_SEEK"] if spec.satisfies('%gcc'): configure_args.extend(["CC=gcc", "CXX=g++", "FC=gfortran"]) diff --git a/var/spack/repos/builtin/packages/mxml/package.py b/var/spack/repos/builtin/packages/mxml/package.py index f79251d312..254a5f1595 100644 --- a/var/spack/repos/builtin/packages/mxml/package.py +++ b/var/spack/repos/builtin/packages/mxml/package.py @@ -1,14 +1,15 @@ -import os from spack import * + class Mxml(Package): - """Mini-XML is a small XML library that you can use to read and write XML - and XML-like data files in your application without requiring large - non-standard libraries + """ + Mini-XML is a small XML library that you can use to read and write XML + and XML-like data files in your application without requiring large + non-standard libraries """ homepage = "http://www.msweet.org" - url = "http://www.msweet.org/files/project3/mxml-2.9.tar.gz" + url = "http://www.msweet.org/files/project3/mxml-2.9.tar.gz" version('2.9', 'e21cad0f7aacd18f942aa0568a8dee19') version('2.8', 'd85ee6d30de053581242c4a86e79a5d2') @@ -16,11 +17,11 @@ class Mxml(Package): version('2.6', '68977789ae64985dddbd1a1a1652642e') version('2.5', 'f706377fba630b39fa02fd63642b17e5') - # module swap PrgEnv-intel PrgEnv-$COMP (Can use whatever compiler you want to use) + # module swap PrgEnv-intel PrgEnv-$COMP + # (Can use whatever compiler you want to use) # Case statement to change CC and CXX flags def install(self, spec, prefix): configure('--prefix=%s' % prefix, "--disable-shared", 'CFLAGS=-static') make() make("install") - -- cgit v1.2.3-70-g09d2 From 7cf1313572b24917ff77018424d77991312e6f5f Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Mon, 27 Jun 2016 00:55:26 +0200 Subject: changes to use from_sourcing_file --- .../repos/builtin/packages/foam-extend/package.py | 42 ++++------------------ 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py index 9043896863..ca1a0e1710 100644 --- a/var/spack/repos/builtin/packages/foam-extend/package.py +++ b/var/spack/repos/builtin/packages/foam-extend/package.py @@ -39,20 +39,6 @@ class FoamExtend(Package): depends_on('paraview', when='+paraview') - def _get_env(self, command): - proc = subprocess.Popen(['bash', '-c', command], - stdout=subprocess.PIPE) - env = {} - for line in proc.stdout: - try: - key, val = line.split('=', 1) - env[key] = val.strip() - except: - # it may fail due to some bash functions that are on - # multiple lines - pass - return env - def set_arch(self): (sysname, nodename, release, version, machine) = os.uname() @@ -78,26 +64,11 @@ class FoamExtend(Package): return (arch, foam_compiler) - def get_openfoam_environment(self, env_openfoam): - env_before = self._get_env('env') - # This gets the environment set in case the etc/bashrc file is - # sourced - with working_dir(self.stage.source_path): - env_after = self._get_env('source etc/bashrc && env') - - # Removes some PATH to not add useless information in the - # environment later on - if 'PATH' in env_after: - del env_after['PATH'] - - if 'LD_LIBRARY_PATH' in env_after: - del env_after['LD_LIBRARY_PATH'] - - # Checks what was set in addition to the current environment, - # that should be the variables set by the bashrc - for key, value in env_after.iteritems(): - if key not in env_before or not value == env_before[key]: - env_openfoam.set(key, value) + def get_openfoam_environment(self): + return EnvironmentModifications.from_sourcing_files( + join_path(self.stage.source_path, + 'etc/bashrc') + ) def patch(self): # change names to match the package and not the one patch in @@ -242,8 +213,7 @@ class FoamExtend(Package): run_env.set('FOAM_INST_DIR', self.prefix) def install(self, spec, prefix): - env_openfoam = EnvironmentModifications() - self.get_openfoam_environment(env_openfoam) + env_openfoam = self.get_openfoam_environment() env_openfoam.apply_modifications() if self.parallel: -- cgit v1.2.3-70-g09d2 From f3accb111ef77e9e192305fb09797948cb984851 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Mon, 27 Jun 2016 01:23:14 +0200 Subject: correcting flake8 --- var/spack/repos/builtin/packages/foam-extend/package.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/foam-extend/package.py b/var/spack/repos/builtin/packages/foam-extend/package.py index ca1a0e1710..4479fc9bee 100644 --- a/var/spack/repos/builtin/packages/foam-extend/package.py +++ b/var/spack/repos/builtin/packages/foam-extend/package.py @@ -2,7 +2,6 @@ from spack import * from spack.environment import * import multiprocessing -import subprocess import os @@ -67,8 +66,7 @@ class FoamExtend(Package): def get_openfoam_environment(self): return EnvironmentModifications.from_sourcing_files( join_path(self.stage.source_path, - 'etc/bashrc') - ) + 'etc/bashrc')) def patch(self): # change names to match the package and not the one patch in -- cgit v1.2.3-70-g09d2 From 13fcb3c083073cbfa684afc84592d7bad251f267 Mon Sep 17 00:00:00 2001 From: alalazo Date: Mon, 27 Jun 2016 09:25:58 +0200 Subject: swift : renamed swiftsim --- var/spack/repos/builtin/packages/swift/package.py | 79 ---------------------- .../repos/builtin/packages/swiftsim/package.py | 79 ++++++++++++++++++++++ 2 files changed, 79 insertions(+), 79 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/swift/package.py create mode 100644 var/spack/repos/builtin/packages/swiftsim/package.py diff --git a/var/spack/repos/builtin/packages/swift/package.py b/var/spack/repos/builtin/packages/swift/package.py deleted file mode 100644 index 6e34dc7e10..0000000000 --- a/var/spack/repos/builtin/packages/swift/package.py +++ /dev/null @@ -1,79 +0,0 @@ -############################################################################## -# 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 * - -import spack.environment -import llnl.util.tty as tty - -# Needed to be able to download from the Durham gitlab repository -tty.warn('Setting "GIT_SSL_NO_VERIFY=1"') -tty.warn('This is needed to clone SWIFT repository') -gitlab_env = spack.environment.EnvironmentModifications() -gitlab_env.set('GIT_SSL_NO_VERIFY', 1) -gitlab_env.apply_modifications() - - -class Swift(Package): - """ - SPH With Inter-dependent Fine-grained Tasking (SWIFT) provides - astrophysicists with a state of the art framework to perform - particle based simulations. - """ - - homepage = 'http://icc.dur.ac.uk/swift/' - url = 'http://gitlab.cosma.dur.ac.uk/swift/swiftsim/repository/archive.tar.gz?ref=v0.3.0' - - version('0.3.0', git='https://gitlab.cosma.dur.ac.uk/swift/swiftsim.git', tag='v0.3.0') - - variant('mpi', default=True, description='Enable distributed memory parallelism') - - # Build dependencies - depends_on('autoconf') - depends_on('automake') - depends_on('libtool') - depends_on('m4') - # link-time / run-time dependencies - depends_on('mpi', when='+mpi') - depends_on('metis') - depends_on('hdf5~mpi', when='~mpi') - depends_on('hdf5+mpi', when='+mpi') - - def install(self, spec, prefix): - # Generate configure from configure.ac - # and Makefile.am - libtoolize() - aclocal() - autoconf() - autogen = Executable('./autogen.sh') - autogen() - - # Configure and install - options = ['--prefix=%s' % prefix, - '--enable-mpi' if '+mpi' in spec else '--disable-mpi', - '--enable-optimization'] - configure(*options) - make() - make("install") diff --git a/var/spack/repos/builtin/packages/swiftsim/package.py b/var/spack/repos/builtin/packages/swiftsim/package.py new file mode 100644 index 0000000000..e4607d9146 --- /dev/null +++ b/var/spack/repos/builtin/packages/swiftsim/package.py @@ -0,0 +1,79 @@ +############################################################################## +# 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 * + +import spack.environment +import llnl.util.tty as tty + +# Needed to be able to download from the Durham gitlab repository +tty.warn('Setting "GIT_SSL_NO_VERIFY=1"') +tty.warn('This is needed to clone SWIFT repository') +gitlab_env = spack.environment.EnvironmentModifications() +gitlab_env.set('GIT_SSL_NO_VERIFY', 1) +gitlab_env.apply_modifications() + + +class Swiftsim(Package): + """ + SPH With Inter-dependent Fine-grained Tasking (SWIFT) provides + astrophysicists with a state of the art framework to perform + particle based simulations. + """ + + homepage = 'http://icc.dur.ac.uk/swift/' + url = 'http://gitlab.cosma.dur.ac.uk/swift/swiftsim/repository/archive.tar.gz?ref=v0.3.0' + + version('0.3.0', git='https://gitlab.cosma.dur.ac.uk/swift/swiftsim.git', tag='v0.3.0') + + variant('mpi', default=True, description='Enable distributed memory parallelism') + + # Build dependencies + depends_on('autoconf') + depends_on('automake') + depends_on('libtool') + depends_on('m4') + # link-time / run-time dependencies + depends_on('mpi', when='+mpi') + depends_on('metis') + depends_on('hdf5~mpi', when='~mpi') + depends_on('hdf5+mpi', when='+mpi') + + def install(self, spec, prefix): + # Generate configure from configure.ac + # and Makefile.am + libtoolize() + aclocal() + autoconf() + autogen = Executable('./autogen.sh') + autogen() + + # Configure and install + options = ['--prefix=%s' % prefix, + '--enable-mpi' if '+mpi' in spec else '--disable-mpi', + '--enable-optimization'] + configure(*options) + make() + make("install") -- cgit v1.2.3-70-g09d2 From b4c36164b520bd962fbfefa4a363ac56de87b881 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 27 Jun 2016 00:55:16 -0700 Subject: Fixes #760: spack test leaves builtin.mock packages in DB - install_layout was redirected by the install test, but not the DB. - redirect the DB now, as well. --- lib/spack/spack/directory_layout.py | 2 +- lib/spack/spack/test/install.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py index 7e20365b0f..ee13e2dcbc 100644 --- a/lib/spack/spack/directory_layout.py +++ b/lib/spack/spack/directory_layout.py @@ -165,7 +165,7 @@ class DirectoryLayout(object): class YamlDirectoryLayout(DirectoryLayout): """Lays out installation directories like this:: / - / + / -/ --- diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py index cfe6ea9b27..390ec096a9 100644 --- a/lib/spack/spack/test/install.py +++ b/lib/spack/spack/test/install.py @@ -28,6 +28,7 @@ import tempfile import spack from llnl.util.filesystem import * from spack.directory_layout import YamlDirectoryLayout +from spack.database import Database from spack.fetch_strategy import URLFetchStrategy, FetchStrategyComposite from spack.test.mock_packages_test import * from spack.test.mock_repo import MockArchive @@ -49,7 +50,10 @@ class InstallTest(MockPackagesTest): # installed pkgs and mock packages. self.tmpdir = tempfile.mkdtemp() self.orig_layout = spack.install_layout + self.orig_db = spack.installed_db + spack.install_layout = YamlDirectoryLayout(self.tmpdir) + spack.installed_db = Database(self.tmpdir) def tearDown(self): @@ -61,6 +65,7 @@ class InstallTest(MockPackagesTest): # restore spack's layout. spack.install_layout = self.orig_layout + spack.installed_db = self.orig_db shutil.rmtree(self.tmpdir, ignore_errors=True) @@ -71,7 +76,7 @@ class InstallTest(MockPackagesTest): pkg.fetcher = fetcher - def ztest_install_and_uninstall(self): + def test_install_and_uninstall(self): # Get a basic concrete spec for the trivial install package. spec = Spec('trivial_install_test_package') spec.concretize() -- cgit v1.2.3-70-g09d2 From a15aee5d8e7bcdd37d9ee25fcf6ded449ef305d5 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 27 Jun 2016 01:22:03 -0700 Subject: Make MockPackagesTest use a different module location. - ensures anything tests create is blown away. --- lib/spack/spack/modules.py | 6 ++---- lib/spack/spack/test/mock_packages_test.py | 11 +++++++++-- lib/spack/spack/test/modules.py | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/modules.py b/lib/spack/spack/modules.py index fb58be6ce0..ce46047fa3 100644 --- a/lib/spack/spack/modules.py +++ b/lib/spack/spack/modules.py @@ -454,7 +454,6 @@ class EnvModule(object): class Dotkit(EnvModule): name = 'dotkit' - path = join_path(spack.share_path, "dotkit") environment_modifications_formats = { PrependPath: 'dk_alter {name} {value}\n', @@ -467,7 +466,7 @@ class Dotkit(EnvModule): @property def file_name(self): - return join_path(Dotkit.path, self.spec.architecture, + return join_path(spack.share_path, "dotkit", self.spec.architecture, '%s.dk' % self.use_name) @property @@ -495,7 +494,6 @@ class Dotkit(EnvModule): class TclModule(EnvModule): name = 'tcl' - path = join_path(spack.share_path, "modules") environment_modifications_formats = { PrependPath: 'prepend-path --delim "{delim}" {name} \"{value}\"\n', @@ -516,7 +514,7 @@ class TclModule(EnvModule): @property def file_name(self): - return join_path(TclModule.path, self.spec.architecture, self.use_name) + return join_path(spack.share_path, "modules", self.spec.architecture, self.use_name) @property def header(self): diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index a56bd8ebdc..0a7a342a82 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -56,7 +56,7 @@ compilers: fc: None modules: 'None' - compiler: - spec: gcc@4.5.0 + spec: gcc@4.5.0 operating_system: {0}{1} paths: cc: /path/to/gcc @@ -144,7 +144,7 @@ compilers: fc: /path/to/gfortran operating_system: elcapitan spec: gcc@4.5.0 - modules: 'None' + modules: 'None' - compiler: spec: clang@3.3 operating_system: elcapitan @@ -201,6 +201,10 @@ class MockPackagesTest(unittest.TestCase): spack.config.ConfigScope('site', self.mock_site_config) spack.config.ConfigScope('user', self.mock_user_config) + # Keep tests from interfering with the actual module path. + self.real_share_path = spack.share_path + spack.share_path = tempfile.mkdtemp() + # Store changes to the package's dependencies so we can # restore later. self.saved_deps = {} @@ -235,6 +239,9 @@ class MockPackagesTest(unittest.TestCase): pkg.dependencies.clear() pkg.dependencies.update(deps) + shutil.rmtree(spack.share_path, ignore_errors=True) + spack.share_path = self.real_share_path + def setUp(self): self.initmock() diff --git a/lib/spack/spack/test/modules.py b/lib/spack/spack/test/modules.py index 443e4d13a6..6d2e3705bd 100644 --- a/lib/spack/spack/test/modules.py +++ b/lib/spack/spack/test/modules.py @@ -148,7 +148,7 @@ configuration_suffix = { } -class HelperFunctionsTests(unittest.TestCase): +class HelperFunctionsTests(MockPackagesTest): def test_update_dictionary_extending_list(self): target = { -- cgit v1.2.3-70-g09d2 From 305d5698df11b5b34de50852e7c0db42319a4c08 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 27 Jun 2016 02:19:08 -0700 Subject: Rename spack.architecture.sys_type() to spack.architecture.platform() --- lib/spack/spack/architecture.py | 67 +++++++++++----------- lib/spack/spack/compilers/__init__.py | 8 +-- lib/spack/spack/concretize.py | 6 +- lib/spack/spack/multimethod.py | 2 +- lib/spack/spack/spec.py | 2 +- lib/spack/spack/test/architecture.py | 37 ++++++------ lib/spack/spack/test/concretize.py | 4 +- lib/spack/spack/test/mock_packages_test.py | 6 +- lib/spack/spack/test/multimethod.py | 2 +- lib/spack/spack/test/spec_dag.py | 2 +- lib/spack/spack/test/spec_semantics.py | 9 ++- .../builtin.mock/packages/multimethod/package.py | 10 +--- 12 files changed, 76 insertions(+), 79 deletions(-) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index cbac7b41d6..5bfd052f2a 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -91,16 +91,10 @@ from spack.util.multiproc import parmap import spack.error as serr -class InvalidSysTypeError(serr.SpackError): - def __init__(self, sys_type): - super(InvalidSysTypeError, self).__init__( - "Invalid sys_type value for Spack: " + sys_type) - - -class NoSysTypeError(serr.SpackError): +class NoPlatformError(serr.SpackError): def __init__(self): - super(NoSysTypeError, self).__init__( - "Could not determine sys_type for this machine.") + super(NoPlatformError, self).__init__( + "Could not determine a platform for this machine.") @key_ordering @@ -345,14 +339,17 @@ class OperatingSystem(object): @key_ordering class Arch(object): - "Architecture is now a class to help with setting attributes" - - def __init__(self, platform=None, platform_os=None, target=None): - self.platform = platform - if platform and platform_os: - platform_os = self.platform.operating_system(platform_os) - self.platform_os = platform_os - if platform and target: + """Architecture is now a class to help with setting attributes. + + TODO: refactor so that we don't need this class. + """ + + def __init__(self, plat=None, os=None, target=None): + self.platform = plat + if plat and os: + os = self.platform.operating_system(os) + self.platform_os = os + if plat and target: target = self.platform.target(target) self.target = target @@ -409,27 +406,27 @@ class Arch(object): return d -def _target_from_dict(target_name, platform=None): +def _target_from_dict(target_name, plat=None): """ Creates new instance of target and assigns all the attributes of that target from the dictionary """ - if not platform: - platform = sys_type() - return platform.target(target_name) + if not plat: + plat = platform() + return plat.target(target_name) -def _operating_system_from_dict(os_name, platform=None): +def _operating_system_from_dict(os_name, plat=None): """ uses platform's operating system method to grab the constructed operating systems that are valid on the platform. """ - if not platform: - platform = sys_type() + if not plat: + plat = platform() if isinstance(os_name, dict): name = os_name['name'] version = os_name['version'] - return platform.operating_system(name+version) + return plat.operating_system(name+version) else: - return platform.operating_system(os_name) + return plat.operating_system(os_name) def _platform_from_dict(platform_name): @@ -504,16 +501,18 @@ def all_platforms(): @memoized -def sys_type(): - """ Gather a list of all available subclasses of platforms. - Sorts the list according to their priority looking. Priority is - an arbitrarily set number. Detects platform either using uname or - a file path (/opt/cray...) +def platform(): + """Detects the platform for this machine. + + Gather a list of all available subclasses of platforms. + Sorts the list according to their priority looking. Priority is + an arbitrarily set number. Detects platform either using uname or + a file path (/opt/cray...) """ # Try to create a Platform object using the config file FIRST platform_list = all_platforms() platform_list.sort(key=lambda a: a.priority) - for platform in platform_list: - if platform.detect(): - return platform() + for platform_cls in platform_list: + if platform_cls.detect(): + return platform_cls() diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index a70d42982f..0ba94741da 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -93,7 +93,7 @@ def get_compiler_config(scope=None, init_config=True): for compiler in compilers: compilers_dict.append(_to_dict(compiler)) spack.config.update_config('compilers', compilers_dict, scope=scope) - + config = spack.config.get_config('compilers', scope=scope) # Update the configuration if there are currently no compilers # configured. Avoid updating automatically if there ARE site @@ -142,8 +142,8 @@ def remove_compiler_from_config(compiler_spec, scope=None): """ compiler_config = get_compiler_config(scope) config_length = len(compiler_config) - - filtered_compiler_config = [comp for comp in compiler_config + + filtered_compiler_config = [comp for comp in compiler_config if spack.spec.CompilerSpec(comp['compiler']['spec']) != compiler_spec] # Need a better way for this global _cache_config_file @@ -315,7 +315,7 @@ def all_os_classes(): """ classes = [] - platform = spack.architecture.sys_type() + platform = spack.architecture.platform() for os_class in platform.operating_sys.values(): classes.append(os_class) diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 1f37455c77..f792008c49 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -221,7 +221,7 @@ class DefaultConcretizer(object): if isinstance(spec.root.architecture.platform,spack.architecture.Platform): spec.architecture.platform = spec.root.architecture.platform else: - spec.architecture.platform = spack.architecture.sys_type() + spec.architecture.platform = spack.architecture.platform() return True #changed? def concretize_architecture(self, spec): @@ -334,7 +334,7 @@ class DefaultConcretizer(object): Default specs set at the compiler level will still be added later. """ - + if not spec.architecture.platform_os: #Although this usually means changed, this means awaiting other changes return True @@ -347,7 +347,7 @@ class DefaultConcretizer(object): and flag in p.compiler_flags)) if not flag in spec.compiler_flags or \ not (sorted(spec.compiler_flags[flag]) >= sorted(nearest.compiler_flags[flag])): - if flag in spec.compiler_flags: + if flag in spec.compiler_flags: spec.compiler_flags[flag] = list(set(spec.compiler_flags[flag]) | set(nearest.compiler_flags[flag])) else: diff --git a/lib/spack/spack/multimethod.py b/lib/spack/spack/multimethod.py index 170ef3cea2..0818f9092f 100644 --- a/lib/spack/spack/multimethod.py +++ b/lib/spack/spack/multimethod.py @@ -149,7 +149,7 @@ class when(object): @when('arch=chaos_5_x86_64_ib') 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. + # the package's platform() is chaos_5_x86_64_ib. @when('arch=bgqos_0") def install(self, prefix): diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 54219ec1b4..77bc57147d 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -2216,7 +2216,7 @@ class SpecParser(spack.parse.Parser): for spec in specs: for s in spec.traverse(): if s.architecture.os_string or s.architecture.target_string: - s._set_platform(spack.architecture.sys_type()) + s._set_platform(spack.architecture.platform()) return specs def parse_compiler(self, text): diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py index a6847c5744..ae3f08deed 100644 --- a/lib/spack/spack/test/architecture.py +++ b/lib/spack/spack/test/architecture.py @@ -5,7 +5,7 @@ import unittest import os import platform as py_platform import spack -from spack.architecture import * +import spack.architecture from spack.spec import * from spack.platforms.cray_xc import CrayXc from spack.platforms.linux import Linux @@ -19,14 +19,14 @@ class ArchitectureTest(MockPackagesTest): def setUp(self): super(ArchitectureTest, self).setUp() - self.platform = sys_type() + self.platform = spack.architecture.platform() def tearDown(self): super(ArchitectureTest, self).tearDown() def test_dict_functions_for_architecture(self): - arch = Arch() - arch.platform = spack.architecture.sys_type() + arch = spack.architecture.Arch() + arch.platform = spack.architecture.platform() arch.platform_os = arch.platform.operating_system('default_os') arch.target = arch.platform.target('default_target') @@ -36,18 +36,23 @@ class ArchitectureTest(MockPackagesTest): self.assertEqual(arch, new_arch) - self.assertTrue( isinstance(arch, Arch) ) - self.assertTrue( isinstance(arch.platform, Platform) ) - self.assertTrue( isinstance(arch.platform_os, OperatingSystem) ) - self.assertTrue( isinstance(arch.target, Target) ) - self.assertTrue( isinstance(new_arch, Arch) ) - self.assertTrue( isinstance(new_arch.platform, Platform) ) - self.assertTrue( isinstance(new_arch.platform_os, OperatingSystem) ) - self.assertTrue( isinstance(new_arch.target, Target) ) - - - def test_sys_type(self): - output_platform_class = sys_type() + self.assertTrue( isinstance(arch, spack.architecture.Arch) ) + self.assertTrue( isinstance(arch.platform, spack.architecture.Platform) ) + self.assertTrue( isinstance(arch.platform_os, + spack.architecture.OperatingSystem) ) + self.assertTrue( isinstance(arch.target, + spack.architecture.Target) ) + self.assertTrue( isinstance(new_arch, spack.architecture.Arch) ) + self.assertTrue( isinstance(new_arch.platform, + spack.architecture.Platform) ) + self.assertTrue( isinstance(new_arch.platform_os, + spack.architecture.OperatingSystem) ) + self.assertTrue( isinstance(new_arch.target, + spack.architecture.Target) ) + + + def test_platform(self): + output_platform_class = spack.architecture.platform() my_arch_class = None if os.path.exists('/opt/cray/craype'): my_platform_class = CrayXc() diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index ab201f406a..ce02b08bc3 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -257,8 +257,8 @@ class ConcretizeTest(MockPackagesTest): def test_external_package_module(self): # No tcl modules on darwin/linux machines # TODO: improved way to check for this. - if (spack.architecture.sys_type().name == 'darwin' or - spack.architecture.sys_type().name == 'linux'): + if (spack.architecture.platform().name == 'darwin' or + spack.architecture.platform().name == 'linux'): return spec = Spec('externalmodule') diff --git a/lib/spack/spack/test/mock_packages_test.py b/lib/spack/spack/test/mock_packages_test.py index a56bd8ebdc..e7cbbc37ae 100644 --- a/lib/spack/spack/test/mock_packages_test.py +++ b/lib/spack/spack/test/mock_packages_test.py @@ -34,7 +34,7 @@ from ordereddict_backport import OrderedDict from spack.repository import RepoPath from spack.spec import Spec -platform = spack.architecture.sys_type() +platform = spack.architecture.platform() linux_os_name = 'debian' linux_os_version = '6' @@ -56,7 +56,7 @@ compilers: fc: None modules: 'None' - compiler: - spec: gcc@4.5.0 + spec: gcc@4.5.0 operating_system: {0}{1} paths: cc: /path/to/gcc @@ -144,7 +144,7 @@ compilers: fc: /path/to/gfortran operating_system: elcapitan spec: gcc@4.5.0 - modules: 'None' + modules: 'None' - compiler: spec: clang@3.3 operating_system: elcapitan diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index 034e6b3923..c233ea4fd6 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -93,7 +93,7 @@ class MultiMethodTest(MockPackagesTest): def test_target_match(self): - platform = spack.architecture.sys_type() + platform = spack.architecture.platform() targets = platform.targets.values() for target in targets[:-1]: pkg = spack.repo.get('multimethod target='+target.name) diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index 712f07ac4d..c56c70b1fe 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -242,7 +242,7 @@ class SpecDagTest(MockPackagesTest): def test_unsatisfiable_architecture(self): - platform = spack.architecture.sys_type() + platform = spack.architecture.platform() self.set_pkg_dep('mpileaks', 'mpich platform=test target=be') spec = Spec('mpileaks ^mpich platform=test target=fe ^callpath ^dyninst ^libelf ^libdwarf') diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index 9876bfd5a8..b174e5305c 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -141,7 +141,6 @@ class SpecSematicsTest(MockPackagesTest): def test_satisfies_architecture(self): - platform = spack.architecture.sys_type() self.check_satisfies( 'foo platform=test target=frontend os=frontend', 'platform=test target=frontend os=frontend') @@ -396,7 +395,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf', 'debug=2') self.check_constrain_changed('libelf', 'cppflags="-O3"') - platform = spack.architecture.sys_type() + platform = spack.architecture.platform() self.check_constrain_changed('libelf', 'target='+platform.target('default_target').name) self.check_constrain_changed('libelf', 'os='+platform.operating_system('default_os').name) @@ -412,7 +411,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf debug=2', 'debug=2') self.check_constrain_not_changed('libelf cppflags="-O3"', 'cppflags="-O3"') - platform = spack.architecture.sys_type() + platform = spack.architecture.platform() default_target = platform.target('default_target').name self.check_constrain_not_changed('libelf target='+default_target, 'target='+default_target) @@ -425,7 +424,7 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_changed('libelf^foo', 'libelf^foo+debug') self.check_constrain_changed('libelf^foo', 'libelf^foo~debug') - platform = spack.architecture.sys_type() + platform = spack.architecture.platform() default_target = platform.target('default_target').name self.check_constrain_changed('libelf^foo', 'libelf^foo target='+default_target) @@ -439,6 +438,6 @@ class SpecSematicsTest(MockPackagesTest): self.check_constrain_not_changed('libelf^foo~debug', 'libelf^foo~debug') self.check_constrain_not_changed('libelf^foo cppflags="-O3"', 'libelf^foo cppflags="-O3"') - platform = spack.architecture.sys_type() + platform = spack.architecture.platform() default_target = platform.target('default_target').name self.check_constrain_not_changed('libelf^foo target='+default_target, 'libelf^foo target='+default_target) diff --git a/var/spack/repos/builtin.mock/packages/multimethod/package.py b/var/spack/repos/builtin.mock/packages/multimethod/package.py index 649afa5945..ca991632dd 100644 --- a/var/spack/repos/builtin.mock/packages/multimethod/package.py +++ b/var/spack/repos/builtin.mock/packages/multimethod/package.py @@ -106,17 +106,11 @@ class Multimethod(Package): # # Make sure we can switch methods on different target # -# for platform_name in ['cray_xc', 'darwin', 'linux']: -# file_path = join_path(spack.platform_path, platform_name) -# platform_mod = imp.load_source('spack.platforms', file_path + '.py') -# cls = getattr(platform_mod, mod_to_class(platform_name)) - -# platform = cls() - platform = spack.architecture.sys_type() + platform = spack.architecture.platform() targets = platform.targets.values() if len(targets) > 1: targets = targets[:-1] - + for target in targets: @when('target='+target.name) def different_by_target(self): -- cgit v1.2.3-70-g09d2 From 99c3ed56fae3b4a70a03a60aa645a282136a025d Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 27 Jun 2016 02:19:26 -0700 Subject: Add new sys_type method that prints out the *full* arch descriptor. --- lib/spack/spack/architecture.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 5bfd052f2a..a7cda2bf68 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -516,3 +516,20 @@ def platform(): for platform_cls in platform_list: if platform_cls.detect(): return platform_cls() + + +@memoized +def sys_type(): + """Print out the "default" platform-os-target tuple for this machine. + + On machines with only one target OS/target, prints out the + platform-os-target for the frontend. For machines with a frontend + and a backend, prints the default backend. + + TODO: replace with use of more explicit methods to get *all* the + backends, as client code should really be aware of cross-compiled + architectures. + + """ + arch = Arch(platform(), 'default_os', 'default_target') + return str(arch) -- cgit v1.2.3-70-g09d2 From 0faa6dd75344176a9a83c8e97b70995ece432470 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 24 Jun 2016 23:37:46 +0200 Subject: octave: make extendable and add a package --- .../builtin/packages/octave-splines/package.py | 44 ++++++++++++++++++++++ var/spack/repos/builtin/packages/octave/package.py | 15 ++++++++ 2 files changed, 59 insertions(+) create mode 100644 var/spack/repos/builtin/packages/octave-splines/package.py diff --git a/var/spack/repos/builtin/packages/octave-splines/package.py b/var/spack/repos/builtin/packages/octave-splines/package.py new file mode 100644 index 0000000000..623efb3b34 --- /dev/null +++ b/var/spack/repos/builtin/packages/octave-splines/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 OctaveSplines(Package): + """Additional spline functions.""" + + homepage = "http://octave.sourceforge.net/splines/index.html" + url = "http://downloads.sourceforge.net/octave/splines-1.3.1.tar.gz" + + version('1.3.1', 'f9665d780c37aa6a6e17d1f424c49bdeedb89d1192319a4e39c08784122d18f9') + + extends('octave@3.6.0:') + + def install(self, spec, prefix): + Octave('--quiet', + '--norc', + '--built-in-docstrings-file=/dev/null', + '--texi-macros-file=/dev/null', + '--eval', 'pkg prefix %s; pkg install %s' % + (prefix, self.stage.archive_file)) diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py index 72ff0ee6fc..568ffe1579 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -36,6 +36,8 @@ class Octave(Package): homepage = "https://www.gnu.org/software/octave/" url = "ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz" + extendable = True + version('4.0.2', 'c2a5cacc6e4c52f924739cdf22c2c687') version('4.0.0', 'a69f8320a4f20a8480c1b278b1adb799') @@ -212,3 +214,16 @@ class Octave(Package): make() make("install") + + # ======================================================================== + # Set up environment to make install easy for Octave extensions. + # ======================================================================== + + def setup_dependent_package(self, module, ext_spec): + """Called before Octave modules' install() methods. + + In most cases, extensions will only need to have one line: + Octave('--eval', 'pkg install %s' % self.stage.archive_file) + """ + # Octave extension builds can have a global Octave executable function + module.Octave = Executable(join_path(self.spec.prefix.bin, 'octave')) -- cgit v1.2.3-70-g09d2 From 798dabc8f2b740cb70563fa141beb0ce268ce09a Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 27 Jun 2016 09:01:53 -0500 Subject: Forgot the unknown key/value pair --- lib/spack/spack/cmd/create.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 71bd196598..f5f234d7a7 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -145,7 +145,8 @@ class ConfigureGuesser(object): 'cmake': "depends_on('cmake')", 'scons': "depends_on('scons')", 'python': "extends('python')", - 'R': "extends('R')" + 'R': "extends('R')", + 'unknown': "# depends_on('foo')" } # Default installation instructions -- cgit v1.2.3-70-g09d2 From 9026fb8e8aa9f19bff5d1e25c29a3bdb182972e5 Mon Sep 17 00:00:00 2001 From: Nicolas Richart Date: Mon, 27 Jun 2016 20:52:05 +0200 Subject: Corrections for PETSc 3.7 and detection of PETSC version to enable TAO --- var/spack/repos/builtin/packages/fenics/package.py | 3 + .../repos/builtin/packages/fenics/petsc-3.7.patch | 394 +++++++++++++++++++++ .../packages/fenics/petsc-version-detection.patch | 39 ++ 3 files changed, 436 insertions(+) create mode 100644 var/spack/repos/builtin/packages/fenics/petsc-3.7.patch create mode 100644 var/spack/repos/builtin/packages/fenics/petsc-version-detection.patch diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py index 0845237656..465ab651be 100644 --- a/var/spack/repos/builtin/packages/fenics/package.py +++ b/var/spack/repos/builtin/packages/fenics/package.py @@ -57,6 +57,9 @@ class Fenics(Package): # variant('slepc4py', default=True, description='Uses SLEPc4py') # variant('pastix', default=True, description='Compile with Pastix') + patch('petsc-3.7.patch', when='^petsc@3.7:') + patch('petsc-version-detection.patch', when='@:1.6.1') + extends('python') depends_on('py-numpy') diff --git a/var/spack/repos/builtin/packages/fenics/petsc-3.7.patch b/var/spack/repos/builtin/packages/fenics/petsc-3.7.patch new file mode 100644 index 0000000000..c1ba5c4da6 --- /dev/null +++ b/var/spack/repos/builtin/packages/fenics/petsc-3.7.patch @@ -0,0 +1,394 @@ +diff -Naur dolfin-1.6.0/dolfin/common/SubSystemsManager.cpp dolfin-1.6.0.new/dolfin/common/SubSystemsManager.cpp +--- dolfin-1.6.0/dolfin/common/SubSystemsManager.cpp 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/common/SubSystemsManager.cpp 2016-06-26 23:42:56.391929550 +0200 +@@ -179,7 +179,7 @@ + PetscInitialized(&is_initialized); + if (is_initialized) + { +- PetscOptionsInsert(&argc, &argv, PETSC_NULL); ++ PetscOptionsInsert(NULL, &argc, &argv, PETSC_NULL); + } + else + { +@@ -187,12 +187,12 @@ + PetscInitializeNoArguments(); + + // Set options to avoid common failures with some 3rd party solvers +- PetscOptionsSetValue("-mat_mumps_icntl_7", "0"); +- PetscOptionsSetValue("-mat_superlu_dist_colperm", "MMD_AT_PLUS_A"); ++ PetscOptionsSetValue(NULL, "-mat_mumps_icntl_7", "0"); ++ PetscOptionsSetValue(NULL, "-mat_superlu_dist_colperm", "MMD_AT_PLUS_A"); + + // Pass command line arguments to PETSc (will overwrite any + // default above) +- PetscOptionsInsert(&argc, &argv, PETSC_NULL); ++ PetscOptionsInsert(NULL, &argc, &argv, PETSC_NULL); + } + + // Set PETSc +diff -Naur dolfin-1.6.0/dolfin/la/PETScKrylovSolver.cpp dolfin-1.6.0.new/dolfin/la/PETScKrylovSolver.cpp +--- dolfin-1.6.0/dolfin/la/PETScKrylovSolver.cpp 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/la/PETScKrylovSolver.cpp 2016-06-26 23:33:02.418351380 +0200 +@@ -564,6 +564,11 @@ + return solve(x, b); + } + //----------------------------------------------------------------------------- ++PetscErrorCode PETScKrylovSolver::ksp_monitor_norm(KSP ksp, PetscInt n, PetscReal rnorm, void *vf) ++{ ++ KSPMonitorTrueResidualNorm(ksp, n, rnorm, static_cast(vf)); ++} ++//----------------------------------------------------------------------------- + void PETScKrylovSolver::set_petsc_ksp_options() + { + PetscErrorCode ierr; +@@ -585,7 +590,8 @@ + const bool monitor_convergence = parameters["monitor_convergence"]; + if (monitor_convergence) + { +- ierr = KSPMonitorSet(_ksp, KSPMonitorTrueResidualNorm, 0, 0); ++ PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &_vf); ++ ierr = KSPMonitorSet(_ksp, ksp_monitor_norm, _vf, 0); + if (ierr != 0) petsc_error(ierr, __FILE__, "KSPMonitorSet"); + } + +diff -Naur dolfin-1.6.0/dolfin/la/PETScKrylovSolver.h dolfin-1.6.0.new/dolfin/la/PETScKrylovSolver.h +--- dolfin-1.6.0/dolfin/la/PETScKrylovSolver.h 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/la/PETScKrylovSolver.h 2016-06-26 23:19:40.767042975 +0200 +@@ -179,6 +179,12 @@ + // PETSc solver pointer + KSP _ksp; + ++ // viewer for monitoring ++ PetscViewerAndFormat* _vf; ++ ++ // monitoring function ++ static PetscErrorCode ksp_monitor_norm(KSP ksp, PetscInt n, PetscReal rnorm, void *ctx); ++ + // DOLFIN-defined PETScUserPreconditioner + PETScUserPreconditioner* pc_dolfin; + +diff -Naur dolfin-1.6.0/dolfin/la/PETScLUSolver.cpp dolfin-1.6.0.new/dolfin/la/PETScLUSolver.cpp +--- dolfin-1.6.0/dolfin/la/PETScLUSolver.cpp 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/la/PETScLUSolver.cpp 2016-06-26 23:13:36.903732301 +0200 +@@ -246,14 +246,14 @@ + if (parameters["num_threads"].is_set()) + { + // Use number of threads specified for LU solver +- ierr = PetscOptionsSetValue("-mat_pastix_threadnbr", ++ ierr = PetscOptionsSetValue(NULL, "-mat_pastix_threadnbr", + parameters["num_threads"].value_str().c_str()); + if (ierr != 0) petsc_error(ierr, __FILE__, "PetscOptionsSetValue"); + } + else + { + // Use global number of threads +- ierr = PetscOptionsSetValue("-mat_pastix_threadnbr", ++ ierr = PetscOptionsSetValue(NULL, "-mat_pastix_threadnbr", + dolfin::parameters["num_threads"].value_str().c_str()); + if (ierr != 0) petsc_error(ierr, __FILE__, "PetscOptionsSetValue"); + } +diff -Naur dolfin-1.6.0/dolfin/la/PETScOptions.cpp dolfin-1.6.0.new/dolfin/la/PETScOptions.cpp +--- dolfin-1.6.0/dolfin/la/PETScOptions.cpp 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/la/PETScOptions.cpp 2016-06-26 23:37:58.613121118 +0200 +@@ -54,7 +54,7 @@ + { + SubSystemsManager::init_petsc(); + PetscErrorCode ierr; +- ierr = PetscOptionsClearValue(option.c_str()); ++ ierr = PetscOptionsClearValue(NULL, option.c_str()); + if (ierr != 0) + { + dolfin_error("PETScOptions.cpp", +diff -Naur dolfin-1.6.0/dolfin/la/PETScOptions.h dolfin-1.6.0.new/dolfin/la/PETScOptions.h +--- dolfin-1.6.0/dolfin/la/PETScOptions.h 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/la/PETScOptions.h 2016-06-26 23:37:54.352023709 +0200 +@@ -65,7 +65,7 @@ + + PetscErrorCode ierr; + std::string _option = "-" + option; +- ierr = PetscOptionsSetValue(_option.c_str(), ++ ierr = PetscOptionsSetValue(NULL, _option.c_str(), + boost::lexical_cast(value).c_str()); + if (ierr != 0) + { +diff -Naur dolfin-1.6.0/dolfin/la/SLEPcEigenSolver.cpp dolfin-1.6.0.new/dolfin/la/SLEPcEigenSolver.cpp +--- dolfin-1.6.0/dolfin/la/SLEPcEigenSolver.cpp 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/la/SLEPcEigenSolver.cpp 2016-06-26 23:35:25.930631132 +0200 +@@ -99,6 +99,19 @@ + solve(_matA->size(0)); + } + //----------------------------------------------------------------------------- ++PetscErrorCode SLEPcEigenSolver::eps_monitor(EPS eps, PetscInt its, PetscInt nconv, PetscScalar* eigr, ++ PetscScalar* eigi, PetscReal* errest, ++ PetscInt nest, void *vf) ++{ ++ EPSMonitorAll(eps, its, nconv, eigr, eigi, errest, nest, ++ static_cast(vf)); ++} ++//----------------------------------------------------------------------------- ++PetscErrorCode SLEPcEigenSolver::ksp_monitor(KSP ksp, PetscInt n, PetscReal rnorm, void *vf) ++{ ++ KSPMonitorDefault(ksp, n, rnorm, static_cast(vf)); ++} ++//----------------------------------------------------------------------------- + void SLEPcEigenSolver::solve(std::size_t n) + { + dolfin_assert(_matA); +@@ -139,10 +152,11 @@ + { + KSP ksp; + ST st; +- EPSMonitorSet(_eps, EPSMonitorAll, NULL, NULL); ++ PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &_vf); ++ EPSMonitorSet(_eps, eps_monitor, _vf, NULL); + EPSGetST(_eps, &st); + STGetKSP(st, &ksp); +- KSPMonitorSet(ksp, KSPMonitorDefault, NULL, NULL); ++ KSPMonitorSet(ksp, ksp_monitor, _vf, NULL); + EPSView(_eps, PETSC_VIEWER_STDOUT_SELF); + } + +diff -Naur dolfin-1.6.0/dolfin/la/SLEPcEigenSolver.h dolfin-1.6.0.new/dolfin/la/SLEPcEigenSolver.h +--- dolfin-1.6.0/dolfin/la/SLEPcEigenSolver.h 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/la/SLEPcEigenSolver.h 2016-06-26 23:36:08.784610612 +0200 +@@ -231,6 +231,11 @@ + // SLEPc solver pointer + EPS _eps; + ++ PetscViewerAndFormat* _vf; ++ static PetscErrorCode eps_monitor(EPS eps, int its, int nconv, PetscScalar *eigr, ++ PetscScalar *eigi, PetscReal* errest, ++ int nest, void *mctx); ++ static PetscErrorCode ksp_monitor(KSP ksp, PetscInt n, PetscReal rnorm, void *vf); + }; + + } +diff -Naur dolfin-1.6.0/dolfin/nls/PETScSNESSolver.cpp dolfin-1.6.0.new/dolfin/nls/PETScSNESSolver.cpp +--- dolfin-1.6.0/dolfin/nls/PETScSNESSolver.cpp 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/nls/PETScSNESSolver.cpp 2016-06-26 23:19:40.166029256 +0200 +@@ -195,6 +195,15 @@ + return this->solve(nonlinear_problem, x); + } + //----------------------------------------------------------------------------- ++PetscErrorCode ++PETScSNESSolver::snes_monitor(SNES snes, PetscInt its, ++ PetscReal fgnorm, void *vf) ++{ ++ PetscViewerAndFormat * _vf = static_cast(vf); ++ SNESMonitorDefault(snes, its, fgnorm, _vf); ++ return(0); ++} ++//----------------------------------------------------------------------------- + void + PETScSNESSolver::init(NonlinearProblem& nonlinear_problem, + GenericVector& x) +@@ -237,9 +246,11 @@ + } + + // Set some options from the parameters +- if (report) +- SNESMonitorSet(_snes, SNESMonitorDefault, PETSC_NULL, PETSC_NULL); +- ++ if (report) { ++ PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &_snes_ctx.vf); ++ SNESMonitorSet(_snes, PETScSNESSolver::snes_monitor, _snes_ctx.vf, PETSC_NULL); ++ } ++ + // Set the bounds, if any + set_bounds(x); + +@@ -293,8 +304,8 @@ + SNESGetLineSearch(_snes, &linesearch); + #endif + +- if (report) +- SNESLineSearchSetMonitor(linesearch, PETSC_TRUE); ++ // if (report) ++ // SNESLineSearchSetMonitor(linesearch, PETSC_TRUE); + const std::string line_search_type = std::string(parameters["line_search"]); + SNESLineSearchSetType(linesearch, line_search_type.c_str()); + +@@ -466,6 +477,24 @@ + } + #endif + //----------------------------------------------------------------------------- ++PetscErrorCode ++PETScSNESSolver::ksp_monitor(KSP ksp, PetscInt n, ++ PetscReal rnorm, void *vf) ++{ ++ PetscViewerAndFormat * _vf = static_cast(vf); ++ KSPMonitorDefault(ksp, n, rnorm, _vf); ++ return(0); ++} ++//----------------------------------------------------------------------------- ++PetscErrorCode ++PETScSNESSolver::ksp_monitor_norm(KSP ksp, PetscInt n, ++ PetscReal rnorm, void *vf) ++{ ++ PetscViewerAndFormat * _vf = static_cast(vf); ++ KSPMonitorTrueResidualNorm(ksp, n, rnorm, _vf); ++ return(0); ++} ++//----------------------------------------------------------------------------- + void PETScSNESSolver::set_linear_solver_parameters() + { + KSP ksp; +@@ -482,7 +511,7 @@ + PetscObjectGetComm((PetscObject)_snes, &comm); + + if (parameters["report"]) +- KSPMonitorSet(ksp, KSPMonitorDefault, PETSC_NULL, PETSC_NULL); ++ KSPMonitorSet(ksp, PETScSNESSolver::ksp_monitor, _snes_ctx.vf, PETSC_NULL); + + const std::string linear_solver = parameters["linear_solver"]; + const std::string preconditioner = parameters["preconditioner"]; +@@ -518,7 +547,7 @@ + KSPSetInitialGuessNonzero(ksp, PETSC_FALSE); + + if (krylov_parameters["monitor_convergence"]) +- KSPMonitorSet(ksp, KSPMonitorTrueResidualNorm, 0, 0); ++ KSPMonitorSet(ksp, PETScSNESSolver::ksp_monitor_norm, _snes_ctx.vf, 0); + + // Set tolerances + const int max_iters = krylov_parameters["maximum_iterations"]; +diff -Naur dolfin-1.6.0/dolfin/nls/PETScSNESSolver.h dolfin-1.6.0.new/dolfin/nls/PETScSNESSolver.h +--- dolfin-1.6.0/dolfin/nls/PETScSNESSolver.h 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/nls/PETScSNESSolver.h 2016-06-26 22:31:21.554129282 +0200 +@@ -24,6 +24,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -124,8 +125,15 @@ + Vec f_tmp; + const PETScVector* xl; + const PETScVector* xu; ++ PetscViewerAndFormat* vf; + }; + ++ ++ // monitoring functions ++ static PetscErrorCode snes_monitor(SNES snes, PetscInt its, PetscReal fgnorm, void* ctx); ++ static PetscErrorCode ksp_monitor(KSP ksp, PetscInt n, PetscReal rnorm, void *ctx); ++ static PetscErrorCode ksp_monitor_norm(KSP ksp, PetscInt n, PetscReal rnorm, void *ctx); ++ + // PETSc solver pointer + SNES _snes; + +diff -Naur dolfin-1.6.0/dolfin/nls/PETScTAOSolver.cpp dolfin-1.6.0.new/dolfin/nls/PETScTAOSolver.cpp +--- dolfin-1.6.0/dolfin/nls/PETScTAOSolver.cpp 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/nls/PETScTAOSolver.cpp 2016-06-27 19:14:47.367885081 +0200 +@@ -186,6 +186,15 @@ + init(optimisation_problem, x.down_cast(), lb, ub); + } + //----------------------------------------------------------------------------- ++PetscErrorCode ++PETScTAOSolver::ksp_monitor_norm(KSP ksp, PetscInt n, ++ PetscReal rnorm, void * vf) ++{ ++ PetscViewerAndFormat * _vf = static_cast(vf); ++ KSPMonitorTrueResidualNorm(ksp, n, rnorm, _vf); ++ return(0); ++} ++//----------------------------------------------------------------------------- + void PETScTAOSolver::init(OptimisationProblem& optimisation_problem, + PETScVector& x, + const PETScVector& lb, +@@ -365,9 +374,7 @@ + set_tao(parameters["method"]); + + // Set tolerances +- TaoSetTolerances(_tao, parameters["function_absolute_tol"], +- parameters["function_relative_tol"], +- parameters["gradient_absolute_tol"], ++ TaoSetTolerances(_tao, parameters["gradient_absolute_tol"], + parameters["gradient_relative_tol"], + parameters["gradient_t_tol"]); + +@@ -490,8 +497,10 @@ + KSPSetInitialGuessNonzero(ksp, PETSC_FALSE); + + // KSP monitor +- if (krylov_parameters["monitor_convergence"]) +- KSPMonitorSet(ksp, KSPMonitorTrueResidualNorm, 0, 0); ++ if (krylov_parameters["monitor_convergence"]) { ++ PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &vf); ++ KSPMonitorSet(ksp, ksp_monitor_norm, vf, 0); ++ } + + // Get integer tolerances (to take care of casting to PetscInt) + const int max_iter = krylov_parameters["maximum_iterations"]; +diff -Naur dolfin-1.6.0/dolfin/nls/PETScTAOSolver.h dolfin-1.6.0.new/dolfin/nls/PETScTAOSolver.h +--- dolfin-1.6.0/dolfin/nls/PETScTAOSolver.h 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/nls/PETScTAOSolver.h 2016-06-27 19:08:00.634361160 +0200 +@@ -146,6 +146,10 @@ + // TAO pointer + Tao _tao; + ++ // monitoring functions ++ PetscViewerAndFormat* vf; ++ static PetscErrorCode ksp_monitor_norm(KSP ksp, PetscInt n, PetscReal rnorm, void *ctx); ++ + // Update parameters when tao/ksp/pc_types are explictly given + void update_parameters(const std::string tao_type, + const std::string ksp_type, +diff -Naur dolfin-1.6.0/dolfin/nls/TAOLinearBoundSolver.cpp dolfin-1.6.0.new/dolfin/nls/TAOLinearBoundSolver.cpp +--- dolfin-1.6.0/dolfin/nls/TAOLinearBoundSolver.cpp 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/nls/TAOLinearBoundSolver.cpp 2016-06-27 19:17:10.390216576 +0200 +@@ -313,9 +313,7 @@ + dolfin_assert(_tao); + + // Set tolerances +- TaoSetTolerances(_tao, parameters["function_absolute_tol"], +- parameters["function_relative_tol"], +- parameters["gradient_absolute_tol"], ++ TaoSetTolerances(_tao, parameters["gradient_absolute_tol"], + parameters["gradient_relative_tol"], + parameters["gradient_t_tol"]); + +@@ -340,6 +338,15 @@ + set_solver(method); + } + //----------------------------------------------------------------------------- ++PetscErrorCode ++TAOLinearBoundSolver::ksp_monitor_norm(KSP ksp, PetscInt n, ++ PetscReal rnorm, void * vf) ++{ ++ PetscViewerAndFormat * _vf = static_cast(vf); ++ KSPMonitorTrueResidualNorm(ksp, n, rnorm, _vf); ++ return(0); ++} ++//----------------------------------------------------------------------------- + void TAOLinearBoundSolver::set_ksp_options() + { + dolfin_assert(_tao); +@@ -360,8 +367,10 @@ + else + KSPSetInitialGuessNonzero(ksp, PETSC_FALSE); + +- if (krylov_parameters["monitor_convergence"]) +- KSPMonitorSet(ksp, KSPMonitorTrueResidualNorm, 0, 0); ++ if (krylov_parameters["monitor_convergence"]) { ++ PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &vf); ++ KSPMonitorSet(ksp, ksp_monitor_norm, vf, 0); ++ } + + // Set tolerances + const int max_ksp_it = krylov_parameters["maximum_iterations"]; +diff -Naur dolfin-1.6.0/dolfin/nls/TAOLinearBoundSolver.h dolfin-1.6.0.new/dolfin/nls/TAOLinearBoundSolver.h +--- dolfin-1.6.0/dolfin/nls/TAOLinearBoundSolver.h 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0.new/dolfin/nls/TAOLinearBoundSolver.h 2016-06-27 19:08:09.157561005 +0200 +@@ -174,6 +174,10 @@ + // Tao solver pointer + Tao _tao; + ++ // monitoring functions ++ PetscViewerAndFormat* vf; ++ static PetscErrorCode ksp_monitor_norm(KSP ksp, PetscInt n, PetscReal rnorm, void *ctx); ++ + // Petsc preconditioner + std::shared_ptr preconditioner; + diff --git a/var/spack/repos/builtin/packages/fenics/petsc-version-detection.patch b/var/spack/repos/builtin/packages/fenics/petsc-version-detection.patch new file mode 100644 index 0000000000..1429cd7bc6 --- /dev/null +++ b/var/spack/repos/builtin/packages/fenics/petsc-version-detection.patch @@ -0,0 +1,39 @@ +--- dolfin-1.6.0.orig/cmake/modules/FindPETSc.cmake 2015-07-28 17:05:55.000000000 +0200 ++++ dolfin-1.6.0/cmake/modules/FindPETSc.cmake 2016-06-27 17:16:02.484402705 +0200 +@@ -207,13 +207,7 @@ + + endif() + +-# Build PETSc test program +-if (DOLFIN_SKIP_BUILD_TESTS) +- set(PETSC_TEST_RUNS TRUE) +- set(PETSC_VERSION "UNKNOWN") +- set(PETSC_VERSION_OK TRUE) +-elseif (FOUND_PETSC_CONF) +- ++if (FOUND_PETSC_CONF) + # Set flags for building test program + set(CMAKE_REQUIRED_INCLUDES ${PETSC_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES ${PETSC_LIBRARIES}) +@@ -271,7 +265,10 @@ + set(PETSC_VERSION_OK TRUE) + endif() + mark_as_advanced(PETSC_VERSION_OK) ++endif() + ++ # Build PETSc test program ++if (NOT DOLFIN_SKIP_BUILD_TESTS AND FOUND_PETSC_CONF) + # Run PETSc test program + set(PETSC_TEST_LIB_CPP + "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/petsc_test_lib.cpp") +@@ -359,7 +356,9 @@ + else() + message(STATUS "PETSc configured without Cusp support") + endif() +- ++else() ++ set(PETSC_TEST_RUNS TRUE) ++ + endif() + + # Check sizeof(PetscInt) -- cgit v1.2.3-70-g09d2 From 9bb918915f4c22578db39fa84f3001241f4cce60 Mon Sep 17 00:00:00 2001 From: mwilliammyers Date: Mon, 27 Jun 2016 15:19:13 -0600 Subject: Add package lrzip & its dependency lzo --- var/spack/repos/builtin/packages/lrzip/package.py | 61 +++++++++++++++++++++++ var/spack/repos/builtin/packages/lzo/package.py | 49 ++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 var/spack/repos/builtin/packages/lrzip/package.py create mode 100644 var/spack/repos/builtin/packages/lzo/package.py diff --git a/var/spack/repos/builtin/packages/lrzip/package.py b/var/spack/repos/builtin/packages/lrzip/package.py new file mode 100644 index 0000000000..42542acfdb --- /dev/null +++ b/var/spack/repos/builtin/packages/lrzip/package.py @@ -0,0 +1,61 @@ +############################################################################## +# 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 Lrzip(Package): + """A compression utility that excels at compressing large files + (usually > 10-50 MB). Larger files and/or more free RAM means that the + utility will be able to more effectively compress your files (ie: faster / + smaller size), especially if the filesize(s) exceed 100 MB. You can either + choose to optimise for speed (fast compression / decompression) or size, + but not both.""" + + homepage = 'http://lrzip.kolivas.org' + url = 'https://github.com/ckolivas/lrzip/archive/v0.630.tar.gz' + + version('master', git='https://github.com/ckolivas/lrzip.git') + version('0.630', '3ca7f1d1365aa105089d1fbfc6b0924a') + version('0.621', '1f07227b39ae81a98934411e8611e341') + version('0.616', 'd40bdb046d0807ef602e36b1e9782cc0') + version('0.615', 'f1c01e7f3de07f54d916b61c989dfaf2') + + # depends_on('coreutils') + depends_on('lzo') + depends_on('zlib') + depends_on('bzip2') + + def install(self, spec, prefix): + set_executable('./autogen.sh') + autogen = Executable('./autogen.sh') + + configure_args = [ + '--prefix={0}'.format(prefix), + '--disable-dependency-tracking' + ] + autogen(*configure_args) + + make() + make('install') diff --git a/var/spack/repos/builtin/packages/lzo/package.py b/var/spack/repos/builtin/packages/lzo/package.py new file mode 100644 index 0000000000..0961bbb58c --- /dev/null +++ b/var/spack/repos/builtin/packages/lzo/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 Lzo(Package): + """Real-time data compression library""" + + homepage = 'https://www.oberhumer.com/opensource/lzo/' + url = 'https://www.oberhumer.com/opensource/lzo/download/lzo-2.09.tar.gz' + + version('2.09', 'c7ffc9a103afe2d1bba0b015e7aa887f') + version('2.08', 'fcec64c26a0f4f4901468f360029678f') + version('2.07', '4011935e95171e78ad4894f7335c982a') + version('2.06', '95380bd4081f85ef08c5209f4107e9f8') + version('2.05', 'c67cda5fa191bab761c7cb06fe091e36') + + def install(self, spec, prefix): + configure_args = [ + '--prefix={0}'.format(prefix), + '--disable-dependency-tracking', + '--enable-shared' + ] + configure(*configure_args) + make() + make('check') + make('install') -- cgit v1.2.3-70-g09d2 From 06e38d2ca291e6da56c2a629142d925f4fbe3eca Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 8 May 2016 21:34:18 +0200 Subject: gmsh: various fixes (i) add new version (ii) add OCE, PETSc and SLEPc as dependencies (iii) fix Blas/Lapack configuration (iv) disable internal Metis which does not compile --- var/spack/repos/builtin/packages/gmsh/package.py | 61 ++++++++++++++++++++---- 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py index e425d460c2..3e22a10587 100644 --- a/var/spack/repos/builtin/packages/gmsh/package.py +++ b/var/spack/repos/builtin/packages/gmsh/package.py @@ -36,29 +36,37 @@ class Gmsh(Package): homepage = 'http://gmsh.info' url = 'http://gmsh.info/src/gmsh-2.11.0-source.tgz' + version('2.12.0', '7fbd2ec8071e79725266e72744d21e902d4fe6fa9e7c52340ad5f4be5c159d09') version('2.11.0', 'f15b6e7ac9ca649c9a74440e1259d0db') - # FIXME : Misses dependencies on gmm, PetsC, TetGen - - variant('shared', default=True, description='Enables the build of shared libraries') - variant('debug', default=False, description='Builds the library in debug mode') - variant('mpi', default=False, description='Builds MPI support for parser and solver') - variant('fltk', default=False, description='Enables the build of the FLTK GUI') - variant('hdf5', default=False, description='Enables HDF5 support') - variant('compression', default=True, description='Enables IO compression through zlib') + variant('shared', default=True, description='Enables the build of shared libraries') + variant('debug', default=False, description='Builds the library in debug mode') + variant('mpi', default=False, description='Builds MPI support for parser and solver') + variant('fltk', default=False, description='Enables the build of the FLTK GUI') + variant('hdf5', default=False, description='Enables HDF5 support') + variant('compression', default=True, description='Enables IO compression through zlib') + variant('oce', default=False, description='Build with OCE') + variant('petsc', default=False, description='Build with PETSc') + variant('slepc', default=False, description='Build with SLEPc (only when PETSc is enabled)') depends_on('blas') depends_on('lapack') + depends_on('cmake@2.8:') depends_on('gmp') - depends_on('mpi', when='+mpi') + depends_on('mpi', when='+mpi') depends_on('fltk', when='+fltk') # Assumes OpenGL with GLU is already provided by the system depends_on('hdf5', when='+hdf5') - depends_on('zlib', when='+compression') + depends_on('oce', when='+oce') + depends_on('petsc+mpi', when='+petsc+mpi') + depends_on('petsc', when='+petsc~mpi') + depends_on('slepc', when='+slepc+petsc') + depends_on('zlib', when='+compression') def install(self, spec, prefix): options = [] options.extend(std_cmake_args) + options.extend(['-DENABLE_NATIVE_FILE_CHOOSER=ON']) build_directory = join_path(self.stage.path, 'spack-build') source_directory = self.stage.source_path @@ -68,6 +76,39 @@ class Gmsh(Package): # Prevent GMsh from using its own strange directory structure on OSX options.append('-DENABLE_OS_SPECIFIC_INSTALL=OFF') + # Make sure GMSH picks up correct blas-lapack by providing linker flags: + options.append('-DBLAS_LAPACK_LIBRARIES=%s %s' % + (to_link_flags(spec['lapack'].lapack_shared_lib), + to_link_flags(spec['blas'].blas_shared_lib))) + + # Gmsh does not have an option to compile against external metis. + # Its own Metis, however, fails to build + options.append('-DENABLE_METIS=OFF') + + if '+fltk' in spec: + options.append('-DENABLE_FLTK=ON') + else: + options.append('-DENABLE_FLTK=OFF') + + if '+oce' in spec: + env['CASROOT'] = self.spec['oce'].prefix + options.extend(['-DENABLE_OCC=ON']) + else: + options.extend(['-DENABLE_OCC=OFF']) + + if '+petsc' in spec: + env['PETSC_DIR'] = self.spec['petsc'].prefix + options.extend(['-DENABLE_PETSC=ON']) + #env['PETSC_ARCH'] = "real" + else: + options.extend(['-DENABLE_PETSC=OFF']) + + if '+slepc' in spec: + env['SLEPC_DIR'] = self.spec['slepc'].prefix + options.extend(['-DENABLE_SLEPC=ON']) + else: + options.extend(['-DENABLE_SLEPC=OFF']) + if '+shared' in spec: options.extend(['-DENABLE_BUILD_SHARED:BOOL=ON', '-DENABLE_BUILD_DYNAMIC:BOOL=ON']) # Builds dynamic executable and installs shared library -- cgit v1.2.3-70-g09d2 From 51b0f53b33f8c73e550064dbf05472da908d12ee Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 28 Jun 2016 10:31:00 +0200 Subject: gmsh: flake8 fixes --- var/spack/repos/builtin/packages/gmsh/package.py | 27 ++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/gmsh/package.py b/var/spack/repos/builtin/packages/gmsh/package.py index 3e22a10587..0951b86d57 100644 --- a/var/spack/repos/builtin/packages/gmsh/package.py +++ b/var/spack/repos/builtin/packages/gmsh/package.py @@ -27,11 +27,13 @@ from spack import * class Gmsh(Package): """ - Gmsh is a free 3D finite element grid generator with a built-in CAD engine and post-processor. Its design goal is - to provide a fast, light and user-friendly meshing tool with parametric input and advanced visualization - capabilities. Gmsh is built around four modules: geometry, mesh, solver and post-processing. The specification of - any input to these modules is done either interactively using the graphical user interface or in ASCII text files - using Gmsh's own scripting language. + Gmsh is a free 3D finite element grid generator with a built-in CAD engine + and post-processor. Its design goal is to provide a fast, light and + user-friendly meshing tool with parametric input and advanced visualization + capabilities. Gmsh is built around four modules: geometry, mesh, solver and + post-processing. The specification of any input to these modules is done + either interactively using the graphical user interface or in ASCII text + files using Gmsh's own scripting language. """ homepage = 'http://gmsh.info' url = 'http://gmsh.info/src/gmsh-2.11.0-source.tgz' @@ -54,7 +56,8 @@ class Gmsh(Package): depends_on('cmake@2.8:') depends_on('gmp') depends_on('mpi', when='+mpi') - depends_on('fltk', when='+fltk') # Assumes OpenGL with GLU is already provided by the system + # Assumes OpenGL with GLU is already provided by the system: + depends_on('fltk', when='+fltk') depends_on('hdf5', when='+hdf5') depends_on('oce', when='+oce') depends_on('petsc+mpi', when='+petsc+mpi') @@ -63,9 +66,10 @@ class Gmsh(Package): depends_on('zlib', when='+compression') def install(self, spec, prefix): - options = [] options.extend(std_cmake_args) + + # Make sure native file dialogs are used options.extend(['-DENABLE_NATIVE_FILE_CHOOSER=ON']) build_directory = join_path(self.stage.path, 'spack-build') @@ -76,7 +80,7 @@ class Gmsh(Package): # Prevent GMsh from using its own strange directory structure on OSX options.append('-DENABLE_OS_SPECIFIC_INSTALL=OFF') - # Make sure GMSH picks up correct blas-lapack by providing linker flags: + # Make sure GMSH picks up correct BlasLapack by providing linker flags options.append('-DBLAS_LAPACK_LIBRARIES=%s %s' % (to_link_flags(spec['lapack'].lapack_shared_lib), to_link_flags(spec['blas'].blas_shared_lib))) @@ -99,7 +103,6 @@ class Gmsh(Package): if '+petsc' in spec: env['PETSC_DIR'] = self.spec['petsc'].prefix options.extend(['-DENABLE_PETSC=ON']) - #env['PETSC_ARCH'] = "real" else: options.extend(['-DENABLE_PETSC=OFF']) @@ -110,10 +113,12 @@ class Gmsh(Package): options.extend(['-DENABLE_SLEPC=OFF']) if '+shared' in spec: + # Builds dynamic executable and installs shared library options.extend(['-DENABLE_BUILD_SHARED:BOOL=ON', - '-DENABLE_BUILD_DYNAMIC:BOOL=ON']) # Builds dynamic executable and installs shared library + '-DENABLE_BUILD_DYNAMIC:BOOL=ON']) else: - options.append('-DENABLE_BUILD_LIB:BOOL=ON') # Builds and installs static library + # Builds and installs static library + options.append('-DENABLE_BUILD_LIB:BOOL=ON') if '+debug' in spec: options.append('-DCMAKE_BUILD_TYPE:STRING=Debug') -- cgit v1.2.3-70-g09d2 From c4c167c1ca9214573e7dba1e3d1a7e6d62b9f6b4 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 28 Jun 2016 11:25:45 +0200 Subject: octave: rename executable Octave to octave --- var/spack/repos/builtin/packages/octave-splines/package.py | 2 +- var/spack/repos/builtin/packages/octave/package.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/octave-splines/package.py b/var/spack/repos/builtin/packages/octave-splines/package.py index 623efb3b34..11c9cc5ba7 100644 --- a/var/spack/repos/builtin/packages/octave-splines/package.py +++ b/var/spack/repos/builtin/packages/octave-splines/package.py @@ -36,7 +36,7 @@ class OctaveSplines(Package): extends('octave@3.6.0:') def install(self, spec, prefix): - Octave('--quiet', + octave('--quiet', '--norc', '--built-in-docstrings-file=/dev/null', '--texi-macros-file=/dev/null', diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py index 568ffe1579..f97bfc7d12 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -223,7 +223,7 @@ class Octave(Package): """Called before Octave modules' install() methods. In most cases, extensions will only need to have one line: - Octave('--eval', 'pkg install %s' % self.stage.archive_file) + octave('--eval', 'pkg install %s' % self.stage.archive_file) """ # Octave extension builds can have a global Octave executable function - module.Octave = Executable(join_path(self.spec.prefix.bin, 'octave')) + module.octave = Executable(join_path(self.spec.prefix.bin, 'octave')) -- cgit v1.2.3-70-g09d2 From 48888b0f8efb59e55a5b265b59fc9484ad399b5d Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 28 Jun 2016 12:57:19 +0200 Subject: swift : setting environment variables in the right place --- var/spack/repos/builtin/packages/swiftsim/package.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/swiftsim/package.py b/var/spack/repos/builtin/packages/swiftsim/package.py index e4607d9146..cc0ff0e452 100644 --- a/var/spack/repos/builtin/packages/swiftsim/package.py +++ b/var/spack/repos/builtin/packages/swiftsim/package.py @@ -28,13 +28,6 @@ from spack import * import spack.environment import llnl.util.tty as tty -# Needed to be able to download from the Durham gitlab repository -tty.warn('Setting "GIT_SSL_NO_VERIFY=1"') -tty.warn('This is needed to clone SWIFT repository') -gitlab_env = spack.environment.EnvironmentModifications() -gitlab_env.set('GIT_SSL_NO_VERIFY', 1) -gitlab_env.apply_modifications() - class Swiftsim(Package): """ @@ -61,6 +54,12 @@ class Swiftsim(Package): depends_on('hdf5~mpi', when='~mpi') depends_on('hdf5+mpi', when='+mpi') + def setup_environment(self, spack_env, run_env): + # Needed to be able to download from the Durham gitlab repository + tty.warn('Setting "GIT_SSL_NO_VERIFY=1"') + tty.warn('This is needed to clone SWIFT repository') + spack_env.set('GIT_SSL_NO_VERIFY', 1) + def install(self, spec, prefix): # Generate configure from configure.ac # and Makefile.am -- cgit v1.2.3-70-g09d2 From 18612eca595e02cb5ed34e0df379b57f8ed700b6 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 28 Jun 2016 12:59:13 +0200 Subject: qa : fixed flake8 issues --- var/spack/repos/builtin/packages/swiftsim/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/swiftsim/package.py b/var/spack/repos/builtin/packages/swiftsim/package.py index cc0ff0e452..cc1834818e 100644 --- a/var/spack/repos/builtin/packages/swiftsim/package.py +++ b/var/spack/repos/builtin/packages/swiftsim/package.py @@ -25,7 +25,6 @@ from spack import * -import spack.environment import llnl.util.tty as tty -- cgit v1.2.3-70-g09d2 From 5cdd37959a7b2c0d9b18d508f15773209e5aba55 Mon Sep 17 00:00:00 2001 From: alalazo Date: Tue, 28 Jun 2016 18:03:28 +0200 Subject: swiftsim : substituted tag with corresponding commit --- var/spack/repos/builtin/packages/swiftsim/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/swiftsim/package.py b/var/spack/repos/builtin/packages/swiftsim/package.py index cc1834818e..42e8fb466a 100644 --- a/var/spack/repos/builtin/packages/swiftsim/package.py +++ b/var/spack/repos/builtin/packages/swiftsim/package.py @@ -38,7 +38,7 @@ class Swiftsim(Package): homepage = 'http://icc.dur.ac.uk/swift/' url = 'http://gitlab.cosma.dur.ac.uk/swift/swiftsim/repository/archive.tar.gz?ref=v0.3.0' - version('0.3.0', git='https://gitlab.cosma.dur.ac.uk/swift/swiftsim.git', tag='v0.3.0') + version('0.3.0', git='https://gitlab.cosma.dur.ac.uk/swift/swiftsim.git', commit='254cc1b563b2f88ddcf437b1f71da123bb9db733') variant('mpi', default=True, description='Enable distributed memory parallelism') -- cgit v1.2.3-70-g09d2 From 32c801bbf6ddcbec05a4b4b6b7a01ba1f4daf46b Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 28 Jun 2016 18:06:56 +0200 Subject: dealii: run more unit tests when building @dev --- var/spack/repos/builtin/packages/dealii/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 23ec74abed..068dbec10a 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -245,7 +245,7 @@ class Dealii(Package): # 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:'): + 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: @@ -257,7 +257,7 @@ class Dealii(Package): # the rest of the tests on step 40 only works for # dealii version 8.4.0 and after - if spec.satisfies('@8.4.0:'): + if spec.satisfies('@8.4.0:') or spec.satisfies('@dev'): print('=====================================') print('=== Step-40 Trilinos SuperluDist ====') print('=====================================') -- cgit v1.2.3-70-g09d2 From c99663211379389f416c5ba50a759555e2b1f9ec Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 29 Jun 2016 01:41:55 -0700 Subject: Add spack purge --cache to purge local archive cache. --- .gitignore | 1 + lib/spack/spack/cmd/purge.py | 26 ++++++++++++++++++++++++-- lib/spack/spack/fetch_strategy.py | 7 +++++-- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 643e5d9b03..040df3eafd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /var/spack/stage +/var/spack/cache *.pyc /opt/ *~ diff --git a/lib/spack/spack/cmd/purge.py b/lib/spack/spack/cmd/purge.py index 7b33ef7f69..f4e27a3969 100644 --- a/lib/spack/spack/cmd/purge.py +++ b/lib/spack/spack/cmd/purge.py @@ -22,9 +22,31 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## +import spack import spack.stage as stage -description = "Remove all temporary build files and downloaded archives" +description = "Remove temporary build files and/or downloaded archives" + + +def setup_parser(subparser): + subparser.add_argument( + '-s', '--stage', action='store_true', default=True, + help="Remove all temporary build stages (default).") + subparser.add_argument( + '-c', '--cache', action='store_true', help="Remove cached downloads.") + subparser.add_argument( + '-a', '--all', action='store_true', + help="Remove all of the above.") + def purge(parser, args): - stage.purge() + # Special case: no flags. + if not any((args.stage, args.cache, args.all)): + stage.purge() + return + + # handle other flags with fall through. + if args.stage or args.all: + stage.purge() + if args.cache or args.all: + spack.cache.destroy() diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 6f28ec34b2..69c04f7920 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -361,7 +361,7 @@ class CacheURLFetchStrategy(URLFetchStrategy): """The resource associated with a cache URL may be out of date.""" def __init__(self, *args, **kwargs): super(CacheURLFetchStrategy, self).__init__(*args, **kwargs) - + @_needs_stage def fetch(self): super(CacheURLFetchStrategy, self).fetch() @@ -853,11 +853,14 @@ class FsCache(object): dst = join_path(self.root, relativeDst) mkdirp(os.path.dirname(dst)) fetcher.archive(dst) - + def fetcher(self, targetPath, digest): url = "file://" + join_path(self.root, targetPath) return CacheURLFetchStrategy(url, digest) + def destroy(self): + shutil.rmtree(self.root, ignore_errors=True) + class FetchError(spack.error.SpackError): -- cgit v1.2.3-70-g09d2 From 06de8c56af31880fe8f304fb3b5a148c7c9f3646 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 29 Jun 2016 12:35:38 -0500 Subject: Fix missing code blocks in licensed software documentation --- lib/spack/docs/packaging_guide.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 54b886310a..433760f8c8 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -776,7 +776,7 @@ Spack will create a global license file located at file using the editor set in ``$EDITOR``, or vi if unset. It will look like this: -.. code-block:: +.. code-block:: sh # A license is required to use pgi. # @@ -807,7 +807,7 @@ You can add your license directly to this file, or tell FlexNet to use a license stored on a separate license server. Here is an example that points to a license server called licman1: -.. code-block:: +.. code-block:: sh SERVER licman1.mcs.anl.gov 00163eb7fba5 27200 USE_SERVER -- cgit v1.2.3-70-g09d2 From 2fcaa011ce2769fcecc027164d96e61d5b068599 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 29 Jun 2016 12:57:58 -0500 Subject: Add py-restview package --- .../repos/builtin/packages/py-docutils/package.py | 43 ++++++++++++++++++++++ .../repos/builtin/packages/py-restview/package.py | 41 +++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-docutils/package.py create mode 100644 var/spack/repos/builtin/packages/py-restview/package.py diff --git a/var/spack/repos/builtin/packages/py-docutils/package.py b/var/spack/repos/builtin/packages/py-docutils/package.py new file mode 100644 index 0000000000..3a938d918b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-docutils/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 PyDocutils(Package): + """Docutils is an open-source text processing system for processing + plaintext documentation into useful formats, such as HTML, LaTeX, + man-pages, open-document or XML. It includes reStructuredText, the + easy to read, easy to use, what-you-see-is-what-you-get plaintext + markup language.""" + + homepage = "http://docutils.sourceforge.net/" + url = "https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz" + + version('0.12', '4622263b62c5c771c03502afa3157768') + + extends('python') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) diff --git a/var/spack/repos/builtin/packages/py-restview/package.py b/var/spack/repos/builtin/packages/py-restview/package.py new file mode 100644 index 0000000000..91b1db993e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-restview/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 PyRestview(Package): + """A viewer for ReStructuredText documents that renders them on the fly.""" + + homepage = "https://mg.pov.lt/restview/" + url = "https://pypi.python.org/packages/source/r/restview/restview-2.6.1.tar.gz" + + version('2.6.1', 'ac8b70e15b8f1732d1733d674813666b') + + extends('python') + depends_on('py-docutils') + depends_on('py-pygments') + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix={0}'.format(prefix)) -- cgit v1.2.3-70-g09d2 From 37728afadae43ccf3b5aa47e314b61d517e26c3e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 30 Jun 2016 00:19:50 +0200 Subject: petsc: run a test --- var/spack/repos/builtin/packages/petsc/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 8dd1d8d2b9..b2fc80e084 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -148,6 +148,21 @@ class Petsc(Package): make('MAKE_NP=%s' % make_jobs, parallel=False) make("install") + # solve Poisson equation in 2D to make sure nothing is broken: + with working_dir('src/ksp/ksp/examples/tutorials'): + os.system('%s ex50.c -I%s -L%s -lpetsc -o ex50' % ( + self.spec['mpi'].mpicc, 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 + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): # set up PETSC_DIR for everyone using PETSc package spack_env.set('PETSC_DIR', self.prefix) -- cgit v1.2.3-70-g09d2 From cfd380d514606754c4ee3faceb4f00287fce0876 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Wed, 29 Jun 2016 18:23:40 -0700 Subject: added documentation for automatic caching of resources fetched during installs --- lib/spack/docs/developer_guide.rst | 9 +++++---- lib/spack/docs/mirrors.rst | 18 ++++++++++++++++++ lib/spack/docs/packaging_guide.rst | 20 ++++++++++++++++---- 3 files changed, 39 insertions(+), 8 deletions(-) diff --git a/lib/spack/docs/developer_guide.rst b/lib/spack/docs/developer_guide.rst index 0b618aa683..d28fe4b2a5 100644 --- a/lib/spack/docs/developer_guide.rst +++ b/lib/spack/docs/developer_guide.rst @@ -80,10 +80,11 @@ with a high level view of Spack's directory structure:: var/ spack/ <- build & stage directories - repos/ <- contains package repositories - builtin/ <- pkg repository that comes with Spack - repo.yaml <- descriptor for the builtin repository - packages/ <- directories under here contain packages + repos/ <- contains package repositories + builtin/ <- pkg repository that comes with Spack + repo.yaml <- descriptor for the builtin repository + packages/ <- directories under here contain packages + cache/ <- saves resources downloaded during installs opt/ spack/ <- packages are installed here diff --git a/lib/spack/docs/mirrors.rst b/lib/spack/docs/mirrors.rst index dad04d053b..583575a565 100644 --- a/lib/spack/docs/mirrors.rst +++ b/lib/spack/docs/mirrors.rst @@ -214,3 +214,21 @@ Adding a mirror really adds a line in ``~/.spack/mirrors.yaml``:: If you want to change the order in which mirrors are searched for packages, you can edit this file and reorder the sections. Spack will search the topmost mirror first and the bottom-most mirror last. + +.. _caching: + +Local Default Cache +---------------------------- + +Spack caches resources that are downloaded as part of installs. The cache is +a valid spack mirror: it uses the same directory structure and naming scheme +as other Spack mirrors (so it can be copied anywhere and referenced with a URL +like other mirrors). The mirror is maintained locally (within the Spack +installation directory) at :file:`var/spack/cache/`. It is always enabled (and +is always searched first when attempting to retrieve files for an installation) +but can be cleared with :ref:`purge `; the cache directory can also +be deleted manually without issue. + +Caching includes retrieved tarball archives and source control repositories, but +only resources with an associated digest or commit ID (e.g. a revision number +for SVN) will be cached. diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 54b886310a..2c3d139d29 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -703,6 +703,13 @@ Fetching a revision Subversion branches are handled as part of the directory structure, so you can check out a branch or tag by changing the ``url``. +Automatic caching of files fetched during installation +------------------------------------------------------ + +Spack maintains a cache (described :ref:`here `) which saves files +retrieved during package installations to avoid re-downloading in the case that +a package is installed with a different specification (but the same version) or +reinstalled on account of a change in the hashing scheme. .. _license: @@ -2618,11 +2625,16 @@ build process will start from scratch. ``spack purge`` ~~~~~~~~~~~~~~~~~ -Cleans up all of Spack's temporary files. Use this to recover disk -space if temporary files from interrupted or failed installs -accumulate in the staging area. This is equivalent to running ``spack -clean`` for every package you have fetched or staged. +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 +running ``spack clean`` for every package you have fetched or staged. +When called with ``--cache`` or ``--all`` this will clear all resources +:ref:`cached ` during installs. Keeping the stage directory on success ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3-70-g09d2 From 6f4b0e9bda8a7f1cdc16b5f9af6887aa4cb342d3 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 30 Jun 2016 08:22:01 +0200 Subject: petsc: fix flake8 and ~mpi case in tests --- var/spack/repos/builtin/packages/petsc/package.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index b2fc80e084..6a7bee9788 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -150,18 +150,19 @@ class Petsc(Package): # 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' % ( - self.spec['mpi'].mpicc, prefix.include, prefix.lib)) + cc, prefix.include, prefix.lib)) ex50 = Executable('./ex50') - ex50('-da_grid_x', '4', '-da_grid_y','4') + 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 + 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 + 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 + 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 -- cgit v1.2.3-70-g09d2