Commit graph

348 commits

Author SHA1 Message Date
Todd Gamblin
26495ddce9 Reverse sort output versions in spack checksum 2014-09-29 23:27:40 -07:00
Todd Gamblin
e4613a60cf Fix for spack cd -i. 2014-09-29 22:43:40 -07:00
Todd Gamblin
a8ed1ec414 Minor argparse improvement. 2014-09-29 20:00:00 -07:00
Todd Gamblin
3bd52678be MPICH sets MPI compilers to use real compilers and not spack wrappers. 2014-09-27 21:36:42 -07:00
Todd Gamblin
5cc508393a gfortran version detection brokenon debian. 2014-09-27 16:19:56 -07:00
Todd Gamblin
d7984c7540 Update checksum to print new version syntax. 2014-09-27 15:33:27 -07:00
Todd Gamblin
608191bd8c Find custom list_urls depending on the archive URL (e.g. github releases) 2014-09-27 15:32:44 -07:00
Todd Gamblin
2de2d4bea7 Modify MPI installs to work without fortran. 2014-09-23 14:59:30 -07:00
Todd Gamblin
7380de8ee3 Change git URL to https URL in all docs. 2014-09-19 09:55:13 -07:00
Todd Gamblin
39acca4b43 Fix for bug in create introduced by LLVM merge. 2014-09-19 09:42:07 -07:00
Todd Gamblin
fa5594e13f Merge branch 'features/llvm' into develop
- merging parts of LLVM that can be built now.
- need to wait for standalone builds for some of the others.
2014-09-18 23:30:32 -07:00
Todd Gamblin
9165a000a3 Better C++11 support, remove non-standalone llvm-compiler-rt.
- LLVM non-standalone add-ons are difficult to build outside LLVM.
- May have to wait for future versions of LLVM to build some of these
2014-09-18 23:22:03 -07:00
Todd Gamblin
4a19fa793e Support for pkg-config. 2014-09-18 01:42:01 -07:00
Todd Gamblin
68274ee657 Add command to show packages added in particular git revisions.
spack pkg list    [rev]           list packages for revision.
spack pkg diff    [rev1] [rev2]   diff bt/w packages in rev1 and rev2
spack pkg added   [rev1] [rev2]   pkgs added since rev1
spack pkg removed [rev1] [rev2]   pkgs removed since rev2
2014-09-17 15:48:13 -07:00
Todd Gamblin
881fdb66ae Merge branch 'develop' into features/fileutils
Conflicts:
	lib/spack/spack/packages.py
2014-09-16 23:53:44 -07:00
Todd Gamblin
a4c8e945c7 Some fixups for Adam's callpath and adept-utils packages.
- Make spack packages RPATH *ALL* dependencies (i.e. the whole tree)
- prevents callpath link from finding wrong libelf -- always uses the one dyninst used.
2014-09-16 21:59:46 -07:00
David Beckingsale
42ca6c8bfc Add dependency prefixes to CMAKE_PREFIX_PATH 2014-08-22 14:45:44 -07:00
Todd Gamblin
d87a652582 Add spack cd and spack location commands.
- Better shell support for cd'ing into directories
- Fix some csh weirdness with nested aliases.
2014-08-22 11:00:19 -07:00
Todd Gamblin
eb5efed421 Merge branch 'features/postgresql' into develop
- add spack cd command.
- Fix bug in modules hook

Conflicts:
	lib/spack/spack/cmd/stage.py
	lib/spack/spack/hooks/dotkit.py
	share/spack/setup-env.bash
2014-08-21 22:59:39 -07:00
Todd Gamblin
5a9ef130ea Make EnvModule class use spec instead of package, fix using module of non-present package.
- Using the spec doesn't require the package to be there.
- Restore ability to use non-present packages (which was broken)
2014-08-20 11:43:03 -07:00
Todd Gamblin
8cc2298181 Merge branch 'features/python-2.6-compatibility' into develop
- Changed 'import argparse' to 'from external import argparse' in conflicts.

Conflicts:
	lib/spack/spack/cmd/dotkit.py
	lib/spack/spack/cmd/unuse.py
	lib/spack/spack/cmd/use.py
2014-08-20 09:30:40 -07:00
George Todd Gamblin
42e27d04c1 Merge pull request #19 in SCALE/spack from features/modules to develop
# By Todd Gamblin (4) and David Beckingsale (2)
# Via Todd Gamblin
* commit 'b601fd08caf21b5fc11e6998a5ebd20a04ac57ad':
  Bugfixes for csh environment modules.
  Bugfixes, more consolidation of modules code.
  Add csh/tcsh support for modules
  Consolidate most module code into spack.modules and spack.cmd.module
  Fixed up module support
  Added inital module support
2014-08-18 23:11:02 -07:00
Todd Gamblin
b601fd08ca Bugfixes for csh environment modules. 2014-08-17 01:41:32 -07:00
Todd Gamblin
22bec329c1 Bugfixes, more consolidation of modules code.
- specific module classes use __metaclass__ to register themselves.
- bugfixes in module writing.
2014-08-16 22:22:53 -07:00
Todd Gamblin
776560f8ce Add csh/tcsh support for modules
- csh scripting is a GIANT pain in the ass
- hopefully the thin script layer doesn't get much more complex.
2014-08-16 14:58:15 -07:00
Todd Gamblin
221cf6acb9 Consolidate most module code into spack.modules and spack.cmd.module
- One file with all the module classes (spack/modules.py)
  - Has an EnvModule superclass that does most of the work and consolidates common code
  - Subclasses have specializations for different module systems (TclModule, Dotkit)

- One command (spack module) for all the types of modules to use
  - the one command is used by the scripts, only need to maintain in one place
  - has some subcommands for different module types, but they're handled mostly generically.

- Consolidate zsh support into a single setup-env.sh script.
2014-08-16 14:53:57 -07:00
Todd Gamblin
5a3803de39 Add options to stage to make it just print out stage dir. 2014-08-11 22:47:23 -07:00
Todd Gamblin
0bba101ff9 Allow packages to add a dotkit() method and write custom parts of dotkits. 2014-08-11 22:47:22 -07:00
Todd Gamblin
113afe860e More robust symbol inclusion for 'from spack import *'
- avoid errors where some symbols aren't exported to packages.
- reduce the number of places each symbol needs to be mentioned in
  an __all__ list
2014-08-11 22:47:22 -07:00
Todd Gamblin
48d5281e3a Test cases pass; Spack supports Python 2.6! 2014-08-10 18:07:20 -07:00
Todd Gamblin
7082b0a59a cc supports Python 2.6 2014-08-10 18:07:20 -07:00
Todd Gamblin
696e80c62f Get rid of Python 2.7 dict.viewkeys() call. 2014-08-10 18:05:52 -07:00
Todd Gamblin
d95e7ecfe1 Remove dependency on Python2.7 OrderedDict, revise config parser 2014-08-10 17:56:36 -07:00
Todd Gamblin
d86a638099 Add Python 2.7 functools.total_ordering to external modules.
- removing dependence on 2.7
- added it to pyqver2 ads well
2014-08-10 17:54:39 -07:00
Todd Gamblin
ca328a6993 Fix minor warning about Exception.message being deprecated. 2014-08-10 17:52:46 -07:00
Todd Gamblin
a41a19d14d Change dict comprehensions to dict() constructors. 2014-08-10 16:04:41 -07:00
Todd Gamblin
5a5da817a1 Fix SPACK-27 & remove dependence on check_output
- subprocess.check_output is python 2.7 only
- Spack checks for existence of requested prefix, creates it if it does not exist.
2014-08-10 11:52:17 -07:00
Todd Gamblin
7714d08e2e Remvoe dependence on v2.7 argparse by including argparse. 2014-08-10 11:48:07 -07:00
Todd Gamblin
17895bd6fd Add a test case to ensure that Spack is v2.6 compliant. 2014-08-10 11:46:14 -07:00
Todd Gamblin
8ab793a3a6 Add external package with pyqver2 tool 2014-08-10 11:45:32 -07:00
Todd Gamblin
98797459f3 Minor tweaks after spec update.
- spack find -p works properly (get path from spec, not package)

- directory layout and PackageDB normalize things automatically unless
  they're unknown packages (need to do this for spack find -l)

- install test made robust to mock/main package conflicts
2014-08-09 17:41:56 -07:00
Todd Gamblin
5f073ae220 More spec improvements
- Spec.copy() does not create superfluous nodes and preserves DAG
  connections.

- Spec.normalize() doesn't create extra dependency nodes or throw out
  old ones like before.

- Added better test cases for above changes.

Minor things:
- Fixed bug waiting to happen in PackageDB.get()
  - instances was keyed by name, not by spec, so caching wasn't really
    working at all.
- removed unused PackageDB.compute_dependents function.
- Fixed PackageDB.graph_dependencies() so that spack graph works again.
2014-08-09 16:17:40 -07:00
Todd Gamblin
63f8af8078 Add postorder traversal to specs
- Spec.preorder_traversal() is now Spec.traverse().
- Caller can supply order='pre' or order='post'
2014-08-08 13:21:52 -07:00
Todd Gamblin
d5c625d87d Clean up specs, spec comparison, and spec hashing.
- Spec comparison is now less strict
  - compares based on sorted list of dependencies but not
    their structure
  - Makes comparison easy when a spec is not normalized.

- This makes the dep_hash consistent for specs read in from a
  directory layout.  - Can now reliably read in a spec for which the
  package has gone away, and still be able to delete its install.
  - easy switching between git branches

- Fixed latent bug in Spec.flat_dependencies() (was including root)

- added a test for the directory layout so that this code will get
  more exercise.
2014-08-08 13:21:48 -07:00
Todd Gamblin
c55041e9d4 Partial commit of more packages. 2014-08-04 07:54:22 -07:00
Todd Gamblin
cabfc374eb More descriptive error when package constructor fails.
- helps package_sanity test identify which package failed.
- encountered while upgrading versions in Adam's packages to the new format.
2014-08-04 07:54:05 -07:00
Adam Moody
a32816c644 cannot uninstall dtcmp because depends on dtcmp 2014-08-04 07:54:04 -07:00
David Beckingsale
57ddbd282a Fixed up module support 2014-08-04 07:53:40 -07:00
David Beckingsale
94c5c9667c Added inital module support 2014-08-04 07:53:40 -07:00
George Todd Gamblin
d13d32040c Merge pull request #20 in SCALE/spack from openss to develop
# By Matthew LeGendre (2) and Todd Gamblin (1)
# Via Todd Gamblin
* commit 'd7a3c7e555bfd93fbf93ec55608d7fc6aa8052f8':
  Fix up Matt's openss packages.
  Add sqlite to spack
  Add libmonitor to spack.  Still needs svn support for checkout
2014-08-04 07:51:12 -07:00
Todd Gamblin
d0b179962b find and uninstall work when installed package is no longer in spack.
- Make switching between git branches easier.
- Make future removal of packages easier.
2014-08-04 07:40:53 -07:00
Todd Gamblin
d7a3c7e555 Fix up Matt's openss packages. 2014-08-03 12:57:09 -07:00
Todd Gamblin
1ad474f1a9 Allow per-version URLs instead of one single URL per package. 2014-07-30 23:30:07 -07:00
Todd Gamblin
5829b44648 Fix Jeff Keasler's issues and add parmetis package. 2014-07-09 01:37:24 -07:00
Todd Gamblin
5f8724650a Fix for SPACK-35: Fortran not working properly
- Spack needed symlinks in env for fortran compilers.
- 'fc' is a bash bulitin, so can't use it for fortran compiler.
  - switched to 'f90' for this.

- mpich 3 builds with fortran now.
  - enabled shared libs in mpich package
2014-07-09 01:28:23 -07:00
Todd Gamblin
bd8838ca6d Fix typos.
Thanks Adam!
2014-07-08 02:41:29 -07:00
Todd Gamblin
830b9ab25c Fix for finding dependent packages 2014-07-08 02:36:40 -07:00
Todd Gamblin
10318a11dd Fix for dependent package detection. 2014-07-08 02:35:50 -07:00
Todd Gamblin
295ffd8c50 Adding dotkit support to TAU.
- New spack.hooks package
  - contains modules with pre and post install hooks

- New dotkit hook module
  - generates/removes dotkits on install/uninstall

- New spack use, spack unuse commands
  - use same syntax as install/uninstall

- New setup-env.bash script
  - Sets up path, dotkit support

- new spack dotkit command
  - used by script to parse specs, generate
    specs of installed pckages for dotkit file names
2014-07-08 01:58:20 -07:00
Todd Gamblin
0551638944 Add TAU package and routines to filter files, fix sed calls.
- TAU doesn't install to directories with '@' in the name.
- Need to fix up its scripts.
- routines to filter files as sed would, but using python regular expressions.
  - TAU package uses this.
2014-07-02 23:24:10 -07:00
Todd Gamblin
a7fd8be514 Some fixes for spack-python interpreter mode. 2014-07-02 23:24:10 -07:00
Todd Gamblin
4b960c131b Reordered site configuration docs. 2014-06-24 17:07:18 -07:00
Todd Gamblin
3b1e6d4bbc Updated docs. 2014-06-24 17:01:29 -07:00
Todd Gamblin
bf498991d3 Bugfix for mirror command 2014-06-24 17:00:56 -07:00
Todd Gamblin
3c3f272280 spack mirror now checksums fetched archives. 2014-06-24 11:53:44 -07:00
Todd Gamblin
b33412e03a New spack mirror command, configuration.
- Mirrors now appear in ~/.spackconfig, can be edited in that file.
- spack mirror command allows adding, listing, removing mirrors
	- Also still creates mirror directories.
2014-06-24 11:15:41 -07:00
Todd Gamblin
9f8ef85644 Add more output; don't re-add existing compilers 2014-06-24 07:17:30 -07:00
Todd Gamblin
8165393962 import & namespace fixes
- Fix Boost issue reported in SPACK-16
2014-06-23 09:37:53 -07:00
Todd Gamblin
8e066ebf2a Simplified compiler finding logic and caching. 2014-06-23 08:53:55 -07:00
Todd Gamblin
33a11f32fd Multi-compiler support feature-complete. Fix SPACK-3, SPACK-4, SPACK-12.
- Fast compiler finding in path and for other directories
  - first time spack runs, it searches path.
  - user can add more compilers with 'spack compiler add'

- Finds intel, gcc, clang, and pgi compilers with custom version args.

- Builds can plug in alternate compilers with ease (e.g. %intel@12.1)
2014-06-22 12:50:42 -07:00
Todd Gamblin
f1bc65c132 Executables can optionally ignore error output. 2014-06-22 12:50:35 -07:00
Todd Gamblin
ae31838193 Enable allow_no_value for config parser.
- Will be useful for, e.g., mirror lists.
- Previously didn't properly override regex used when no-value fields are allowed.
2014-06-22 12:50:35 -07:00
Todd Gamblin
c091c6d412 Make tests use mock compiler configuration.
- makes sure tests don't fail on systems that don't have some compilers (e.g. clang).
- more control over specific test cases for compilers.
2014-06-22 12:50:35 -07:00
Todd Gamblin
c256d5d1ac Set default editor to vi if EDITOR is not set. 2014-06-22 12:50:35 -07:00
Todd Gamblin
3303365d12 Add working_dir, Version back into package build namespace. 2014-06-22 12:50:34 -07:00
Todd Gamblin
3653cfe6f0 Compiler support now uses configuration files.
- no more need for compiler python files.

- Default compilers are found in user's environment and added
	to ~/.spackconfig automatically

- User can add new compilers by editing configuration file
2014-06-22 12:50:34 -07:00
Todd Gamblin
b6740cf1d1 Make debug and verbose output work properly. 2014-06-22 12:50:34 -07:00
Todd Gamblin
4608b674e5 Minor cleanup and bug fixes. 2014-06-22 12:50:34 -07:00
Todd Gamblin
c8414a8a40 Add support for configuration files. Fix SPACK-24. 2014-06-22 12:50:13 -07:00
Todd Gamblin
042a4730e3 Proper exiting for forked process in do_install() 2014-06-22 12:50:10 -07:00
Todd Gamblin
15f56ccee0 Move globals to spack's __init__.py 2014-06-22 12:50:10 -07:00
Todd Gamblin
e70ac872cb Move globals to spack's __init__.py 2014-06-22 12:50:09 -07:00
Todd Gamblin
f784757113 Initial ability to swap compilers.
Fixes SPACK-16 and forces compiler script to build using compiler wrappers.

- works with gcc and clang on laptop.
2014-06-22 12:49:34 -07:00
Todd Gamblin
ed6454fe78 Better satisfies: e.g., v4.7.3 now satisfies v4.7
- Changed how satisfies() is defined for the various version classes
- Can't just use overlaps() with version lists -- need to account for
  more and less specific versions.

If the version is more specific than the constriant (e.g., 4.7.3 is more
specific than 4.7), then it should satisfy the constraint, because if
a user asks for 4.7 they likely do not care about the minor version.  If they
do, they can specify it.  New Version.satisfies() takes this into account.
2014-06-22 12:33:49 -07:00
Todd Gamblin
285c5444ab Add CompilerSpec class and loading capability.
- spack.spec.Compiler is now spack.spec.CompilerSpec
- Can load a spack.compilers.* module for a particular spec
	- e.g. load Gcc module for gcc@4.7 spec.
2014-06-22 12:33:49 -07:00
Todd Gamblin
45baf73c34 Implemented compiler concretization policy. 2014-06-22 12:33:49 -07:00
Todd Gamblin
c6956bc8e7 Sorted out spack.compilers vs var/spack/compilers 2014-06-22 12:33:49 -07:00
Todd Gamblin
8d78e1142f Make Compiler constructor behave like Spec constructor. 2014-06-22 12:33:49 -07:00
Todd Gamblin
1fa20ec2ba partial checkin 2014-06-22 12:33:49 -07:00
George Todd Gamblin
719978a63d Merge pull request #10 in SCALE/spack from ~SHRADER3/spack:develop to develop
# By David Shrader
# Via David Shrader
* commit '1c1e7295f02b123310efe88b0a23a9cb95cce2f4':
  Fix bug in checksum reporting
2014-05-27 08:45:39 -07:00
Todd Gamblin
d99ee7e6ce Fix for SPACK-28: truncated output in docs. 2014-05-27 08:43:25 -07:00
Todd Gamblin
4665505936 Add index_by function to llnl.util.lang 2014-05-27 08:33:19 -07:00
David Shrader
1c1e7295f0 Fix bug in checksum reporting
The number of variables in the string printed for a checksum failure
was not correct. Now a useful error message is printed instead of a
stack trace and a TypeError.
2014-05-20 15:56:52 -06:00
Todd Gamblin
b32cbd6b13 Better version substitution and wildcard URLs.
- Previously, URLs like this wouldn't work with spack create:

	http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.13.tar.bz2

The '5' in hdf5 would interfere with version wildcard substitution beacuse
the wildcard regex would subsume it.

We now take the name of the package OUT of the URL before splitting it up
and adding version wildcards.  This prevents names with numbers from breaking
url.wildcard_version.

Also added a package sanity check test that ensures all builtin packages
work with wildcard_version.
2014-05-17 13:47:01 -07:00
Todd Gamblin
e0c7a63a5a Bugfix in error message. 2014-05-16 11:33:17 -07:00
Todd Gamblin
3607c26439 Allow widths in spec format strings. 2014-05-04 11:07:16 -07:00
George Todd Gamblin
c59e23c1f9 Merge pull request #8 in SCALE/spack from features/boost to develop
# By Todd Gamblin
# Via Todd Gamblin
* commit 'a0c91791c5ac995b80111a92c94d8fb760caa6e3':
  SPACK-25: Add package for boost.  Works on Linux currently.
  Better temp directory selection.
  Status messages now show install and stage directories.
  Better version wildcard handling, better spidering
2014-04-29 20:16:05 -07:00
Todd Gamblin
b813b40c4f Clean up commands and get rid of inconsistent --dirty options
- checksum  --dirty and create --dirty now changed to --keep-stage
- install   --dirty is now --keep-prefix
- uninstall --force now works properly

- commands use keyword args instead of package instance vars
  where possible (less weird package state)
2014-04-25 15:32:11 -07:00
Todd Gamblin
0c99d9ddc3 Fix SPACK-17: Remove install prefix if install() fails
- except clause now catches anything, not just exception

- sys.exit() changed to os._exit() to avoid interfering with unit tests
  and to avoid raising SystemExit exception when child processes quit.
2014-04-25 14:55:50 -07:00
Todd Gamblin
07ef48a036 Better temp directory selection.
- Prefer tempfile.gettempdir(), then LC dirs like /nfs/tmp2
2014-04-25 14:48:42 -07:00