summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2018-11-09env: move `env uninstall` into `spack uninstall`Todd Gamblin6-72/+191
- uninstall now: - restricts its spec search to the current environment - removes uninstalled specs from the current environment - reports envs that still need specs you're trying to uninstall - removed spack env uninstall command - updated tests
2018-11-09env: move `spack env stage` into `spack stage` commandTodd Gamblin4-27/+15
2018-11-09env: `spack env destroy` is now `spack env remove`Todd Gamblin2-20/+23
2018-11-09env: move add, remove, and concretize to top-level commandsTodd Gamblin7-104/+155
2018-11-09env: moved all `spack env install` functionality into `spack install`Todd Gamblin4-124/+110
- moved get_env from cmd/env.py to environment.py - spack install will now install into the active environment when no arguments are provided. It looks: 1. at the command line 2. for a local spack.yaml file 3. for any currently activated environment
2018-11-09env: remove all -e arguments on subcommandsTodd Gamblin2-18/+25
- add and remove now require an active environment - update tests to use with <ENV> instead of -e
2018-11-09env: currently activated environment cannot be destroyedTodd Gamblin3-22/+42
2018-11-09env: prevent any active environments from interfering with testsTodd Gamblin1-0/+22
- ensure that `SPACK_ENV` is unset before tests - ensure that `spack.environment.active` is deactivated if set
2018-11-09env: remove upgrade() and relocate() for nowTodd Gamblin3-140/+1
- these won't be in the first release of environments - they'll be added back in later
2018-11-09env: add test to ensure config precedence is high-to-lowTodd Gamblin2-3/+46
2018-11-09env: make install_status output more conciseTodd Gamblin3-14/+46
2018-11-09env: environments can be named or created in directoriesTodd Gamblin6-278/+451
- `spack env create <name>` works as before - `spack env create <path>` now works as well -- environments can be created in their own directories outside of Spack. - `spack install` will look for a `spack.yaml` file in the current directory, and will install the entire project from the environment - The Environment class has been refactored so that it does not depend on the internal Spack environment root; it just takes a path and operates on an environment in that path (so internal and external envs are handled the same) - The named environment interface has been hoisted to the spack.environment module level. - env.yaml is now spack.yaml in all places. It was easier to go with one name for these files than to try to handle logic for both env.yaml and spack.yaml.
2018-11-09env: `spack install SPEC` installs into currently active environment.Todd Gamblin4-9/+100
- install will now add (if necessary), concretize, and install a single spec into the active environment.
2018-11-09env: `spack env install` automatically concretizes specsTodd Gamblin2-6/+16
2018-11-09env: add spack env activate/deactivate and shell supportTodd Gamblin6-64/+200
- `spack env activate foo`: sets SPACK_ENV to the current active env name - `spack env deactivate`: unsets SPACK_ENV, deactivates the environment - added support to setup_env.sh and setup_env.csh - other env commands work properly with SPACK_ENV, as with an environment arguments. - command-line --env arguments take precedence over the active environment, if given.
2018-11-09env: bugfix: spack env list won't fail if var/spack/environments doesn't existTodd Gamblin1-1/+6
2018-11-09env: rework environmentsTodd Gamblin8-531/+1160
- env.yaml is now meaningful; it contains authoritative user specs - concretize diffs user specs in env.yaml and env.json to allow user to add/remove by simply updating env.yaml - comments are preserved when env.yaml is updated by add/unadd - env.yaml can contain configuration and include external configuration either from merged files or from config scopes - there is only one file format to remember (env.yaml, no separate init format) - env.json is now env.lock, and it stores the *last* user specs to be concretized, along with full provenance. - internal structure was modified slightly for readability - env.lock contains a _meta section with metadata, in case needed - added more tests for environments - env commands follow Spack conventions; no more `spack env foo install`
2018-11-09config: allow env.yaml to contain configuration in a single fileTodd Gamblin8-81/+271
- add `SingleFileScope` to configuration, which allows us to pull config sections from a single file. - update `env.yaml` and tests to ensure that the env.yaml schema works when pulling configurtion from the env file.
2018-11-09env: rename `spack env list` to `spack env status`Todd Gamblin1-5/+5
2018-11-09schemas: rework schemas so that they can be included from other filesTodd Gamblin11-400/+496
- Each schema now has a top-level `properties` and `schema` attribute. - The `properties` is a fragment that can be included in other jsonschemas, via Python, not via '$ref' - Th `schema` is a complete `jsonschema` with `title` and `$schema` properties.
2018-11-09bugfix: Avoid `KeyError` in compilers.yaml version checkTodd Gamblin1-2/+2
2018-11-09env: add -e as global spack argument, make `spack -e <env> spec` workTodd Gamblin6-40/+64
- add -E/--exact-env instead of --use-env-repo - simplify env handling in `spack find`
2018-11-09env: add `--env` argument to `spack location`Todd Gamblin2-11/+12
2018-11-09env: add --env argument to `spack find`Todd Gamblin5-9/+52
- add a common argument for `-e/--env` - modify the database to support queries on subsets of hashes - allow `spack find` to be filtered by hashes in an environment
2018-11-09bugfix: identical specs with different DAG hashes don't shadow each otherTodd Gamblin1-3/+5
- logic used in `spack find` was hiding duplicate installations if their hashes were different - short hash doesn't work in this scenario, since specs are structurally identical - ConstraintAction always works on a DB query, so use the DAG hash to ensure uniqueness
2018-11-09env: move main Environment class and logic to `spack.environment`Todd Gamblin5-601/+629
- `spack.environment` is now the home for most of the infrastructure around Spack environments - refactor `cmd/env.py` to use everything from spack.environment - refactor the cmd/env test to use pytest and fixtures
2018-11-09utils: merge spack.environment into spack.util.environmentTodd Gamblin6-634/+628
- `spack.util.environment` is the new home for routines that modify environment variables. - This is to make room for `spack.environment` to contain new routines for dealing with spack environments
2018-11-09env: refactor imports in cmd/env.py and testsTodd Gamblin2-16/+11
2018-11-09env: refactor subparsers in env.pyTodd Gamblin1-121/+116
- Instead of one method with all parsers, each subcommand gets two functions: `setup_<cmd>_parser()` and `environment_<cmd>()` - the `setup_parser()` and `env()` functions now generate the parser based on these and a list of subcommands. - it is now easier to associate the arguments with the subcommand.
2018-11-09env: add spack env command, along with env.yaml schema and testsPeter Josef Scheibel3-0/+987
Co-authored-by: Elizabeth Fischer <rpf2116@columbia.edu>
2018-11-09env: preserve command_line as the scope of highest precedencePeter Josef Scheibel2-10/+23
Co-authored-by: Elizabeth Fischer <rpf2116@columbia.edu>
2018-11-09env: refactor common argumentsElizabeth Fischer6-58/+108
2018-11-09specs: save/restore concrete & patches when exporting/importing SpecsElizabeth Fischer1-0/+20
2018-11-09specs: _concrete should never be cleared when copying SpecsPeter Josef Scheibel1-2/+2
2018-11-09specs: add convenience function for reading spec dependencies from node dictPeter Josef Scheibel1-0/+9
2018-11-09specs: allow writing full spec (including build deps) to dictPeter Josef Scheibel1-5/+13
2018-11-09env: rename 'spack env' command to 'spack build-env'Peter Josef Scheibel2-6/+6
2018-11-09env: renamed 'environment' testPeter Josef Scheibel1-0/+0
2018-11-06New repo for advanced packaging tutorial (#9711)Peter Scheibel1-35/+11
* modified tutorial packages * update hint in hdf5 tutorial file (typo for suggested argument) * add repo.yaml to tutorial repository * update tutorial docs to refer user to tutorial package repository * flake edits * recommend site scope vs. defaults * you don't specify the repo's name when adding a repo, just the path
2018-11-06Binary caching: remove symlinks, copy files instead (#9747)Peter Scheibel1-3/+5
* omit symlinks and create file copies when making a binary cache of a package * unrelated flake edits involving regexes that recent flake is now angry about
2018-11-06cdash: report clean results to CDash server (#9564)Zack Galbreath4-12/+38
* Record stdout for packages without errors Previously our reporter only stored stdout if something went wrong while installing a package. This prevented us from properly reporting on steps where everything went as expected. * More robustly report all phases to CDash Previously if a phase generated no output it would not be reported to CDash. For example, consider the following output: ==> Executing phase: 'configure' ==> Executing phase: 'build' This would not generate a report for the configure phase. Now it does. * Add test case for CDash reporting clean builds * Fix default directory for CDash reports The default 'cdash_report' directory name was getting overwritten by 'junit-report'. * Upload the build phase first to CDash Older versions of CDash expect Build.xml to be the first file uploaded for any given build. * Define cdash_phase before referring to it
2018-11-06Adapted the code of the non-daemonic pool to recent python versionsMassimiliano Culpo1-7/+19
fixes #9739 The non-daemonic pool relies heavily on implementation details of the multiprocessing package. In this commit we provide an implementation that fits recent python versions.
2018-11-02compilers: add arm compiler detection to SpackNick Forrington1-0/+73
- added arm.py with support for detecting `armclang` and `armflang` Co-authored-by: Srinath Vadlamani <srinath.vadlamani@arm.com>
2018-10-31Parse the ${NAMESPACE} format string in a spec's format method. (#9686)Tim Fuller1-0/+3
This allows installing software on a namespace basis by including ${NAMESPACE} in `install_path_scheme`. e.g., ``` cat ~/.spack/config.yaml config: install_path_scheme: "${ARCHITECTURE}/${NAMESPACE}/${COMPILERNAME}-${COMPILERVER}/${PACKAGE}-${VERSION}-${HASH}" ```
2018-10-31static_to_shared_library: separate options from option values (#9690)Satish Balay1-4/+4
The 'static_to_shared_library' function takes a compiler Executable, which is intended to be invoked with a list of arguments; the arguments must be separated from their values in the list, given the way that 'Executable.__call__' invokes the underlying executable. 'static_to_shared_library' was not doing this, which this commit fixes.
2018-10-30compilers: update clang fortran compiler wrapper selection (#9678)Todd Gamblin1-16/+44
Clang has support for using different fortran compilers with the Clang executable. Spack includes logic to select a compiler wrapper symlink which refers to the fortran executable (since some build systems depend on the name of the compiler, e.g. 'gfortran' or 'flang'). This selection was previously based on the architecture, and chose incorrectly in some situations (e.g. for clang/gfortran on Linux). This replaces architecture-based wrapper selection with a selection that is based on the name of the Fortran compiler executable.
2018-10-30tests: add test for FIXME boilerplate to package_sanity (#9285)Levi Baber1-0/+25
* package_sanity: add test_no_fixme * cleanup & better assert message
2018-10-26config: `spack config blame` now colors filenames in config output (#9656)Todd Gamblin1-1/+11
- it was hard to distinguish all-gray filenames - added rotating colors to `spack config blame`
2018-10-26docker: unite Dockerfiles; auto-deploy images to DockerHub (#9329)Omar Padron1-10/+7
* Unite Dockerfiles - add build/run/push scripts * update docker documentation * update .travis.yml * switch to using a preprocessor on Dockerfiles * skip building docker images on pull requests * update files with copyright info * tweak when travis builds for docker files are done
2018-10-25Fix autoload of direct dependencies for python (#9630)Massimiliano Culpo3-1/+26
fixes #9624 merge_config_rules was using `strict=False` to check if a spec satisfies a constraint, which loosely translates to "this spec has no conflict with the constraint, so I can potentially add it to the spec". We want instead `strict=True` which means "the spec satisfies the constraint right now".