summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2017-11-02view: fix some docstrings for argumentsOliver Breitwieser1-2/+2
2017-11-02filesystem_view: do not link external packagesBen Boeckel1-0/+10
2017-11-02filesystem_view: add a class to handle a view via a Yaml descriptionOliver Breitwieser1-0/+524
2017-11-02package: support removing dependencies when deactivatingOliver Breitwieser1-6/+14
2017-11-02conftest: mock out spack.store.extensions as wellBen Boeckel1-0/+4
2017-11-02views: support querying view layouts as wellOliver Breitwieser5-26/+56
This abstracts out the layout in use between the global installations and a specific view.
2017-11-02link_tree: support choosing the link functionOliver Breitwieser1-2/+2
This can be used to make hardlinks rather than symlinks.
2017-11-02link_tree: support ignoring conflictsOliver Breitwieser1-3/+16
2017-11-02directory_layout: add a YamlExtensionsLayout classOliver Breitwieser1-0/+25
This uses a view to query extensions.
2017-11-02link_tree: only remove matching files when unmergingOliver Breitwieser1-1/+6
2017-11-02directory_layout: factor out an ExtensionsLayout classOliver Breitwieser1-92/+118
2017-11-02extensions: add an installed_extensions_for methodBen Boeckel2-1/+11
2017-11-02database: rename `installed_extensions_for`Oliver Breitwieser3-3/+3
Views support activating packages, so rename the method because it will soon query what is activated versus what is installed.
2017-11-02package: support verbosity when activatingOliver Breitwieser1-8/+14
2017-11-02package: rename `activated` to `is_activated`Oliver Breitwieser4-10/+10
This allows the activation code to be later given parameters.
2017-11-02cmd/test: fix a typo in a commentBen Boeckel1-1/+1
2017-11-02spec_yaml: fix a typoBen Boeckel1-1/+1
2017-11-02view: fix a typoOliver Breitwieser1-1/+1
2017-11-02determine full compiler version for gcc-7Ben Boeckel1-1/+4
Fixes #5778. Spack uses 'gcc -dumpversion' to determine the full version of gcc. 'gcc -dumpversion' no longer gives the full version on gcc 7.2.0. 'gcc -dumpfullversion' is required instead. This PR detects when 'gcc -dumpversion' gives a truncated version of '7' and in that case retrieves the full version with 'gcc -dumpfullversion'
2017-11-02Only use XCode clang wrappers for packages that set use_xcode=True (#6077)Todd Gamblin3-23/+11
2017-11-01update filename used for cc wrapper invocation debug log (#5837)scheibelp3-3/+8
The name of the debug log written by the cc compiler wrapper was given by Spec.short_spec, which includes the architecture. Somewhere along the line Spec.format started adding spaces around the architecture property so the filename started including spaces; the cc wrapper script appears to ignore this, so files like spack-cc-bzip2-....in.log (which record the wrapped compiler invocations) were not being generated. This uses a different format string from the spec to generate the wrapper log file names (which does not include spaces).
2017-11-01Fix user specs which include already-installed packages (#5939)scheibelp2-1/+7
* when a user-provided spec refers to an already-installed package, packages with patches applied were causing validation errors based on the recorded variants in the package's class * avoid checks on all reserved variants (not just 'patches')
2017-10-30Auto install available pre-built packages from binary cache (#5242)scheibelp5-30/+62
* basic functionality to install spec from a binary cache when it's available; this spiders each cache for each package and could likely be more efficient by caching the results of the first check * add spec to db after installing from binary cache * cache (in memory) spec listings retrieved from binary caches * print a warning vs. failing when no mirrors are configured to retrieve pre-built Spack packages * make automatic retrieval of pre-built spack packages from mirrors optional * no code was using the links stored in the dictionary returned by get_specs, so this simplifies the logic to return only a set of specs * print package prefix after installing from binary cache * provide more information to user on install progress
2017-10-27Bugfix: from_list_url(). (#5780)Sergey Kosukhin2-1/+16
This fixes a bug in from_list_url where it was referring to a method which no longer exists. This also adds a test for the from_list_url function.
2017-10-26Package.extends: update semantics when package isn't concrete (#5600)Ben Boeckel1-1/+10
This updates the logic for Package.extends so that if the spec associated with the package is not concrete, it will report true if the package *could extend* the given spec; generally speaking a package could extend a spec as long as none of the details associated with its extendee spec conflict with the given spec. When the spec associated with the package is concrete, this function will only report whether the package *does extend* the given spec. When both the specs are concrete, the semantics are the same as before.
2017-10-26Buildcache: symlinks, externals, & install-checking (#5894)Patrick Gartung4-61/+62
* When creating a tar of a package for a build cache, symlinks are preserved (the corresponding path in the newly-created tarfile will be a symlink rather than a copy of the file) * Dont add external packages to a build cache * When installing from binary cache, don't create install prefix until verification is complete
2017-10-26Colorize "Installing pkg_name" (#5950)Ondřej Čertík1-1/+2
Now one can quickly visually see in the terminal which packages are installed and where each package begins and ends in the log.
2017-10-25Check for namespace-qualified packages in repo_for_pkg (#5787)scheibelp2-10/+88
* Fixes #5754 Previously when RepoPath.repo_for_pkg was invoked with a string, it did not check if the string included a namespace. Any namespace-qualified package provided as a string would not be found (at which point the behavior was to return the highest-precedence repository). * handle nested namespaces for packages specified as strings in repo_for_pkg * add preliminary repository tests * add test which replicates #5754 * refactor repo tests with fixtures * define repo_path equivalent at test-level scope for repo tests * add tests for unknown namespace/package * rename fixture function (no longer prefixed with 'test_')
2017-10-25Specify base branch for flake8 comparison (#5796)George Hartzell1-1/+6
Internally we work against a branch named 'llnl/develop', which mirrors the public repository's `develop` branch. It's useful to be able to run flake8 on our changes, using `llnl/develop` as the base branch instead of `develop`. Internally the flake8 subcommand generates the list of changes files using a hardcoded range of `develop...`. This makes the base of that range a command line option, with a default of `develop`. That lets us do this: ``` spack flake8 --base llnl/develop ``` which uses a range of `llnl/develop...`.
2017-10-24'spack install' can overwrite an existing installation (#5384)Massimiliano Culpo4-52/+274
'spack install' can now reinstall a spec even if it has dependents, via the --overwrite option. This option moves the current installation in a temporary directory. If the reinstallation is successful the temporary is removed, otherwise a rollback is performed.
2017-10-24Fix bug in spack flake8 when no files differ from develop (#5898)Todd Gamblin1-1/+4
2017-10-24do not use 'l' as a variable name, to appease new flake8 versionTodd Gamblin8-55/+53
- new E741 flake8 checks disallow 'l', 'O', and 'I' as variable names - rework parts of the code that use this, to be compliant - we could add exceptions for this, but we're trying to mostly keep up with PEP8 and we already have more than a few exceptions.
2017-10-24Fix bare 'except:' to placate errors in new flake8 version.Todd Gamblin12-21/+21
- fixes E722 errors from latest version of flake8 - requires us to not use 'bare except:' and catch BaseException instead
2017-10-24log tests use tmpdir properlyTodd Gamblin1-30/+35
2017-10-24fix bugs found with stricter flake8 rulesTodd Gamblin7-9/+17
- When you don't use wildcards, flake8 will find places where you used an undefined name. - This commit has all the bugfixes resulting from this static check.
2017-10-24remove wildcards from make spack core and packagesTodd Gamblin76-129/+195
- This removes all wildcard imports EXCEPT `from spack import *` in packages
2017-10-24flake8: no wildcards in core; only `import *` from spack in packagesTodd Gamblin2-20/+52
There are now separate flake8 configs for core vs. packages: - core has a smaller set of flake8 exceptions - packages allow `from spack import *` and module globals - Allows core to take advantage of static checking for undefined names - Allows packages to keep using Spack tricks like `from spack import *` and dependencies setting globals for dependents.
2017-10-24add --all option to `spack flake8`Todd Gamblin1-14/+41
- `-a`/`--all` causes flake8 to run on all files rather than just different ones.
2017-10-23package: remove bare except statements (#5896)scheibelp1-2/+2
2017-10-20getting_started.rst: removed tip suggesting the use of 2 Spack instances (#4061)Massimiliano Culpo1-13/+0
2017-10-20module-type argument defaults to 'tcl' instead of every known type (#5751)Massimiliano Culpo3-3/+6
fixes #5721 This is to solve the fact that lmod needs to be configured by the user (to specify a core compiler).
2017-10-20buildcache command updates (#5860)Patrick Gartung3-37/+159
* Add better spec matching to spack buildcache * skip download of spec.yaml and keys if they exist * autopep8
2017-10-20Update Getting Started docs to clarify that full Xcode suite is required for ↵Adam J. Stewart2-6/+79
qt (#4958) * Update Getting Started docs to clarify that full Xcode suite is required for qt * Better error message when only the command-line tools are installed
2017-10-19spack blame can take a path to a file in the Spack repo (#5793)Todd Gamblin2-7/+28
- Previously `spack blame` only worked for package names; now it works for paths as well, so developers can use it on core spack files.
2017-10-19Allow documentation to build in Python 3 (#5736)Adam J. Stewart1-7/+2
2017-10-17filter_file, don't remove absent backup file (#5733)George Hartzell1-1/+1
I'm tracking down a problem with the perl package that's been generating this error: ``` OSError: OSError: [Errno 2] No such file or directory: '/blah/blah/blah/lib/5.24.1/x86_64-linux/Config.pm~' ``` The real problem is upstream, but it's being masked by an exception raised in `filter_file`s finally block. In my case, `backup` is `False`. The backup is created around line 127, the `re.sub()` calls fails (working on that), the `except` block fires and moves the backup file back, then the finally block tries to remove the non-existent backup file. This change just avoids trying to remove the non-existent file.
2017-10-17Minor typos and corections (#5789)Michael F. Herbst1-2/+2
- The shell script uses arrays and hence only works on sophisticated shells and not the default `sh`. For clarity the shebang `#!/bin/bash` has been used instead.
2017-10-17Exercise more code paths in the git fetcher.Todd Gamblin1-7/+35
- This fakes out GitFetchStrategy to try code paths for different git versions. - This allows us to test code paths for old versions using a newer git version.
2017-10-17Spack tests no longer clutter var/spack/stageTodd Gamblin5-106/+153
- Tests use a session-scoped mock stage directory so as not to interfere with the real install. - Every test is forced to clean up after itself with an additional check. We now automatically assert that no new files have been added to `spack.stage_path` during each test. - This means that tests that fail installs now need to clean up their stages, but in all other cases the check is useful.
2017-10-17``Package.stage`` no longer implicitly makes stage directoryTodd Gamblin1-9/+9
- Be explicit about stage creation during the install process. - This avoids accidental creation of stages - e.g., during `spack install --fake`, stages were erroneously recreated after being destroyed