Commit graph

238 commits

Author SHA1 Message Date
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
Todd Gamblin
c2d1478a7c Status messages now show install and stage directories. 2014-04-25 14:48:42 -07:00
Todd Gamblin
3bbca9bd05 Better version wildcard handling, better spidering
- Allow version wildcards to match [_-.] instead of the exact separators
  the version was constructed with.
  - Handles the fact that boost versions are written both 1.55.0 and 1_55_0.

- Update spidering to handle parse errors and warn that Python < 2.7.3 has
  less robust HTML parsing abilities.
2014-04-25 14:41:37 -07:00
George Todd Gamblin
15589754ec Merge pull request #7 in SCALE/spack from bugfix/SPACK-10-fork-on-install to develop
# By Todd Gamblin
# Via Todd Gamblin
* commit 'b4fddad7eff448adf701fc9e88cf02cd6e582f15':
  Fix for SPACK-10: Spack now forks before install()
2014-04-24 21:40:27 -07:00
George Todd Gamblin
b2efea01d5 Merge pull request #6 in SCALE/spack from bugfix/SPACK-20-bin-directories-in-path to develop
# By Todd Gamblin
# Via Todd Gamblin
* commit '554ae9b3552a40ed253250bdebf548e4d8b01976':
  bugfix for SPACK-20: add dependency bin directories to PATH
2014-04-24 21:33:05 -07:00
Todd Gamblin
b4fddad7ef Fix for SPACK-10: Spack now forks before install()
- this allows each install to have full control over its environment,
  and over spack.

- build process can do whatever it wants and doesn't affect main Spack
  process.
2014-04-16 01:19:02 -07:00
Todd Gamblin
514f1acdb0 Default SYS_TYPE should just be an unknown architecture. 2014-04-16 00:55:05 -07:00
Todd Gamblin
554ae9b355 bugfix for SPACK-20: add dependency bin directories to PATH
- Consolidated build environment stuff from package.py into
  build_environment.py

- package.py calls build_environment.py functions just before calling
  install(), in do_install()

- Organization is better b/c SPACK_xxxx environment variables are now
  in build_environment, the only place they're used.  Were previously
  cluttering globals.py.
2014-04-15 22:45:34 -07:00
Gregory L. Lee
655ab60beb use installed property to check package existence 2014-04-14 15:22:03 -07:00
Gregory L. Lee
2aa859e0cf fixed installed dependents and uninstall error message 2014-04-14 15:22:03 -07:00
Todd Gamblin
50f74c117e Fix for SPACK-22: Consistent dependency hashing.
The dependency hash wasn't being generated in a consistent way: when
read from .spec file in the install directory, the spec DAG was not
normalized, but when generated on install, it was.  Thus the same
spec can have two possible hashes, which is obviously not good.

In this commit:
- Added a dep_hash function to spec, which should be used to get the
  dependency hash in all cases.  This function normalizes the spec
  before generating the hash.

- removed sha1 functions from Spec and DependencyHash.  The one on
  Spec is not needed and is confusing (it hashed the whole spec, not
  just hash the deps) and the one on DependencyHash wasn't guaranteed
  to be safe because it can't normalize its parent spec before
  hashing.

Hopefully this makes things consistent and easy.
2014-04-14 14:11:58 -07:00